compute  v1
node_template.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: 2019-05-15, 03:08:54 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Compute Engine API (compute/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 214
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_NODE_TEMPLATE_H_
31 #define GOOGLE_COMPUTE_API_NODE_TEMPLATE_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/compute_api/node_template_node_type_flexibility.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_compute_api {
46 using namespace googleapis;
47 
55 class NodeTemplate : public client::JsonCppData {
56  public:
62  static NodeTemplate* New();
63 
69  explicit NodeTemplate(const Json::Value& storage);
70 
76  explicit NodeTemplate(Json::Value* storage);
77 
81  virtual ~NodeTemplate();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_compute_api::NodeTemplate");
90  }
91 
97  bool has_creation_timestamp() const {
98  return Storage().isMember("creationTimestamp");
99  }
100 
105  MutableStorage()->removeMember("creationTimestamp");
106  }
107 
108 
112  const StringPiece get_creation_timestamp() const {
113  const Json::Value& v = Storage("creationTimestamp");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
125  void set_creation_timestamp(const StringPiece& value) {
126  *MutableStorage("creationTimestamp") = value.data();
127  }
128 
134  bool has_description() const {
135  return Storage().isMember("description");
136  }
137 
142  MutableStorage()->removeMember("description");
143  }
144 
145 
149  const StringPiece get_description() const {
150  const Json::Value& v = Storage("description");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
163  void set_description(const StringPiece& value) {
164  *MutableStorage("description") = value.data();
165  }
166 
172  bool has_id() const {
173  return Storage().isMember("id");
174  }
175 
179  void clear_id() {
180  MutableStorage()->removeMember("id");
181  }
182 
183 
187  uint64 get_id() const {
188  const Json::Value& storage = Storage("id");
189  return client::JsonValueToCppValueHelper<uint64 >(storage);
190  }
191 
200  void set_id(uint64 value) {
201  client::SetJsonValueFromCppValueHelper<uint64 >(
202  value, MutableStorage("id"));
203  }
204 
210  bool has_kind() const {
211  return Storage().isMember("kind");
212  }
213 
217  void clear_kind() {
218  MutableStorage()->removeMember("kind");
219  }
220 
221 
225  const StringPiece get_kind() const {
226  const Json::Value& v = Storage("kind");
227  if (v == Json::Value::null) return StringPiece("");
228  return StringPiece(v.asCString());
229  }
230 
239  void set_kind(const StringPiece& value) {
240  *MutableStorage("kind") = value.data();
241  }
242 
248  bool has_name() const {
249  return Storage().isMember("name");
250  }
251 
255  void clear_name() {
256  MutableStorage()->removeMember("name");
257  }
258 
259 
263  const StringPiece get_name() const {
264  const Json::Value& v = Storage("name");
265  if (v == Json::Value::null) return StringPiece("");
266  return StringPiece(v.asCString());
267  }
268 
282  void set_name(const StringPiece& value) {
283  *MutableStorage("name") = value.data();
284  }
285 
292  return Storage().isMember("nodeAffinityLabels");
293  }
294 
299  MutableStorage()->removeMember("nodeAffinityLabels");
300  }
301 
302 
307  const client::JsonCppAssociativeArray<string > get_node_affinity_labels() const {
308  const Json::Value& storage = Storage("nodeAffinityLabels");
309  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
310  }
311 
320  client::JsonCppAssociativeArray<string > mutable_nodeAffinityLabels() {
321  Json::Value* storage = MutableStorage("nodeAffinityLabels");
322  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
323  }
324 
330  bool has_node_type() const {
331  return Storage().isMember("nodeType");
332  }
333 
338  MutableStorage()->removeMember("nodeType");
339  }
340 
341 
345  const StringPiece get_node_type() const {
346  const Json::Value& v = Storage("nodeType");
347  if (v == Json::Value::null) return StringPiece("");
348  return StringPiece(v.asCString());
349  }
350 
358  void set_node_type(const StringPiece& value) {
359  *MutableStorage("nodeType") = value.data();
360  }
361 
368  return Storage().isMember("nodeTypeFlexibility");
369  }
370 
375  MutableStorage()->removeMember("nodeTypeFlexibility");
376  }
377 
378 
383  const NodeTemplateNodeTypeFlexibility get_node_type_flexibility() const;
384 
397  NodeTemplateNodeTypeFlexibility mutable_nodeTypeFlexibility();
398 
404  bool has_region() const {
405  return Storage().isMember("region");
406  }
407 
411  void clear_region() {
412  MutableStorage()->removeMember("region");
413  }
414 
415 
419  const StringPiece get_region() const {
420  const Json::Value& v = Storage("region");
421  if (v == Json::Value::null) return StringPiece("");
422  return StringPiece(v.asCString());
423  }
424 
433  void set_region(const StringPiece& value) {
434  *MutableStorage("region") = value.data();
435  }
436 
442  bool has_self_link() const {
443  return Storage().isMember("selfLink");
444  }
445 
450  MutableStorage()->removeMember("selfLink");
451  }
452 
453 
457  const StringPiece get_self_link() const {
458  const Json::Value& v = Storage("selfLink");
459  if (v == Json::Value::null) return StringPiece("");
460  return StringPiece(v.asCString());
461  }
462 
470  void set_self_link(const StringPiece& value) {
471  *MutableStorage("selfLink") = value.data();
472  }
473 
479  bool has_status() const {
480  return Storage().isMember("status");
481  }
482 
486  void clear_status() {
487  MutableStorage()->removeMember("status");
488  }
489 
490 
494  const StringPiece get_status() const {
495  const Json::Value& v = Storage("status");
496  if (v == Json::Value::null) return StringPiece("");
497  return StringPiece(v.asCString());
498  }
499 
508  void set_status(const StringPiece& value) {
509  *MutableStorage("status") = value.data();
510  }
511 
517  bool has_status_message() const {
518  return Storage().isMember("statusMessage");
519  }
520 
525  MutableStorage()->removeMember("statusMessage");
526  }
527 
528 
532  const StringPiece get_status_message() const {
533  const Json::Value& v = Storage("statusMessage");
534  if (v == Json::Value::null) return StringPiece("");
535  return StringPiece(v.asCString());
536  }
537 
545  void set_status_message(const StringPiece& value) {
546  *MutableStorage("statusMessage") = value.data();
547  }
548 
549  private:
550  void operator=(const NodeTemplate&);
551 }; // NodeTemplate
552 } // namespace google_compute_api
553 #endif // GOOGLE_COMPUTE_API_NODE_TEMPLATE_H_
void set_region(const StringPiece &value)
Definition: node_template.h:433
Definition: node_template_node_type_flexibility.h:50
void clear_kind()
Definition: node_template.h:217
const client::JsonCppAssociativeArray< string > get_node_affinity_labels() const
Definition: node_template.h:307
void clear_id()
Definition: node_template.h:179
bool has_status() const
Definition: node_template.h:479
bool has_id() const
Definition: node_template.h:172
const StringPiece get_description() const
Definition: node_template.h:149
void set_creation_timestamp(const StringPiece &value)
Definition: node_template.h:125
const StringPiece get_status_message() const
Definition: node_template.h:532
void clear_creation_timestamp()
Definition: node_template.h:104
void set_status(const StringPiece &value)
Definition: node_template.h:508
client::JsonCppAssociativeArray< string > mutable_nodeAffinityLabels()
Definition: node_template.h:320
Definition: node_template.h:55
uint64 get_id() const
Definition: node_template.h:187
void set_node_type(const StringPiece &value)
Definition: node_template.h:358
const StringPiece get_node_type() const
Definition: node_template.h:345
const StringPiece get_creation_timestamp() const
Definition: node_template.h:112
bool has_creation_timestamp() const
Definition: node_template.h:97
bool has_status_message() const
Definition: node_template.h:517
void clear_region()
Definition: node_template.h:411
const StringPiece get_region() const
Definition: node_template.h:419
bool has_node_type_flexibility() const
Definition: node_template.h:367
const StringPiece get_status() const
Definition: node_template.h:494
void set_id(uint64 value)
Definition: node_template.h:200
void clear_status_message()
Definition: node_template.h:524
void set_description(const StringPiece &value)
Definition: node_template.h:163
void clear_name()
Definition: node_template.h:255
const StringPiece get_self_link() const
Definition: node_template.h:457
bool has_kind() const
Definition: node_template.h:210
bool has_node_affinity_labels() const
Definition: node_template.h:291
const StringPiece GetTypeName() const
Definition: node_template.h:88
void clear_node_affinity_labels()
Definition: node_template.h:298
Definition: accelerator_config.h:39
const StringPiece get_kind() const
Definition: node_template.h:225
void set_name(const StringPiece &value)
Definition: node_template.h:282
Definition: accelerator_config.cc:41
bool has_name() const
Definition: node_template.h:248
void clear_self_link()
Definition: node_template.h:449
bool has_node_type() const
Definition: node_template.h:330
void set_self_link(const StringPiece &value)
Definition: node_template.h:470
void clear_node_type_flexibility()
Definition: node_template.h:374
void set_status_message(const StringPiece &value)
Definition: node_template.h:545
void set_kind(const StringPiece &value)
Definition: node_template.h:239
bool has_description() const
Definition: node_template.h:134
void clear_description()
Definition: node_template.h:141
bool has_region() const
Definition: node_template.h:404
void clear_node_type()
Definition: node_template.h:337
bool has_self_link() const
Definition: node_template.h:442
const StringPiece get_name() const
Definition: node_template.h:263
void clear_status()
Definition: node_template.h:486