compute  v1
autoscaler.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-04-20, 05:56:52 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: 213
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_AUTOSCALER_H_
31 #define GOOGLE_COMPUTE_API_AUTOSCALER_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/autoscaler_status_details.h"
40 #include "google/compute_api/autoscaling_policy.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_compute_api {
47 using namespace googleapis;
48 
59 class Autoscaler : public client::JsonCppData {
60  public:
66  static Autoscaler* New();
67 
73  explicit Autoscaler(const Json::Value& storage);
74 
80  explicit Autoscaler(Json::Value* storage);
81 
85  virtual ~Autoscaler();
86 
92  const StringPiece GetTypeName() const {
93  return StringPiece("google_compute_api::Autoscaler");
94  }
95 
101  bool has_autoscaling_policy() const {
102  return Storage().isMember("autoscalingPolicy");
103  }
104 
109  MutableStorage()->removeMember("autoscalingPolicy");
110  }
111 
112 
117  const AutoscalingPolicy get_autoscaling_policy() const;
118 
132  AutoscalingPolicy mutable_autoscalingPolicy();
133 
139  bool has_creation_timestamp() const {
140  return Storage().isMember("creationTimestamp");
141  }
142 
147  MutableStorage()->removeMember("creationTimestamp");
148  }
149 
150 
154  const StringPiece get_creation_timestamp() const {
155  const Json::Value& v = Storage("creationTimestamp");
156  if (v == Json::Value::null) return StringPiece("");
157  return StringPiece(v.asCString());
158  }
159 
167  void set_creation_timestamp(const StringPiece& value) {
168  *MutableStorage("creationTimestamp") = value.data();
169  }
170 
176  bool has_description() const {
177  return Storage().isMember("description");
178  }
179 
184  MutableStorage()->removeMember("description");
185  }
186 
187 
191  const StringPiece get_description() const {
192  const Json::Value& v = Storage("description");
193  if (v == Json::Value::null) return StringPiece("");
194  return StringPiece(v.asCString());
195  }
196 
205  void set_description(const StringPiece& value) {
206  *MutableStorage("description") = value.data();
207  }
208 
214  bool has_id() const {
215  return Storage().isMember("id");
216  }
217 
221  void clear_id() {
222  MutableStorage()->removeMember("id");
223  }
224 
225 
229  uint64 get_id() const {
230  const Json::Value& storage = Storage("id");
231  return client::JsonValueToCppValueHelper<uint64 >(storage);
232  }
233 
242  void set_id(uint64 value) {
243  client::SetJsonValueFromCppValueHelper<uint64 >(
244  value, MutableStorage("id"));
245  }
246 
252  bool has_kind() const {
253  return Storage().isMember("kind");
254  }
255 
259  void clear_kind() {
260  MutableStorage()->removeMember("kind");
261  }
262 
263 
267  const StringPiece get_kind() const {
268  const Json::Value& v = Storage("kind");
269  if (v == Json::Value::null) return StringPiece("");
270  return StringPiece(v.asCString());
271  }
272 
281  void set_kind(const StringPiece& value) {
282  *MutableStorage("kind") = value.data();
283  }
284 
290  bool has_name() const {
291  return Storage().isMember("name");
292  }
293 
297  void clear_name() {
298  MutableStorage()->removeMember("name");
299  }
300 
301 
305  const StringPiece get_name() const {
306  const Json::Value& v = Storage("name");
307  if (v == Json::Value::null) return StringPiece("");
308  return StringPiece(v.asCString());
309  }
310 
324  void set_name(const StringPiece& value) {
325  *MutableStorage("name") = value.data();
326  }
327 
333  bool has_region() const {
334  return Storage().isMember("region");
335  }
336 
340  void clear_region() {
341  MutableStorage()->removeMember("region");
342  }
343 
344 
348  const StringPiece get_region() const {
349  const Json::Value& v = Storage("region");
350  if (v == Json::Value::null) return StringPiece("");
351  return StringPiece(v.asCString());
352  }
353 
362  void set_region(const StringPiece& value) {
363  *MutableStorage("region") = value.data();
364  }
365 
371  bool has_self_link() const {
372  return Storage().isMember("selfLink");
373  }
374 
379  MutableStorage()->removeMember("selfLink");
380  }
381 
382 
386  const StringPiece get_self_link() const {
387  const Json::Value& v = Storage("selfLink");
388  if (v == Json::Value::null) return StringPiece("");
389  return StringPiece(v.asCString());
390  }
391 
399  void set_self_link(const StringPiece& value) {
400  *MutableStorage("selfLink") = value.data();
401  }
402 
408  bool has_status() const {
409  return Storage().isMember("status");
410  }
411 
415  void clear_status() {
416  MutableStorage()->removeMember("status");
417  }
418 
419 
423  const StringPiece get_status() const {
424  const Json::Value& v = Storage("status");
425  if (v == Json::Value::null) return StringPiece("");
426  return StringPiece(v.asCString());
427  }
428 
436  void set_status(const StringPiece& value) {
437  *MutableStorage("status") = value.data();
438  }
439 
445  bool has_status_details() const {
446  return Storage().isMember("statusDetails");
447  }
448 
453  MutableStorage()->removeMember("statusDetails");
454  }
455 
456 
460  const client::JsonCppArray<AutoscalerStatusDetails > get_status_details() const;
461 
472  client::JsonCppArray<AutoscalerStatusDetails > mutable_statusDetails();
473 
479  bool has_target() const {
480  return Storage().isMember("target");
481  }
482 
486  void clear_target() {
487  MutableStorage()->removeMember("target");
488  }
489 
490 
494  const StringPiece get_target() const {
495  const Json::Value& v = Storage("target");
496  if (v == Json::Value::null) return StringPiece("");
497  return StringPiece(v.asCString());
498  }
499 
507  void set_target(const StringPiece& value) {
508  *MutableStorage("target") = value.data();
509  }
510 
516  bool has_zone() const {
517  return Storage().isMember("zone");
518  }
519 
523  void clear_zone() {
524  MutableStorage()->removeMember("zone");
525  }
526 
527 
531  const StringPiece get_zone() const {
532  const Json::Value& v = Storage("zone");
533  if (v == Json::Value::null) return StringPiece("");
534  return StringPiece(v.asCString());
535  }
536 
545  void set_zone(const StringPiece& value) {
546  *MutableStorage("zone") = value.data();
547  }
548 
549  private:
550  void operator=(const Autoscaler&);
551 }; // Autoscaler
552 } // namespace google_compute_api
553 #endif // GOOGLE_COMPUTE_API_AUTOSCALER_H_
void set_zone(const StringPiece &value)
Definition: autoscaler.h:545
const StringPiece GetTypeName() const
Definition: autoscaler.h:92
void clear_kind()
Definition: autoscaler.h:259
bool has_status() const
Definition: autoscaler.h:408
void set_description(const StringPiece &value)
Definition: autoscaler.h:205
void clear_status_details()
Definition: autoscaler.h:452
Definition: autoscaling_policy.h:54
void clear_id()
Definition: autoscaler.h:221
void set_id(uint64 value)
Definition: autoscaler.h:242
void clear_region()
Definition: autoscaler.h:340
bool has_target() const
Definition: autoscaler.h:479
void set_self_link(const StringPiece &value)
Definition: autoscaler.h:399
const StringPiece get_description() const
Definition: autoscaler.h:191
bool has_region() const
Definition: autoscaler.h:333
bool has_creation_timestamp() const
Definition: autoscaler.h:139
void clear_name()
Definition: autoscaler.h:297
void set_target(const StringPiece &value)
Definition: autoscaler.h:507
const StringPiece get_target() const
Definition: autoscaler.h:494
bool has_description() const
Definition: autoscaler.h:176
const StringPiece get_self_link() const
Definition: autoscaler.h:386
void set_name(const StringPiece &value)
Definition: autoscaler.h:324
void clear_creation_timestamp()
Definition: autoscaler.h:146
void clear_description()
Definition: autoscaler.h:183
void set_kind(const StringPiece &value)
Definition: autoscaler.h:281
void clear_zone()
Definition: autoscaler.h:523
Definition: autoscaler.h:59
const StringPiece get_creation_timestamp() const
Definition: autoscaler.h:154
const StringPiece get_status() const
Definition: autoscaler.h:423
const StringPiece get_region() const
Definition: autoscaler.h:348
uint64 get_id() const
Definition: autoscaler.h:229
bool has_autoscaling_policy() const
Definition: autoscaler.h:101
Definition: accelerator_config.h:39
const StringPiece get_name() const
Definition: autoscaler.h:305
void set_status(const StringPiece &value)
Definition: autoscaler.h:436
bool has_status_details() const
Definition: autoscaler.h:445
bool has_id() const
Definition: autoscaler.h:214
void clear_status()
Definition: autoscaler.h:415
bool has_name() const
Definition: autoscaler.h:290
Definition: accelerator_config.cc:41
void clear_autoscaling_policy()
Definition: autoscaler.h:108
bool has_kind() const
Definition: autoscaler.h:252
void clear_self_link()
Definition: autoscaler.h:378
const StringPiece get_zone() const
Definition: autoscaler.h:531
bool has_zone() const
Definition: autoscaler.h:516
void set_region(const StringPiece &value)
Definition: autoscaler.h:362
void set_creation_timestamp(const StringPiece &value)
Definition: autoscaler.h:167
bool has_self_link() const
Definition: autoscaler.h:371
void clear_target()
Definition: autoscaler.h:486
const StringPiece get_kind() const
Definition: autoscaler.h:267