compute  v1
router_status_nat_status.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_STATUS_NAT_STATUS_H_
31 #define GOOGLE_COMPUTE_API_ROUTER_STATUS_NAT_STATUS_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 
51 class RouterStatusNatStatus : public client::JsonCppData {
52  public:
58  static RouterStatusNatStatus* New();
59 
65  explicit RouterStatusNatStatus(const Json::Value& storage);
66 
72  explicit RouterStatusNatStatus(Json::Value* storage);
73 
77  virtual ~RouterStatusNatStatus();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_compute_api::RouterStatusNatStatus");
86  }
87 
94  return Storage().isMember("autoAllocatedNatIps");
95  }
96 
101  MutableStorage()->removeMember("autoAllocatedNatIps");
102  }
103 
104 
109  const client::JsonCppArray<string > get_auto_allocated_nat_ips() const {
110  const Json::Value& storage = Storage("autoAllocatedNatIps");
111  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
112  }
113 
122  client::JsonCppArray<string > mutable_autoAllocatedNatIps() {
123  Json::Value* storage = MutableStorage("autoAllocatedNatIps");
124  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
125  }
126 
133  return Storage().isMember("minExtraNatIpsNeeded");
134  }
135 
140  MutableStorage()->removeMember("minExtraNatIpsNeeded");
141  }
142 
143 
148  const Json::Value& storage = Storage("minExtraNatIpsNeeded");
149  return client::JsonValueToCppValueHelper<int32 >(storage);
150  }
151 
162  void set_min_extra_nat_ips_needed(int32 value) {
163  client::SetJsonValueFromCppValueHelper<int32 >(
164  value, MutableStorage("minExtraNatIpsNeeded"));
165  }
166 
172  bool has_name() const {
173  return Storage().isMember("name");
174  }
175 
179  void clear_name() {
180  MutableStorage()->removeMember("name");
181  }
182 
183 
187  const StringPiece get_name() const {
188  const Json::Value& v = Storage("name");
189  if (v == Json::Value::null) return StringPiece("");
190  return StringPiece(v.asCString());
191  }
192 
200  void set_name(const StringPiece& value) {
201  *MutableStorage("name") = value.data();
202  }
203 
212  return Storage().isMember("numVmEndpointsWithNatMappings");
213  }
214 
219  MutableStorage()->removeMember("numVmEndpointsWithNatMappings");
220  }
221 
222 
228  const Json::Value& storage = Storage("numVmEndpointsWithNatMappings");
229  return client::JsonValueToCppValueHelper<int32 >(storage);
230  }
231 
240  client::SetJsonValueFromCppValueHelper<int32 >(
241  value, MutableStorage("numVmEndpointsWithNatMappings"));
242  }
243 
252  return Storage().isMember("userAllocatedNatIpResources");
253  }
254 
259  MutableStorage()->removeMember("userAllocatedNatIpResources");
260  }
261 
262 
267  const client::JsonCppArray<string > get_user_allocated_nat_ip_resources() const {
268  const Json::Value& storage = Storage("userAllocatedNatIpResources");
269  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
270  }
271 
280  client::JsonCppArray<string > mutable_userAllocatedNatIpResources() {
281  Json::Value* storage = MutableStorage("userAllocatedNatIpResources");
282  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
283  }
284 
291  return Storage().isMember("userAllocatedNatIps");
292  }
293 
298  MutableStorage()->removeMember("userAllocatedNatIps");
299  }
300 
301 
306  const client::JsonCppArray<string > get_user_allocated_nat_ips() const {
307  const Json::Value& storage = Storage("userAllocatedNatIps");
308  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
309  }
310 
320  client::JsonCppArray<string > mutable_userAllocatedNatIps() {
321  Json::Value* storage = MutableStorage("userAllocatedNatIps");
322  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
323  }
324 
325  private:
326  void operator=(const RouterStatusNatStatus&);
327 }; // RouterStatusNatStatus
328 } // namespace google_compute_api
329 #endif // GOOGLE_COMPUTE_API_ROUTER_STATUS_NAT_STATUS_H_
int32 get_min_extra_nat_ips_needed() const
Definition: router_status_nat_status.h:147
bool has_user_allocated_nat_ips() const
Definition: router_status_nat_status.h:290
client::JsonCppArray< string > mutable_userAllocatedNatIps()
Definition: router_status_nat_status.h:320
void clear_user_allocated_nat_ip_resources()
Definition: router_status_nat_status.h:258
const client::JsonCppArray< string > get_user_allocated_nat_ip_resources() const
Definition: router_status_nat_status.h:267
void clear_num_vm_endpoints_with_nat_mappings()
Definition: router_status_nat_status.h:218
void clear_user_allocated_nat_ips()
Definition: router_status_nat_status.h:297
void clear_min_extra_nat_ips_needed()
Definition: router_status_nat_status.h:139
void clear_auto_allocated_nat_ips()
Definition: router_status_nat_status.h:100
const StringPiece get_name() const
Definition: router_status_nat_status.h:187
Definition: router_status_nat_status.h:51
void set_num_vm_endpoints_with_nat_mappings(int32 value)
Definition: router_status_nat_status.h:239
const client::JsonCppArray< string > get_user_allocated_nat_ips() const
Definition: router_status_nat_status.h:306
bool has_name() const
Definition: router_status_nat_status.h:172
void set_min_extra_nat_ips_needed(int32 value)
Definition: router_status_nat_status.h:162
bool has_user_allocated_nat_ip_resources() const
Definition: router_status_nat_status.h:251
int32 get_num_vm_endpoints_with_nat_mappings() const
Definition: router_status_nat_status.h:227
void clear_name()
Definition: router_status_nat_status.h:179
Definition: accelerator_config.h:39
bool has_min_extra_nat_ips_needed() const
Definition: router_status_nat_status.h:132
void set_name(const StringPiece &value)
Definition: router_status_nat_status.h:200
Definition: accelerator_config.cc:41
bool has_num_vm_endpoints_with_nat_mappings() const
Definition: router_status_nat_status.h:211
client::JsonCppArray< string > mutable_autoAllocatedNatIps()
Definition: router_status_nat_status.h:122
client::JsonCppArray< string > mutable_userAllocatedNatIpResources()
Definition: router_status_nat_status.h:280
const StringPiece GetTypeName() const
Definition: router_status_nat_status.h:84
bool has_auto_allocated_nat_ips() const
Definition: router_status_nat_status.h:93
const client::JsonCppArray< string > get_auto_allocated_nat_ips() const
Definition: router_status_nat_status.h:109