compute  v1
target_pool.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_TARGET_POOL_H_
31 #define GOOGLE_COMPUTE_API_TARGET_POOL_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_compute_api {
44 using namespace googleapis;
45 
53 class TargetPool : public client::JsonCppData {
54  public:
60  static TargetPool* New();
61 
67  explicit TargetPool(const Json::Value& storage);
68 
74  explicit TargetPool(Json::Value* storage);
75 
79  virtual ~TargetPool();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_compute_api::TargetPool");
88  }
89 
95  bool has_backup_pool() const {
96  return Storage().isMember("backupPool");
97  }
98 
103  MutableStorage()->removeMember("backupPool");
104  }
105 
106 
110  const StringPiece get_backup_pool() const {
111  const Json::Value& v = Storage("backupPool");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
136  void set_backup_pool(const StringPiece& value) {
137  *MutableStorage("backupPool") = value.data();
138  }
139 
145  bool has_creation_timestamp() const {
146  return Storage().isMember("creationTimestamp");
147  }
148 
153  MutableStorage()->removeMember("creationTimestamp");
154  }
155 
156 
160  const StringPiece get_creation_timestamp() const {
161  const Json::Value& v = Storage("creationTimestamp");
162  if (v == Json::Value::null) return StringPiece("");
163  return StringPiece(v.asCString());
164  }
165 
173  void set_creation_timestamp(const StringPiece& value) {
174  *MutableStorage("creationTimestamp") = value.data();
175  }
176 
182  bool has_description() const {
183  return Storage().isMember("description");
184  }
185 
190  MutableStorage()->removeMember("description");
191  }
192 
193 
197  const StringPiece get_description() const {
198  const Json::Value& v = Storage("description");
199  if (v == Json::Value::null) return StringPiece("");
200  return StringPiece(v.asCString());
201  }
202 
211  void set_description(const StringPiece& value) {
212  *MutableStorage("description") = value.data();
213  }
214 
220  bool has_failover_ratio() const {
221  return Storage().isMember("failoverRatio");
222  }
223 
228  MutableStorage()->removeMember("failoverRatio");
229  }
230 
231 
235  float get_failover_ratio() const {
236  const Json::Value& storage = Storage("failoverRatio");
237  return client::JsonValueToCppValueHelper<float >(storage);
238  }
239 
259  void set_failover_ratio(float value) {
260  client::SetJsonValueFromCppValueHelper<float >(
261  value, MutableStorage("failoverRatio"));
262  }
263 
269  bool has_health_checks() const {
270  return Storage().isMember("healthChecks");
271  }
272 
277  MutableStorage()->removeMember("healthChecks");
278  }
279 
280 
284  const client::JsonCppArray<string > get_health_checks() const {
285  const Json::Value& storage = Storage("healthChecks");
286  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
287  }
288 
300  client::JsonCppArray<string > mutable_healthChecks() {
301  Json::Value* storage = MutableStorage("healthChecks");
302  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
303  }
304 
310  bool has_id() const {
311  return Storage().isMember("id");
312  }
313 
317  void clear_id() {
318  MutableStorage()->removeMember("id");
319  }
320 
321 
325  uint64 get_id() const {
326  const Json::Value& storage = Storage("id");
327  return client::JsonValueToCppValueHelper<uint64 >(storage);
328  }
329 
338  void set_id(uint64 value) {
339  client::SetJsonValueFromCppValueHelper<uint64 >(
340  value, MutableStorage("id"));
341  }
342 
348  bool has_instances() const {
349  return Storage().isMember("instances");
350  }
351 
356  MutableStorage()->removeMember("instances");
357  }
358 
359 
363  const client::JsonCppArray<string > get_instances() const {
364  const Json::Value& storage = Storage("instances");
365  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
366  }
367 
377  client::JsonCppArray<string > mutable_instances() {
378  Json::Value* storage = MutableStorage("instances");
379  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
380  }
381 
387  bool has_kind() const {
388  return Storage().isMember("kind");
389  }
390 
394  void clear_kind() {
395  MutableStorage()->removeMember("kind");
396  }
397 
398 
402  const StringPiece get_kind() const {
403  const Json::Value& v = Storage("kind");
404  if (v == Json::Value::null) return StringPiece("");
405  return StringPiece(v.asCString());
406  }
407 
416  void set_kind(const StringPiece& value) {
417  *MutableStorage("kind") = value.data();
418  }
419 
425  bool has_name() const {
426  return Storage().isMember("name");
427  }
428 
432  void clear_name() {
433  MutableStorage()->removeMember("name");
434  }
435 
436 
440  const StringPiece get_name() const {
441  const Json::Value& v = Storage("name");
442  if (v == Json::Value::null) return StringPiece("");
443  return StringPiece(v.asCString());
444  }
445 
459  void set_name(const StringPiece& value) {
460  *MutableStorage("name") = value.data();
461  }
462 
468  bool has_region() const {
469  return Storage().isMember("region");
470  }
471 
475  void clear_region() {
476  MutableStorage()->removeMember("region");
477  }
478 
479 
483  const StringPiece get_region() const {
484  const Json::Value& v = Storage("region");
485  if (v == Json::Value::null) return StringPiece("");
486  return StringPiece(v.asCString());
487  }
488 
496  void set_region(const StringPiece& value) {
497  *MutableStorage("region") = value.data();
498  }
499 
505  bool has_self_link() const {
506  return Storage().isMember("selfLink");
507  }
508 
513  MutableStorage()->removeMember("selfLink");
514  }
515 
516 
520  const StringPiece get_self_link() const {
521  const Json::Value& v = Storage("selfLink");
522  if (v == Json::Value::null) return StringPiece("");
523  return StringPiece(v.asCString());
524  }
525 
533  void set_self_link(const StringPiece& value) {
534  *MutableStorage("selfLink") = value.data();
535  }
536 
542  bool has_session_affinity() const {
543  return Storage().isMember("sessionAffinity");
544  }
545 
550  MutableStorage()->removeMember("sessionAffinity");
551  }
552 
553 
557  const StringPiece get_session_affinity() const {
558  const Json::Value& v = Storage("sessionAffinity");
559  if (v == Json::Value::null) return StringPiece("");
560  return StringPiece(v.asCString());
561  }
562 
581  void set_session_affinity(const StringPiece& value) {
582  *MutableStorage("sessionAffinity") = value.data();
583  }
584 
585  private:
586  void operator=(const TargetPool&);
587 }; // TargetPool
588 } // namespace google_compute_api
589 #endif // GOOGLE_COMPUTE_API_TARGET_POOL_H_
bool has_id() const
Definition: target_pool.h:310
void set_self_link(const StringPiece &value)
Definition: target_pool.h:533
client::JsonCppArray< string > mutable_instances()
Definition: target_pool.h:377
void clear_description()
Definition: target_pool.h:189
void clear_id()
Definition: target_pool.h:317
const StringPiece GetTypeName() const
Definition: target_pool.h:86
Definition: target_pool.h:53
void clear_self_link()
Definition: target_pool.h:512
void set_region(const StringPiece &value)
Definition: target_pool.h:496
const StringPiece get_name() const
Definition: target_pool.h:440
bool has_creation_timestamp() const
Definition: target_pool.h:145
bool has_health_checks() const
Definition: target_pool.h:269
void clear_kind()
Definition: target_pool.h:394
bool has_backup_pool() const
Definition: target_pool.h:95
void set_failover_ratio(float value)
Definition: target_pool.h:259
float get_failover_ratio() const
Definition: target_pool.h:235
const StringPiece get_creation_timestamp() const
Definition: target_pool.h:160
void clear_failover_ratio()
Definition: target_pool.h:227
void clear_session_affinity()
Definition: target_pool.h:549
bool has_region() const
Definition: target_pool.h:468
bool has_name() const
Definition: target_pool.h:425
void set_name(const StringPiece &value)
Definition: target_pool.h:459
Definition: accelerator_config.h:39
const StringPiece get_kind() const
Definition: target_pool.h:402
const client::JsonCppArray< string > get_health_checks() const
Definition: target_pool.h:284
bool has_kind() const
Definition: target_pool.h:387
void clear_backup_pool()
Definition: target_pool.h:102
client::JsonCppArray< string > mutable_healthChecks()
Definition: target_pool.h:300
Definition: accelerator_config.cc:41
void clear_health_checks()
Definition: target_pool.h:276
void set_backup_pool(const StringPiece &value)
Definition: target_pool.h:136
void set_kind(const StringPiece &value)
Definition: target_pool.h:416
const StringPiece get_region() const
Definition: target_pool.h:483
bool has_session_affinity() const
Definition: target_pool.h:542
void set_id(uint64 value)
Definition: target_pool.h:338
void clear_instances()
Definition: target_pool.h:355
bool has_instances() const
Definition: target_pool.h:348
bool has_description() const
Definition: target_pool.h:182
const StringPiece get_self_link() const
Definition: target_pool.h:520
void set_creation_timestamp(const StringPiece &value)
Definition: target_pool.h:173
const client::JsonCppArray< string > get_instances() const
Definition: target_pool.h:363
bool has_failover_ratio() const
Definition: target_pool.h:220
void set_description(const StringPiece &value)
Definition: target_pool.h:211
void clear_creation_timestamp()
Definition: target_pool.h:152
void clear_name()
Definition: target_pool.h:432
const StringPiece get_backup_pool() const
Definition: target_pool.h:110
void set_session_affinity(const StringPiece &value)
Definition: target_pool.h:581
const StringPiece get_session_affinity() const
Definition: target_pool.h:557
uint64 get_id() const
Definition: target_pool.h:325
void clear_region()
Definition: target_pool.h:475
bool has_self_link() const
Definition: target_pool.h:505
const StringPiece get_description() const
Definition: target_pool.h:197