#[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
pub fn new() -> Self
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>);