#[non_exhaustive]pub struct CreateQuotaPreferenceRequest {
pub parent: String,
pub quota_preference_id: String,
pub quota_preference: Option<QuotaPreference>,
pub ignore_safety_checks: Vec<QuotaSafetyCheck>,
/* private fields */
}Expand description
Message for creating a QuotaPreference
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.parent: StringRequired. Value for parent.
Example:
projects/123/locations/global
quota_preference_id: StringOptional. Id of the requesting object, must be unique under its parent. If client does not set this field, the service will generate one.
quota_preference: Option<QuotaPreference>Required. The resource being created
ignore_safety_checks: Vec<QuotaSafetyCheck>The list of quota safety checks to be ignored.
Implementations§
Source§impl CreateQuotaPreferenceRequest
impl CreateQuotaPreferenceRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_quota_preference_id<T: Into<String>>(self, v: T) -> Self
pub fn set_quota_preference_id<T: Into<String>>(self, v: T) -> Self
Sets the value of quota_preference_id.
§Example
ⓘ
let x = CreateQuotaPreferenceRequest::new().set_quota_preference_id("example");Sourcepub fn set_quota_preference<T>(self, v: T) -> Selfwhere
T: Into<QuotaPreference>,
pub fn set_quota_preference<T>(self, v: T) -> Selfwhere
T: Into<QuotaPreference>,
Sets the value of quota_preference.
§Example
ⓘ
use google_cloud_api_cloudquotas_v1::model::QuotaPreference;
let x = CreateQuotaPreferenceRequest::new().set_quota_preference(QuotaPreference::default()/* use setters */);Sourcepub fn set_or_clear_quota_preference<T>(self, v: Option<T>) -> Selfwhere
T: Into<QuotaPreference>,
pub fn set_or_clear_quota_preference<T>(self, v: Option<T>) -> Selfwhere
T: Into<QuotaPreference>,
Sets or clears the value of quota_preference.
§Example
ⓘ
use google_cloud_api_cloudquotas_v1::model::QuotaPreference;
let x = CreateQuotaPreferenceRequest::new().set_or_clear_quota_preference(Some(QuotaPreference::default()/* use setters */));
let x = CreateQuotaPreferenceRequest::new().set_or_clear_quota_preference(None::<QuotaPreference>);Sourcepub fn set_ignore_safety_checks<T, V>(self, v: T) -> Self
pub fn set_ignore_safety_checks<T, V>(self, v: T) -> Self
Sets the value of ignore_safety_checks.
§Example
ⓘ
use google_cloud_api_cloudquotas_v1::model::QuotaSafetyCheck;
let x = CreateQuotaPreferenceRequest::new().set_ignore_safety_checks([
QuotaSafetyCheck::QuotaDecreaseBelowUsage,
QuotaSafetyCheck::QuotaDecreasePercentageTooHigh,
]);Trait Implementations§
Source§impl Clone for CreateQuotaPreferenceRequest
impl Clone for CreateQuotaPreferenceRequest
Source§fn clone(&self) -> CreateQuotaPreferenceRequest
fn clone(&self) -> CreateQuotaPreferenceRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateQuotaPreferenceRequest
impl Debug for CreateQuotaPreferenceRequest
Source§impl Default for CreateQuotaPreferenceRequest
impl Default for CreateQuotaPreferenceRequest
Source§fn default() -> CreateQuotaPreferenceRequest
fn default() -> CreateQuotaPreferenceRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreateQuotaPreferenceRequest
impl PartialEq for CreateQuotaPreferenceRequest
Source§fn eq(&self, other: &CreateQuotaPreferenceRequest) -> bool
fn eq(&self, other: &CreateQuotaPreferenceRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateQuotaPreferenceRequest
Auto Trait Implementations§
impl Freeze for CreateQuotaPreferenceRequest
impl RefUnwindSafe for CreateQuotaPreferenceRequest
impl Send for CreateQuotaPreferenceRequest
impl Sync for CreateQuotaPreferenceRequest
impl Unpin for CreateQuotaPreferenceRequest
impl UnwindSafe for CreateQuotaPreferenceRequest
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