compute  v1
zone_list.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: 2019-05-15, 03:08:54 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Compute Engine API (compute/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 214
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_ZONE_LIST_H_
31 #define GOOGLE_COMPUTE_API_ZONE_LIST_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/compute_api/zone.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_compute_api {
45 using namespace googleapis;
46 
52 class ZoneList : public client::JsonCppData {
53  public:
59  class ZoneListWarning : public client::JsonCppData {
60  public:
66  class ZoneListWarningData : public client::JsonCppData {
67  public:
73  static ZoneListWarningData* New();
74 
80  explicit ZoneListWarningData(const Json::Value& storage);
81 
87  explicit ZoneListWarningData(Json::Value* storage);
88 
92  virtual ~ZoneListWarningData();
93 
99  const StringPiece GetTypeName() const {
100  return StringPiece("google_compute_api::ZoneListWarningData");
101  }
102 
108  bool has_key() const {
109  return Storage().isMember("key");
110  }
111 
115  void clear_key() {
116  MutableStorage()->removeMember("key");
117  }
118 
119 
123  const StringPiece get_key() const {
124  const Json::Value& v = Storage("key");
125  if (v == Json::Value::null) return StringPiece("");
126  return StringPiece(v.asCString());
127  }
128 
142  void set_key(const StringPiece& value) {
143  *MutableStorage("key") = value.data();
144  }
145 
151  bool has_value() const {
152  return Storage().isMember("value");
153  }
154 
158  void clear_value() {
159  MutableStorage()->removeMember("value");
160  }
161 
162 
166  const StringPiece get_value() const {
167  const Json::Value& v = Storage("value");
168  if (v == Json::Value::null) return StringPiece("");
169  return StringPiece(v.asCString());
170  }
171 
179  void set_value(const StringPiece& value) {
180  *MutableStorage("value") = value.data();
181  }
182 
183  private:
184  void operator=(const ZoneListWarningData&);
185  }; // ZoneListWarningData
191  static ZoneListWarning* New();
192 
198  explicit ZoneListWarning(const Json::Value& storage);
199 
205  explicit ZoneListWarning(Json::Value* storage);
206 
210  virtual ~ZoneListWarning();
211 
217  const StringPiece GetTypeName() const {
218  return StringPiece("google_compute_api::ZoneListWarning");
219  }
220 
226  bool has_code() const {
227  return Storage().isMember("code");
228  }
229 
233  void clear_code() {
234  MutableStorage()->removeMember("code");
235  }
236 
237 
241  const StringPiece get_code() const {
242  const Json::Value& v = Storage("code");
243  if (v == Json::Value::null) return StringPiece("");
244  return StringPiece(v.asCString());
245  }
246 
255  void set_code(const StringPiece& value) {
256  *MutableStorage("code") = value.data();
257  }
258 
264  bool has_data() const {
265  return Storage().isMember("data");
266  }
267 
271  void clear_data() {
272  MutableStorage()->removeMember("data");
273  }
274 
275 
279  const client::JsonCppArray<ZoneListWarningData > get_data() const {
280  const Json::Value& storage = Storage("data");
281  return client::JsonValueToCppValueHelper<client::JsonCppArray<ZoneListWarningData > >(storage);
282  }
283 
293  client::JsonCppArray<ZoneListWarningData > mutable_data() {
294  Json::Value* storage = MutableStorage("data");
295  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<ZoneListWarningData > >(storage);
296  }
297 
303  bool has_message() const {
304  return Storage().isMember("message");
305  }
306 
310  void clear_message() {
311  MutableStorage()->removeMember("message");
312  }
313 
314 
318  const StringPiece get_message() const {
319  const Json::Value& v = Storage("message");
320  if (v == Json::Value::null) return StringPiece("");
321  return StringPiece(v.asCString());
322  }
323 
331  void set_message(const StringPiece& value) {
332  *MutableStorage("message") = value.data();
333  }
334 
335  private:
336  void operator=(const ZoneListWarning&);
337  }; // ZoneListWarning
343  static ZoneList* New();
344 
350  explicit ZoneList(const Json::Value& storage);
351 
357  explicit ZoneList(Json::Value* storage);
358 
362  virtual ~ZoneList();
363 
369  const StringPiece GetTypeName() const {
370  return StringPiece("google_compute_api::ZoneList");
371  }
372 
378  bool has_id() const {
379  return Storage().isMember("id");
380  }
381 
385  void clear_id() {
386  MutableStorage()->removeMember("id");
387  }
388 
389 
393  const StringPiece get_id() const {
394  const Json::Value& v = Storage("id");
395  if (v == Json::Value::null) return StringPiece("");
396  return StringPiece(v.asCString());
397  }
398 
406  void set_id(const StringPiece& value) {
407  *MutableStorage("id") = value.data();
408  }
409 
415  bool has_items() const {
416  return Storage().isMember("items");
417  }
418 
422  void clear_items() {
423  MutableStorage()->removeMember("items");
424  }
425 
426 
430  const client::JsonCppArray<Zone > get_items() const;
431 
439  client::JsonCppArray<Zone > mutable_items();
440 
446  bool has_kind() const {
447  return Storage().isMember("kind");
448  }
449 
453  void clear_kind() {
454  MutableStorage()->removeMember("kind");
455  }
456 
457 
461  const StringPiece get_kind() const {
462  const Json::Value& v = Storage("kind");
463  if (v == Json::Value::null) return StringPiece("");
464  return StringPiece(v.asCString());
465  }
466 
474  void set_kind(const StringPiece& value) {
475  *MutableStorage("kind") = value.data();
476  }
477 
483  bool has_next_page_token() const {
484  return Storage().isMember("nextPageToken");
485  }
486 
491  MutableStorage()->removeMember("nextPageToken");
492  }
493 
494 
498  const StringPiece get_next_page_token() const {
499  const Json::Value& v = Storage("nextPageToken");
500  if (v == Json::Value::null) return StringPiece("");
501  return StringPiece(v.asCString());
502  }
503 
515  void set_next_page_token(const StringPiece& value) {
516  *MutableStorage("nextPageToken") = value.data();
517  }
518 
524  bool has_self_link() const {
525  return Storage().isMember("selfLink");
526  }
527 
532  MutableStorage()->removeMember("selfLink");
533  }
534 
535 
539  const StringPiece get_self_link() const {
540  const Json::Value& v = Storage("selfLink");
541  if (v == Json::Value::null) return StringPiece("");
542  return StringPiece(v.asCString());
543  }
544 
552  void set_self_link(const StringPiece& value) {
553  *MutableStorage("selfLink") = value.data();
554  }
555 
561  bool has_warning() const {
562  return Storage().isMember("warning");
563  }
564 
568  void clear_warning() {
569  MutableStorage()->removeMember("warning");
570  }
571 
572 
576  const ZoneListWarning get_warning() const {
577  const Json::Value& storage = Storage("warning");
578  return client::JsonValueToCppValueHelper<ZoneListWarning >(storage);
579  }
580 
589  Json::Value* storage = MutableStorage("warning");
590  return client::JsonValueToMutableCppValueHelper<ZoneListWarning >(storage);
591  }
592 
593  private:
594  void operator=(const ZoneList&);
595 }; // ZoneList
596 } // namespace google_compute_api
597 #endif // GOOGLE_COMPUTE_API_ZONE_LIST_H_
const StringPiece get_id() const
Definition: zone_list.h:393
const StringPiece get_value() const
Definition: zone_list.h:166
void set_key(const StringPiece &value)
Definition: zone_list.h:142
void clear_kind()
Definition: zone_list.h:453
void clear_warning()
Definition: zone_list.h:568
const StringPiece GetTypeName() const
Definition: zone_list.h:99
void set_id(const StringPiece &value)
Definition: zone_list.h:406
void clear_self_link()
Definition: zone_list.h:531
const StringPiece get_kind() const
Definition: zone_list.h:461
bool has_self_link() const
Definition: zone_list.h:524
bool has_data() const
Definition: zone_list.h:264
const StringPiece get_self_link() const
Definition: zone_list.h:539
bool has_items() const
Definition: zone_list.h:415
void clear_code()
Definition: zone_list.h:233
const StringPiece GetTypeName() const
Definition: zone_list.h:217
void clear_data()
Definition: zone_list.h:271
ZoneListWarning mutable_warning()
Definition: zone_list.h:588
const StringPiece get_message() const
Definition: zone_list.h:318
const StringPiece GetTypeName() const
Definition: zone_list.h:369
bool has_kind() const
Definition: zone_list.h:446
void set_self_link(const StringPiece &value)
Definition: zone_list.h:552
void clear_message()
Definition: zone_list.h:310
bool has_id() const
Definition: zone_list.h:378
Definition: accelerator_config.h:39
const StringPiece get_next_page_token() const
Definition: zone_list.h:498
const StringPiece get_code() const
Definition: zone_list.h:241
void set_message(const StringPiece &value)
Definition: zone_list.h:331
void clear_id()
Definition: zone_list.h:385
bool has_message() const
Definition: zone_list.h:303
Definition: accelerator_config.cc:41
Definition: zone_list.h:52
const ZoneListWarning get_warning() const
Definition: zone_list.h:576
bool has_warning() const
Definition: zone_list.h:561
bool has_code() const
Definition: zone_list.h:226
void clear_next_page_token()
Definition: zone_list.h:490
void set_value(const StringPiece &value)
Definition: zone_list.h:179
void set_code(const StringPiece &value)
Definition: zone_list.h:255
void clear_items()
Definition: zone_list.h:422
const StringPiece get_key() const
Definition: zone_list.h:123
const client::JsonCppArray< ZoneListWarningData > get_data() const
Definition: zone_list.h:279
client::JsonCppArray< ZoneListWarningData > mutable_data()
Definition: zone_list.h:293
void set_next_page_token(const StringPiece &value)
Definition: zone_list.h:515
void set_kind(const StringPiece &value)
Definition: zone_list.h:474
bool has_next_page_token() const
Definition: zone_list.h:483