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

#include <resource_commitment.h>

Inheritance diagram for google_compute_api::ResourceCommitment:

Public Member Functions

 ResourceCommitment (const Json::Value &storage)
 
 ResourceCommitment (Json::Value *storage)
 
virtual ~ResourceCommitment ()
 
const StringPiece GetTypeName () const
 
bool has_amount () const
 
void clear_amount ()
 
int64 get_amount () const
 
void set_amount (int64 value)
 
bool has_type () const
 
void clear_type ()
 
const StringPiece get_type () const
 
void set_type (const StringPiece &value)
 

Static Public Member Functions

static ResourceCommitmentNew ()
 

Detailed Description

Commitment for a particular resource (a Commitment is composed of one or more of these).

Constructor & Destructor Documentation

◆ ResourceCommitment() [1/2]

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

Standard constructor for an immutable data object instance.

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

◆ ResourceCommitment() [2/2]

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

Standard constructor for a mutable data object instance.

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

◆ ~ResourceCommitment()

google_compute_api::ResourceCommitment::~ResourceCommitment ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_amount()

void google_compute_api::ResourceCommitment::clear_amount ( )
inline

Clears the 'amount' attribute.

◆ clear_type()

void google_compute_api::ResourceCommitment::clear_type ( )
inline

Clears the 'type' attribute.

◆ get_amount()

int64 google_compute_api::ResourceCommitment::get_amount ( ) const
inline

Get the value of the 'amount' attribute.

◆ get_type()

const StringPiece google_compute_api::ResourceCommitment::get_type ( ) const
inline

Get the value of the 'type' attribute.

◆ GetTypeName()

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

Returns a string denoting the type of this data object.

Returns
google_compute_api::ResourceCommitment

◆ has_amount()

bool google_compute_api::ResourceCommitment::has_amount ( ) const
inline

Determine if the 'amount' attribute was set.

Returns
true if the 'amount' attribute was set.

◆ has_type()

bool google_compute_api::ResourceCommitment::has_type ( ) const
inline

Determine if the 'type' attribute was set.

Returns
true if the 'type' attribute was set.

◆ New()

ResourceCommitment * google_compute_api::ResourceCommitment::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_amount()

void google_compute_api::ResourceCommitment::set_amount ( int64  value)
inline

Change the 'amount' attribute.

The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.

Parameters
[in]valueThe new value.

◆ set_type()

void google_compute_api::ResourceCommitment::set_type ( const StringPiece &  value)
inline

Change the 'type' attribute.

Type of resource for which this commitment applies. Possible values are VCPU and MEMORY.

Parameters
[in]valueThe new value.

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