compute  v1
Public Member Functions | Static Public Member Functions | List of all members
google_compute_api::Snapshot Class Reference

#include <snapshot.h>

Inheritance diagram for google_compute_api::Snapshot:

Public Member Functions

 Snapshot (const Json::Value &storage)
 
 Snapshot (Json::Value *storage)
 
virtual ~Snapshot ()
 
const StringPiece GetTypeName () const
 
bool has_creation_timestamp () const
 
void clear_creation_timestamp ()
 
const StringPiece get_creation_timestamp () const
 
void set_creation_timestamp (const StringPiece &value)
 
bool has_description () const
 
void clear_description ()
 
const StringPiece get_description () const
 
void set_description (const StringPiece &value)
 
bool has_disk_size_gb () const
 
void clear_disk_size_gb ()
 
int64 get_disk_size_gb () const
 
void set_disk_size_gb (int64 value)
 
bool has_id () const
 
void clear_id ()
 
uint64 get_id () const
 
void set_id (uint64 value)
 
bool has_kind () const
 
void clear_kind ()
 
const StringPiece get_kind () const
 
void set_kind (const StringPiece &value)
 
bool has_label_fingerprint () const
 
void clear_label_fingerprint ()
 
const StringPiece get_label_fingerprint () const
 
void set_label_fingerprint (const StringPiece &value)
 
bool has_labels () const
 
void clear_labels ()
 
const client::JsonCppAssociativeArray< string > get_labels () const
 
client::JsonCppAssociativeArray< string > mutable_labels ()
 
bool has_license_codes () const
 
void clear_license_codes ()
 
const client::JsonCppArray< int64 > get_license_codes () const
 
client::JsonCppArray< int64 > mutable_licenseCodes ()
 
bool has_licenses () const
 
void clear_licenses ()
 
const client::JsonCppArray< string > get_licenses () const
 
client::JsonCppArray< string > mutable_licenses ()
 
bool has_name () const
 
void clear_name ()
 
const StringPiece get_name () const
 
void set_name (const StringPiece &value)
 
bool has_self_link () const
 
void clear_self_link ()
 
const StringPiece get_self_link () const
 
void set_self_link (const StringPiece &value)
 
bool has_snapshot_encryption_key () const
 
void clear_snapshot_encryption_key ()
 
const CustomerEncryptionKey get_snapshot_encryption_key () const
 
CustomerEncryptionKey mutable_snapshotEncryptionKey ()
 
bool has_source_disk () const
 
void clear_source_disk ()
 
const StringPiece get_source_disk () const
 
void set_source_disk (const StringPiece &value)
 
bool has_source_disk_encryption_key () const
 
void clear_source_disk_encryption_key ()
 
const CustomerEncryptionKey get_source_disk_encryption_key () const
 
CustomerEncryptionKey mutable_sourceDiskEncryptionKey ()
 
bool has_source_disk_id () const
 
void clear_source_disk_id ()
 
const StringPiece get_source_disk_id () const
 
void set_source_disk_id (const StringPiece &value)
 
bool has_status () const
 
void clear_status ()
 
const StringPiece get_status () const
 
void set_status (const StringPiece &value)
 
bool has_storage_bytes () const
 
void clear_storage_bytes ()
 
int64 get_storage_bytes () const
 
void set_storage_bytes (int64 value)
 
bool has_storage_bytes_status () const
 
void clear_storage_bytes_status ()
 
const StringPiece get_storage_bytes_status () const
 
void set_storage_bytes_status (const StringPiece &value)
 
bool has_storage_locations () const
 
void clear_storage_locations ()
 
const client::JsonCppArray< string > get_storage_locations () const
 
client::JsonCppArray< string > mutable_storageLocations ()
 

Static Public Member Functions

static SnapshotNew ()
 

Detailed Description

A persistent disk snapshot resource. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==).

Constructor & Destructor Documentation

◆ Snapshot() [1/2]

