container  v1
node_config.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_CONFIG_H_
31 #define GOOGLE_CONTAINER_API_NODE_CONFIG_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/accelerator_config.h"
40 #include "google/container_api/node_taint.h"
41 #include "google/container_api/reservation_affinity.h"
42 #include "google/container_api/sandbox_config.h"
43 #include "google/container_api/shielded_instance_config.h"
44 #include "google/container_api/workload_metadata_config.h"
45 
46 namespace Json {
47 class Value;
48 } // namespace Json
49 
50 namespace google_container_api {
51 using namespace googleapis;
52 
58 class NodeConfig : public client::JsonCppData {
59  public:
65  static NodeConfig* New();
66 
72  explicit NodeConfig(const Json::Value& storage);
73 
79  explicit NodeConfig(Json::Value* storage);
80 
84  virtual ~NodeConfig();
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_container_api::NodeConfig");
93  }
94 
100  bool has_accelerators() const {
101  return Storage().isMember("accelerators");
102  }
103 
108  MutableStorage()->removeMember("accelerators");
109  }
110 
111 
115  const client::JsonCppArray<AcceleratorConfig > get_accelerators() const;
116 
127  client::JsonCppArray<AcceleratorConfig > mutable_accelerators();
128 
134  bool has_disk_size_gb() const {
135  return Storage().isMember("diskSizeGb");
136  }
137 
142  MutableStorage()->removeMember("diskSizeGb");
143  }
144 
145 
149  int32 get_disk_size_gb() const {
150  const Json::Value& storage = Storage("diskSizeGb");
151  return client::JsonValueToCppValueHelper<int32 >(storage);
152  }
153 
164  void set_disk_size_gb(int32 value) {
165  client::SetJsonValueFromCppValueHelper<int32 >(
166  value, MutableStorage("diskSizeGb"));
167  }
168 
174  bool has_disk_type() const {
175  return Storage().isMember("diskType");
176  }
177 
182  MutableStorage()->removeMember("diskType");
183  }
184 
185 
189  const StringPiece get_disk_type() const {
190  const Json::Value& v = Storage("diskType");
191  if (v == Json::Value::null) return StringPiece("");
192  return StringPiece(v.asCString());
193  }
194 
204  void set_disk_type(const StringPiece& value) {
205  *MutableStorage("diskType") = value.data();
206  }
207 
213  bool has_image_type() const {
214  return Storage().isMember("imageType");
215  }
216 
221  MutableStorage()->removeMember("imageType");
222  }
223 
224 
228  const StringPiece get_image_type() const {
229  const Json::Value& v = Storage("imageType");
230  if (v == Json::Value::null) return StringPiece("");
231  return StringPiece(v.asCString());
232  }
233 
242  void set_image_type(const StringPiece& value) {
243  *MutableStorage("imageType") = value.data();
244  }
245 
251  bool has_labels() const {
252  return Storage().isMember("labels");
253  }
254 
258  void clear_labels() {
259  MutableStorage()->removeMember("labels");
260  }
261 
262 
266  const client::JsonCppAssociativeArray<string > get_labels() const {
267  const Json::Value& storage = Storage("labels");
268  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
269  }
270 
285  client::JsonCppAssociativeArray<string > mutable_labels() {
286  Json::Value* storage = MutableStorage("labels");
287  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
288  }
289 
295  bool has_local_ssd_count() const {
296  return Storage().isMember("localSsdCount");
297  }
298 
303  MutableStorage()->removeMember("localSsdCount");
304  }
305 
306 
310  int32 get_local_ssd_count() const {
311  const Json::Value& storage = Storage("localSsdCount");
312  return client::JsonValueToCppValueHelper<int32 >(storage);
313  }
314 
327  void set_local_ssd_count(int32 value) {
328  client::SetJsonValueFromCppValueHelper<int32 >(
329  value, MutableStorage("localSsdCount"));
330  }
331 
337  bool has_machine_type() const {
338  return Storage().isMember("machineType");
339  }
340 
345  MutableStorage()->removeMember("machineType");
346  }
347 
348 
352  const StringPiece get_machine_type() const {
353  const Json::Value& v = Storage("machineType");
354  if (v == Json::Value::null) return StringPiece("");
355  return StringPiece(v.asCString());
356  }
357 
375  void set_machine_type(const StringPiece& value) {
376  *MutableStorage("machineType") = value.data();
377  }
378 
384  bool has_metadata() const {
385  return Storage().isMember("metadata");
386  }
387 
391  void clear_metadata() {
392  MutableStorage()->removeMember("metadata");
393  }
394 
395 
399  const client::JsonCppAssociativeArray<string > get_metadata() const {
400  const Json::Value& storage = Storage("metadata");
401  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
402  }
403 
474  client::JsonCppAssociativeArray<string > mutable_metadata() {
475  Json::Value* storage = MutableStorage("metadata");
476  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
477  }
478 
484  bool has_min_cpu_platform() const {
485  return Storage().isMember("minCpuPlatform");
486  }
487 
492  MutableStorage()->removeMember("minCpuPlatform");
493  }
494 
495 
499  const StringPiece get_min_cpu_platform() const {
500  const Json::Value& v = Storage("minCpuPlatform");
501  if (v == Json::Value::null) return StringPiece("");
502  return StringPiece(v.asCString());
503  }
504 
523  void set_min_cpu_platform(const StringPiece& value) {
524  *MutableStorage("minCpuPlatform") = value.data();
525  }
526 
532  bool has_oauth_scopes() const {
533  return Storage().isMember("oauthScopes");
534  }
535 
540  MutableStorage()->removeMember("oauthScopes");
541  }
542 
543 
547  const client::JsonCppArray<string > get_oauth_scopes() const {
548  const Json::Value& storage = Storage("oauthScopes");
549  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
550  }
551 
573  client::JsonCppArray<string > mutable_oauthScopes() {
574  Json::Value* storage = MutableStorage("oauthScopes");
575  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
576  }
577 
583  bool has_preemptible() const {
584  return Storage().isMember("preemptible");
585  }
586 
591  MutableStorage()->removeMember("preemptible");
592  }
593 
594 
598  bool get_preemptible() const {
599  const Json::Value& storage = Storage("preemptible");
600  return client::JsonValueToCppValueHelper<bool >(storage);
601  }
602 
612  void set_preemptible(bool value) {
613  client::SetJsonValueFromCppValueHelper<bool >(
614  value, MutableStorage("preemptible"));
615  }
616 
623  return Storage().isMember("reservationAffinity");
624  }
625 
630  MutableStorage()->removeMember("reservationAffinity");
631  }
632 
633 
638  const ReservationAffinity get_reservation_affinity() const;
639 
651  ReservationAffinity mutable_reservationAffinity();
652 
658  bool has_sandbox_config() const {
659  return Storage().isMember("sandboxConfig");
660  }
661 
666  MutableStorage()->removeMember("sandboxConfig");
667  }
668 
669 
673  const SandboxConfig get_sandbox_config() const;
674 
683  SandboxConfig mutable_sandboxConfig();
684 
690  bool has_service_account() const {
691  return Storage().isMember("serviceAccount");
692  }
693 
698  MutableStorage()->removeMember("serviceAccount");
699  }
700 
701 
705  const StringPiece get_service_account() const {
706  const Json::Value& v = Storage("serviceAccount");
707  if (v == Json::Value::null) return StringPiece("");
708  return StringPiece(v.asCString());
709  }
710 
720  void set_service_account(const StringPiece& value) {
721  *MutableStorage("serviceAccount") = value.data();
722  }
723 
731  return Storage().isMember("shieldedInstanceConfig");
732  }
733 
738  MutableStorage()->removeMember("shieldedInstanceConfig");
739  }
740 
741 
746  const ShieldedInstanceConfig get_shielded_instance_config() const;
747 
756  ShieldedInstanceConfig mutable_shieldedInstanceConfig();
757 
763  bool has_tags() const {
764  return Storage().isMember("tags");
765  }
766 
770  void clear_tags() {
771  MutableStorage()->removeMember("tags");
772  }
773 
774 
778  const client::JsonCppArray<string > get_tags() const {
779  const Json::Value& storage = Storage("tags");
780  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
781  }
782 
793  client::JsonCppArray<string > mutable_tags() {
794  Json::Value* storage = MutableStorage("tags");
795  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
796  }
797 
803  bool has_taints() const {
804  return Storage().isMember("taints");
805  }
806 
810  void clear_taints() {
811  MutableStorage()->removeMember("taints");
812  }
813 
814 
818  const client::JsonCppArray<NodeTaint > get_taints() const;
819 
830  client::JsonCppArray<NodeTaint > mutable_taints();
831 
839  return Storage().isMember("workloadMetadataConfig");
840  }
841 
846  MutableStorage()->removeMember("workloadMetadataConfig");
847  }
848 
849 
854  const WorkloadMetadataConfig get_workload_metadata_config() const;
855 
864  WorkloadMetadataConfig mutable_workloadMetadataConfig();
865 
866  private:
867  void operator=(const NodeConfig&);
868 }; // NodeConfig
869 } // namespace google_container_api
870 #endif // GOOGLE_CONTAINER_API_NODE_CONFIG_H_
void clear_reservation_affinity()
Definition: node_config.h:629
void clear_preemptible()
Definition: node_config.h:590
int32 get_local_ssd_count() const
Definition: node_config.h:310
bool has_min_cpu_platform() const
Definition: node_config.h:484
client::JsonCppArray< string > mutable_tags()
Definition: node_config.h:793
bool has_service_account() const
Definition: node_config.h:690
void clear_workload_metadata_config()
Definition: node_config.h:845
void clear_image_type()
Definition: node_config.h:220
int32 get_disk_size_gb() const
Definition: node_config.h:149
const StringPiece get_service_account() const
Definition: node_config.h:705
Definition: reservation_affinity.h:52
Definition: workload_metadata_config.h:51
void set_disk_size_gb(int32 value)
Definition: node_config.h:164
const client::JsonCppArray< string > get_oauth_scopes() const
Definition: node_config.h:547
bool has_disk_size_gb() const
Definition: node_config.h:134
void set_min_cpu_platform(const StringPiece &value)
Definition: node_config.h:523
void clear_min_cpu_platform()
Definition: node_config.h:491
void set_preemptible(bool value)
Definition: node_config.h:612
void clear_machine_type()
Definition: node_config.h:344
void clear_service_account()
Definition: node_config.h:697
void set_machine_type(const StringPiece &value)
Definition: node_config.h:375
void clear_shielded_instance_config()
Definition: node_config.h:737
bool get_preemptible() const
Definition: node_config.h:598
client::JsonCppArray< string > mutable_oauthScopes()
Definition: node_config.h:573
bool has_labels() const
Definition: node_config.h:251
bool has_image_type() const
Definition: node_config.h:213
void clear_taints()
Definition: node_config.h:810
bool has_machine_type() const
Definition: node_config.h:337
bool has_tags() const
Definition: node_config.h:763
bool has_taints() const
Definition: node_config.h:803
void set_image_type(const StringPiece &value)
Definition: node_config.h:242
void clear_disk_size_gb()
Definition: node_config.h:141
void clear_local_ssd_count()
Definition: node_config.h:302
bool has_sandbox_config() const
Definition: node_config.h:658
const StringPiece get_image_type() const
Definition: node_config.h:228
const StringPiece GetTypeName() const
Definition: node_config.h:91
const client::JsonCppAssociativeArray< string > get_labels() const
Definition: node_config.h:266
const StringPiece get_disk_type() const
Definition: node_config.h:189
Definition: accelerator_config.h:39
const StringPiece get_machine_type() const
Definition: node_config.h:352
const client::JsonCppAssociativeArray< string > get_metadata() const
Definition: node_config.h:399
Definition: node_config.h:58
bool has_local_ssd_count() const
Definition: node_config.h:295
void set_service_account(const StringPiece &value)
Definition: node_config.h:720
void clear_sandbox_config()
Definition: node_config.h:665
Definition: accelerator_config.cc:41
bool has_disk_type() const
Definition: node_config.h:174
client::JsonCppAssociativeArray< string > mutable_labels()
Definition: node_config.h:285
bool has_preemptible() const
Definition: node_config.h:583
const StringPiece get_min_cpu_platform() const
Definition: node_config.h:499
bool has_workload_metadata_config() const
Definition: node_config.h:838
void set_disk_type(const StringPiece &value)
Definition: node_config.h:204
bool has_metadata() const
Definition: node_config.h:384
void clear_metadata()
Definition: node_config.h:391
bool has_accelerators() const
Definition: node_config.h:100
Definition: sandbox_config.h:50
bool has_shielded_instance_config() const
Definition: node_config.h:730
void clear_disk_type()
Definition: node_config.h:181
bool has_oauth_scopes() const
Definition: node_config.h:532
const client::JsonCppArray< string > get_tags() const
Definition: node_config.h:778
void clear_oauth_scopes()
Definition: node_config.h:539
bool has_reservation_affinity() const
Definition: node_config.h:622
void clear_accelerators()
Definition: node_config.h:107
void set_local_ssd_count(int32 value)
Definition: node_config.h:327
void clear_labels()
Definition: node_config.h:258
Definition: shielded_instance_config.h:49
client::JsonCppAssociativeArray< string > mutable_metadata()
Definition: node_config.h:474
void clear_tags()
Definition: node_config.h:770