#[non_exhaustive]pub struct AllocationSpecificSKUReservation {
pub assured_count: Option<i64>,
pub count: Option<i64>,
pub in_use_count: Option<i64>,
pub instance_properties: Option<AllocationSpecificSKUAllocationReservedInstanceProperties>,
pub source_instance_template: Option<String>,
/* private fields */
}region-commitments or reservations only.Expand description
This reservation type allows to pre allocate specific instance configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.assured_count: Option<i64>Output only. [Output Only] Indicates how many instances are actually usable currently.
count: Option<i64>Specifies the number of resources that are allocated.
in_use_count: Option<i64>Output only. [Output Only] Indicates how many instances are in use.
instance_properties: Option<AllocationSpecificSKUAllocationReservedInstanceProperties>The instance properties for the reservation.
source_instance_template: Option<String>Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field.
This field is optional, and it can be a full or partial URL. For example, the following are all valid URLs to an instance template:
- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
- projects/project/global/instanceTemplates/instanceTemplate
- global/instanceTemplates/instanceTemplateImplementations§
Source§impl AllocationSpecificSKUReservation
impl AllocationSpecificSKUReservation
Sourcepub fn set_assured_count<T>(self, v: T) -> Self
pub fn set_assured_count<T>(self, v: T) -> Self
Sets the value of assured_count.
§Example
let x = AllocationSpecificSKUReservation::new().set_assured_count(42);Sourcepub fn set_or_clear_assured_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_assured_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of assured_count.
§Example
let x = AllocationSpecificSKUReservation::new().set_or_clear_assured_count(Some(42));
let x = AllocationSpecificSKUReservation::new().set_or_clear_assured_count(None::<i32>);Sourcepub fn set_or_clear_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_count<T>(self, v: Option<T>) -> Self
Sourcepub fn set_in_use_count<T>(self, v: T) -> Self
pub fn set_in_use_count<T>(self, v: T) -> Self
Sets the value of in_use_count.
§Example
let x = AllocationSpecificSKUReservation::new().set_in_use_count(42);Sourcepub fn set_or_clear_in_use_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_in_use_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of in_use_count.
§Example
let x = AllocationSpecificSKUReservation::new().set_or_clear_in_use_count(Some(42));
let x = AllocationSpecificSKUReservation::new().set_or_clear_in_use_count(None::<i32>);Sourcepub fn set_instance_properties<T>(self, v: T) -> Self
pub fn set_instance_properties<T>(self, v: T) -> Self
Sets the value of instance_properties.
§Example
use google_cloud_compute_v1::model::AllocationSpecificSKUAllocationReservedInstanceProperties;
let x = AllocationSpecificSKUReservation::new().set_instance_properties(AllocationSpecificSKUAllocationReservedInstanceProperties::default()/* use setters */);Sourcepub fn set_or_clear_instance_properties<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_instance_properties<T>(self, v: Option<T>) -> Self
Sets or clears the value of instance_properties.
§Example
use google_cloud_compute_v1::model::AllocationSpecificSKUAllocationReservedInstanceProperties;
let x = AllocationSpecificSKUReservation::new().set_or_clear_instance_properties(Some(AllocationSpecificSKUAllocationReservedInstanceProperties::default()/* use setters */));
let x = AllocationSpecificSKUReservation::new().set_or_clear_instance_properties(None::<AllocationSpecificSKUAllocationReservedInstanceProperties>);Sourcepub fn set_source_instance_template<T>(self, v: T) -> Self
pub fn set_source_instance_template<T>(self, v: T) -> Self
Sets the value of source_instance_template.
§Example
let x = AllocationSpecificSKUReservation::new().set_source_instance_template("example");Sourcepub fn set_or_clear_source_instance_template<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_source_instance_template<T>(self, v: Option<T>) -> Self
Sets or clears the value of source_instance_template.
§Example
let x = AllocationSpecificSKUReservation::new().set_or_clear_source_instance_template(Some("example"));
let x = AllocationSpecificSKUReservation::new().set_or_clear_source_instance_template(None::<String>);Trait Implementations§
Source§impl Clone for AllocationSpecificSKUReservation
impl Clone for AllocationSpecificSKUReservation
Source§fn clone(&self) -> AllocationSpecificSKUReservation
fn clone(&self) -> AllocationSpecificSKUReservation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for AllocationSpecificSKUReservation
impl Default for AllocationSpecificSKUReservation
Source§fn default() -> AllocationSpecificSKUReservation
fn default() -> AllocationSpecificSKUReservation
impl StructuralPartialEq for AllocationSpecificSKUReservation
Auto Trait Implementations§
impl Freeze for AllocationSpecificSKUReservation
impl RefUnwindSafe for AllocationSpecificSKUReservation
impl Send for AllocationSpecificSKUReservation
impl Sync for AllocationSpecificSKUReservation
impl Unpin for AllocationSpecificSKUReservation
impl UnsafeUnpin for AllocationSpecificSKUReservation
impl UnwindSafe for AllocationSpecificSKUReservation
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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