google_compute_api::Snapshot::Snapshot ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ Snapshot() [2/2]

google_compute_api::Snapshot::Snapshot ( Json::Value *  storage)
explicit

Standard constructor for a mutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ ~Snapshot()

google_compute_api::Snapshot::~Snapshot ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_creation_timestamp()

void google_compute_api::Snapshot::clear_creation_timestamp ( )
inline

Clears the 'creationTimestamp' attribute.

◆ clear_description()

void google_compute_api::Snapshot::clear_description ( )
inline

Clears the 'description' attribute.

◆ clear_disk_size_gb()

void google_compute_api::Snapshot::clear_disk_size_gb ( )
inline

Clears the 'diskSizeGb' attribute.

◆ clear_id()

void google_compute_api::Snapshot::clear_id ( )
inline

Clears the 'id' attribute.

◆ clear_kind()

void google_compute_api::Snapshot::clear_kind ( )
inline

Clears the 'kind' attribute.

◆ clear_label_fingerprint()

void google_compute_api::Snapshot::clear_label_fingerprint ( )
inline

Clears the 'labelFingerprint' attribute.

◆ clear_labels()

void google_compute_api::Snapshot::clear_labels ( )
inline

Clears the 'labels' attribute.

◆ clear_license_codes()

void google_compute_api::Snapshot::clear_license_codes ( )
inline

Clears the 'licenseCodes' attribute.

◆ clear_licenses()

void google_compute_api::Snapshot::clear_licenses ( )
inline

Clears the 'licenses' attribute.

◆ clear_name()

void google_compute_api::Snapshot::clear_name ( )
inline

Clears the 'name' attribute.

◆ clear_self_link()

void google_compute_api::Snapshot::clear_self_link ( )
inline

Clears the 'selfLink' attribute.

◆ clear_snapshot_encryption_key()

void google_compute_api::Snapshot::clear_snapshot_encryption_key ( )
inline

Clears the 'snapshotEncryptionKey' attribute.

◆ clear_source_disk()

void google_compute_api::Snapshot::clear_source_disk ( )
inline

Clears the 'sourceDisk' attribute.

◆ clear_source_disk_encryption_key()

void google_compute_api::Snapshot::clear_source_disk_encryption_key ( )
inline

Clears the 'sourceDiskEncryptionKey' attribute.

◆ clear_source_disk_id()

void google_compute_api::Snapshot::clear_source_disk_id ( )
inline

Clears the 'sourceDiskId' attribute.

◆ clear_status()

void google_compute_api::Snapshot::clear_status ( )
inline

Clears the 'status' attribute.

◆ clear_storage_bytes()

void google_compute_api::Snapshot::clear_storage_bytes ( )
inline

Clears the 'storageBytes' attribute.

◆ clear_storage_bytes_status()

void google_compute_api::Snapshot::clear_storage_bytes_status ( )
inline

Clears the 'storageBytesStatus' attribute.

◆ clear_storage_locations()

void google_compute_api::Snapshot::clear_storage_locations ( )
inline

Clears the 'storageLocations' attribute.

◆ get_creation_timestamp()

const StringPiece google_compute_api::Snapshot::get_creation_timestamp ( ) const
inline

Get the value of the 'creationTimestamp' attribute.

◆ get_description()

const StringPiece google_compute_api::Snapshot::get_description ( ) const
inline

Get the value of the 'description' attribute.

◆ get_disk_size_gb()

int64 google_compute_api::Snapshot::get_disk_size_gb ( ) const
inline

Get the value of the 'diskSizeGb' attribute.

◆ get_id()

uint64 google_compute_api::Snapshot::get_id ( ) const
inline

Get the value of the 'id' attribute.

◆ get_kind()

const StringPiece google_compute_api::Snapshot::get_kind ( ) const
inline

Get the value of the 'kind' attribute.

◆ get_label_fingerprint()

