30 #ifndef GOOGLE_DATAFLOW_API_DISPLAY_DATA_H_ 31 #define GOOGLE_DATAFLOW_API_DISPLAY_DATA_H_ 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" 85 return StringPiece(
"google_dataflow_api::DisplayData");
94 return Storage().isMember(
"boolValue");
101 MutableStorage()->removeMember(
"boolValue");
109 const Json::Value& storage = Storage(
"boolValue");
110 return client::JsonValueToCppValueHelper<bool >(storage);
121 client::SetJsonValueFromCppValueHelper<bool >(
122 value, MutableStorage(
"boolValue"));
131 return Storage().isMember(
"durationValue");
138 MutableStorage()->removeMember(
"durationValue");
146 const Json::Value& v = Storage(
"durationValue");
147 if (v == Json::Value::null)
return StringPiece(
"");
148 return StringPiece(v.asCString());
159 *MutableStorage(
"durationValue") = value.data();
168 return Storage().isMember(
"floatValue");
175 MutableStorage()->removeMember(
"floatValue");
183 const Json::Value& storage = Storage(
"floatValue");
184 return client::JsonValueToCppValueHelper<float >(storage);
195 client::SetJsonValueFromCppValueHelper<float >(
196 value, MutableStorage(
"floatValue"));
205 return Storage().isMember(
"int64Value");
212 MutableStorage()->removeMember(
"int64Value");
220 const Json::Value& storage = Storage(
"int64Value");
221 return client::JsonValueToCppValueHelper<int64 >(storage);
232 client::SetJsonValueFromCppValueHelper<int64 >(
233 value, MutableStorage(
"int64Value"));
242 return Storage().isMember(
"javaClassValue");
249 MutableStorage()->removeMember(
"javaClassValue");
257 const Json::Value& v = Storage(
"javaClassValue");
258 if (v == Json::Value::null)
return StringPiece(
"");
259 return StringPiece(v.asCString());
270 *MutableStorage(
"javaClassValue") = value.data();
279 return Storage().isMember(
"key");
286 MutableStorage()->removeMember(
"key");
294 const Json::Value& v = Storage(
"key");
295 if (v == Json::Value::null)
return StringPiece(
"");
296 return StringPiece(v.asCString());
309 *MutableStorage(
"key") = value.data();
318 return Storage().isMember(
"label");
325 MutableStorage()->removeMember(
"label");
333 const Json::Value& v = Storage(
"label");
334 if (v == Json::Value::null)
return StringPiece(
"");
335 return StringPiece(v.asCString());
346 *MutableStorage(
"label") = value.data();
355 return Storage().isMember(
"namespace");
362 MutableStorage()->removeMember(
"namespace");
370 const Json::Value& v = Storage(
"namespace");
371 if (v == Json::Value::null)
return StringPiece(
"");
372 return StringPiece(v.asCString());
386 *MutableStorage(
"namespace") = value.data();
395 return Storage().isMember(
"shortStrValue");
402 MutableStorage()->removeMember(
"shortStrValue");
410 const Json::Value& v = Storage(
"shortStrValue");
411 if (v == Json::Value::null)
return StringPiece(
"");
412 return StringPiece(v.asCString());
428 *MutableStorage(
"shortStrValue") = value.data();
437 return Storage().isMember(
"strValue");
444 MutableStorage()->removeMember(
"strValue");
452 const Json::Value& v = Storage(
"strValue");
453 if (v == Json::Value::null)
return StringPiece(
"");
454 return StringPiece(v.asCString());
465 *MutableStorage(
"strValue") = value.data();
474 return Storage().isMember(
"timestampValue");
481 MutableStorage()->removeMember(
"timestampValue");
489 const Json::Value& v = Storage(
"timestampValue");
490 if (v == Json::Value::null)
return StringPiece(
"");
491 return StringPiece(v.asCString());
502 *MutableStorage(
"timestampValue") = value.data();
511 return Storage().isMember(
"url");
518 MutableStorage()->removeMember(
"url");
526 const Json::Value& v = Storage(
"url");
527 if (v == Json::Value::null)
return StringPiece(
"");
528 return StringPiece(v.asCString());
539 *MutableStorage(
"url") = value.data();
546 #endif // GOOGLE_DATAFLOW_API_DISPLAY_DATA_H_ void clear_float_value()
Definition: display_data.h:174
void clear_label()
Definition: display_data.h:324
bool has_label() const
Definition: display_data.h:317
const StringPiece get_timestamp_value() const
Definition: display_data.h:488
void set_duration_value(const StringPiece &value)
Definition: display_data.h:158
void set_float_value(float value)
Definition: display_data.h:194
void clear_key()
Definition: display_data.h:285
void clear_namespace()
Definition: display_data.h:361
void clear_str_value()
Definition: display_data.h:443
void set_timestamp_value(const StringPiece &value)
Definition: display_data.h:501
void set_java_class_value(const StringPiece &value)
Definition: display_data.h:269
void set_bool_value(bool value)
Definition: display_data.h:120
void clear_int64_value()
Definition: display_data.h:211
const StringPiece get_java_class_value() const
Definition: display_data.h:256
void clear_timestamp_value()
Definition: display_data.h:480
const StringPiece get_url() const
Definition: display_data.h:525
bool has_str_value() const
Definition: display_data.h:436
void clear_java_class_value()
Definition: display_data.h:248
void set_key(const StringPiece &value)
Definition: display_data.h:308
bool has_namespace() const
Definition: display_data.h:354
bool has_java_class_value() const
Definition: display_data.h:241
void clear_duration_value()
Definition: display_data.h:137
const StringPiece get_key() const
Definition: display_data.h:293
const StringPiece GetTypeName() const
Definition: display_data.h:84
void clear_bool_value()
Definition: display_data.h:100
const StringPiece get_duration_value() const
Definition: display_data.h:145
int64 get_int64_value() const
Definition: display_data.h:219
void clear_url()
Definition: display_data.h:517
void set_label(const StringPiece &value)
Definition: display_data.h:345
bool has_short_str_value() const
Definition: display_data.h:394
bool get_bool_value() const
Definition: display_data.h:108
bool has_key() const
Definition: display_data.h:278
void set_url(const StringPiece &value)
Definition: display_data.h:538
float get_float_value() const
Definition: display_data.h:182
const StringPiece get_namespace() const
Definition: display_data.h:369
void set_int64_value(int64 value)
Definition: display_data.h:231
Definition: approximate_progress.h:40
bool has_int64_value() const
Definition: display_data.h:204
const StringPiece get_label() const
Definition: display_data.h:332
void set_short_str_value(const StringPiece &value)
Definition: display_data.h:427
void set_str_value(const StringPiece &value)
Definition: display_data.h:464
bool has_timestamp_value() const
Definition: display_data.h:473
const StringPiece get_short_str_value() const
Definition: display_data.h:409
bool has_duration_value() const
Definition: display_data.h:130
bool has_float_value() const
Definition: display_data.h:167
Definition: approximate_progress.cc:42
const StringPiece get_str_value() const
Definition: display_data.h:451
Definition: display_data.h:51
void clear_short_str_value()
Definition: display_data.h:401
bool has_bool_value() const
Definition: display_data.h:93
void set_namespace(const StringPiece &value)
Definition: display_data.h:385
bool has_url() const
Definition: display_data.h:510