Enum google_api_proto::google::api::servicecontrol::v1::quota_operation::QuotaMode
source · #[repr(i32)]pub enum QuotaMode {
Unspecified = 0,
Normal = 1,
BestEffort = 2,
CheckOnly = 3,
QueryOnly = 4,
AdjustOnly = 5,
}
Expand description
Supported quota modes.
Variants§
Unspecified = 0
Guard against implicit default. Must not be used.
Normal = 1
For AllocateQuota request, allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the amount is higher than the available quota, allocation error will be returned and no quota will be allocated. If multiple quotas are part of the request, and one fails, none of the quotas are allocated or released.
BestEffort = 2
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the amount is higher than the available quota, request does not fail but all available quota will be allocated. For rate quota, BEST_EFFORT will continue to deduct from other groups even if one does not have enough quota. For allocation, it will find the minimum available amount across all groups and deduct that amount from all the affected groups.
CheckOnly = 3
For AllocateQuota request, only checks if there is enough quota available and does not change the available quota. No lock is placed on the available quota either.
QueryOnly = 4
Unimplemented. When used in AllocateQuotaRequest, this returns the effective quota limit(s) in the response, and no quota check will be performed. Not supported for other requests, and even for AllocateQuotaRequest, this is currently supported only for allowlisted services.
AdjustOnly = 5
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the requested amount is higher than the available quota, request does not fail and remaining quota would become negative (going over the limit). Not supported for Rate Quota.
Implementations§
source§impl QuotaMode
impl QuotaMode
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Ord for QuotaMode
impl Ord for QuotaMode
source§impl PartialEq for QuotaMode
impl PartialEq for QuotaMode
source§impl PartialOrd for QuotaMode
impl PartialOrd for QuotaMode
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for QuotaMode
impl TryFrom<i32> for QuotaMode
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
impl Copy for QuotaMode
impl Eq for QuotaMode
impl StructuralPartialEq for QuotaMode
Auto Trait Implementations§
impl Freeze for QuotaMode
impl RefUnwindSafe for QuotaMode
impl Send for QuotaMode
impl Sync for QuotaMode
impl Unpin for QuotaMode
impl UnwindSafe for QuotaMode
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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