#[non_exhaustive]pub struct QuotaRule {
pub name: String,
pub target: String,
pub type: Type,
pub disk_limit_mib: i32,
pub state: State,
pub state_details: String,
pub create_time: Option<Timestamp>,
pub description: String,
pub labels: HashMap<String, String>,
/* private fields */
}Expand description
QuotaRule specifies the maximum disk space a user or group can use within a volume. They can be used for creating default and individual quota rules.
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: StringIdentifier. The resource name of the quota rule.
Format:
projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}.
target: StringOptional. The quota rule applies to the specified user or group, identified by a Unix UID/GID, Windows SID, or null for default.
type: TypeRequired. The type of quota rule.
disk_limit_mib: i32Required. The maximum allowed disk space in MiB.
state: StateOutput only. State of the quota rule
state_details: StringOutput only. State details of the quota rule
create_time: Option<Timestamp>Output only. Create time of the quota rule
description: StringOptional. Description of the quota rule
labels: HashMap<String, String>Optional. Labels of the quota rule
Implementations§
Source§impl QuotaRule
impl QuotaRule
Sourcepub fn set_target<T: Into<String>>(self, v: T) -> Self
pub fn set_target<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_disk_limit_mib<T: Into<i32>>(self, v: T) -> Self
pub fn set_disk_limit_mib<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_state_details<T: Into<String>>(self, v: T) -> Self
pub fn set_state_details<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = QuotaRule::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = QuotaRule::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = QuotaRule::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for QuotaRule
Auto Trait Implementations§
impl Freeze for QuotaRule
impl RefUnwindSafe for QuotaRule
impl Send for QuotaRule
impl Sync for QuotaRule
impl Unpin for QuotaRule
impl UnsafeUnpin for QuotaRule
impl UnwindSafe for QuotaRule
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