#![allow(unknown_lints)]
#![allow(clippy)]
#![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(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
#[derive(PartialEq,Clone,Default)]
pub struct Http {
pub rules: ::protobuf::RepeatedField<HttpRule>,
pub fully_decode_reserved_expansion: bool,
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
}
impl Http {
pub fn new() -> Http {
::std::default::Default::default()
}
pub fn clear_rules(&mut self) {
self.rules.clear();
}
pub fn set_rules(&mut self, v: ::protobuf::RepeatedField<HttpRule>) {
self.rules = v;
}
pub fn mut_rules(&mut self) -> &mut ::protobuf::RepeatedField<HttpRule> {
&mut self.rules
}
pub fn take_rules(&mut self) -> ::protobuf::RepeatedField<HttpRule> {
::std::mem::replace(&mut self.rules, ::protobuf::RepeatedField::new())
}
pub fn get_rules(&self) -> &[HttpRule] {
&self.rules
}
pub fn clear_fully_decode_reserved_expansion(&mut self) {
self.fully_decode_reserved_expansion = false;
}
pub fn set_fully_decode_reserved_expansion(&mut self, v: bool) {
self.fully_decode_reserved_expansion = v;
}
pub fn get_fully_decode_reserved_expansion(&self) -> bool {
self.fully_decode_reserved_expansion
}
}
impl ::protobuf::Message for Http {
fn is_initialized(&self) -> bool {
for v in &self.rules {
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_repeated_message_into(wire_type, is, &mut self.rules)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.fully_decode_reserved_expansion = tmp;
},
_ => {
::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;
for value in &self.rules {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if self.fully_decode_reserved_expansion != false {
my_size += 2;
}
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<()> {
for v in &self.rules {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if self.fully_decode_reserved_expansion != false {
os.write_bool(2, self.fully_decode_reserved_expansion)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Http {
Http::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<HttpRule>>(
"rules",
|m: &Http| { &m.rules },
|m: &mut Http| { &mut m.rules },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"fully_decode_reserved_expansion",
|m: &Http| { &m.fully_decode_reserved_expansion },
|m: &mut Http| { &mut m.fully_decode_reserved_expansion },
));
::protobuf::reflect::MessageDescriptor::new::<Http>(
"Http",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Http {
static mut instance: ::protobuf::lazy::Lazy<Http> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Http,
};
unsafe {
instance.get(Http::new)
}
}
}
impl ::protobuf::Clear for Http {
fn clear(&mut self) {
self.clear_rules();
self.clear_fully_decode_reserved_expansion();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Http {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Http {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct HttpRule {
pub selector: ::std::string::String,
pub body: ::std::string::String,
pub additional_bindings: ::protobuf::RepeatedField<HttpRule>,
pub pattern: ::std::option::Option<HttpRule_oneof_pattern>,
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
}
#[derive(Clone,PartialEq)]
pub enum HttpRule_oneof_pattern {
get(::std::string::String),
put(::std::string::String),
post(::std::string::String),
delete(::std::string::String),
patch(::std::string::String),
custom(CustomHttpPattern),
}
impl HttpRule {
pub fn new() -> HttpRule {
::std::default::Default::default()
}
pub fn clear_selector(&mut self) {
self.selector.clear();
}
pub fn set_selector(&mut self, v: ::std::string::String) {
self.selector = v;
}
pub fn mut_selector(&mut self) -> &mut ::std::string::String {
&mut self.selector
}
pub fn take_selector(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.selector, ::std::string::String::new())
}
pub fn get_selector(&self) -> &str {
&self.selector
}
pub fn clear_get(&mut self) {
self.pattern = ::std::option::Option::None;
}
pub fn has_get(&self) -> bool {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::get(..)) => true,
_ => false,
}
}
pub fn set_get(&mut self, v: ::std::string::String) {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::get(v))
}
pub fn mut_get(&mut self) -> &mut ::std::string::String {
if let ::std::option::Option::Some(HttpRule_oneof_pattern::get(_)) = self.pattern {
} else {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::get(::std::string::String::new()));
}
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::get(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_get(&mut self) -> ::std::string::String {
if self.has_get() {
match self.pattern.take() {
::std::option::Option::Some(HttpRule_oneof_pattern::get(v)) => v,
_ => panic!(),
}
} else {
::std::string::String::new()
}
}
pub fn get_get(&self) -> &str {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::get(ref v)) => v,
_ => "",
}
}
pub fn clear_put(&mut self) {
self.pattern = ::std::option::Option::None;
}
pub fn has_put(&self) -> bool {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::put(..)) => true,
_ => false,
}
}
pub fn set_put(&mut self, v: ::std::string::String) {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::put(v))
}
pub fn mut_put(&mut self) -> &mut ::std::string::String {
if let ::std::option::Option::Some(HttpRule_oneof_pattern::put(_)) = self.pattern {
} else {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::put(::std::string::String::new()));
}
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::put(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_put(&mut self) -> ::std::string::String {
if self.has_put() {
match self.pattern.take() {
::std::option::Option::Some(HttpRule_oneof_pattern::put(v)) => v,
_ => panic!(),
}
} else {
::std::string::String::new()
}
}
pub fn get_put(&self) -> &str {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::put(ref v)) => v,
_ => "",
}
}
pub fn clear_post(&mut self) {
self.pattern = ::std::option::Option::None;
}
pub fn has_post(&self) -> bool {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::post(..)) => true,
_ => false,
}
}
pub fn set_post(&mut self, v: ::std::string::String) {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::post(v))
}
pub fn mut_post(&mut self) -> &mut ::std::string::String {
if let ::std::option::Option::Some(HttpRule_oneof_pattern::post(_)) = self.pattern {
} else {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::post(::std::string::String::new()));
}
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::post(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_post(&mut self) -> ::std::string::String {
if self.has_post() {
match self.pattern.take() {
::std::option::Option::Some(HttpRule_oneof_pattern::post(v)) => v,
_ => panic!(),
}
} else {
::std::string::String::new()
}
}
pub fn get_post(&self) -> &str {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::post(ref v)) => v,
_ => "",
}
}
pub fn clear_delete(&mut self) {
self.pattern = ::std::option::Option::None;
}
pub fn has_delete(&self) -> bool {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::delete(..)) => true,
_ => false,
}
}
pub fn set_delete(&mut self, v: ::std::string::String) {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::delete(v))
}
pub fn mut_delete(&mut self) -> &mut ::std::string::String {
if let ::std::option::Option::Some(HttpRule_oneof_pattern::delete(_)) = self.pattern {
} else {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::delete(::std::string::String::new()));
}
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::delete(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_delete(&mut self) -> ::std::string::String {
if self.has_delete() {
match self.pattern.take() {
::std::option::Option::Some(HttpRule_oneof_pattern::delete(v)) => v,
_ => panic!(),
}
} else {
::std::string::String::new()
}
}
pub fn get_delete(&self) -> &str {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::delete(ref v)) => v,
_ => "",
}
}
pub fn clear_patch(&mut self) {
self.pattern = ::std::option::Option::None;
}
pub fn has_patch(&self) -> bool {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::patch(..)) => true,
_ => false,
}
}
pub fn set_patch(&mut self, v: ::std::string::String) {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::patch(v))
}
pub fn mut_patch(&mut self) -> &mut ::std::string::String {
if let ::std::option::Option::Some(HttpRule_oneof_pattern::patch(_)) = self.pattern {
} else {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::patch(::std::string::String::new()));
}
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::patch(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_patch(&mut self) -> ::std::string::String {
if self.has_patch() {
match self.pattern.take() {
::std::option::Option::Some(HttpRule_oneof_pattern::patch(v)) => v,
_ => panic!(),
}
} else {
::std::string::String::new()
}
}
pub fn get_patch(&self) -> &str {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::patch(ref v)) => v,
_ => "",
}
}
pub fn clear_custom(&mut self) {
self.pattern = ::std::option::Option::None;
}
pub fn has_custom(&self) -> bool {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::custom(..)) => true,
_ => false,
}
}
pub fn set_custom(&mut self, v: CustomHttpPattern) {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::custom(v))
}
pub fn mut_custom(&mut self) -> &mut CustomHttpPattern {
if let ::std::option::Option::Some(HttpRule_oneof_pattern::custom(_)) = self.pattern {
} else {
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::custom(CustomHttpPattern::new()));
}
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::custom(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_custom(&mut self) -> CustomHttpPattern {
if self.has_custom() {
match self.pattern.take() {
::std::option::Option::Some(HttpRule_oneof_pattern::custom(v)) => v,
_ => panic!(),
}
} else {
CustomHttpPattern::new()
}
}
pub fn get_custom(&self) -> &CustomHttpPattern {
match self.pattern {
::std::option::Option::Some(HttpRule_oneof_pattern::custom(ref v)) => v,
_ => CustomHttpPattern::default_instance(),
}
}
pub fn clear_body(&mut self) {
self.body.clear();
}
pub fn set_body(&mut self, v: ::std::string::String) {
self.body = v;
}
pub fn mut_body(&mut self) -> &mut ::std::string::String {
&mut self.body
}
pub fn take_body(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.body, ::std::string::String::new())
}
pub fn get_body(&self) -> &str {
&self.body
}
pub fn clear_additional_bindings(&mut self) {
self.additional_bindings.clear();
}
pub fn set_additional_bindings(&mut self, v: ::protobuf::RepeatedField<HttpRule>) {
self.additional_bindings = v;
}
pub fn mut_additional_bindings(&mut self) -> &mut ::protobuf::RepeatedField<HttpRule> {
&mut self.additional_bindings
}
pub fn take_additional_bindings(&mut self) -> ::protobuf::RepeatedField<HttpRule> {
::std::mem::replace(&mut self.additional_bindings, ::protobuf::RepeatedField::new())
}
pub fn get_additional_bindings(&self) -> &[HttpRule] {
&self.additional_bindings
}
}
impl ::protobuf::Message for HttpRule {
fn is_initialized(&self) -> bool {
if let Some(HttpRule_oneof_pattern::custom(ref v)) = self.pattern {
if !v.is_initialized() {
return false;
}
}
for v in &self.additional_bindings {
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.selector)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::get(is.read_string()?));
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::put(is.read_string()?));
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::post(is.read_string()?));
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::delete(is.read_string()?));
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::patch(is.read_string()?));
},
8 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::custom(is.read_message()?));
},
7 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.body)?;
},
11 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.additional_bindings)?;
},
_ => {
::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.selector.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.selector);
}
if !self.body.is_empty() {
my_size += ::protobuf::rt::string_size(7, &self.body);
}
for value in &self.additional_bindings {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if let ::std::option::Option::Some(ref v) = self.pattern {
match v {
&HttpRule_oneof_pattern::get(ref v) => {
my_size += ::protobuf::rt::string_size(2, &v);
},
&HttpRule_oneof_pattern::put(ref v) => {
my_size += ::protobuf::rt::string_size(3, &v);
},
&HttpRule_oneof_pattern::post(ref v) => {
my_size += ::protobuf::rt::string_size(4, &v);
},
&HttpRule_oneof_pattern::delete(ref v) => {
my_size += ::protobuf::rt::string_size(5, &v);
},
&HttpRule_oneof_pattern::patch(ref v) => {
my_size += ::protobuf::rt::string_size(6, &v);
},
&HttpRule_oneof_pattern::custom(ref v) => {
let len = v.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.selector.is_empty() {
os.write_string(1, &self.selector)?;
}
if !self.body.is_empty() {
os.write_string(7, &self.body)?;
}
for v in &self.additional_bindings {
os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if let ::std::option::Option::Some(ref v) = self.pattern {
match v {
&HttpRule_oneof_pattern::get(ref v) => {
os.write_string(2, v)?;
},
&HttpRule_oneof_pattern::put(ref v) => {
os.write_string(3, v)?;
},
&HttpRule_oneof_pattern::post(ref v) => {
os.write_string(4, v)?;
},
&HttpRule_oneof_pattern::delete(ref v) => {
os.write_string(5, v)?;
},
&HttpRule_oneof_pattern::patch(ref v) => {
os.write_string(6, v)?;
},
&HttpRule_oneof_pattern::custom(ref v) => {
os.write_tag(8, ::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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> HttpRule {
HttpRule::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"selector",
|m: &HttpRule| { &m.selector },
|m: &mut HttpRule| { &mut m.selector },
));
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
"get",
HttpRule::has_get,
HttpRule::get_get,
));
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
"put",
HttpRule::has_put,
HttpRule::get_put,
));
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
"post",
HttpRule::has_post,
HttpRule::get_post,
));
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
"delete",
HttpRule::has_delete,
HttpRule::get_delete,
));
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
"patch",
HttpRule::has_patch,
HttpRule::get_patch,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, CustomHttpPattern>(
"custom",
HttpRule::has_custom,
HttpRule::get_custom,
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"body",
|m: &HttpRule| { &m.body },
|m: &mut HttpRule| { &mut m.body },
));
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<HttpRule>>(
"additional_bindings",
|m: &HttpRule| { &m.additional_bindings },
|m: &mut HttpRule| { &mut m.additional_bindings },
));
::protobuf::reflect::MessageDescriptor::new::<HttpRule>(
"HttpRule",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static HttpRule {
static mut instance: ::protobuf::lazy::Lazy<HttpRule> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const HttpRule,
};
unsafe {
instance.get(HttpRule::new)
}
}
}
impl ::protobuf::Clear for HttpRule {
fn clear(&mut self) {
self.clear_selector();
self.clear_get();
self.clear_put();
self.clear_post();
self.clear_delete();
self.clear_patch();
self.clear_custom();
self.clear_body();
self.clear_additional_bindings();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for HttpRule {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for HttpRule {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct CustomHttpPattern {
pub kind: ::std::string::String,
pub path: ::std::string::String,
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
}
impl CustomHttpPattern {
pub fn new() -> CustomHttpPattern {
::std::default::Default::default()
}
pub fn clear_kind(&mut self) {
self.kind.clear();
}
pub fn set_kind(&mut self, v: ::std::string::String) {
self.kind = v;
}
pub fn mut_kind(&mut self) -> &mut ::std::string::String {
&mut self.kind
}
pub fn take_kind(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.kind, ::std::string::String::new())
}
pub fn get_kind(&self) -> &str {
&self.kind
}
pub fn clear_path(&mut self) {
self.path.clear();
}
pub fn set_path(&mut self, v: ::std::string::String) {
self.path = v;
}
pub fn mut_path(&mut self) -> &mut ::std::string::String {
&mut self.path
}
pub fn take_path(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.path, ::std::string::String::new())
}
pub fn get_path(&self) -> &str {
&self.path
}
}
impl ::protobuf::Message for CustomHttpPattern {
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_singular_proto3_string_into(wire_type, is, &mut self.kind)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.path)?;
},
_ => {
::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.kind.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.kind);
}
if !self.path.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.path);
}
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.kind.is_empty() {
os.write_string(1, &self.kind)?;
}
if !self.path.is_empty() {
os.write_string(2, &self.path)?;
}
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) -> &::std::any::Any {
self as &::std::any::Any
}
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
self as &mut ::std::any::Any
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CustomHttpPattern {
CustomHttpPattern::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"kind",
|m: &CustomHttpPattern| { &m.kind },
|m: &mut CustomHttpPattern| { &mut m.kind },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"path",
|m: &CustomHttpPattern| { &m.path },
|m: &mut CustomHttpPattern| { &mut m.path },
));
::protobuf::reflect::MessageDescriptor::new::<CustomHttpPattern>(
"CustomHttpPattern",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static CustomHttpPattern {
static mut instance: ::protobuf::lazy::Lazy<CustomHttpPattern> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const CustomHttpPattern,
};
unsafe {
instance.get(CustomHttpPattern::new)
}
}
}
impl ::protobuf::Clear for CustomHttpPattern {
fn clear(&mut self) {
self.clear_kind();
self.clear_path();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CustomHttpPattern {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for CustomHttpPattern {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x15google/api/http.proto\x12\ngoogle.api\"y\n\x04Http\x12*\n\x05rules\
\x18\x01\x20\x03(\x0b2\x14.google.api.HttpRuleR\x05rules\x12E\n\x1ffully\
_decode_reserved_expansion\x18\x02\x20\x01(\x08R\x1cfullyDecodeReservedE\
xpansion\"\xb5\x02\n\x08HttpRule\x12\x1a\n\x08selector\x18\x01\x20\x01(\
\tR\x08selector\x12\x12\n\x03get\x18\x02\x20\x01(\tH\0R\x03get\x12\x12\n\
\x03put\x18\x03\x20\x01(\tH\0R\x03put\x12\x14\n\x04post\x18\x04\x20\x01(\
\tH\0R\x04post\x12\x18\n\x06delete\x18\x05\x20\x01(\tH\0R\x06delete\x12\
\x16\n\x05patch\x18\x06\x20\x01(\tH\0R\x05patch\x127\n\x06custom\x18\x08\
\x20\x01(\x0b2\x1d.google.api.CustomHttpPatternH\0R\x06custom\x12\x12\n\
\x04body\x18\x07\x20\x01(\tR\x04body\x12E\n\x13additional_bindings\x18\
\x0b\x20\x03(\x0b2\x14.google.api.HttpRuleR\x12additionalBindingsB\t\n\
\x07pattern\";\n\x11CustomHttpPattern\x12\x12\n\x04kind\x18\x01\x20\x01(\
\tR\x04kind\x12\x12\n\x04path\x18\x02\x20\x01(\tR\x04pathBj\n\x0ecom.goo\
gle.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/anno\
tations;annotations\xf8\x01\x01\xa2\x02\x04GAPIJ\xfd]\n\x07\x12\x05\x0e\
\0\xb8\x02\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyrig\
ht\x202018\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\
\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\
\x20not\x20use\x20this\x20file\x20except\x20in\x20compliance\x20with\x20\
the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20L\
icense\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICEN\
SE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\x20or\x20agr\
eed\x20to\x20in\x20writing,\x20software\n\x20distributed\x20under\x20the\
\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\
\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20e\
ither\x20express\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20\
the\x20specific\x20language\x20governing\x20permissions\x20and\n\x20limi\
tations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\x08\
\x12\n\x08\n\x01\x08\x12\x03\x12\0\x1f\n\x0b\n\x04\x08\xe7\x07\0\x12\x03\
\x12\0\x1f\n\x0c\n\x05\x08\xe7\x07\0\x02\x12\x03\x12\x07\x17\n\r\n\x06\
\x08\xe7\x07\0\x02\0\x12\x03\x12\x07\x17\n\x0e\n\x07\x08\xe7\x07\0\x02\0\
\x01\x12\x03\x12\x07\x17\n\x0c\n\x05\x08\xe7\x07\0\x03\x12\x03\x12\x1a\
\x1e\n\x08\n\x01\x08\x12\x03\x13\0X\n\x0b\n\x04\x08\xe7\x07\x01\x12\x03\
\x13\0X\n\x0c\n\x05\x08\xe7\x07\x01\x02\x12\x03\x13\x07\x11\n\r\n\x06\
\x08\xe7\x07\x01\x02\0\x12\x03\x13\x07\x11\n\x0e\n\x07\x08\xe7\x07\x01\
\x02\0\x01\x12\x03\x13\x07\x11\n\x0c\n\x05\x08\xe7\x07\x01\x07\x12\x03\
\x13\x14W\n\x08\n\x01\x08\x12\x03\x14\0\"\n\x0b\n\x04\x08\xe7\x07\x02\
\x12\x03\x14\0\"\n\x0c\n\x05\x08\xe7\x07\x02\x02\x12\x03\x14\x07\x1a\n\r\
\n\x06\x08\xe7\x07\x02\x02\0\x12\x03\x14\x07\x1a\n\x0e\n\x07\x08\xe7\x07\
\x02\x02\0\x01\x12\x03\x14\x07\x1a\n\x0c\n\x05\x08\xe7\x07\x02\x03\x12\
\x03\x14\x1d!\n\x08\n\x01\x08\x12\x03\x15\0*\n\x0b\n\x04\x08\xe7\x07\x03\
\x12\x03\x15\0*\n\x0c\n\x05\x08\xe7\x07\x03\x02\x12\x03\x15\x07\x1b\n\r\
\n\x06\x08\xe7\x07\x03\x02\0\x12\x03\x15\x07\x1b\n\x0e\n\x07\x08\xe7\x07\
\x03\x02\0\x01\x12\x03\x15\x07\x1b\n\x0c\n\x05\x08\xe7\x07\x03\x07\x12\
\x03\x15\x1e)\n\x08\n\x01\x08\x12\x03\x16\0'\n\x0b\n\x04\x08\xe7\x07\x04\
\x12\x03\x16\0'\n\x0c\n\x05\x08\xe7\x07\x04\x02\x12\x03\x16\x07\x13\n\r\
\n\x06\x08\xe7\x07\x04\x02\0\x12\x03\x16\x07\x13\n\x0e\n\x07\x08\xe7\x07\
\x04\x02\0\x01\x12\x03\x16\x07\x13\n\x0c\n\x05\x08\xe7\x07\x04\x07\x12\
\x03\x16\x16&\n\x08\n\x01\x08\x12\x03\x17\0\"\n\x0b\n\x04\x08\xe7\x07\
\x05\x12\x03\x17\0\"\n\x0c\n\x05\x08\xe7\x07\x05\x02\x12\x03\x17\x07\x18\
\n\r\n\x06\x08\xe7\x07\x05\x02\0\x12\x03\x17\x07\x18\n\x0e\n\x07\x08\xe7\
\x07\x05\x02\0\x01\x12\x03\x17\x07\x18\n\x0c\n\x05\x08\xe7\x07\x05\x07\
\x12\x03\x17\x1b!\n\xcd\x01\n\x02\x04\0\x12\x04\x1d\0*\x01\x1a\xc0\x01\
\x20Defines\x20the\x20HTTP\x20configuration\x20for\x20an\x20API\x20servi\
ce.\x20It\x20contains\x20a\x20list\x20of\n\x20[HttpRule][google.api.Http\
Rule],\x20each\x20specifying\x20the\x20mapping\x20of\x20an\x20RPC\x20met\
hod\n\x20to\x20one\x20or\x20more\x20HTTP\x20REST\x20API\x20methods.\n\n\
\n\n\x03\x04\0\x01\x12\x03\x1d\x08\x0c\n\xa2\x01\n\x04\x04\0\x02\0\x12\
\x03!\x02\x1e\x1a\x94\x01\x20A\x20list\x20of\x20HTTP\x20configuration\
\x20rules\x20that\x20apply\x20to\x20individual\x20API\x20methods.\n\n\
\x20**NOTE:**\x20All\x20service\x20configuration\x20rules\x20follow\x20\
\"last\x20one\x20wins\"\x20order.\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03!\
\x02\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03!\x0b\x13\n\x0c\n\x05\x04\0\
\x02\0\x01\x12\x03!\x14\x19\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03!\x1c\x1d\
\n\x93\x02\n\x04\x04\0\x02\x01\x12\x03)\x02+\x1a\x85\x02\x20When\x20set\
\x20to\x20true,\x20URL\x20path\x20parmeters\x20will\x20be\x20fully\x20UR\
I-decoded\x20except\x20in\n\x20cases\x20of\x20single\x20segment\x20match\
es\x20in\x20reserved\x20expansion,\x20where\x20\"%2F\"\x20will\x20be\n\
\x20left\x20encoded.\n\n\x20The\x20default\x20behavior\x20is\x20to\x20no\
t\x20decode\x20RFC\x206570\x20reserved\x20characters\x20in\x20multi\n\
\x20segment\x20matches.\n\n\r\n\x05\x04\0\x02\x01\x04\x12\x04)\x02!\x1e\
\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03)\x02\x06\n\x0c\n\x05\x04\0\x02\
\x01\x01\x12\x03)\x07&\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03))*\n\xb2>\n\
\x02\x04\x01\x12\x06\x85\x02\0\xaf\x02\x01\x1a\xa3>\x20`HttpRule`\x20def\
ines\x20the\x20mapping\x20of\x20an\x20RPC\x20method\x20to\x20one\x20or\
\x20more\x20HTTP\n\x20REST\x20API\x20methods.\x20The\x20mapping\x20speci\
fies\x20how\x20different\x20portions\x20of\x20the\x20RPC\n\x20request\
\x20message\x20are\x20mapped\x20to\x20URL\x20path,\x20URL\x20query\x20pa\
rameters,\x20and\n\x20HTTP\x20request\x20body.\x20The\x20mapping\x20is\
\x20typically\x20specified\x20as\x20an\n\x20`google.api.http`\x20annotat\
ion\x20on\x20the\x20RPC\x20method,\n\x20see\x20\"google/api/annotations.\
proto\"\x20for\x20details.\n\n\x20The\x20mapping\x20consists\x20of\x20a\
\x20field\x20specifying\x20the\x20path\x20template\x20and\n\x20method\
\x20kind.\x20\x20The\x20path\x20template\x20can\x20refer\x20to\x20fields\
\x20in\x20the\x20request\n\x20message,\x20as\x20in\x20the\x20example\x20\
below\x20which\x20describes\x20a\x20REST\x20GET\n\x20operation\x20on\x20\
a\x20resource\x20collection\x20of\x20messages:\n\n\n\x20\x20\x20\x20\x20\
service\x20Messaging\x20{\n\x20\x20\x20\x20\x20\x20\x20rpc\x20GetMessage\
(GetMessageRequest)\x20returns\x20(Message)\x20{\n\x20\x20\x20\x20\x20\
\x20\x20\x20\x20option\x20(google.api.http).get\x20=\x20\"/v1/messages/{\
message_id}/{sub.subfield}\";\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\
\x20\x20\x20}\n\x20\x20\x20\x20\x20message\x20GetMessageRequest\x20{\n\
\x20\x20\x20\x20\x20\x20\x20message\x20SubMessage\x20{\n\x20\x20\x20\x20\
\x20\x20\x20\x20\x20string\x20subfield\x20=\x201;\n\x20\x20\x20\x20\x20\
\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20string\x20message_id\x20=\x201;\
\x20//\x20mapped\x20to\x20the\x20URL\n\x20\x20\x20\x20\x20\x20\x20SubMes\
sage\x20sub\x20=\x202;\x20\x20\x20\x20//\x20`sub.subfield`\x20is\x20url-\
mapped\n\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20message\x20Message\
\x20{\n\x20\x20\x20\x20\x20\x20\x20string\x20text\x20=\x201;\x20//\x20co\
ntent\x20of\x20the\x20resource\n\x20\x20\x20\x20\x20}\n\n\x20The\x20same\
\x20http\x20annotation\x20can\x20alternatively\x20be\x20expressed\x20ins\
ide\x20the\n\x20`GRPC\x20API\x20Configuration`\x20YAML\x20file.\n\n\x20\
\x20\x20\x20\x20http:\n\x20\x20\x20\x20\x20\x20\x20rules:\n\x20\x20\x20\
\x20\x20\x20\x20\x20\x20-\x20selector:\x20<proto_package_name>.Messaging\
.GetMessage\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20get:\x20/v1/mes\
sages/{message_id}/{sub.subfield}\n\n\x20This\x20definition\x20enables\
\x20an\x20automatic,\x20bidrectional\x20mapping\x20of\x20HTTP\n\x20JSON\
\x20to\x20RPC.\x20Example:\n\n\x20HTTP\x20|\x20RPC\n\x20-----|-----\n\
\x20`GET\x20/v1/messages/123456/foo`\x20\x20|\x20`GetMessage(message_id:\
\x20\"123456\"\x20sub:\x20SubMessage(subfield:\x20\"foo\"))`\n\n\x20In\
\x20general,\x20not\x20only\x20fields\x20but\x20also\x20field\x20paths\
\x20can\x20be\x20referenced\n\x20from\x20a\x20path\x20pattern.\x20Fields\
\x20mapped\x20to\x20the\x20path\x20pattern\x20cannot\x20be\n\x20repeated\
\x20and\x20must\x20have\x20a\x20primitive\x20(non-message)\x20type.\n\n\
\x20Any\x20fields\x20in\x20the\x20request\x20message\x20which\x20are\x20\
not\x20bound\x20by\x20the\x20path\n\x20pattern\x20automatically\x20becom\
e\x20(optional)\x20HTTP\x20query\n\x20parameters.\x20Assume\x20the\x20fo\
llowing\x20definition\x20of\x20the\x20request\x20message:\n\n\n\x20\x20\
\x20\x20\x20service\x20Messaging\x20{\n\x20\x20\x20\x20\x20\x20\x20rpc\
\x20GetMessage(GetMessageRequest)\x20returns\x20(Message)\x20{\n\x20\x20\
\x20\x20\x20\x20\x20\x20\x20option\x20(google.api.http).get\x20=\x20\"/v\
1/messages/{message_id}\";\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\
\x20\x20}\n\x20\x20\x20\x20\x20message\x20GetMessageRequest\x20{\n\x20\
\x20\x20\x20\x20\x20\x20message\x20SubMessage\x20{\n\x20\x20\x20\x20\x20\
\x20\x20\x20\x20string\x20subfield\x20=\x201;\n\x20\x20\x20\x20\x20\x20\
\x20}\n\x20\x20\x20\x20\x20\x20\x20string\x20message_id\x20=\x201;\x20//\
\x20mapped\x20to\x20the\x20URL\n\x20\x20\x20\x20\x20\x20\x20int64\x20rev\
ision\x20=\x202;\x20\x20\x20\x20//\x20becomes\x20a\x20parameter\n\x20\
\x20\x20\x20\x20\x20\x20SubMessage\x20sub\x20=\x203;\x20\x20\x20\x20//\
\x20`sub.subfield`\x20becomes\x20a\x20parameter\n\x20\x20\x20\x20\x20}\n\
\n\n\x20This\x20enables\x20a\x20HTTP\x20JSON\x20to\x20RPC\x20mapping\x20\
as\x20below:\n\n\x20HTTP\x20|\x20RPC\n\x20-----|-----\n\x20`GET\x20/v1/m\
essages/123456?revision=2&sub.subfield=foo`\x20|\x20`GetMessage(message_\
id:\x20\"123456\"\x20revision:\x202\x20sub:\x20SubMessage(subfield:\x20\
\"foo\"))`\n\n\x20Note\x20that\x20fields\x20which\x20are\x20mapped\x20to\
\x20HTTP\x20parameters\x20must\x20have\x20a\n\x20primitive\x20type\x20or\
\x20a\x20repeated\x20primitive\x20type.\x20Message\x20types\x20are\x20no\
t\n\x20allowed.\x20In\x20the\x20case\x20of\x20a\x20repeated\x20type,\x20\
the\x20parameter\x20can\x20be\n\x20repeated\x20in\x20the\x20URL,\x20as\
\x20in\x20`...?param=A¶m=B`.\n\n\x20For\x20HTTP\x20method\x20kinds\
\x20which\x20allow\x20a\x20request\x20body,\x20the\x20`body`\x20field\n\
\x20specifies\x20the\x20mapping.\x20Consider\x20a\x20REST\x20update\x20m\
ethod\x20on\x20the\n\x20message\x20resource\x20collection:\n\n\n\x20\x20\
\x20\x20\x20service\x20Messaging\x20{\n\x20\x20\x20\x20\x20\x20\x20rpc\
\x20UpdateMessage(UpdateMessageRequest)\x20returns\x20(Message)\x20{\n\
\x20\x20\x20\x20\x20\x20\x20\x20\x20option\x20(google.api.http)\x20=\x20\
{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20put:\x20\"/v1/messages/{m\
essage_id}\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body:\x20\"mes\
sage\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20};\n\x20\x20\x20\x20\x20\x20\
\x20}\n\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20message\x20UpdateMessa\
geRequest\x20{\n\x20\x20\x20\x20\x20\x20\x20string\x20message_id\x20=\
\x201;\x20//\x20mapped\x20to\x20the\x20URL\n\x20\x20\x20\x20\x20\x20\x20\
Message\x20message\x20=\x202;\x20\x20\x20//\x20mapped\x20to\x20the\x20bo\
dy\n\x20\x20\x20\x20\x20}\n\n\n\x20The\x20following\x20HTTP\x20JSON\x20t\
o\x20RPC\x20mapping\x20is\x20enabled,\x20where\x20the\n\x20representatio\
n\x20of\x20the\x20JSON\x20in\x20the\x20request\x20body\x20is\x20determin\
ed\x20by\n\x20protos\x20JSON\x20encoding:\n\n\x20HTTP\x20|\x20RPC\n\x20-\
----|-----\n\x20`PUT\x20/v1/messages/123456\x20{\x20\"text\":\x20\"Hi!\"\
\x20}`\x20|\x20`UpdateMessage(message_id:\x20\"123456\"\x20message\x20{\
\x20text:\x20\"Hi!\"\x20})`\n\n\x20The\x20special\x20name\x20`*`\x20can\
\x20be\x20used\x20in\x20the\x20body\x20mapping\x20to\x20define\x20that\n\
\x20every\x20field\x20not\x20bound\x20by\x20the\x20path\x20template\x20s\
hould\x20be\x20mapped\x20to\x20the\n\x20request\x20body.\x20\x20This\x20\
enables\x20the\x20following\x20alternative\x20definition\x20of\n\x20the\
\x20update\x20method:\n\n\x20\x20\x20\x20\x20service\x20Messaging\x20{\n\
\x20\x20\x20\x20\x20\x20\x20rpc\x20UpdateMessage(Message)\x20returns\x20\
(Message)\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20option\x20(google.ap\
i.http)\x20=\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20put:\x20\
\"/v1/messages/{message_id}\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20body:\x20\"*\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20};\n\x20\x20\x20\
\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20message\
\x20Message\x20{\n\x20\x20\x20\x20\x20\x20\x20string\x20message_id\x20=\
\x201;\n\x20\x20\x20\x20\x20\x20\x20string\x20text\x20=\x202;\n\x20\x20\
\x20\x20\x20}\n\n\n\x20The\x20following\x20HTTP\x20JSON\x20to\x20RPC\x20\
mapping\x20is\x20enabled:\n\n\x20HTTP\x20|\x20RPC\n\x20-----|-----\n\x20\
`PUT\x20/v1/messages/123456\x20{\x20\"text\":\x20\"Hi!\"\x20}`\x20|\x20`\
UpdateMessage(message_id:\x20\"123456\"\x20text:\x20\"Hi!\")`\n\n\x20Not\
e\x20that\x20when\x20using\x20`*`\x20in\x20the\x20body\x20mapping,\x20it\
\x20is\x20not\x20possible\x20to\n\x20have\x20HTTP\x20parameters,\x20as\
\x20all\x20fields\x20not\x20bound\x20by\x20the\x20path\x20end\x20in\n\
\x20the\x20body.\x20This\x20makes\x20this\x20option\x20more\x20rarely\
\x20used\x20in\x20practice\x20of\n\x20defining\x20REST\x20APIs.\x20The\
\x20common\x20usage\x20of\x20`*`\x20is\x20in\x20custom\x20methods\n\x20w\
hich\x20don't\x20use\x20the\x20URL\x20at\x20all\x20for\x20transferring\
\x20data.\n\n\x20It\x20is\x20possible\x20to\x20define\x20multiple\x20HTT\
P\x20methods\x20for\x20one\x20RPC\x20by\x20using\n\x20the\x20`additional\
_bindings`\x20option.\x20Example:\n\n\x20\x20\x20\x20\x20service\x20Mess\
aging\x20{\n\x20\x20\x20\x20\x20\x20\x20rpc\x20GetMessage(GetMessageRequ\
est)\x20returns\x20(Message)\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20o\
ption\x20(google.api.http)\x20=\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x20get:\x20\"/v1/messages/{message_id}\"\n\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20additional_bindings\x20{\n\x20\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20get:\x20\"/v1/users/{user_id}/messages/{\
message_id}\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\
\x20\x20\x20\x20\x20\x20\x20};\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\
\x20\x20\x20}\n\x20\x20\x20\x20\x20message\x20GetMessageRequest\x20{\n\
\x20\x20\x20\x20\x20\x20\x20string\x20message_id\x20=\x201;\n\x20\x20\
\x20\x20\x20\x20\x20string\x20user_id\x20=\x202;\n\x20\x20\x20\x20\x20}\
\n\n\n\x20This\x20enables\x20the\x20following\x20two\x20alternative\x20H\
TTP\x20JSON\x20to\x20RPC\n\x20mappings:\n\n\x20HTTP\x20|\x20RPC\n\x20---\
--|-----\n\x20`GET\x20/v1/messages/123456`\x20|\x20`GetMessage(message_i\
d:\x20\"123456\")`\n\x20`GET\x20/v1/users/me/messages/123456`\x20|\x20`G\
etMessage(user_id:\x20\"me\"\x20message_id:\x20\"123456\")`\n\n\x20#\x20\
Rules\x20for\x20HTTP\x20mapping\n\n\x20The\x20rules\x20for\x20mapping\
\x20HTTP\x20path,\x20query\x20parameters,\x20and\x20body\x20fields\n\x20\
to\x20the\x20request\x20message\x20are\x20as\x20follows:\n\n\x201.\x20Th\
e\x20`body`\x20field\x20specifies\x20either\x20`*`\x20or\x20a\x20field\
\x20path,\x20or\x20is\n\x20\x20\x20\x20omitted.\x20If\x20omitted,\x20it\
\x20indicates\x20there\x20is\x20no\x20HTTP\x20request\x20body.\n\x202.\
\x20Leaf\x20fields\x20(recursive\x20expansion\x20of\x20nested\x20message\
s\x20in\x20the\n\x20\x20\x20\x20request)\x20can\x20be\x20classified\x20i\
nto\x20three\x20types:\n\x20\x20\x20\x20\x20(a)\x20Matched\x20in\x20the\
\x20URL\x20template.\n\x20\x20\x20\x20\x20(b)\x20Covered\x20by\x20body\
\x20(if\x20body\x20is\x20`*`,\x20everything\x20except\x20(a)\x20fields;\
\n\x20\x20\x20\x20\x20\x20\x20\x20\x20else\x20everything\x20under\x20the\
\x20body\x20field)\n\x20\x20\x20\x20\x20(c)\x20All\x20other\x20fields.\n\
\x203.\x20URL\x20query\x20parameters\x20found\x20in\x20the\x20HTTP\x20re\
quest\x20are\x20mapped\x20to\x20(c)\x20fields.\n\x204.\x20Any\x20body\
\x20sent\x20with\x20an\x20HTTP\x20request\x20can\x20contain\x20only\x20(\
b)\x20fields.\n\n\x20The\x20syntax\x20of\x20the\x20path\x20template\x20i\
s\x20as\x20follows:\n\n\x20\x20\x20\x20\x20Template\x20=\x20\"/\"\x20Seg\
ments\x20[\x20Verb\x20]\x20;\n\x20\x20\x20\x20\x20Segments\x20=\x20Segme\
nt\x20{\x20\"/\"\x20Segment\x20}\x20;\n\x20\x20\x20\x20\x20Segment\x20\
\x20=\x20\"*\"\x20|\x20\"**\"\x20|\x20LITERAL\x20|\x20Variable\x20;\n\
\x20\x20\x20\x20\x20Variable\x20=\x20\"{\"\x20FieldPath\x20[\x20\"=\"\
\x20Segments\x20]\x20\"}\"\x20;\n\x20\x20\x20\x20\x20FieldPath\x20=\x20I\
DENT\x20{\x20\".\"\x20IDENT\x20}\x20;\n\x20\x20\x20\x20\x20Verb\x20\x20\
\x20\x20\x20=\x20\":\"\x20LITERAL\x20;\n\n\x20The\x20syntax\x20`*`\x20ma\
tches\x20a\x20single\x20path\x20segment.\x20The\x20syntax\x20`**`\x20mat\
ches\x20zero\n\x20or\x20more\x20path\x20segments,\x20which\x20must\x20be\
\x20the\x20last\x20part\x20of\x20the\x20path\x20except\x20the\n\x20`Verb\
`.\x20The\x20syntax\x20`LITERAL`\x20matches\x20literal\x20text\x20in\x20\
the\x20path.\n\n\x20The\x20syntax\x20`Variable`\x20matches\x20part\x20of\
\x20the\x20URL\x20path\x20as\x20specified\x20by\x20its\n\x20template.\
\x20A\x20variable\x20template\x20must\x20not\x20contain\x20other\x20vari\
ables.\x20If\x20a\x20variable\n\x20matches\x20a\x20single\x20path\x20seg\
ment,\x20its\x20template\x20may\x20be\x20omitted,\x20e.g.\x20`{var}`\n\
\x20is\x20equivalent\x20to\x20`{var=*}`.\n\n\x20If\x20a\x20variable\x20c\
ontains\x20exactly\x20one\x20path\x20segment,\x20such\x20as\x20`\"{var}\
\"`\x20or\n\x20`\"{var=*}\"`,\x20when\x20such\x20a\x20variable\x20is\x20\
expanded\x20into\x20a\x20URL\x20path,\x20all\x20characters\n\x20except\
\x20`[-_.~0-9a-zA-Z]`\x20are\x20percent-encoded.\x20Such\x20variables\
\x20show\x20up\x20in\x20the\n\x20Discovery\x20Document\x20as\x20`{var}`.\
\n\n\x20If\x20a\x20variable\x20contains\x20one\x20or\x20more\x20path\x20\
segments,\x20such\x20as\x20`\"{var=foo/*}\"`\n\x20or\x20`\"{var=**}\"`,\
\x20when\x20such\x20a\x20variable\x20is\x20expanded\x20into\x20a\x20URL\
\x20path,\x20all\n\x20characters\x20except\x20`[-_.~/0-9a-zA-Z]`\x20are\
\x20percent-encoded.\x20Such\x20variables\n\x20show\x20up\x20in\x20the\
\x20Discovery\x20Document\x20as\x20`{+var}`.\n\n\x20NOTE:\x20While\x20th\
e\x20single\x20segment\x20variable\x20matches\x20the\x20semantics\x20of\
\n\x20[RFC\x206570](https://tools.ietf.org/html/rfc6570)\x20Section\x203\
.2.2\n\x20Simple\x20String\x20Expansion,\x20the\x20multi\x20segment\x20v\
ariable\x20**does\x20not**\x20match\n\x20RFC\x206570\x20Reserved\x20Expa\
nsion.\x20The\x20reason\x20is\x20that\x20the\x20Reserved\x20Expansion\n\
\x20does\x20not\x20expand\x20special\x20characters\x20like\x20`?`\x20and\
\x20`#`,\x20which\x20would\x20lead\n\x20to\x20invalid\x20URLs.\n\n\x20NO\
TE:\x20the\x20field\x20paths\x20in\x20variables\x20and\x20in\x20the\x20`\
body`\x20must\x20not\x20refer\x20to\n\x20repeated\x20fields\x20or\x20map\
\x20fields.\n\n\x0b\n\x03\x04\x01\x01\x12\x04\x85\x02\x08\x10\n\x8c\x01\
\n\x04\x04\x01\x02\0\x12\x04\x89\x02\x02\x16\x1a~\x20Selects\x20methods\
\x20to\x20which\x20this\x20rule\x20applies.\n\n\x20Refer\x20to\x20[selec\
tor][google.api.DocumentationRule.selector]\x20for\x20syntax\x20details.\
\n\n\x0f\n\x05\x04\x01\x02\0\x04\x12\x06\x89\x02\x02\x85\x02\x12\n\r\n\
\x05\x04\x01\x02\0\x05\x12\x04\x89\x02\x02\x08\n\r\n\x05\x04\x01\x02\0\
\x01\x12\x04\x89\x02\t\x11\n\r\n\x05\x04\x01\x02\0\x03\x12\x04\x89\x02\
\x14\x15\n\xd0\x01\n\x04\x04\x01\x08\0\x12\x06\x8e\x02\x02\xa3\x02\x03\
\x1a\xbf\x01\x20Determines\x20the\x20URL\x20pattern\x20is\x20matched\x20\
by\x20this\x20rules.\x20This\x20pattern\x20can\x20be\n\x20used\x20with\
\x20any\x20of\x20the\x20{get|put|post|delete|patch}\x20methods.\x20A\x20\
custom\x20method\n\x20can\x20be\x20defined\x20using\x20the\x20'custom'\
\x20field.\n\n\r\n\x05\x04\x01\x08\0\x01\x12\x04\x8e\x02\x08\x0f\nI\n\
\x04\x04\x01\x02\x01\x12\x04\x90\x02\x04\x13\x1a;\x20Used\x20for\x20list\
ing\x20and\x20getting\x20information\x20about\x20resources.\n\n\r\n\x05\
\x04\x01\x02\x01\x05\x12\x04\x90\x02\x04\n\n\r\n\x05\x04\x01\x02\x01\x01\
\x12\x04\x90\x02\x0b\x0e\n\r\n\x05\x04\x01\x02\x01\x03\x12\x04\x90\x02\
\x11\x12\n-\n\x04\x04\x01\x02\x02\x12\x04\x93\x02\x04\x13\x1a\x1f\x20Use\
d\x20for\x20updating\x20a\x20resource.\n\n\r\n\x05\x04\x01\x02\x02\x05\
\x12\x04\x93\x02\x04\n\n\r\n\x05\x04\x01\x02\x02\x01\x12\x04\x93\x02\x0b\
\x0e\n\r\n\x05\x04\x01\x02\x02\x03\x12\x04\x93\x02\x11\x12\n-\n\x04\x04\
\x01\x02\x03\x12\x04\x96\x02\x04\x14\x1a\x1f\x20Used\x20for\x20creating\
\x20a\x20resource.\n\n\r\n\x05\x04\x01\x02\x03\x05\x12\x04\x96\x02\x04\n\
\n\r\n\x05\x04\x01\x02\x03\x01\x12\x04\x96\x02\x0b\x0f\n\r\n\x05\x04\x01\
\x02\x03\x03\x12\x04\x96\x02\x12\x13\n-\n\x04\x04\x01\x02\x04\x12\x04\
\x99\x02\x04\x16\x1a\x1f\x20Used\x20for\x20deleting\x20a\x20resource.\n\
\n\r\n\x05\x04\x01\x02\x04\x05\x12\x04\x99\x02\x04\n\n\r\n\x05\x04\x01\
\x02\x04\x01\x12\x04\x99\x02\x0b\x11\n\r\n\x05\x04\x01\x02\x04\x03\x12\
\x04\x99\x02\x14\x15\n-\n\x04\x04\x01\x02\x05\x12\x04\x9c\x02\x04\x15\
\x1a\x1f\x20Used\x20for\x20updating\x20a\x20resource.\n\n\r\n\x05\x04\
\x01\x02\x05\x05\x12\x04\x9c\x02\x04\n\n\r\n\x05\x04\x01\x02\x05\x01\x12\
\x04\x9c\x02\x0b\x10\n\r\n\x05\x04\x01\x02\x05\x03\x12\x04\x9c\x02\x13\
\x14\n\x98\x02\n\x04\x04\x01\x02\x06\x12\x04\xa2\x02\x04!\x1a\x89\x02\
\x20The\x20custom\x20pattern\x20is\x20used\x20for\x20specifying\x20an\
\x20HTTP\x20method\x20that\x20is\x20not\n\x20included\x20in\x20the\x20`p\
attern`\x20field,\x20such\x20as\x20HEAD,\x20or\x20\"*\"\x20to\x20leave\
\x20the\n\x20HTTP\x20method\x20unspecified\x20for\x20this\x20rule.\x20Th\
e\x20wild-card\x20rule\x20is\x20useful\n\x20for\x20services\x20that\x20p\
rovide\x20content\x20to\x20Web\x20(HTML)\x20clients.\n\n\r\n\x05\x04\x01\
\x02\x06\x06\x12\x04\xa2\x02\x04\x15\n\r\n\x05\x04\x01\x02\x06\x01\x12\
\x04\xa2\x02\x16\x1c\n\r\n\x05\x04\x01\x02\x06\x03\x12\x04\xa2\x02\x1f\
\x20\n\x9e\x02\n\x04\x04\x01\x02\x07\x12\x04\xa9\x02\x02\x12\x1a\x8f\x02\
\x20The\x20name\x20of\x20the\x20request\x20field\x20whose\x20value\x20is\
\x20mapped\x20to\x20the\x20HTTP\x20body,\x20or\n\x20`*`\x20for\x20mappin\
g\x20all\x20fields\x20not\x20captured\x20by\x20the\x20path\x20pattern\
\x20to\x20the\x20HTTP\n\x20body.\x20NOTE:\x20the\x20referred\x20field\
\x20must\x20not\x20be\x20a\x20repeated\x20field\x20and\x20must\x20be\n\
\x20present\x20at\x20the\x20top-level\x20of\x20request\x20message\x20typ\
e.\n\n\x0f\n\x05\x04\x01\x02\x07\x04\x12\x06\xa9\x02\x02\xa3\x02\x03\n\r\
\n\x05\x04\x01\x02\x07\x05\x12\x04\xa9\x02\x02\x08\n\r\n\x05\x04\x01\x02\
\x07\x01\x12\x04\xa9\x02\t\r\n\r\n\x05\x04\x01\x02\x07\x03\x12\x04\xa9\
\x02\x10\x11\n\xbb\x01\n\x04\x04\x01\x02\x08\x12\x04\xae\x02\x02-\x1a\
\xac\x01\x20Additional\x20HTTP\x20bindings\x20for\x20the\x20selector.\
\x20Nested\x20bindings\x20must\n\x20not\x20contain\x20an\x20`additional_\
bindings`\x20field\x20themselves\x20(that\x20is,\n\x20the\x20nesting\x20\
may\x20only\x20be\x20one\x20level\x20deep).\n\n\r\n\x05\x04\x01\x02\x08\
\x04\x12\x04\xae\x02\x02\n\n\r\n\x05\x04\x01\x02\x08\x06\x12\x04\xae\x02\
\x0b\x13\n\r\n\x05\x04\x01\x02\x08\x01\x12\x04\xae\x02\x14'\n\r\n\x05\
\x04\x01\x02\x08\x03\x12\x04\xae\x02*,\nG\n\x02\x04\x02\x12\x06\xb2\x02\
\0\xb8\x02\x01\x1a9\x20A\x20custom\x20pattern\x20is\x20used\x20for\x20de\
fining\x20custom\x20HTTP\x20verb.\n\n\x0b\n\x03\x04\x02\x01\x12\x04\xb2\
\x02\x08\x19\n2\n\x04\x04\x02\x02\0\x12\x04\xb4\x02\x02\x12\x1a$\x20The\
\x20name\x20of\x20this\x20custom\x20HTTP\x20verb.\n\n\x0f\n\x05\x04\x02\
\x02\0\x04\x12\x06\xb4\x02\x02\xb2\x02\x1b\n\r\n\x05\x04\x02\x02\0\x05\
\x12\x04\xb4\x02\x02\x08\n\r\n\x05\x04\x02\x02\0\x01\x12\x04\xb4\x02\t\r\
\n\r\n\x05\x04\x02\x02\0\x03\x12\x04\xb4\x02\x10\x11\n5\n\x04\x04\x02\
\x02\x01\x12\x04\xb7\x02\x02\x12\x1a'\x20The\x20path\x20matched\x20by\
\x20this\x20custom\x20verb.\n\n\x0f\n\x05\x04\x02\x02\x01\x04\x12\x06\
\xb7\x02\x02\xb4\x02\x12\n\r\n\x05\x04\x02\x02\x01\x05\x12\x04\xb7\x02\
\x02\x08\n\r\n\x05\x04\x02\x02\x01\x01\x12\x04\xb7\x02\t\r\n\r\n\x05\x04\
\x02\x02\x01\x03\x12\x04\xb7\x02\x10\x11b\x06proto3\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}