#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
#[derive(PartialEq,Clone,Default)]
pub struct AllocateQuotaRequest {
pub service_name: ::std::string::String,
pub allocate_operation: ::protobuf::SingularPtrField<QuotaOperation>,
pub service_config_id: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a AllocateQuotaRequest {
fn default() -> &'a AllocateQuotaRequest {
<AllocateQuotaRequest as ::protobuf::Message>::default_instance()
}
}
impl AllocateQuotaRequest {
pub fn new() -> AllocateQuotaRequest {
::std::default::Default::default()
}
pub fn get_service_name(&self) -> &str {
&self.service_name
}
pub fn clear_service_name(&mut self) {
self.service_name.clear();
}
pub fn set_service_name(&mut self, v: ::std::string::String) {
self.service_name = v;
}
pub fn mut_service_name(&mut self) -> &mut ::std::string::String {
&mut self.service_name
}
pub fn take_service_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.service_name, ::std::string::String::new())
}
pub fn get_allocate_operation(&self) -> &QuotaOperation {
self.allocate_operation.as_ref().unwrap_or_else(|| <QuotaOperation as ::protobuf::Message>::default_instance())
}
pub fn clear_allocate_operation(&mut self) {
self.allocate_operation.clear();
}
pub fn has_allocate_operation(&self) -> bool {
self.allocate_operation.is_some()
}
pub fn set_allocate_operation(&mut self, v: QuotaOperation) {
self.allocate_operation = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_allocate_operation(&mut self) -> &mut QuotaOperation {
if self.allocate_operation.is_none() {
self.allocate_operation.set_default();
}
self.allocate_operation.as_mut().unwrap()
}
pub fn take_allocate_operation(&mut self) -> QuotaOperation {
self.allocate_operation.take().unwrap_or_else(|| QuotaOperation::new())
}
pub fn get_service_config_id(&self) -> &str {
&self.service_config_id
}
pub fn clear_service_config_id(&mut self) {
self.service_config_id.clear();
}
pub fn set_service_config_id(&mut self, v: ::std::string::String) {
self.service_config_id = v;
}
pub fn mut_service_config_id(&mut self) -> &mut ::std::string::String {
&mut self.service_config_id
}
pub fn take_service_config_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.service_config_id, ::std::string::String::new())
}
}
impl ::protobuf::Message for AllocateQuotaRequest {
fn is_initialized(&self) -> bool {
for v in &self.allocate_operation {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.service_name)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.allocate_operation)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.service_config_id)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.service_name.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.service_name);
}
if let Some(ref v) = self.allocate_operation.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.service_config_id.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.service_config_id);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.service_name.is_empty() {
os.write_string(1, &self.service_name)?;
}
if let Some(ref v) = self.allocate_operation.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.service_config_id.is_empty() {
os.write_string(4, &self.service_config_id)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> AllocateQuotaRequest {
AllocateQuotaRequest::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"service_name",
|m: &AllocateQuotaRequest| { &m.service_name },
|m: &mut AllocateQuotaRequest| { &mut m.service_name },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<QuotaOperation>>(
"allocate_operation",
|m: &AllocateQuotaRequest| { &m.allocate_operation },
|m: &mut AllocateQuotaRequest| { &mut m.allocate_operation },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"service_config_id",
|m: &AllocateQuotaRequest| { &m.service_config_id },
|m: &mut AllocateQuotaRequest| { &mut m.service_config_id },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<AllocateQuotaRequest>(
"AllocateQuotaRequest",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static AllocateQuotaRequest {
static instance: ::protobuf::rt::LazyV2<AllocateQuotaRequest> = ::protobuf::rt::LazyV2::INIT;
instance.get(AllocateQuotaRequest::new)
}
}
impl ::protobuf::Clear for AllocateQuotaRequest {
fn clear(&mut self) {
self.service_name.clear();
self.allocate_operation.clear();
self.service_config_id.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for AllocateQuotaRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for AllocateQuotaRequest {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct QuotaOperation {
pub operation_id: ::std::string::String,
pub method_name: ::std::string::String,
pub consumer_id: ::std::string::String,
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
pub quota_metrics: ::protobuf::RepeatedField<super::metric_value::MetricValueSet>,
pub quota_mode: QuotaOperation_QuotaMode,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a QuotaOperation {
fn default() -> &'a QuotaOperation {
<QuotaOperation as ::protobuf::Message>::default_instance()
}
}
impl QuotaOperation {
pub fn new() -> QuotaOperation {
::std::default::Default::default()
}
pub fn get_operation_id(&self) -> &str {
&self.operation_id
}
pub fn clear_operation_id(&mut self) {
self.operation_id.clear();
}
pub fn set_operation_id(&mut self, v: ::std::string::String) {
self.operation_id = v;
}
pub fn mut_operation_id(&mut self) -> &mut ::std::string::String {
&mut self.operation_id
}
pub fn take_operation_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.operation_id, ::std::string::String::new())
}
pub fn get_method_name(&self) -> &str {
&self.method_name
}
pub fn clear_method_name(&mut self) {
self.method_name.clear();
}
pub fn set_method_name(&mut self, v: ::std::string::String) {
self.method_name = v;
}
pub fn mut_method_name(&mut self) -> &mut ::std::string::String {
&mut self.method_name
}
pub fn take_method_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.method_name, ::std::string::String::new())
}
pub fn get_consumer_id(&self) -> &str {
&self.consumer_id
}
pub fn clear_consumer_id(&mut self) {
self.consumer_id.clear();
}
pub fn set_consumer_id(&mut self, v: ::std::string::String) {
self.consumer_id = v;
}
pub fn mut_consumer_id(&mut self) -> &mut ::std::string::String {
&mut self.consumer_id
}
pub fn take_consumer_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.consumer_id, ::std::string::String::new())
}
pub fn get_labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
&self.labels
}
pub fn clear_labels(&mut self) {
self.labels.clear();
}
pub fn set_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) {
self.labels = v;
}
pub fn mut_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> {
&mut self.labels
}
pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new())
}
pub fn get_quota_metrics(&self) -> &[super::metric_value::MetricValueSet] {
&self.quota_metrics
}
pub fn clear_quota_metrics(&mut self) {
self.quota_metrics.clear();
}
pub fn set_quota_metrics(&mut self, v: ::protobuf::RepeatedField<super::metric_value::MetricValueSet>) {
self.quota_metrics = v;
}
pub fn mut_quota_metrics(&mut self) -> &mut ::protobuf::RepeatedField<super::metric_value::MetricValueSet> {
&mut self.quota_metrics
}
pub fn take_quota_metrics(&mut self) -> ::protobuf::RepeatedField<super::metric_value::MetricValueSet> {
::std::mem::replace(&mut self.quota_metrics, ::protobuf::RepeatedField::new())
}
pub fn get_quota_mode(&self) -> QuotaOperation_QuotaMode {
self.quota_mode
}
pub fn clear_quota_mode(&mut self) {
self.quota_mode = QuotaOperation_QuotaMode::UNSPECIFIED;
}
pub fn set_quota_mode(&mut self, v: QuotaOperation_QuotaMode) {
self.quota_mode = v;
}
}
impl ::protobuf::Message for QuotaOperation {
fn is_initialized(&self) -> bool {
for v in &self.quota_metrics {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.operation_id)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.method_name)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.consumer_id)?;
},
4 => {
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
},
5 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.quota_metrics)?;
},
6 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.quota_mode, 6, &mut self.unknown_fields)?
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.operation_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.operation_id);
}
if !self.method_name.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.method_name);
}
if !self.consumer_id.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.consumer_id);
}
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(4, &self.labels);
for value in &self.quota_metrics {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if self.quota_mode != QuotaOperation_QuotaMode::UNSPECIFIED {
my_size += ::protobuf::rt::enum_size(6, self.quota_mode);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.operation_id.is_empty() {
os.write_string(1, &self.operation_id)?;
}
if !self.method_name.is_empty() {
os.write_string(2, &self.method_name)?;
}
if !self.consumer_id.is_empty() {
os.write_string(3, &self.consumer_id)?;
}
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(4, &self.labels, os)?;
for v in &self.quota_metrics {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if self.quota_mode != QuotaOperation_QuotaMode::UNSPECIFIED {
os.write_enum(6, ::protobuf::ProtobufEnum::value(&self.quota_mode))?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> QuotaOperation {
QuotaOperation::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"operation_id",
|m: &QuotaOperation| { &m.operation_id },
|m: &mut QuotaOperation| { &mut m.operation_id },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"method_name",
|m: &QuotaOperation| { &m.method_name },
|m: &mut QuotaOperation| { &mut m.method_name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"consumer_id",
|m: &QuotaOperation| { &m.consumer_id },
|m: &mut QuotaOperation| { &mut m.consumer_id },
));
fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
"labels",
|m: &QuotaOperation| { &m.labels },
|m: &mut QuotaOperation| { &mut m.labels },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::metric_value::MetricValueSet>>(
"quota_metrics",
|m: &QuotaOperation| { &m.quota_metrics },
|m: &mut QuotaOperation| { &mut m.quota_metrics },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<QuotaOperation_QuotaMode>>(
"quota_mode",
|m: &QuotaOperation| { &m.quota_mode },
|m: &mut QuotaOperation| { &mut m.quota_mode },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<QuotaOperation>(
"QuotaOperation",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static QuotaOperation {
static instance: ::protobuf::rt::LazyV2<QuotaOperation> = ::protobuf::rt::LazyV2::INIT;
instance.get(QuotaOperation::new)
}
}
impl ::protobuf::Clear for QuotaOperation {
fn clear(&mut self) {
self.operation_id.clear();
self.method_name.clear();
self.consumer_id.clear();
self.labels.clear();
self.quota_metrics.clear();
self.quota_mode = QuotaOperation_QuotaMode::UNSPECIFIED;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for QuotaOperation {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for QuotaOperation {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum QuotaOperation_QuotaMode {
UNSPECIFIED = 0,
NORMAL = 1,
BEST_EFFORT = 2,
CHECK_ONLY = 3,
}
impl ::protobuf::ProtobufEnum for QuotaOperation_QuotaMode {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<QuotaOperation_QuotaMode> {
match value {
0 => ::std::option::Option::Some(QuotaOperation_QuotaMode::UNSPECIFIED),
1 => ::std::option::Option::Some(QuotaOperation_QuotaMode::NORMAL),
2 => ::std::option::Option::Some(QuotaOperation_QuotaMode::BEST_EFFORT),
3 => ::std::option::Option::Some(QuotaOperation_QuotaMode::CHECK_ONLY),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [QuotaOperation_QuotaMode] = &[
QuotaOperation_QuotaMode::UNSPECIFIED,
QuotaOperation_QuotaMode::NORMAL,
QuotaOperation_QuotaMode::BEST_EFFORT,
QuotaOperation_QuotaMode::CHECK_ONLY,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<QuotaOperation_QuotaMode>("QuotaOperation.QuotaMode", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for QuotaOperation_QuotaMode {
}
impl ::std::default::Default for QuotaOperation_QuotaMode {
fn default() -> Self {
QuotaOperation_QuotaMode::UNSPECIFIED
}
}
impl ::protobuf::reflect::ProtobufValue for QuotaOperation_QuotaMode {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
#[derive(PartialEq,Clone,Default)]
pub struct AllocateQuotaResponse {
pub operation_id: ::std::string::String,
pub allocate_errors: ::protobuf::RepeatedField<QuotaError>,
pub quota_metrics: ::protobuf::RepeatedField<super::metric_value::MetricValueSet>,
pub service_config_id: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a AllocateQuotaResponse {
fn default() -> &'a AllocateQuotaResponse {
<AllocateQuotaResponse as ::protobuf::Message>::default_instance()
}
}
impl AllocateQuotaResponse {
pub fn new() -> AllocateQuotaResponse {
::std::default::Default::default()
}
pub fn get_operation_id(&self) -> &str {
&self.operation_id
}
pub fn clear_operation_id(&mut self) {
self.operation_id.clear();
}
pub fn set_operation_id(&mut self, v: ::std::string::String) {
self.operation_id = v;
}
pub fn mut_operation_id(&mut self) -> &mut ::std::string::String {
&mut self.operation_id
}
pub fn take_operation_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.operation_id, ::std::string::String::new())
}
pub fn get_allocate_errors(&self) -> &[QuotaError] {
&self.allocate_errors
}
pub fn clear_allocate_errors(&mut self) {
self.allocate_errors.clear();
}
pub fn set_allocate_errors(&mut self, v: ::protobuf::RepeatedField<QuotaError>) {
self.allocate_errors = v;
}
pub fn mut_allocate_errors(&mut self) -> &mut ::protobuf::RepeatedField<QuotaError> {
&mut self.allocate_errors
}
pub fn take_allocate_errors(&mut self) -> ::protobuf::RepeatedField<QuotaError> {
::std::mem::replace(&mut self.allocate_errors, ::protobuf::RepeatedField::new())
}
pub fn get_quota_metrics(&self) -> &[super::metric_value::MetricValueSet] {
&self.quota_metrics
}
pub fn clear_quota_metrics(&mut self) {
self.quota_metrics.clear();
}
pub fn set_quota_metrics(&mut self, v: ::protobuf::RepeatedField<super::metric_value::MetricValueSet>) {
self.quota_metrics = v;
}
pub fn mut_quota_metrics(&mut self) -> &mut ::protobuf::RepeatedField<super::metric_value::MetricValueSet> {
&mut self.quota_metrics
}
pub fn take_quota_metrics(&mut self) -> ::protobuf::RepeatedField<super::metric_value::MetricValueSet> {
::std::mem::replace(&mut self.quota_metrics, ::protobuf::RepeatedField::new())
}
pub fn get_service_config_id(&self) -> &str {
&self.service_config_id
}
pub fn clear_service_config_id(&mut self) {
self.service_config_id.clear();
}
pub fn set_service_config_id(&mut self, v: ::std::string::String) {
self.service_config_id = v;
}
pub fn mut_service_config_id(&mut self) -> &mut ::std::string::String {
&mut self.service_config_id
}
pub fn take_service_config_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.service_config_id, ::std::string::String::new())
}
}
impl ::protobuf::Message for AllocateQuotaResponse {
fn is_initialized(&self) -> bool {
for v in &self.allocate_errors {
if !v.is_initialized() {
return false;
}
};
for v in &self.quota_metrics {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.operation_id)?;
},
2 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.allocate_errors)?;
},
3 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.quota_metrics)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.service_config_id)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.operation_id.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.operation_id);
}
for value in &self.allocate_errors {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
for value in &self.quota_metrics {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if !self.service_config_id.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.service_config_id);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.operation_id.is_empty() {
os.write_string(1, &self.operation_id)?;
}
for v in &self.allocate_errors {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
for v in &self.quota_metrics {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if !self.service_config_id.is_empty() {
os.write_string(4, &self.service_config_id)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> AllocateQuotaResponse {
AllocateQuotaResponse::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"operation_id",
|m: &AllocateQuotaResponse| { &m.operation_id },
|m: &mut AllocateQuotaResponse| { &mut m.operation_id },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<QuotaError>>(
"allocate_errors",
|m: &AllocateQuotaResponse| { &m.allocate_errors },
|m: &mut AllocateQuotaResponse| { &mut m.allocate_errors },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::metric_value::MetricValueSet>>(
"quota_metrics",
|m: &AllocateQuotaResponse| { &m.quota_metrics },
|m: &mut AllocateQuotaResponse| { &mut m.quota_metrics },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"service_config_id",
|m: &AllocateQuotaResponse| { &m.service_config_id },
|m: &mut AllocateQuotaResponse| { &mut m.service_config_id },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<AllocateQuotaResponse>(
"AllocateQuotaResponse",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static AllocateQuotaResponse {
static instance: ::protobuf::rt::LazyV2<AllocateQuotaResponse> = ::protobuf::rt::LazyV2::INIT;
instance.get(AllocateQuotaResponse::new)
}
}
impl ::protobuf::Clear for AllocateQuotaResponse {
fn clear(&mut self) {
self.operation_id.clear();
self.allocate_errors.clear();
self.quota_metrics.clear();
self.service_config_id.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for AllocateQuotaResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for AllocateQuotaResponse {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct QuotaError {
pub code: QuotaError_Code,
pub subject: ::std::string::String,
pub description: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a QuotaError {
fn default() -> &'a QuotaError {
<QuotaError as ::protobuf::Message>::default_instance()
}
}
impl QuotaError {
pub fn new() -> QuotaError {
::std::default::Default::default()
}
pub fn get_code(&self) -> QuotaError_Code {
self.code
}
pub fn clear_code(&mut self) {
self.code = QuotaError_Code::UNSPECIFIED;
}
pub fn set_code(&mut self, v: QuotaError_Code) {
self.code = v;
}
pub fn get_subject(&self) -> &str {
&self.subject
}
pub fn clear_subject(&mut self) {
self.subject.clear();
}
pub fn set_subject(&mut self, v: ::std::string::String) {
self.subject = v;
}
pub fn mut_subject(&mut self) -> &mut ::std::string::String {
&mut self.subject
}
pub fn take_subject(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.subject, ::std::string::String::new())
}
pub fn get_description(&self) -> &str {
&self.description
}
pub fn clear_description(&mut self) {
self.description.clear();
}
pub fn set_description(&mut self, v: ::std::string::String) {
self.description = v;
}
pub fn mut_description(&mut self) -> &mut ::std::string::String {
&mut self.description
}
pub fn take_description(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.description, ::std::string::String::new())
}
}
impl ::protobuf::Message for QuotaError {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subject)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.code != QuotaError_Code::UNSPECIFIED {
my_size += ::protobuf::rt::enum_size(1, self.code);
}
if !self.subject.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.subject);
}
if !self.description.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.description);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.code != QuotaError_Code::UNSPECIFIED {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.code))?;
}
if !self.subject.is_empty() {
os.write_string(2, &self.subject)?;
}
if !self.description.is_empty() {
os.write_string(3, &self.description)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> QuotaError {
QuotaError::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<QuotaError_Code>>(
"code",
|m: &QuotaError| { &m.code },
|m: &mut QuotaError| { &mut m.code },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"subject",
|m: &QuotaError| { &m.subject },
|m: &mut QuotaError| { &mut m.subject },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"description",
|m: &QuotaError| { &m.description },
|m: &mut QuotaError| { &mut m.description },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<QuotaError>(
"QuotaError",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static QuotaError {
static instance: ::protobuf::rt::LazyV2<QuotaError> = ::protobuf::rt::LazyV2::INIT;
instance.get(QuotaError::new)
}
}
impl ::protobuf::Clear for QuotaError {
fn clear(&mut self) {
self.code = QuotaError_Code::UNSPECIFIED;
self.subject.clear();
self.description.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for QuotaError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for QuotaError {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum QuotaError_Code {
UNSPECIFIED = 0,
RESOURCE_EXHAUSTED = 8,
BILLING_NOT_ACTIVE = 107,
PROJECT_DELETED = 108,
API_KEY_INVALID = 105,
API_KEY_EXPIRED = 112,
}
impl ::protobuf::ProtobufEnum for QuotaError_Code {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<QuotaError_Code> {
match value {
0 => ::std::option::Option::Some(QuotaError_Code::UNSPECIFIED),
8 => ::std::option::Option::Some(QuotaError_Code::RESOURCE_EXHAUSTED),
107 => ::std::option::Option::Some(QuotaError_Code::BILLING_NOT_ACTIVE),
108 => ::std::option::Option::Some(QuotaError_Code::PROJECT_DELETED),
105 => ::std::option::Option::Some(QuotaError_Code::API_KEY_INVALID),
112 => ::std::option::Option::Some(QuotaError_Code::API_KEY_EXPIRED),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [QuotaError_Code] = &[
QuotaError_Code::UNSPECIFIED,
QuotaError_Code::RESOURCE_EXHAUSTED,
QuotaError_Code::BILLING_NOT_ACTIVE,
QuotaError_Code::PROJECT_DELETED,
QuotaError_Code::API_KEY_INVALID,
QuotaError_Code::API_KEY_EXPIRED,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<QuotaError_Code>("QuotaError.Code", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for QuotaError_Code {
}
impl ::std::default::Default for QuotaError_Code {
fn default() -> Self {
QuotaError_Code::UNSPECIFIED
}
}
impl ::protobuf::reflect::ProtobufValue for QuotaError_Code {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n3google/api/servicecontrol/v1/quota_controller.proto\x12\x1cgoogle.api\
.servicecontrol.v1\x1a\x1cgoogle/api/annotations.proto\x1a/google/api/se\
rvicecontrol/v1/metric_value.proto\"\xc2\x01\n\x14AllocateQuotaRequest\
\x12!\n\x0cservice_name\x18\x01\x20\x01(\tR\x0bserviceName\x12[\n\x12all\
ocate_operation\x18\x02\x20\x01(\x0b2,.google.api.servicecontrol.v1.Quot\
aOperationR\x11allocateOperation\x12*\n\x11service_config_id\x18\x04\x20\
\x01(\tR\x0fserviceConfigId\"\xf7\x03\n\x0eQuotaOperation\x12!\n\x0coper\
ation_id\x18\x01\x20\x01(\tR\x0boperationId\x12\x1f\n\x0bmethod_name\x18\
\x02\x20\x01(\tR\nmethodName\x12\x1f\n\x0bconsumer_id\x18\x03\x20\x01(\t\
R\nconsumerId\x12P\n\x06labels\x18\x04\x20\x03(\x0b28.google.api.service\
control.v1.QuotaOperation.LabelsEntryR\x06labels\x12Q\n\rquota_metrics\
\x18\x05\x20\x03(\x0b2,.google.api.servicecontrol.v1.MetricValueSetR\x0c\
quotaMetrics\x12U\n\nquota_mode\x18\x06\x20\x01(\x0e26.google.api.servic\
econtrol.v1.QuotaOperation.QuotaModeR\tquotaMode\x1a9\n\x0bLabelsEntry\
\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\
\x20\x01(\tR\x05value:\x028\x01\"I\n\tQuotaMode\x12\x0f\n\x0bUNSPECIFIED\
\x10\0\x12\n\n\x06NORMAL\x10\x01\x12\x0f\n\x0bBEST_EFFORT\x10\x02\x12\
\x0e\n\nCHECK_ONLY\x10\x03\"\x8c\x02\n\x15AllocateQuotaResponse\x12!\n\
\x0coperation_id\x18\x01\x20\x01(\tR\x0boperationId\x12Q\n\x0fallocate_e\
rrors\x18\x02\x20\x03(\x0b2(.google.api.servicecontrol.v1.QuotaErrorR\
\x0eallocateErrors\x12Q\n\rquota_metrics\x18\x03\x20\x03(\x0b2,.google.a\
pi.servicecontrol.v1.MetricValueSetR\x0cquotaMetrics\x12*\n\x11service_c\
onfig_id\x18\x04\x20\x01(\tR\x0fserviceConfigId\"\x94\x02\n\nQuotaError\
\x12A\n\x04code\x18\x01\x20\x01(\x0e2-.google.api.servicecontrol.v1.Quot\
aError.CodeR\x04code\x12\x18\n\x07subject\x18\x02\x20\x01(\tR\x07subject\
\x12\x20\n\x0bdescription\x18\x03\x20\x01(\tR\x0bdescription\"\x86\x01\n\
\x04Code\x12\x0f\n\x0bUNSPECIFIED\x10\0\x12\x16\n\x12RESOURCE_EXHAUSTED\
\x10\x08\x12\x16\n\x12BILLING_NOT_ACTIVE\x10k\x12\x13\n\x0fPROJECT_DELET\
ED\x10l\x12\x13\n\x0fAPI_KEY_INVALID\x10i\x12\x13\n\x0fAPI_KEY_EXPIRED\
\x10p2\xc2\x01\n\x0fQuotaController\x12\xae\x01\n\rAllocateQuota\x122.go\
ogle.api.servicecontrol.v1.AllocateQuotaRequest\x1a3.google.api.servicec\
ontrol.v1.AllocateQuotaResponse\"4\x82\xd3\xe4\x93\x02.\")/v1/services/{\
service_name}:allocateQuota:\x01*B\x89\x01\n\x20com.google.api.serviceco\
ntrol.v1B\x14QuotaControllerProtoP\x01ZJgoogle.golang.org/genproto/googl\
eapis/api/servicecontrol/v1;servicecontrol\xf8\x01\x01J\xf3=\n\x07\x12\
\x05\x0e\0\xcd\x01\x01\n\xbd\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb2\x04\
\x20Copyright\x202017\x20Google\x20Inc.\n\n\x20Licensed\x20under\x20the\
\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20y\
ou\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20compliance\
\x20with\x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\
\x20the\x20License\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/li\
censes/LICENSE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\
\x20or\x20agreed\x20to\x20in\x20writing,\x20software\n\x20distributed\
\x20under\x20the\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20\
IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20A\
NY\x20KIND,\x20either\x20express\x20or\x20implied.\n\x20See\x20the\x20Li\
cense\x20for\x20the\x20specific\x20language\x20governing\x20permissions\
\x20and\n\x20limitations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\
\x12\x03\x10\0%\n\t\n\x02\x03\0\x12\x03\x12\0&\n\t\n\x02\x03\x01\x12\x03\
\x13\09\n\x08\n\x01\x08\x12\x03\x15\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x15\
\0\x1f\n\x08\n\x01\x08\x12\x03\x16\0a\n\t\n\x02\x08\x0b\x12\x03\x16\0a\n\
\x08\n\x01\x08\x12\x03\x17\0\"\n\t\n\x02\x08\n\x12\x03\x17\0\"\n\x08\n\
\x01\x08\x12\x03\x18\05\n\t\n\x02\x08\x08\x12\x03\x18\05\n\x08\n\x01\x08\
\x12\x03\x19\09\n\t\n\x02\x08\x01\x12\x03\x19\09\n\x9b\x02\n\x02\x06\0\
\x12\x04\x1f\01\x01\x1a\x8e\x02\x20[Google\x20Quota\x20Control\x20API](/\
service-control/overview)\n\n\x20Allows\x20clients\x20to\x20allocate\x20\
and\x20release\x20quota\x20against\x20a\x20[managed\n\x20service](https:\
//cloud.google.com/service-management/reference/rpc/google.api/servicema\
nagement.v1#google.api.servicemanagement.v1.ManagedService).\n\n\n\n\x03\
\x06\0\x01\x12\x03\x1f\x08\x17\n\xa2\x04\n\x04\x06\0\x02\0\x12\x04+\x020\
\x03\x1a\x93\x04\x20Attempts\x20to\x20allocate\x20quota\x20for\x20the\
\x20specified\x20consumer.\x20It\x20should\x20be\x20called\n\x20before\
\x20the\x20operation\x20is\x20executed.\n\n\x20This\x20method\x20require\
s\x20the\x20`servicemanagement.services.quota`\n\x20permission\x20on\x20\
the\x20specified\x20service.\x20For\x20more\x20information,\x20see\n\x20\
[Cloud\x20IAM](https://cloud.google.com/iam).\n\n\x20**NOTE:**\x20The\
\x20client\x20**must**\x20fail-open\x20on\x20server\x20errors\x20`INTERN\
AL`,\n\x20`UNKNOWN`,\x20`DEADLINE_EXCEEDED`,\x20and\x20`UNAVAILABLE`.\
\x20To\x20ensure\x20system\n\x20reliability,\x20the\x20server\x20may\x20\
inject\x20these\x20errors\x20to\x20prohibit\x20any\x20hard\n\x20dependen\
cy\x20on\x20the\x20quota\x20functionality.\n\n\x0c\n\x05\x06\0\x02\0\x01\
\x12\x03+\x06\x13\n\x0c\n\x05\x06\0\x02\0\x02\x12\x03+\x14(\n\x0c\n\x05\
\x06\0\x02\0\x03\x12\x03+3H\n\r\n\x05\x06\0\x02\0\x04\x12\x04,\x04/\x06\
\n\x11\n\t\x06\0\x02\0\x04\xb0\xca\xbc\"\x12\x04,\x04/\x06\n;\n\x02\x04\
\0\x12\x044\0C\x01\x1a/\x20Request\x20message\x20for\x20the\x20AllocateQ\
uota\x20method.\n\n\n\n\x03\x04\0\x01\x12\x034\x08\x1c\n\xcd\x01\n\x04\
\x04\0\x02\0\x12\x03:\x02\x1a\x1a\xbf\x01\x20Name\x20of\x20the\x20servic\
e\x20as\x20specified\x20in\x20the\x20service\x20configuration.\x20For\
\x20example,\n\x20`\"pubsub.googleapis.com\"`.\n\n\x20See\x20[google.api\
.Service][google.api.Service]\x20for\x20the\x20definition\x20of\x20a\n\
\x20service\x20name.\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03:\x02\x08\n\
\x0c\n\x05\x04\0\x02\0\x01\x12\x03:\t\x15\n\x0c\n\x05\x04\0\x02\0\x03\
\x12\x03:\x18\x19\n=\n\x04\x04\0\x02\x01\x12\x03=\x02(\x1a0\x20Operation\
\x20that\x20describes\x20the\x20quota\x20allocation.\n\n\x0c\n\x05\x04\0\
\x02\x01\x06\x12\x03=\x02\x10\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03=\x11\
#\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03=&'\n\xba\x01\n\x04\x04\0\x02\x02\
\x12\x03B\x02\x1f\x1a\xac\x01\x20Specifies\x20which\x20version\x20of\x20\
service\x20configuration\x20should\x20be\x20used\x20to\x20process\n\x20t\
he\x20request.\x20If\x20unspecified\x20or\x20no\x20matching\x20version\
\x20can\x20be\x20found,\x20the\x20latest\n\x20one\x20will\x20be\x20used.\
\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03B\x02\x08\n\x0c\n\x05\x04\0\x02\
\x02\x01\x12\x03B\t\x1a\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03B\x1d\x1e\n\
B\n\x02\x04\x01\x12\x05F\0\x8a\x01\x01\x1a5\x20Represents\x20information\
\x20regarding\x20a\x20quota\x20operation.\n\n\n\n\x03\x04\x01\x01\x12\
\x03F\x08\x16\n&\n\x04\x04\x01\x04\0\x12\x04H\x02\\\x03\x1a\x18\x20Suppo\
rted\x20quota\x20modes.\n\n\x0c\n\x05\x04\x01\x04\0\x01\x12\x03H\x07\x10\
\nB\n\x06\x04\x01\x04\0\x02\0\x12\x03J\x04\x14\x1a3\x20Guard\x20against\
\x20implicit\x20default.\x20Must\x20not\x20be\x20used.\n\n\x0e\n\x07\x04\
\x01\x04\0\x02\0\x01\x12\x03J\x04\x0f\n\x0e\n\x07\x04\x01\x04\0\x02\0\
\x02\x12\x03J\x12\x13\n\x8f\x02\n\x06\x04\x01\x04\0\x02\x01\x12\x03P\x04\
\x0f\x1a\xff\x01\x20For\x20AllocateQuota\x20request,\x20allocates\x20quo\
ta\x20for\x20the\x20amount\x20specified\x20in\n\x20the\x20service\x20con\
figuration\x20or\x20specified\x20using\x20the\x20quota\x20metrics.\x20If\
\x20the\n\x20amount\x20is\x20higher\x20than\x20the\x20available\x20quota\
,\x20allocation\x20error\x20will\x20be\n\x20returned\x20and\x20no\x20quo\
ta\x20will\x20be\x20allocated.\n\n\x0e\n\x07\x04\x01\x04\0\x02\x01\x01\
\x12\x03P\x04\n\n\x0e\n\x07\x04\x01\x04\0\x02\x01\x02\x12\x03P\r\x0e\n\
\x81\x02\n\x06\x04\x01\x04\0\x02\x02\x12\x03V\x04\x14\x1a\xf1\x01\x20The\
\x20operation\x20allocates\x20quota\x20for\x20the\x20amount\x20specified\
\x20in\x20the\x20service\n\x20configuration\x20or\x20specified\x20using\
\x20the\x20quota\x20metrics.\x20If\x20the\x20amount\x20is\n\x20higher\
\x20than\x20the\x20available\x20quota,\x20request\x20does\x20not\x20fail\
\x20but\x20all\x20available\n\x20quota\x20will\x20be\x20allocated.\n\n\
\x0e\n\x07\x04\x01\x04\0\x02\x02\x01\x12\x03V\x04\x0f\n\x0e\n\x07\x04\
\x01\x04\0\x02\x02\x02\x12\x03V\x12\x13\n\xb7\x01\n\x06\x04\x01\x04\0\
\x02\x03\x12\x03[\x04\x13\x1a\xa7\x01\x20For\x20AllocateQuota\x20request\
,\x20only\x20checks\x20if\x20there\x20is\x20enough\x20quota\n\x20availab\
le\x20and\x20does\x20not\x20change\x20the\x20available\x20quota.\x20No\
\x20lock\x20is\x20placed\x20on\n\x20the\x20available\x20quota\x20either.\
\n\n\x0e\n\x07\x04\x01\x04\0\x02\x03\x01\x12\x03[\x04\x0e\n\x0e\n\x07\
\x04\x01\x04\0\x02\x03\x02\x12\x03[\x11\x12\n\xac\x03\n\x04\x04\x01\x02\
\0\x12\x03f\x02\x1a\x1a\x9e\x03\x20Identity\x20of\x20the\x20operation.\
\x20This\x20is\x20expected\x20to\x20be\x20unique\x20within\x20the\x20sco\
pe\n\x20of\x20the\x20service\x20that\x20generated\x20the\x20operation,\
\x20and\x20guarantees\x20idempotency\x20in\n\x20case\x20of\x20retries.\n\
\n\x20UUID\x20version\x204\x20is\x20recommended,\x20though\x20not\x20req\
uired.\x20In\x20scenarios\x20where\x20an\n\x20operation\x20is\x20compute\
d\x20from\x20existing\x20information\x20and\x20an\x20idempotent\x20id\
\x20is\n\x20desirable\x20for\x20deduplication\x20purpose,\x20UUID\x20ver\
sion\x205\x20is\x20recommended.\x20See\n\x20RFC\x204122\x20for\x20detail\
s.\n\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03f\x02\x08\n\x0c\n\x05\x04\x01\
\x02\0\x01\x12\x03f\t\x15\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03f\x18\x19\
\n\x8c\x03\n\x04\x04\x01\x02\x01\x12\x03o\x02\x19\x1a\xfe\x02\x20Fully\
\x20qualified\x20name\x20of\x20the\x20API\x20method\x20for\x20which\x20t\
his\x20quota\x20operation\x20is\n\x20requested.\x20This\x20name\x20is\
\x20used\x20for\x20matching\x20quota\x20rules\x20or\x20metric\x20rules\
\x20and\n\x20billing\x20status\x20rules\x20defined\x20in\x20service\x20c\
onfiguration.\x20This\x20field\x20is\x20not\n\x20required\x20if\x20the\
\x20quota\x20operation\x20is\x20performed\x20on\x20non-API\x20resources.\
\n\n\x20Example\x20of\x20an\x20RPC\x20method\x20name:\n\x20\x20\x20\x20\
\x20google.example.library.v1.LibraryService.CreateShelf\n\n\x0c\n\x05\
\x04\x01\x02\x01\x05\x12\x03o\x02\x08\n\x0c\n\x05\x04\x01\x02\x01\x01\
\x12\x03o\t\x14\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03o\x17\x18\n\xdc\
\x01\n\x04\x04\x01\x02\x02\x12\x03w\x02\x19\x1a\xce\x01\x20Identity\x20o\
f\x20the\x20consumer\x20for\x20whom\x20this\x20quota\x20operation\x20is\
\x20being\x20performed.\n\n\x20This\x20can\x20be\x20in\x20one\x20of\x20t\
he\x20following\x20formats:\n\x20\x20\x20project:<project_id>,\n\x20\x20\
\x20project_number:<project_number>,\n\x20\x20\x20api_key:<api_key>.\n\n\
\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03w\x02\x08\n\x0c\n\x05\x04\x01\x02\
\x02\x01\x12\x03w\t\x14\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03w\x17\x18\
\n/\n\x04\x04\x01\x02\x03\x12\x03z\x02!\x1a\"\x20Labels\x20describing\
\x20the\x20operation.\n\n\x0c\n\x05\x04\x01\x02\x03\x06\x12\x03z\x02\x15\
\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03z\x16\x1c\n\x0c\n\x05\x04\x01\
\x02\x03\x03\x12\x03z\x1f\x20\n\x9b\x04\n\x04\x04\x01\x02\x04\x12\x04\
\x86\x01\x02,\x1a\x8c\x04\x20Represents\x20information\x20about\x20this\
\x20operation.\x20Each\x20MetricValueSet\n\x20corresponds\x20to\x20a\x20\
metric\x20defined\x20in\x20the\x20service\x20configuration.\n\x20The\x20\
data\x20type\x20used\x20in\x20the\x20MetricValueSet\x20must\x20agree\x20\
with\n\x20the\x20data\x20type\x20specified\x20in\x20the\x20metric\x20def\
inition.\n\n\x20Within\x20a\x20single\x20operation,\x20it\x20is\x20not\
\x20allowed\x20to\x20have\x20more\x20than\x20one\n\x20MetricValue\x20ins\
tances\x20that\x20have\x20the\x20same\x20metric\x20names\x20and\x20ident\
ical\n\x20label\x20value\x20combinations.\x20If\x20a\x20request\x20has\
\x20such\x20duplicated\x20MetricValue\n\x20instances,\x20the\x20entire\
\x20request\x20is\x20rejected\x20with\n\x20an\x20invalid\x20argument\x20\
error.\n\n\r\n\x05\x04\x01\x02\x04\x04\x12\x04\x86\x01\x02\n\n\r\n\x05\
\x04\x01\x02\x04\x06\x12\x04\x86\x01\x0b\x19\n\r\n\x05\x04\x01\x02\x04\
\x01\x12\x04\x86\x01\x1a'\n\r\n\x05\x04\x01\x02\x04\x03\x12\x04\x86\x01*\
+\n.\n\x04\x04\x01\x02\x05\x12\x04\x89\x01\x02\x1b\x1a\x20\x20Quota\x20m\
ode\x20for\x20this\x20operation.\n\n\r\n\x05\x04\x01\x02\x05\x06\x12\x04\
\x89\x01\x02\x0b\n\r\n\x05\x04\x01\x02\x05\x01\x12\x04\x89\x01\x0c\x16\n\
\r\n\x05\x04\x01\x02\x05\x03\x12\x04\x89\x01\x19\x1a\n>\n\x02\x04\x02\
\x12\x06\x8d\x01\0\xa3\x01\x01\x1a0\x20Response\x20message\x20for\x20the\
\x20AllocateQuota\x20method.\n\n\x0b\n\x03\x04\x02\x01\x12\x04\x8d\x01\
\x08\x1d\ny\n\x04\x04\x02\x02\0\x12\x04\x90\x01\x02\x1a\x1ak\x20The\x20s\
ame\x20operation_id\x20value\x20used\x20in\x20the\x20AllocateQuotaReques\
t.\x20Used\x20for\n\x20logging\x20and\x20diagnostics\x20purposes.\n\n\r\
\n\x05\x04\x02\x02\0\x05\x12\x04\x90\x01\x02\x08\n\r\n\x05\x04\x02\x02\0\
\x01\x12\x04\x90\x01\t\x15\n\r\n\x05\x04\x02\x02\0\x03\x12\x04\x90\x01\
\x18\x19\n7\n\x04\x04\x02\x02\x01\x12\x04\x93\x01\x02*\x1a)\x20Indicates\
\x20the\x20decision\x20of\x20the\x20allocate.\n\n\r\n\x05\x04\x02\x02\
\x01\x04\x12\x04\x93\x01\x02\n\n\r\n\x05\x04\x02\x02\x01\x06\x12\x04\x93\
\x01\x0b\x15\n\r\n\x05\x04\x02\x02\x01\x01\x12\x04\x93\x01\x16%\n\r\n\
\x05\x04\x02\x02\x01\x03\x12\x04\x93\x01()\n\xd9\x03\n\x04\x04\x02\x02\
\x02\x12\x04\x9f\x01\x02,\x1a\xca\x03\x20Quota\x20metrics\x20to\x20indic\
ate\x20the\x20result\x20of\x20allocation.\x20Depending\x20on\x20the\n\
\x20request,\x20one\x20or\x20more\x20of\x20the\x20following\x20metrics\
\x20will\x20be\x20included:\n\n\x201.\x20Per\x20quota\x20group\x20or\x20\
per\x20quota\x20metric\x20incremental\x20usage\x20will\x20be\x20specifie\
d\n\x20using\x20the\x20following\x20delta\x20metric\x20:\n\x20\x20\x20\"\
serviceruntime.googleapis.com/api/consumer/quota_used_count\"\n\n\x202.\
\x20The\x20quota\x20limit\x20reached\x20condition\x20will\x20be\x20speci\
fied\x20using\x20the\x20following\n\x20boolean\x20metric\x20:\n\x20\x20\
\x20\"serviceruntime.googleapis.com/quota/exceeded\"\n\n\r\n\x05\x04\x02\
\x02\x02\x04\x12\x04\x9f\x01\x02\n\n\r\n\x05\x04\x02\x02\x02\x06\x12\x04\
\x9f\x01\x0b\x19\n\r\n\x05\x04\x02\x02\x02\x01\x12\x04\x9f\x01\x1a'\n\r\
\n\x05\x04\x02\x02\x02\x03\x12\x04\x9f\x01*+\nD\n\x04\x04\x02\x02\x03\
\x12\x04\xa2\x01\x02\x1f\x1a6\x20ID\x20of\x20the\x20actual\x20config\x20\
used\x20to\x20process\x20the\x20request.\n\n\r\n\x05\x04\x02\x02\x03\x05\
\x12\x04\xa2\x01\x02\x08\n\r\n\x05\x04\x02\x02\x03\x01\x12\x04\xa2\x01\t\
\x1a\n\r\n\x05\x04\x02\x02\x03\x03\x12\x04\xa2\x01\x1d\x1e\np\n\x02\x04\
\x03\x12\x06\xa7\x01\0\xcd\x01\x01\x1ab\x20Represents\x20error\x20inform\
ation\x20for\n\x20[QuotaOperation][google.api.servicecontrol.v1.QuotaOpe\
ration].\n\n\x0b\n\x03\x04\x03\x01\x12\x04\xa7\x01\x08\x12\n\xfe\x02\n\
\x04\x04\x03\x04\0\x12\x06\xad\x01\x02\xc1\x01\x03\x1a\xed\x02\x20Error\
\x20codes\x20related\x20to\x20project\x20config\x20validations\x20are\
\x20deprecated\x20since\x20the\n\x20quota\x20controller\x20methods\x20do\
\x20not\x20perform\x20these\x20validations.\x20Instead\x20services\n\x20\
have\x20to\x20call\x20the\x20Check\x20method,\x20without\x20quota_proper\
ties\x20field,\x20to\x20perform\n\x20these\x20validations\x20before\x20c\
alling\x20the\x20quota\x20controller\x20methods.\x20These\n\x20methods\
\x20check\x20only\x20for\x20project\x20deletion\x20to\x20be\x20wipe\x20o\
ut\x20compliant.\n\n\r\n\x05\x04\x03\x04\0\x01\x12\x04\xad\x01\x07\x0b\n\
%\n\x06\x04\x03\x04\0\x02\0\x12\x04\xaf\x01\x04\x14\x1a\x15\x20This\x20i\
s\x20never\x20used.\n\n\x0f\n\x07\x04\x03\x04\0\x02\0\x01\x12\x04\xaf\
\x01\x04\x0f\n\x0f\n\x07\x04\x03\x04\0\x02\0\x02\x12\x04\xaf\x01\x12\x13\
\n[\n\x06\x04\x03\x04\0\x02\x01\x12\x04\xb3\x01\x04\x1b\x1aK\x20Quota\
\x20allocation\x20failed.\n\x20Same\x20as\x20[google.rpc.Code.RESOURCE_E\
XHAUSTED][].\n\n\x0f\n\x07\x04\x03\x04\0\x02\x01\x01\x12\x04\xb3\x01\x04\
\x16\n\x0f\n\x07\x04\x03\x04\0\x02\x01\x02\x12\x04\xb3\x01\x19\x1a\nb\n\
\x06\x04\x03\x04\0\x02\x02\x12\x04\xb7\x01\x04\x1d\x1aR\x20Consumer\x20c\
annot\x20access\x20the\x20service\x20because\x20the\x20service\x20requir\
es\x20active\n\x20billing.\n\n\x0f\n\x07\x04\x03\x04\0\x02\x02\x01\x12\
\x04\xb7\x01\x04\x16\n\x0f\n\x07\x04\x03\x04\0\x02\x02\x02\x12\x04\xb7\
\x01\x19\x1c\nP\n\x06\x04\x03\x04\0\x02\x03\x12\x04\xba\x01\x04\x1a\x1a@\
\x20Consumer's\x20project\x20has\x20been\x20marked\x20as\x20deleted\x20(\
soft\x20deletion).\n\n\x0f\n\x07\x04\x03\x04\0\x02\x03\x01\x12\x04\xba\
\x01\x04\x13\n\x0f\n\x07\x04\x03\x04\0\x02\x03\x02\x12\x04\xba\x01\x16\
\x19\n/\n\x06\x04\x03\x04\0\x02\x04\x12\x04\xbd\x01\x04\x1a\x1a\x1f\x20S\
pecified\x20API\x20key\x20is\x20invalid.\n\n\x0f\n\x07\x04\x03\x04\0\x02\
\x04\x01\x12\x04\xbd\x01\x04\x13\n\x0f\n\x07\x04\x03\x04\0\x02\x04\x02\
\x12\x04\xbd\x01\x16\x19\n0\n\x06\x04\x03\x04\0\x02\x05\x12\x04\xc0\x01\
\x04\x1a\x1a\x20\x20Specified\x20API\x20Key\x20has\x20expired.\n\n\x0f\n\
\x07\x04\x03\x04\0\x02\x05\x01\x12\x04\xc0\x01\x04\x13\n\x0f\n\x07\x04\
\x03\x04\0\x02\x05\x02\x12\x04\xc0\x01\x16\x19\n\x1b\n\x04\x04\x03\x02\0\
\x12\x04\xc4\x01\x02\x10\x1a\r\x20Error\x20code.\n\n\r\n\x05\x04\x03\x02\
\0\x06\x12\x04\xc4\x01\x02\x06\n\r\n\x05\x04\x03\x02\0\x01\x12\x04\xc4\
\x01\x07\x0b\n\r\n\x05\x04\x03\x02\0\x03\x12\x04\xc4\x01\x0e\x0f\n\xc7\
\x01\n\x04\x04\x03\x02\x01\x12\x04\xc9\x01\x02\x15\x1a\xb8\x01\x20Subjec\
t\x20to\x20whom\x20this\x20error\x20applies.\x20See\x20the\x20specific\
\x20enum\x20for\x20more\x20details\n\x20on\x20this\x20field.\x20For\x20e\
xample,\x20\"clientip:<ip\x20address\x20of\x20client>\"\x20or\n\x20\"pro\
ject:<Google\x20developer\x20project\x20id>\".\n\n\r\n\x05\x04\x03\x02\
\x01\x05\x12\x04\xc9\x01\x02\x08\n\r\n\x05\x04\x03\x02\x01\x01\x12\x04\
\xc9\x01\t\x10\n\r\n\x05\x04\x03\x02\x01\x03\x12\x04\xc9\x01\x13\x14\nO\
\n\x04\x04\x03\x02\x02\x12\x04\xcc\x01\x02\x19\x1aA\x20Free-form\x20text\
\x20that\x20provides\x20details\x20on\x20the\x20cause\x20of\x20the\x20er\
ror.\n\n\r\n\x05\x04\x03\x02\x02\x05\x12\x04\xcc\x01\x02\x08\n\r\n\x05\
\x04\x03\x02\x02\x01\x12\x04\xcc\x01\t\x14\n\r\n\x05\x04\x03\x02\x02\x03\
\x12\x04\xcc\x01\x17\x18b\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}