#[non_exhaustive]pub struct UpdateQuotaPreferenceRequest {
pub update_mask: Option<FieldMask>,
pub quota_preference: Option<QuotaPreference>,
pub allow_missing: bool,
pub validate_only: bool,
pub ignore_safety_checks: Vec<QuotaSafetyCheck>,
/* private fields */
}Expand description
Message for updating a QuotaPreference
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.update_mask: Option<FieldMask>Optional. Field mask is used to specify the fields to be overwritten in the QuotaPreference resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
quota_preference: Option<QuotaPreference>Required. The resource being updated
allow_missing: boolOptional. If set to true, and the quota preference is not found, a new one
will be created. In this situation, update_mask is ignored.
validate_only: boolOptional. If set to true, validate the request, but do not actually update. Note that a request being valid does not mean that the request is guaranteed to be fulfilled.
ignore_safety_checks: Vec<QuotaSafetyCheck>The list of quota safety checks to be ignored.
Implementations§
Source§impl UpdateQuotaPreferenceRequest
impl UpdateQuotaPreferenceRequest
pub fn new() -> Self
Sourcepub fn set_update_mask<T>(self, v: T) -> Self
pub fn set_update_mask<T>(self, v: T) -> Self
Sets the value of update_mask.
§Example
use wkt::FieldMask;
let x = UpdateQuotaPreferenceRequest::new().set_update_mask(FieldMask::default()/* use setters */);Sourcepub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_mask.
§Example
use wkt::FieldMask;
let x = UpdateQuotaPreferenceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
let x = UpdateQuotaPreferenceRequest::new().set_or_clear_update_mask(None::<FieldMask>);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 = UpdateQuotaPreferenceRequest::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 = UpdateQuotaPreferenceRequest::new().set_or_clear_quota_preference(Some(QuotaPreference::default()/* use setters */));
let x = UpdateQuotaPreferenceRequest::new().set_or_clear_quota_preference(None::<QuotaPreference>);Sourcepub fn set_allow_missing<T: Into<bool>>(self, v: T) -> Self
pub fn set_allow_missing<T: Into<bool>>(self, v: T) -> Self
Sets the value of allow_missing.
§Example
let x = UpdateQuotaPreferenceRequest::new().set_allow_missing(true);Sourcepub fn set_validate_only<T: Into<bool>>(self, v: T) -> Self
pub fn set_validate_only<T: Into<bool>>(self, v: T) -> Self
Sets the value of validate_only.
§Example
let x = UpdateQuotaPreferenceRequest::new().set_validate_only(true);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 = UpdateQuotaPreferenceRequest::new().set_ignore_safety_checks([
QuotaSafetyCheck::QuotaDecreaseBelowUsage,
QuotaSafetyCheck::QuotaDecreasePercentageTooHigh,
]);Trait Implementations§
Source§impl Clone for UpdateQuotaPreferenceRequest
impl Clone for UpdateQuotaPreferenceRequest
Source§fn clone(&self) -> UpdateQuotaPreferenceRequest
fn clone(&self) -> UpdateQuotaPreferenceRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UpdateQuotaPreferenceRequest
impl Debug for UpdateQuotaPreferenceRequest
Source§impl Default for UpdateQuotaPreferenceRequest
impl Default for UpdateQuotaPreferenceRequest
Source§fn default() -> UpdateQuotaPreferenceRequest
fn default() -> UpdateQuotaPreferenceRequest
Source§impl PartialEq for UpdateQuotaPreferenceRequest
impl PartialEq for UpdateQuotaPreferenceRequest
Source§fn eq(&self, other: &UpdateQuotaPreferenceRequest) -> bool
fn eq(&self, other: &UpdateQuotaPreferenceRequest) -> bool
self and other values to be equal, and is used by ==.