compute  v1
router_bgp_peer.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_PEER_H_
31 #define GOOGLE_COMPUTE_API_ROUTER_BGP_PEER_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 RouterBgpPeer : public client::JsonCppData {
54  public:
60  static RouterBgpPeer* New();
61 
67  explicit RouterBgpPeer(const Json::Value& storage);
68 
74  explicit RouterBgpPeer(Json::Value* storage);
75 
79  virtual ~RouterBgpPeer();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_compute_api::RouterBgpPeer");
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 
214  return Storage().isMember("advertisedRoutePriority");
215  }
216 
221  MutableStorage()->removeMember("advertisedRoutePriority");
222  }
223 
224 
229  const Json::Value& storage = Storage("advertisedRoutePriority");
230  return client::JsonValueToCppValueHelper<uint32 >(storage);
231  }
232 
242  void set_advertised_route_priority(uint32 value) {
243  client::SetJsonValueFromCppValueHelper<uint32 >(
244  value, MutableStorage("advertisedRoutePriority"));
245  }
246 
252  bool has_interface_name() const {
253  return Storage().isMember("interfaceName");
254  }
255 
260  MutableStorage()->removeMember("interfaceName");
261  }
262 
263 
267  const StringPiece get_interface_name() const {
268  const Json::Value& v = Storage("interfaceName");
269  if (v == Json::Value::null) return StringPiece("");
270  return StringPiece(v.asCString());
271  }
272 
280  void set_interface_name(const StringPiece& value) {
281  *MutableStorage("interfaceName") = value.data();
282  }
283 
289  bool has_ip_address() const {
290  return Storage().isMember("ipAddress");
291  }
292 
297  MutableStorage()->removeMember("ipAddress");
298  }
299 
300 
304  const StringPiece get_ip_address() const {
305  const Json::Value& v = Storage("ipAddress");
306  if (v == Json::Value::null) return StringPiece("");
307  return StringPiece(v.asCString());
308  }
309 
318  void set_ip_address(const StringPiece& value) {
319  *MutableStorage("ipAddress") = value.data();
320  }
321 
327  bool has_management_type() const {
328  return Storage().isMember("managementType");
329  }
330 
335  MutableStorage()->removeMember("managementType");
336  }
337 
338 
342  const StringPiece get_management_type() const {
343  const Json::Value& v = Storage("managementType");
344  if (v == Json::Value::null) return StringPiece("");
345  return StringPiece(v.asCString());
346  }
347 
361  void set_management_type(const StringPiece& value) {
362  *MutableStorage("managementType") = value.data();
363  }
364 
370  bool has_name() const {
371  return Storage().isMember("name");
372  }
373 
377  void clear_name() {
378  MutableStorage()->removeMember("name");
379  }
380 
381 
385  const StringPiece get_name() const {
386  const Json::Value& v = Storage("name");
387  if (v == Json::Value::null) return StringPiece("");
388  return StringPiece(v.asCString());
389  }
390 
399  void set_name(const StringPiece& value) {
400  *MutableStorage("name") = value.data();
401  }
402 
408  bool has_peer_asn() const {
409  return Storage().isMember("peerAsn");
410  }
411 
415  void clear_peer_asn() {
416  MutableStorage()->removeMember("peerAsn");
417  }
418 
419 
423  uint32 get_peer_asn() const {
424  const Json::Value& storage = Storage("peerAsn");
425  return client::JsonValueToCppValueHelper<uint32 >(storage);
426  }
427 
436  void set_peer_asn(uint32 value) {
437  client::SetJsonValueFromCppValueHelper<uint32 >(
438  value, MutableStorage("peerAsn"));
439  }
440 
446  bool has_peer_ip_address() const {
447  return Storage().isMember("peerIpAddress");
448  }
449 
454  MutableStorage()->removeMember("peerIpAddress");
455  }
456 
457 
461  const StringPiece get_peer_ip_address() const {
462  const Json::Value& v = Storage("peerIpAddress");
463  if (v == Json::Value::null) return StringPiece("");
464  return StringPiece(v.asCString());
465  }
466 
475  void set_peer_ip_address(const StringPiece& value) {
476  *MutableStorage("peerIpAddress") = value.data();
477  }
478 
479  private:
480  void operator=(const RouterBgpPeer&);
481 }; // RouterBgpPeer
482 } // namespace google_compute_api
483 #endif // GOOGLE_COMPUTE_API_ROUTER_BGP_PEER_H_
void clear_advertise_mode()
Definition: router_bgp_peer.h:102
const StringPiece get_name() const
Definition: router_bgp_peer.h:385
bool has_ip_address() const
Definition: router_bgp_peer.h:289
void set_name(const StringPiece &value)
Definition: router_bgp_peer.h:399
void clear_advertised_groups()
Definition: router_bgp_peer.h:139
void clear_name()
Definition: router_bgp_peer.h:377
bool has_peer_asn() const
Definition: router_bgp_peer.h:408
const client::JsonCppArray< string > get_advertised_groups() const
Definition: router_bgp_peer.h:148
void set_advertise_mode(const StringPiece &value)
Definition: router_bgp_peer.h:123
void set_advertised_route_priority(uint32 value)
Definition: router_bgp_peer.h:242
const StringPiece get_management_type() const
Definition: router_bgp_peer.h:342
bool has_advertise_mode() const
Definition: router_bgp_peer.h:95
void set_peer_asn(uint32 value)
Definition: router_bgp_peer.h:436
bool has_advertised_route_priority() const
Definition: router_bgp_peer.h:213
const StringPiece GetTypeName() const
Definition: router_bgp_peer.h:86
void clear_advertised_route_priority()
Definition: router_bgp_peer.h:220
uint32 get_advertised_route_priority() const
Definition: router_bgp_peer.h:228
void clear_ip_address()
Definition: router_bgp_peer.h:296
client::JsonCppArray< string > mutable_advertisedGroups()
Definition: router_bgp_peer.h:165
void clear_management_type()
Definition: router_bgp_peer.h:334
void clear_peer_ip_address()
Definition: router_bgp_peer.h:453
const StringPiece get_ip_address() const
Definition: router_bgp_peer.h:304
void set_management_type(const StringPiece &value)
Definition: router_bgp_peer.h:361
bool has_advertised_groups() const
Definition: router_bgp_peer.h:132
Definition: accelerator_config.h:39
void clear_interface_name()
Definition: router_bgp_peer.h:259
void set_peer_ip_address(const StringPiece &value)
Definition: router_bgp_peer.h:475
bool has_management_type() const
Definition: router_bgp_peer.h:327
bool has_peer_ip_address() const
Definition: router_bgp_peer.h:446
Definition: accelerator_config.cc:41
bool has_interface_name() const
Definition: router_bgp_peer.h:252
void clear_advertised_ip_ranges()
Definition: router_bgp_peer.h:182
const StringPiece get_interface_name() const
Definition: router_bgp_peer.h:267
const StringPiece get_peer_ip_address() const
Definition: router_bgp_peer.h:461
Definition: router_bgp_peer.h:53
uint32 get_peer_asn() const
Definition: router_bgp_peer.h:423
bool has_advertised_ip_ranges() const
Definition: router_bgp_peer.h:175
void clear_peer_asn()
Definition: router_bgp_peer.h:415
void set_ip_address(const StringPiece &value)
Definition: router_bgp_peer.h:318
const StringPiece get_advertise_mode() const
Definition: router_bgp_peer.h:110
bool has_name() const
Definition: router_bgp_peer.h:370
void set_interface_name(const StringPiece &value)
Definition: router_bgp_peer.h:280