container  v1
set_labels_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_LABELS_REQUEST_H_
31 #define GOOGLE_CONTAINER_API_SET_LABELS_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 
52 class SetLabelsRequest : public client::JsonCppData {
53  public:
59  static SetLabelsRequest* New();
60 
66  explicit SetLabelsRequest(const Json::Value& storage);
67 
73  explicit SetLabelsRequest(Json::Value* storage);
74 
78  virtual ~SetLabelsRequest();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_container_api::SetLabelsRequest");
87  }
88 
94  bool has_cluster_id() const {
95  return Storage().isMember("clusterId");
96  }
97 
102  MutableStorage()->removeMember("clusterId");
103  }
104 
105 
109  const StringPiece get_cluster_id() const {
110  const Json::Value& v = Storage("clusterId");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
125  void set_cluster_id(const StringPiece& value) {
126  *MutableStorage("clusterId") = value.data();
127  }
128 
134  bool has_label_fingerprint() const {
135  return Storage().isMember("labelFingerprint");
136  }
137 
142  MutableStorage()->removeMember("labelFingerprint");
143  }
144 
145 
149  const StringPiece get_label_fingerprint() const {
150  const Json::Value& v = Storage("labelFingerprint");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
167  void set_label_fingerprint(const StringPiece& value) {
168  *MutableStorage("labelFingerprint") = value.data();
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_resource_labels() const {
256  return Storage().isMember("resourceLabels");
257  }
258 
263  MutableStorage()->removeMember("resourceLabels");
264  }
265 
266 
271  const client::JsonCppAssociativeArray<string > get_resource_labels() const {
272  const Json::Value& storage = Storage("resourceLabels");
273  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
274  }
275 
284  client::JsonCppAssociativeArray<string > mutable_resourceLabels() {
285  Json::Value* storage = MutableStorage("resourceLabels");
286  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
287  }
288 
294  bool has_zone() const {
295  return Storage().isMember("zone");
296  }
297 
301  void clear_zone() {
302  MutableStorage()->removeMember("zone");
303  }
304 
305 
309  const StringPiece get_zone() const {
310  const Json::Value& v = Storage("zone");
311  if (v == Json::Value::null) return StringPiece("");
312  return StringPiece(v.asCString());
313  }
314 
327  void set_zone(const StringPiece& value) {
328  *MutableStorage("zone") = value.data();
329  }
330 
331  private:
332  void operator=(const SetLabelsRequest&);
333 }; // SetLabelsRequest
334 } // namespace google_container_api
335 #endif // GOOGLE_CONTAINER_API_SET_LABELS_REQUEST_H_
void clear_cluster_id()
Definition: set_labels_request.h:101
const StringPiece get_name() const
Definition: set_labels_request.h:191
void set_cluster_id(const StringPiece &value)
Definition: set_labels_request.h:125
void set_zone(const StringPiece &value)
Definition: set_labels_request.h:327
bool has_name() const
Definition: set_labels_request.h:176
void clear_zone()
Definition: set_labels_request.h:301
const StringPiece get_label_fingerprint() const
Definition: set_labels_request.h:149
void set_name(const StringPiece &value)
Definition: set_labels_request.h:205
void set_project_id(const StringPiece &value)
Definition: set_labels_request.h:246
bool has_zone() const
Definition: set_labels_request.h:294
const StringPiece get_zone() const
Definition: set_labels_request.h:309
void clear_label_fingerprint()
Definition: set_labels_request.h:141
const StringPiece GetTypeName() const
Definition: set_labels_request.h:85
bool has_cluster_id() const
Definition: set_labels_request.h:94
Definition: accelerator_config.h:39
bool has_project_id() const
Definition: set_labels_request.h:214
Definition: accelerator_config.cc:41
const client::JsonCppAssociativeArray< string > get_resource_labels() const
Definition: set_labels_request.h:271
void set_label_fingerprint(const StringPiece &value)
Definition: set_labels_request.h:167
void clear_name()
Definition: set_labels_request.h:183
void clear_resource_labels()
Definition: set_labels_request.h:262
void clear_project_id()
Definition: set_labels_request.h:221
bool has_resource_labels() const
Definition: set_labels_request.h:255
const StringPiece get_project_id() const
Definition: set_labels_request.h:229
client::JsonCppAssociativeArray< string > mutable_resourceLabels()
Definition: set_labels_request.h:284
Definition: set_labels_request.h:52
bool has_label_fingerprint() const
Definition: set_labels_request.h:134
const StringPiece get_cluster_id() const
Definition: set_labels_request.h:109