Struct google_api_proto::google::cloud::compute::v1::Commitment
source · pub struct Commitment {Show 21 fields
pub auto_renew: Option<bool>,
pub category: Option<String>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub end_timestamp: Option<String>,
pub existing_reservations: Vec<String>,
pub id: Option<u64>,
pub kind: Option<String>,
pub license_resource: Option<LicenseResourceCommitment>,
pub merge_source_commitments: Vec<String>,
pub name: Option<String>,
pub plan: Option<String>,
pub region: Option<String>,
pub reservations: Vec<Reservation>,
pub resources: Vec<ResourceCommitment>,
pub self_link: Option<String>,
pub split_source_commitment: Option<String>,
pub start_timestamp: Option<String>,
pub status: Option<String>,
pub status_message: Option<String>,
pub type: Option<String>,
}
Expand description
Represents a regional 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.
Fields§
§auto_renew: Option<bool>
Specifies whether to enable automatic renewal for the commitment. The default value is false if not specified. The field can be updated until the day of the commitment expiration at 12:00am PST. If the field is set to true, the commitment will be automatically renewed for either one or three years according to the terms of the existing commitment.
category: Option<String>
The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified. Check the Category enum for the list of possible values.
creation_timestamp: Option<String>
[Output Only] Creation timestamp in RFC3339 text format.
description: Option<String>
An optional description of this resource. Provide this property when you create the resource.
end_timestamp: Option<String>
[Output Only] Commitment end time in RFC3339 text format.
existing_reservations: Vec<String>
Specifies the already existing reservations to attach to the Commitment. This field is optional, and it can be a full or partial URL. For example, the following are valid URLs to an reservation: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /reservations/reservation - projects/project/zones/zone/reservations/reservation
id: Option<u64>
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
kind: Option<String>
[Output Only] Type of the resource. Always compute#commitment for commitments.
license_resource: Option<LicenseResourceCommitment>
The license specification required as part of a license commitment.
merge_source_commitments: Vec<String>
List of source commitments to be merged into a new commitment.
name: Option<String>
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.
plan: Option<String>
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). Check the Plan enum for the list of possible values.
region: Option<String>
[Output Only] URL of the region where this commitment may be used.
reservations: Vec<Reservation>
List of create-on-create reservations for this commitment.
resources: Vec<ResourceCommitment>
A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
self_link: Option<String>
[Output Only] Server-defined URL for the resource.
split_source_commitment: Option<String>
Source commitment to be split into a new commitment.
start_timestamp: Option<String>
[Output Only] Commitment start time in RFC3339 text format.
status: Option<String>
[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. Check the Status enum for the list of possible values.
status_message: Option<String>
[Output Only] An optional, human-readable explanation of the status.
type: Option<String>
The type of commitment, which affects the discount rate and the eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to accelerator optimized machines. Check the Type enum for the list of possible values.
Implementations§
source§impl Commitment
impl Commitment
sourcepub fn creation_timestamp(&self) -> &str
pub fn creation_timestamp(&self) -> &str
Returns the value of creation_timestamp
, or the default value if creation_timestamp
is unset.
sourcepub fn category(&self) -> &str
pub fn category(&self) -> &str
Returns the value of category
, or the default value if category
is unset.
sourcepub fn start_timestamp(&self) -> &str
pub fn start_timestamp(&self) -> &str
Returns the value of start_timestamp
, or the default value if start_timestamp
is unset.
sourcepub fn region(&self) -> &str
pub fn region(&self) -> &str
Returns the value of region
, or the default value if region
is unset.
sourcepub fn status(&self) -> &str
pub fn status(&self) -> &str
Returns the value of status
, or the default value if status
is unset.
sourcepub fn status_message(&self) -> &str
pub fn status_message(&self) -> &str
Returns the value of status_message
, or the default value if status_message
is unset.
sourcepub fn split_source_commitment(&self) -> &str
pub fn split_source_commitment(&self) -> &str
Returns the value of split_source_commitment
, or the default value if split_source_commitment
is unset.
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description
, or the default value if description
is unset.
sourcepub fn self_link(&self) -> &str
pub fn self_link(&self) -> &str
Returns the value of self_link
, or the default value if self_link
is unset.
sourcepub fn end_timestamp(&self) -> &str
pub fn end_timestamp(&self) -> &str
Returns the value of end_timestamp
, or the default value if end_timestamp
is unset.
sourcepub fn auto_renew(&self) -> bool
pub fn auto_renew(&self) -> bool
Returns the value of auto_renew
, or the default value if auto_renew
is unset.
Trait Implementations§
source§impl Clone for Commitment
impl Clone for Commitment
source§fn clone(&self) -> Commitment
fn clone(&self) -> Commitment
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Commitment
impl Debug for Commitment
source§impl Default for Commitment
impl Default for Commitment
source§impl Message for Commitment
impl Message for Commitment
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Commitment
impl PartialEq for Commitment
source§fn eq(&self, other: &Commitment) -> bool
fn eq(&self, other: &Commitment) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Commitment
Auto Trait Implementations§
impl Freeze for Commitment
impl RefUnwindSafe for Commitment
impl Send for Commitment
impl Sync for Commitment
impl Unpin for Commitment
impl UnwindSafe for Commitment
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request