container  v1
create_cluster_request.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_CREATE_CLUSTER_REQUEST_H_
31 #define GOOGLE_CONTAINER_API_CREATE_CLUSTER_REQUEST_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 #include "google/container_api/cluster.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_container_api {
45 using namespace googleapis;
46 
52 class CreateClusterRequest : public client::JsonCppData {
53  public:
59  static CreateClusterRequest* New();
60 
66  explicit CreateClusterRequest(const Json::Value& storage);
67 
73  explicit CreateClusterRequest(Json::Value* storage);
74 
78  virtual ~CreateClusterRequest();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_container_api::CreateClusterRequest");
87  }
88 
94  bool has_cluster() const {
95  return Storage().isMember("cluster");
96  }
97 
101  void clear_cluster() {
102  MutableStorage()->removeMember("cluster");
103  }
104 
105 
109  const Cluster get_cluster() const;
110 
119  Cluster mutable_cluster();
120 
126  bool has_parent() const {
127  return Storage().isMember("parent");
128  }
129 
133  void clear_parent() {
134  MutableStorage()->removeMember("parent");
135  }
136 
137 
141  const StringPiece get_parent() const {
142  const Json::Value& v = Storage("parent");
143  if (v == Json::Value::null) return StringPiece("");
144  return StringPiece(v.asCString());
145  }
146 
155  void set_parent(const StringPiece& value) {
156  *MutableStorage("parent") = value.data();
157  }
158 
164  bool has_project_id() const {
165  return Storage().isMember("projectId");
166  }
167 
172  MutableStorage()->removeMember("projectId");
173  }
174 
175 
179  const StringPiece get_project_id() const {
180  const Json::Value& v = Storage("projectId");
181  if (v == Json::Value::null) return StringPiece("");
182  return StringPiece(v.asCString());
183  }
184 
196  void set_project_id(const StringPiece& value) {
197  *MutableStorage("projectId") = value.data();
198  }
199 
205  bool has_zone() const {
206  return Storage().isMember("zone");
207  }
208 
212  void clear_zone() {
213  MutableStorage()->removeMember("zone");
214  }
215 
216 
220  const StringPiece get_zone() const {
221  const Json::Value& v = Storage("zone");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
238  void set_zone(const StringPiece& value) {
239  *MutableStorage("zone") = value.data();
240  }
241 
242  private:
243  void operator=(const CreateClusterRequest&);
244 }; // CreateClusterRequest
245 } // namespace google_container_api
246 #endif // GOOGLE_CONTAINER_API_CREATE_CLUSTER_REQUEST_H_
const StringPiece GetTypeName() const
Definition: create_cluster_request.h:85
void set_parent(const StringPiece &value)
Definition: create_cluster_request.h:155
void clear_parent()
Definition: create_cluster_request.h:133
void clear_zone()
Definition: create_cluster_request.h:212
const StringPiece get_project_id() const
Definition: create_cluster_request.h:179
void set_project_id(const StringPiece &value)
Definition: create_cluster_request.h:196
void clear_project_id()
Definition: create_cluster_request.h:171
const StringPiece get_zone() const
Definition: create_cluster_request.h:220
bool has_project_id() const
Definition: create_cluster_request.h:164
Definition: accelerator_config.h:39
const StringPiece get_parent() const
Definition: create_cluster_request.h:141
void clear_cluster()
Definition: create_cluster_request.h:101
Definition: accelerator_config.cc:41
Definition: create_cluster_request.h:52
bool has_parent() const
Definition: create_cluster_request.h:126
Definition: cluster.h:73
void set_zone(const StringPiece &value)
Definition: create_cluster_request.h:238
bool has_cluster() const
Definition: create_cluster_request.h:94
bool has_zone() const
Definition: create_cluster_request.h:205