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

#include <metadata.h>

Inheritance diagram for google_compute_api::Metadata:

Classes

class  MetadataItems
 

Public Member Functions

 Metadata (const Json::Value &storage)
 
 Metadata (Json::Value *storage)
 
virtual ~Metadata ()
 
const StringPiece GetTypeName () const
 
bool has_fingerprint () const
 
void clear_fingerprint ()
 
const StringPiece get_fingerprint () const
 
void set_fingerprint (const StringPiece &value)
 
bool has_items () const
 
void clear_items ()
 
const client::JsonCppArray< MetadataItemsget_items () const
 
client::JsonCppArray< MetadataItemsmutable_items ()
 
bool has_kind () const
 
void clear_kind ()
 
const StringPiece get_kind () const
 
void set_kind (const StringPiece &value)
 

Static Public Member Functions

static MetadataNew ()
 

Detailed Description

A metadata key/value entry.

Constructor & Destructor Documentation

◆ Metadata() [1/2]

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

Standard constructor for an immutable data object instance.

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

◆ Metadata() [2/2]

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

Standard constructor for a mutable data object instance.

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

◆ ~Metadata()

google_compute_api::Metadata::~Metadata ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_fingerprint()

void google_compute_api::Metadata::clear_fingerprint ( )
inline

Clears the 'fingerprint' attribute.

◆ clear_items()

void google_compute_api::Metadata::clear_items ( )
inline

Clears the 'items' attribute.

◆ clear_kind()

void google_compute_api::Metadata::clear_kind ( )
inline

Clears the 'kind' attribute.

◆ get_fingerprint()

const StringPiece google_compute_api::Metadata::get_fingerprint ( ) const
inline

Get the value of the 'fingerprint' attribute.

◆ get_items()

const client::JsonCppArray<MetadataItems > google_compute_api::Metadata::get_items ( ) const
inline

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

◆ get_kind()

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

Get the value of the 'kind' attribute.

◆ GetTypeName()

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

Returns a string denoting the type of this data object.

Returns
google_compute_api::Metadata

◆ has_fingerprint()

bool google_compute_api::Metadata::has_fingerprint ( ) const
inline

Determine if the 'fingerprint' attribute was set.

Returns
true if the 'fingerprint' attribute was set.

◆ has_items()

bool google_compute_api::Metadata::has_items ( ) const
inline

Determine if the 'items' attribute was set.

Returns
true if the 'items' attribute was set.

◆ has_kind()

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

Determine if the 'kind' attribute was set.

Returns
true if the 'kind' attribute was set.

◆ mutable_items()

client::JsonCppArray<MetadataItems > google_compute_api::Metadata::mutable_items ( )
inline

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

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

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

◆ New()

Metadata * google_compute_api::Metadata::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_fingerprint()

void google_compute_api::Metadata::set_fingerprint ( const StringPiece &  value)
inline

Change the 'fingerprint' attribute.

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

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

Parameters
[in]valueThe new value.

◆ set_kind()

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

Change the 'kind' attribute.

[Output Only] Type of the resource. Always compute::metadata for metadata.

Parameters
[in]valueThe new value.

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