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

#include <commitment.h>

Inheritance diagram for google_compute_api::Commitment:

Public Member Functions

 Commitment (const Json::Value &storage)
 
 Commitment (Json::Value *storage)
 
virtual ~Commitment ()
 
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_end_timestamp () const
 
void clear_end_timestamp ()
 
const StringPiece get_end_timestamp () const
 
void set_end_timestamp (const StringPiece &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_name () const
 
void clear_name ()
 
const StringPiece get_name () const
 
void set_name (const StringPiece &value)
 
bool has_plan () const
 
void clear_plan ()
 
const StringPiece get_plan () const
 
void set_plan (const StringPiece &value)
 
bool has_region () const
 
void clear_region ()
 
const StringPiece get_region () const
 
void set_region (const StringPiece &value)
 
bool has_resources () const
 
void clear_resources ()
 
const client::JsonCppArray< ResourceCommitmentget_resources () const
 
client::JsonCppArray< ResourceCommitmentmutable_resources ()
 
bool has_self_link () const
 
void clear_self_link ()
 
const StringPiece get_self_link () const
 
void set_self_link (const StringPiece &value)
 
bool has_start_timestamp () const
 
void clear_start_timestamp ()
 
const StringPiece get_start_timestamp () const
 
void set_start_timestamp (const StringPiece &value)
 
bool has_status () const
 
void clear_status ()
 
const StringPiece get_status () const
 
void set_status (const StringPiece &value)
 
bool has_status_message () const
 
void clear_status_message ()
 
const StringPiece get_status_message () const
 
void set_status_message (const StringPiece &value)
 

Static Public Member Functions

static CommitmentNew ()
 

Detailed Description

Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.

Committed use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts. (== resource_for beta.commitments ==) (== resource_for v1.commitments ==).

Constructor & Destructor Documentation

◆ Commitment() [1/2]

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

Standard constructor for an immutable data object instance.

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

◆ Commitment() [2/2]

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

Standard constructor for a mutable data object instance.

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

◆ ~Commitment()

google_compute_api::Commitment::~Commitment ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_creation_timestamp()

void google_compute_api::Commitment::clear_creation_timestamp ( )
inline

Clears the 'creationTimestamp' attribute.

◆ clear_description()

void google_compute_api::Commitment::clear_description ( )
inline

Clears the 'description' attribute.

◆ clear_end_timestamp()

void google_compute_api::Commitment::clear_end_timestamp ( )
inline

Clears the 'endTimestamp' attribute.

◆ clear_id()

void google_compute_api::Commitment::clear_id ( )
inline

Clears the 'id' attribute.

◆ clear_kind()

void google_compute_api::Commitment::clear_kind ( )
inline

Clears the 'kind' attribute.

◆ clear_name()

void google_compute_api::Commitment::clear_name ( )
inline

Clears the 'name' attribute.

◆ clear_plan()

void google_compute_api::Commitment::clear_plan ( )
inline

Clears the 'plan' attribute.

◆ clear_region()

void google_compute_api::Commitment::clear_region ( )
inline

Clears the 'region' attribute.

◆ clear_resources()

void google_compute_api::Commitment::clear_resources ( )
inline

Clears the 'resources' attribute.

◆ clear_self_link()

void google_compute_api::Commitment::clear_self_link ( )
inline

Clears the 'selfLink' attribute.

◆ clear_start_timestamp()

void google_compute_api::Commitment::clear_start_timestamp ( )
inline

Clears the 'startTimestamp' attribute.

◆ clear_status()

void google_compute_api::Commitment::clear_status ( )
inline

Clears the 'status' attribute.

◆ clear_status_message()

void google_compute_api::Commitment::clear_status_message ( )
inline

Clears the 'statusMessage' attribute.

◆ get_creation_timestamp()

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

Get the value of the 'creationTimestamp' attribute.

◆ get_description()

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

Get the value of the 'description' attribute.

◆ get_end_timestamp()

const StringPiece google_compute_api::Commitment::get_end_timestamp ( ) const
inline

Get the value of the 'endTimestamp' attribute.

◆ get_id()

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

Get the value of the 'id' attribute.

◆ get_kind()

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

Get the value of the 'kind' attribute.

◆ get_name()

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

Get the value of the 'name' attribute.

◆ get_plan()

const StringPiece google_compute_api::Commitment::get_plan ( ) const
inline

Get the value of the 'plan' attribute.

◆ get_region()

const StringPiece google_compute_api::Commitment::get_region ( ) const
inline

Get the value of the 'region' attribute.

◆ get_resources()

const client::JsonCppArray<ResourceCommitment > google_compute_api::Commitment::get_resources ( ) const

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

◆ get_self_link()

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

Get the value of the 'selfLink' attribute.

◆ get_start_timestamp()

const StringPiece google_compute_api::Commitment::get_start_timestamp ( ) const
inline

Get the value of the 'startTimestamp' attribute.

◆ get_status()

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

Get the value of the 'status' attribute.

◆ get_status_message()

const StringPiece google_compute_api::Commitment::get_status_message ( ) const
inline

Get the value of the 'statusMessage' attribute.

◆ GetTypeName()

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

Returns a string denoting the type of this data object.

Returns
google_compute_api::Commitment

◆ has_creation_timestamp()

bool google_compute_api::Commitment::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::Commitment::has_description ( ) const
inline

Determine if the 'description' attribute was set.

Returns
true if the 'description' attribute was set.

◆ has_end_timestamp()

bool google_compute_api::Commitment::has_end_timestamp ( ) const
inline

Determine if the 'endTimestamp' attribute was set.

Returns
true if the 'endTimestamp' attribute was set.

◆ has_id()

bool google_compute_api::Commitment::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::Commitment::has_kind ( ) const
inline

Determine if the 'kind' attribute was set.

Returns
true if the 'kind' attribute was set.

◆ has_name()

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

Determine if the 'name' attribute was set.

Returns
true if the 'name' attribute was set.

◆ has_plan()

bool google_compute_api::Commitment::has_plan ( ) const
inline

Determine if the 'plan' attribute was set.

Returns
true if the 'plan' attribute was set.

◆ has_region()

bool google_compute_api::Commitment::has_region ( ) const
inline

Determine if the 'region' attribute was set.

Returns
true if the 'region' attribute was set.

◆ has_resources()

bool google_compute_api::Commitment::has_resources ( ) const
inline

Determine if the 'resources' attribute was set.

Returns
true if the 'resources' attribute was set.

◆ has_self_link()

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

Determine if the 'selfLink' attribute was set.

Returns
true if the 'selfLink' attribute was set.

◆ has_start_timestamp()

bool google_compute_api::Commitment::has_start_timestamp ( ) const
inline

Determine if the 'startTimestamp' attribute was set.

Returns
true if the 'startTimestamp' attribute was set.

◆ has_status()

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

Determine if the 'status' attribute was set.

Returns
true if the 'status' attribute was set.

◆ has_status_message()

bool google_compute_api::Commitment::has_status_message ( ) const
inline

Determine if the 'statusMessage' attribute was set.

Returns
true if the 'statusMessage' attribute was set.

◆ mutable_resources()

client::JsonCppArray<ResourceCommitment > google_compute_api::Commitment::mutable_resources ( )

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

A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.

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

◆ New()

Commitment * google_compute_api::Commitment::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_creation_timestamp()

void google_compute_api::Commitment::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::Commitment::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_end_timestamp()

void google_compute_api::Commitment::set_end_timestamp ( const StringPiece &  value)
inline

Change the 'endTimestamp' attribute.

[Output Only] Commitment end time in RFC3339 text format.

Parameters
[in]valueThe new value.

◆ set_id()

void google_compute_api::Commitment::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::Commitment::set_kind ( const StringPiece &  value)
inline

Change the 'kind' attribute.

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

Parameters
[in]valueThe new value.

◆ set_name()

void google_compute_api::Commitment::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_plan()

void google_compute_api::Commitment::set_plan ( const StringPiece &  value)
inline

Change the 'plan' attribute.

The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).

Parameters
[in]valueThe new value.

◆ set_region()

void google_compute_api::Commitment::set_region ( const StringPiece &  value)
inline

Change the 'region' attribute.

[Output Only] URL of the region where this commitment may be used.

Parameters
[in]valueThe new value.

◆ set_self_link()

void google_compute_api::Commitment::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_start_timestamp()

void google_compute_api::Commitment::set_start_timestamp ( const StringPiece &  value)
inline

Change the 'startTimestamp' attribute.

[Output Only] Commitment start time in RFC3339 text format.

Parameters
[in]valueThe new value.

◆ set_status()

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

Change the 'status' attribute.

[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.

Parameters
[in]valueThe new value.

◆ set_status_message()

void google_compute_api::Commitment::set_status_message ( const StringPiece &  value)
inline

Change the 'statusMessage' attribute.

[Output Only] An optional, human-readable explanation of the status.

Parameters
[in]valueThe new value.

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