#[non_exhaustive]pub struct ProvisioningQuota {
pub name: String,
pub asset_type: AssetType,
pub gcp_service: String,
pub location: String,
pub available_count: i32,
pub quota: Option<Quota>,
pub availability: Option<Availability>,
/* private fields */
}Expand description
A provisioning quota for a given project.
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.name: StringOutput only. The name of the provisioning quota.
asset_type: AssetTypeThe asset type of this provisioning quota.
gcp_service: StringThe gcp service of the provisioning quota.
location: StringThe specific location of the provisioining quota.
available_count: i32The available count of the provisioning quota.
quota: Option<Quota>The quota of one asset type.
availability: Option<Availability>Available quantity based on asset type.
Implementations§
Source§impl ProvisioningQuota
impl ProvisioningQuota
pub fn new() -> Self
Sourcepub fn set_asset_type<T: Into<AssetType>>(self, v: T) -> Self
pub fn set_asset_type<T: Into<AssetType>>(self, v: T) -> Self
Sets the value of asset_type.
§Example
use google_cloud_baremetalsolution_v2::model::provisioning_quota::AssetType;
let x0 = ProvisioningQuota::new().set_asset_type(AssetType::Server);
let x1 = ProvisioningQuota::new().set_asset_type(AssetType::Storage);
let x2 = ProvisioningQuota::new().set_asset_type(AssetType::Network);Sourcepub fn set_gcp_service<T: Into<String>>(self, v: T) -> Self
pub fn set_gcp_service<T: Into<String>>(self, v: T) -> Self
Sets the value of gcp_service.
§Example
let x = ProvisioningQuota::new().set_gcp_service("example");Sourcepub fn set_location<T: Into<String>>(self, v: T) -> Self
pub fn set_location<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_available_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_available_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of available_count.
§Example
let x = ProvisioningQuota::new().set_available_count(42);Sourcepub fn set_quota<T: Into<Option<Quota>>>(self, v: T) -> Self
pub fn set_quota<T: Into<Option<Quota>>>(self, v: T) -> Self
Sets the value of quota.
Note that all the setters affecting quota are mutually
exclusive.
§Example
use google_cloud_baremetalsolution_v2::model::InstanceQuota;
let x = ProvisioningQuota::new().set_quota(Some(
google_cloud_baremetalsolution_v2::model::provisioning_quota::Quota::InstanceQuota(InstanceQuota::default().into())));Sourcepub fn instance_quota(&self) -> Option<&Box<InstanceQuota>>
pub fn instance_quota(&self) -> Option<&Box<InstanceQuota>>
The value of quota
if it holds a InstanceQuota, None if the field is not set or
holds a different branch.
Sourcepub fn set_instance_quota<T: Into<Box<InstanceQuota>>>(self, v: T) -> Self
pub fn set_instance_quota<T: Into<Box<InstanceQuota>>>(self, v: T) -> Self
Sets the value of quota
to hold a InstanceQuota.
Note that all the setters affecting quota are
mutually exclusive.
§Example
use google_cloud_baremetalsolution_v2::model::InstanceQuota;
let x = ProvisioningQuota::new().set_instance_quota(InstanceQuota::default()/* use setters */);
assert!(x.instance_quota().is_some());Sourcepub fn set_availability<T: Into<Option<Availability>>>(self, v: T) -> Self
pub fn set_availability<T: Into<Option<Availability>>>(self, v: T) -> Self
Sets the value of availability.
Note that all the setters affecting availability are mutually
exclusive.
§Example
use google_cloud_baremetalsolution_v2::model::provisioning_quota::Availability;
let x = ProvisioningQuota::new().set_availability(Some(Availability::ServerCount(42)));Sourcepub fn server_count(&self) -> Option<&i64>
pub fn server_count(&self) -> Option<&i64>
The value of availability
if it holds a ServerCount, None if the field is not set or
holds a different branch.
Sourcepub fn set_server_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_server_count<T: Into<i64>>(self, v: T) -> Self
Sets the value of availability
to hold a ServerCount.
Note that all the setters affecting availability are
mutually exclusive.
§Example
let x = ProvisioningQuota::new().set_server_count(42);
assert!(x.server_count().is_some());
assert!(x.network_bandwidth().is_none());
assert!(x.storage_gib().is_none());Sourcepub fn network_bandwidth(&self) -> Option<&i64>
pub fn network_bandwidth(&self) -> Option<&i64>
The value of availability
if it holds a NetworkBandwidth, None if the field is not set or
holds a different branch.
Sourcepub fn set_network_bandwidth<T: Into<i64>>(self, v: T) -> Self
pub fn set_network_bandwidth<T: Into<i64>>(self, v: T) -> Self
Sets the value of availability
to hold a NetworkBandwidth.
Note that all the setters affecting availability are
mutually exclusive.
§Example
let x = ProvisioningQuota::new().set_network_bandwidth(42);
assert!(x.network_bandwidth().is_some());
assert!(x.server_count().is_none());
assert!(x.storage_gib().is_none());Sourcepub fn storage_gib(&self) -> Option<&i64>
pub fn storage_gib(&self) -> Option<&i64>
The value of availability
if it holds a StorageGib, None if the field is not set or
holds a different branch.
Sourcepub fn set_storage_gib<T: Into<i64>>(self, v: T) -> Self
pub fn set_storage_gib<T: Into<i64>>(self, v: T) -> Self
Sets the value of availability
to hold a StorageGib.
Note that all the setters affecting availability are
mutually exclusive.
§Example
let x = ProvisioningQuota::new().set_storage_gib(42);
assert!(x.storage_gib().is_some());
assert!(x.server_count().is_none());
assert!(x.network_bandwidth().is_none());Trait Implementations§
Source§impl Clone for ProvisioningQuota
impl Clone for ProvisioningQuota
Source§fn clone(&self) -> ProvisioningQuota
fn clone(&self) -> ProvisioningQuota
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more