Joel Galenson | fa77f00 | 2021-04-02 11:32:01 -0700 | [diff] [blame] | 1 | // This file is generated by rust-protobuf 2.22.0. Do not edit |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 2 | // @generated |
| 3 | |
| 4 | // https://github.com/rust-lang/rust-clippy/issues/702 |
| 5 | #![allow(unknown_lints)] |
| 6 | #![allow(clippy::all)] |
| 7 | |
Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 8 | #![allow(unused_attributes)] |
Joel Galenson | fa77f00 | 2021-04-02 11:32:01 -0700 | [diff] [blame] | 9 | #![cfg_attr(rustfmt, rustfmt::skip)] |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 10 | |
| 11 | #![allow(box_pointers)] |
| 12 | #![allow(dead_code)] |
| 13 | #![allow(missing_docs)] |
| 14 | #![allow(non_camel_case_types)] |
| 15 | #![allow(non_snake_case)] |
| 16 | #![allow(non_upper_case_globals)] |
| 17 | #![allow(trivial_casts)] |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 18 | #![allow(unused_imports)] |
| 19 | #![allow(unused_results)] |
| 20 | //! Generated file from `google/protobuf/empty.proto` |
| 21 | |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 22 | #[derive(PartialEq,Clone,Default)] |
Haibo Huang | ca95bfd | 2021-02-09 17:48:30 -0800 | [diff] [blame] | 23 | #[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))] |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 24 | pub struct Empty { |
| 25 | // special fields |
| 26 | #[cfg_attr(feature = "with-serde", serde(skip))] |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 27 | pub unknown_fields: crate::UnknownFields, |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 28 | #[cfg_attr(feature = "with-serde", serde(skip))] |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 29 | pub cached_size: crate::CachedSize, |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | impl<'a> ::std::default::Default for &'a Empty { |
| 33 | fn default() -> &'a Empty { |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 34 | <Empty as crate::Message>::default_instance() |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 35 | } |
| 36 | } |
| 37 | |
| 38 | impl Empty { |
| 39 | pub fn new() -> Empty { |
| 40 | ::std::default::Default::default() |
| 41 | } |
| 42 | } |
| 43 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 44 | impl crate::Message for Empty { |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 45 | fn is_initialized(&self) -> bool { |
| 46 | true |
| 47 | } |
| 48 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 49 | fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> { |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 50 | while !is.eof()? { |
| 51 | let (field_number, wire_type) = is.read_tag_unpack()?; |
| 52 | match field_number { |
| 53 | _ => { |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 54 | crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 55 | }, |
| 56 | }; |
| 57 | } |
| 58 | ::std::result::Result::Ok(()) |
| 59 | } |
| 60 | |
| 61 | // Compute sizes of nested messages |
| 62 | #[allow(unused_variables)] |
| 63 | fn compute_size(&self) -> u32 { |
| 64 | let mut my_size = 0; |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 65 | my_size += crate::rt::unknown_fields_size(self.get_unknown_fields()); |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 66 | self.cached_size.set(my_size); |
| 67 | my_size |
| 68 | } |
| 69 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 70 | fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> { |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 71 | os.write_unknown_fields(self.get_unknown_fields())?; |
| 72 | ::std::result::Result::Ok(()) |
| 73 | } |
| 74 | |
| 75 | fn get_cached_size(&self) -> u32 { |
| 76 | self.cached_size.get() |
| 77 | } |
| 78 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 79 | fn get_unknown_fields(&self) -> &crate::UnknownFields { |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 80 | &self.unknown_fields |
| 81 | } |
| 82 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 83 | fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields { |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 84 | &mut self.unknown_fields |
| 85 | } |
| 86 | |
| 87 | fn as_any(&self) -> &dyn (::std::any::Any) { |
| 88 | self as &dyn (::std::any::Any) |
| 89 | } |
| 90 | fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { |
| 91 | self as &mut dyn (::std::any::Any) |
| 92 | } |
Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 93 | fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 94 | self |
| 95 | } |
| 96 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 97 | fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor { |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 98 | Self::descriptor_static() |
| 99 | } |
| 100 | |
| 101 | fn new() -> Empty { |
| 102 | Empty::new() |
| 103 | } |
| 104 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 105 | fn descriptor_static() -> &'static crate::reflect::MessageDescriptor { |
| 106 | static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT; |
Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 107 | descriptor.get(|| { |
| 108 | let fields = ::std::vec::Vec::new(); |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 109 | crate::reflect::MessageDescriptor::new_pb_name::<Empty>( |
Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 110 | "Empty", |
| 111 | fields, |
| 112 | file_descriptor_proto() |
| 113 | ) |
| 114 | }) |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | fn default_instance() -> &'static Empty { |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 118 | static instance: crate::rt::LazyV2<Empty> = crate::rt::LazyV2::INIT; |
Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 119 | instance.get(Empty::new) |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 120 | } |
| 121 | } |
| 122 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 123 | impl crate::Clear for Empty { |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 124 | fn clear(&mut self) { |
| 125 | self.unknown_fields.clear(); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | impl ::std::fmt::Debug for Empty { |
| 130 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 131 | crate::text_format::fmt(self, f) |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 132 | } |
| 133 | } |
| 134 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 135 | impl crate::reflect::ProtobufValue for Empty { |
| 136 | fn as_ref(&self) -> crate::reflect::ReflectValueRef { |
| 137 | crate::reflect::ReflectValueRef::Message(self) |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 138 | } |
| 139 | } |
| 140 | |
| 141 | static file_descriptor_proto_data: &'static [u8] = b"\ |
| 142 | \n\x1bgoogle/protobuf/empty.proto\x12\x0fgoogle.protobuf\"\x07\n\x05Empt\ |
Haibo Huang | ca95bfd | 2021-02-09 17:48:30 -0800 | [diff] [blame] | 143 | yB}\n\x13com.google.protobufB\nEmptyProtoP\x01Z.google.golang.org/protob\ |
| 144 | uf/types/known/emptypb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Prot\ |
| 145 | obuf.WellKnownTypesJ\xfe\x10\n\x06\x12\x04\x1e\03\x10\n\xcc\x0c\n\x01\ |
| 146 | \x0c\x12\x03\x1e\0\x122\xc1\x0c\x20Protocol\x20Buffers\x20-\x20Google's\ |
| 147 | \x20data\x20interchange\x20format\n\x20Copyright\x202008\x20Google\x20In\ |
| 148 | c.\x20\x20All\x20rights\x20reserved.\n\x20https://developers.google.com/\ |
| 149 | protocol-buffers/\n\n\x20Redistribution\x20and\x20use\x20in\x20source\ |
| 150 | \x20and\x20binary\x20forms,\x20with\x20or\x20without\n\x20modification,\ |
| 151 | \x20are\x20permitted\x20provided\x20that\x20the\x20following\x20conditio\ |
| 152 | ns\x20are\n\x20met:\n\n\x20\x20\x20\x20\x20*\x20Redistributions\x20of\ |
| 153 | \x20source\x20code\x20must\x20retain\x20the\x20above\x20copyright\n\x20n\ |
| 154 | otice,\x20this\x20list\x20of\x20conditions\x20and\x20the\x20following\ |
| 155 | \x20disclaimer.\n\x20\x20\x20\x20\x20*\x20Redistributions\x20in\x20binar\ |
| 156 | y\x20form\x20must\x20reproduce\x20the\x20above\n\x20copyright\x20notice,\ |
| 157 | \x20this\x20list\x20of\x20conditions\x20and\x20the\x20following\x20discl\ |
| 158 | aimer\n\x20in\x20the\x20documentation\x20and/or\x20other\x20materials\ |
| 159 | \x20provided\x20with\x20the\n\x20distribution.\n\x20\x20\x20\x20\x20*\ |
| 160 | \x20Neither\x20the\x20name\x20of\x20Google\x20Inc.\x20nor\x20the\x20name\ |
| 161 | s\x20of\x20its\n\x20contributors\x20may\x20be\x20used\x20to\x20endorse\ |
| 162 | \x20or\x20promote\x20products\x20derived\x20from\n\x20this\x20software\ |
| 163 | \x20without\x20specific\x20prior\x20written\x20permission.\n\n\x20THIS\ |
| 164 | \x20SOFTWARE\x20IS\x20PROVIDED\x20BY\x20THE\x20COPYRIGHT\x20HOLDERS\x20A\ |
| 165 | ND\x20CONTRIBUTORS\n\x20\"AS\x20IS\"\x20AND\x20ANY\x20EXPRESS\x20OR\x20I\ |
| 166 | MPLIED\x20WARRANTIES,\x20INCLUDING,\x20BUT\x20NOT\n\x20LIMITED\x20TO,\ |
| 167 | \x20THE\x20IMPLIED\x20WARRANTIES\x20OF\x20MERCHANTABILITY\x20AND\x20FITN\ |
| 168 | ESS\x20FOR\n\x20A\x20PARTICULAR\x20PURPOSE\x20ARE\x20DISCLAIMED.\x20IN\ |
| 169 | \x20NO\x20EVENT\x20SHALL\x20THE\x20COPYRIGHT\n\x20OWNER\x20OR\x20CONTRIB\ |
| 170 | UTORS\x20BE\x20LIABLE\x20FOR\x20ANY\x20DIRECT,\x20INDIRECT,\x20INCIDENTA\ |
| 171 | L,\n\x20SPECIAL,\x20EXEMPLARY,\x20OR\x20CONSEQUENTIAL\x20DAMAGES\x20(INC\ |
| 172 | LUDING,\x20BUT\x20NOT\n\x20LIMITED\x20TO,\x20PROCUREMENT\x20OF\x20SUBSTI\ |
| 173 | TUTE\x20GOODS\x20OR\x20SERVICES;\x20LOSS\x20OF\x20USE,\n\x20DATA,\x20OR\ |
| 174 | \x20PROFITS;\x20OR\x20BUSINESS\x20INTERRUPTION)\x20HOWEVER\x20CAUSED\x20\ |
| 175 | AND\x20ON\x20ANY\n\x20THEORY\x20OF\x20LIABILITY,\x20WHETHER\x20IN\x20CON\ |
| 176 | TRACT,\x20STRICT\x20LIABILITY,\x20OR\x20TORT\n\x20(INCLUDING\x20NEGLIGEN\ |
| 177 | CE\x20OR\x20OTHERWISE)\x20ARISING\x20IN\x20ANY\x20WAY\x20OUT\x20OF\x20TH\ |
| 178 | E\x20USE\n\x20OF\x20THIS\x20SOFTWARE,\x20EVEN\x20IF\x20ADVISED\x20OF\x20\ |
| 179 | THE\x20POSSIBILITY\x20OF\x20SUCH\x20DAMAGE.\n\n\x08\n\x01\x02\x12\x03\ |
| 180 | \x20\0\x18\n\x08\n\x01\x08\x12\x03\"\0;\n\t\n\x02\x08%\x12\x03\"\0;\n\ |
| 181 | \x08\n\x01\x08\x12\x03#\0E\n\t\n\x02\x08\x0b\x12\x03#\0E\n\x08\n\x01\x08\ |
| 182 | \x12\x03$\0,\n\t\n\x02\x08\x01\x12\x03$\0,\n\x08\n\x01\x08\x12\x03%\0+\n\ |
| 183 | \t\n\x02\x08\x08\x12\x03%\0+\n\x08\n\x01\x08\x12\x03&\0\"\n\t\n\x02\x08\ |
| 184 | \n\x12\x03&\0\"\n\x08\n\x01\x08\x12\x03'\0!\n\t\n\x02\x08$\x12\x03'\0!\n\ |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 185 | \x08\n\x01\x08\x12\x03(\0\x1f\n\t\n\x02\x08\x1f\x12\x03(\0\x1f\n\xfb\x02\ |
| 186 | \n\x02\x04\0\x12\x033\0\x10\x1a\xef\x02\x20A\x20generic\x20empty\x20mess\ |
| 187 | age\x20that\x20you\x20can\x20re-use\x20to\x20avoid\x20defining\x20duplic\ |
| 188 | ated\n\x20empty\x20messages\x20in\x20your\x20APIs.\x20A\x20typical\x20ex\ |
| 189 | ample\x20is\x20to\x20use\x20it\x20as\x20the\x20request\n\x20or\x20the\ |
| 190 | \x20response\x20type\x20of\x20an\x20API\x20method.\x20For\x20instance:\n\ |
| 191 | \n\x20\x20\x20\x20\x20service\x20Foo\x20{\n\x20\x20\x20\x20\x20\x20\x20r\ |
| 192 | pc\x20Bar(google.protobuf.Empty)\x20returns\x20(google.protobuf.Empty);\ |
| 193 | \n\x20\x20\x20\x20\x20}\n\n\x20The\x20JSON\x20representation\x20for\x20`\ |
| 194 | Empty`\x20is\x20empty\x20JSON\x20object\x20`{}`.\n\n\n\n\x03\x04\0\x01\ |
| 195 | \x12\x033\x08\rb\x06proto3\ |
| 196 | "; |
| 197 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 198 | static file_descriptor_proto_lazy: crate::rt::LazyV2<crate::descriptor::FileDescriptorProto> = crate::rt::LazyV2::INIT; |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 199 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 200 | fn parse_descriptor_proto() -> crate::descriptor::FileDescriptorProto { |
Haibo Huang | 914311b | 2021-01-07 18:06:15 -0800 | [diff] [blame] | 201 | crate::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 202 | } |
| 203 | |
Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 204 | pub fn file_descriptor_proto() -> &'static crate::descriptor::FileDescriptorProto { |
Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 205 | file_descriptor_proto_lazy.get(|| { |
| 206 | parse_descriptor_proto() |
| 207 | }) |
Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 208 | } |