Struct google_api_proto::google::api::serviceusage::v1beta1::ProducerQuotaPolicy
source · pub struct ProducerQuotaPolicy {
pub name: String,
pub policy_value: i64,
pub dimensions: BTreeMap<String, String>,
pub metric: String,
pub unit: String,
pub container: String,
}Expand description
Quota policy created by service producer.
Fields§
§name: StringThe resource name of the policy. This name is generated by the server when the policy is created.
Example names would be:
organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d
policy_value: i64The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).
dimensions: BTreeMap<String, String>If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.
For example, a policy on a limit with the unit 1/{project}/{region}
could contain an entry with the key region and the value us-east-1;
the policy is only applied to quota consumed in that region.
This map has the following restrictions:
- Keys that are not defined in the limit’s unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key.
projectis not a valid key; the project is already specified in the parent resource name.useris not a valid key; the API does not support quota policies that apply only to a specific user.- If
regionappears as a key, its value must be a valid Cloud region. - If
zoneappears as a key, its value must be a valid Cloud zone. - If any valid key other than
regionorzoneappears in the map, then all valid keys other thanregionorzonemust also appear in the map.
metric: StringThe name of the metric to which this policy applies.
An example name would be:
compute.googleapis.com/cpus
unit: StringThe limit unit of the limit to which this policy applies.
An example unit would be:
1/{project}/{region}
Note that {project} and {region} are not placeholders in this example;
the literal characters { and } occur in the string.
container: StringThe cloud resource container at which the quota policy is created. The
format is {container_type}/{container_number}
Trait Implementations§
source§impl Clone for ProducerQuotaPolicy
impl Clone for ProducerQuotaPolicy
source§fn clone(&self) -> ProducerQuotaPolicy
fn clone(&self) -> ProducerQuotaPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ProducerQuotaPolicy
impl Debug for ProducerQuotaPolicy
source§impl Default for ProducerQuotaPolicy
impl Default for ProducerQuotaPolicy
source§impl Message for ProducerQuotaPolicy
impl Message for ProducerQuotaPolicy
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.source§impl PartialEq for ProducerQuotaPolicy
impl PartialEq for ProducerQuotaPolicy
source§fn eq(&self, other: &ProducerQuotaPolicy) -> bool
fn eq(&self, other: &ProducerQuotaPolicy) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ProducerQuotaPolicy
Auto Trait Implementations§
impl Freeze for ProducerQuotaPolicy
impl RefUnwindSafe for ProducerQuotaPolicy
impl Send for ProducerQuotaPolicy
impl Sync for ProducerQuotaPolicy
impl Unpin for ProducerQuotaPolicy
impl UnwindSafe for ProducerQuotaPolicy
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<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