Struct google_api_proto::google::cloud::bigquery::reservation::v1::CapacityCommitment
source · pub struct CapacityCommitment {
pub name: String,
pub slot_count: i64,
pub plan: i32,
pub state: i32,
pub commitment_start_time: Option<Timestamp>,
pub commitment_end_time: Option<Timestamp>,
pub failure_status: Option<Status>,
pub renewal_plan: i32,
pub multi_region_auxiliary: bool,
pub edition: i32,
}
Expand description
Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes.
In order to remove annual commitment, its plan needs to be changed to monthly or flex first.
A capacity commitment resource exists as a child resource of the admin project.
Fields§
§name: String
Output only. The resource name of the capacity commitment, e.g.,
projects/myproject/locations/US/capacityCommitments/123
The commitment_id must only contain lower case alphanumeric characters or
dashes. It must start with a letter and must not end
with a dash. Its maximum length is 64 characters.
slot_count: i64
Number of slots in this commitment.
plan: i32
Capacity commitment commitment plan.
state: i32
Output only. State of the commitment.
commitment_start_time: Option<Timestamp>
Output only. The start of the current commitment period. It is applicable only for ACTIVE capacity commitments.
commitment_end_time: Option<Timestamp>
Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments.
failure_status: Option<Status>
Output only. For FAILED commitment plan, provides the reason of failure.
renewal_plan: i32
The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for ANNUAL and TRIAL commitments.
multi_region_auxiliary: bool
Applicable only for commitments located within one of the BigQuery multi-regions (US or EU).
If set to true, this commitment is placed in the organization’s secondary region which is designated for disaster recovery purposes. If false, this commitment is placed in the organization’s default region.
NOTE: this is a preview feature. Project must be allow-listed in order to set this field.
edition: i32
Edition of the capacity commitment.
Implementations§
source§impl CapacityCommitment
impl CapacityCommitment
sourcepub fn plan(&self) -> CommitmentPlan
pub fn plan(&self) -> CommitmentPlan
Returns the enum value of plan
, or the default if the field is set to an invalid enum value.
sourcepub fn set_plan(&mut self, value: CommitmentPlan)
pub fn set_plan(&mut self, value: CommitmentPlan)
Sets plan
to the provided enum value.
sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
sourcepub fn renewal_plan(&self) -> CommitmentPlan
pub fn renewal_plan(&self) -> CommitmentPlan
Returns the enum value of renewal_plan
, or the default if the field is set to an invalid enum value.
sourcepub fn set_renewal_plan(&mut self, value: CommitmentPlan)
pub fn set_renewal_plan(&mut self, value: CommitmentPlan)
Sets renewal_plan
to the provided enum value.
sourcepub fn edition(&self) -> Edition
pub fn edition(&self) -> Edition
Returns the enum value of edition
, or the default if the field is set to an invalid enum value.
sourcepub fn set_edition(&mut self, value: Edition)
pub fn set_edition(&mut self, value: Edition)
Sets edition
to the provided enum value.
Trait Implementations§
source§impl Clone for CapacityCommitment
impl Clone for CapacityCommitment
source§fn clone(&self) -> CapacityCommitment
fn clone(&self) -> CapacityCommitment
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CapacityCommitment
impl Debug for CapacityCommitment
source§impl Default for CapacityCommitment
impl Default for CapacityCommitment
source§impl Message for CapacityCommitment
impl Message for CapacityCommitment
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 CapacityCommitment
impl PartialEq for CapacityCommitment
source§fn eq(&self, other: &CapacityCommitment) -> bool
fn eq(&self, other: &CapacityCommitment) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CapacityCommitment
Auto Trait Implementations§
impl Freeze for CapacityCommitment
impl RefUnwindSafe for CapacityCommitment
impl Send for CapacityCommitment
impl Sync for CapacityCommitment
impl Unpin for CapacityCommitment
impl UnwindSafe for CapacityCommitment
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