#[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
pub fn new() -> Self
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 · 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
Source§impl PartialEq for AllocationSpecificSKUReservation
impl PartialEq for AllocationSpecificSKUReservation
Source§fn eq(&self, other: &AllocationSpecificSKUReservation) -> bool
fn eq(&self, other: &AllocationSpecificSKUReservation) -> bool
self and other values to be equal, and is used by ==.