container  v1
server_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_SERVER_CONFIG_H_
31 #define GOOGLE_CONTAINER_API_SERVER_CONFIG_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_container_api {
43 using namespace googleapis;
44 
50 class ServerConfig : public client::JsonCppData {
51  public:
57  static ServerConfig* New();
58 
64  explicit ServerConfig(const Json::Value& storage);
65 
71  explicit ServerConfig(Json::Value* storage);
72 
76  virtual ~ServerConfig();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_container_api::ServerConfig");
85  }
86 
93  return Storage().isMember("defaultClusterVersion");
94  }
95 
100  MutableStorage()->removeMember("defaultClusterVersion");
101  }
102 
103 
107  const StringPiece get_default_cluster_version() const {
108  const Json::Value& v = Storage("defaultClusterVersion");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
120  void set_default_cluster_version(const StringPiece& value) {
121  *MutableStorage("defaultClusterVersion") = value.data();
122  }
123 
129  bool has_default_image_type() const {
130  return Storage().isMember("defaultImageType");
131  }
132 
137  MutableStorage()->removeMember("defaultImageType");
138  }
139 
140 
144  const StringPiece get_default_image_type() const {
145  const Json::Value& v = Storage("defaultImageType");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
157  void set_default_image_type(const StringPiece& value) {
158  *MutableStorage("defaultImageType") = value.data();
159  }
160 
166  bool has_valid_image_types() const {
167  return Storage().isMember("validImageTypes");
168  }
169 
174  MutableStorage()->removeMember("validImageTypes");
175  }
176 
177 
182  const client::JsonCppArray<string > get_valid_image_types() const {
183  const Json::Value& storage = Storage("validImageTypes");
184  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
185  }
186 
195  client::JsonCppArray<string > mutable_validImageTypes() {
196  Json::Value* storage = MutableStorage("validImageTypes");
197  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
198  }
199 
206  return Storage().isMember("validMasterVersions");
207  }
208 
213  MutableStorage()->removeMember("validMasterVersions");
214  }
215 
216 
221  const client::JsonCppArray<string > get_valid_master_versions() const {
222  const Json::Value& storage = Storage("validMasterVersions");
223  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
224  }
225 
234  client::JsonCppArray<string > mutable_validMasterVersions() {
235  Json::Value* storage = MutableStorage("validMasterVersions");
236  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
237  }
238 
244  bool has_valid_node_versions() const {
245  return Storage().isMember("validNodeVersions");
246  }
247 
252  MutableStorage()->removeMember("validNodeVersions");
253  }
254 
255 
260  const client::JsonCppArray<string > get_valid_node_versions() const {
261  const Json::Value& storage = Storage("validNodeVersions");
262  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
263  }
264 
273  client::JsonCppArray<string > mutable_validNodeVersions() {
274  Json::Value* storage = MutableStorage("validNodeVersions");
275  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
276  }
277 
278  private:
279  void operator=(const ServerConfig&);
280 }; // ServerConfig
281 } // namespace google_container_api
282 #endif // GOOGLE_CONTAINER_API_SERVER_CONFIG_H_
const StringPiece GetTypeName() const
Definition: server_config.h:83
void clear_valid_image_types()
Definition: server_config.h:173
void set_default_image_type(const StringPiece &value)
Definition: server_config.h:157
void clear_default_image_type()
Definition: server_config.h:136
client::JsonCppArray< string > mutable_validNodeVersions()
Definition: server_config.h:273
client::JsonCppArray< string > mutable_validImageTypes()
Definition: server_config.h:195
bool has_default_cluster_version() const
Definition: server_config.h:92
void clear_valid_master_versions()
Definition: server_config.h:212
const client::JsonCppArray< string > get_valid_master_versions() const
Definition: server_config.h:221
const client::JsonCppArray< string > get_valid_image_types() const
Definition: server_config.h:182
bool has_default_image_type() const
Definition: server_config.h:129
Definition: accelerator_config.h:39
bool has_valid_image_types() const
Definition: server_config.h:166
const StringPiece get_default_image_type() const
Definition: server_config.h:144
const StringPiece get_default_cluster_version() const
Definition: server_config.h:107
void set_default_cluster_version(const StringPiece &value)
Definition: server_config.h:120
void clear_valid_node_versions()
Definition: server_config.h:251
Definition: accelerator_config.cc:41
void clear_default_cluster_version()
Definition: server_config.h:99
bool has_valid_master_versions() const
Definition: server_config.h:205
const client::JsonCppArray< string > get_valid_node_versions() const
Definition: server_config.h:260
client::JsonCppArray< string > mutable_validMasterVersions()
Definition: server_config.h:234
Definition: server_config.h:50
bool has_valid_node_versions() const
Definition: server_config.h:244