#[non_exhaustive]pub struct FutureResourcesSpec {
pub deployment_type: Option<DeploymentType>,
pub location_policy: Option<FutureResourcesSpecLocationPolicy>,
pub target_resources: Option<FutureResourcesSpecTargetResources>,
pub time_range_spec: Option<FlexibleTimeRange>,
/* private fields */
}advice only.Expand description
Specification of resources to be created at some time in the future within an optionally specified set of locations, and within the specified time range.
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.deployment_type: Option<DeploymentType>Indicates if the reservation allocation strategy is static (DENSE) or dynamic (STANDARD). Defaults to DENSE.
location_policy: Option<FutureResourcesSpecLocationPolicy>Optional location policy allowing to exclude some zone(s) in which the resources must not be created.
target_resources: Option<FutureResourcesSpecTargetResources>Specification of the reserved resources.
time_range_spec: Option<FlexibleTimeRange>Specification of a time range in which the resources may be created. The time range specifies start of resource use and planned end of resource use.
Implementations§
Source§impl FutureResourcesSpec
impl FutureResourcesSpec
pub fn new() -> Self
Sourcepub fn set_deployment_type<T>(self, v: T) -> Selfwhere
T: Into<DeploymentType>,
pub fn set_deployment_type<T>(self, v: T) -> Selfwhere
T: Into<DeploymentType>,
Sets the value of deployment_type.
§Example
use google_cloud_compute_v1::model::future_resources_spec::DeploymentType;
let x0 = FutureResourcesSpec::new().set_deployment_type(DeploymentType::Unspecified);Sourcepub fn set_or_clear_deployment_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<DeploymentType>,
pub fn set_or_clear_deployment_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<DeploymentType>,
Sets or clears the value of deployment_type.
§Example
use google_cloud_compute_v1::model::future_resources_spec::DeploymentType;
let x0 = FutureResourcesSpec::new().set_or_clear_deployment_type(Some(DeploymentType::Unspecified));
let x_none = FutureResourcesSpec::new().set_or_clear_deployment_type(None::<DeploymentType>);Sourcepub fn set_location_policy<T>(self, v: T) -> Selfwhere
T: Into<FutureResourcesSpecLocationPolicy>,
pub fn set_location_policy<T>(self, v: T) -> Selfwhere
T: Into<FutureResourcesSpecLocationPolicy>,
Sets the value of location_policy.
§Example
use google_cloud_compute_v1::model::FutureResourcesSpecLocationPolicy;
let x = FutureResourcesSpec::new().set_location_policy(FutureResourcesSpecLocationPolicy::default()/* use setters */);Sourcepub fn set_or_clear_location_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<FutureResourcesSpecLocationPolicy>,
pub fn set_or_clear_location_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<FutureResourcesSpecLocationPolicy>,
Sets or clears the value of location_policy.
§Example
use google_cloud_compute_v1::model::FutureResourcesSpecLocationPolicy;
let x = FutureResourcesSpec::new().set_or_clear_location_policy(Some(FutureResourcesSpecLocationPolicy::default()/* use setters */));
let x = FutureResourcesSpec::new().set_or_clear_location_policy(None::<FutureResourcesSpecLocationPolicy>);Sourcepub fn set_target_resources<T>(self, v: T) -> Selfwhere
T: Into<FutureResourcesSpecTargetResources>,
pub fn set_target_resources<T>(self, v: T) -> Selfwhere
T: Into<FutureResourcesSpecTargetResources>,
Sets the value of target_resources.
§Example
use google_cloud_compute_v1::model::FutureResourcesSpecTargetResources;
let x = FutureResourcesSpec::new().set_target_resources(FutureResourcesSpecTargetResources::default()/* use setters */);Sourcepub fn set_or_clear_target_resources<T>(self, v: Option<T>) -> Selfwhere
T: Into<FutureResourcesSpecTargetResources>,
pub fn set_or_clear_target_resources<T>(self, v: Option<T>) -> Selfwhere
T: Into<FutureResourcesSpecTargetResources>,
Sets or clears the value of target_resources.
§Example
use google_cloud_compute_v1::model::FutureResourcesSpecTargetResources;
let x = FutureResourcesSpec::new().set_or_clear_target_resources(Some(FutureResourcesSpecTargetResources::default()/* use setters */));
let x = FutureResourcesSpec::new().set_or_clear_target_resources(None::<FutureResourcesSpecTargetResources>);Sourcepub fn set_time_range_spec<T>(self, v: T) -> Selfwhere
T: Into<FlexibleTimeRange>,
pub fn set_time_range_spec<T>(self, v: T) -> Selfwhere
T: Into<FlexibleTimeRange>,
Sets the value of time_range_spec.
§Example
use google_cloud_compute_v1::model::FlexibleTimeRange;
let x = FutureResourcesSpec::new().set_time_range_spec(FlexibleTimeRange::default()/* use setters */);Sourcepub fn set_or_clear_time_range_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<FlexibleTimeRange>,
pub fn set_or_clear_time_range_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<FlexibleTimeRange>,
Sets or clears the value of time_range_spec.
§Example
use google_cloud_compute_v1::model::FlexibleTimeRange;
let x = FutureResourcesSpec::new().set_or_clear_time_range_spec(Some(FlexibleTimeRange::default()/* use setters */));
let x = FutureResourcesSpec::new().set_or_clear_time_range_spec(None::<FlexibleTimeRange>);Trait Implementations§
Source§impl Clone for FutureResourcesSpec
impl Clone for FutureResourcesSpec
Source§fn clone(&self) -> FutureResourcesSpec
fn clone(&self) -> FutureResourcesSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more