dataflow  v1b3
snapshot.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_SNAPSHOT_H_
31 #define GOOGLE_DATAFLOW_API_SNAPSHOT_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 #include "google/dataflow_api/pubsub_snapshot_metadata.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_dataflow_api {
46 using namespace googleapis;
47 
53 class Snapshot : public client::JsonCppData {
54  public:
60  static Snapshot* New();
61 
67  explicit Snapshot(const Json::Value& storage);
68 
74  explicit Snapshot(Json::Value* storage);
75 
79  virtual ~Snapshot();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_dataflow_api::Snapshot");
88  }
89 
95  bool has_creation_time() const {
96  return Storage().isMember("creationTime");
97  }
98 
103  MutableStorage()->removeMember("creationTime");
104  }
105 
106 
110  const StringPiece get_creation_time() const {
111  const Json::Value& v = Storage("creationTime");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_creation_time(const StringPiece& value) {
124  *MutableStorage("creationTime") = value.data();
125  }
126 
132  bool has_description() const {
133  return Storage().isMember("description");
134  }
135 
140  MutableStorage()->removeMember("description");
141  }
142 
143 
147  const StringPiece get_description() const {
148  const Json::Value& v = Storage("description");
149  if (v == Json::Value::null) return StringPiece("");
150  return StringPiece(v.asCString());
151  }
152 
160  void set_description(const StringPiece& value) {
161  *MutableStorage("description") = value.data();
162  }
163 
169  bool has_disk_size_bytes() const {
170  return Storage().isMember("diskSizeBytes");
171  }
172 
177  MutableStorage()->removeMember("diskSizeBytes");
178  }
179 
180 
184  int64 get_disk_size_bytes() const {
185  const Json::Value& storage = Storage("diskSizeBytes");
186  return client::JsonValueToCppValueHelper<int64 >(storage);
187  }
188 
197  void set_disk_size_bytes(int64 value) {
198  client::SetJsonValueFromCppValueHelper<int64 >(
199  value, MutableStorage("diskSizeBytes"));
200  }
201 
207  bool has_id() const {
208  return Storage().isMember("id");
209  }
210 
214  void clear_id() {
215  MutableStorage()->removeMember("id");
216  }
217 
218 
222  const StringPiece get_id() const {
223  const Json::Value& v = Storage("id");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
235  void set_id(const StringPiece& value) {
236  *MutableStorage("id") = value.data();
237  }
238 
244  bool has_project_id() const {
245  return Storage().isMember("projectId");
246  }
247 
252  MutableStorage()->removeMember("projectId");
253  }
254 
255 
259  const StringPiece get_project_id() const {
260  const Json::Value& v = Storage("projectId");
261  if (v == Json::Value::null) return StringPiece("");
262  return StringPiece(v.asCString());
263  }
264 
272  void set_project_id(const StringPiece& value) {
273  *MutableStorage("projectId") = value.data();
274  }
275 
281  bool has_pubsub_metadata() const {
282  return Storage().isMember("pubsubMetadata");
283  }
284 
289  MutableStorage()->removeMember("pubsubMetadata");
290  }
291 
292 
297  const client::JsonCppArray<PubsubSnapshotMetadata > get_pubsub_metadata() const;
298 
307  client::JsonCppArray<PubsubSnapshotMetadata > mutable_pubsubMetadata();
308 
314  bool has_source_job_id() const {
315  return Storage().isMember("sourceJobId");
316  }
317 
322  MutableStorage()->removeMember("sourceJobId");
323  }
324 
325 
329  const StringPiece get_source_job_id() const {
330  const Json::Value& v = Storage("sourceJobId");
331  if (v == Json::Value::null) return StringPiece("");
332  return StringPiece(v.asCString());
333  }
334 
342  void set_source_job_id(const StringPiece& value) {
343  *MutableStorage("sourceJobId") = value.data();
344  }
345 
351  bool has_state() const {
352  return Storage().isMember("state");
353  }
354 
358  void clear_state() {
359  MutableStorage()->removeMember("state");
360  }
361 
362 
366  const StringPiece get_state() const {
367  const Json::Value& v = Storage("state");
368  if (v == Json::Value::null) return StringPiece("");
369  return StringPiece(v.asCString());
370  }
371 
379  void set_state(const StringPiece& value) {
380  *MutableStorage("state") = value.data();
381  }
382 
388  bool has_ttl() const {
389  return Storage().isMember("ttl");
390  }
391 
395  void clear_ttl() {
396  MutableStorage()->removeMember("ttl");
397  }
398 
399 
403  const StringPiece get_ttl() const {
404  const Json::Value& v = Storage("ttl");
405  if (v == Json::Value::null) return StringPiece("");
406  return StringPiece(v.asCString());
407  }
408 
416  void set_ttl(const StringPiece& value) {
417  *MutableStorage("ttl") = value.data();
418  }
419 
420  private:
421  void operator=(const Snapshot&);
422 }; // Snapshot
423 } // namespace google_dataflow_api
424 #endif // GOOGLE_DATAFLOW_API_SNAPSHOT_H_
bool has_state() const
Definition: snapshot.h:351
bool has_project_id() const
Definition: snapshot.h:244
const StringPiece get_description() const
Definition: snapshot.h:147
bool has_description() const
Definition: snapshot.h:132
void clear_state()
Definition: snapshot.h:358
bool has_pubsub_metadata() const
Definition: snapshot.h:281
void set_state(const StringPiece &value)
Definition: snapshot.h:379
void set_disk_size_bytes(int64 value)
Definition: snapshot.h:197
void set_description(const StringPiece &value)
Definition: snapshot.h:160
void clear_creation_time()
Definition: snapshot.h:102
const StringPiece get_source_job_id() const
Definition: snapshot.h:329
bool has_source_job_id() const
Definition: snapshot.h:314
bool has_creation_time() const
Definition: snapshot.h:95
const StringPiece get_creation_time() const
Definition: snapshot.h:110
const StringPiece get_state() const
Definition: snapshot.h:366
const StringPiece get_ttl() const
Definition: snapshot.h:403
void set_project_id(const StringPiece &value)
Definition: snapshot.h:272
bool has_ttl() const
Definition: snapshot.h:388
int64 get_disk_size_bytes() const
Definition: snapshot.h:184
void clear_description()
Definition: snapshot.h:139
void clear_id()
Definition: snapshot.h:214
bool has_id() const
Definition: snapshot.h:207
const StringPiece get_id() const
Definition: snapshot.h:222
void set_ttl(const StringPiece &value)
Definition: snapshot.h:416
void clear_pubsub_metadata()
Definition: snapshot.h:288
const StringPiece get_project_id() const
Definition: snapshot.h:259
void clear_project_id()
Definition: snapshot.h:251
Definition: approximate_progress.h:40
void clear_ttl()
Definition: snapshot.h:395
void clear_source_job_id()
Definition: snapshot.h:321
void clear_disk_size_bytes()
Definition: snapshot.h:176
void set_id(const StringPiece &value)
Definition: snapshot.h:235
void set_source_job_id(const StringPiece &value)
Definition: snapshot.h:342
Definition: approximate_progress.cc:42
bool has_disk_size_bytes() const
Definition: snapshot.h:169
void set_creation_time(const StringPiece &value)
Definition: snapshot.h:123
const StringPiece GetTypeName() const
Definition: snapshot.h:86
Definition: snapshot.h:53