30 #ifndef GOOGLE_COMPUTE_API_ROUTER_BGP_PEER_H_ 31 #define GOOGLE_COMPUTE_API_ROUTER_BGP_PEER_H_ 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" 39 #include "google/compute_api/router_advertised_ip_range.h" 87 return StringPiece(
"google_compute_api::RouterBgpPeer");
96 return Storage().isMember(
"advertiseMode");
103 MutableStorage()->removeMember(
"advertiseMode");
111 const Json::Value& v = Storage(
"advertiseMode");
112 if (v == Json::Value::null)
return StringPiece(
"");
113 return StringPiece(v.asCString());
124 *MutableStorage(
"advertiseMode") = value.data();
133 return Storage().isMember(
"advertisedGroups");
140 MutableStorage()->removeMember(
"advertisedGroups");
149 const Json::Value& storage = Storage(
"advertisedGroups");
150 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
166 Json::Value* storage = MutableStorage(
"advertisedGroups");
167 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
176 return Storage().isMember(
"advertisedIpRanges");
183 MutableStorage()->removeMember(
"advertisedIpRanges");
191 const client::JsonCppArray<RouterAdvertisedIpRange > get_advertised_ip_ranges()
const;
205 client::JsonCppArray<RouterAdvertisedIpRange > mutable_advertisedIpRanges();
214 return Storage().isMember(
"advertisedRoutePriority");
221 MutableStorage()->removeMember(
"advertisedRoutePriority");
229 const Json::Value& storage = Storage(
"advertisedRoutePriority");
230 return client::JsonValueToCppValueHelper<uint32 >(storage);
243 client::SetJsonValueFromCppValueHelper<uint32 >(
244 value, MutableStorage(
"advertisedRoutePriority"));
253 return Storage().isMember(
"interfaceName");
260 MutableStorage()->removeMember(
"interfaceName");
268 const Json::Value& v = Storage(
"interfaceName");
269 if (v == Json::Value::null)
return StringPiece(
"");
270 return StringPiece(v.asCString());
281 *MutableStorage(
"interfaceName") = value.data();
290 return Storage().isMember(
"ipAddress");
297 MutableStorage()->removeMember(
"ipAddress");
305 const Json::Value& v = Storage(
"ipAddress");
306 if (v == Json::Value::null)
return StringPiece(
"");
307 return StringPiece(v.asCString());
319 *MutableStorage(
"ipAddress") = value.data();
328 return Storage().isMember(
"managementType");
335 MutableStorage()->removeMember(
"managementType");
343 const Json::Value& v = Storage(
"managementType");
344 if (v == Json::Value::null)
return StringPiece(
"");
345 return StringPiece(v.asCString());
362 *MutableStorage(
"managementType") = value.data();
371 return Storage().isMember(
"name");
378 MutableStorage()->removeMember(
"name");
386 const Json::Value& v = Storage(
"name");
387 if (v == Json::Value::null)
return StringPiece(
"");
388 return StringPiece(v.asCString());
400 *MutableStorage(
"name") = value.data();
409 return Storage().isMember(
"peerAsn");
416 MutableStorage()->removeMember(
"peerAsn");
424 const Json::Value& storage = Storage(
"peerAsn");
425 return client::JsonValueToCppValueHelper<uint32 >(storage);
437 client::SetJsonValueFromCppValueHelper<uint32 >(
438 value, MutableStorage(
"peerAsn"));
447 return Storage().isMember(
"peerIpAddress");
454 MutableStorage()->removeMember(
"peerIpAddress");
462 const Json::Value& v = Storage(
"peerIpAddress");
463 if (v == Json::Value::null)
return StringPiece(
"");
464 return StringPiece(v.asCString());
476 *MutableStorage(
"peerIpAddress") = value.data();
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