dataflow  v1b3
autoscaling_event.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2020-03-19, 02:23:49 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Dataflow API (dataflow/v1b3)
24 // Generated from:
25 // Version: v1b3
26 // Revision: 302
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_DATAFLOW_API_AUTOSCALING_EVENT_H_
31 #define GOOGLE_DATAFLOW_API_AUTOSCALING_EVENT_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/dataflow_api/structured_message.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_dataflow_api {
46 using namespace googleapis;
47 
54 class AutoscalingEvent : public client::JsonCppData {
55  public:
61  static AutoscalingEvent* New();
62 
68  explicit AutoscalingEvent(const Json::Value& storage);
69 
75  explicit AutoscalingEvent(Json::Value* storage);
76 
80  virtual ~AutoscalingEvent();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_dataflow_api::AutoscalingEvent");
89  }
90 
96  bool has_current_num_workers() const {
97  return Storage().isMember("currentNumWorkers");
98  }
99 
104  MutableStorage()->removeMember("currentNumWorkers");
105  }
106 
107 
111  int64 get_current_num_workers() const {
112  const Json::Value& storage = Storage("currentNumWorkers");
113  return client::JsonValueToCppValueHelper<int64 >(storage);
114  }
115 
123  void set_current_num_workers(int64 value) {
124  client::SetJsonValueFromCppValueHelper<int64 >(
125  value, MutableStorage("currentNumWorkers"));
126  }
127 
133  bool has_description() const {
134  return Storage().isMember("description");
135  }
136 
141  MutableStorage()->removeMember("description");
142  }
143 
144 
148  const StructuredMessage get_description() const;
149 
160  StructuredMessage mutable_description();
161 
167  bool has_event_type() const {
168  return Storage().isMember("eventType");
169  }
170 
175  MutableStorage()->removeMember("eventType");
176  }
177 
178 
182  const StringPiece get_event_type() const {
183  const Json::Value& v = Storage("eventType");
184  if (v == Json::Value::null) return StringPiece("");
185  return StringPiece(v.asCString());
186  }
187 
195  void set_event_type(const StringPiece& value) {
196  *MutableStorage("eventType") = value.data();
197  }
198 
204  bool has_target_num_workers() const {
205  return Storage().isMember("targetNumWorkers");
206  }
207 
212  MutableStorage()->removeMember("targetNumWorkers");
213  }
214 
215 
219  int64 get_target_num_workers() const {
220  const Json::Value& storage = Storage("targetNumWorkers");
221  return client::JsonValueToCppValueHelper<int64 >(storage);
222  }
223 
231  void set_target_num_workers(int64 value) {
232  client::SetJsonValueFromCppValueHelper<int64 >(
233  value, MutableStorage("targetNumWorkers"));
234  }
235 
241  bool has_time() const {
242  return Storage().isMember("time");
243  }
244 
248  void clear_time() {
249  MutableStorage()->removeMember("time");
250  }
251 
252 
256  const StringPiece get_time() const {
257  const Json::Value& v = Storage("time");
258  if (v == Json::Value::null) return StringPiece("");
259  return StringPiece(v.asCString());
260  }
261 
270  void set_time(const StringPiece& value) {
271  *MutableStorage("time") = value.data();
272  }
273 
279  bool has_worker_pool() const {
280  return Storage().isMember("workerPool");
281  }
282 
287  MutableStorage()->removeMember("workerPool");
288  }
289 
290 
294  const StringPiece get_worker_pool() const {
295  const Json::Value& v = Storage("workerPool");
296  if (v == Json::Value::null) return StringPiece("");
297  return StringPiece(v.asCString());
298  }
299 
308  void set_worker_pool(const StringPiece& value) {
309  *MutableStorage("workerPool") = value.data();
310  }
311 
312  private:
313  void operator=(const AutoscalingEvent&);
314 }; // AutoscalingEvent
315 } // namespace google_dataflow_api
316 #endif // GOOGLE_DATAFLOW_API_AUTOSCALING_EVENT_H_
bool has_description() const
Definition: autoscaling_event.h:133
Definition: structured_message.h:54
const StringPiece GetTypeName() const
Definition: autoscaling_event.h:87
bool has_target_num_workers() const
Definition: autoscaling_event.h:204
const StringPiece get_time() const
Definition: autoscaling_event.h:256
Definition: autoscaling_event.h:54
void set_time(const StringPiece &value)
Definition: autoscaling_event.h:270
const StringPiece get_worker_pool() const
Definition: autoscaling_event.h:294
bool has_event_type() const
Definition: autoscaling_event.h:167
void clear_current_num_workers()
Definition: autoscaling_event.h:103
void set_target_num_workers(int64 value)
Definition: autoscaling_event.h:231
bool has_time() const
Definition: autoscaling_event.h:241
void set_event_type(const StringPiece &value)
Definition: autoscaling_event.h:195
void clear_time()
Definition: autoscaling_event.h:248
const StringPiece get_event_type() const
Definition: autoscaling_event.h:182
int64 get_target_num_workers() const
Definition: autoscaling_event.h:219
Definition: approximate_progress.h:40
bool has_worker_pool() const
Definition: autoscaling_event.h:279
void set_current_num_workers(int64 value)
Definition: autoscaling_event.h:123
void clear_target_num_workers()
Definition: autoscaling_event.h:211
int64 get_current_num_workers() const
Definition: autoscaling_event.h:111
void clear_worker_pool()
Definition: autoscaling_event.h:286
void clear_description()
Definition: autoscaling_event.h:140
bool has_current_num_workers() const
Definition: autoscaling_event.h:96
Definition: approximate_progress.cc:42
void clear_event_type()
Definition: autoscaling_event.h:174
void set_worker_pool(const StringPiece &value)
Definition: autoscaling_event.h:308