#[non_exhaustive]pub struct ReservationAffinity {
pub consume_reservation_type: Type,
pub key: String,
pub values: Vec<String>,
}Expand description
ReservationAffinity is the configuration of desired reservation which instances could take capacity from.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.consume_reservation_type: TypeCorresponds to the type of reservation consumption.
key: StringCorresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify “compute.googleapis.com/reservation-name” as the key and specify the name of your reservation as its value.
values: Vec<String>Corresponds to the label value(s) of reservation resource(s).
Implementations§
Source§impl ReservationAffinity
impl ReservationAffinity
Sourcepub fn set_consume_reservation_type<T: Into<Type>>(self, v: T) -> Self
pub fn set_consume_reservation_type<T: Into<Type>>(self, v: T) -> Self
Sets the value of consume_reservation_type.
Sourcepub fn set_values<T, V>(self, v: T) -> Self
pub fn set_values<T, V>(self, v: T) -> Self
Sets the value of values.
Trait Implementations§
Source§impl Clone for ReservationAffinity
impl Clone for ReservationAffinity
Source§fn clone(&self) -> ReservationAffinity
fn clone(&self) -> ReservationAffinity
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReservationAffinity
impl Debug for ReservationAffinity
Source§impl Default for ReservationAffinity
impl Default for ReservationAffinity
Source§fn default() -> ReservationAffinity
fn default() -> ReservationAffinity
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ReservationAffinitywhere
ReservationAffinity: Default,
impl<'de> Deserialize<'de> for ReservationAffinitywhere
ReservationAffinity: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for ReservationAffinity
impl Message for ReservationAffinity
Source§impl PartialEq for ReservationAffinity
impl PartialEq for ReservationAffinity
Source§impl Serialize for ReservationAffinity
impl Serialize for ReservationAffinity
impl StructuralPartialEq for ReservationAffinity
Auto Trait Implementations§
impl Freeze for ReservationAffinity
impl RefUnwindSafe for ReservationAffinity
impl Send for ReservationAffinity
impl Sync for ReservationAffinity
impl Unpin for ReservationAffinity
impl UnwindSafe for ReservationAffinity
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
Mutably borrows from an owned value. Read more