container  v1
set_locations_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_SET_LOCATIONS_REQUEST_H_
31 #define GOOGLE_CONTAINER_API_SET_LOCATIONS_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_container_api {
43 using namespace googleapis;
44 
50 class SetLocationsRequest : public client::JsonCppData {
51  public:
57  static SetLocationsRequest* New();
58 
64  explicit SetLocationsRequest(const Json::Value& storage);
65 
71  explicit SetLocationsRequest(Json::Value* storage);
72 
76  virtual ~SetLocationsRequest();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_container_api::SetLocationsRequest");
85  }
86 
92  bool has_cluster_id() const {
93  return Storage().isMember("clusterId");
94  }
95 
100  MutableStorage()->removeMember("clusterId");
101  }
102 
103 
107  const StringPiece get_cluster_id() const {
108  const Json::Value& v = Storage("clusterId");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
123  void set_cluster_id(const StringPiece& value) {
124  *MutableStorage("clusterId") = value.data();
125  }
126 
132  bool has_locations() const {
133  return Storage().isMember("locations");
134  }
135 
140  MutableStorage()->removeMember("locations");
141  }
142 
143 
147  const client::JsonCppArray<string > get_locations() const {
148  const Json::Value& storage = Storage("locations");
149  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
150  }
151 
166  client::JsonCppArray<string > mutable_locations() {
167  Json::Value* storage = MutableStorage("locations");
168  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
169  }
170 
176  bool has_name() const {
177  return Storage().isMember("name");
178  }
179 
183  void clear_name() {
184  MutableStorage()->removeMember("name");
185  }
186 
187 
191  const StringPiece get_name() const {
192  const Json::Value& v = Storage("name");
193  if (v == Json::Value::null) return StringPiece("");
194  return StringPiece(v.asCString());
195  }
196 
205  void set_name(const StringPiece& value) {
206  *MutableStorage("name") = value.data();
207  }
208 
214  bool has_project_id() const {
215  return Storage().isMember("projectId");
216  }
217 
222  MutableStorage()->removeMember("projectId");
223  }
224 
225 
229  const StringPiece get_project_id() const {
230  const Json::Value& v = Storage("projectId");
231  if (v == Json::Value::null) return StringPiece("");
232  return StringPiece(v.asCString());
233  }
234 
246  void set_project_id(const StringPiece& value) {
247  *MutableStorage("projectId") = value.data();
248  }
249 
255  bool has_zone() const {
256  return Storage().isMember("zone");
257  }
258 
262  void clear_zone() {
263  MutableStorage()->removeMember("zone");
264  }
265 
266 
270  const StringPiece get_zone() const {
271  const Json::Value& v = Storage("zone");
272  if (v == Json::Value::null) return StringPiece("");
273  return StringPiece(v.asCString());
274  }
275 
288  void set_zone(const StringPiece& value) {
289  *MutableStorage("zone") = value.data();
290  }
291 
292  private:
293  void operator=(const SetLocationsRequest&);
294 }; // SetLocationsRequest
295 } // namespace google_container_api
296 #endif // GOOGLE_CONTAINER_API_SET_LOCATIONS_REQUEST_H_
bool has_locations() const
Definition: set_locations_request.h:132
const StringPiece get_name() const
Definition: set_locations_request.h:191
bool has_zone() const
Definition: set_locations_request.h:255
const client::JsonCppArray< string > get_locations() const
Definition: set_locations_request.h:147
void set_cluster_id(const StringPiece &value)
Definition: set_locations_request.h:123
void clear_name()
Definition: set_locations_request.h:183
void clear_zone()
Definition: set_locations_request.h:262
const StringPiece get_cluster_id() const
Definition: set_locations_request.h:107
const StringPiece get_zone() const
Definition: set_locations_request.h:270
bool has_name() const
Definition: set_locations_request.h:176
const StringPiece get_project_id() const
Definition: set_locations_request.h:229
void clear_cluster_id()
Definition: set_locations_request.h:99
bool has_cluster_id() const
Definition: set_locations_request.h:92
void clear_project_id()
Definition: set_locations_request.h:221
client::JsonCppArray< string > mutable_locations()
Definition: set_locations_request.h:166
Definition: accelerator_config.h:39
const StringPiece GetTypeName() const
Definition: set_locations_request.h:83
Definition: accelerator_config.cc:41
void clear_locations()
Definition: set_locations_request.h:139
bool has_project_id() const
Definition: set_locations_request.h:214
void set_project_id(const StringPiece &value)
Definition: set_locations_request.h:246
Definition: set_locations_request.h:50
void set_name(const StringPiece &value)
Definition: set_locations_request.h:205
void set_zone(const StringPiece &value)
Definition: set_locations_request.h:288