dataflow  v1b3
display_data.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_DISPLAY_DATA_H_
31 #define GOOGLE_DATAFLOW_API_DISPLAY_DATA_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_dataflow_api {
44 using namespace googleapis;
45 
51 class DisplayData : public client::JsonCppData {
52  public:
58  static DisplayData* New();
59 
65  explicit DisplayData(const Json::Value& storage);
66 
72  explicit DisplayData(Json::Value* storage);
73 
77  virtual ~DisplayData();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_dataflow_api::DisplayData");
86  }
87 
93  bool has_bool_value() const {
94  return Storage().isMember("boolValue");
95  }
96 
101  MutableStorage()->removeMember("boolValue");
102  }
103 
104 
108  bool get_bool_value() const {
109  const Json::Value& storage = Storage("boolValue");
110  return client::JsonValueToCppValueHelper<bool >(storage);
111  }
112 
120  void set_bool_value(bool value) {
121  client::SetJsonValueFromCppValueHelper<bool >(
122  value, MutableStorage("boolValue"));
123  }
124 
130  bool has_duration_value() const {
131  return Storage().isMember("durationValue");
132  }
133 
138  MutableStorage()->removeMember("durationValue");
139  }
140 
141 
145  const StringPiece get_duration_value() const {
146  const Json::Value& v = Storage("durationValue");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
158  void set_duration_value(const StringPiece& value) {
159  *MutableStorage("durationValue") = value.data();
160  }
161 
167  bool has_float_value() const {
168  return Storage().isMember("floatValue");
169  }
170 
175  MutableStorage()->removeMember("floatValue");
176  }
177 
178 
182  float get_float_value() const {
183  const Json::Value& storage = Storage("floatValue");
184  return client::JsonValueToCppValueHelper<float >(storage);
185  }
186 
194  void set_float_value(float value) {
195  client::SetJsonValueFromCppValueHelper<float >(
196  value, MutableStorage("floatValue"));
197  }
198 
204  bool has_int64_value() const {
205  return Storage().isMember("int64Value");
206  }
207 
212  MutableStorage()->removeMember("int64Value");
213  }
214 
215 
219  int64 get_int64_value() const {
220  const Json::Value& storage = Storage("int64Value");
221  return client::JsonValueToCppValueHelper<int64 >(storage);
222  }
223 
231  void set_int64_value(int64 value) {
232  client::SetJsonValueFromCppValueHelper<int64 >(
233  value, MutableStorage("int64Value"));
234  }
235 
241  bool has_java_class_value() const {
242  return Storage().isMember("javaClassValue");
243  }
244 
249  MutableStorage()->removeMember("javaClassValue");
250  }
251 
252 
256  const StringPiece get_java_class_value() const {
257  const Json::Value& v = Storage("javaClassValue");
258  if (v == Json::Value::null) return StringPiece("");
259  return StringPiece(v.asCString());
260  }
261 
269  void set_java_class_value(const StringPiece& value) {
270  *MutableStorage("javaClassValue") = value.data();
271  }
272 
278  bool has_key() const {
279  return Storage().isMember("key");
280  }
281 
285  void clear_key() {
286  MutableStorage()->removeMember("key");
287  }
288 
289 
293  const StringPiece get_key() const {
294  const Json::Value& v = Storage("key");
295  if (v == Json::Value::null) return StringPiece("");
296  return StringPiece(v.asCString());
297  }
298 
308  void set_key(const StringPiece& value) {
309  *MutableStorage("key") = value.data();
310  }
311 
317  bool has_label() const {
318  return Storage().isMember("label");
319  }
320 
324  void clear_label() {
325  MutableStorage()->removeMember("label");
326  }
327 
328 
332  const StringPiece get_label() const {
333  const Json::Value& v = Storage("label");
334  if (v == Json::Value::null) return StringPiece("");
335  return StringPiece(v.asCString());
336  }
337 
345  void set_label(const StringPiece& value) {
346  *MutableStorage("label") = value.data();
347  }
348 
354  bool has_namespace() const {
355  return Storage().isMember("namespace");
356  }
357 
362  MutableStorage()->removeMember("namespace");
363  }
364 
365 
369  const StringPiece get_namespace() const {
370  const Json::Value& v = Storage("namespace");
371  if (v == Json::Value::null) return StringPiece("");
372  return StringPiece(v.asCString());
373  }
374 
385  void set_namespace(const StringPiece& value) {
386  *MutableStorage("namespace") = value.data();
387  }
388 
394  bool has_short_str_value() const {
395  return Storage().isMember("shortStrValue");
396  }
397 
402  MutableStorage()->removeMember("shortStrValue");
403  }
404 
405 
409  const StringPiece get_short_str_value() const {
410  const Json::Value& v = Storage("shortStrValue");
411  if (v == Json::Value::null) return StringPiece("");
412  return StringPiece(v.asCString());
413  }
414 
427  void set_short_str_value(const StringPiece& value) {
428  *MutableStorage("shortStrValue") = value.data();
429  }
430 
436  bool has_str_value() const {
437  return Storage().isMember("strValue");
438  }
439 
444  MutableStorage()->removeMember("strValue");
445  }
446 
447 
451  const StringPiece get_str_value() const {
452  const Json::Value& v = Storage("strValue");
453  if (v == Json::Value::null) return StringPiece("");
454  return StringPiece(v.asCString());
455  }
456 
464  void set_str_value(const StringPiece& value) {
465  *MutableStorage("strValue") = value.data();
466  }
467 
473  bool has_timestamp_value() const {
474  return Storage().isMember("timestampValue");
475  }
476 
481  MutableStorage()->removeMember("timestampValue");
482  }
483 
484 
488  const StringPiece get_timestamp_value() const {
489  const Json::Value& v = Storage("timestampValue");
490  if (v == Json::Value::null) return StringPiece("");
491  return StringPiece(v.asCString());
492  }
493 
501  void set_timestamp_value(const StringPiece& value) {
502  *MutableStorage("timestampValue") = value.data();
503  }
504 
510  bool has_url() const {
511  return Storage().isMember("url");
512  }
513 
517  void clear_url() {
518  MutableStorage()->removeMember("url");
519  }
520 
521 
525  const StringPiece get_url() const {
526  const Json::Value& v = Storage("url");
527  if (v == Json::Value::null) return StringPiece("");
528  return StringPiece(v.asCString());
529  }
530 
538  void set_url(const StringPiece& value) {
539  *MutableStorage("url") = value.data();
540  }
541 
542  private:
543  void operator=(const DisplayData&);
544 }; // DisplayData
545 } // namespace google_dataflow_api
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