compute  v1
attached_disk.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_ATTACHED_DISK_H_
31 #define GOOGLE_COMPUTE_API_ATTACHED_DISK_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/attached_disk_initialize_params.h"
40 #include "google/compute_api/customer_encryption_key.h"
41 #include "google/compute_api/guest_os_feature.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_compute_api {
48 using namespace googleapis;
49 
55 class AttachedDisk : public client::JsonCppData {
56  public:
62  static AttachedDisk* New();
63 
69  explicit AttachedDisk(const Json::Value& storage);
70 
76  explicit AttachedDisk(Json::Value* storage);
77 
81  virtual ~AttachedDisk();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_compute_api::AttachedDisk");
90  }
91 
97  bool has_auto_delete() const {
98  return Storage().isMember("autoDelete");
99  }
100 
105  MutableStorage()->removeMember("autoDelete");
106  }
107 
108 
112  bool get_auto_delete() const {
113  const Json::Value& storage = Storage("autoDelete");
114  return client::JsonValueToCppValueHelper<bool >(storage);
115  }
116 
125  void set_auto_delete(bool value) {
126  client::SetJsonValueFromCppValueHelper<bool >(
127  value, MutableStorage("autoDelete"));
128  }
129 
135  bool has_boot() const {
136  return Storage().isMember("boot");
137  }
138 
142  void clear_boot() {
143  MutableStorage()->removeMember("boot");
144  }
145 
146 
150  bool get_boot() const {
151  const Json::Value& storage = Storage("boot");
152  return client::JsonValueToCppValueHelper<bool >(storage);
153  }
154 
163  void set_boot(bool value) {
164  client::SetJsonValueFromCppValueHelper<bool >(
165  value, MutableStorage("boot"));
166  }
167 
173  bool has_device_name() const {
174  return Storage().isMember("deviceName");
175  }
176 
181  MutableStorage()->removeMember("deviceName");
182  }
183 
184 
188  const StringPiece get_device_name() const {
189  const Json::Value& v = Storage("deviceName");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
208  void set_device_name(const StringPiece& value) {
209  *MutableStorage("deviceName") = value.data();
210  }
211 
217  bool has_disk_encryption_key() const {
218  return Storage().isMember("diskEncryptionKey");
219  }
220 
225  MutableStorage()->removeMember("diskEncryptionKey");
226  }
227 
228 
233  const CustomerEncryptionKey get_disk_encryption_key() const;
234 
260  CustomerEncryptionKey mutable_diskEncryptionKey();
261 
267  bool has_guest_os_features() const {
268  return Storage().isMember("guestOsFeatures");
269  }
270 
275  MutableStorage()->removeMember("guestOsFeatures");
276  }
277 
278 
283  const client::JsonCppArray<GuestOsFeature > get_guest_os_features() const;
284 
295  client::JsonCppArray<GuestOsFeature > mutable_guestOsFeatures();
296 
302  bool has_index() const {
303  return Storage().isMember("index");
304  }
305 
309  void clear_index() {
310  MutableStorage()->removeMember("index");
311  }
312 
313 
317  int32 get_index() const {
318  const Json::Value& storage = Storage("index");
319  return client::JsonValueToCppValueHelper<int32 >(storage);
320  }
321 
331  void set_index(int32 value) {
332  client::SetJsonValueFromCppValueHelper<int32 >(
333  value, MutableStorage("index"));
334  }
335 
341  bool has_initialize_params() const {
342  return Storage().isMember("initializeParams");
343  }
344 
349  MutableStorage()->removeMember("initializeParams");
350  }
351 
352 
357  const AttachedDiskInitializeParams get_initialize_params() const;
358 
372  AttachedDiskInitializeParams mutable_initializeParams();
373 
379  bool has_interface() const {
380  return Storage().isMember("interface");
381  }
382 
387  MutableStorage()->removeMember("interface");
388  }
389 
390 
394  const StringPiece get_interface() const {
395  const Json::Value& v = Storage("interface");
396  if (v == Json::Value::null) return StringPiece("");
397  return StringPiece(v.asCString());
398  }
399 
411  void set_interface(const StringPiece& value) {
412  *MutableStorage("interface") = value.data();
413  }
414 
420  bool has_kind() const {
421  return Storage().isMember("kind");
422  }
423 
427  void clear_kind() {
428  MutableStorage()->removeMember("kind");
429  }
430 
431 
435  const StringPiece get_kind() const {
436  const Json::Value& v = Storage("kind");
437  if (v == Json::Value::null) return StringPiece("");
438  return StringPiece(v.asCString());
439  }
440 
449  void set_kind(const StringPiece& value) {
450  *MutableStorage("kind") = value.data();
451  }
452 
458  bool has_licenses() const {
459  return Storage().isMember("licenses");
460  }
461 
465  void clear_licenses() {
466  MutableStorage()->removeMember("licenses");
467  }
468 
469 
473  const client::JsonCppArray<string > get_licenses() const {
474  const Json::Value& storage = Storage("licenses");
475  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
476  }
477 
486  client::JsonCppArray<string > mutable_licenses() {
487  Json::Value* storage = MutableStorage("licenses");
488  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
489  }
490 
496  bool has_mode() const {
497  return Storage().isMember("mode");
498  }
499 
503  void clear_mode() {
504  MutableStorage()->removeMember("mode");
505  }
506 
507 
511  const StringPiece get_mode() const {
512  const Json::Value& v = Storage("mode");
513  if (v == Json::Value::null) return StringPiece("");
514  return StringPiece(v.asCString());
515  }
516 
525  void set_mode(const StringPiece& value) {
526  *MutableStorage("mode") = value.data();
527  }
528 
534  bool has_source() const {
535  return Storage().isMember("source");
536  }
537 
541  void clear_source() {
542  MutableStorage()->removeMember("source");
543  }
544 
545 
549  const StringPiece get_source() const {
550  const Json::Value& v = Storage("source");
551  if (v == Json::Value::null) return StringPiece("");
552  return StringPiece(v.asCString());
553  }
554 
570  void set_source(const StringPiece& value) {
571  *MutableStorage("source") = value.data();
572  }
573 
579  bool has_type() const {
580  return Storage().isMember("type");
581  }
582 
586  void clear_type() {
587  MutableStorage()->removeMember("type");
588  }
589 
590 
594  const StringPiece get_type() const {
595  const Json::Value& v = Storage("type");
596  if (v == Json::Value::null) return StringPiece("");
597  return StringPiece(v.asCString());
598  }
599 
608  void set_type(const StringPiece& value) {
609  *MutableStorage("type") = value.data();
610  }
611 
612  private:
613  void operator=(const AttachedDisk&);
614 }; // AttachedDisk
615 } // namespace google_compute_api
616 #endif // GOOGLE_COMPUTE_API_ATTACHED_DISK_H_
bool has_mode() const
Definition: attached_disk.h:496
bool has_index() const
Definition: attached_disk.h:302
Definition: attached_disk_initialize_params.h:58
void clear_licenses()
Definition: attached_disk.h:465
const StringPiece get_device_name() const
Definition: attached_disk.h:188
const StringPiece get_kind() const
Definition: attached_disk.h:435
bool get_boot() const
Definition: attached_disk.h:150
void clear_source()
Definition: attached_disk.h:541
bool has_interface() const
Definition: attached_disk.h:379
bool has_guest_os_features() const
Definition: attached_disk.h:267
void clear_kind()
Definition: attached_disk.h:427
const client::JsonCppArray< string > get_licenses() const
Definition: attached_disk.h:473
bool has_initialize_params() const
Definition: attached_disk.h:341
void set_boot(bool value)
Definition: attached_disk.h:163
void set_index(int32 value)
Definition: attached_disk.h:331
int32 get_index() const
Definition: attached_disk.h:317
const StringPiece get_source() const
Definition: attached_disk.h:549
void set_auto_delete(bool value)
Definition: attached_disk.h:125
void clear_guest_os_features()
Definition: attached_disk.h:274
const StringPiece get_type() const
Definition: attached_disk.h:594
Definition: customer_encryption_key.h:50
const StringPiece GetTypeName() const
Definition: attached_disk.h:88
void set_device_name(const StringPiece &value)
Definition: attached_disk.h:208
const StringPiece get_interface() const
Definition: attached_disk.h:394
bool has_disk_encryption_key() const
Definition: attached_disk.h:217
bool has_boot() const
Definition: attached_disk.h:135
void clear_mode()
Definition: attached_disk.h:503
void set_type(const StringPiece &value)
Definition: attached_disk.h:608
bool has_type() const
Definition: attached_disk.h:579
bool has_licenses() const
Definition: attached_disk.h:458
void clear_auto_delete()
Definition: attached_disk.h:104
bool has_source() const
Definition: attached_disk.h:534
Definition: accelerator_config.h:39
bool has_kind() const
Definition: attached_disk.h:420
void set_interface(const StringPiece &value)
Definition: attached_disk.h:411
void clear_index()
Definition: attached_disk.h:309
void clear_initialize_params()
Definition: attached_disk.h:348
Definition: accelerator_config.cc:41
void set_mode(const StringPiece &value)
Definition: attached_disk.h:525
void set_kind(const StringPiece &value)
Definition: attached_disk.h:449
bool has_auto_delete() const
Definition: attached_disk.h:97
void clear_boot()
Definition: attached_disk.h:142
Definition: attached_disk.h:55
client::JsonCppArray< string > mutable_licenses()
Definition: attached_disk.h:486
bool get_auto_delete() const
Definition: attached_disk.h:112
const StringPiece get_mode() const
Definition: attached_disk.h:511
bool has_device_name() const
Definition: attached_disk.h:173
void clear_type()
Definition: attached_disk.h:586
void set_source(const StringPiece &value)
Definition: attached_disk.h:570
void clear_interface()
Definition: attached_disk.h:386
void clear_disk_encryption_key()
Definition: attached_disk.h:224
void clear_device_name()
Definition: attached_disk.h:180