const StringPiece google_compute_api::Snapshot::get_label_fingerprint ( ) const
inline

Get the value of the 'labelFingerprint' attribute.

◆ get_labels()

const client::JsonCppAssociativeArray<string > google_compute_api::Snapshot::get_labels ( ) const
inline

Get a reference to the value of the 'labels' attribute.

◆ get_license_codes()

const client::JsonCppArray<int64 > google_compute_api::Snapshot::get_license_codes ( ) const
inline

Get a reference to the value of the 'licenseCodes' attribute.

◆ get_licenses()

const client::JsonCppArray<string > google_compute_api::Snapshot::get_licenses ( ) const
inline

Get a reference to the value of the 'licenses' attribute.

◆ get_name()

const StringPiece google_compute_api::Snapshot::get_name ( ) const
inline

Get the value of the 'name' attribute.

◆ get_self_link()

const StringPiece google_compute_api::Snapshot::get_self_link ( ) const
inline

Get the value of the 'selfLink' attribute.

◆ get_snapshot_encryption_key()

const CustomerEncryptionKey google_compute_api::Snapshot::get_snapshot_encryption_key ( ) const

Get a reference to the value of the 'snapshotEncryptionKey' attribute.

◆ get_source_disk()

const StringPiece google_compute_api::Snapshot::get_source_disk ( ) const
inline

Get the value of the 'sourceDisk' attribute.

◆ get_source_disk_encryption_key()

const CustomerEncryptionKey google_compute_api::Snapshot::get_source_disk_encryption_key ( ) const

Get a reference to the value of the 'sourceDiskEncryptionKey' attribute.

◆ get_source_disk_id()

const StringPiece google_compute_api::Snapshot::get_source_disk_id ( ) const
inline

Get the value of the 'sourceDiskId' attribute.

◆ get_status()

const StringPiece google_compute_api::Snapshot::get_status ( ) const
inline

Get the value of the 'status' attribute.

◆ get_storage_bytes()

int64 google_compute_api::Snapshot::get_storage_bytes ( ) const
inline

Get the value of the 'storageBytes' attribute.

◆ get_storage_bytes_status()

const StringPiece google_compute_api::Snapshot::get_storage_bytes_status ( ) const
inline

Get the value of the 'storageBytesStatus' attribute.

◆ get_storage_locations()

const client::JsonCppArray<string > google_compute_api::Snapshot::get_storage_locations ( ) const
inline

Get a reference to the value of the 'storageLocations' attribute.

◆ GetTypeName()

const StringPiece google_compute_api::Snapshot::GetTypeName ( ) const
inline

Returns a string denoting the type of this data object.

Returns
google_compute_api::Snapshot

◆ has_creation_timestamp()

bool google_compute_api::Snapshot::has_creation_timestamp ( ) const
inline

Determine if the 'creationTimestamp' attribute was set.

Returns
true if the 'creationTimestamp' attribute was set.

◆ has_description()

bool google_compute_api::Snapshot::has_description ( ) const
inline

Determine if the 'description' attribute was set.

Returns
true if the 'description' attribute was set.

◆ has_disk_size_gb()

bool google_compute_api::Snapshot::has_disk_size_gb ( ) const
inline

Determine if the 'diskSizeGb' attribute was set.

Returns
true if the 'diskSizeGb' attribute was set.

◆ has_id()

bool google_compute_api::Snapshot::has_id ( ) const
inline

Determine if the 'id' attribute was set.

Returns
true if the 'id' attribute was set.

◆ has_kind()

bool google_compute_api::Snapshot::has_kind ( ) const
inline

Determine if the 'kind' attribute was set.

Returns
true if the 'kind' attribute was set.

◆ has_label_fingerprint()

bool google_compute_api::Snapshot::has_label_fingerprint ( ) const
inline

Determine if the 'labelFingerprint' attribute was set.

Returns
true if the 'labelFingerprint' attribute was set.

◆ has_labels()

