compute  v1
target_vpn_gateway.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_TARGET_VPN_GATEWAY_H_
31 #define GOOGLE_COMPUTE_API_TARGET_VPN_GATEWAY_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_compute_api {
44 using namespace googleapis;
45 
52 class TargetVpnGateway : public client::JsonCppData {
53  public:
59  static TargetVpnGateway* New();
60 
66  explicit TargetVpnGateway(const Json::Value& storage);
67 
73  explicit TargetVpnGateway(Json::Value* storage);
74 
78  virtual ~TargetVpnGateway();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_compute_api::TargetVpnGateway");
87  }
88 
94  bool has_creation_timestamp() const {
95  return Storage().isMember("creationTimestamp");
96  }
97 
102  MutableStorage()->removeMember("creationTimestamp");
103  }
104 
105 
109  const StringPiece get_creation_timestamp() const {
110  const Json::Value& v = Storage("creationTimestamp");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
122  void set_creation_timestamp(const StringPiece& value) {
123  *MutableStorage("creationTimestamp") = value.data();
124  }
125 
131  bool has_description() const {
132  return Storage().isMember("description");
133  }
134 
139  MutableStorage()->removeMember("description");
140  }
141 
142 
146  const StringPiece get_description() const {
147  const Json::Value& v = Storage("description");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
160  void set_description(const StringPiece& value) {
161  *MutableStorage("description") = value.data();
162  }
163 
169  bool has_forwarding_rules() const {
170  return Storage().isMember("forwardingRules");
171  }
172 
177  MutableStorage()->removeMember("forwardingRules");
178  }
179 
180 
185  const client::JsonCppArray<string > get_forwarding_rules() const {
186  const Json::Value& storage = Storage("forwardingRules");
187  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
188  }
189 
200  client::JsonCppArray<string > mutable_forwardingRules() {
201  Json::Value* storage = MutableStorage("forwardingRules");
202  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
203  }
204 
210  bool has_id() const {
211  return Storage().isMember("id");
212  }
213 
217  void clear_id() {
218  MutableStorage()->removeMember("id");
219  }
220 
221 
225  uint64 get_id() const {
226  const Json::Value& storage = Storage("id");
227  return client::JsonValueToCppValueHelper<uint64 >(storage);
228  }
229 
238  void set_id(uint64 value) {
239  client::SetJsonValueFromCppValueHelper<uint64 >(
240  value, MutableStorage("id"));
241  }
242 
248  bool has_kind() const {
249  return Storage().isMember("kind");
250  }
251 
255  void clear_kind() {
256  MutableStorage()->removeMember("kind");
257  }
258 
259 
263  const StringPiece get_kind() const {
264  const Json::Value& v = Storage("kind");
265  if (v == Json::Value::null) return StringPiece("");
266  return StringPiece(v.asCString());
267  }
268 
277  void set_kind(const StringPiece& value) {
278  *MutableStorage("kind") = value.data();
279  }
280 
286  bool has_name() const {
287  return Storage().isMember("name");
288  }
289 
293  void clear_name() {
294  MutableStorage()->removeMember("name");
295  }
296 
297 
301  const StringPiece get_name() const {
302  const Json::Value& v = Storage("name");
303  if (v == Json::Value::null) return StringPiece("");
304  return StringPiece(v.asCString());
305  }
306 
320  void set_name(const StringPiece& value) {
321  *MutableStorage("name") = value.data();
322  }
323 
329  bool has_network() const {
330  return Storage().isMember("network");
331  }
332 
336  void clear_network() {
337  MutableStorage()->removeMember("network");
338  }
339 
340 
344  const StringPiece get_network() const {
345  const Json::Value& v = Storage("network");
346  if (v == Json::Value::null) return StringPiece("");
347  return StringPiece(v.asCString());
348  }
349 
358  void set_network(const StringPiece& value) {
359  *MutableStorage("network") = value.data();
360  }
361 
367  bool has_region() const {
368  return Storage().isMember("region");
369  }
370 
374  void clear_region() {
375  MutableStorage()->removeMember("region");
376  }
377 
378 
382  const StringPiece get_region() const {
383  const Json::Value& v = Storage("region");
384  if (v == Json::Value::null) return StringPiece("");
385  return StringPiece(v.asCString());
386  }
387 
397  void set_region(const StringPiece& value) {
398  *MutableStorage("region") = value.data();
399  }
400 
406  bool has_self_link() const {
407  return Storage().isMember("selfLink");
408  }
409 
414  MutableStorage()->removeMember("selfLink");
415  }
416 
417 
421  const StringPiece get_self_link() const {
422  const Json::Value& v = Storage("selfLink");
423  if (v == Json::Value::null) return StringPiece("");
424  return StringPiece(v.asCString());
425  }
426 
434  void set_self_link(const StringPiece& value) {
435  *MutableStorage("selfLink") = value.data();
436  }
437 
443  bool has_status() const {
444  return Storage().isMember("status");
445  }
446 
450  void clear_status() {
451  MutableStorage()->removeMember("status");
452  }
453 
454 
458  const StringPiece get_status() const {
459  const Json::Value& v = Storage("status");
460  if (v == Json::Value::null) return StringPiece("");
461  return StringPiece(v.asCString());
462  }
463 
472  void set_status(const StringPiece& value) {
473  *MutableStorage("status") = value.data();
474  }
475 
481  bool has_tunnels() const {
482  return Storage().isMember("tunnels");
483  }
484 
488  void clear_tunnels() {
489  MutableStorage()->removeMember("tunnels");
490  }
491 
492 
496  const client::JsonCppArray<string > get_tunnels() const {
497  const Json::Value& storage = Storage("tunnels");
498  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
499  }
500 
510  client::JsonCppArray<string > mutable_tunnels() {
511  Json::Value* storage = MutableStorage("tunnels");
512  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
513  }
514 
515  private:
516  void operator=(const TargetVpnGateway&);
517 }; // TargetVpnGateway
518 } // namespace google_compute_api
519 #endif // GOOGLE_COMPUTE_API_TARGET_VPN_GATEWAY_H_
const client::JsonCppArray< string > get_forwarding_rules() const
Definition: target_vpn_gateway.h:185
void clear_self_link()
Definition: target_vpn_gateway.h:413
bool has_kind() const
Definition: target_vpn_gateway.h:248
bool has_network() const
Definition: target_vpn_gateway.h:329
bool has_status() const
Definition: target_vpn_gateway.h:443
const StringPiece get_kind() const
Definition: target_vpn_gateway.h:263
void set_name(const StringPiece &value)
Definition: target_vpn_gateway.h:320
const StringPiece get_self_link() const
Definition: target_vpn_gateway.h:421
void clear_creation_timestamp()
Definition: target_vpn_gateway.h:101
void set_status(const StringPiece &value)
Definition: target_vpn_gateway.h:472
void set_description(const StringPiece &value)
Definition: target_vpn_gateway.h:160
void clear_forwarding_rules()
Definition: target_vpn_gateway.h:176
bool has_region() const
Definition: target_vpn_gateway.h:367
const StringPiece get_name() const
Definition: target_vpn_gateway.h:301
void clear_name()
Definition: target_vpn_gateway.h:293
void set_creation_timestamp(const StringPiece &value)
Definition: target_vpn_gateway.h:122
const StringPiece get_network() const
Definition: target_vpn_gateway.h:344
client::JsonCppArray< string > mutable_forwardingRules()
Definition: target_vpn_gateway.h:200
const client::JsonCppArray< string > get_tunnels() const
Definition: target_vpn_gateway.h:496
uint64 get_id() const
Definition: target_vpn_gateway.h:225
bool has_forwarding_rules() const
Definition: target_vpn_gateway.h:169
void set_self_link(const StringPiece &value)
Definition: target_vpn_gateway.h:434
void set_id(uint64 value)
Definition: target_vpn_gateway.h:238
void clear_region()
Definition: target_vpn_gateway.h:374
const StringPiece get_description() const
Definition: target_vpn_gateway.h:146
Definition: accelerator_config.h:39
bool has_description() const
Definition: target_vpn_gateway.h:131
void clear_network()
Definition: target_vpn_gateway.h:336
bool has_id() const
Definition: target_vpn_gateway.h:210
bool has_creation_timestamp() const
Definition: target_vpn_gateway.h:94
bool has_tunnels() const
Definition: target_vpn_gateway.h:481
bool has_self_link() const
Definition: target_vpn_gateway.h:406
void set_kind(const StringPiece &value)
Definition: target_vpn_gateway.h:277
client::JsonCppArray< string > mutable_tunnels()
Definition: target_vpn_gateway.h:510
Definition: accelerator_config.cc:41
Definition: target_vpn_gateway.h:52
void set_network(const StringPiece &value)
Definition: target_vpn_gateway.h:358
bool has_name() const
Definition: target_vpn_gateway.h:286
const StringPiece GetTypeName() const
Definition: target_vpn_gateway.h:85
void clear_description()
Definition: target_vpn_gateway.h:138
void clear_kind()
Definition: target_vpn_gateway.h:255
const StringPiece get_region() const
Definition: target_vpn_gateway.h:382
const StringPiece get_status() const
Definition: target_vpn_gateway.h:458
void clear_tunnels()
Definition: target_vpn_gateway.h:488
void clear_id()
Definition: target_vpn_gateway.h:217
const StringPiece get_creation_timestamp() const
Definition: target_vpn_gateway.h:109
void set_region(const StringPiece &value)
Definition: target_vpn_gateway.h:397
void clear_status()
Definition: target_vpn_gateway.h:450