compute  v1
subnetwork.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_SUBNETWORK_H_
31 #define GOOGLE_COMPUTE_API_SUBNETWORK_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/compute_api/subnetwork_secondary_range.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_compute_api {
46 using namespace googleapis;
47 
54 class Subnetwork : public client::JsonCppData {
55  public:
61  static Subnetwork* New();
62 
68  explicit Subnetwork(const Json::Value& storage);
69 
75  explicit Subnetwork(Json::Value* storage);
76 
80  virtual ~Subnetwork();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_compute_api::Subnetwork");
89  }
90 
96  bool has_creation_timestamp() const {
97  return Storage().isMember("creationTimestamp");
98  }
99 
104  MutableStorage()->removeMember("creationTimestamp");
105  }
106 
107 
111  const StringPiece get_creation_timestamp() const {
112  const Json::Value& v = Storage("creationTimestamp");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
124  void set_creation_timestamp(const StringPiece& value) {
125  *MutableStorage("creationTimestamp") = value.data();
126  }
127 
133  bool has_description() const {
134  return Storage().isMember("description");
135  }
136 
141  MutableStorage()->removeMember("description");
142  }
143 
144 
148  const StringPiece get_description() const {
149  const Json::Value& v = Storage("description");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
162  void set_description(const StringPiece& value) {
163  *MutableStorage("description") = value.data();
164  }
165 
171  bool has_enable_flow_logs() const {
172  return Storage().isMember("enableFlowLogs");
173  }
174 
179  MutableStorage()->removeMember("enableFlowLogs");
180  }
181 
182 
186  bool get_enable_flow_logs() const {
187  const Json::Value& storage = Storage("enableFlowLogs");
188  return client::JsonValueToCppValueHelper<bool >(storage);
189  }
190 
200  void set_enable_flow_logs(bool value) {
201  client::SetJsonValueFromCppValueHelper<bool >(
202  value, MutableStorage("enableFlowLogs"));
203  }
204 
210  bool has_fingerprint() const {
211  return Storage().isMember("fingerprint");
212  }
213 
218  MutableStorage()->removeMember("fingerprint");
219  }
220 
221 
225  const StringPiece get_fingerprint() const {
226  const Json::Value& v = Storage("fingerprint");
227  if (v == Json::Value::null) return StringPiece("");
228  return StringPiece(v.asCString());
229  }
230 
245  void set_fingerprint(const StringPiece& value) {
246  *MutableStorage("fingerprint") = value.data();
247  }
248 
254  bool has_gateway_address() const {
255  return Storage().isMember("gatewayAddress");
256  }
257 
262  MutableStorage()->removeMember("gatewayAddress");
263  }
264 
265 
269  const StringPiece get_gateway_address() const {
270  const Json::Value& v = Storage("gatewayAddress");
271  if (v == Json::Value::null) return StringPiece("");
272  return StringPiece(v.asCString());
273  }
274 
283  void set_gateway_address(const StringPiece& value) {
284  *MutableStorage("gatewayAddress") = value.data();
285  }
286 
292  bool has_id() const {
293  return Storage().isMember("id");
294  }
295 
299  void clear_id() {
300  MutableStorage()->removeMember("id");
301  }
302 
303 
307  uint64 get_id() const {
308  const Json::Value& storage = Storage("id");
309  return client::JsonValueToCppValueHelper<uint64 >(storage);
310  }
311 
320  void set_id(uint64 value) {
321  client::SetJsonValueFromCppValueHelper<uint64 >(
322  value, MutableStorage("id"));
323  }
324 
330  bool has_ip_cidr_range() const {
331  return Storage().isMember("ipCidrRange");
332  }
333 
338  MutableStorage()->removeMember("ipCidrRange");
339  }
340 
341 
345  const StringPiece get_ip_cidr_range() const {
346  const Json::Value& v = Storage("ipCidrRange");
347  if (v == Json::Value::null) return StringPiece("");
348  return StringPiece(v.asCString());
349  }
350 
362  void set_ip_cidr_range(const StringPiece& value) {
363  *MutableStorage("ipCidrRange") = value.data();
364  }
365 
371  bool has_kind() const {
372  return Storage().isMember("kind");
373  }
374 
378  void clear_kind() {
379  MutableStorage()->removeMember("kind");
380  }
381 
382 
386  const StringPiece get_kind() const {
387  const Json::Value& v = Storage("kind");
388  if (v == Json::Value::null) return StringPiece("");
389  return StringPiece(v.asCString());
390  }
391 
400  void set_kind(const StringPiece& value) {
401  *MutableStorage("kind") = value.data();
402  }
403 
409  bool has_name() const {
410  return Storage().isMember("name");
411  }
412 
416  void clear_name() {
417  MutableStorage()->removeMember("name");
418  }
419 
420 
424  const StringPiece get_name() const {
425  const Json::Value& v = Storage("name");
426  if (v == Json::Value::null) return StringPiece("");
427  return StringPiece(v.asCString());
428  }
429 
443  void set_name(const StringPiece& value) {
444  *MutableStorage("name") = value.data();
445  }
446 
452  bool has_network() const {
453  return Storage().isMember("network");
454  }
455 
459  void clear_network() {
460  MutableStorage()->removeMember("network");
461  }
462 
463 
467  const StringPiece get_network() const {
468  const Json::Value& v = Storage("network");
469  if (v == Json::Value::null) return StringPiece("");
470  return StringPiece(v.asCString());
471  }
472 
483  void set_network(const StringPiece& value) {
484  *MutableStorage("network") = value.data();
485  }
486 
493  return Storage().isMember("privateIpGoogleAccess");
494  }
495 
500  MutableStorage()->removeMember("privateIpGoogleAccess");
501  }
502 
503 
508  const Json::Value& storage = Storage("privateIpGoogleAccess");
509  return client::JsonValueToCppValueHelper<bool >(storage);
510  }
511 
521  void set_private_ip_google_access(bool value) {
522  client::SetJsonValueFromCppValueHelper<bool >(
523  value, MutableStorage("privateIpGoogleAccess"));
524  }
525 
531  bool has_region() const {
532  return Storage().isMember("region");
533  }
534 
538  void clear_region() {
539  MutableStorage()->removeMember("region");
540  }
541 
542 
546  const StringPiece get_region() const {
547  const Json::Value& v = Storage("region");
548  if (v == Json::Value::null) return StringPiece("");
549  return StringPiece(v.asCString());
550  }
551 
560  void set_region(const StringPiece& value) {
561  *MutableStorage("region") = value.data();
562  }
563 
569  bool has_secondary_ip_ranges() const {
570  return Storage().isMember("secondaryIpRanges");
571  }
572 
577  MutableStorage()->removeMember("secondaryIpRanges");
578  }
579 
580 
585  const client::JsonCppArray<SubnetworkSecondaryRange > get_secondary_ip_ranges() const;
586 
599  client::JsonCppArray<SubnetworkSecondaryRange > mutable_secondaryIpRanges();
600 
606  bool has_self_link() const {
607  return Storage().isMember("selfLink");
608  }
609 
614  MutableStorage()->removeMember("selfLink");
615  }
616 
617 
621  const StringPiece get_self_link() const {
622  const Json::Value& v = Storage("selfLink");
623  if (v == Json::Value::null) return StringPiece("");
624  return StringPiece(v.asCString());
625  }
626 
634  void set_self_link(const StringPiece& value) {
635  *MutableStorage("selfLink") = value.data();
636  }
637 
638  private:
639  void operator=(const Subnetwork&);
640 }; // Subnetwork
641 } // namespace google_compute_api
642 #endif // GOOGLE_COMPUTE_API_SUBNETWORK_H_
bool has_secondary_ip_ranges() const
Definition: subnetwork.h:569
bool has_self_link() const
Definition: subnetwork.h:606
void set_gateway_address(const StringPiece &value)
Definition: subnetwork.h:283
bool get_enable_flow_logs() const
Definition: subnetwork.h:186
void set_name(const StringPiece &value)
Definition: subnetwork.h:443
const StringPiece get_description() const
Definition: subnetwork.h:148
const StringPiece GetTypeName() const
Definition: subnetwork.h:87
bool has_name() const
Definition: subnetwork.h:409
bool has_kind() const
Definition: subnetwork.h:371
const StringPiece get_creation_timestamp() const
Definition: subnetwork.h:111
void clear_kind()
Definition: subnetwork.h:378
void set_ip_cidr_range(const StringPiece &value)
Definition: subnetwork.h:362
void clear_region()
Definition: subnetwork.h:538
Definition: subnetwork.h:54
const StringPiece get_ip_cidr_range() const
Definition: subnetwork.h:345
bool has_network() const
Definition: subnetwork.h:452
void clear_fingerprint()
Definition: subnetwork.h:217
bool get_private_ip_google_access() const
Definition: subnetwork.h:507
bool has_id() const
Definition: subnetwork.h:292
bool has_region() const
Definition: subnetwork.h:531
void clear_self_link()
Definition: subnetwork.h:613
const StringPiece get_kind() const
Definition: subnetwork.h:386
bool has_ip_cidr_range() const
Definition: subnetwork.h:330
bool has_creation_timestamp() const
Definition: subnetwork.h:96
bool has_description() const
Definition: subnetwork.h:133
Definition: accelerator_config.h:39
void clear_private_ip_google_access()
Definition: subnetwork.h:499
void set_description(const StringPiece &value)
Definition: subnetwork.h:162
const StringPiece get_region() const
Definition: subnetwork.h:546
const StringPiece get_gateway_address() const
Definition: subnetwork.h:269
const StringPiece get_name() const
Definition: subnetwork.h:424
void set_fingerprint(const StringPiece &value)
Definition: subnetwork.h:245
void clear_network()
Definition: subnetwork.h:459
void set_region(const StringPiece &value)
Definition: subnetwork.h:560
void clear_secondary_ip_ranges()
Definition: subnetwork.h:576
uint64 get_id() const
Definition: subnetwork.h:307
bool has_fingerprint() const
Definition: subnetwork.h:210
void clear_name()
Definition: subnetwork.h:416
Definition: accelerator_config.cc:41
bool has_gateway_address() const
Definition: subnetwork.h:254
void clear_description()
Definition: subnetwork.h:140
bool has_enable_flow_logs() const
Definition: subnetwork.h:171
void set_creation_timestamp(const StringPiece &value)
Definition: subnetwork.h:124
void set_network(const StringPiece &value)
Definition: subnetwork.h:483
void clear_gateway_address()
Definition: subnetwork.h:261
void clear_ip_cidr_range()
Definition: subnetwork.h:337
const StringPiece get_fingerprint() const
Definition: subnetwork.h:225
bool has_private_ip_google_access() const
Definition: subnetwork.h:492
void set_kind(const StringPiece &value)
Definition: subnetwork.h:400
const StringPiece get_self_link() const
Definition: subnetwork.h:621
void clear_creation_timestamp()
Definition: subnetwork.h:103
void clear_id()
Definition: subnetwork.h:299
const StringPiece get_network() const
Definition: subnetwork.h:467
void clear_enable_flow_logs()
Definition: subnetwork.h:178
void set_self_link(const StringPiece &value)
Definition: subnetwork.h:634
void set_enable_flow_logs(bool value)
Definition: subnetwork.h:200
void set_private_ip_google_access(bool value)
Definition: subnetwork.h:521
void set_id(uint64 value)
Definition: subnetwork.h:320