bool google_compute_api::Snapshot::has_labels ( ) const
inline

Determine if the 'labels' attribute was set.

Returns
true if the 'labels' attribute was set.

◆ has_license_codes()

bool google_compute_api::Snapshot::has_license_codes ( ) const
inline

Determine if the 'licenseCodes' attribute was set.

Returns
true if the 'licenseCodes' attribute was set.

◆ has_licenses()

bool google_compute_api::Snapshot::has_licenses ( ) const
inline

Determine if the 'licenses' attribute was set.

Returns
true if the 'licenses' attribute was set.

◆ has_name()

bool google_compute_api::Snapshot::has_name ( ) const
inline

Determine if the 'name' attribute was set.

Returns
true if the 'name' attribute was set.

◆ has_self_link()

bool google_compute_api::Snapshot::has_self_link ( ) const
inline

Determine if the 'selfLink' attribute was set.

Returns
true if the 'selfLink' attribute was set.

◆ has_snapshot_encryption_key()

bool google_compute_api::Snapshot::has_snapshot_encryption_key ( ) const
inline

Determine if the 'snapshotEncryptionKey' attribute was set.

Returns
true if the 'snapshotEncryptionKey' attribute was set.

◆ has_source_disk()

bool google_compute_api::Snapshot::has_source_disk ( ) const
inline

Determine if the 'sourceDisk' attribute was set.

Returns
true if the 'sourceDisk' attribute was set.

◆ has_source_disk_encryption_key()

bool google_compute_api::Snapshot::has_source_disk_encryption_key ( ) const
inline

Determine if the 'sourceDiskEncryptionKey' attribute was set.

Returns
true if the 'sourceDiskEncryptionKey' attribute was set.

◆ has_source_disk_id()

bool google_compute_api::Snapshot::has_source_disk_id ( ) const
inline

Determine if the 'sourceDiskId' attribute was set.

Returns
true if the 'sourceDiskId' attribute was set.

◆ has_status()

bool google_compute_api::Snapshot::has_status ( ) const
inline

Determine if the 'status' attribute was set.

Returns
true if the 'status' attribute was set.

◆ has_storage_bytes()

bool google_compute_api::Snapshot::has_storage_bytes ( ) const
inline

Determine if the 'storageBytes' attribute was set.

Returns
true if the 'storageBytes' attribute was set.

◆ has_storage_bytes_status()

bool google_compute_api::Snapshot::has_storage_bytes_status ( ) const
inline

Determine if the 'storageBytesStatus' attribute was set.

Returns
true if the 'storageBytesStatus' attribute was set.

◆ has_storage_locations()

bool google_compute_api::Snapshot::has_storage_locations ( ) const
inline

Determine if the 'storageLocations' attribute was set.

Returns
true if the 'storageLocations' attribute was set.

◆ mutable_labels()

client::JsonCppAssociativeArray<string > google_compute_api::Snapshot::mutable_labels ( )
inline

Gets a reference to a mutable value of the 'labels' property.

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

Returns
The result can be modified to change the attribute value.

◆ mutable_licenseCodes()

client::JsonCppArray<int64 > google_compute_api::Snapshot::mutable_licenseCodes ( )
inline

Gets a reference to a mutable value of the 'licenseCodes' property.

[Output Only] Integer license codes indicating which licenses are attached to this snapshot.

Returns
The result can be modified to change the attribute value.

◆ mutable_licenses()

client::JsonCppArray<string > google_compute_api::Snapshot::mutable_licenses ( )
inline

Gets a reference to a mutable value of the 'licenses' property.

[Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).

Returns
The result can be modified to change the attribute value.

◆ mutable_snapshotEncryptionKey()

CustomerEncryptionKey google_compute_api::Snapshot::mutable_snapshotEncryptionKey ( )

Gets a reference to a mutable value of the 'snapshotEncryptionKey' property.

Encrypts the snapshot using a customer-supplied encryption key.

