#[non_exhaustive]pub struct Quota {
pub limit: Option<f64>,
pub metric: Option<Metric>,
pub owner: Option<String>,
pub usage: Option<f64>,
/* private fields */
}Available on crate features
projects or regions only.Expand description
A quotas entry.
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.limit: Option<f64>[Output Only] Quota limit for this metric.
metric: Option<Metric>[Output Only] Name of the quota metric.
owner: Option<String>[Output Only] Owning resource. This is the resource on which this quota is applied.
usage: Option<f64>[Output Only] Current usage of this metric.
Implementations§
Source§impl Quota
impl Quota
pub fn new() -> Self
Sourcepub fn set_or_clear_limit<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_limit<T>(self, v: Option<T>) -> Self
Sourcepub fn set_metric<T>(self, v: T) -> Self
pub fn set_metric<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_metric<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metric<T>(self, v: Option<T>) -> Self
Sets or clears the value of metric.
§Example
ⓘ
use google_cloud_compute_v1::model::quota::Metric;
let x0 = Quota::new().set_or_clear_metric(Some(Metric::AffinityGroups));
let x1 = Quota::new().set_or_clear_metric(Some(Metric::Autoscalers));
let x2 = Quota::new().set_or_clear_metric(Some(Metric::BackendBuckets));
let x_none = Quota::new().set_or_clear_metric(None::<Metric>);Sourcepub fn set_or_clear_owner<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_owner<T>(self, v: Option<T>) -> Self
Trait Implementations§
impl StructuralPartialEq for Quota
Auto Trait Implementations§
impl Freeze for Quota
impl RefUnwindSafe for Quota
impl Send for Quota
impl Sync for Quota
impl Unpin for Quota
impl UnwindSafe for Quota
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