compute  v1
snapshot.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_SNAPSHOT_H_
31 #define GOOGLE_COMPUTE_API_SNAPSHOT_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/customer_encryption_key.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_compute_api {
46 using namespace googleapis;
47 
54 class Snapshot : public client::JsonCppData {
55  public:
61  static Snapshot* New();
62 
68  explicit Snapshot(const Json::Value& storage);
69 
75  explicit Snapshot(Json::Value* storage);
76 
80  virtual ~Snapshot();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_compute_api::Snapshot");
89  }
90 
96  bool has_creation_timestamp() const {
97  return Storage().isMember("creationTimestamp");
98  }
99 
104  MutableStorage()->removeMember("creationTimestamp");
105  }
106 
107 
111  const StringPiece get_creation_timestamp() const {
112  const Json::Value& v = Storage("creationTimestamp");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
124  void set_creation_timestamp(const StringPiece& value) {
125  *MutableStorage("creationTimestamp") = value.data();
126  }
127 
133  bool has_description() const {
134  return Storage().isMember("description");
135  }
136 
141  MutableStorage()->removeMember("description");
142  }
143 
144 
148  const StringPiece get_description() const {
149  const Json::Value& v = Storage("description");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
162  void set_description(const StringPiece& value) {
163  *MutableStorage("description") = value.data();
164  }
165 
171  bool has_disk_size_gb() const {
172  return Storage().isMember("diskSizeGb");
173  }
174 
179  MutableStorage()->removeMember("diskSizeGb");
180  }
181 
182 
186  int64 get_disk_size_gb() const {
187  const Json::Value& storage = Storage("diskSizeGb");
188  return client::JsonValueToCppValueHelper<int64 >(storage);
189  }
190 
198  void set_disk_size_gb(int64 value) {
199  client::SetJsonValueFromCppValueHelper<int64 >(
200  value, MutableStorage("diskSizeGb"));
201  }
202 
208  bool has_id() const {
209  return Storage().isMember("id");
210  }
211 
215  void clear_id() {
216  MutableStorage()->removeMember("id");
217  }
218 
219 
223  uint64 get_id() const {
224  const Json::Value& storage = Storage("id");
225  return client::JsonValueToCppValueHelper<uint64 >(storage);
226  }
227 
236  void set_id(uint64 value) {
237  client::SetJsonValueFromCppValueHelper<uint64 >(
238  value, MutableStorage("id"));
239  }
240 
246  bool has_kind() const {
247  return Storage().isMember("kind");
248  }
249 
253  void clear_kind() {
254  MutableStorage()->removeMember("kind");
255  }
256 
257 
261  const StringPiece get_kind() const {
262  const Json::Value& v = Storage("kind");
263  if (v == Json::Value::null) return StringPiece("");
264  return StringPiece(v.asCString());
265  }
266 
275  void set_kind(const StringPiece& value) {
276  *MutableStorage("kind") = value.data();
277  }
278 
284  bool has_label_fingerprint() const {
285  return Storage().isMember("labelFingerprint");
286  }
287 
292  MutableStorage()->removeMember("labelFingerprint");
293  }
294 
295 
299  const StringPiece get_label_fingerprint() const {
300  const Json::Value& v = Storage("labelFingerprint");
301  if (v == Json::Value::null) return StringPiece("");
302  return StringPiece(v.asCString());
303  }
304 
319  void set_label_fingerprint(const StringPiece& value) {
320  *MutableStorage("labelFingerprint") = value.data();
321  }
322 
328  bool has_labels() const {
329  return Storage().isMember("labels");
330  }
331 
335  void clear_labels() {
336  MutableStorage()->removeMember("labels");
337  }
338 
339 
343  const client::JsonCppAssociativeArray<string > get_labels() const {
344  const Json::Value& storage = Storage("labels");
345  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
346  }
347 
356  client::JsonCppAssociativeArray<string > mutable_labels() {
357  Json::Value* storage = MutableStorage("labels");
358  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
359  }
360 
366  bool has_license_codes() const {
367  return Storage().isMember("licenseCodes");
368  }
369 
374  MutableStorage()->removeMember("licenseCodes");
375  }
376 
377 
381  const client::JsonCppArray<int64 > get_license_codes() const {
382  const Json::Value& storage = Storage("licenseCodes");
383  return client::JsonValueToCppValueHelper<client::JsonCppArray<int64 > >(storage);
384  }
385 
395  client::JsonCppArray<int64 > mutable_licenseCodes() {
396  Json::Value* storage = MutableStorage("licenseCodes");
397  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<int64 > >(storage);
398  }
399 
405  bool has_licenses() const {
406  return Storage().isMember("licenses");
407  }
408 
412  void clear_licenses() {
413  MutableStorage()->removeMember("licenses");
414  }
415 
416 
420  const client::JsonCppArray<string > get_licenses() const {
421  const Json::Value& storage = Storage("licenses");
422  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
423  }
424 
435  client::JsonCppArray<string > mutable_licenses() {
436  Json::Value* storage = MutableStorage("licenses");
437  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
438  }
439 
445  bool has_name() const {
446  return Storage().isMember("name");
447  }
448 
452  void clear_name() {
453  MutableStorage()->removeMember("name");
454  }
455 
456 
460  const StringPiece get_name() const {
461  const Json::Value& v = Storage("name");
462  if (v == Json::Value::null) return StringPiece("");
463  return StringPiece(v.asCString());
464  }
465 
479  void set_name(const StringPiece& value) {
480  *MutableStorage("name") = value.data();
481  }
482 
488  bool has_self_link() const {
489  return Storage().isMember("selfLink");
490  }
491 
496  MutableStorage()->removeMember("selfLink");
497  }
498 
499 
503  const StringPiece get_self_link() const {
504  const Json::Value& v = Storage("selfLink");
505  if (v == Json::Value::null) return StringPiece("");
506  return StringPiece(v.asCString());
507  }
508 
516  void set_self_link(const StringPiece& value) {
517  *MutableStorage("selfLink") = value.data();
518  }
519 
526  return Storage().isMember("snapshotEncryptionKey");
527  }
528 
533  MutableStorage()->removeMember("snapshotEncryptionKey");
534  }
535 
536 
541  const CustomerEncryptionKey get_snapshot_encryption_key() const;
542 
563  CustomerEncryptionKey mutable_snapshotEncryptionKey();
564 
570  bool has_source_disk() const {
571  return Storage().isMember("sourceDisk");
572  }
573 
578  MutableStorage()->removeMember("sourceDisk");
579  }
580 
581 
585  const StringPiece get_source_disk() const {
586  const Json::Value& v = Storage("sourceDisk");
587  if (v == Json::Value::null) return StringPiece("");
588  return StringPiece(v.asCString());
589  }
590 
598  void set_source_disk(const StringPiece& value) {
599  *MutableStorage("sourceDisk") = value.data();
600  }
601 
609  return Storage().isMember("sourceDiskEncryptionKey");
610  }
611 
616  MutableStorage()->removeMember("sourceDiskEncryptionKey");
617  }
618 
619 
624  const CustomerEncryptionKey get_source_disk_encryption_key() const;
625 
635  CustomerEncryptionKey mutable_sourceDiskEncryptionKey();
636 
642  bool has_source_disk_id() const {
643  return Storage().isMember("sourceDiskId");
644  }
645 
650  MutableStorage()->removeMember("sourceDiskId");
651  }
652 
653 
657  const StringPiece get_source_disk_id() const {
658  const Json::Value& v = Storage("sourceDiskId");
659  if (v == Json::Value::null) return StringPiece("");
660  return StringPiece(v.asCString());
661  }
662 
672  void set_source_disk_id(const StringPiece& value) {
673  *MutableStorage("sourceDiskId") = value.data();
674  }
675 
681  bool has_status() const {
682  return Storage().isMember("status");
683  }
684 
688  void clear_status() {
689  MutableStorage()->removeMember("status");
690  }
691 
692 
696  const StringPiece get_status() const {
697  const Json::Value& v = Storage("status");
698  if (v == Json::Value::null) return StringPiece("");
699  return StringPiece(v.asCString());
700  }
701 
710  void set_status(const StringPiece& value) {
711  *MutableStorage("status") = value.data();
712  }
713 
719  bool has_storage_bytes() const {
720  return Storage().isMember("storageBytes");
721  }
722 
727  MutableStorage()->removeMember("storageBytes");
728  }
729 
730 
734  int64 get_storage_bytes() const {
735  const Json::Value& storage = Storage("storageBytes");
736  return client::JsonValueToCppValueHelper<int64 >(storage);
737  }
738 
748  void set_storage_bytes(int64 value) {
749  client::SetJsonValueFromCppValueHelper<int64 >(
750  value, MutableStorage("storageBytes"));
751  }
752 
759  return Storage().isMember("storageBytesStatus");
760  }
761 
766  MutableStorage()->removeMember("storageBytesStatus");
767  }
768 
769 
773  const StringPiece get_storage_bytes_status() const {
774  const Json::Value& v = Storage("storageBytesStatus");
775  if (v == Json::Value::null) return StringPiece("");
776  return StringPiece(v.asCString());
777  }
778 
789  void set_storage_bytes_status(const StringPiece& value) {
790  *MutableStorage("storageBytesStatus") = value.data();
791  }
792 
798  bool has_storage_locations() const {
799  return Storage().isMember("storageLocations");
800  }
801 
806  MutableStorage()->removeMember("storageLocations");
807  }
808 
809 
814  const client::JsonCppArray<string > get_storage_locations() const {
815  const Json::Value& storage = Storage("storageLocations");
816  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
817  }
818 
827  client::JsonCppArray<string > mutable_storageLocations() {
828  Json::Value* storage = MutableStorage("storageLocations");
829  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
830  }
831 
832  private:
833  void operator=(const Snapshot&);
834 }; // Snapshot
835 } // namespace google_compute_api
836 #endif // GOOGLE_COMPUTE_API_SNAPSHOT_H_
const client::JsonCppArray< string > get_storage_locations() const
Definition: snapshot.h:814
const StringPiece get_label_fingerprint() const
Definition: snapshot.h:299
void clear_source_disk_id()
Definition: snapshot.h:649
const StringPiece get_storage_bytes_status() const
Definition: snapshot.h:773
client::JsonCppArray< string > mutable_licenses()
Definition: snapshot.h:435
const StringPiece get_kind() const
Definition: snapshot.h:261
void clear_license_codes()
Definition: snapshot.h:373
void clear_licenses()
Definition: snapshot.h:412
bool has_name() const
Definition: snapshot.h:445
client::JsonCppArray< int64 > mutable_licenseCodes()
Definition: snapshot.h:395
void set_label_fingerprint(const StringPiece &value)
Definition: snapshot.h:319
void set_kind(const StringPiece &value)
Definition: snapshot.h:275
void clear_description()
Definition: snapshot.h:140
void clear_creation_timestamp()
Definition: snapshot.h:103
void clear_status()
Definition: snapshot.h:688
bool has_storage_bytes_status() const
Definition: snapshot.h:758
const StringPiece GetTypeName() const
Definition: snapshot.h:87
void clear_labels()
Definition: snapshot.h:335
bool has_licenses() const
Definition: snapshot.h:405
Definition: snapshot.h:54
void clear_storage_bytes()
Definition: snapshot.h:726
bool has_labels() const
Definition: snapshot.h:328
bool has_license_codes() const
Definition: snapshot.h:366
void clear_source_disk_encryption_key()
Definition: snapshot.h:615
int64 get_disk_size_gb() const
Definition: snapshot.h:186
const StringPiece get_source_disk() const
Definition: snapshot.h:585
void clear_storage_bytes_status()
Definition: snapshot.h:765
void set_source_disk_id(const StringPiece &value)
Definition: snapshot.h:672
const client::JsonCppAssociativeArray< string > get_labels() const
Definition: snapshot.h:343
Definition: customer_encryption_key.h:50
void set_creation_timestamp(const StringPiece &value)
Definition: snapshot.h:124
void clear_name()
Definition: snapshot.h:452
const StringPiece get_name() const
Definition: snapshot.h:460
const client::JsonCppArray< int64 > get_license_codes() const
Definition: snapshot.h:381
bool has_description() const
Definition: snapshot.h:133
void set_source_disk(const StringPiece &value)
Definition: snapshot.h:598
const client::JsonCppArray< string > get_licenses() const
Definition: snapshot.h:420
bool has_disk_size_gb() const
Definition: snapshot.h:171
void clear_kind()
Definition: snapshot.h:253
const StringPiece get_description() const
Definition: snapshot.h:148
Definition: accelerator_config.h:39
uint64 get_id() const
Definition: snapshot.h:223
void set_status(const StringPiece &value)
Definition: snapshot.h:710
bool has_id() const
Definition: snapshot.h:208
void clear_source_disk()
Definition: snapshot.h:577
bool has_status() const
Definition: snapshot.h:681
const StringPiece get_creation_timestamp() const
Definition: snapshot.h:111
void set_disk_size_gb(int64 value)
Definition: snapshot.h:198
void set_storage_bytes(int64 value)
Definition: snapshot.h:748
void set_name(const StringPiece &value)
Definition: snapshot.h:479
Definition: accelerator_config.cc:41
bool has_creation_timestamp() const
Definition: snapshot.h:96
bool has_self_link() const
Definition: snapshot.h:488
const StringPiece get_source_disk_id() const
Definition: snapshot.h:657
client::JsonCppAssociativeArray< string > mutable_labels()
Definition: snapshot.h:356
int64 get_storage_bytes() const
Definition: snapshot.h:734
bool has_label_fingerprint() const
Definition: snapshot.h:284
bool has_source_disk_encryption_key() const
Definition: snapshot.h:608
void clear_self_link()
Definition: snapshot.h:495
void set_storage_bytes_status(const StringPiece &value)
Definition: snapshot.h:789
void clear_id()
Definition: snapshot.h:215
void set_self_link(const StringPiece &value)
Definition: snapshot.h:516
bool has_source_disk() const
Definition: snapshot.h:570
client::JsonCppArray< string > mutable_storageLocations()
Definition: snapshot.h:827
const StringPiece get_status() const
Definition: snapshot.h:696
void clear_disk_size_gb()
Definition: snapshot.h:178
const StringPiece get_self_link() const
Definition: snapshot.h:503
bool has_kind() const
Definition: snapshot.h:246
bool has_source_disk_id() const
Definition: snapshot.h:642
void clear_storage_locations()
Definition: snapshot.h:805
bool has_snapshot_encryption_key() const
Definition: snapshot.h:525
bool has_storage_locations() const
Definition: snapshot.h:798
bool has_storage_bytes() const
Definition: snapshot.h:719
void set_description(const StringPiece &value)
Definition: snapshot.h:162
void set_id(uint64 value)
Definition: snapshot.h:236
void clear_label_fingerprint()
Definition: snapshot.h:291
void clear_snapshot_encryption_key()
Definition: snapshot.h:532