30 #ifndef GOOGLE_DATAFLOW_API_WORKER_HEALTH_REPORT_H_ 31 #define GOOGLE_DATAFLOW_API_WORKER_HEALTH_REPORT_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 87 return StringPiece(
"google_dataflow_api::WorkerHealthReport");
96 return Storage().isMember(
"msg");
103 MutableStorage()->removeMember(
"msg");
111 const Json::Value& v = Storage(
"msg");
112 if (v == Json::Value::null)
return StringPiece(
"");
113 return StringPiece(v.asCString());
124 *MutableStorage(
"msg") = value.data();
133 return Storage().isMember(
"pods");
140 MutableStorage()->removeMember(
"pods");
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);
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);
174 return Storage().isMember(
"reportInterval");
181 MutableStorage()->removeMember(
"reportInterval");
189 const Json::Value& v = Storage(
"reportInterval");
190 if (v == Json::Value::null)
return StringPiece(
"");
191 return StringPiece(v.asCString());
204 *MutableStorage(
"reportInterval") = value.data();
213 return Storage().isMember(
"vmIsBroken");
220 MutableStorage()->removeMember(
"vmIsBroken");
228 const Json::Value& storage = Storage(
"vmIsBroken");
229 return client::JsonValueToCppValueHelper<bool >(storage);
242 client::SetJsonValueFromCppValueHelper<bool >(
243 value, MutableStorage(
"vmIsBroken"));
252 return Storage().isMember(
"vmIsHealthy");
259 MutableStorage()->removeMember(
"vmIsHealthy");
267 const Json::Value& storage = Storage(
"vmIsHealthy");
268 return client::JsonValueToCppValueHelper<bool >(storage);
279 client::SetJsonValueFromCppValueHelper<bool >(
280 value, MutableStorage(
"vmIsHealthy"));
289 return Storage().isMember(
"vmStartupTime");
296 MutableStorage()->removeMember(
"vmStartupTime");
304 const Json::Value& v = Storage(
"vmStartupTime");
305 if (v == Json::Value::null)
return StringPiece(
"");
306 return StringPiece(v.asCString());
317 *MutableStorage(
"vmStartupTime") = value.data();
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