compute  v1
network_peering.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_NETWORK_PEERING_H_
31 #define GOOGLE_COMPUTE_API_NETWORK_PEERING_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_compute_api {
43 using namespace googleapis;
44 
52 class NetworkPeering : public client::JsonCppData {
53  public:
59  static NetworkPeering* New();
60 
66  explicit NetworkPeering(const Json::Value& storage);
67 
73  explicit NetworkPeering(Json::Value* storage);
74 
78  virtual ~NetworkPeering();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_compute_api::NetworkPeering");
87  }
88 
94  bool has_auto_create_routes() const {
95  return Storage().isMember("autoCreateRoutes");
96  }
97 
102  MutableStorage()->removeMember("autoCreateRoutes");
103  }
104 
105 
109  bool get_auto_create_routes() const {
110  const Json::Value& storage = Storage("autoCreateRoutes");
111  return client::JsonValueToCppValueHelper<bool >(storage);
112  }
113 
126  void set_auto_create_routes(bool value) {
127  client::SetJsonValueFromCppValueHelper<bool >(
128  value, MutableStorage("autoCreateRoutes"));
129  }
130 
137  return Storage().isMember("exchangeSubnetRoutes");
138  }
139 
144  MutableStorage()->removeMember("exchangeSubnetRoutes");
145  }
146 
147 
152  const Json::Value& storage = Storage("exchangeSubnetRoutes");
153  return client::JsonValueToCppValueHelper<bool >(storage);
154  }
155 
167  void set_exchange_subnet_routes(bool value) {
168  client::SetJsonValueFromCppValueHelper<bool >(
169  value, MutableStorage("exchangeSubnetRoutes"));
170  }
171 
177  bool has_name() const {
178  return Storage().isMember("name");
179  }
180 
184  void clear_name() {
185  MutableStorage()->removeMember("name");
186  }
187 
188 
192  const StringPiece get_name() const {
193  const Json::Value& v = Storage("name");
194  if (v == Json::Value::null) return StringPiece("");
195  return StringPiece(v.asCString());
196  }
197 
210  void set_name(const StringPiece& value) {
211  *MutableStorage("name") = value.data();
212  }
213 
219  bool has_network() const {
220  return Storage().isMember("network");
221  }
222 
226  void clear_network() {
227  MutableStorage()->removeMember("network");
228  }
229 
230 
234  const StringPiece get_network() const {
235  const Json::Value& v = Storage("network");
236  if (v == Json::Value::null) return StringPiece("");
237  return StringPiece(v.asCString());
238  }
239 
250  void set_network(const StringPiece& value) {
251  *MutableStorage("network") = value.data();
252  }
253 
259  bool has_state() const {
260  return Storage().isMember("state");
261  }
262 
266  void clear_state() {
267  MutableStorage()->removeMember("state");
268  }
269 
270 
274  const StringPiece get_state() const {
275  const Json::Value& v = Storage("state");
276  if (v == Json::Value::null) return StringPiece("");
277  return StringPiece(v.asCString());
278  }
279 
287  void set_state(const StringPiece& value) {
288  *MutableStorage("state") = value.data();
289  }
290 
296  bool has_state_details() const {
297  return Storage().isMember("stateDetails");
298  }
299 
304  MutableStorage()->removeMember("stateDetails");
305  }
306 
307 
311  const StringPiece get_state_details() const {
312  const Json::Value& v = Storage("stateDetails");
313  if (v == Json::Value::null) return StringPiece("");
314  return StringPiece(v.asCString());
315  }
316 
324  void set_state_details(const StringPiece& value) {
325  *MutableStorage("stateDetails") = value.data();
326  }
327 
328  private:
329  void operator=(const NetworkPeering&);
330 }; // NetworkPeering
331 } // namespace google_compute_api
332 #endif // GOOGLE_COMPUTE_API_NETWORK_PEERING_H_
bool has_network() const
Definition: network_peering.h:219
void clear_name()
Definition: network_peering.h:184
void clear_auto_create_routes()
Definition: network_peering.h:101
const StringPiece GetTypeName() const
Definition: network_peering.h:85
void clear_network()
Definition: network_peering.h:226
bool get_exchange_subnet_routes() const
Definition: network_peering.h:151
void set_name(const StringPiece &value)
Definition: network_peering.h:210
void set_exchange_subnet_routes(bool value)
Definition: network_peering.h:167
const StringPiece get_name() const
Definition: network_peering.h:192
bool has_name() const
Definition: network_peering.h:177
void set_auto_create_routes(bool value)
Definition: network_peering.h:126
const StringPiece get_state() const
Definition: network_peering.h:274
const StringPiece get_network() const
Definition: network_peering.h:234
void clear_exchange_subnet_routes()
Definition: network_peering.h:143
Definition: accelerator_config.h:39
void set_network(const StringPiece &value)
Definition: network_peering.h:250
void clear_state()
Definition: network_peering.h:266
void set_state(const StringPiece &value)
Definition: network_peering.h:287
void set_state_details(const StringPiece &value)
Definition: network_peering.h:324
Definition: accelerator_config.cc:41
bool has_auto_create_routes() const
Definition: network_peering.h:94
bool has_state() const
Definition: network_peering.h:259
bool has_exchange_subnet_routes() const
Definition: network_peering.h:136
bool get_auto_create_routes() const
Definition: network_peering.h:109
const StringPiece get_state_details() const
Definition: network_peering.h:311
bool has_state_details() const
Definition: network_peering.h:296
void clear_state_details()
Definition: network_peering.h:303
Definition: network_peering.h:52