30 #ifndef GOOGLE_DATAFLOW_API_METRIC_UPDATE_H_ 31 #define GOOGLE_DATAFLOW_API_METRIC_UPDATE_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/dataflow_api/metric_structured_name.h" 86 return StringPiece(
"google_dataflow_api::MetricUpdate");
95 return Storage().isMember(
"cumulative");
102 MutableStorage()->removeMember(
"cumulative");
110 const Json::Value& storage = Storage(
"cumulative");
111 return client::JsonValueToCppValueHelper<bool >(storage);
125 client::SetJsonValueFromCppValueHelper<bool >(
126 value, MutableStorage(
"cumulative"));
135 return Storage().isMember(
"distribution");
142 MutableStorage()->removeMember(
"distribution");
150 const Json::Value& storage = Storage(
"distribution");
151 return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
163 Json::Value* storage = MutableStorage(
"distribution");
164 return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
173 return Storage().isMember(
"gauge");
180 MutableStorage()->removeMember(
"gauge");
188 const Json::Value& storage = Storage(
"gauge");
189 return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
202 Json::Value* storage = MutableStorage(
"gauge");
203 return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
212 return Storage().isMember(
"internal");
219 MutableStorage()->removeMember(
"internal");
227 const Json::Value& storage = Storage(
"internal");
228 return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
241 Json::Value* storage = MutableStorage(
"internal");
242 return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
251 return Storage().isMember(
"kind");
258 MutableStorage()->removeMember(
"kind");
266 const Json::Value& v = Storage(
"kind");
267 if (v == Json::Value::null)
return StringPiece(
"");
268 return StringPiece(v.asCString());
284 *MutableStorage(
"kind") = value.data();
293 return Storage().isMember(
"meanCount");
300 MutableStorage()->removeMember(
"meanCount");
308 const Json::Value& storage = Storage(
"meanCount");
309 return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
324 Json::Value* storage = MutableStorage(
"meanCount");
325 return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
334 return Storage().isMember(
"meanSum");
341 MutableStorage()->removeMember(
"meanSum");
349 const Json::Value& storage = Storage(
"meanSum");
350 return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
364 Json::Value* storage = MutableStorage(
"meanSum");
365 return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
374 return Storage().isMember(
"name");
381 MutableStorage()->removeMember(
"name");
405 return Storage().isMember(
"scalar");
412 MutableStorage()->removeMember(
"scalar");
420 const Json::Value& storage = Storage(
"scalar");
421 return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
433 Json::Value* storage = MutableStorage(
"scalar");
434 return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
443 return Storage().isMember(
"set");
450 MutableStorage()->removeMember(
"set");
458 const Json::Value& storage = Storage(
"set");
459 return client::JsonValueToCppValueHelper<client::JsonCppData >(storage);
473 Json::Value* storage = MutableStorage(
"set");
474 return client::JsonValueToMutableCppValueHelper<client::JsonCppData >(storage);
483 return Storage().isMember(
"updateTime");
490 MutableStorage()->removeMember(
"updateTime");
498 const Json::Value& v = Storage(
"updateTime");
499 if (v == Json::Value::null)
return StringPiece(
"");
500 return StringPiece(v.asCString());
513 *MutableStorage(
"updateTime") = value.data();
520 #endif // GOOGLE_DATAFLOW_API_METRIC_UPDATE_H_ bool has_name() const
Definition: metric_update.h:373
client::JsonCppData mutable_distribution()
Definition: metric_update.h:162
bool has_scalar() const
Definition: metric_update.h:404
Definition: metric_structured_name.h:51
client::JsonCppData mutable_meanSum()
Definition: metric_update.h:363
void clear_update_time()
Definition: metric_update.h:489
Definition: metric_update.h:52
client::JsonCppData mutable_internal()
Definition: metric_update.h:240
void clear_kind()
Definition: metric_update.h:257
const client::JsonCppData get_internal() const
Definition: metric_update.h:226
bool has_set() const
Definition: metric_update.h:442
void set_update_time(const StringPiece &value)
Definition: metric_update.h:512
void clear_set()
Definition: metric_update.h:449
bool has_distribution() const
Definition: metric_update.h:134
client::JsonCppData mutable_gauge()
Definition: metric_update.h:201
bool has_gauge() const
Definition: metric_update.h:172
void clear_internal()
Definition: metric_update.h:218
const client::JsonCppData get_set() const
Definition: metric_update.h:457
bool get_cumulative() const
Definition: metric_update.h:109
const StringPiece GetTypeName() const
Definition: metric_update.h:85
void clear_mean_sum()
Definition: metric_update.h:340
const client::JsonCppData get_scalar() const
Definition: metric_update.h:419
void set_cumulative(bool value)
Definition: metric_update.h:124
bool has_internal() const
Definition: metric_update.h:211
const StringPiece get_update_time() const
Definition: metric_update.h:497
bool has_mean_count() const
Definition: metric_update.h:292
bool has_update_time() const
Definition: metric_update.h:482
void clear_mean_count()
Definition: metric_update.h:299
Definition: approximate_progress.h:40
client::JsonCppData mutable_meanCount()
Definition: metric_update.h:323
void clear_distribution()
Definition: metric_update.h:141
void set_kind(const StringPiece &value)
Definition: metric_update.h:283
const StringPiece get_kind() const
Definition: metric_update.h:265
const client::JsonCppData get_gauge() const
Definition: metric_update.h:187
client::JsonCppData mutable_scalar()
Definition: metric_update.h:432
bool has_cumulative() const
Definition: metric_update.h:94
client::JsonCppData mutable_set()
Definition: metric_update.h:472
void clear_gauge()
Definition: metric_update.h:179
void clear_name()
Definition: metric_update.h:380
Definition: approximate_progress.cc:42
void clear_scalar()
Definition: metric_update.h:411
bool has_mean_sum() const
Definition: metric_update.h:333
const client::JsonCppData get_mean_count() const
Definition: metric_update.h:307
void clear_cumulative()
Definition: metric_update.h:101
const client::JsonCppData get_distribution() const
Definition: metric_update.h:149
bool has_kind() const
Definition: metric_update.h:250
const client::JsonCppData get_mean_sum() const
Definition: metric_update.h:348