blob: 5c6948747c69bbf39f5af495620063d8e90b7c7a [file] [log] [blame]
Joel Galensonfa77f002021-04-02 11:32:01 -07001// This file is generated by rust-protobuf 2.22.0. Do not edit
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002// @generated
3
4// https://github.com/rust-lang/rust-clippy/issues/702
5#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
Haibo Huang52aa7852020-07-10 20:23:55 -07008#![allow(unused_attributes)]
Joel Galensonfa77f002021-04-02 11:32:01 -07009#![cfg_attr(rustfmt, rustfmt::skip)]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010
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 Hsiehcfc3a232020-06-10 20:13:05 -070018#![allow(unused_imports)]
19#![allow(unused_results)]
20//! Generated file from `google/protobuf/empty.proto`
21
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070022#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -080023#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070024pub struct Empty {
25 // special fields
26 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -070027 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070028 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -070029 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070030}
31
32impl<'a> ::std::default::Default for &'a Empty {
33 fn default() -> &'a Empty {
Haibo Huangd32e6ee2020-08-12 13:52:04 -070034 <Empty as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070035 }
36}
37
38impl Empty {
39 pub fn new() -> Empty {
40 ::std::default::Default::default()
41 }
42}
43
Haibo Huangd32e6ee2020-08-12 13:52:04 -070044impl crate::Message for Empty {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070045 fn is_initialized(&self) -> bool {
46 true
47 }
48
Haibo Huangd32e6ee2020-08-12 13:52:04 -070049 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070050 while !is.eof()? {
51 let (field_number, wire_type) = is.read_tag_unpack()?;
52 match field_number {
53 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -070054 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070055 },
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 Huangd32e6ee2020-08-12 13:52:04 -070065 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070066 self.cached_size.set(my_size);
67 my_size
68 }
69
Haibo Huangd32e6ee2020-08-12 13:52:04 -070070 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070071 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 Huangd32e6ee2020-08-12 13:52:04 -070079 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070080 &self.unknown_fields
81 }
82
Haibo Huangd32e6ee2020-08-12 13:52:04 -070083 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070084 &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 Huang52aa7852020-07-10 20:23:55 -070093 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070094 self
95 }
96
Haibo Huangd32e6ee2020-08-12 13:52:04 -070097 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070098 Self::descriptor_static()
99 }
100
101 fn new() -> Empty {
102 Empty::new()
103 }
104
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700105 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
106 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700107 descriptor.get(|| {
108 let fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700109 crate::reflect::MessageDescriptor::new_pb_name::<Empty>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700110 "Empty",
111 fields,
112 file_descriptor_proto()
113 )
114 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700115 }
116
117 fn default_instance() -> &'static Empty {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700118 static instance: crate::rt::LazyV2<Empty> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700119 instance.get(Empty::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700120 }
121}
122
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700123impl crate::Clear for Empty {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700124 fn clear(&mut self) {
125 self.unknown_fields.clear();
126 }
127}
128
129impl ::std::fmt::Debug for Empty {
130 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700131 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700132 }
133}
134
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700135impl crate::reflect::ProtobufValue for Empty {
136 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
137 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700138 }
139}
140
141static file_descriptor_proto_data: &'static [u8] = b"\
142 \n\x1bgoogle/protobuf/empty.proto\x12\x0fgoogle.protobuf\"\x07\n\x05Empt\
Haibo Huangca95bfd2021-02-09 17:48:30 -0800143 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 Hsiehcfc3a232020-06-10 20:13:05 -0700185 \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 Huangd32e6ee2020-08-12 13:52:04 -0700198static file_descriptor_proto_lazy: crate::rt::LazyV2<crate::descriptor::FileDescriptorProto> = crate::rt::LazyV2::INIT;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700199
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700200fn parse_descriptor_proto() -> crate::descriptor::FileDescriptorProto {
Haibo Huang914311b2021-01-07 18:06:15 -0800201 crate::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700202}
203
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700204pub fn file_descriptor_proto() -> &'static crate::descriptor::FileDescriptorProto {
Haibo Huang52aa7852020-07-10 20:23:55 -0700205 file_descriptor_proto_lazy.get(|| {
206 parse_descriptor_proto()
207 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700208}