dataflow  v1b3
worker_health_report.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_WORKER_HEALTH_REPORT_H_
31 #define GOOGLE_DATAFLOW_API_WORKER_HEALTH_REPORT_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_dataflow_api {
43 using namespace googleapis;
44 
53 class WorkerHealthReport : public client::JsonCppData {
54  public:
60  static WorkerHealthReport* New();
61 
67  explicit WorkerHealthReport(const Json::Value& storage);
68 
74  explicit WorkerHealthReport(Json::Value* storage);
75 
79  virtual ~WorkerHealthReport();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_dataflow_api::WorkerHealthReport");
88  }
89 
95  bool has_msg() const {
96  return Storage().isMember("msg");
97  }
98 
102  void clear_msg() {
103  MutableStorage()->removeMember("msg");
104  }
105 
106 
110  const StringPiece get_msg() const {
111  const Json::Value& v = Storage("msg");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_msg(const StringPiece& value) {
124  *MutableStorage("msg") = value.data();
125  }
126 
132  bool has_pods() const {
133  return Storage().isMember("pods");
134  }
135 
139  void clear_pods() {
140  MutableStorage()->removeMember("pods");
141  }
142 
143 
147  const client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > get_pods() const {
148  const Json::Value& storage = Storage("pods");
149  return client::JsonValueToCppValueHelper<client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > >(storage);
150  }
151 
163  client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > mutable_pods() {
164  Json::Value* storage = MutableStorage("pods");
165  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > >(storage);
166  }
167 
173  bool has_report_interval() const {
174  return Storage().isMember("reportInterval");
175  }
176 
181  MutableStorage()->removeMember("reportInterval");
182  }
183 
184 
188  const StringPiece get_report_interval() const {
189  const Json::Value& v = Storage("reportInterval");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
203  void set_report_interval(const StringPiece& value) {
204  *MutableStorage("reportInterval") = value.data();
205  }
206 
212  bool has_vm_is_broken() const {
213  return Storage().isMember("vmIsBroken");
214  }
215 
220  MutableStorage()->removeMember("vmIsBroken");
221  }
222 
223 
227  bool get_vm_is_broken() const {
228  const Json::Value& storage = Storage("vmIsBroken");
229  return client::JsonValueToCppValueHelper<bool >(storage);
230  }
231 
241  void set_vm_is_broken(bool value) {
242  client::SetJsonValueFromCppValueHelper<bool >(
243  value, MutableStorage("vmIsBroken"));
244  }
245 
251  bool has_vm_is_healthy() const {
252  return Storage().isMember("vmIsHealthy");
253  }
254 
259  MutableStorage()->removeMember("vmIsHealthy");
260  }
261 
262 
266  bool get_vm_is_healthy() const {
267  const Json::Value& storage = Storage("vmIsHealthy");
268  return client::JsonValueToCppValueHelper<bool >(storage);
269  }
270 
278  void set_vm_is_healthy(bool value) {
279  client::SetJsonValueFromCppValueHelper<bool >(
280  value, MutableStorage("vmIsHealthy"));
281  }
282 
288  bool has_vm_startup_time() const {
289  return Storage().isMember("vmStartupTime");
290  }
291 
296  MutableStorage()->removeMember("vmStartupTime");
297  }
298 
299 
303  const StringPiece get_vm_startup_time() const {
304  const Json::Value& v = Storage("vmStartupTime");
305  if (v == Json::Value::null) return StringPiece("");
306  return StringPiece(v.asCString());
307  }
308 
316  void set_vm_startup_time(const StringPiece& value) {
317  *MutableStorage("vmStartupTime") = value.data();
318  }
319 
320  private:
321  void operator=(const WorkerHealthReport&);
322 }; // WorkerHealthReport
323 } // namespace google_dataflow_api
324 #endif // GOOGLE_DATAFLOW_API_WORKER_HEALTH_REPORT_H_
bool has_report_interval() const
Definition: worker_health_report.h:173
const StringPiece GetTypeName() const
Definition: worker_health_report.h:86
bool get_vm_is_healthy() const
Definition: worker_health_report.h:266
bool has_vm_is_healthy() const
Definition: worker_health_report.h:251
void clear_vm_is_healthy()
Definition: worker_health_report.h:258
bool has_pods() const
Definition: worker_health_report.h:132
bool get_vm_is_broken() const
Definition: worker_health_report.h:227
void set_vm_startup_time(const StringPiece &value)
Definition: worker_health_report.h:316
client::JsonCppArray< client::JsonCppAssociativeArray< client::JsonCppData > > mutable_pods()
Definition: worker_health_report.h:163
void clear_vm_is_broken()
Definition: worker_health_report.h:219
bool has_vm_is_broken() const
Definition: worker_health_report.h:212
const StringPiece get_msg() const
Definition: worker_health_report.h:110
void clear_msg()
Definition: worker_health_report.h:102
const StringPiece get_vm_startup_time() const
Definition: worker_health_report.h:303
Definition: approximate_progress.h:40
void set_vm_is_broken(bool value)
Definition: worker_health_report.h:241
bool has_vm_startup_time() const
Definition: worker_health_report.h:288
const StringPiece get_report_interval() const
Definition: worker_health_report.h:188
void set_report_interval(const StringPiece &value)
Definition: worker_health_report.h:203
Definition: worker_health_report.h:53
void set_msg(const StringPiece &value)
Definition: worker_health_report.h:123
void clear_report_interval()
Definition: worker_health_report.h:180
void clear_vm_startup_time()
Definition: worker_health_report.h:295
const client::JsonCppArray< client::JsonCppAssociativeArray< client::JsonCppData > > get_pods() const
Definition: worker_health_report.h:147
Definition: approximate_progress.cc:42
void clear_pods()
Definition: worker_health_report.h:139
void set_vm_is_healthy(bool value)
Definition: worker_health_report.h:278
bool has_msg() const
Definition: worker_health_report.h:95