Struct google_api_proto::google::cloud::compute::v1::Reservation
source · pub struct Reservation {Show 16 fields
pub aggregate_reservation: Option<AllocationAggregateReservation>,
pub commitment: Option<String>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub id: Option<u64>,
pub kind: Option<String>,
pub name: Option<String>,
pub resource_policies: BTreeMap<String, String>,
pub resource_status: Option<AllocationResourceStatus>,
pub satisfies_pzs: Option<bool>,
pub self_link: Option<String>,
pub share_settings: Option<ShareSettings>,
pub specific_reservation: Option<AllocationSpecificSkuReservation>,
pub specific_reservation_required: Option<bool>,
pub status: Option<String>,
pub zone: Option<String>,
}
Expand description
Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources.
Fields§
§aggregate_reservation: Option<AllocationAggregateReservation>
Reservation for aggregated resources, providing shape flexibility.
commitment: Option<String>
[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
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.
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#reservations for reservations.
name: Option<String>
The name of the resource, provided by the client when initially creating the resource. The resource 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.
resource_policies: BTreeMap<String, String>
Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
resource_status: Option<AllocationResourceStatus>
[Output Only] Status information for Reservation resource.
satisfies_pzs: Option<bool>
[Output Only] Reserved for future use.
self_link: Option<String>
[Output Only] Server-defined fully-qualified URL for this resource.
Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
specific_reservation: Option<AllocationSpecificSkuReservation>
Reservation for instances with specific machine shapes.
specific_reservation_required: Option<bool>
Indicates whether the reservation can be consumed by VMs with affinity for “any” reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
status: Option<String>
[Output Only] The status of the reservation. Check the Status enum for the list of possible values.
zone: Option<String>
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Implementations§
source§impl Reservation
impl Reservation
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 status(&self) -> &str
pub fn status(&self) -> &str
Returns the value of status
, or the default value if status
is unset.
sourcepub fn specific_reservation_required(&self) -> bool
pub fn specific_reservation_required(&self) -> bool
Returns the value of specific_reservation_required
, or the default value if specific_reservation_required
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 satisfies_pzs(&self) -> bool
pub fn satisfies_pzs(&self) -> bool
Returns the value of satisfies_pzs
, or the default value if satisfies_pzs
is unset.
sourcepub fn commitment(&self) -> &str
pub fn commitment(&self) -> &str
Returns the value of commitment
, or the default value if commitment
is unset.
Trait Implementations§
source§impl Clone for Reservation
impl Clone for Reservation
source§fn clone(&self) -> Reservation
fn clone(&self) -> Reservation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Reservation
impl Debug for Reservation
source§impl Default for Reservation
impl Default for Reservation
source§impl Message for Reservation
impl Message for Reservation
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 Reservation
impl PartialEq for Reservation
source§fn eq(&self, other: &Reservation) -> bool
fn eq(&self, other: &Reservation) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Reservation
Auto Trait Implementations§
impl Freeze for Reservation
impl RefUnwindSafe for Reservation
impl Send for Reservation
impl Sync for Reservation
impl Unpin for Reservation
impl UnwindSafe for Reservation
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