After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the image later For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request.

Customer-supplied encryption keys do not protect access to metadata of the disk.

If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later.

Returns
The result can be modified to change the attribute value.

◆ mutable_sourceDiskEncryptionKey()

CustomerEncryptionKey google_compute_api::Snapshot::mutable_sourceDiskEncryptionKey ( )

Gets a reference to a mutable value of the 'sourceDiskEncryptionKey' property.

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

Returns
The result can be modified to change the attribute value.

◆ mutable_storageLocations()

client::JsonCppArray<string > google_compute_api::Snapshot::mutable_storageLocations ( )
inline

Gets a reference to a mutable value of the 'storageLocations' property.

GCS bucket storage location of the snapshot (regional or multi-regional).

Returns
The result can be modified to change the attribute value.

◆ New()

Snapshot * google_compute_api::Snapshot::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_creation_timestamp()

void google_compute_api::Snapshot::set_creation_timestamp ( const StringPiece &  value)
inline

Change the 'creationTimestamp' attribute.

[Output Only] Creation timestamp in RFC3339 text format.

Parameters
[in]valueThe new value.

◆ set_description()

void google_compute_api::Snapshot::set_description ( const StringPiece &  value)
inline

Change the 'description' attribute.

An optional description of this resource. Provide this property when you create the resource.

Parameters
[in]valueThe new value.

◆ set_disk_size_gb()

void google_compute_api::Snapshot::set_disk_size_gb ( int64  value)
inline

Change the 'diskSizeGb' attribute.

[Output Only] Size of the snapshot, specified in GB.

Parameters
[in]valueThe new value.

◆ set_id()

void google_compute_api::Snapshot::set_id ( uint64  value)
inline

Change the 'id' attribute.

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

Parameters
[in]valueThe new value.

◆ set_kind()

void google_compute_api::Snapshot::set_kind ( const StringPiece &  value)
inline

Change the 'kind' attribute.

[Output Only] Type of the resource. Always compute::snapshot for Snapshot resources.

Parameters
[in]valueThe new value.

◆ set_label_fingerprint()

void google_compute_api::Snapshot::set_label_fingerprint ( const StringPiece &  value)
inline

Change the 'labelFingerprint' attribute.

A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to- date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.

To see the latest fingerprint, make a get() request to retrieve a snapshot.

Parameters
[in]valueThe new value.

◆ set_name()

void google_compute_api::Snapshot::set_name ( const StringPiece &  value)
inline

Change the 'name' attribute.

Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Parameters
[in]valueThe new value.

◆ set_self_link()

void google_compute_api::Snapshot::set_self_link ( const StringPiece &  value)
inline

Change the 'selfLink' attribute.

[Output Only] Server-defined URL for the resource.

Parameters
[in]valueThe new value.

◆ set_source_disk()

void google_compute_api::Snapshot::set_source_disk ( const StringPiece &  value)
inline

Change the 'sourceDisk' attribute.

[Output Only] The source disk used to create this snapshot.

Parameters
[in]valueThe new value.

◆ set_source_disk_id()

void google_compute_api::Snapshot::set_source_disk_id ( const StringPiece &  value)
inline

Change the 'sourceDiskId' attribute.

[Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.

Parameters
[in]valueThe new value.

◆ set_status()

void google_compute_api::Snapshot::set_status ( const StringPiece &  value)
inline

Change the 'status' attribute.

[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.

Parameters
[in]valueThe new value.

◆ set_storage_bytes()

void google_compute_api::Snapshot::set_storage_bytes ( int64  value)
inline

Change the 'storageBytes' attribute.

[Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.

Parameters
[in]valueThe new value.

◆ set_storage_bytes_status()

void google_compute_api::Snapshot::set_storage_bytes_status ( const StringPiece &  value)
inline

Change the 'storageBytesStatus' attribute.

[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.

Parameters
[in]valueThe new value.

The documentation for this class was generated from the following files: