compute  v1
address.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-04-20, 05:56:52 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: 213
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_ADDRESS_H_
31 #define GOOGLE_COMPUTE_API_ADDRESS_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_compute_api {
44 using namespace googleapis;
45 
53 class Address : public client::JsonCppData {
54  public:
60  static Address* New();
61 
67  explicit Address(const Json::Value& storage);
68 
74  explicit Address(Json::Value* storage);
75 
79  virtual ~Address();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_compute_api::Address");
88  }
89 
95  bool has_address() const {
96  return Storage().isMember("address");
97  }
98 
102  void clear_address() {
103  MutableStorage()->removeMember("address");
104  }
105 
106 
110  const StringPiece get_address() const {
111  const Json::Value& v = Storage("address");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_address(const StringPiece& value) {
124  *MutableStorage("address") = value.data();
125  }
126 
132  bool has_address_type() const {
133  return Storage().isMember("addressType");
134  }
135 
140  MutableStorage()->removeMember("addressType");
141  }
142 
143 
147  const StringPiece get_address_type() const {
148  const Json::Value& v = Storage("addressType");
149  if (v == Json::Value::null) return StringPiece("");
150  return StringPiece(v.asCString());
151  }
152 
161  void set_address_type(const StringPiece& value) {
162  *MutableStorage("addressType") = value.data();
163  }
164 
170  bool has_creation_timestamp() const {
171  return Storage().isMember("creationTimestamp");
172  }
173 
178  MutableStorage()->removeMember("creationTimestamp");
179  }
180 
181 
185  const StringPiece get_creation_timestamp() const {
186  const Json::Value& v = Storage("creationTimestamp");
187  if (v == Json::Value::null) return StringPiece("");
188  return StringPiece(v.asCString());
189  }
190 
198  void set_creation_timestamp(const StringPiece& value) {
199  *MutableStorage("creationTimestamp") = value.data();
200  }
201 
207  bool has_description() const {
208  return Storage().isMember("description");
209  }
210 
215  MutableStorage()->removeMember("description");
216  }
217 
218 
222  const StringPiece get_description() const {
223  const Json::Value& v = Storage("description");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
236  void set_description(const StringPiece& value) {
237  *MutableStorage("description") = value.data();
238  }
239 
245  bool has_id() const {
246  return Storage().isMember("id");
247  }
248 
252  void clear_id() {
253  MutableStorage()->removeMember("id");
254  }
255 
256 
260  uint64 get_id() const {
261  const Json::Value& storage = Storage("id");
262  return client::JsonValueToCppValueHelper<uint64 >(storage);
263  }
264 
273  void set_id(uint64 value) {
274  client::SetJsonValueFromCppValueHelper<uint64 >(
275  value, MutableStorage("id"));
276  }
277 
283  bool has_ip_version() const {
284  return Storage().isMember("ipVersion");
285  }
286 
291  MutableStorage()->removeMember("ipVersion");
292  }
293 
294 
298  const StringPiece get_ip_version() const {
299  const Json::Value& v = Storage("ipVersion");
300  if (v == Json::Value::null) return StringPiece("");
301  return StringPiece(v.asCString());
302  }
303 
312  void set_ip_version(const StringPiece& value) {
313  *MutableStorage("ipVersion") = value.data();
314  }
315 
321  bool has_kind() const {
322  return Storage().isMember("kind");
323  }
324 
328  void clear_kind() {
329  MutableStorage()->removeMember("kind");
330  }
331 
332 
336  const StringPiece get_kind() const {
337  const Json::Value& v = Storage("kind");
338  if (v == Json::Value::null) return StringPiece("");
339  return StringPiece(v.asCString());
340  }
341 
349  void set_kind(const StringPiece& value) {
350  *MutableStorage("kind") = value.data();
351  }
352 
358  bool has_name() const {
359  return Storage().isMember("name");
360  }
361 
365  void clear_name() {
366  MutableStorage()->removeMember("name");
367  }
368 
369 
373  const StringPiece get_name() const {
374  const Json::Value& v = Storage("name");
375  if (v == Json::Value::null) return StringPiece("");
376  return StringPiece(v.asCString());
377  }
378 
392  void set_name(const StringPiece& value) {
393  *MutableStorage("name") = value.data();
394  }
395 
401  bool has_network() const {
402  return Storage().isMember("network");
403  }
404 
408  void clear_network() {
409  MutableStorage()->removeMember("network");
410  }
411 
412 
416  const StringPiece get_network() const {
417  const Json::Value& v = Storage("network");
418  if (v == Json::Value::null) return StringPiece("");
419  return StringPiece(v.asCString());
420  }
421 
430  void set_network(const StringPiece& value) {
431  *MutableStorage("network") = value.data();
432  }
433 
439  bool has_network_tier() const {
440  return Storage().isMember("networkTier");
441  }
442 
447  MutableStorage()->removeMember("networkTier");
448  }
449 
450 
454  const StringPiece get_network_tier() const {
455  const Json::Value& v = Storage("networkTier");
456  if (v == Json::Value::null) return StringPiece("");
457  return StringPiece(v.asCString());
458  }
459 
475  void set_network_tier(const StringPiece& value) {
476  *MutableStorage("networkTier") = value.data();
477  }
478 
484  bool has_prefix_length() const {
485  return Storage().isMember("prefixLength");
486  }
487 
492  MutableStorage()->removeMember("prefixLength");
493  }
494 
495 
499  int32 get_prefix_length() const {
500  const Json::Value& storage = Storage("prefixLength");
501  return client::JsonValueToCppValueHelper<int32 >(storage);
502  }
503 
511  void set_prefix_length(int32 value) {
512  client::SetJsonValueFromCppValueHelper<int32 >(
513  value, MutableStorage("prefixLength"));
514  }
515 
521  bool has_purpose() const {
522  return Storage().isMember("purpose");
523  }
524 
528  void clear_purpose() {
529  MutableStorage()->removeMember("purpose");
530  }
531 
532 
536  const StringPiece get_purpose() const {
537  const Json::Value& v = Storage("purpose");
538  if (v == Json::Value::null) return StringPiece("");
539  return StringPiece(v.asCString());
540  }
541 
549  void set_purpose(const StringPiece& value) {
550  *MutableStorage("purpose") = value.data();
551  }
552 
558  bool has_region() const {
559  return Storage().isMember("region");
560  }
561 
565  void clear_region() {
566  MutableStorage()->removeMember("region");
567  }
568 
569 
573  const StringPiece get_region() const {
574  const Json::Value& v = Storage("region");
575  if (v == Json::Value::null) return StringPiece("");
576  return StringPiece(v.asCString());
577  }
578 
589  void set_region(const StringPiece& value) {
590  *MutableStorage("region") = value.data();
591  }
592 
598  bool has_self_link() const {
599  return Storage().isMember("selfLink");
600  }
601 
606  MutableStorage()->removeMember("selfLink");
607  }
608 
609 
613  const StringPiece get_self_link() const {
614  const Json::Value& v = Storage("selfLink");
615  if (v == Json::Value::null) return StringPiece("");
616  return StringPiece(v.asCString());
617  }
618 
626  void set_self_link(const StringPiece& value) {
627  *MutableStorage("selfLink") = value.data();
628  }
629 
635  bool has_status() const {
636  return Storage().isMember("status");
637  }
638 
642  void clear_status() {
643  MutableStorage()->removeMember("status");
644  }
645 
646 
650  const StringPiece get_status() const {
651  const Json::Value& v = Storage("status");
652  if (v == Json::Value::null) return StringPiece("");
653  return StringPiece(v.asCString());
654  }
655 
667  void set_status(const StringPiece& value) {
668  *MutableStorage("status") = value.data();
669  }
670 
676  bool has_subnetwork() const {
677  return Storage().isMember("subnetwork");
678  }
679 
684  MutableStorage()->removeMember("subnetwork");
685  }
686 
687 
691  const StringPiece get_subnetwork() const {
692  const Json::Value& v = Storage("subnetwork");
693  if (v == Json::Value::null) return StringPiece("");
694  return StringPiece(v.asCString());
695  }
696 
706  void set_subnetwork(const StringPiece& value) {
707  *MutableStorage("subnetwork") = value.data();
708  }
709 
715  bool has_users() const {
716  return Storage().isMember("users");
717  }
718 
722  void clear_users() {
723  MutableStorage()->removeMember("users");
724  }
725 
726 
730  const client::JsonCppArray<string > get_users() const {
731  const Json::Value& storage = Storage("users");
732  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
733  }
734 
742  client::JsonCppArray<string > mutable_users() {
743  Json::Value* storage = MutableStorage("users");
744  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
745  }
746 
747  private:
748  void operator=(const Address&);
749 }; // Address
750 } // namespace google_compute_api
751 #endif // GOOGLE_COMPUTE_API_ADDRESS_H_
const StringPiece get_purpose() const
Definition: address.h:536
void clear_kind()
Definition: address.h:328
const client::JsonCppArray< string > get_users() const
Definition: address.h:730
bool has_users() const
Definition: address.h:715
bool has_prefix_length() const
Definition: address.h:484
const StringPiece get_self_link() const
Definition: address.h:613
void set_description(const StringPiece &value)
Definition: address.h:236
void clear_ip_version()
Definition: address.h:290
Definition: address.h:53
bool has_address() const
Definition: address.h:95
void set_creation_timestamp(const StringPiece &value)
Definition: address.h:198
const StringPiece get_address_type() const
Definition: address.h:147
void set_purpose(const StringPiece &value)
Definition: address.h:549
void clear_subnetwork()
Definition: address.h:683
void set_region(const StringPiece &value)
Definition: address.h:589
void clear_network()
Definition: address.h:408
void clear_address()
Definition: address.h:102
void set_name(const StringPiece &value)
Definition: address.h:392
void set_address(const StringPiece &value)
Definition: address.h:123
const StringPiece get_description() const
Definition: address.h:222
bool has_network() const
Definition: address.h:401
const StringPiece get_network() const
Definition: address.h:416
void clear_prefix_length()
Definition: address.h:491
void set_self_link(const StringPiece &value)
Definition: address.h:626
void clear_network_tier()
Definition: address.h:446
void clear_name()
Definition: address.h:365
void clear_status()
Definition: address.h:642
bool has_name() const
Definition: address.h:358
const StringPiece get_name() const
Definition: address.h:373
const StringPiece get_region() const
Definition: address.h:573
bool has_network_tier() const
Definition: address.h:439
void clear_description()
Definition: address.h:214
void clear_id()
Definition: address.h:252
const StringPiece get_kind() const
Definition: address.h:336
uint64 get_id() const
Definition: address.h:260
const StringPiece get_status() const
Definition: address.h:650
bool has_address_type() const
Definition: address.h:132
int32 get_prefix_length() const
Definition: address.h:499
Definition: accelerator_config.h:39
void set_prefix_length(int32 value)
Definition: address.h:511
void set_address_type(const StringPiece &value)
Definition: address.h:161
client::JsonCppArray< string > mutable_users()
Definition: address.h:742
void set_ip_version(const StringPiece &value)
Definition: address.h:312
bool has_kind() const
Definition: address.h:321
void set_status(const StringPiece &value)
Definition: address.h:667
bool has_creation_timestamp() const
Definition: address.h:170
const StringPiece GetTypeName() const
Definition: address.h:86
bool has_id() const
Definition: address.h:245
const StringPiece get_ip_version() const
Definition: address.h:298
void set_id(uint64 value)
Definition: address.h:273
bool has_self_link() const
Definition: address.h:598
const StringPiece get_network_tier() const
Definition: address.h:454
Definition: accelerator_config.cc:41
void set_network(const StringPiece &value)
Definition: address.h:430
bool has_purpose() const
Definition: address.h:521
void clear_self_link()
Definition: address.h:605
void clear_creation_timestamp()
Definition: address.h:177
void set_subnetwork(const StringPiece &value)
Definition: address.h:706
void set_network_tier(const StringPiece &value)
Definition: address.h:475
void clear_purpose()
Definition: address.h:528
bool has_region() const
Definition: address.h:558
void set_kind(const StringPiece &value)
Definition: address.h:349
const StringPiece get_subnetwork() const
Definition: address.h:691
void clear_region()
Definition: address.h:565
const StringPiece get_address() const
Definition: address.h:110
bool has_ip_version() const
Definition: address.h:283
const StringPiece get_creation_timestamp() const
Definition: address.h:185
void clear_users()
Definition: address.h:722
bool has_description() const
Definition: address.h:207
void clear_address_type()
Definition: address.h:139
bool has_status() const
Definition: address.h:635
bool has_subnetwork() const
Definition: address.h:676