#![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 Control {
pub environment: ::std::string::String,
pub method_policies: ::protobuf::RepeatedField<super::policy::MethodPolicy>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Control {
fn default() -> &'a Control {
<Control as ::protobuf::Message>::default_instance()
}
}
impl Control {
pub fn new() -> Control {
::std::default::Default::default()
}
pub fn get_environment(&self) -> &str {
&self.environment
}
pub fn clear_environment(&mut self) {
self.environment.clear();
}
pub fn set_environment(&mut self, v: ::std::string::String) {
self.environment = v;
}
pub fn mut_environment(&mut self) -> &mut ::std::string::String {
&mut self.environment
}
pub fn take_environment(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.environment, ::std::string::String::new())
}
pub fn get_method_policies(&self) -> &[super::policy::MethodPolicy] {
&self.method_policies
}
pub fn clear_method_policies(&mut self) {
self.method_policies.clear();
}
pub fn set_method_policies(&mut self, v: ::protobuf::RepeatedField<super::policy::MethodPolicy>) {
self.method_policies = v;
}
pub fn mut_method_policies(&mut self) -> &mut ::protobuf::RepeatedField<super::policy::MethodPolicy> {
&mut self.method_policies
}
pub fn take_method_policies(&mut self) -> ::protobuf::RepeatedField<super::policy::MethodPolicy> {
::std::mem::replace(&mut self.method_policies, ::protobuf::RepeatedField::new())
}
}
impl ::protobuf::Message for Control {
fn is_initialized(&self) -> bool {
for v in &self.method_policies {
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.environment)?;
},
4 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.method_policies)?;
},
_ => {
::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.environment.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.environment);
}
for value in &self.method_policies {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
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.environment.is_empty() {
os.write_string(1, &self.environment)?;
}
for v in &self.method_policies {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
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() -> Control {
Control::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>(
"environment",
|m: &Control| { &m.environment },
|m: &mut Control| { &mut m.environment },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::policy::MethodPolicy>>(
"method_policies",
|m: &Control| { &m.method_policies },
|m: &mut Control| { &mut m.method_policies },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Control>(
"Control",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Control {
static instance: ::protobuf::rt::LazyV2<Control> = ::protobuf::rt::LazyV2::INIT;
instance.get(Control::new)
}
}
impl ::protobuf::Clear for Control {
fn clear(&mut self) {
self.environment.clear();
self.method_policies.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Control {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Control {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x18google/api/control.proto\x12\ngoogle.api\x1a\x17google/api/policy.\
proto\"n\n\x07Control\x12\x20\n\x0benvironment\x18\x01\x20\x01(\tR\x0ben\
vironment\x12A\n\x0fmethod_policies\x18\x04\x20\x03(\x0b2\x18.google.api\
.MethodPolicyR\x0emethodPoliciesBn\n\x0ecom.google.apiB\x0cControlProtoP\
\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;servicecon\
fig\xa2\x02\x04GAPIJ\xf5\t\n\x06\x12\x04\x0e\0(\x01\n\xbc\x04\n\x01\x0c\
\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Google\x20LLC\n\n\
\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Version\x202.0\x20\
(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\x20file\x20e\
xcept\x20in\x20compliance\x20with\x20the\x20License.\n\x20You\x20may\x20\
obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\x20\x20\x20\x20\
\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Unless\x20required\
\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\x20writing,\x20s\
oftware\n\x20distributed\x20under\x20the\x20License\x20is\x20distributed\
\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\
\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20express\x20or\x20impli\
ed.\n\x20See\x20the\x20License\x20for\x20the\x20specific\x20language\x20\
governing\x20permissions\x20and\n\x20limitations\x20under\x20the\x20Lice\
nse.\n\n\x08\n\x01\x02\x12\x03\x10\0\x13\n\t\n\x02\x03\0\x12\x03\x12\0!\
\n\x08\n\x01\x08\x12\x03\x14\0\\\n\t\n\x02\x08\x0b\x12\x03\x14\0\\\n\x08\
\n\x01\x08\x12\x03\x15\0\"\n\t\n\x02\x08\n\x12\x03\x15\0\"\n\x08\n\x01\
\x08\x12\x03\x16\0-\n\t\n\x02\x08\x08\x12\x03\x16\0-\n\x08\n\x01\x08\x12\
\x03\x17\0'\n\t\n\x02\x08\x01\x12\x03\x17\0'\n\x08\n\x01\x08\x12\x03\x18\
\0\"\n\t\n\x02\x08$\x12\x03\x18\0\"\n\x9d\x01\n\x02\x04\0\x12\x04\x20\0(\
\x01\x1a\x90\x01\x20Selects\x20and\x20configures\x20the\x20service\x20co\
ntroller\x20used\x20by\x20the\x20service.\n\n\x20Example:\n\n\x20\x20\
\x20\x20\x20control:\n\x20\x20\x20\x20\x20\x20\x20environment:\x20servic\
econtrol.googleapis.com\n\n\n\n\x03\x04\0\x01\x12\x03\x20\x08\x0f\n\xd2\
\x01\n\x04\x04\0\x02\0\x12\x03$\x02\x19\x1a\xc4\x01\x20The\x20service\
\x20controller\x20environment\x20to\x20use.\x20If\x20empty,\x20no\x20con\
trol\x20plane\n\x20feature\x20(like\x20quota\x20and\x20billing)\x20will\
\x20be\x20enabled.\x20The\x20recommended\x20value\x20for\n\x20most\x20se\
rvices\x20is\x20servicecontrol.googleapis.com\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\x14\n\x0c\n\
\x05\x04\0\x02\0\x03\x12\x03$\x17\x18\nK\n\x04\x04\0\x02\x01\x12\x03'\
\x02,\x1a>\x20Defines\x20policies\x20applying\x20to\x20the\x20API\x20met\
hods\x20of\x20the\x20service.\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03'\
\x02\n\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03'\x0b\x17\n\x0c\n\x05\x04\0\
\x02\x01\x01\x12\x03'\x18'\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03'*+b\x06\
proto3\
";
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()
})
}