compute  v1
router_bgp.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_ROUTER_BGP_H_
31 #define GOOGLE_COMPUTE_API_ROUTER_BGP_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/router_advertised_ip_range.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_compute_api {
46 using namespace googleapis;
47 
53 class RouterBgp : public client::JsonCppData {
54  public:
60  static RouterBgp* New();
61 
67  explicit RouterBgp(const Json::Value& storage);
68 
74  explicit RouterBgp(Json::Value* storage);
75 
79  virtual ~RouterBgp();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_compute_api::RouterBgp");
88  }
89 
95  bool has_advertise_mode() const {
96  return Storage().isMember("advertiseMode");
97  }
98 
103  MutableStorage()->removeMember("advertiseMode");
104  }
105 
106 
110  const StringPiece get_advertise_mode() const {
111  const Json::Value& v = Storage("advertiseMode");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_advertise_mode(const StringPiece& value) {
124  *MutableStorage("advertiseMode") = value.data();
125  }
126 
132  bool has_advertised_groups() const {
133  return Storage().isMember("advertisedGroups");
134  }
135 
140  MutableStorage()->removeMember("advertisedGroups");
141  }
142 
143 
148  const client::JsonCppArray<string > get_advertised_groups() const {
149  const Json::Value& storage = Storage("advertisedGroups");
150  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
151  }
152 
165  client::JsonCppArray<string > mutable_advertisedGroups() {
166  Json::Value* storage = MutableStorage("advertisedGroups");
167  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
168  }
169 
176  return Storage().isMember("advertisedIpRanges");
177  }
178 
183  MutableStorage()->removeMember("advertisedIpRanges");
184  }
185 
186 
191  const client::JsonCppArray<RouterAdvertisedIpRange > get_advertised_ip_ranges() const;
192 
205  client::JsonCppArray<RouterAdvertisedIpRange > mutable_advertisedIpRanges();
206 
212  bool has_asn() const {
213  return Storage().isMember("asn");
214  }
215 
219  void clear_asn() {
220  MutableStorage()->removeMember("asn");
221  }
222 
223 
227  uint32 get_asn() const {
228  const Json::Value& storage = Storage("asn");
229  return client::JsonValueToCppValueHelper<uint32 >(storage);
230  }
231 
241  void set_asn(uint32 value) {
242  client::SetJsonValueFromCppValueHelper<uint32 >(
243  value, MutableStorage("asn"));
244  }
245 
246  private:
247  void operator=(const RouterBgp&);
248 }; // RouterBgp
249 } // namespace google_compute_api
250 #endif // GOOGLE_COMPUTE_API_ROUTER_BGP_H_
uint32 get_asn() const
Definition: router_bgp.h:227
bool has_advertised_ip_ranges() const
Definition: router_bgp.h:175
void set_asn(uint32 value)
Definition: router_bgp.h:241
void clear_asn()
Definition: router_bgp.h:219
bool has_advertised_groups() const
Definition: router_bgp.h:132
bool has_advertise_mode() const
Definition: router_bgp.h:95
void clear_advertise_mode()
Definition: router_bgp.h:102
void clear_advertised_groups()
Definition: router_bgp.h:139
const StringPiece GetTypeName() const
Definition: router_bgp.h:86
Definition: accelerator_config.h:39
void set_advertise_mode(const StringPiece &value)
Definition: router_bgp.h:123
Definition: router_bgp.h:53
client::JsonCppArray< string > mutable_advertisedGroups()
Definition: router_bgp.h:165
bool has_asn() const
Definition: router_bgp.h:212
Definition: accelerator_config.cc:41
const client::JsonCppArray< string > get_advertised_groups() const
Definition: router_bgp.h:148
const StringPiece get_advertise_mode() const
Definition: router_bgp.h:110
void clear_advertised_ip_ranges()
Definition: router_bgp.h:182