container  v1
node_pool.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: 2020-03-07, 01:20:42 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Kubernetes Engine API (container/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 93
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_CONTAINER_API_NODE_POOL_H_
31 #define GOOGLE_CONTAINER_API_NODE_POOL_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/container_api/max_pods_constraint.h"
40 #include "google/container_api/node_config.h"
41 #include "google/container_api/node_management.h"
42 #include "google/container_api/node_pool_autoscaling.h"
43 #include "google/container_api/status_condition.h"
44 #include "google/container_api/upgrade_settings.h"
45 
46 namespace Json {
47 class Value;
48 } // namespace Json
49 
50 namespace google_container_api {
51 using namespace googleapis;
52 
63 class NodePool : public client::JsonCppData {
64  public:
70  static NodePool* New();
71 
77  explicit NodePool(const Json::Value& storage);
78 
84  explicit NodePool(Json::Value* storage);
85 
89  virtual ~NodePool();
90 
96  const StringPiece GetTypeName() const {
97  return StringPiece("google_container_api::NodePool");
98  }
99 
105  bool has_autoscaling() const {
106  return Storage().isMember("autoscaling");
107  }
108 
113  MutableStorage()->removeMember("autoscaling");
114  }
115 
116 
120  const NodePoolAutoscaling get_autoscaling() const;
121 
131  NodePoolAutoscaling mutable_autoscaling();
132 
138  bool has_conditions() const {
139  return Storage().isMember("conditions");
140  }
141 
146  MutableStorage()->removeMember("conditions");
147  }
148 
149 
153  const client::JsonCppArray<StatusCondition > get_conditions() const;
154 
163  client::JsonCppArray<StatusCondition > mutable_conditions();
164 
170  bool has_config() const {
171  return Storage().isMember("config");
172  }
173 
177  void clear_config() {
178  MutableStorage()->removeMember("config");
179  }
180 
181 
185  const NodeConfig get_config() const;
186 
194  NodeConfig mutable_config();
195 
201  bool has_initial_node_count() const {
202  return Storage().isMember("initialNodeCount");
203  }
204 
209  MutableStorage()->removeMember("initialNodeCount");
210  }
211 
212 
216  int32 get_initial_node_count() const {
217  const Json::Value& storage = Storage("initialNodeCount");
218  return client::JsonValueToCppValueHelper<int32 >(storage);
219  }
220 
231  void set_initial_node_count(int32 value) {
232  client::SetJsonValueFromCppValueHelper<int32 >(
233  value, MutableStorage("initialNodeCount"));
234  }
235 
241  bool has_instance_group_urls() const {
242  return Storage().isMember("instanceGroupUrls");
243  }
244 
249  MutableStorage()->removeMember("instanceGroupUrls");
250  }
251 
252 
257  const client::JsonCppArray<string > get_instance_group_urls() const {
258  const Json::Value& storage = Storage("instanceGroupUrls");
259  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
260  }
261 
272  client::JsonCppArray<string > mutable_instanceGroupUrls() {
273  Json::Value* storage = MutableStorage("instanceGroupUrls");
274  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
275  }
276 
282  bool has_locations() const {
283  return Storage().isMember("locations");
284  }
285 
290  MutableStorage()->removeMember("locations");
291  }
292 
293 
297  const client::JsonCppArray<string > get_locations() const {
298  const Json::Value& storage = Storage("locations");
299  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
300  }
301 
311  client::JsonCppArray<string > mutable_locations() {
312  Json::Value* storage = MutableStorage("locations");
313  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
314  }
315 
321  bool has_management() const {
322  return Storage().isMember("management");
323  }
324 
329  MutableStorage()->removeMember("management");
330  }
331 
332 
336  const NodeManagement get_management() const;
337 
346  NodeManagement mutable_management();
347 
353  bool has_max_pods_constraint() const {
354  return Storage().isMember("maxPodsConstraint");
355  }
356 
361  MutableStorage()->removeMember("maxPodsConstraint");
362  }
363 
364 
369  const MaxPodsConstraint get_max_pods_constraint() const;
370 
380  MaxPodsConstraint mutable_maxPodsConstraint();
381 
387  bool has_name() const {
388  return Storage().isMember("name");
389  }
390 
394  void clear_name() {
395  MutableStorage()->removeMember("name");
396  }
397 
398 
402  const StringPiece get_name() const {
403  const Json::Value& v = Storage("name");
404  if (v == Json::Value::null) return StringPiece("");
405  return StringPiece(v.asCString());
406  }
407 
415  void set_name(const StringPiece& value) {
416  *MutableStorage("name") = value.data();
417  }
418 
424  bool has_pod_ipv4_cidr_size() const {
425  return Storage().isMember("podIpv4CidrSize");
426  }
427 
432  MutableStorage()->removeMember("podIpv4CidrSize");
433  }
434 
435 
439  int32 get_pod_ipv4_cidr_size() const {
440  const Json::Value& storage = Storage("podIpv4CidrSize");
441  return client::JsonValueToCppValueHelper<int32 >(storage);
442  }
443 
451  void set_pod_ipv4_cidr_size(int32 value) {
452  client::SetJsonValueFromCppValueHelper<int32 >(
453  value, MutableStorage("podIpv4CidrSize"));
454  }
455 
461  bool has_self_link() const {
462  return Storage().isMember("selfLink");
463  }
464 
469  MutableStorage()->removeMember("selfLink");
470  }
471 
472 
476  const StringPiece get_self_link() const {
477  const Json::Value& v = Storage("selfLink");
478  if (v == Json::Value::null) return StringPiece("");
479  return StringPiece(v.asCString());
480  }
481 
489  void set_self_link(const StringPiece& value) {
490  *MutableStorage("selfLink") = value.data();
491  }
492 
498  bool has_status() const {
499  return Storage().isMember("status");
500  }
501 
505  void clear_status() {
506  MutableStorage()->removeMember("status");
507  }
508 
509 
513  const StringPiece get_status() const {
514  const Json::Value& v = Storage("status");
515  if (v == Json::Value::null) return StringPiece("");
516  return StringPiece(v.asCString());
517  }
518 
526  void set_status(const StringPiece& value) {
527  *MutableStorage("status") = value.data();
528  }
529 
535  bool has_status_message() const {
536  return Storage().isMember("statusMessage");
537  }
538 
543  MutableStorage()->removeMember("statusMessage");
544  }
545 
546 
550  const StringPiece get_status_message() const {
551  const Json::Value& v = Storage("statusMessage");
552  if (v == Json::Value::null) return StringPiece("");
553  return StringPiece(v.asCString());
554  }
555 
564  void set_status_message(const StringPiece& value) {
565  *MutableStorage("statusMessage") = value.data();
566  }
567 
573  bool has_upgrade_settings() const {
574  return Storage().isMember("upgradeSettings");
575  }
576 
581  MutableStorage()->removeMember("upgradeSettings");
582  }
583 
584 
589  const UpgradeSettings get_upgrade_settings() const;
590 
599  UpgradeSettings mutable_upgradeSettings();
600 
606  bool has_version() const {
607  return Storage().isMember("version");
608  }
609 
613  void clear_version() {
614  MutableStorage()->removeMember("version");
615  }
616 
617 
621  const StringPiece get_version() const {
622  const Json::Value& v = Storage("version");
623  if (v == Json::Value::null) return StringPiece("");
624  return StringPiece(v.asCString());
625  }
626 
634  void set_version(const StringPiece& value) {
635  *MutableStorage("version") = value.data();
636  }
637 
638  private:
639  void operator=(const NodePool&);
640 }; // NodePool
641 } // namespace google_container_api
642 #endif // GOOGLE_CONTAINER_API_NODE_POOL_H_
const StringPiece get_name() const
Definition: node_pool.h:402
bool has_self_link() const
Definition: node_pool.h:461
bool has_initial_node_count() const
Definition: node_pool.h:201
int32 get_pod_ipv4_cidr_size() const
Definition: node_pool.h:439
void set_status(const StringPiece &value)
Definition: node_pool.h:526
bool has_upgrade_settings() const
Definition: node_pool.h:573
const StringPiece get_version() const
Definition: node_pool.h:621
client::JsonCppArray< string > mutable_instanceGroupUrls()
Definition: node_pool.h:272
void clear_self_link()
Definition: node_pool.h:468
void clear_status()
Definition: node_pool.h:505
void clear_name()
Definition: node_pool.h:394
void clear_version()
Definition: node_pool.h:613
void set_status_message(const StringPiece &value)
Definition: node_pool.h:564
Definition: node_pool.h:63
bool has_status_message() const
Definition: node_pool.h:535
const StringPiece get_status_message() const
Definition: node_pool.h:550
Definition: max_pods_constraint.h:50
const client::JsonCppArray< string > get_locations() const
Definition: node_pool.h:297
void clear_autoscaling()
Definition: node_pool.h:112
void clear_initial_node_count()
Definition: node_pool.h:208
const client::JsonCppArray< string > get_instance_group_urls() const
Definition: node_pool.h:257
Definition: upgrade_settings.h:72
void clear_config()
Definition: node_pool.h:177
void set_name(const StringPiece &value)
Definition: node_pool.h:415
void clear_conditions()
Definition: node_pool.h:145
bool has_max_pods_constraint() const
Definition: node_pool.h:353
client::JsonCppArray< string > mutable_locations()
Definition: node_pool.h:311
void set_pod_ipv4_cidr_size(int32 value)
Definition: node_pool.h:451
Definition: node_pool_autoscaling.h:51
bool has_management() const
Definition: node_pool.h:321
Definition: accelerator_config.h:39
bool has_status() const
Definition: node_pool.h:498
bool has_locations() const
Definition: node_pool.h:282
Definition: node_config.h:58
bool has_name() const
Definition: node_pool.h:387
bool has_config() const
Definition: node_pool.h:170
bool has_pod_ipv4_cidr_size() const
Definition: node_pool.h:424
Definition: accelerator_config.cc:41
void set_version(const StringPiece &value)
Definition: node_pool.h:634
void set_self_link(const StringPiece &value)
Definition: node_pool.h:489
void clear_instance_group_urls()
Definition: node_pool.h:248
void set_initial_node_count(int32 value)
Definition: node_pool.h:231
bool has_conditions() const
Definition: node_pool.h:138
bool has_version() const
Definition: node_pool.h:606
void clear_locations()
Definition: node_pool.h:289
void clear_upgrade_settings()
Definition: node_pool.h:580
Definition: node_management.h:52
const StringPiece get_status() const
Definition: node_pool.h:513
void clear_management()
Definition: node_pool.h:328
const StringPiece GetTypeName() const
Definition: node_pool.h:96
bool has_instance_group_urls() const
Definition: node_pool.h:241
void clear_status_message()
Definition: node_pool.h:542
const StringPiece get_self_link() const
Definition: node_pool.h:476
void clear_max_pods_constraint()
Definition: node_pool.h:360
void clear_pod_ipv4_cidr_size()
Definition: node_pool.h:431
int32 get_initial_node_count() const
Definition: node_pool.h:216
bool has_autoscaling() const
Definition: node_pool.h:105