blob: a03970aa0af8f0d06f684a1f2236c9be8ab57e80 [file] [log] [blame]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001// This file is generated by rust-protobuf 2.17.0-pre. 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)]
9#![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/descriptor.proto`
21
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070022#[derive(PartialEq,Clone,Default)]
23#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
24pub struct FileDescriptorSet {
25 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -070026 pub file: crate::RepeatedField<FileDescriptorProto>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070027 // special fields
28 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -070029 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070030 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -070031 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070032}
33
34impl<'a> ::std::default::Default for &'a FileDescriptorSet {
35 fn default() -> &'a FileDescriptorSet {
Haibo Huangd32e6ee2020-08-12 13:52:04 -070036 <FileDescriptorSet as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070037 }
38}
39
40impl FileDescriptorSet {
41 pub fn new() -> FileDescriptorSet {
42 ::std::default::Default::default()
43 }
44
45 // repeated .google.protobuf.FileDescriptorProto file = 1;
46
47
48 pub fn get_file(&self) -> &[FileDescriptorProto] {
49 &self.file
50 }
51 pub fn clear_file(&mut self) {
52 self.file.clear();
53 }
54
55 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -070056 pub fn set_file(&mut self, v: crate::RepeatedField<FileDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070057 self.file = v;
58 }
59
60 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -070061 pub fn mut_file(&mut self) -> &mut crate::RepeatedField<FileDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070062 &mut self.file
63 }
64
65 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -070066 pub fn take_file(&mut self) -> crate::RepeatedField<FileDescriptorProto> {
67 ::std::mem::replace(&mut self.file, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070068 }
69}
70
Haibo Huangd32e6ee2020-08-12 13:52:04 -070071impl crate::Message for FileDescriptorSet {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070072 fn is_initialized(&self) -> bool {
73 for v in &self.file {
74 if !v.is_initialized() {
75 return false;
76 }
77 };
78 true
79 }
80
Haibo Huangd32e6ee2020-08-12 13:52:04 -070081 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070082 while !is.eof()? {
83 let (field_number, wire_type) = is.read_tag_unpack()?;
84 match field_number {
85 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -070086 crate::rt::read_repeated_message_into(wire_type, is, &mut self.file)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070087 },
88 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -070089 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070090 },
91 };
92 }
93 ::std::result::Result::Ok(())
94 }
95
96 // Compute sizes of nested messages
97 #[allow(unused_variables)]
98 fn compute_size(&self) -> u32 {
99 let mut my_size = 0;
100 for value in &self.file {
101 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700102 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700103 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700104 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700105 self.cached_size.set(my_size);
106 my_size
107 }
108
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700109 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700110 for v in &self.file {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700111 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700112 os.write_raw_varint32(v.get_cached_size())?;
113 v.write_to_with_cached_sizes(os)?;
114 };
115 os.write_unknown_fields(self.get_unknown_fields())?;
116 ::std::result::Result::Ok(())
117 }
118
119 fn get_cached_size(&self) -> u32 {
120 self.cached_size.get()
121 }
122
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700123 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700124 &self.unknown_fields
125 }
126
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700127 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700128 &mut self.unknown_fields
129 }
130
131 fn as_any(&self) -> &dyn (::std::any::Any) {
132 self as &dyn (::std::any::Any)
133 }
134 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
135 self as &mut dyn (::std::any::Any)
136 }
Haibo Huang52aa7852020-07-10 20:23:55 -0700137 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700138 self
139 }
140
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700141 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700142 Self::descriptor_static()
143 }
144
145 fn new() -> FileDescriptorSet {
146 FileDescriptorSet::new()
147 }
148
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700149 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
150 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700151 descriptor.get(|| {
152 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700153 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<FileDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700154 "file",
155 |m: &FileDescriptorSet| { &m.file },
156 |m: &mut FileDescriptorSet| { &mut m.file },
157 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700158 crate::reflect::MessageDescriptor::new_pb_name::<FileDescriptorSet>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700159 "FileDescriptorSet",
160 fields,
161 file_descriptor_proto()
162 )
163 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700164 }
165
166 fn default_instance() -> &'static FileDescriptorSet {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700167 static instance: crate::rt::LazyV2<FileDescriptorSet> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700168 instance.get(FileDescriptorSet::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700169 }
170}
171
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700172impl crate::Clear for FileDescriptorSet {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700173 fn clear(&mut self) {
174 self.file.clear();
175 self.unknown_fields.clear();
176 }
177}
178
179impl ::std::fmt::Debug for FileDescriptorSet {
180 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700181 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700182 }
183}
184
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700185impl crate::reflect::ProtobufValue for FileDescriptorSet {
186 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
187 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700188 }
189}
190
191#[derive(PartialEq,Clone,Default)]
192#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
193pub struct FileDescriptorProto {
194 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700195 name: crate::SingularField<::std::string::String>,
196 package: crate::SingularField<::std::string::String>,
197 pub dependency: crate::RepeatedField<::std::string::String>,
Haibo Huang52aa7852020-07-10 20:23:55 -0700198 pub public_dependency: ::std::vec::Vec<i32>,
199 pub weak_dependency: ::std::vec::Vec<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700200 pub message_type: crate::RepeatedField<DescriptorProto>,
201 pub enum_type: crate::RepeatedField<EnumDescriptorProto>,
202 pub service: crate::RepeatedField<ServiceDescriptorProto>,
203 pub extension: crate::RepeatedField<FieldDescriptorProto>,
204 pub options: crate::SingularPtrField<FileOptions>,
205 pub source_code_info: crate::SingularPtrField<SourceCodeInfo>,
206 syntax: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700207 // special fields
208 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700209 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700210 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700211 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700212}
213
214impl<'a> ::std::default::Default for &'a FileDescriptorProto {
215 fn default() -> &'a FileDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700216 <FileDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700217 }
218}
219
220impl FileDescriptorProto {
221 pub fn new() -> FileDescriptorProto {
222 ::std::default::Default::default()
223 }
224
225 // optional string name = 1;
226
227
228 pub fn get_name(&self) -> &str {
229 match self.name.as_ref() {
230 Some(v) => &v,
231 None => "",
232 }
233 }
234 pub fn clear_name(&mut self) {
235 self.name.clear();
236 }
237
238 pub fn has_name(&self) -> bool {
239 self.name.is_some()
240 }
241
242 // Param is passed by value, moved
243 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700244 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700245 }
246
247 // Mutable pointer to the field.
248 // If field is not initialized, it is initialized with default value first.
249 pub fn mut_name(&mut self) -> &mut ::std::string::String {
250 if self.name.is_none() {
251 self.name.set_default();
252 }
253 self.name.as_mut().unwrap()
254 }
255
256 // Take field
257 pub fn take_name(&mut self) -> ::std::string::String {
258 self.name.take().unwrap_or_else(|| ::std::string::String::new())
259 }
260
261 // optional string package = 2;
262
263
264 pub fn get_package(&self) -> &str {
265 match self.package.as_ref() {
266 Some(v) => &v,
267 None => "",
268 }
269 }
270 pub fn clear_package(&mut self) {
271 self.package.clear();
272 }
273
274 pub fn has_package(&self) -> bool {
275 self.package.is_some()
276 }
277
278 // Param is passed by value, moved
279 pub fn set_package(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700280 self.package = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700281 }
282
283 // Mutable pointer to the field.
284 // If field is not initialized, it is initialized with default value first.
285 pub fn mut_package(&mut self) -> &mut ::std::string::String {
286 if self.package.is_none() {
287 self.package.set_default();
288 }
289 self.package.as_mut().unwrap()
290 }
291
292 // Take field
293 pub fn take_package(&mut self) -> ::std::string::String {
294 self.package.take().unwrap_or_else(|| ::std::string::String::new())
295 }
296
297 // repeated string dependency = 3;
298
299
300 pub fn get_dependency(&self) -> &[::std::string::String] {
301 &self.dependency
302 }
303 pub fn clear_dependency(&mut self) {
304 self.dependency.clear();
305 }
306
307 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700308 pub fn set_dependency(&mut self, v: crate::RepeatedField<::std::string::String>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700309 self.dependency = v;
310 }
311
312 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700313 pub fn mut_dependency(&mut self) -> &mut crate::RepeatedField<::std::string::String> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700314 &mut self.dependency
315 }
316
317 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700318 pub fn take_dependency(&mut self) -> crate::RepeatedField<::std::string::String> {
319 ::std::mem::replace(&mut self.dependency, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700320 }
321
322 // repeated int32 public_dependency = 10;
323
324
325 pub fn get_public_dependency(&self) -> &[i32] {
326 &self.public_dependency
327 }
328 pub fn clear_public_dependency(&mut self) {
329 self.public_dependency.clear();
330 }
331
332 // Param is passed by value, moved
333 pub fn set_public_dependency(&mut self, v: ::std::vec::Vec<i32>) {
334 self.public_dependency = v;
335 }
336
337 // Mutable pointer to the field.
338 pub fn mut_public_dependency(&mut self) -> &mut ::std::vec::Vec<i32> {
339 &mut self.public_dependency
340 }
341
342 // Take field
343 pub fn take_public_dependency(&mut self) -> ::std::vec::Vec<i32> {
344 ::std::mem::replace(&mut self.public_dependency, ::std::vec::Vec::new())
345 }
346
347 // repeated int32 weak_dependency = 11;
348
349
350 pub fn get_weak_dependency(&self) -> &[i32] {
351 &self.weak_dependency
352 }
353 pub fn clear_weak_dependency(&mut self) {
354 self.weak_dependency.clear();
355 }
356
357 // Param is passed by value, moved
358 pub fn set_weak_dependency(&mut self, v: ::std::vec::Vec<i32>) {
359 self.weak_dependency = v;
360 }
361
362 // Mutable pointer to the field.
363 pub fn mut_weak_dependency(&mut self) -> &mut ::std::vec::Vec<i32> {
364 &mut self.weak_dependency
365 }
366
367 // Take field
368 pub fn take_weak_dependency(&mut self) -> ::std::vec::Vec<i32> {
369 ::std::mem::replace(&mut self.weak_dependency, ::std::vec::Vec::new())
370 }
371
372 // repeated .google.protobuf.DescriptorProto message_type = 4;
373
374
375 pub fn get_message_type(&self) -> &[DescriptorProto] {
376 &self.message_type
377 }
378 pub fn clear_message_type(&mut self) {
379 self.message_type.clear();
380 }
381
382 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700383 pub fn set_message_type(&mut self, v: crate::RepeatedField<DescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700384 self.message_type = v;
385 }
386
387 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700388 pub fn mut_message_type(&mut self) -> &mut crate::RepeatedField<DescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700389 &mut self.message_type
390 }
391
392 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700393 pub fn take_message_type(&mut self) -> crate::RepeatedField<DescriptorProto> {
394 ::std::mem::replace(&mut self.message_type, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700395 }
396
397 // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
398
399
400 pub fn get_enum_type(&self) -> &[EnumDescriptorProto] {
401 &self.enum_type
402 }
403 pub fn clear_enum_type(&mut self) {
404 self.enum_type.clear();
405 }
406
407 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700408 pub fn set_enum_type(&mut self, v: crate::RepeatedField<EnumDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700409 self.enum_type = v;
410 }
411
412 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700413 pub fn mut_enum_type(&mut self) -> &mut crate::RepeatedField<EnumDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700414 &mut self.enum_type
415 }
416
417 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700418 pub fn take_enum_type(&mut self) -> crate::RepeatedField<EnumDescriptorProto> {
419 ::std::mem::replace(&mut self.enum_type, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700420 }
421
422 // repeated .google.protobuf.ServiceDescriptorProto service = 6;
423
424
425 pub fn get_service(&self) -> &[ServiceDescriptorProto] {
426 &self.service
427 }
428 pub fn clear_service(&mut self) {
429 self.service.clear();
430 }
431
432 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700433 pub fn set_service(&mut self, v: crate::RepeatedField<ServiceDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700434 self.service = v;
435 }
436
437 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700438 pub fn mut_service(&mut self) -> &mut crate::RepeatedField<ServiceDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700439 &mut self.service
440 }
441
442 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700443 pub fn take_service(&mut self) -> crate::RepeatedField<ServiceDescriptorProto> {
444 ::std::mem::replace(&mut self.service, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700445 }
446
447 // repeated .google.protobuf.FieldDescriptorProto extension = 7;
448
449
450 pub fn get_extension(&self) -> &[FieldDescriptorProto] {
451 &self.extension
452 }
453 pub fn clear_extension(&mut self) {
454 self.extension.clear();
455 }
456
457 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700458 pub fn set_extension(&mut self, v: crate::RepeatedField<FieldDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700459 self.extension = v;
460 }
461
462 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700463 pub fn mut_extension(&mut self) -> &mut crate::RepeatedField<FieldDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700464 &mut self.extension
465 }
466
467 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700468 pub fn take_extension(&mut self) -> crate::RepeatedField<FieldDescriptorProto> {
469 ::std::mem::replace(&mut self.extension, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700470 }
471
472 // optional .google.protobuf.FileOptions options = 8;
473
474
475 pub fn get_options(&self) -> &FileOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700476 self.options.as_ref().unwrap_or_else(|| <FileOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700477 }
478 pub fn clear_options(&mut self) {
479 self.options.clear();
480 }
481
482 pub fn has_options(&self) -> bool {
483 self.options.is_some()
484 }
485
486 // Param is passed by value, moved
487 pub fn set_options(&mut self, v: FileOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700488 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700489 }
490
491 // Mutable pointer to the field.
492 // If field is not initialized, it is initialized with default value first.
493 pub fn mut_options(&mut self) -> &mut FileOptions {
494 if self.options.is_none() {
495 self.options.set_default();
496 }
497 self.options.as_mut().unwrap()
498 }
499
500 // Take field
501 pub fn take_options(&mut self) -> FileOptions {
502 self.options.take().unwrap_or_else(|| FileOptions::new())
503 }
504
505 // optional .google.protobuf.SourceCodeInfo source_code_info = 9;
506
507
508 pub fn get_source_code_info(&self) -> &SourceCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700509 self.source_code_info.as_ref().unwrap_or_else(|| <SourceCodeInfo as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700510 }
511 pub fn clear_source_code_info(&mut self) {
512 self.source_code_info.clear();
513 }
514
515 pub fn has_source_code_info(&self) -> bool {
516 self.source_code_info.is_some()
517 }
518
519 // Param is passed by value, moved
520 pub fn set_source_code_info(&mut self, v: SourceCodeInfo) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700521 self.source_code_info = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700522 }
523
524 // Mutable pointer to the field.
525 // If field is not initialized, it is initialized with default value first.
526 pub fn mut_source_code_info(&mut self) -> &mut SourceCodeInfo {
527 if self.source_code_info.is_none() {
528 self.source_code_info.set_default();
529 }
530 self.source_code_info.as_mut().unwrap()
531 }
532
533 // Take field
534 pub fn take_source_code_info(&mut self) -> SourceCodeInfo {
535 self.source_code_info.take().unwrap_or_else(|| SourceCodeInfo::new())
536 }
537
538 // optional string syntax = 12;
539
540
541 pub fn get_syntax(&self) -> &str {
542 match self.syntax.as_ref() {
543 Some(v) => &v,
544 None => "",
545 }
546 }
547 pub fn clear_syntax(&mut self) {
548 self.syntax.clear();
549 }
550
551 pub fn has_syntax(&self) -> bool {
552 self.syntax.is_some()
553 }
554
555 // Param is passed by value, moved
556 pub fn set_syntax(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700557 self.syntax = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700558 }
559
560 // Mutable pointer to the field.
561 // If field is not initialized, it is initialized with default value first.
562 pub fn mut_syntax(&mut self) -> &mut ::std::string::String {
563 if self.syntax.is_none() {
564 self.syntax.set_default();
565 }
566 self.syntax.as_mut().unwrap()
567 }
568
569 // Take field
570 pub fn take_syntax(&mut self) -> ::std::string::String {
571 self.syntax.take().unwrap_or_else(|| ::std::string::String::new())
572 }
573}
574
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700575impl crate::Message for FileDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700576 fn is_initialized(&self) -> bool {
577 for v in &self.message_type {
578 if !v.is_initialized() {
579 return false;
580 }
581 };
582 for v in &self.enum_type {
583 if !v.is_initialized() {
584 return false;
585 }
586 };
587 for v in &self.service {
588 if !v.is_initialized() {
589 return false;
590 }
591 };
592 for v in &self.extension {
593 if !v.is_initialized() {
594 return false;
595 }
596 };
597 for v in &self.options {
598 if !v.is_initialized() {
599 return false;
600 }
601 };
602 for v in &self.source_code_info {
603 if !v.is_initialized() {
604 return false;
605 }
606 };
607 true
608 }
609
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700610 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700611 while !is.eof()? {
612 let (field_number, wire_type) = is.read_tag_unpack()?;
613 match field_number {
614 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700615 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700616 },
617 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700618 crate::rt::read_singular_string_into(wire_type, is, &mut self.package)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700619 },
620 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700621 crate::rt::read_repeated_string_into(wire_type, is, &mut self.dependency)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700622 },
623 10 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700624 crate::rt::read_repeated_int32_into(wire_type, is, &mut self.public_dependency)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700625 },
626 11 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700627 crate::rt::read_repeated_int32_into(wire_type, is, &mut self.weak_dependency)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700628 },
629 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700630 crate::rt::read_repeated_message_into(wire_type, is, &mut self.message_type)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700631 },
632 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700633 crate::rt::read_repeated_message_into(wire_type, is, &mut self.enum_type)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700634 },
635 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700636 crate::rt::read_repeated_message_into(wire_type, is, &mut self.service)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700637 },
638 7 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700639 crate::rt::read_repeated_message_into(wire_type, is, &mut self.extension)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700640 },
641 8 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700642 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700643 },
644 9 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700645 crate::rt::read_singular_message_into(wire_type, is, &mut self.source_code_info)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700646 },
647 12 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700648 crate::rt::read_singular_string_into(wire_type, is, &mut self.syntax)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700649 },
650 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700651 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700652 },
653 };
654 }
655 ::std::result::Result::Ok(())
656 }
657
658 // Compute sizes of nested messages
659 #[allow(unused_variables)]
660 fn compute_size(&self) -> u32 {
661 let mut my_size = 0;
662 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700663 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700664 }
665 if let Some(ref v) = self.package.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700666 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700667 }
668 for value in &self.dependency {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700669 my_size += crate::rt::string_size(3, &value);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700670 };
671 for value in &self.public_dependency {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700672 my_size += crate::rt::value_size(10, *value, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700673 };
674 for value in &self.weak_dependency {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700675 my_size += crate::rt::value_size(11, *value, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700676 };
677 for value in &self.message_type {
678 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700679 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700680 };
681 for value in &self.enum_type {
682 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700683 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700684 };
685 for value in &self.service {
686 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700687 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700688 };
689 for value in &self.extension {
690 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700691 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700692 };
693 if let Some(ref v) = self.options.as_ref() {
694 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700695 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700696 }
697 if let Some(ref v) = self.source_code_info.as_ref() {
698 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700699 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700700 }
701 if let Some(ref v) = self.syntax.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700702 my_size += crate::rt::string_size(12, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700703 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700704 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700705 self.cached_size.set(my_size);
706 my_size
707 }
708
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700709 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700710 if let Some(ref v) = self.name.as_ref() {
711 os.write_string(1, &v)?;
712 }
713 if let Some(ref v) = self.package.as_ref() {
714 os.write_string(2, &v)?;
715 }
716 for v in &self.dependency {
717 os.write_string(3, &v)?;
718 };
719 for v in &self.public_dependency {
720 os.write_int32(10, *v)?;
721 };
722 for v in &self.weak_dependency {
723 os.write_int32(11, *v)?;
724 };
725 for v in &self.message_type {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700726 os.write_tag(4, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700727 os.write_raw_varint32(v.get_cached_size())?;
728 v.write_to_with_cached_sizes(os)?;
729 };
730 for v in &self.enum_type {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700731 os.write_tag(5, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700732 os.write_raw_varint32(v.get_cached_size())?;
733 v.write_to_with_cached_sizes(os)?;
734 };
735 for v in &self.service {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700736 os.write_tag(6, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700737 os.write_raw_varint32(v.get_cached_size())?;
738 v.write_to_with_cached_sizes(os)?;
739 };
740 for v in &self.extension {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700741 os.write_tag(7, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700742 os.write_raw_varint32(v.get_cached_size())?;
743 v.write_to_with_cached_sizes(os)?;
744 };
745 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700746 os.write_tag(8, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700747 os.write_raw_varint32(v.get_cached_size())?;
748 v.write_to_with_cached_sizes(os)?;
749 }
750 if let Some(ref v) = self.source_code_info.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700751 os.write_tag(9, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700752 os.write_raw_varint32(v.get_cached_size())?;
753 v.write_to_with_cached_sizes(os)?;
754 }
755 if let Some(ref v) = self.syntax.as_ref() {
756 os.write_string(12, &v)?;
757 }
758 os.write_unknown_fields(self.get_unknown_fields())?;
759 ::std::result::Result::Ok(())
760 }
761
762 fn get_cached_size(&self) -> u32 {
763 self.cached_size.get()
764 }
765
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700766 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700767 &self.unknown_fields
768 }
769
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700770 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700771 &mut self.unknown_fields
772 }
773
774 fn as_any(&self) -> &dyn (::std::any::Any) {
775 self as &dyn (::std::any::Any)
776 }
777 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
778 self as &mut dyn (::std::any::Any)
779 }
Haibo Huang52aa7852020-07-10 20:23:55 -0700780 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700781 self
782 }
783
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700784 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700785 Self::descriptor_static()
786 }
787
788 fn new() -> FileDescriptorProto {
789 FileDescriptorProto::new()
790 }
791
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700792 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
793 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700794 descriptor.get(|| {
795 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700796 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700797 "name",
798 |m: &FileDescriptorProto| { &m.name },
799 |m: &mut FileDescriptorProto| { &mut m.name },
800 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700801 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700802 "package",
803 |m: &FileDescriptorProto| { &m.package },
804 |m: &mut FileDescriptorProto| { &mut m.package },
805 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700806 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700807 "dependency",
808 |m: &FileDescriptorProto| { &m.dependency },
809 |m: &mut FileDescriptorProto| { &mut m.dependency },
810 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700811 fields.push(crate::reflect::accessor::make_vec_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700812 "public_dependency",
813 |m: &FileDescriptorProto| { &m.public_dependency },
814 |m: &mut FileDescriptorProto| { &mut m.public_dependency },
815 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700816 fields.push(crate::reflect::accessor::make_vec_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700817 "weak_dependency",
818 |m: &FileDescriptorProto| { &m.weak_dependency },
819 |m: &mut FileDescriptorProto| { &mut m.weak_dependency },
820 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700821 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<DescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700822 "message_type",
823 |m: &FileDescriptorProto| { &m.message_type },
824 |m: &mut FileDescriptorProto| { &mut m.message_type },
825 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700826 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700827 "enum_type",
828 |m: &FileDescriptorProto| { &m.enum_type },
829 |m: &mut FileDescriptorProto| { &mut m.enum_type },
830 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700831 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<ServiceDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700832 "service",
833 |m: &FileDescriptorProto| { &m.service },
834 |m: &mut FileDescriptorProto| { &mut m.service },
835 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700836 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<FieldDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700837 "extension",
838 |m: &FileDescriptorProto| { &m.extension },
839 |m: &mut FileDescriptorProto| { &mut m.extension },
840 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700841 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<FileOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700842 "options",
843 |m: &FileDescriptorProto| { &m.options },
844 |m: &mut FileDescriptorProto| { &mut m.options },
845 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700846 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<SourceCodeInfo>>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700847 "source_code_info",
848 |m: &FileDescriptorProto| { &m.source_code_info },
849 |m: &mut FileDescriptorProto| { &mut m.source_code_info },
850 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700851 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700852 "syntax",
853 |m: &FileDescriptorProto| { &m.syntax },
854 |m: &mut FileDescriptorProto| { &mut m.syntax },
855 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700856 crate::reflect::MessageDescriptor::new_pb_name::<FileDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -0700857 "FileDescriptorProto",
858 fields,
859 file_descriptor_proto()
860 )
861 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700862 }
863
864 fn default_instance() -> &'static FileDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700865 static instance: crate::rt::LazyV2<FileDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -0700866 instance.get(FileDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700867 }
868}
869
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700870impl crate::Clear for FileDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700871 fn clear(&mut self) {
872 self.name.clear();
873 self.package.clear();
874 self.dependency.clear();
875 self.public_dependency.clear();
876 self.weak_dependency.clear();
877 self.message_type.clear();
878 self.enum_type.clear();
879 self.service.clear();
880 self.extension.clear();
881 self.options.clear();
882 self.source_code_info.clear();
883 self.syntax.clear();
884 self.unknown_fields.clear();
885 }
886}
887
888impl ::std::fmt::Debug for FileDescriptorProto {
889 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700890 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700891 }
892}
893
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700894impl crate::reflect::ProtobufValue for FileDescriptorProto {
895 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
896 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700897 }
898}
899
900#[derive(PartialEq,Clone,Default)]
901#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
902pub struct DescriptorProto {
903 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700904 name: crate::SingularField<::std::string::String>,
905 pub field: crate::RepeatedField<FieldDescriptorProto>,
906 pub extension: crate::RepeatedField<FieldDescriptorProto>,
907 pub nested_type: crate::RepeatedField<DescriptorProto>,
908 pub enum_type: crate::RepeatedField<EnumDescriptorProto>,
909 pub extension_range: crate::RepeatedField<DescriptorProto_ExtensionRange>,
910 pub oneof_decl: crate::RepeatedField<OneofDescriptorProto>,
911 pub options: crate::SingularPtrField<MessageOptions>,
912 pub reserved_range: crate::RepeatedField<DescriptorProto_ReservedRange>,
913 pub reserved_name: crate::RepeatedField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700914 // special fields
915 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700916 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700917 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700918 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700919}
920
921impl<'a> ::std::default::Default for &'a DescriptorProto {
922 fn default() -> &'a DescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700923 <DescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700924 }
925}
926
927impl DescriptorProto {
928 pub fn new() -> DescriptorProto {
929 ::std::default::Default::default()
930 }
931
932 // optional string name = 1;
933
934
935 pub fn get_name(&self) -> &str {
936 match self.name.as_ref() {
937 Some(v) => &v,
938 None => "",
939 }
940 }
941 pub fn clear_name(&mut self) {
942 self.name.clear();
943 }
944
945 pub fn has_name(&self) -> bool {
946 self.name.is_some()
947 }
948
949 // Param is passed by value, moved
950 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700951 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700952 }
953
954 // Mutable pointer to the field.
955 // If field is not initialized, it is initialized with default value first.
956 pub fn mut_name(&mut self) -> &mut ::std::string::String {
957 if self.name.is_none() {
958 self.name.set_default();
959 }
960 self.name.as_mut().unwrap()
961 }
962
963 // Take field
964 pub fn take_name(&mut self) -> ::std::string::String {
965 self.name.take().unwrap_or_else(|| ::std::string::String::new())
966 }
967
968 // repeated .google.protobuf.FieldDescriptorProto field = 2;
969
970
971 pub fn get_field(&self) -> &[FieldDescriptorProto] {
972 &self.field
973 }
974 pub fn clear_field(&mut self) {
975 self.field.clear();
976 }
977
978 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700979 pub fn set_field(&mut self, v: crate::RepeatedField<FieldDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700980 self.field = v;
981 }
982
983 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700984 pub fn mut_field(&mut self) -> &mut crate::RepeatedField<FieldDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700985 &mut self.field
986 }
987
988 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -0700989 pub fn take_field(&mut self) -> crate::RepeatedField<FieldDescriptorProto> {
990 ::std::mem::replace(&mut self.field, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700991 }
992
993 // repeated .google.protobuf.FieldDescriptorProto extension = 6;
994
995
996 pub fn get_extension(&self) -> &[FieldDescriptorProto] {
997 &self.extension
998 }
999 pub fn clear_extension(&mut self) {
1000 self.extension.clear();
1001 }
1002
1003 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001004 pub fn set_extension(&mut self, v: crate::RepeatedField<FieldDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001005 self.extension = v;
1006 }
1007
1008 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001009 pub fn mut_extension(&mut self) -> &mut crate::RepeatedField<FieldDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001010 &mut self.extension
1011 }
1012
1013 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001014 pub fn take_extension(&mut self) -> crate::RepeatedField<FieldDescriptorProto> {
1015 ::std::mem::replace(&mut self.extension, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001016 }
1017
1018 // repeated .google.protobuf.DescriptorProto nested_type = 3;
1019
1020
1021 pub fn get_nested_type(&self) -> &[DescriptorProto] {
1022 &self.nested_type
1023 }
1024 pub fn clear_nested_type(&mut self) {
1025 self.nested_type.clear();
1026 }
1027
1028 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001029 pub fn set_nested_type(&mut self, v: crate::RepeatedField<DescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001030 self.nested_type = v;
1031 }
1032
1033 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001034 pub fn mut_nested_type(&mut self) -> &mut crate::RepeatedField<DescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001035 &mut self.nested_type
1036 }
1037
1038 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001039 pub fn take_nested_type(&mut self) -> crate::RepeatedField<DescriptorProto> {
1040 ::std::mem::replace(&mut self.nested_type, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001041 }
1042
1043 // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
1044
1045
1046 pub fn get_enum_type(&self) -> &[EnumDescriptorProto] {
1047 &self.enum_type
1048 }
1049 pub fn clear_enum_type(&mut self) {
1050 self.enum_type.clear();
1051 }
1052
1053 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001054 pub fn set_enum_type(&mut self, v: crate::RepeatedField<EnumDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001055 self.enum_type = v;
1056 }
1057
1058 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001059 pub fn mut_enum_type(&mut self) -> &mut crate::RepeatedField<EnumDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001060 &mut self.enum_type
1061 }
1062
1063 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001064 pub fn take_enum_type(&mut self) -> crate::RepeatedField<EnumDescriptorProto> {
1065 ::std::mem::replace(&mut self.enum_type, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001066 }
1067
1068 // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
1069
1070
1071 pub fn get_extension_range(&self) -> &[DescriptorProto_ExtensionRange] {
1072 &self.extension_range
1073 }
1074 pub fn clear_extension_range(&mut self) {
1075 self.extension_range.clear();
1076 }
1077
1078 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001079 pub fn set_extension_range(&mut self, v: crate::RepeatedField<DescriptorProto_ExtensionRange>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001080 self.extension_range = v;
1081 }
1082
1083 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001084 pub fn mut_extension_range(&mut self) -> &mut crate::RepeatedField<DescriptorProto_ExtensionRange> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001085 &mut self.extension_range
1086 }
1087
1088 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001089 pub fn take_extension_range(&mut self) -> crate::RepeatedField<DescriptorProto_ExtensionRange> {
1090 ::std::mem::replace(&mut self.extension_range, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001091 }
1092
1093 // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
1094
1095
1096 pub fn get_oneof_decl(&self) -> &[OneofDescriptorProto] {
1097 &self.oneof_decl
1098 }
1099 pub fn clear_oneof_decl(&mut self) {
1100 self.oneof_decl.clear();
1101 }
1102
1103 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001104 pub fn set_oneof_decl(&mut self, v: crate::RepeatedField<OneofDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001105 self.oneof_decl = v;
1106 }
1107
1108 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001109 pub fn mut_oneof_decl(&mut self) -> &mut crate::RepeatedField<OneofDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001110 &mut self.oneof_decl
1111 }
1112
1113 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001114 pub fn take_oneof_decl(&mut self) -> crate::RepeatedField<OneofDescriptorProto> {
1115 ::std::mem::replace(&mut self.oneof_decl, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001116 }
1117
1118 // optional .google.protobuf.MessageOptions options = 7;
1119
1120
1121 pub fn get_options(&self) -> &MessageOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001122 self.options.as_ref().unwrap_or_else(|| <MessageOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001123 }
1124 pub fn clear_options(&mut self) {
1125 self.options.clear();
1126 }
1127
1128 pub fn has_options(&self) -> bool {
1129 self.options.is_some()
1130 }
1131
1132 // Param is passed by value, moved
1133 pub fn set_options(&mut self, v: MessageOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001134 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001135 }
1136
1137 // Mutable pointer to the field.
1138 // If field is not initialized, it is initialized with default value first.
1139 pub fn mut_options(&mut self) -> &mut MessageOptions {
1140 if self.options.is_none() {
1141 self.options.set_default();
1142 }
1143 self.options.as_mut().unwrap()
1144 }
1145
1146 // Take field
1147 pub fn take_options(&mut self) -> MessageOptions {
1148 self.options.take().unwrap_or_else(|| MessageOptions::new())
1149 }
1150
1151 // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
1152
1153
1154 pub fn get_reserved_range(&self) -> &[DescriptorProto_ReservedRange] {
1155 &self.reserved_range
1156 }
1157 pub fn clear_reserved_range(&mut self) {
1158 self.reserved_range.clear();
1159 }
1160
1161 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001162 pub fn set_reserved_range(&mut self, v: crate::RepeatedField<DescriptorProto_ReservedRange>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001163 self.reserved_range = v;
1164 }
1165
1166 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001167 pub fn mut_reserved_range(&mut self) -> &mut crate::RepeatedField<DescriptorProto_ReservedRange> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001168 &mut self.reserved_range
1169 }
1170
1171 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001172 pub fn take_reserved_range(&mut self) -> crate::RepeatedField<DescriptorProto_ReservedRange> {
1173 ::std::mem::replace(&mut self.reserved_range, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001174 }
1175
1176 // repeated string reserved_name = 10;
1177
1178
1179 pub fn get_reserved_name(&self) -> &[::std::string::String] {
1180 &self.reserved_name
1181 }
1182 pub fn clear_reserved_name(&mut self) {
1183 self.reserved_name.clear();
1184 }
1185
1186 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001187 pub fn set_reserved_name(&mut self, v: crate::RepeatedField<::std::string::String>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001188 self.reserved_name = v;
1189 }
1190
1191 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001192 pub fn mut_reserved_name(&mut self) -> &mut crate::RepeatedField<::std::string::String> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001193 &mut self.reserved_name
1194 }
1195
1196 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001197 pub fn take_reserved_name(&mut self) -> crate::RepeatedField<::std::string::String> {
1198 ::std::mem::replace(&mut self.reserved_name, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001199 }
1200}
1201
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001202impl crate::Message for DescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001203 fn is_initialized(&self) -> bool {
1204 for v in &self.field {
1205 if !v.is_initialized() {
1206 return false;
1207 }
1208 };
1209 for v in &self.extension {
1210 if !v.is_initialized() {
1211 return false;
1212 }
1213 };
1214 for v in &self.nested_type {
1215 if !v.is_initialized() {
1216 return false;
1217 }
1218 };
1219 for v in &self.enum_type {
1220 if !v.is_initialized() {
1221 return false;
1222 }
1223 };
1224 for v in &self.extension_range {
1225 if !v.is_initialized() {
1226 return false;
1227 }
1228 };
1229 for v in &self.oneof_decl {
1230 if !v.is_initialized() {
1231 return false;
1232 }
1233 };
1234 for v in &self.options {
1235 if !v.is_initialized() {
1236 return false;
1237 }
1238 };
1239 for v in &self.reserved_range {
1240 if !v.is_initialized() {
1241 return false;
1242 }
1243 };
1244 true
1245 }
1246
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001247 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001248 while !is.eof()? {
1249 let (field_number, wire_type) = is.read_tag_unpack()?;
1250 match field_number {
1251 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001252 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001253 },
1254 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001255 crate::rt::read_repeated_message_into(wire_type, is, &mut self.field)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001256 },
1257 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001258 crate::rt::read_repeated_message_into(wire_type, is, &mut self.extension)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001259 },
1260 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001261 crate::rt::read_repeated_message_into(wire_type, is, &mut self.nested_type)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001262 },
1263 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001264 crate::rt::read_repeated_message_into(wire_type, is, &mut self.enum_type)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001265 },
1266 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001267 crate::rt::read_repeated_message_into(wire_type, is, &mut self.extension_range)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001268 },
1269 8 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001270 crate::rt::read_repeated_message_into(wire_type, is, &mut self.oneof_decl)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001271 },
1272 7 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001273 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001274 },
1275 9 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001276 crate::rt::read_repeated_message_into(wire_type, is, &mut self.reserved_range)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001277 },
1278 10 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001279 crate::rt::read_repeated_string_into(wire_type, is, &mut self.reserved_name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001280 },
1281 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001282 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001283 },
1284 };
1285 }
1286 ::std::result::Result::Ok(())
1287 }
1288
1289 // Compute sizes of nested messages
1290 #[allow(unused_variables)]
1291 fn compute_size(&self) -> u32 {
1292 let mut my_size = 0;
1293 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001294 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001295 }
1296 for value in &self.field {
1297 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001298 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001299 };
1300 for value in &self.extension {
1301 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001302 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001303 };
1304 for value in &self.nested_type {
1305 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001306 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001307 };
1308 for value in &self.enum_type {
1309 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001310 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001311 };
1312 for value in &self.extension_range {
1313 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001314 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001315 };
1316 for value in &self.oneof_decl {
1317 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001318 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001319 };
1320 if let Some(ref v) = self.options.as_ref() {
1321 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001322 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001323 }
1324 for value in &self.reserved_range {
1325 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001326 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001327 };
1328 for value in &self.reserved_name {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001329 my_size += crate::rt::string_size(10, &value);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001330 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001331 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001332 self.cached_size.set(my_size);
1333 my_size
1334 }
1335
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001336 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001337 if let Some(ref v) = self.name.as_ref() {
1338 os.write_string(1, &v)?;
1339 }
1340 for v in &self.field {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001341 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001342 os.write_raw_varint32(v.get_cached_size())?;
1343 v.write_to_with_cached_sizes(os)?;
1344 };
1345 for v in &self.extension {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001346 os.write_tag(6, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001347 os.write_raw_varint32(v.get_cached_size())?;
1348 v.write_to_with_cached_sizes(os)?;
1349 };
1350 for v in &self.nested_type {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001351 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001352 os.write_raw_varint32(v.get_cached_size())?;
1353 v.write_to_with_cached_sizes(os)?;
1354 };
1355 for v in &self.enum_type {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001356 os.write_tag(4, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001357 os.write_raw_varint32(v.get_cached_size())?;
1358 v.write_to_with_cached_sizes(os)?;
1359 };
1360 for v in &self.extension_range {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001361 os.write_tag(5, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001362 os.write_raw_varint32(v.get_cached_size())?;
1363 v.write_to_with_cached_sizes(os)?;
1364 };
1365 for v in &self.oneof_decl {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001366 os.write_tag(8, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001367 os.write_raw_varint32(v.get_cached_size())?;
1368 v.write_to_with_cached_sizes(os)?;
1369 };
1370 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001371 os.write_tag(7, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001372 os.write_raw_varint32(v.get_cached_size())?;
1373 v.write_to_with_cached_sizes(os)?;
1374 }
1375 for v in &self.reserved_range {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001376 os.write_tag(9, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001377 os.write_raw_varint32(v.get_cached_size())?;
1378 v.write_to_with_cached_sizes(os)?;
1379 };
1380 for v in &self.reserved_name {
1381 os.write_string(10, &v)?;
1382 };
1383 os.write_unknown_fields(self.get_unknown_fields())?;
1384 ::std::result::Result::Ok(())
1385 }
1386
1387 fn get_cached_size(&self) -> u32 {
1388 self.cached_size.get()
1389 }
1390
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001391 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001392 &self.unknown_fields
1393 }
1394
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001395 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001396 &mut self.unknown_fields
1397 }
1398
1399 fn as_any(&self) -> &dyn (::std::any::Any) {
1400 self as &dyn (::std::any::Any)
1401 }
1402 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1403 self as &mut dyn (::std::any::Any)
1404 }
Haibo Huang52aa7852020-07-10 20:23:55 -07001405 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001406 self
1407 }
1408
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001409 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001410 Self::descriptor_static()
1411 }
1412
1413 fn new() -> DescriptorProto {
1414 DescriptorProto::new()
1415 }
1416
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001417 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
1418 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001419 descriptor.get(|| {
1420 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001421 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001422 "name",
1423 |m: &DescriptorProto| { &m.name },
1424 |m: &mut DescriptorProto| { &mut m.name },
1425 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001426 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<FieldDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001427 "field",
1428 |m: &DescriptorProto| { &m.field },
1429 |m: &mut DescriptorProto| { &mut m.field },
1430 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001431 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<FieldDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001432 "extension",
1433 |m: &DescriptorProto| { &m.extension },
1434 |m: &mut DescriptorProto| { &mut m.extension },
1435 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001436 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<DescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001437 "nested_type",
1438 |m: &DescriptorProto| { &m.nested_type },
1439 |m: &mut DescriptorProto| { &mut m.nested_type },
1440 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001441 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001442 "enum_type",
1443 |m: &DescriptorProto| { &m.enum_type },
1444 |m: &mut DescriptorProto| { &mut m.enum_type },
1445 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001446 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<DescriptorProto_ExtensionRange>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001447 "extension_range",
1448 |m: &DescriptorProto| { &m.extension_range },
1449 |m: &mut DescriptorProto| { &mut m.extension_range },
1450 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001451 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<OneofDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001452 "oneof_decl",
1453 |m: &DescriptorProto| { &m.oneof_decl },
1454 |m: &mut DescriptorProto| { &mut m.oneof_decl },
1455 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001456 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<MessageOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001457 "options",
1458 |m: &DescriptorProto| { &m.options },
1459 |m: &mut DescriptorProto| { &mut m.options },
1460 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001461 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<DescriptorProto_ReservedRange>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001462 "reserved_range",
1463 |m: &DescriptorProto| { &m.reserved_range },
1464 |m: &mut DescriptorProto| { &mut m.reserved_range },
1465 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001466 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001467 "reserved_name",
1468 |m: &DescriptorProto| { &m.reserved_name },
1469 |m: &mut DescriptorProto| { &mut m.reserved_name },
1470 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001471 crate::reflect::MessageDescriptor::new_pb_name::<DescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001472 "DescriptorProto",
1473 fields,
1474 file_descriptor_proto()
1475 )
1476 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001477 }
1478
1479 fn default_instance() -> &'static DescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001480 static instance: crate::rt::LazyV2<DescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001481 instance.get(DescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001482 }
1483}
1484
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001485impl crate::Clear for DescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001486 fn clear(&mut self) {
1487 self.name.clear();
1488 self.field.clear();
1489 self.extension.clear();
1490 self.nested_type.clear();
1491 self.enum_type.clear();
1492 self.extension_range.clear();
1493 self.oneof_decl.clear();
1494 self.options.clear();
1495 self.reserved_range.clear();
1496 self.reserved_name.clear();
1497 self.unknown_fields.clear();
1498 }
1499}
1500
1501impl ::std::fmt::Debug for DescriptorProto {
1502 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001503 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001504 }
1505}
1506
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001507impl crate::reflect::ProtobufValue for DescriptorProto {
1508 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
1509 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001510 }
1511}
1512
1513#[derive(PartialEq,Clone,Default)]
1514#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
1515pub struct DescriptorProto_ExtensionRange {
1516 // message fields
1517 start: ::std::option::Option<i32>,
1518 end: ::std::option::Option<i32>,
1519 // special fields
1520 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001521 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001522 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001523 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001524}
1525
1526impl<'a> ::std::default::Default for &'a DescriptorProto_ExtensionRange {
1527 fn default() -> &'a DescriptorProto_ExtensionRange {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001528 <DescriptorProto_ExtensionRange as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001529 }
1530}
1531
1532impl DescriptorProto_ExtensionRange {
1533 pub fn new() -> DescriptorProto_ExtensionRange {
1534 ::std::default::Default::default()
1535 }
1536
1537 // optional int32 start = 1;
1538
1539
1540 pub fn get_start(&self) -> i32 {
1541 self.start.unwrap_or(0)
1542 }
1543 pub fn clear_start(&mut self) {
1544 self.start = ::std::option::Option::None;
1545 }
1546
1547 pub fn has_start(&self) -> bool {
1548 self.start.is_some()
1549 }
1550
1551 // Param is passed by value, moved
1552 pub fn set_start(&mut self, v: i32) {
1553 self.start = ::std::option::Option::Some(v);
1554 }
1555
1556 // optional int32 end = 2;
1557
1558
1559 pub fn get_end(&self) -> i32 {
1560 self.end.unwrap_or(0)
1561 }
1562 pub fn clear_end(&mut self) {
1563 self.end = ::std::option::Option::None;
1564 }
1565
1566 pub fn has_end(&self) -> bool {
1567 self.end.is_some()
1568 }
1569
1570 // Param is passed by value, moved
1571 pub fn set_end(&mut self, v: i32) {
1572 self.end = ::std::option::Option::Some(v);
1573 }
1574}
1575
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001576impl crate::Message for DescriptorProto_ExtensionRange {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001577 fn is_initialized(&self) -> bool {
1578 true
1579 }
1580
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001581 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001582 while !is.eof()? {
1583 let (field_number, wire_type) = is.read_tag_unpack()?;
1584 match field_number {
1585 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001586 if wire_type != crate::wire_format::WireTypeVarint {
1587 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001588 }
1589 let tmp = is.read_int32()?;
1590 self.start = ::std::option::Option::Some(tmp);
1591 },
1592 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001593 if wire_type != crate::wire_format::WireTypeVarint {
1594 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001595 }
1596 let tmp = is.read_int32()?;
1597 self.end = ::std::option::Option::Some(tmp);
1598 },
1599 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001600 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001601 },
1602 };
1603 }
1604 ::std::result::Result::Ok(())
1605 }
1606
1607 // Compute sizes of nested messages
1608 #[allow(unused_variables)]
1609 fn compute_size(&self) -> u32 {
1610 let mut my_size = 0;
1611 if let Some(v) = self.start {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001612 my_size += crate::rt::value_size(1, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001613 }
1614 if let Some(v) = self.end {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001615 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001616 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001617 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001618 self.cached_size.set(my_size);
1619 my_size
1620 }
1621
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001622 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001623 if let Some(v) = self.start {
1624 os.write_int32(1, v)?;
1625 }
1626 if let Some(v) = self.end {
1627 os.write_int32(2, v)?;
1628 }
1629 os.write_unknown_fields(self.get_unknown_fields())?;
1630 ::std::result::Result::Ok(())
1631 }
1632
1633 fn get_cached_size(&self) -> u32 {
1634 self.cached_size.get()
1635 }
1636
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001637 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001638 &self.unknown_fields
1639 }
1640
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001641 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001642 &mut self.unknown_fields
1643 }
1644
1645 fn as_any(&self) -> &dyn (::std::any::Any) {
1646 self as &dyn (::std::any::Any)
1647 }
1648 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1649 self as &mut dyn (::std::any::Any)
1650 }
Haibo Huang52aa7852020-07-10 20:23:55 -07001651 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001652 self
1653 }
1654
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001655 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001656 Self::descriptor_static()
1657 }
1658
1659 fn new() -> DescriptorProto_ExtensionRange {
1660 DescriptorProto_ExtensionRange::new()
1661 }
1662
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001663 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
1664 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001665 descriptor.get(|| {
1666 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001667 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001668 "start",
1669 |m: &DescriptorProto_ExtensionRange| { &m.start },
1670 |m: &mut DescriptorProto_ExtensionRange| { &mut m.start },
1671 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001672 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001673 "end",
1674 |m: &DescriptorProto_ExtensionRange| { &m.end },
1675 |m: &mut DescriptorProto_ExtensionRange| { &mut m.end },
1676 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001677 crate::reflect::MessageDescriptor::new_pb_name::<DescriptorProto_ExtensionRange>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001678 "DescriptorProto.ExtensionRange",
1679 fields,
1680 file_descriptor_proto()
1681 )
1682 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001683 }
1684
1685 fn default_instance() -> &'static DescriptorProto_ExtensionRange {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001686 static instance: crate::rt::LazyV2<DescriptorProto_ExtensionRange> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001687 instance.get(DescriptorProto_ExtensionRange::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001688 }
1689}
1690
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001691impl crate::Clear for DescriptorProto_ExtensionRange {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001692 fn clear(&mut self) {
1693 self.start = ::std::option::Option::None;
1694 self.end = ::std::option::Option::None;
1695 self.unknown_fields.clear();
1696 }
1697}
1698
1699impl ::std::fmt::Debug for DescriptorProto_ExtensionRange {
1700 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001701 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001702 }
1703}
1704
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001705impl crate::reflect::ProtobufValue for DescriptorProto_ExtensionRange {
1706 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
1707 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001708 }
1709}
1710
1711#[derive(PartialEq,Clone,Default)]
1712#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
1713pub struct DescriptorProto_ReservedRange {
1714 // message fields
1715 start: ::std::option::Option<i32>,
1716 end: ::std::option::Option<i32>,
1717 // special fields
1718 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001719 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001720 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001721 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001722}
1723
1724impl<'a> ::std::default::Default for &'a DescriptorProto_ReservedRange {
1725 fn default() -> &'a DescriptorProto_ReservedRange {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001726 <DescriptorProto_ReservedRange as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001727 }
1728}
1729
1730impl DescriptorProto_ReservedRange {
1731 pub fn new() -> DescriptorProto_ReservedRange {
1732 ::std::default::Default::default()
1733 }
1734
1735 // optional int32 start = 1;
1736
1737
1738 pub fn get_start(&self) -> i32 {
1739 self.start.unwrap_or(0)
1740 }
1741 pub fn clear_start(&mut self) {
1742 self.start = ::std::option::Option::None;
1743 }
1744
1745 pub fn has_start(&self) -> bool {
1746 self.start.is_some()
1747 }
1748
1749 // Param is passed by value, moved
1750 pub fn set_start(&mut self, v: i32) {
1751 self.start = ::std::option::Option::Some(v);
1752 }
1753
1754 // optional int32 end = 2;
1755
1756
1757 pub fn get_end(&self) -> i32 {
1758 self.end.unwrap_or(0)
1759 }
1760 pub fn clear_end(&mut self) {
1761 self.end = ::std::option::Option::None;
1762 }
1763
1764 pub fn has_end(&self) -> bool {
1765 self.end.is_some()
1766 }
1767
1768 // Param is passed by value, moved
1769 pub fn set_end(&mut self, v: i32) {
1770 self.end = ::std::option::Option::Some(v);
1771 }
1772}
1773
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001774impl crate::Message for DescriptorProto_ReservedRange {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001775 fn is_initialized(&self) -> bool {
1776 true
1777 }
1778
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001779 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001780 while !is.eof()? {
1781 let (field_number, wire_type) = is.read_tag_unpack()?;
1782 match field_number {
1783 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001784 if wire_type != crate::wire_format::WireTypeVarint {
1785 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001786 }
1787 let tmp = is.read_int32()?;
1788 self.start = ::std::option::Option::Some(tmp);
1789 },
1790 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001791 if wire_type != crate::wire_format::WireTypeVarint {
1792 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001793 }
1794 let tmp = is.read_int32()?;
1795 self.end = ::std::option::Option::Some(tmp);
1796 },
1797 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001798 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001799 },
1800 };
1801 }
1802 ::std::result::Result::Ok(())
1803 }
1804
1805 // Compute sizes of nested messages
1806 #[allow(unused_variables)]
1807 fn compute_size(&self) -> u32 {
1808 let mut my_size = 0;
1809 if let Some(v) = self.start {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001810 my_size += crate::rt::value_size(1, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001811 }
1812 if let Some(v) = self.end {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001813 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001814 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001815 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001816 self.cached_size.set(my_size);
1817 my_size
1818 }
1819
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001820 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001821 if let Some(v) = self.start {
1822 os.write_int32(1, v)?;
1823 }
1824 if let Some(v) = self.end {
1825 os.write_int32(2, v)?;
1826 }
1827 os.write_unknown_fields(self.get_unknown_fields())?;
1828 ::std::result::Result::Ok(())
1829 }
1830
1831 fn get_cached_size(&self) -> u32 {
1832 self.cached_size.get()
1833 }
1834
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001835 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001836 &self.unknown_fields
1837 }
1838
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001839 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001840 &mut self.unknown_fields
1841 }
1842
1843 fn as_any(&self) -> &dyn (::std::any::Any) {
1844 self as &dyn (::std::any::Any)
1845 }
1846 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1847 self as &mut dyn (::std::any::Any)
1848 }
Haibo Huang52aa7852020-07-10 20:23:55 -07001849 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001850 self
1851 }
1852
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001853 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001854 Self::descriptor_static()
1855 }
1856
1857 fn new() -> DescriptorProto_ReservedRange {
1858 DescriptorProto_ReservedRange::new()
1859 }
1860
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001861 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
1862 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001863 descriptor.get(|| {
1864 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001865 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001866 "start",
1867 |m: &DescriptorProto_ReservedRange| { &m.start },
1868 |m: &mut DescriptorProto_ReservedRange| { &mut m.start },
1869 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001870 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001871 "end",
1872 |m: &DescriptorProto_ReservedRange| { &m.end },
1873 |m: &mut DescriptorProto_ReservedRange| { &mut m.end },
1874 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001875 crate::reflect::MessageDescriptor::new_pb_name::<DescriptorProto_ReservedRange>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001876 "DescriptorProto.ReservedRange",
1877 fields,
1878 file_descriptor_proto()
1879 )
1880 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001881 }
1882
1883 fn default_instance() -> &'static DescriptorProto_ReservedRange {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001884 static instance: crate::rt::LazyV2<DescriptorProto_ReservedRange> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001885 instance.get(DescriptorProto_ReservedRange::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001886 }
1887}
1888
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001889impl crate::Clear for DescriptorProto_ReservedRange {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001890 fn clear(&mut self) {
1891 self.start = ::std::option::Option::None;
1892 self.end = ::std::option::Option::None;
1893 self.unknown_fields.clear();
1894 }
1895}
1896
1897impl ::std::fmt::Debug for DescriptorProto_ReservedRange {
1898 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001899 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001900 }
1901}
1902
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001903impl crate::reflect::ProtobufValue for DescriptorProto_ReservedRange {
1904 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
1905 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001906 }
1907}
1908
1909#[derive(PartialEq,Clone,Default)]
1910#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
1911pub struct FieldDescriptorProto {
1912 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001913 name: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001914 number: ::std::option::Option<i32>,
1915 label: ::std::option::Option<FieldDescriptorProto_Label>,
1916 field_type: ::std::option::Option<FieldDescriptorProto_Type>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001917 type_name: crate::SingularField<::std::string::String>,
1918 extendee: crate::SingularField<::std::string::String>,
1919 default_value: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001920 oneof_index: ::std::option::Option<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001921 json_name: crate::SingularField<::std::string::String>,
1922 pub options: crate::SingularPtrField<FieldOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001923 // special fields
1924 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001925 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001926 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001927 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001928}
1929
1930impl<'a> ::std::default::Default for &'a FieldDescriptorProto {
1931 fn default() -> &'a FieldDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001932 <FieldDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001933 }
1934}
1935
1936impl FieldDescriptorProto {
1937 pub fn new() -> FieldDescriptorProto {
1938 ::std::default::Default::default()
1939 }
1940
1941 // optional string name = 1;
1942
1943
1944 pub fn get_name(&self) -> &str {
1945 match self.name.as_ref() {
1946 Some(v) => &v,
1947 None => "",
1948 }
1949 }
1950 pub fn clear_name(&mut self) {
1951 self.name.clear();
1952 }
1953
1954 pub fn has_name(&self) -> bool {
1955 self.name.is_some()
1956 }
1957
1958 // Param is passed by value, moved
1959 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001960 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001961 }
1962
1963 // Mutable pointer to the field.
1964 // If field is not initialized, it is initialized with default value first.
1965 pub fn mut_name(&mut self) -> &mut ::std::string::String {
1966 if self.name.is_none() {
1967 self.name.set_default();
1968 }
1969 self.name.as_mut().unwrap()
1970 }
1971
1972 // Take field
1973 pub fn take_name(&mut self) -> ::std::string::String {
1974 self.name.take().unwrap_or_else(|| ::std::string::String::new())
1975 }
1976
1977 // optional int32 number = 3;
1978
1979
1980 pub fn get_number(&self) -> i32 {
1981 self.number.unwrap_or(0)
1982 }
1983 pub fn clear_number(&mut self) {
1984 self.number = ::std::option::Option::None;
1985 }
1986
1987 pub fn has_number(&self) -> bool {
1988 self.number.is_some()
1989 }
1990
1991 // Param is passed by value, moved
1992 pub fn set_number(&mut self, v: i32) {
1993 self.number = ::std::option::Option::Some(v);
1994 }
1995
1996 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
1997
1998
1999 pub fn get_label(&self) -> FieldDescriptorProto_Label {
2000 self.label.unwrap_or(FieldDescriptorProto_Label::LABEL_OPTIONAL)
2001 }
2002 pub fn clear_label(&mut self) {
2003 self.label = ::std::option::Option::None;
2004 }
2005
2006 pub fn has_label(&self) -> bool {
2007 self.label.is_some()
2008 }
2009
2010 // Param is passed by value, moved
2011 pub fn set_label(&mut self, v: FieldDescriptorProto_Label) {
2012 self.label = ::std::option::Option::Some(v);
2013 }
2014
2015 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
2016
2017
2018 pub fn get_field_type(&self) -> FieldDescriptorProto_Type {
2019 self.field_type.unwrap_or(FieldDescriptorProto_Type::TYPE_DOUBLE)
2020 }
2021 pub fn clear_field_type(&mut self) {
2022 self.field_type = ::std::option::Option::None;
2023 }
2024
2025 pub fn has_field_type(&self) -> bool {
2026 self.field_type.is_some()
2027 }
2028
2029 // Param is passed by value, moved
2030 pub fn set_field_type(&mut self, v: FieldDescriptorProto_Type) {
2031 self.field_type = ::std::option::Option::Some(v);
2032 }
2033
2034 // optional string type_name = 6;
2035
2036
2037 pub fn get_type_name(&self) -> &str {
2038 match self.type_name.as_ref() {
2039 Some(v) => &v,
2040 None => "",
2041 }
2042 }
2043 pub fn clear_type_name(&mut self) {
2044 self.type_name.clear();
2045 }
2046
2047 pub fn has_type_name(&self) -> bool {
2048 self.type_name.is_some()
2049 }
2050
2051 // Param is passed by value, moved
2052 pub fn set_type_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002053 self.type_name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002054 }
2055
2056 // Mutable pointer to the field.
2057 // If field is not initialized, it is initialized with default value first.
2058 pub fn mut_type_name(&mut self) -> &mut ::std::string::String {
2059 if self.type_name.is_none() {
2060 self.type_name.set_default();
2061 }
2062 self.type_name.as_mut().unwrap()
2063 }
2064
2065 // Take field
2066 pub fn take_type_name(&mut self) -> ::std::string::String {
2067 self.type_name.take().unwrap_or_else(|| ::std::string::String::new())
2068 }
2069
2070 // optional string extendee = 2;
2071
2072
2073 pub fn get_extendee(&self) -> &str {
2074 match self.extendee.as_ref() {
2075 Some(v) => &v,
2076 None => "",
2077 }
2078 }
2079 pub fn clear_extendee(&mut self) {
2080 self.extendee.clear();
2081 }
2082
2083 pub fn has_extendee(&self) -> bool {
2084 self.extendee.is_some()
2085 }
2086
2087 // Param is passed by value, moved
2088 pub fn set_extendee(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002089 self.extendee = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002090 }
2091
2092 // Mutable pointer to the field.
2093 // If field is not initialized, it is initialized with default value first.
2094 pub fn mut_extendee(&mut self) -> &mut ::std::string::String {
2095 if self.extendee.is_none() {
2096 self.extendee.set_default();
2097 }
2098 self.extendee.as_mut().unwrap()
2099 }
2100
2101 // Take field
2102 pub fn take_extendee(&mut self) -> ::std::string::String {
2103 self.extendee.take().unwrap_or_else(|| ::std::string::String::new())
2104 }
2105
2106 // optional string default_value = 7;
2107
2108
2109 pub fn get_default_value(&self) -> &str {
2110 match self.default_value.as_ref() {
2111 Some(v) => &v,
2112 None => "",
2113 }
2114 }
2115 pub fn clear_default_value(&mut self) {
2116 self.default_value.clear();
2117 }
2118
2119 pub fn has_default_value(&self) -> bool {
2120 self.default_value.is_some()
2121 }
2122
2123 // Param is passed by value, moved
2124 pub fn set_default_value(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002125 self.default_value = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002126 }
2127
2128 // Mutable pointer to the field.
2129 // If field is not initialized, it is initialized with default value first.
2130 pub fn mut_default_value(&mut self) -> &mut ::std::string::String {
2131 if self.default_value.is_none() {
2132 self.default_value.set_default();
2133 }
2134 self.default_value.as_mut().unwrap()
2135 }
2136
2137 // Take field
2138 pub fn take_default_value(&mut self) -> ::std::string::String {
2139 self.default_value.take().unwrap_or_else(|| ::std::string::String::new())
2140 }
2141
2142 // optional int32 oneof_index = 9;
2143
2144
2145 pub fn get_oneof_index(&self) -> i32 {
2146 self.oneof_index.unwrap_or(0)
2147 }
2148 pub fn clear_oneof_index(&mut self) {
2149 self.oneof_index = ::std::option::Option::None;
2150 }
2151
2152 pub fn has_oneof_index(&self) -> bool {
2153 self.oneof_index.is_some()
2154 }
2155
2156 // Param is passed by value, moved
2157 pub fn set_oneof_index(&mut self, v: i32) {
2158 self.oneof_index = ::std::option::Option::Some(v);
2159 }
2160
2161 // optional string json_name = 10;
2162
2163
2164 pub fn get_json_name(&self) -> &str {
2165 match self.json_name.as_ref() {
2166 Some(v) => &v,
2167 None => "",
2168 }
2169 }
2170 pub fn clear_json_name(&mut self) {
2171 self.json_name.clear();
2172 }
2173
2174 pub fn has_json_name(&self) -> bool {
2175 self.json_name.is_some()
2176 }
2177
2178 // Param is passed by value, moved
2179 pub fn set_json_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002180 self.json_name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002181 }
2182
2183 // Mutable pointer to the field.
2184 // If field is not initialized, it is initialized with default value first.
2185 pub fn mut_json_name(&mut self) -> &mut ::std::string::String {
2186 if self.json_name.is_none() {
2187 self.json_name.set_default();
2188 }
2189 self.json_name.as_mut().unwrap()
2190 }
2191
2192 // Take field
2193 pub fn take_json_name(&mut self) -> ::std::string::String {
2194 self.json_name.take().unwrap_or_else(|| ::std::string::String::new())
2195 }
2196
2197 // optional .google.protobuf.FieldOptions options = 8;
2198
2199
2200 pub fn get_options(&self) -> &FieldOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002201 self.options.as_ref().unwrap_or_else(|| <FieldOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002202 }
2203 pub fn clear_options(&mut self) {
2204 self.options.clear();
2205 }
2206
2207 pub fn has_options(&self) -> bool {
2208 self.options.is_some()
2209 }
2210
2211 // Param is passed by value, moved
2212 pub fn set_options(&mut self, v: FieldOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002213 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002214 }
2215
2216 // Mutable pointer to the field.
2217 // If field is not initialized, it is initialized with default value first.
2218 pub fn mut_options(&mut self) -> &mut FieldOptions {
2219 if self.options.is_none() {
2220 self.options.set_default();
2221 }
2222 self.options.as_mut().unwrap()
2223 }
2224
2225 // Take field
2226 pub fn take_options(&mut self) -> FieldOptions {
2227 self.options.take().unwrap_or_else(|| FieldOptions::new())
2228 }
2229}
2230
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002231impl crate::Message for FieldDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002232 fn is_initialized(&self) -> bool {
2233 for v in &self.options {
2234 if !v.is_initialized() {
2235 return false;
2236 }
2237 };
2238 true
2239 }
2240
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002241 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002242 while !is.eof()? {
2243 let (field_number, wire_type) = is.read_tag_unpack()?;
2244 match field_number {
2245 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002246 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002247 },
2248 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002249 if wire_type != crate::wire_format::WireTypeVarint {
2250 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002251 }
2252 let tmp = is.read_int32()?;
2253 self.number = ::std::option::Option::Some(tmp);
2254 },
2255 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002256 crate::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.label, 4, &mut self.unknown_fields)?
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002257 },
2258 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002259 crate::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 5, &mut self.unknown_fields)?
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002260 },
2261 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002262 crate::rt::read_singular_string_into(wire_type, is, &mut self.type_name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002263 },
2264 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002265 crate::rt::read_singular_string_into(wire_type, is, &mut self.extendee)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002266 },
2267 7 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002268 crate::rt::read_singular_string_into(wire_type, is, &mut self.default_value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002269 },
2270 9 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002271 if wire_type != crate::wire_format::WireTypeVarint {
2272 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002273 }
2274 let tmp = is.read_int32()?;
2275 self.oneof_index = ::std::option::Option::Some(tmp);
2276 },
2277 10 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002278 crate::rt::read_singular_string_into(wire_type, is, &mut self.json_name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002279 },
2280 8 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002281 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002282 },
2283 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002284 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002285 },
2286 };
2287 }
2288 ::std::result::Result::Ok(())
2289 }
2290
2291 // Compute sizes of nested messages
2292 #[allow(unused_variables)]
2293 fn compute_size(&self) -> u32 {
2294 let mut my_size = 0;
2295 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002296 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002297 }
2298 if let Some(v) = self.number {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002299 my_size += crate::rt::value_size(3, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002300 }
2301 if let Some(v) = self.label {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002302 my_size += crate::rt::enum_size(4, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002303 }
2304 if let Some(v) = self.field_type {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002305 my_size += crate::rt::enum_size(5, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002306 }
2307 if let Some(ref v) = self.type_name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002308 my_size += crate::rt::string_size(6, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002309 }
2310 if let Some(ref v) = self.extendee.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002311 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002312 }
2313 if let Some(ref v) = self.default_value.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002314 my_size += crate::rt::string_size(7, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002315 }
2316 if let Some(v) = self.oneof_index {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002317 my_size += crate::rt::value_size(9, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002318 }
2319 if let Some(ref v) = self.json_name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002320 my_size += crate::rt::string_size(10, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002321 }
2322 if let Some(ref v) = self.options.as_ref() {
2323 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002324 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002325 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002326 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002327 self.cached_size.set(my_size);
2328 my_size
2329 }
2330
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002331 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002332 if let Some(ref v) = self.name.as_ref() {
2333 os.write_string(1, &v)?;
2334 }
2335 if let Some(v) = self.number {
2336 os.write_int32(3, v)?;
2337 }
2338 if let Some(v) = self.label {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002339 os.write_enum(4, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002340 }
2341 if let Some(v) = self.field_type {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002342 os.write_enum(5, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002343 }
2344 if let Some(ref v) = self.type_name.as_ref() {
2345 os.write_string(6, &v)?;
2346 }
2347 if let Some(ref v) = self.extendee.as_ref() {
2348 os.write_string(2, &v)?;
2349 }
2350 if let Some(ref v) = self.default_value.as_ref() {
2351 os.write_string(7, &v)?;
2352 }
2353 if let Some(v) = self.oneof_index {
2354 os.write_int32(9, v)?;
2355 }
2356 if let Some(ref v) = self.json_name.as_ref() {
2357 os.write_string(10, &v)?;
2358 }
2359 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002360 os.write_tag(8, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002361 os.write_raw_varint32(v.get_cached_size())?;
2362 v.write_to_with_cached_sizes(os)?;
2363 }
2364 os.write_unknown_fields(self.get_unknown_fields())?;
2365 ::std::result::Result::Ok(())
2366 }
2367
2368 fn get_cached_size(&self) -> u32 {
2369 self.cached_size.get()
2370 }
2371
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002372 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002373 &self.unknown_fields
2374 }
2375
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002376 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002377 &mut self.unknown_fields
2378 }
2379
2380 fn as_any(&self) -> &dyn (::std::any::Any) {
2381 self as &dyn (::std::any::Any)
2382 }
2383 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2384 self as &mut dyn (::std::any::Any)
2385 }
Haibo Huang52aa7852020-07-10 20:23:55 -07002386 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002387 self
2388 }
2389
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002390 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002391 Self::descriptor_static()
2392 }
2393
2394 fn new() -> FieldDescriptorProto {
2395 FieldDescriptorProto::new()
2396 }
2397
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002398 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
2399 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002400 descriptor.get(|| {
2401 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002402 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002403 "name",
2404 |m: &FieldDescriptorProto| { &m.name },
2405 |m: &mut FieldDescriptorProto| { &mut m.name },
2406 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002407 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002408 "number",
2409 |m: &FieldDescriptorProto| { &m.number },
2410 |m: &mut FieldDescriptorProto| { &mut m.number },
2411 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002412 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FieldDescriptorProto_Label>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002413 "label",
2414 |m: &FieldDescriptorProto| { &m.label },
2415 |m: &mut FieldDescriptorProto| { &mut m.label },
2416 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002417 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FieldDescriptorProto_Type>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002418 "type",
2419 |m: &FieldDescriptorProto| { &m.field_type },
2420 |m: &mut FieldDescriptorProto| { &mut m.field_type },
2421 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002422 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002423 "type_name",
2424 |m: &FieldDescriptorProto| { &m.type_name },
2425 |m: &mut FieldDescriptorProto| { &mut m.type_name },
2426 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002427 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002428 "extendee",
2429 |m: &FieldDescriptorProto| { &m.extendee },
2430 |m: &mut FieldDescriptorProto| { &mut m.extendee },
2431 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002432 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002433 "default_value",
2434 |m: &FieldDescriptorProto| { &m.default_value },
2435 |m: &mut FieldDescriptorProto| { &mut m.default_value },
2436 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002437 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002438 "oneof_index",
2439 |m: &FieldDescriptorProto| { &m.oneof_index },
2440 |m: &mut FieldDescriptorProto| { &mut m.oneof_index },
2441 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002442 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002443 "json_name",
2444 |m: &FieldDescriptorProto| { &m.json_name },
2445 |m: &mut FieldDescriptorProto| { &mut m.json_name },
2446 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002447 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<FieldOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002448 "options",
2449 |m: &FieldDescriptorProto| { &m.options },
2450 |m: &mut FieldDescriptorProto| { &mut m.options },
2451 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002452 crate::reflect::MessageDescriptor::new_pb_name::<FieldDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002453 "FieldDescriptorProto",
2454 fields,
2455 file_descriptor_proto()
2456 )
2457 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002458 }
2459
2460 fn default_instance() -> &'static FieldDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002461 static instance: crate::rt::LazyV2<FieldDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002462 instance.get(FieldDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002463 }
2464}
2465
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002466impl crate::Clear for FieldDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002467 fn clear(&mut self) {
2468 self.name.clear();
2469 self.number = ::std::option::Option::None;
2470 self.label = ::std::option::Option::None;
2471 self.field_type = ::std::option::Option::None;
2472 self.type_name.clear();
2473 self.extendee.clear();
2474 self.default_value.clear();
2475 self.oneof_index = ::std::option::Option::None;
2476 self.json_name.clear();
2477 self.options.clear();
2478 self.unknown_fields.clear();
2479 }
2480}
2481
2482impl ::std::fmt::Debug for FieldDescriptorProto {
2483 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002484 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002485 }
2486}
2487
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002488impl crate::reflect::ProtobufValue for FieldDescriptorProto {
2489 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
2490 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002491 }
2492}
2493
2494#[derive(Clone,PartialEq,Eq,Debug,Hash)]
2495#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
2496pub enum FieldDescriptorProto_Type {
2497 TYPE_DOUBLE = 1,
2498 TYPE_FLOAT = 2,
2499 TYPE_INT64 = 3,
2500 TYPE_UINT64 = 4,
2501 TYPE_INT32 = 5,
2502 TYPE_FIXED64 = 6,
2503 TYPE_FIXED32 = 7,
2504 TYPE_BOOL = 8,
2505 TYPE_STRING = 9,
2506 TYPE_GROUP = 10,
2507 TYPE_MESSAGE = 11,
2508 TYPE_BYTES = 12,
2509 TYPE_UINT32 = 13,
2510 TYPE_ENUM = 14,
2511 TYPE_SFIXED32 = 15,
2512 TYPE_SFIXED64 = 16,
2513 TYPE_SINT32 = 17,
2514 TYPE_SINT64 = 18,
2515}
2516
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002517impl crate::ProtobufEnum for FieldDescriptorProto_Type {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002518 fn value(&self) -> i32 {
2519 *self as i32
2520 }
2521
2522 fn from_i32(value: i32) -> ::std::option::Option<FieldDescriptorProto_Type> {
2523 match value {
2524 1 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_DOUBLE),
2525 2 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_FLOAT),
2526 3 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_INT64),
2527 4 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_UINT64),
2528 5 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_INT32),
2529 6 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_FIXED64),
2530 7 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_FIXED32),
2531 8 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_BOOL),
2532 9 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_STRING),
2533 10 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_GROUP),
2534 11 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_MESSAGE),
2535 12 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_BYTES),
2536 13 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_UINT32),
2537 14 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_ENUM),
2538 15 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_SFIXED32),
2539 16 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_SFIXED64),
2540 17 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_SINT32),
2541 18 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_SINT64),
2542 _ => ::std::option::Option::None
2543 }
2544 }
2545
2546 fn values() -> &'static [Self] {
2547 static values: &'static [FieldDescriptorProto_Type] = &[
2548 FieldDescriptorProto_Type::TYPE_DOUBLE,
2549 FieldDescriptorProto_Type::TYPE_FLOAT,
2550 FieldDescriptorProto_Type::TYPE_INT64,
2551 FieldDescriptorProto_Type::TYPE_UINT64,
2552 FieldDescriptorProto_Type::TYPE_INT32,
2553 FieldDescriptorProto_Type::TYPE_FIXED64,
2554 FieldDescriptorProto_Type::TYPE_FIXED32,
2555 FieldDescriptorProto_Type::TYPE_BOOL,
2556 FieldDescriptorProto_Type::TYPE_STRING,
2557 FieldDescriptorProto_Type::TYPE_GROUP,
2558 FieldDescriptorProto_Type::TYPE_MESSAGE,
2559 FieldDescriptorProto_Type::TYPE_BYTES,
2560 FieldDescriptorProto_Type::TYPE_UINT32,
2561 FieldDescriptorProto_Type::TYPE_ENUM,
2562 FieldDescriptorProto_Type::TYPE_SFIXED32,
2563 FieldDescriptorProto_Type::TYPE_SFIXED64,
2564 FieldDescriptorProto_Type::TYPE_SINT32,
2565 FieldDescriptorProto_Type::TYPE_SINT64,
2566 ];
2567 values
2568 }
2569
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002570 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
2571 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002572 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002573 crate::reflect::EnumDescriptor::new_pb_name::<FieldDescriptorProto_Type>("FieldDescriptorProto.Type", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07002574 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002575 }
2576}
2577
2578impl ::std::marker::Copy for FieldDescriptorProto_Type {
2579}
2580
2581// Note, `Default` is implemented although default value is not 0
2582impl ::std::default::Default for FieldDescriptorProto_Type {
2583 fn default() -> Self {
2584 FieldDescriptorProto_Type::TYPE_DOUBLE
2585 }
2586}
2587
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002588impl crate::reflect::ProtobufValue for FieldDescriptorProto_Type {
2589 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
2590 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002591 }
2592}
2593
2594#[derive(Clone,PartialEq,Eq,Debug,Hash)]
2595#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
2596pub enum FieldDescriptorProto_Label {
2597 LABEL_OPTIONAL = 1,
2598 LABEL_REQUIRED = 2,
2599 LABEL_REPEATED = 3,
2600}
2601
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002602impl crate::ProtobufEnum for FieldDescriptorProto_Label {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002603 fn value(&self) -> i32 {
2604 *self as i32
2605 }
2606
2607 fn from_i32(value: i32) -> ::std::option::Option<FieldDescriptorProto_Label> {
2608 match value {
2609 1 => ::std::option::Option::Some(FieldDescriptorProto_Label::LABEL_OPTIONAL),
2610 2 => ::std::option::Option::Some(FieldDescriptorProto_Label::LABEL_REQUIRED),
2611 3 => ::std::option::Option::Some(FieldDescriptorProto_Label::LABEL_REPEATED),
2612 _ => ::std::option::Option::None
2613 }
2614 }
2615
2616 fn values() -> &'static [Self] {
2617 static values: &'static [FieldDescriptorProto_Label] = &[
2618 FieldDescriptorProto_Label::LABEL_OPTIONAL,
2619 FieldDescriptorProto_Label::LABEL_REQUIRED,
2620 FieldDescriptorProto_Label::LABEL_REPEATED,
2621 ];
2622 values
2623 }
2624
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002625 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
2626 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002627 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002628 crate::reflect::EnumDescriptor::new_pb_name::<FieldDescriptorProto_Label>("FieldDescriptorProto.Label", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07002629 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002630 }
2631}
2632
2633impl ::std::marker::Copy for FieldDescriptorProto_Label {
2634}
2635
2636// Note, `Default` is implemented although default value is not 0
2637impl ::std::default::Default for FieldDescriptorProto_Label {
2638 fn default() -> Self {
2639 FieldDescriptorProto_Label::LABEL_OPTIONAL
2640 }
2641}
2642
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002643impl crate::reflect::ProtobufValue for FieldDescriptorProto_Label {
2644 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
2645 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002646 }
2647}
2648
2649#[derive(PartialEq,Clone,Default)]
2650#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
2651pub struct OneofDescriptorProto {
2652 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002653 name: crate::SingularField<::std::string::String>,
2654 pub options: crate::SingularPtrField<OneofOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002655 // special fields
2656 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002657 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002658 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002659 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002660}
2661
2662impl<'a> ::std::default::Default for &'a OneofDescriptorProto {
2663 fn default() -> &'a OneofDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002664 <OneofDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002665 }
2666}
2667
2668impl OneofDescriptorProto {
2669 pub fn new() -> OneofDescriptorProto {
2670 ::std::default::Default::default()
2671 }
2672
2673 // optional string name = 1;
2674
2675
2676 pub fn get_name(&self) -> &str {
2677 match self.name.as_ref() {
2678 Some(v) => &v,
2679 None => "",
2680 }
2681 }
2682 pub fn clear_name(&mut self) {
2683 self.name.clear();
2684 }
2685
2686 pub fn has_name(&self) -> bool {
2687 self.name.is_some()
2688 }
2689
2690 // Param is passed by value, moved
2691 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002692 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002693 }
2694
2695 // Mutable pointer to the field.
2696 // If field is not initialized, it is initialized with default value first.
2697 pub fn mut_name(&mut self) -> &mut ::std::string::String {
2698 if self.name.is_none() {
2699 self.name.set_default();
2700 }
2701 self.name.as_mut().unwrap()
2702 }
2703
2704 // Take field
2705 pub fn take_name(&mut self) -> ::std::string::String {
2706 self.name.take().unwrap_or_else(|| ::std::string::String::new())
2707 }
2708
2709 // optional .google.protobuf.OneofOptions options = 2;
2710
2711
2712 pub fn get_options(&self) -> &OneofOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002713 self.options.as_ref().unwrap_or_else(|| <OneofOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002714 }
2715 pub fn clear_options(&mut self) {
2716 self.options.clear();
2717 }
2718
2719 pub fn has_options(&self) -> bool {
2720 self.options.is_some()
2721 }
2722
2723 // Param is passed by value, moved
2724 pub fn set_options(&mut self, v: OneofOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002725 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002726 }
2727
2728 // Mutable pointer to the field.
2729 // If field is not initialized, it is initialized with default value first.
2730 pub fn mut_options(&mut self) -> &mut OneofOptions {
2731 if self.options.is_none() {
2732 self.options.set_default();
2733 }
2734 self.options.as_mut().unwrap()
2735 }
2736
2737 // Take field
2738 pub fn take_options(&mut self) -> OneofOptions {
2739 self.options.take().unwrap_or_else(|| OneofOptions::new())
2740 }
2741}
2742
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002743impl crate::Message for OneofDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002744 fn is_initialized(&self) -> bool {
2745 for v in &self.options {
2746 if !v.is_initialized() {
2747 return false;
2748 }
2749 };
2750 true
2751 }
2752
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002753 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002754 while !is.eof()? {
2755 let (field_number, wire_type) = is.read_tag_unpack()?;
2756 match field_number {
2757 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002758 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002759 },
2760 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002761 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002762 },
2763 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002764 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002765 },
2766 };
2767 }
2768 ::std::result::Result::Ok(())
2769 }
2770
2771 // Compute sizes of nested messages
2772 #[allow(unused_variables)]
2773 fn compute_size(&self) -> u32 {
2774 let mut my_size = 0;
2775 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002776 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002777 }
2778 if let Some(ref v) = self.options.as_ref() {
2779 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002780 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002781 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002782 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002783 self.cached_size.set(my_size);
2784 my_size
2785 }
2786
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002787 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002788 if let Some(ref v) = self.name.as_ref() {
2789 os.write_string(1, &v)?;
2790 }
2791 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002792 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002793 os.write_raw_varint32(v.get_cached_size())?;
2794 v.write_to_with_cached_sizes(os)?;
2795 }
2796 os.write_unknown_fields(self.get_unknown_fields())?;
2797 ::std::result::Result::Ok(())
2798 }
2799
2800 fn get_cached_size(&self) -> u32 {
2801 self.cached_size.get()
2802 }
2803
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002804 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002805 &self.unknown_fields
2806 }
2807
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002808 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002809 &mut self.unknown_fields
2810 }
2811
2812 fn as_any(&self) -> &dyn (::std::any::Any) {
2813 self as &dyn (::std::any::Any)
2814 }
2815 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2816 self as &mut dyn (::std::any::Any)
2817 }
Haibo Huang52aa7852020-07-10 20:23:55 -07002818 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002819 self
2820 }
2821
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002822 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002823 Self::descriptor_static()
2824 }
2825
2826 fn new() -> OneofDescriptorProto {
2827 OneofDescriptorProto::new()
2828 }
2829
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002830 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
2831 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002832 descriptor.get(|| {
2833 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002834 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002835 "name",
2836 |m: &OneofDescriptorProto| { &m.name },
2837 |m: &mut OneofDescriptorProto| { &mut m.name },
2838 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002839 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<OneofOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002840 "options",
2841 |m: &OneofDescriptorProto| { &m.options },
2842 |m: &mut OneofDescriptorProto| { &mut m.options },
2843 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002844 crate::reflect::MessageDescriptor::new_pb_name::<OneofDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002845 "OneofDescriptorProto",
2846 fields,
2847 file_descriptor_proto()
2848 )
2849 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002850 }
2851
2852 fn default_instance() -> &'static OneofDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002853 static instance: crate::rt::LazyV2<OneofDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002854 instance.get(OneofDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002855 }
2856}
2857
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002858impl crate::Clear for OneofDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002859 fn clear(&mut self) {
2860 self.name.clear();
2861 self.options.clear();
2862 self.unknown_fields.clear();
2863 }
2864}
2865
2866impl ::std::fmt::Debug for OneofDescriptorProto {
2867 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002868 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002869 }
2870}
2871
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002872impl crate::reflect::ProtobufValue for OneofDescriptorProto {
2873 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
2874 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002875 }
2876}
2877
2878#[derive(PartialEq,Clone,Default)]
2879#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
2880pub struct EnumDescriptorProto {
2881 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002882 name: crate::SingularField<::std::string::String>,
2883 pub value: crate::RepeatedField<EnumValueDescriptorProto>,
2884 pub options: crate::SingularPtrField<EnumOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002885 // special fields
2886 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002887 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002888 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002889 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002890}
2891
2892impl<'a> ::std::default::Default for &'a EnumDescriptorProto {
2893 fn default() -> &'a EnumDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002894 <EnumDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002895 }
2896}
2897
2898impl EnumDescriptorProto {
2899 pub fn new() -> EnumDescriptorProto {
2900 ::std::default::Default::default()
2901 }
2902
2903 // optional string name = 1;
2904
2905
2906 pub fn get_name(&self) -> &str {
2907 match self.name.as_ref() {
2908 Some(v) => &v,
2909 None => "",
2910 }
2911 }
2912 pub fn clear_name(&mut self) {
2913 self.name.clear();
2914 }
2915
2916 pub fn has_name(&self) -> bool {
2917 self.name.is_some()
2918 }
2919
2920 // Param is passed by value, moved
2921 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002922 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002923 }
2924
2925 // Mutable pointer to the field.
2926 // If field is not initialized, it is initialized with default value first.
2927 pub fn mut_name(&mut self) -> &mut ::std::string::String {
2928 if self.name.is_none() {
2929 self.name.set_default();
2930 }
2931 self.name.as_mut().unwrap()
2932 }
2933
2934 // Take field
2935 pub fn take_name(&mut self) -> ::std::string::String {
2936 self.name.take().unwrap_or_else(|| ::std::string::String::new())
2937 }
2938
2939 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
2940
2941
2942 pub fn get_value(&self) -> &[EnumValueDescriptorProto] {
2943 &self.value
2944 }
2945 pub fn clear_value(&mut self) {
2946 self.value.clear();
2947 }
2948
2949 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002950 pub fn set_value(&mut self, v: crate::RepeatedField<EnumValueDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002951 self.value = v;
2952 }
2953
2954 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002955 pub fn mut_value(&mut self) -> &mut crate::RepeatedField<EnumValueDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002956 &mut self.value
2957 }
2958
2959 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002960 pub fn take_value(&mut self) -> crate::RepeatedField<EnumValueDescriptorProto> {
2961 ::std::mem::replace(&mut self.value, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002962 }
2963
2964 // optional .google.protobuf.EnumOptions options = 3;
2965
2966
2967 pub fn get_options(&self) -> &EnumOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002968 self.options.as_ref().unwrap_or_else(|| <EnumOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002969 }
2970 pub fn clear_options(&mut self) {
2971 self.options.clear();
2972 }
2973
2974 pub fn has_options(&self) -> bool {
2975 self.options.is_some()
2976 }
2977
2978 // Param is passed by value, moved
2979 pub fn set_options(&mut self, v: EnumOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002980 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002981 }
2982
2983 // Mutable pointer to the field.
2984 // If field is not initialized, it is initialized with default value first.
2985 pub fn mut_options(&mut self) -> &mut EnumOptions {
2986 if self.options.is_none() {
2987 self.options.set_default();
2988 }
2989 self.options.as_mut().unwrap()
2990 }
2991
2992 // Take field
2993 pub fn take_options(&mut self) -> EnumOptions {
2994 self.options.take().unwrap_or_else(|| EnumOptions::new())
2995 }
2996}
2997
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002998impl crate::Message for EnumDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002999 fn is_initialized(&self) -> bool {
3000 for v in &self.value {
3001 if !v.is_initialized() {
3002 return false;
3003 }
3004 };
3005 for v in &self.options {
3006 if !v.is_initialized() {
3007 return false;
3008 }
3009 };
3010 true
3011 }
3012
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003013 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003014 while !is.eof()? {
3015 let (field_number, wire_type) = is.read_tag_unpack()?;
3016 match field_number {
3017 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003018 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003019 },
3020 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003021 crate::rt::read_repeated_message_into(wire_type, is, &mut self.value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003022 },
3023 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003024 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003025 },
3026 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003027 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003028 },
3029 };
3030 }
3031 ::std::result::Result::Ok(())
3032 }
3033
3034 // Compute sizes of nested messages
3035 #[allow(unused_variables)]
3036 fn compute_size(&self) -> u32 {
3037 let mut my_size = 0;
3038 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003039 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003040 }
3041 for value in &self.value {
3042 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003043 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003044 };
3045 if let Some(ref v) = self.options.as_ref() {
3046 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003047 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003048 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003049 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003050 self.cached_size.set(my_size);
3051 my_size
3052 }
3053
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003054 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003055 if let Some(ref v) = self.name.as_ref() {
3056 os.write_string(1, &v)?;
3057 }
3058 for v in &self.value {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003059 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003060 os.write_raw_varint32(v.get_cached_size())?;
3061 v.write_to_with_cached_sizes(os)?;
3062 };
3063 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003064 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003065 os.write_raw_varint32(v.get_cached_size())?;
3066 v.write_to_with_cached_sizes(os)?;
3067 }
3068 os.write_unknown_fields(self.get_unknown_fields())?;
3069 ::std::result::Result::Ok(())
3070 }
3071
3072 fn get_cached_size(&self) -> u32 {
3073 self.cached_size.get()
3074 }
3075
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003076 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003077 &self.unknown_fields
3078 }
3079
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003080 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003081 &mut self.unknown_fields
3082 }
3083
3084 fn as_any(&self) -> &dyn (::std::any::Any) {
3085 self as &dyn (::std::any::Any)
3086 }
3087 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3088 self as &mut dyn (::std::any::Any)
3089 }
Haibo Huang52aa7852020-07-10 20:23:55 -07003090 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003091 self
3092 }
3093
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003094 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003095 Self::descriptor_static()
3096 }
3097
3098 fn new() -> EnumDescriptorProto {
3099 EnumDescriptorProto::new()
3100 }
3101
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003102 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
3103 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003104 descriptor.get(|| {
3105 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003106 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003107 "name",
3108 |m: &EnumDescriptorProto| { &m.name },
3109 |m: &mut EnumDescriptorProto| { &mut m.name },
3110 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003111 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumValueDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003112 "value",
3113 |m: &EnumDescriptorProto| { &m.value },
3114 |m: &mut EnumDescriptorProto| { &mut m.value },
3115 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003116 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003117 "options",
3118 |m: &EnumDescriptorProto| { &m.options },
3119 |m: &mut EnumDescriptorProto| { &mut m.options },
3120 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003121 crate::reflect::MessageDescriptor::new_pb_name::<EnumDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003122 "EnumDescriptorProto",
3123 fields,
3124 file_descriptor_proto()
3125 )
3126 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003127 }
3128
3129 fn default_instance() -> &'static EnumDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003130 static instance: crate::rt::LazyV2<EnumDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003131 instance.get(EnumDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003132 }
3133}
3134
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003135impl crate::Clear for EnumDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003136 fn clear(&mut self) {
3137 self.name.clear();
3138 self.value.clear();
3139 self.options.clear();
3140 self.unknown_fields.clear();
3141 }
3142}
3143
3144impl ::std::fmt::Debug for EnumDescriptorProto {
3145 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003146 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003147 }
3148}
3149
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003150impl crate::reflect::ProtobufValue for EnumDescriptorProto {
3151 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
3152 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003153 }
3154}
3155
3156#[derive(PartialEq,Clone,Default)]
3157#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
3158pub struct EnumValueDescriptorProto {
3159 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003160 name: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003161 number: ::std::option::Option<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003162 pub options: crate::SingularPtrField<EnumValueOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003163 // special fields
3164 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003165 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003166 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003167 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003168}
3169
3170impl<'a> ::std::default::Default for &'a EnumValueDescriptorProto {
3171 fn default() -> &'a EnumValueDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003172 <EnumValueDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003173 }
3174}
3175
3176impl EnumValueDescriptorProto {
3177 pub fn new() -> EnumValueDescriptorProto {
3178 ::std::default::Default::default()
3179 }
3180
3181 // optional string name = 1;
3182
3183
3184 pub fn get_name(&self) -> &str {
3185 match self.name.as_ref() {
3186 Some(v) => &v,
3187 None => "",
3188 }
3189 }
3190 pub fn clear_name(&mut self) {
3191 self.name.clear();
3192 }
3193
3194 pub fn has_name(&self) -> bool {
3195 self.name.is_some()
3196 }
3197
3198 // Param is passed by value, moved
3199 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003200 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003201 }
3202
3203 // Mutable pointer to the field.
3204 // If field is not initialized, it is initialized with default value first.
3205 pub fn mut_name(&mut self) -> &mut ::std::string::String {
3206 if self.name.is_none() {
3207 self.name.set_default();
3208 }
3209 self.name.as_mut().unwrap()
3210 }
3211
3212 // Take field
3213 pub fn take_name(&mut self) -> ::std::string::String {
3214 self.name.take().unwrap_or_else(|| ::std::string::String::new())
3215 }
3216
3217 // optional int32 number = 2;
3218
3219
3220 pub fn get_number(&self) -> i32 {
3221 self.number.unwrap_or(0)
3222 }
3223 pub fn clear_number(&mut self) {
3224 self.number = ::std::option::Option::None;
3225 }
3226
3227 pub fn has_number(&self) -> bool {
3228 self.number.is_some()
3229 }
3230
3231 // Param is passed by value, moved
3232 pub fn set_number(&mut self, v: i32) {
3233 self.number = ::std::option::Option::Some(v);
3234 }
3235
3236 // optional .google.protobuf.EnumValueOptions options = 3;
3237
3238
3239 pub fn get_options(&self) -> &EnumValueOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003240 self.options.as_ref().unwrap_or_else(|| <EnumValueOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003241 }
3242 pub fn clear_options(&mut self) {
3243 self.options.clear();
3244 }
3245
3246 pub fn has_options(&self) -> bool {
3247 self.options.is_some()
3248 }
3249
3250 // Param is passed by value, moved
3251 pub fn set_options(&mut self, v: EnumValueOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003252 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003253 }
3254
3255 // Mutable pointer to the field.
3256 // If field is not initialized, it is initialized with default value first.
3257 pub fn mut_options(&mut self) -> &mut EnumValueOptions {
3258 if self.options.is_none() {
3259 self.options.set_default();
3260 }
3261 self.options.as_mut().unwrap()
3262 }
3263
3264 // Take field
3265 pub fn take_options(&mut self) -> EnumValueOptions {
3266 self.options.take().unwrap_or_else(|| EnumValueOptions::new())
3267 }
3268}
3269
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003270impl crate::Message for EnumValueDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003271 fn is_initialized(&self) -> bool {
3272 for v in &self.options {
3273 if !v.is_initialized() {
3274 return false;
3275 }
3276 };
3277 true
3278 }
3279
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003280 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003281 while !is.eof()? {
3282 let (field_number, wire_type) = is.read_tag_unpack()?;
3283 match field_number {
3284 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003285 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003286 },
3287 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003288 if wire_type != crate::wire_format::WireTypeVarint {
3289 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003290 }
3291 let tmp = is.read_int32()?;
3292 self.number = ::std::option::Option::Some(tmp);
3293 },
3294 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003295 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003296 },
3297 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003298 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003299 },
3300 };
3301 }
3302 ::std::result::Result::Ok(())
3303 }
3304
3305 // Compute sizes of nested messages
3306 #[allow(unused_variables)]
3307 fn compute_size(&self) -> u32 {
3308 let mut my_size = 0;
3309 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003310 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003311 }
3312 if let Some(v) = self.number {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003313 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003314 }
3315 if let Some(ref v) = self.options.as_ref() {
3316 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003317 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003318 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003319 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003320 self.cached_size.set(my_size);
3321 my_size
3322 }
3323
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003324 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003325 if let Some(ref v) = self.name.as_ref() {
3326 os.write_string(1, &v)?;
3327 }
3328 if let Some(v) = self.number {
3329 os.write_int32(2, v)?;
3330 }
3331 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003332 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003333 os.write_raw_varint32(v.get_cached_size())?;
3334 v.write_to_with_cached_sizes(os)?;
3335 }
3336 os.write_unknown_fields(self.get_unknown_fields())?;
3337 ::std::result::Result::Ok(())
3338 }
3339
3340 fn get_cached_size(&self) -> u32 {
3341 self.cached_size.get()
3342 }
3343
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003344 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003345 &self.unknown_fields
3346 }
3347
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003348 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003349 &mut self.unknown_fields
3350 }
3351
3352 fn as_any(&self) -> &dyn (::std::any::Any) {
3353 self as &dyn (::std::any::Any)
3354 }
3355 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3356 self as &mut dyn (::std::any::Any)
3357 }
Haibo Huang52aa7852020-07-10 20:23:55 -07003358 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003359 self
3360 }
3361
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003362 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003363 Self::descriptor_static()
3364 }
3365
3366 fn new() -> EnumValueDescriptorProto {
3367 EnumValueDescriptorProto::new()
3368 }
3369
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003370 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
3371 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003372 descriptor.get(|| {
3373 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003374 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003375 "name",
3376 |m: &EnumValueDescriptorProto| { &m.name },
3377 |m: &mut EnumValueDescriptorProto| { &mut m.name },
3378 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003379 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003380 "number",
3381 |m: &EnumValueDescriptorProto| { &m.number },
3382 |m: &mut EnumValueDescriptorProto| { &mut m.number },
3383 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003384 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumValueOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003385 "options",
3386 |m: &EnumValueDescriptorProto| { &m.options },
3387 |m: &mut EnumValueDescriptorProto| { &mut m.options },
3388 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003389 crate::reflect::MessageDescriptor::new_pb_name::<EnumValueDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003390 "EnumValueDescriptorProto",
3391 fields,
3392 file_descriptor_proto()
3393 )
3394 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003395 }
3396
3397 fn default_instance() -> &'static EnumValueDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003398 static instance: crate::rt::LazyV2<EnumValueDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003399 instance.get(EnumValueDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003400 }
3401}
3402
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003403impl crate::Clear for EnumValueDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003404 fn clear(&mut self) {
3405 self.name.clear();
3406 self.number = ::std::option::Option::None;
3407 self.options.clear();
3408 self.unknown_fields.clear();
3409 }
3410}
3411
3412impl ::std::fmt::Debug for EnumValueDescriptorProto {
3413 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003414 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003415 }
3416}
3417
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003418impl crate::reflect::ProtobufValue for EnumValueDescriptorProto {
3419 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
3420 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003421 }
3422}
3423
3424#[derive(PartialEq,Clone,Default)]
3425#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
3426pub struct ServiceDescriptorProto {
3427 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003428 name: crate::SingularField<::std::string::String>,
3429 pub method: crate::RepeatedField<MethodDescriptorProto>,
3430 pub options: crate::SingularPtrField<ServiceOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003431 // special fields
3432 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003433 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003434 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003435 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003436}
3437
3438impl<'a> ::std::default::Default for &'a ServiceDescriptorProto {
3439 fn default() -> &'a ServiceDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003440 <ServiceDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003441 }
3442}
3443
3444impl ServiceDescriptorProto {
3445 pub fn new() -> ServiceDescriptorProto {
3446 ::std::default::Default::default()
3447 }
3448
3449 // optional string name = 1;
3450
3451
3452 pub fn get_name(&self) -> &str {
3453 match self.name.as_ref() {
3454 Some(v) => &v,
3455 None => "",
3456 }
3457 }
3458 pub fn clear_name(&mut self) {
3459 self.name.clear();
3460 }
3461
3462 pub fn has_name(&self) -> bool {
3463 self.name.is_some()
3464 }
3465
3466 // Param is passed by value, moved
3467 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003468 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003469 }
3470
3471 // Mutable pointer to the field.
3472 // If field is not initialized, it is initialized with default value first.
3473 pub fn mut_name(&mut self) -> &mut ::std::string::String {
3474 if self.name.is_none() {
3475 self.name.set_default();
3476 }
3477 self.name.as_mut().unwrap()
3478 }
3479
3480 // Take field
3481 pub fn take_name(&mut self) -> ::std::string::String {
3482 self.name.take().unwrap_or_else(|| ::std::string::String::new())
3483 }
3484
3485 // repeated .google.protobuf.MethodDescriptorProto method = 2;
3486
3487
3488 pub fn get_method(&self) -> &[MethodDescriptorProto] {
3489 &self.method
3490 }
3491 pub fn clear_method(&mut self) {
3492 self.method.clear();
3493 }
3494
3495 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003496 pub fn set_method(&mut self, v: crate::RepeatedField<MethodDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003497 self.method = v;
3498 }
3499
3500 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003501 pub fn mut_method(&mut self) -> &mut crate::RepeatedField<MethodDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003502 &mut self.method
3503 }
3504
3505 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003506 pub fn take_method(&mut self) -> crate::RepeatedField<MethodDescriptorProto> {
3507 ::std::mem::replace(&mut self.method, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003508 }
3509
3510 // optional .google.protobuf.ServiceOptions options = 3;
3511
3512
3513 pub fn get_options(&self) -> &ServiceOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003514 self.options.as_ref().unwrap_or_else(|| <ServiceOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003515 }
3516 pub fn clear_options(&mut self) {
3517 self.options.clear();
3518 }
3519
3520 pub fn has_options(&self) -> bool {
3521 self.options.is_some()
3522 }
3523
3524 // Param is passed by value, moved
3525 pub fn set_options(&mut self, v: ServiceOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003526 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003527 }
3528
3529 // Mutable pointer to the field.
3530 // If field is not initialized, it is initialized with default value first.
3531 pub fn mut_options(&mut self) -> &mut ServiceOptions {
3532 if self.options.is_none() {
3533 self.options.set_default();
3534 }
3535 self.options.as_mut().unwrap()
3536 }
3537
3538 // Take field
3539 pub fn take_options(&mut self) -> ServiceOptions {
3540 self.options.take().unwrap_or_else(|| ServiceOptions::new())
3541 }
3542}
3543
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003544impl crate::Message for ServiceDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003545 fn is_initialized(&self) -> bool {
3546 for v in &self.method {
3547 if !v.is_initialized() {
3548 return false;
3549 }
3550 };
3551 for v in &self.options {
3552 if !v.is_initialized() {
3553 return false;
3554 }
3555 };
3556 true
3557 }
3558
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003559 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003560 while !is.eof()? {
3561 let (field_number, wire_type) = is.read_tag_unpack()?;
3562 match field_number {
3563 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003564 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003565 },
3566 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003567 crate::rt::read_repeated_message_into(wire_type, is, &mut self.method)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003568 },
3569 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003570 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003571 },
3572 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003573 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003574 },
3575 };
3576 }
3577 ::std::result::Result::Ok(())
3578 }
3579
3580 // Compute sizes of nested messages
3581 #[allow(unused_variables)]
3582 fn compute_size(&self) -> u32 {
3583 let mut my_size = 0;
3584 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003585 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003586 }
3587 for value in &self.method {
3588 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003589 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003590 };
3591 if let Some(ref v) = self.options.as_ref() {
3592 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003593 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003594 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003595 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003596 self.cached_size.set(my_size);
3597 my_size
3598 }
3599
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003600 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003601 if let Some(ref v) = self.name.as_ref() {
3602 os.write_string(1, &v)?;
3603 }
3604 for v in &self.method {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003605 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003606 os.write_raw_varint32(v.get_cached_size())?;
3607 v.write_to_with_cached_sizes(os)?;
3608 };
3609 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003610 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003611 os.write_raw_varint32(v.get_cached_size())?;
3612 v.write_to_with_cached_sizes(os)?;
3613 }
3614 os.write_unknown_fields(self.get_unknown_fields())?;
3615 ::std::result::Result::Ok(())
3616 }
3617
3618 fn get_cached_size(&self) -> u32 {
3619 self.cached_size.get()
3620 }
3621
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003622 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003623 &self.unknown_fields
3624 }
3625
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003626 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003627 &mut self.unknown_fields
3628 }
3629
3630 fn as_any(&self) -> &dyn (::std::any::Any) {
3631 self as &dyn (::std::any::Any)
3632 }
3633 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3634 self as &mut dyn (::std::any::Any)
3635 }
Haibo Huang52aa7852020-07-10 20:23:55 -07003636 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003637 self
3638 }
3639
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003640 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003641 Self::descriptor_static()
3642 }
3643
3644 fn new() -> ServiceDescriptorProto {
3645 ServiceDescriptorProto::new()
3646 }
3647
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003648 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
3649 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003650 descriptor.get(|| {
3651 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003652 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003653 "name",
3654 |m: &ServiceDescriptorProto| { &m.name },
3655 |m: &mut ServiceDescriptorProto| { &mut m.name },
3656 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003657 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<MethodDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003658 "method",
3659 |m: &ServiceDescriptorProto| { &m.method },
3660 |m: &mut ServiceDescriptorProto| { &mut m.method },
3661 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003662 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<ServiceOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003663 "options",
3664 |m: &ServiceDescriptorProto| { &m.options },
3665 |m: &mut ServiceDescriptorProto| { &mut m.options },
3666 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003667 crate::reflect::MessageDescriptor::new_pb_name::<ServiceDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003668 "ServiceDescriptorProto",
3669 fields,
3670 file_descriptor_proto()
3671 )
3672 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003673 }
3674
3675 fn default_instance() -> &'static ServiceDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003676 static instance: crate::rt::LazyV2<ServiceDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003677 instance.get(ServiceDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003678 }
3679}
3680
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003681impl crate::Clear for ServiceDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003682 fn clear(&mut self) {
3683 self.name.clear();
3684 self.method.clear();
3685 self.options.clear();
3686 self.unknown_fields.clear();
3687 }
3688}
3689
3690impl ::std::fmt::Debug for ServiceDescriptorProto {
3691 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003692 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003693 }
3694}
3695
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003696impl crate::reflect::ProtobufValue for ServiceDescriptorProto {
3697 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
3698 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003699 }
3700}
3701
3702#[derive(PartialEq,Clone,Default)]
3703#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
3704pub struct MethodDescriptorProto {
3705 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003706 name: crate::SingularField<::std::string::String>,
3707 input_type: crate::SingularField<::std::string::String>,
3708 output_type: crate::SingularField<::std::string::String>,
3709 pub options: crate::SingularPtrField<MethodOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003710 client_streaming: ::std::option::Option<bool>,
3711 server_streaming: ::std::option::Option<bool>,
3712 // special fields
3713 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003714 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003715 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003716 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003717}
3718
3719impl<'a> ::std::default::Default for &'a MethodDescriptorProto {
3720 fn default() -> &'a MethodDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003721 <MethodDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003722 }
3723}
3724
3725impl MethodDescriptorProto {
3726 pub fn new() -> MethodDescriptorProto {
3727 ::std::default::Default::default()
3728 }
3729
3730 // optional string name = 1;
3731
3732
3733 pub fn get_name(&self) -> &str {
3734 match self.name.as_ref() {
3735 Some(v) => &v,
3736 None => "",
3737 }
3738 }
3739 pub fn clear_name(&mut self) {
3740 self.name.clear();
3741 }
3742
3743 pub fn has_name(&self) -> bool {
3744 self.name.is_some()
3745 }
3746
3747 // Param is passed by value, moved
3748 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003749 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003750 }
3751
3752 // Mutable pointer to the field.
3753 // If field is not initialized, it is initialized with default value first.
3754 pub fn mut_name(&mut self) -> &mut ::std::string::String {
3755 if self.name.is_none() {
3756 self.name.set_default();
3757 }
3758 self.name.as_mut().unwrap()
3759 }
3760
3761 // Take field
3762 pub fn take_name(&mut self) -> ::std::string::String {
3763 self.name.take().unwrap_or_else(|| ::std::string::String::new())
3764 }
3765
3766 // optional string input_type = 2;
3767
3768
3769 pub fn get_input_type(&self) -> &str {
3770 match self.input_type.as_ref() {
3771 Some(v) => &v,
3772 None => "",
3773 }
3774 }
3775 pub fn clear_input_type(&mut self) {
3776 self.input_type.clear();
3777 }
3778
3779 pub fn has_input_type(&self) -> bool {
3780 self.input_type.is_some()
3781 }
3782
3783 // Param is passed by value, moved
3784 pub fn set_input_type(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003785 self.input_type = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003786 }
3787
3788 // Mutable pointer to the field.
3789 // If field is not initialized, it is initialized with default value first.
3790 pub fn mut_input_type(&mut self) -> &mut ::std::string::String {
3791 if self.input_type.is_none() {
3792 self.input_type.set_default();
3793 }
3794 self.input_type.as_mut().unwrap()
3795 }
3796
3797 // Take field
3798 pub fn take_input_type(&mut self) -> ::std::string::String {
3799 self.input_type.take().unwrap_or_else(|| ::std::string::String::new())
3800 }
3801
3802 // optional string output_type = 3;
3803
3804
3805 pub fn get_output_type(&self) -> &str {
3806 match self.output_type.as_ref() {
3807 Some(v) => &v,
3808 None => "",
3809 }
3810 }
3811 pub fn clear_output_type(&mut self) {
3812 self.output_type.clear();
3813 }
3814
3815 pub fn has_output_type(&self) -> bool {
3816 self.output_type.is_some()
3817 }
3818
3819 // Param is passed by value, moved
3820 pub fn set_output_type(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003821 self.output_type = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003822 }
3823
3824 // Mutable pointer to the field.
3825 // If field is not initialized, it is initialized with default value first.
3826 pub fn mut_output_type(&mut self) -> &mut ::std::string::String {
3827 if self.output_type.is_none() {
3828 self.output_type.set_default();
3829 }
3830 self.output_type.as_mut().unwrap()
3831 }
3832
3833 // Take field
3834 pub fn take_output_type(&mut self) -> ::std::string::String {
3835 self.output_type.take().unwrap_or_else(|| ::std::string::String::new())
3836 }
3837
3838 // optional .google.protobuf.MethodOptions options = 4;
3839
3840
3841 pub fn get_options(&self) -> &MethodOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003842 self.options.as_ref().unwrap_or_else(|| <MethodOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003843 }
3844 pub fn clear_options(&mut self) {
3845 self.options.clear();
3846 }
3847
3848 pub fn has_options(&self) -> bool {
3849 self.options.is_some()
3850 }
3851
3852 // Param is passed by value, moved
3853 pub fn set_options(&mut self, v: MethodOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003854 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003855 }
3856
3857 // Mutable pointer to the field.
3858 // If field is not initialized, it is initialized with default value first.
3859 pub fn mut_options(&mut self) -> &mut MethodOptions {
3860 if self.options.is_none() {
3861 self.options.set_default();
3862 }
3863 self.options.as_mut().unwrap()
3864 }
3865
3866 // Take field
3867 pub fn take_options(&mut self) -> MethodOptions {
3868 self.options.take().unwrap_or_else(|| MethodOptions::new())
3869 }
3870
3871 // optional bool client_streaming = 5;
3872
3873
3874 pub fn get_client_streaming(&self) -> bool {
3875 self.client_streaming.unwrap_or(false)
3876 }
3877 pub fn clear_client_streaming(&mut self) {
3878 self.client_streaming = ::std::option::Option::None;
3879 }
3880
3881 pub fn has_client_streaming(&self) -> bool {
3882 self.client_streaming.is_some()
3883 }
3884
3885 // Param is passed by value, moved
3886 pub fn set_client_streaming(&mut self, v: bool) {
3887 self.client_streaming = ::std::option::Option::Some(v);
3888 }
3889
3890 // optional bool server_streaming = 6;
3891
3892
3893 pub fn get_server_streaming(&self) -> bool {
3894 self.server_streaming.unwrap_or(false)
3895 }
3896 pub fn clear_server_streaming(&mut self) {
3897 self.server_streaming = ::std::option::Option::None;
3898 }
3899
3900 pub fn has_server_streaming(&self) -> bool {
3901 self.server_streaming.is_some()
3902 }
3903
3904 // Param is passed by value, moved
3905 pub fn set_server_streaming(&mut self, v: bool) {
3906 self.server_streaming = ::std::option::Option::Some(v);
3907 }
3908}
3909
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003910impl crate::Message for MethodDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003911 fn is_initialized(&self) -> bool {
3912 for v in &self.options {
3913 if !v.is_initialized() {
3914 return false;
3915 }
3916 };
3917 true
3918 }
3919
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003920 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003921 while !is.eof()? {
3922 let (field_number, wire_type) = is.read_tag_unpack()?;
3923 match field_number {
3924 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003925 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003926 },
3927 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003928 crate::rt::read_singular_string_into(wire_type, is, &mut self.input_type)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003929 },
3930 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003931 crate::rt::read_singular_string_into(wire_type, is, &mut self.output_type)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003932 },
3933 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003934 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003935 },
3936 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003937 if wire_type != crate::wire_format::WireTypeVarint {
3938 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003939 }
3940 let tmp = is.read_bool()?;
3941 self.client_streaming = ::std::option::Option::Some(tmp);
3942 },
3943 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003944 if wire_type != crate::wire_format::WireTypeVarint {
3945 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003946 }
3947 let tmp = is.read_bool()?;
3948 self.server_streaming = ::std::option::Option::Some(tmp);
3949 },
3950 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003951 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003952 },
3953 };
3954 }
3955 ::std::result::Result::Ok(())
3956 }
3957
3958 // Compute sizes of nested messages
3959 #[allow(unused_variables)]
3960 fn compute_size(&self) -> u32 {
3961 let mut my_size = 0;
3962 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003963 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003964 }
3965 if let Some(ref v) = self.input_type.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003966 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003967 }
3968 if let Some(ref v) = self.output_type.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003969 my_size += crate::rt::string_size(3, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003970 }
3971 if let Some(ref v) = self.options.as_ref() {
3972 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003973 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003974 }
3975 if let Some(v) = self.client_streaming {
3976 my_size += 2;
3977 }
3978 if let Some(v) = self.server_streaming {
3979 my_size += 2;
3980 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003981 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003982 self.cached_size.set(my_size);
3983 my_size
3984 }
3985
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003986 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003987 if let Some(ref v) = self.name.as_ref() {
3988 os.write_string(1, &v)?;
3989 }
3990 if let Some(ref v) = self.input_type.as_ref() {
3991 os.write_string(2, &v)?;
3992 }
3993 if let Some(ref v) = self.output_type.as_ref() {
3994 os.write_string(3, &v)?;
3995 }
3996 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003997 os.write_tag(4, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003998 os.write_raw_varint32(v.get_cached_size())?;
3999 v.write_to_with_cached_sizes(os)?;
4000 }
4001 if let Some(v) = self.client_streaming {
4002 os.write_bool(5, v)?;
4003 }
4004 if let Some(v) = self.server_streaming {
4005 os.write_bool(6, v)?;
4006 }
4007 os.write_unknown_fields(self.get_unknown_fields())?;
4008 ::std::result::Result::Ok(())
4009 }
4010
4011 fn get_cached_size(&self) -> u32 {
4012 self.cached_size.get()
4013 }
4014
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004015 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004016 &self.unknown_fields
4017 }
4018
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004019 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004020 &mut self.unknown_fields
4021 }
4022
4023 fn as_any(&self) -> &dyn (::std::any::Any) {
4024 self as &dyn (::std::any::Any)
4025 }
4026 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4027 self as &mut dyn (::std::any::Any)
4028 }
Haibo Huang52aa7852020-07-10 20:23:55 -07004029 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004030 self
4031 }
4032
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004033 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004034 Self::descriptor_static()
4035 }
4036
4037 fn new() -> MethodDescriptorProto {
4038 MethodDescriptorProto::new()
4039 }
4040
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004041 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
4042 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004043 descriptor.get(|| {
4044 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004045 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004046 "name",
4047 |m: &MethodDescriptorProto| { &m.name },
4048 |m: &mut MethodDescriptorProto| { &mut m.name },
4049 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004050 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004051 "input_type",
4052 |m: &MethodDescriptorProto| { &m.input_type },
4053 |m: &mut MethodDescriptorProto| { &mut m.input_type },
4054 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004055 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004056 "output_type",
4057 |m: &MethodDescriptorProto| { &m.output_type },
4058 |m: &mut MethodDescriptorProto| { &mut m.output_type },
4059 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004060 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<MethodOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004061 "options",
4062 |m: &MethodDescriptorProto| { &m.options },
4063 |m: &mut MethodDescriptorProto| { &mut m.options },
4064 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004065 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004066 "client_streaming",
4067 |m: &MethodDescriptorProto| { &m.client_streaming },
4068 |m: &mut MethodDescriptorProto| { &mut m.client_streaming },
4069 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004070 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004071 "server_streaming",
4072 |m: &MethodDescriptorProto| { &m.server_streaming },
4073 |m: &mut MethodDescriptorProto| { &mut m.server_streaming },
4074 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004075 crate::reflect::MessageDescriptor::new_pb_name::<MethodDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004076 "MethodDescriptorProto",
4077 fields,
4078 file_descriptor_proto()
4079 )
4080 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004081 }
4082
4083 fn default_instance() -> &'static MethodDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004084 static instance: crate::rt::LazyV2<MethodDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004085 instance.get(MethodDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004086 }
4087}
4088
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004089impl crate::Clear for MethodDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004090 fn clear(&mut self) {
4091 self.name.clear();
4092 self.input_type.clear();
4093 self.output_type.clear();
4094 self.options.clear();
4095 self.client_streaming = ::std::option::Option::None;
4096 self.server_streaming = ::std::option::Option::None;
4097 self.unknown_fields.clear();
4098 }
4099}
4100
4101impl ::std::fmt::Debug for MethodDescriptorProto {
4102 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004103 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004104 }
4105}
4106
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004107impl crate::reflect::ProtobufValue for MethodDescriptorProto {
4108 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
4109 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004110 }
4111}
4112
4113#[derive(PartialEq,Clone,Default)]
4114#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
4115pub struct FileOptions {
4116 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004117 java_package: crate::SingularField<::std::string::String>,
4118 java_outer_classname: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004119 java_multiple_files: ::std::option::Option<bool>,
4120 java_generate_equals_and_hash: ::std::option::Option<bool>,
4121 java_string_check_utf8: ::std::option::Option<bool>,
4122 optimize_for: ::std::option::Option<FileOptions_OptimizeMode>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004123 go_package: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004124 cc_generic_services: ::std::option::Option<bool>,
4125 java_generic_services: ::std::option::Option<bool>,
4126 py_generic_services: ::std::option::Option<bool>,
4127 deprecated: ::std::option::Option<bool>,
4128 cc_enable_arenas: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004129 objc_class_prefix: crate::SingularField<::std::string::String>,
4130 csharp_namespace: crate::SingularField<::std::string::String>,
4131 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004132 // special fields
4133 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004134 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004135 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004136 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004137}
4138
4139impl<'a> ::std::default::Default for &'a FileOptions {
4140 fn default() -> &'a FileOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004141 <FileOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004142 }
4143}
4144
4145impl FileOptions {
4146 pub fn new() -> FileOptions {
4147 ::std::default::Default::default()
4148 }
4149
4150 // optional string java_package = 1;
4151
4152
4153 pub fn get_java_package(&self) -> &str {
4154 match self.java_package.as_ref() {
4155 Some(v) => &v,
4156 None => "",
4157 }
4158 }
4159 pub fn clear_java_package(&mut self) {
4160 self.java_package.clear();
4161 }
4162
4163 pub fn has_java_package(&self) -> bool {
4164 self.java_package.is_some()
4165 }
4166
4167 // Param is passed by value, moved
4168 pub fn set_java_package(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004169 self.java_package = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004170 }
4171
4172 // Mutable pointer to the field.
4173 // If field is not initialized, it is initialized with default value first.
4174 pub fn mut_java_package(&mut self) -> &mut ::std::string::String {
4175 if self.java_package.is_none() {
4176 self.java_package.set_default();
4177 }
4178 self.java_package.as_mut().unwrap()
4179 }
4180
4181 // Take field
4182 pub fn take_java_package(&mut self) -> ::std::string::String {
4183 self.java_package.take().unwrap_or_else(|| ::std::string::String::new())
4184 }
4185
4186 // optional string java_outer_classname = 8;
4187
4188
4189 pub fn get_java_outer_classname(&self) -> &str {
4190 match self.java_outer_classname.as_ref() {
4191 Some(v) => &v,
4192 None => "",
4193 }
4194 }
4195 pub fn clear_java_outer_classname(&mut self) {
4196 self.java_outer_classname.clear();
4197 }
4198
4199 pub fn has_java_outer_classname(&self) -> bool {
4200 self.java_outer_classname.is_some()
4201 }
4202
4203 // Param is passed by value, moved
4204 pub fn set_java_outer_classname(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004205 self.java_outer_classname = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004206 }
4207
4208 // Mutable pointer to the field.
4209 // If field is not initialized, it is initialized with default value first.
4210 pub fn mut_java_outer_classname(&mut self) -> &mut ::std::string::String {
4211 if self.java_outer_classname.is_none() {
4212 self.java_outer_classname.set_default();
4213 }
4214 self.java_outer_classname.as_mut().unwrap()
4215 }
4216
4217 // Take field
4218 pub fn take_java_outer_classname(&mut self) -> ::std::string::String {
4219 self.java_outer_classname.take().unwrap_or_else(|| ::std::string::String::new())
4220 }
4221
4222 // optional bool java_multiple_files = 10;
4223
4224
4225 pub fn get_java_multiple_files(&self) -> bool {
4226 self.java_multiple_files.unwrap_or(false)
4227 }
4228 pub fn clear_java_multiple_files(&mut self) {
4229 self.java_multiple_files = ::std::option::Option::None;
4230 }
4231
4232 pub fn has_java_multiple_files(&self) -> bool {
4233 self.java_multiple_files.is_some()
4234 }
4235
4236 // Param is passed by value, moved
4237 pub fn set_java_multiple_files(&mut self, v: bool) {
4238 self.java_multiple_files = ::std::option::Option::Some(v);
4239 }
4240
4241 // optional bool java_generate_equals_and_hash = 20;
4242
4243
4244 pub fn get_java_generate_equals_and_hash(&self) -> bool {
4245 self.java_generate_equals_and_hash.unwrap_or(false)
4246 }
4247 pub fn clear_java_generate_equals_and_hash(&mut self) {
4248 self.java_generate_equals_and_hash = ::std::option::Option::None;
4249 }
4250
4251 pub fn has_java_generate_equals_and_hash(&self) -> bool {
4252 self.java_generate_equals_and_hash.is_some()
4253 }
4254
4255 // Param is passed by value, moved
4256 pub fn set_java_generate_equals_and_hash(&mut self, v: bool) {
4257 self.java_generate_equals_and_hash = ::std::option::Option::Some(v);
4258 }
4259
4260 // optional bool java_string_check_utf8 = 27;
4261
4262
4263 pub fn get_java_string_check_utf8(&self) -> bool {
4264 self.java_string_check_utf8.unwrap_or(false)
4265 }
4266 pub fn clear_java_string_check_utf8(&mut self) {
4267 self.java_string_check_utf8 = ::std::option::Option::None;
4268 }
4269
4270 pub fn has_java_string_check_utf8(&self) -> bool {
4271 self.java_string_check_utf8.is_some()
4272 }
4273
4274 // Param is passed by value, moved
4275 pub fn set_java_string_check_utf8(&mut self, v: bool) {
4276 self.java_string_check_utf8 = ::std::option::Option::Some(v);
4277 }
4278
4279 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9;
4280
4281
4282 pub fn get_optimize_for(&self) -> FileOptions_OptimizeMode {
4283 self.optimize_for.unwrap_or(FileOptions_OptimizeMode::SPEED)
4284 }
4285 pub fn clear_optimize_for(&mut self) {
4286 self.optimize_for = ::std::option::Option::None;
4287 }
4288
4289 pub fn has_optimize_for(&self) -> bool {
4290 self.optimize_for.is_some()
4291 }
4292
4293 // Param is passed by value, moved
4294 pub fn set_optimize_for(&mut self, v: FileOptions_OptimizeMode) {
4295 self.optimize_for = ::std::option::Option::Some(v);
4296 }
4297
4298 // optional string go_package = 11;
4299
4300
4301 pub fn get_go_package(&self) -> &str {
4302 match self.go_package.as_ref() {
4303 Some(v) => &v,
4304 None => "",
4305 }
4306 }
4307 pub fn clear_go_package(&mut self) {
4308 self.go_package.clear();
4309 }
4310
4311 pub fn has_go_package(&self) -> bool {
4312 self.go_package.is_some()
4313 }
4314
4315 // Param is passed by value, moved
4316 pub fn set_go_package(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004317 self.go_package = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004318 }
4319
4320 // Mutable pointer to the field.
4321 // If field is not initialized, it is initialized with default value first.
4322 pub fn mut_go_package(&mut self) -> &mut ::std::string::String {
4323 if self.go_package.is_none() {
4324 self.go_package.set_default();
4325 }
4326 self.go_package.as_mut().unwrap()
4327 }
4328
4329 // Take field
4330 pub fn take_go_package(&mut self) -> ::std::string::String {
4331 self.go_package.take().unwrap_or_else(|| ::std::string::String::new())
4332 }
4333
4334 // optional bool cc_generic_services = 16;
4335
4336
4337 pub fn get_cc_generic_services(&self) -> bool {
4338 self.cc_generic_services.unwrap_or(false)
4339 }
4340 pub fn clear_cc_generic_services(&mut self) {
4341 self.cc_generic_services = ::std::option::Option::None;
4342 }
4343
4344 pub fn has_cc_generic_services(&self) -> bool {
4345 self.cc_generic_services.is_some()
4346 }
4347
4348 // Param is passed by value, moved
4349 pub fn set_cc_generic_services(&mut self, v: bool) {
4350 self.cc_generic_services = ::std::option::Option::Some(v);
4351 }
4352
4353 // optional bool java_generic_services = 17;
4354
4355
4356 pub fn get_java_generic_services(&self) -> bool {
4357 self.java_generic_services.unwrap_or(false)
4358 }
4359 pub fn clear_java_generic_services(&mut self) {
4360 self.java_generic_services = ::std::option::Option::None;
4361 }
4362
4363 pub fn has_java_generic_services(&self) -> bool {
4364 self.java_generic_services.is_some()
4365 }
4366
4367 // Param is passed by value, moved
4368 pub fn set_java_generic_services(&mut self, v: bool) {
4369 self.java_generic_services = ::std::option::Option::Some(v);
4370 }
4371
4372 // optional bool py_generic_services = 18;
4373
4374
4375 pub fn get_py_generic_services(&self) -> bool {
4376 self.py_generic_services.unwrap_or(false)
4377 }
4378 pub fn clear_py_generic_services(&mut self) {
4379 self.py_generic_services = ::std::option::Option::None;
4380 }
4381
4382 pub fn has_py_generic_services(&self) -> bool {
4383 self.py_generic_services.is_some()
4384 }
4385
4386 // Param is passed by value, moved
4387 pub fn set_py_generic_services(&mut self, v: bool) {
4388 self.py_generic_services = ::std::option::Option::Some(v);
4389 }
4390
4391 // optional bool deprecated = 23;
4392
4393
4394 pub fn get_deprecated(&self) -> bool {
4395 self.deprecated.unwrap_or(false)
4396 }
4397 pub fn clear_deprecated(&mut self) {
4398 self.deprecated = ::std::option::Option::None;
4399 }
4400
4401 pub fn has_deprecated(&self) -> bool {
4402 self.deprecated.is_some()
4403 }
4404
4405 // Param is passed by value, moved
4406 pub fn set_deprecated(&mut self, v: bool) {
4407 self.deprecated = ::std::option::Option::Some(v);
4408 }
4409
4410 // optional bool cc_enable_arenas = 31;
4411
4412
4413 pub fn get_cc_enable_arenas(&self) -> bool {
4414 self.cc_enable_arenas.unwrap_or(false)
4415 }
4416 pub fn clear_cc_enable_arenas(&mut self) {
4417 self.cc_enable_arenas = ::std::option::Option::None;
4418 }
4419
4420 pub fn has_cc_enable_arenas(&self) -> bool {
4421 self.cc_enable_arenas.is_some()
4422 }
4423
4424 // Param is passed by value, moved
4425 pub fn set_cc_enable_arenas(&mut self, v: bool) {
4426 self.cc_enable_arenas = ::std::option::Option::Some(v);
4427 }
4428
4429 // optional string objc_class_prefix = 36;
4430
4431
4432 pub fn get_objc_class_prefix(&self) -> &str {
4433 match self.objc_class_prefix.as_ref() {
4434 Some(v) => &v,
4435 None => "",
4436 }
4437 }
4438 pub fn clear_objc_class_prefix(&mut self) {
4439 self.objc_class_prefix.clear();
4440 }
4441
4442 pub fn has_objc_class_prefix(&self) -> bool {
4443 self.objc_class_prefix.is_some()
4444 }
4445
4446 // Param is passed by value, moved
4447 pub fn set_objc_class_prefix(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004448 self.objc_class_prefix = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004449 }
4450
4451 // Mutable pointer to the field.
4452 // If field is not initialized, it is initialized with default value first.
4453 pub fn mut_objc_class_prefix(&mut self) -> &mut ::std::string::String {
4454 if self.objc_class_prefix.is_none() {
4455 self.objc_class_prefix.set_default();
4456 }
4457 self.objc_class_prefix.as_mut().unwrap()
4458 }
4459
4460 // Take field
4461 pub fn take_objc_class_prefix(&mut self) -> ::std::string::String {
4462 self.objc_class_prefix.take().unwrap_or_else(|| ::std::string::String::new())
4463 }
4464
4465 // optional string csharp_namespace = 37;
4466
4467
4468 pub fn get_csharp_namespace(&self) -> &str {
4469 match self.csharp_namespace.as_ref() {
4470 Some(v) => &v,
4471 None => "",
4472 }
4473 }
4474 pub fn clear_csharp_namespace(&mut self) {
4475 self.csharp_namespace.clear();
4476 }
4477
4478 pub fn has_csharp_namespace(&self) -> bool {
4479 self.csharp_namespace.is_some()
4480 }
4481
4482 // Param is passed by value, moved
4483 pub fn set_csharp_namespace(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004484 self.csharp_namespace = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004485 }
4486
4487 // Mutable pointer to the field.
4488 // If field is not initialized, it is initialized with default value first.
4489 pub fn mut_csharp_namespace(&mut self) -> &mut ::std::string::String {
4490 if self.csharp_namespace.is_none() {
4491 self.csharp_namespace.set_default();
4492 }
4493 self.csharp_namespace.as_mut().unwrap()
4494 }
4495
4496 // Take field
4497 pub fn take_csharp_namespace(&mut self) -> ::std::string::String {
4498 self.csharp_namespace.take().unwrap_or_else(|| ::std::string::String::new())
4499 }
4500
4501 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
4502
4503
4504 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
4505 &self.uninterpreted_option
4506 }
4507 pub fn clear_uninterpreted_option(&mut self) {
4508 self.uninterpreted_option.clear();
4509 }
4510
4511 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004512 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004513 self.uninterpreted_option = v;
4514 }
4515
4516 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004517 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004518 &mut self.uninterpreted_option
4519 }
4520
4521 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004522 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
4523 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004524 }
4525}
4526
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004527impl crate::Message for FileOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004528 fn is_initialized(&self) -> bool {
4529 for v in &self.uninterpreted_option {
4530 if !v.is_initialized() {
4531 return false;
4532 }
4533 };
4534 true
4535 }
4536
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004537 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004538 while !is.eof()? {
4539 let (field_number, wire_type) = is.read_tag_unpack()?;
4540 match field_number {
4541 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004542 crate::rt::read_singular_string_into(wire_type, is, &mut self.java_package)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004543 },
4544 8 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004545 crate::rt::read_singular_string_into(wire_type, is, &mut self.java_outer_classname)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004546 },
4547 10 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004548 if wire_type != crate::wire_format::WireTypeVarint {
4549 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004550 }
4551 let tmp = is.read_bool()?;
4552 self.java_multiple_files = ::std::option::Option::Some(tmp);
4553 },
4554 20 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004555 if wire_type != crate::wire_format::WireTypeVarint {
4556 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004557 }
4558 let tmp = is.read_bool()?;
4559 self.java_generate_equals_and_hash = ::std::option::Option::Some(tmp);
4560 },
4561 27 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004562 if wire_type != crate::wire_format::WireTypeVarint {
4563 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004564 }
4565 let tmp = is.read_bool()?;
4566 self.java_string_check_utf8 = ::std::option::Option::Some(tmp);
4567 },
4568 9 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004569 crate::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.optimize_for, 9, &mut self.unknown_fields)?
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004570 },
4571 11 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004572 crate::rt::read_singular_string_into(wire_type, is, &mut self.go_package)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004573 },
4574 16 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004575 if wire_type != crate::wire_format::WireTypeVarint {
4576 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004577 }
4578 let tmp = is.read_bool()?;
4579 self.cc_generic_services = ::std::option::Option::Some(tmp);
4580 },
4581 17 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004582 if wire_type != crate::wire_format::WireTypeVarint {
4583 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004584 }
4585 let tmp = is.read_bool()?;
4586 self.java_generic_services = ::std::option::Option::Some(tmp);
4587 },
4588 18 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004589 if wire_type != crate::wire_format::WireTypeVarint {
4590 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004591 }
4592 let tmp = is.read_bool()?;
4593 self.py_generic_services = ::std::option::Option::Some(tmp);
4594 },
4595 23 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004596 if wire_type != crate::wire_format::WireTypeVarint {
4597 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004598 }
4599 let tmp = is.read_bool()?;
4600 self.deprecated = ::std::option::Option::Some(tmp);
4601 },
4602 31 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004603 if wire_type != crate::wire_format::WireTypeVarint {
4604 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004605 }
4606 let tmp = is.read_bool()?;
4607 self.cc_enable_arenas = ::std::option::Option::Some(tmp);
4608 },
4609 36 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004610 crate::rt::read_singular_string_into(wire_type, is, &mut self.objc_class_prefix)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004611 },
4612 37 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004613 crate::rt::read_singular_string_into(wire_type, is, &mut self.csharp_namespace)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004614 },
4615 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004616 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004617 },
4618 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004619 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004620 },
4621 };
4622 }
4623 ::std::result::Result::Ok(())
4624 }
4625
4626 // Compute sizes of nested messages
4627 #[allow(unused_variables)]
4628 fn compute_size(&self) -> u32 {
4629 let mut my_size = 0;
4630 if let Some(ref v) = self.java_package.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004631 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004632 }
4633 if let Some(ref v) = self.java_outer_classname.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004634 my_size += crate::rt::string_size(8, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004635 }
4636 if let Some(v) = self.java_multiple_files {
4637 my_size += 2;
4638 }
4639 if let Some(v) = self.java_generate_equals_and_hash {
4640 my_size += 3;
4641 }
4642 if let Some(v) = self.java_string_check_utf8 {
4643 my_size += 3;
4644 }
4645 if let Some(v) = self.optimize_for {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004646 my_size += crate::rt::enum_size(9, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004647 }
4648 if let Some(ref v) = self.go_package.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004649 my_size += crate::rt::string_size(11, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004650 }
4651 if let Some(v) = self.cc_generic_services {
4652 my_size += 3;
4653 }
4654 if let Some(v) = self.java_generic_services {
4655 my_size += 3;
4656 }
4657 if let Some(v) = self.py_generic_services {
4658 my_size += 3;
4659 }
4660 if let Some(v) = self.deprecated {
4661 my_size += 3;
4662 }
4663 if let Some(v) = self.cc_enable_arenas {
4664 my_size += 3;
4665 }
4666 if let Some(ref v) = self.objc_class_prefix.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004667 my_size += crate::rt::string_size(36, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004668 }
4669 if let Some(ref v) = self.csharp_namespace.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004670 my_size += crate::rt::string_size(37, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004671 }
4672 for value in &self.uninterpreted_option {
4673 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004674 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004675 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004676 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004677 self.cached_size.set(my_size);
4678 my_size
4679 }
4680
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004681 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004682 if let Some(ref v) = self.java_package.as_ref() {
4683 os.write_string(1, &v)?;
4684 }
4685 if let Some(ref v) = self.java_outer_classname.as_ref() {
4686 os.write_string(8, &v)?;
4687 }
4688 if let Some(v) = self.java_multiple_files {
4689 os.write_bool(10, v)?;
4690 }
4691 if let Some(v) = self.java_generate_equals_and_hash {
4692 os.write_bool(20, v)?;
4693 }
4694 if let Some(v) = self.java_string_check_utf8 {
4695 os.write_bool(27, v)?;
4696 }
4697 if let Some(v) = self.optimize_for {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004698 os.write_enum(9, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004699 }
4700 if let Some(ref v) = self.go_package.as_ref() {
4701 os.write_string(11, &v)?;
4702 }
4703 if let Some(v) = self.cc_generic_services {
4704 os.write_bool(16, v)?;
4705 }
4706 if let Some(v) = self.java_generic_services {
4707 os.write_bool(17, v)?;
4708 }
4709 if let Some(v) = self.py_generic_services {
4710 os.write_bool(18, v)?;
4711 }
4712 if let Some(v) = self.deprecated {
4713 os.write_bool(23, v)?;
4714 }
4715 if let Some(v) = self.cc_enable_arenas {
4716 os.write_bool(31, v)?;
4717 }
4718 if let Some(ref v) = self.objc_class_prefix.as_ref() {
4719 os.write_string(36, &v)?;
4720 }
4721 if let Some(ref v) = self.csharp_namespace.as_ref() {
4722 os.write_string(37, &v)?;
4723 }
4724 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004725 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004726 os.write_raw_varint32(v.get_cached_size())?;
4727 v.write_to_with_cached_sizes(os)?;
4728 };
4729 os.write_unknown_fields(self.get_unknown_fields())?;
4730 ::std::result::Result::Ok(())
4731 }
4732
4733 fn get_cached_size(&self) -> u32 {
4734 self.cached_size.get()
4735 }
4736
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004737 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004738 &self.unknown_fields
4739 }
4740
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004741 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004742 &mut self.unknown_fields
4743 }
4744
4745 fn as_any(&self) -> &dyn (::std::any::Any) {
4746 self as &dyn (::std::any::Any)
4747 }
4748 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4749 self as &mut dyn (::std::any::Any)
4750 }
Haibo Huang52aa7852020-07-10 20:23:55 -07004751 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004752 self
4753 }
4754
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004755 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004756 Self::descriptor_static()
4757 }
4758
4759 fn new() -> FileOptions {
4760 FileOptions::new()
4761 }
4762
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004763 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
4764 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004765 descriptor.get(|| {
4766 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004767 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004768 "java_package",
4769 |m: &FileOptions| { &m.java_package },
4770 |m: &mut FileOptions| { &mut m.java_package },
4771 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004772 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004773 "java_outer_classname",
4774 |m: &FileOptions| { &m.java_outer_classname },
4775 |m: &mut FileOptions| { &mut m.java_outer_classname },
4776 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004777 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004778 "java_multiple_files",
4779 |m: &FileOptions| { &m.java_multiple_files },
4780 |m: &mut FileOptions| { &mut m.java_multiple_files },
4781 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004782 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004783 "java_generate_equals_and_hash",
4784 |m: &FileOptions| { &m.java_generate_equals_and_hash },
4785 |m: &mut FileOptions| { &mut m.java_generate_equals_and_hash },
4786 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004787 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004788 "java_string_check_utf8",
4789 |m: &FileOptions| { &m.java_string_check_utf8 },
4790 |m: &mut FileOptions| { &mut m.java_string_check_utf8 },
4791 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004792 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FileOptions_OptimizeMode>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004793 "optimize_for",
4794 |m: &FileOptions| { &m.optimize_for },
4795 |m: &mut FileOptions| { &mut m.optimize_for },
4796 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004797 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004798 "go_package",
4799 |m: &FileOptions| { &m.go_package },
4800 |m: &mut FileOptions| { &mut m.go_package },
4801 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004802 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004803 "cc_generic_services",
4804 |m: &FileOptions| { &m.cc_generic_services },
4805 |m: &mut FileOptions| { &mut m.cc_generic_services },
4806 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004807 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004808 "java_generic_services",
4809 |m: &FileOptions| { &m.java_generic_services },
4810 |m: &mut FileOptions| { &mut m.java_generic_services },
4811 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004812 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004813 "py_generic_services",
4814 |m: &FileOptions| { &m.py_generic_services },
4815 |m: &mut FileOptions| { &mut m.py_generic_services },
4816 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004817 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004818 "deprecated",
4819 |m: &FileOptions| { &m.deprecated },
4820 |m: &mut FileOptions| { &mut m.deprecated },
4821 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004822 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004823 "cc_enable_arenas",
4824 |m: &FileOptions| { &m.cc_enable_arenas },
4825 |m: &mut FileOptions| { &mut m.cc_enable_arenas },
4826 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004827 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004828 "objc_class_prefix",
4829 |m: &FileOptions| { &m.objc_class_prefix },
4830 |m: &mut FileOptions| { &mut m.objc_class_prefix },
4831 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004832 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004833 "csharp_namespace",
4834 |m: &FileOptions| { &m.csharp_namespace },
4835 |m: &mut FileOptions| { &mut m.csharp_namespace },
4836 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004837 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004838 "uninterpreted_option",
4839 |m: &FileOptions| { &m.uninterpreted_option },
4840 |m: &mut FileOptions| { &mut m.uninterpreted_option },
4841 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004842 crate::reflect::MessageDescriptor::new_pb_name::<FileOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004843 "FileOptions",
4844 fields,
4845 file_descriptor_proto()
4846 )
4847 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004848 }
4849
4850 fn default_instance() -> &'static FileOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004851 static instance: crate::rt::LazyV2<FileOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004852 instance.get(FileOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004853 }
4854}
4855
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004856impl crate::Clear for FileOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004857 fn clear(&mut self) {
4858 self.java_package.clear();
4859 self.java_outer_classname.clear();
4860 self.java_multiple_files = ::std::option::Option::None;
4861 self.java_generate_equals_and_hash = ::std::option::Option::None;
4862 self.java_string_check_utf8 = ::std::option::Option::None;
4863 self.optimize_for = ::std::option::Option::None;
4864 self.go_package.clear();
4865 self.cc_generic_services = ::std::option::Option::None;
4866 self.java_generic_services = ::std::option::Option::None;
4867 self.py_generic_services = ::std::option::Option::None;
4868 self.deprecated = ::std::option::Option::None;
4869 self.cc_enable_arenas = ::std::option::Option::None;
4870 self.objc_class_prefix.clear();
4871 self.csharp_namespace.clear();
4872 self.uninterpreted_option.clear();
4873 self.unknown_fields.clear();
4874 }
4875}
4876
4877impl ::std::fmt::Debug for FileOptions {
4878 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004879 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004880 }
4881}
4882
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004883impl crate::reflect::ProtobufValue for FileOptions {
4884 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
4885 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004886 }
4887}
4888
4889#[derive(Clone,PartialEq,Eq,Debug,Hash)]
4890#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
4891pub enum FileOptions_OptimizeMode {
4892 SPEED = 1,
4893 CODE_SIZE = 2,
4894 LITE_RUNTIME = 3,
4895}
4896
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004897impl crate::ProtobufEnum for FileOptions_OptimizeMode {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004898 fn value(&self) -> i32 {
4899 *self as i32
4900 }
4901
4902 fn from_i32(value: i32) -> ::std::option::Option<FileOptions_OptimizeMode> {
4903 match value {
4904 1 => ::std::option::Option::Some(FileOptions_OptimizeMode::SPEED),
4905 2 => ::std::option::Option::Some(FileOptions_OptimizeMode::CODE_SIZE),
4906 3 => ::std::option::Option::Some(FileOptions_OptimizeMode::LITE_RUNTIME),
4907 _ => ::std::option::Option::None
4908 }
4909 }
4910
4911 fn values() -> &'static [Self] {
4912 static values: &'static [FileOptions_OptimizeMode] = &[
4913 FileOptions_OptimizeMode::SPEED,
4914 FileOptions_OptimizeMode::CODE_SIZE,
4915 FileOptions_OptimizeMode::LITE_RUNTIME,
4916 ];
4917 values
4918 }
4919
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004920 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
4921 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004922 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004923 crate::reflect::EnumDescriptor::new_pb_name::<FileOptions_OptimizeMode>("FileOptions.OptimizeMode", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07004924 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004925 }
4926}
4927
4928impl ::std::marker::Copy for FileOptions_OptimizeMode {
4929}
4930
4931// Note, `Default` is implemented although default value is not 0
4932impl ::std::default::Default for FileOptions_OptimizeMode {
4933 fn default() -> Self {
4934 FileOptions_OptimizeMode::SPEED
4935 }
4936}
4937
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004938impl crate::reflect::ProtobufValue for FileOptions_OptimizeMode {
4939 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
4940 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004941 }
4942}
4943
4944#[derive(PartialEq,Clone,Default)]
4945#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
4946pub struct MessageOptions {
4947 // message fields
4948 message_set_wire_format: ::std::option::Option<bool>,
4949 no_standard_descriptor_accessor: ::std::option::Option<bool>,
4950 deprecated: ::std::option::Option<bool>,
4951 map_entry: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004952 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004953 // special fields
4954 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004955 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004956 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004957 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004958}
4959
4960impl<'a> ::std::default::Default for &'a MessageOptions {
4961 fn default() -> &'a MessageOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004962 <MessageOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004963 }
4964}
4965
4966impl MessageOptions {
4967 pub fn new() -> MessageOptions {
4968 ::std::default::Default::default()
4969 }
4970
4971 // optional bool message_set_wire_format = 1;
4972
4973
4974 pub fn get_message_set_wire_format(&self) -> bool {
4975 self.message_set_wire_format.unwrap_or(false)
4976 }
4977 pub fn clear_message_set_wire_format(&mut self) {
4978 self.message_set_wire_format = ::std::option::Option::None;
4979 }
4980
4981 pub fn has_message_set_wire_format(&self) -> bool {
4982 self.message_set_wire_format.is_some()
4983 }
4984
4985 // Param is passed by value, moved
4986 pub fn set_message_set_wire_format(&mut self, v: bool) {
4987 self.message_set_wire_format = ::std::option::Option::Some(v);
4988 }
4989
4990 // optional bool no_standard_descriptor_accessor = 2;
4991
4992
4993 pub fn get_no_standard_descriptor_accessor(&self) -> bool {
4994 self.no_standard_descriptor_accessor.unwrap_or(false)
4995 }
4996 pub fn clear_no_standard_descriptor_accessor(&mut self) {
4997 self.no_standard_descriptor_accessor = ::std::option::Option::None;
4998 }
4999
5000 pub fn has_no_standard_descriptor_accessor(&self) -> bool {
5001 self.no_standard_descriptor_accessor.is_some()
5002 }
5003
5004 // Param is passed by value, moved
5005 pub fn set_no_standard_descriptor_accessor(&mut self, v: bool) {
5006 self.no_standard_descriptor_accessor = ::std::option::Option::Some(v);
5007 }
5008
5009 // optional bool deprecated = 3;
5010
5011
5012 pub fn get_deprecated(&self) -> bool {
5013 self.deprecated.unwrap_or(false)
5014 }
5015 pub fn clear_deprecated(&mut self) {
5016 self.deprecated = ::std::option::Option::None;
5017 }
5018
5019 pub fn has_deprecated(&self) -> bool {
5020 self.deprecated.is_some()
5021 }
5022
5023 // Param is passed by value, moved
5024 pub fn set_deprecated(&mut self, v: bool) {
5025 self.deprecated = ::std::option::Option::Some(v);
5026 }
5027
5028 // optional bool map_entry = 7;
5029
5030
5031 pub fn get_map_entry(&self) -> bool {
5032 self.map_entry.unwrap_or(false)
5033 }
5034 pub fn clear_map_entry(&mut self) {
5035 self.map_entry = ::std::option::Option::None;
5036 }
5037
5038 pub fn has_map_entry(&self) -> bool {
5039 self.map_entry.is_some()
5040 }
5041
5042 // Param is passed by value, moved
5043 pub fn set_map_entry(&mut self, v: bool) {
5044 self.map_entry = ::std::option::Option::Some(v);
5045 }
5046
5047 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5048
5049
5050 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
5051 &self.uninterpreted_option
5052 }
5053 pub fn clear_uninterpreted_option(&mut self) {
5054 self.uninterpreted_option.clear();
5055 }
5056
5057 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005058 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005059 self.uninterpreted_option = v;
5060 }
5061
5062 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005063 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005064 &mut self.uninterpreted_option
5065 }
5066
5067 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005068 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
5069 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005070 }
5071}
5072
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005073impl crate::Message for MessageOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005074 fn is_initialized(&self) -> bool {
5075 for v in &self.uninterpreted_option {
5076 if !v.is_initialized() {
5077 return false;
5078 }
5079 };
5080 true
5081 }
5082
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005083 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005084 while !is.eof()? {
5085 let (field_number, wire_type) = is.read_tag_unpack()?;
5086 match field_number {
5087 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005088 if wire_type != crate::wire_format::WireTypeVarint {
5089 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005090 }
5091 let tmp = is.read_bool()?;
5092 self.message_set_wire_format = ::std::option::Option::Some(tmp);
5093 },
5094 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005095 if wire_type != crate::wire_format::WireTypeVarint {
5096 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005097 }
5098 let tmp = is.read_bool()?;
5099 self.no_standard_descriptor_accessor = ::std::option::Option::Some(tmp);
5100 },
5101 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005102 if wire_type != crate::wire_format::WireTypeVarint {
5103 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005104 }
5105 let tmp = is.read_bool()?;
5106 self.deprecated = ::std::option::Option::Some(tmp);
5107 },
5108 7 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005109 if wire_type != crate::wire_format::WireTypeVarint {
5110 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005111 }
5112 let tmp = is.read_bool()?;
5113 self.map_entry = ::std::option::Option::Some(tmp);
5114 },
5115 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005116 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005117 },
5118 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005119 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005120 },
5121 };
5122 }
5123 ::std::result::Result::Ok(())
5124 }
5125
5126 // Compute sizes of nested messages
5127 #[allow(unused_variables)]
5128 fn compute_size(&self) -> u32 {
5129 let mut my_size = 0;
5130 if let Some(v) = self.message_set_wire_format {
5131 my_size += 2;
5132 }
5133 if let Some(v) = self.no_standard_descriptor_accessor {
5134 my_size += 2;
5135 }
5136 if let Some(v) = self.deprecated {
5137 my_size += 2;
5138 }
5139 if let Some(v) = self.map_entry {
5140 my_size += 2;
5141 }
5142 for value in &self.uninterpreted_option {
5143 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005144 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005145 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005146 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005147 self.cached_size.set(my_size);
5148 my_size
5149 }
5150
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005151 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005152 if let Some(v) = self.message_set_wire_format {
5153 os.write_bool(1, v)?;
5154 }
5155 if let Some(v) = self.no_standard_descriptor_accessor {
5156 os.write_bool(2, v)?;
5157 }
5158 if let Some(v) = self.deprecated {
5159 os.write_bool(3, v)?;
5160 }
5161 if let Some(v) = self.map_entry {
5162 os.write_bool(7, v)?;
5163 }
5164 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005165 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005166 os.write_raw_varint32(v.get_cached_size())?;
5167 v.write_to_with_cached_sizes(os)?;
5168 };
5169 os.write_unknown_fields(self.get_unknown_fields())?;
5170 ::std::result::Result::Ok(())
5171 }
5172
5173 fn get_cached_size(&self) -> u32 {
5174 self.cached_size.get()
5175 }
5176
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005177 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005178 &self.unknown_fields
5179 }
5180
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005181 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005182 &mut self.unknown_fields
5183 }
5184
5185 fn as_any(&self) -> &dyn (::std::any::Any) {
5186 self as &dyn (::std::any::Any)
5187 }
5188 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
5189 self as &mut dyn (::std::any::Any)
5190 }
Haibo Huang52aa7852020-07-10 20:23:55 -07005191 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005192 self
5193 }
5194
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005195 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005196 Self::descriptor_static()
5197 }
5198
5199 fn new() -> MessageOptions {
5200 MessageOptions::new()
5201 }
5202
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005203 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
5204 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005205 descriptor.get(|| {
5206 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005207 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005208 "message_set_wire_format",
5209 |m: &MessageOptions| { &m.message_set_wire_format },
5210 |m: &mut MessageOptions| { &mut m.message_set_wire_format },
5211 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005212 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005213 "no_standard_descriptor_accessor",
5214 |m: &MessageOptions| { &m.no_standard_descriptor_accessor },
5215 |m: &mut MessageOptions| { &mut m.no_standard_descriptor_accessor },
5216 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005217 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005218 "deprecated",
5219 |m: &MessageOptions| { &m.deprecated },
5220 |m: &mut MessageOptions| { &mut m.deprecated },
5221 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005222 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005223 "map_entry",
5224 |m: &MessageOptions| { &m.map_entry },
5225 |m: &mut MessageOptions| { &mut m.map_entry },
5226 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005227 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005228 "uninterpreted_option",
5229 |m: &MessageOptions| { &m.uninterpreted_option },
5230 |m: &mut MessageOptions| { &mut m.uninterpreted_option },
5231 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005232 crate::reflect::MessageDescriptor::new_pb_name::<MessageOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005233 "MessageOptions",
5234 fields,
5235 file_descriptor_proto()
5236 )
5237 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005238 }
5239
5240 fn default_instance() -> &'static MessageOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005241 static instance: crate::rt::LazyV2<MessageOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005242 instance.get(MessageOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005243 }
5244}
5245
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005246impl crate::Clear for MessageOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005247 fn clear(&mut self) {
5248 self.message_set_wire_format = ::std::option::Option::None;
5249 self.no_standard_descriptor_accessor = ::std::option::Option::None;
5250 self.deprecated = ::std::option::Option::None;
5251 self.map_entry = ::std::option::Option::None;
5252 self.uninterpreted_option.clear();
5253 self.unknown_fields.clear();
5254 }
5255}
5256
5257impl ::std::fmt::Debug for MessageOptions {
5258 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005259 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005260 }
5261}
5262
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005263impl crate::reflect::ProtobufValue for MessageOptions {
5264 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
5265 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005266 }
5267}
5268
5269#[derive(PartialEq,Clone,Default)]
5270#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
5271pub struct FieldOptions {
5272 // message fields
5273 ctype: ::std::option::Option<FieldOptions_CType>,
5274 packed: ::std::option::Option<bool>,
5275 jstype: ::std::option::Option<FieldOptions_JSType>,
5276 lazy: ::std::option::Option<bool>,
5277 deprecated: ::std::option::Option<bool>,
5278 weak: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005279 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005280 // special fields
5281 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005282 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005283 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005284 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005285}
5286
5287impl<'a> ::std::default::Default for &'a FieldOptions {
5288 fn default() -> &'a FieldOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005289 <FieldOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005290 }
5291}
5292
5293impl FieldOptions {
5294 pub fn new() -> FieldOptions {
5295 ::std::default::Default::default()
5296 }
5297
5298 // optional .google.protobuf.FieldOptions.CType ctype = 1;
5299
5300
5301 pub fn get_ctype(&self) -> FieldOptions_CType {
5302 self.ctype.unwrap_or(FieldOptions_CType::STRING)
5303 }
5304 pub fn clear_ctype(&mut self) {
5305 self.ctype = ::std::option::Option::None;
5306 }
5307
5308 pub fn has_ctype(&self) -> bool {
5309 self.ctype.is_some()
5310 }
5311
5312 // Param is passed by value, moved
5313 pub fn set_ctype(&mut self, v: FieldOptions_CType) {
5314 self.ctype = ::std::option::Option::Some(v);
5315 }
5316
5317 // optional bool packed = 2;
5318
5319
5320 pub fn get_packed(&self) -> bool {
5321 self.packed.unwrap_or(false)
5322 }
5323 pub fn clear_packed(&mut self) {
5324 self.packed = ::std::option::Option::None;
5325 }
5326
5327 pub fn has_packed(&self) -> bool {
5328 self.packed.is_some()
5329 }
5330
5331 // Param is passed by value, moved
5332 pub fn set_packed(&mut self, v: bool) {
5333 self.packed = ::std::option::Option::Some(v);
5334 }
5335
5336 // optional .google.protobuf.FieldOptions.JSType jstype = 6;
5337
5338
5339 pub fn get_jstype(&self) -> FieldOptions_JSType {
5340 self.jstype.unwrap_or(FieldOptions_JSType::JS_NORMAL)
5341 }
5342 pub fn clear_jstype(&mut self) {
5343 self.jstype = ::std::option::Option::None;
5344 }
5345
5346 pub fn has_jstype(&self) -> bool {
5347 self.jstype.is_some()
5348 }
5349
5350 // Param is passed by value, moved
5351 pub fn set_jstype(&mut self, v: FieldOptions_JSType) {
5352 self.jstype = ::std::option::Option::Some(v);
5353 }
5354
5355 // optional bool lazy = 5;
5356
5357
5358 pub fn get_lazy(&self) -> bool {
5359 self.lazy.unwrap_or(false)
5360 }
5361 pub fn clear_lazy(&mut self) {
5362 self.lazy = ::std::option::Option::None;
5363 }
5364
5365 pub fn has_lazy(&self) -> bool {
5366 self.lazy.is_some()
5367 }
5368
5369 // Param is passed by value, moved
5370 pub fn set_lazy(&mut self, v: bool) {
5371 self.lazy = ::std::option::Option::Some(v);
5372 }
5373
5374 // optional bool deprecated = 3;
5375
5376
5377 pub fn get_deprecated(&self) -> bool {
5378 self.deprecated.unwrap_or(false)
5379 }
5380 pub fn clear_deprecated(&mut self) {
5381 self.deprecated = ::std::option::Option::None;
5382 }
5383
5384 pub fn has_deprecated(&self) -> bool {
5385 self.deprecated.is_some()
5386 }
5387
5388 // Param is passed by value, moved
5389 pub fn set_deprecated(&mut self, v: bool) {
5390 self.deprecated = ::std::option::Option::Some(v);
5391 }
5392
5393 // optional bool weak = 10;
5394
5395
5396 pub fn get_weak(&self) -> bool {
5397 self.weak.unwrap_or(false)
5398 }
5399 pub fn clear_weak(&mut self) {
5400 self.weak = ::std::option::Option::None;
5401 }
5402
5403 pub fn has_weak(&self) -> bool {
5404 self.weak.is_some()
5405 }
5406
5407 // Param is passed by value, moved
5408 pub fn set_weak(&mut self, v: bool) {
5409 self.weak = ::std::option::Option::Some(v);
5410 }
5411
5412 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5413
5414
5415 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
5416 &self.uninterpreted_option
5417 }
5418 pub fn clear_uninterpreted_option(&mut self) {
5419 self.uninterpreted_option.clear();
5420 }
5421
5422 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005423 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005424 self.uninterpreted_option = v;
5425 }
5426
5427 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005428 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005429 &mut self.uninterpreted_option
5430 }
5431
5432 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005433 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
5434 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005435 }
5436}
5437
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005438impl crate::Message for FieldOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005439 fn is_initialized(&self) -> bool {
5440 for v in &self.uninterpreted_option {
5441 if !v.is_initialized() {
5442 return false;
5443 }
5444 };
5445 true
5446 }
5447
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005448 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005449 while !is.eof()? {
5450 let (field_number, wire_type) = is.read_tag_unpack()?;
5451 match field_number {
5452 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005453 crate::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.ctype, 1, &mut self.unknown_fields)?
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005454 },
5455 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005456 if wire_type != crate::wire_format::WireTypeVarint {
5457 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005458 }
5459 let tmp = is.read_bool()?;
5460 self.packed = ::std::option::Option::Some(tmp);
5461 },
5462 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005463 crate::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.jstype, 6, &mut self.unknown_fields)?
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005464 },
5465 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005466 if wire_type != crate::wire_format::WireTypeVarint {
5467 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005468 }
5469 let tmp = is.read_bool()?;
5470 self.lazy = ::std::option::Option::Some(tmp);
5471 },
5472 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005473 if wire_type != crate::wire_format::WireTypeVarint {
5474 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005475 }
5476 let tmp = is.read_bool()?;
5477 self.deprecated = ::std::option::Option::Some(tmp);
5478 },
5479 10 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005480 if wire_type != crate::wire_format::WireTypeVarint {
5481 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005482 }
5483 let tmp = is.read_bool()?;
5484 self.weak = ::std::option::Option::Some(tmp);
5485 },
5486 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005487 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005488 },
5489 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005490 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005491 },
5492 };
5493 }
5494 ::std::result::Result::Ok(())
5495 }
5496
5497 // Compute sizes of nested messages
5498 #[allow(unused_variables)]
5499 fn compute_size(&self) -> u32 {
5500 let mut my_size = 0;
5501 if let Some(v) = self.ctype {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005502 my_size += crate::rt::enum_size(1, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005503 }
5504 if let Some(v) = self.packed {
5505 my_size += 2;
5506 }
5507 if let Some(v) = self.jstype {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005508 my_size += crate::rt::enum_size(6, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005509 }
5510 if let Some(v) = self.lazy {
5511 my_size += 2;
5512 }
5513 if let Some(v) = self.deprecated {
5514 my_size += 2;
5515 }
5516 if let Some(v) = self.weak {
5517 my_size += 2;
5518 }
5519 for value in &self.uninterpreted_option {
5520 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005521 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005522 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005523 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005524 self.cached_size.set(my_size);
5525 my_size
5526 }
5527
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005528 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005529 if let Some(v) = self.ctype {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005530 os.write_enum(1, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005531 }
5532 if let Some(v) = self.packed {
5533 os.write_bool(2, v)?;
5534 }
5535 if let Some(v) = self.jstype {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005536 os.write_enum(6, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005537 }
5538 if let Some(v) = self.lazy {
5539 os.write_bool(5, v)?;
5540 }
5541 if let Some(v) = self.deprecated {
5542 os.write_bool(3, v)?;
5543 }
5544 if let Some(v) = self.weak {
5545 os.write_bool(10, v)?;
5546 }
5547 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005548 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005549 os.write_raw_varint32(v.get_cached_size())?;
5550 v.write_to_with_cached_sizes(os)?;
5551 };
5552 os.write_unknown_fields(self.get_unknown_fields())?;
5553 ::std::result::Result::Ok(())
5554 }
5555
5556 fn get_cached_size(&self) -> u32 {
5557 self.cached_size.get()
5558 }
5559
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005560 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005561 &self.unknown_fields
5562 }
5563
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005564 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005565 &mut self.unknown_fields
5566 }
5567
5568 fn as_any(&self) -> &dyn (::std::any::Any) {
5569 self as &dyn (::std::any::Any)
5570 }
5571 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
5572 self as &mut dyn (::std::any::Any)
5573 }
Haibo Huang52aa7852020-07-10 20:23:55 -07005574 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005575 self
5576 }
5577
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005578 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005579 Self::descriptor_static()
5580 }
5581
5582 fn new() -> FieldOptions {
5583 FieldOptions::new()
5584 }
5585
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005586 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
5587 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005588 descriptor.get(|| {
5589 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005590 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FieldOptions_CType>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005591 "ctype",
5592 |m: &FieldOptions| { &m.ctype },
5593 |m: &mut FieldOptions| { &mut m.ctype },
5594 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005595 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005596 "packed",
5597 |m: &FieldOptions| { &m.packed },
5598 |m: &mut FieldOptions| { &mut m.packed },
5599 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005600 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FieldOptions_JSType>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005601 "jstype",
5602 |m: &FieldOptions| { &m.jstype },
5603 |m: &mut FieldOptions| { &mut m.jstype },
5604 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005605 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005606 "lazy",
5607 |m: &FieldOptions| { &m.lazy },
5608 |m: &mut FieldOptions| { &mut m.lazy },
5609 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005610 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005611 "deprecated",
5612 |m: &FieldOptions| { &m.deprecated },
5613 |m: &mut FieldOptions| { &mut m.deprecated },
5614 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005615 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005616 "weak",
5617 |m: &FieldOptions| { &m.weak },
5618 |m: &mut FieldOptions| { &mut m.weak },
5619 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005620 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005621 "uninterpreted_option",
5622 |m: &FieldOptions| { &m.uninterpreted_option },
5623 |m: &mut FieldOptions| { &mut m.uninterpreted_option },
5624 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005625 crate::reflect::MessageDescriptor::new_pb_name::<FieldOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005626 "FieldOptions",
5627 fields,
5628 file_descriptor_proto()
5629 )
5630 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005631 }
5632
5633 fn default_instance() -> &'static FieldOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005634 static instance: crate::rt::LazyV2<FieldOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005635 instance.get(FieldOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005636 }
5637}
5638
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005639impl crate::Clear for FieldOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005640 fn clear(&mut self) {
5641 self.ctype = ::std::option::Option::None;
5642 self.packed = ::std::option::Option::None;
5643 self.jstype = ::std::option::Option::None;
5644 self.lazy = ::std::option::Option::None;
5645 self.deprecated = ::std::option::Option::None;
5646 self.weak = ::std::option::Option::None;
5647 self.uninterpreted_option.clear();
5648 self.unknown_fields.clear();
5649 }
5650}
5651
5652impl ::std::fmt::Debug for FieldOptions {
5653 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005654 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005655 }
5656}
5657
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005658impl crate::reflect::ProtobufValue for FieldOptions {
5659 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
5660 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005661 }
5662}
5663
5664#[derive(Clone,PartialEq,Eq,Debug,Hash)]
5665#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
5666pub enum FieldOptions_CType {
5667 STRING = 0,
5668 CORD = 1,
5669 STRING_PIECE = 2,
5670}
5671
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005672impl crate::ProtobufEnum for FieldOptions_CType {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005673 fn value(&self) -> i32 {
5674 *self as i32
5675 }
5676
5677 fn from_i32(value: i32) -> ::std::option::Option<FieldOptions_CType> {
5678 match value {
5679 0 => ::std::option::Option::Some(FieldOptions_CType::STRING),
5680 1 => ::std::option::Option::Some(FieldOptions_CType::CORD),
5681 2 => ::std::option::Option::Some(FieldOptions_CType::STRING_PIECE),
5682 _ => ::std::option::Option::None
5683 }
5684 }
5685
5686 fn values() -> &'static [Self] {
5687 static values: &'static [FieldOptions_CType] = &[
5688 FieldOptions_CType::STRING,
5689 FieldOptions_CType::CORD,
5690 FieldOptions_CType::STRING_PIECE,
5691 ];
5692 values
5693 }
5694
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005695 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
5696 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005697 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005698 crate::reflect::EnumDescriptor::new_pb_name::<FieldOptions_CType>("FieldOptions.CType", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07005699 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005700 }
5701}
5702
5703impl ::std::marker::Copy for FieldOptions_CType {
5704}
5705
5706impl ::std::default::Default for FieldOptions_CType {
5707 fn default() -> Self {
5708 FieldOptions_CType::STRING
5709 }
5710}
5711
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005712impl crate::reflect::ProtobufValue for FieldOptions_CType {
5713 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
5714 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005715 }
5716}
5717
5718#[derive(Clone,PartialEq,Eq,Debug,Hash)]
5719#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
5720pub enum FieldOptions_JSType {
5721 JS_NORMAL = 0,
5722 JS_STRING = 1,
5723 JS_NUMBER = 2,
5724}
5725
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005726impl crate::ProtobufEnum for FieldOptions_JSType {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005727 fn value(&self) -> i32 {
5728 *self as i32
5729 }
5730
5731 fn from_i32(value: i32) -> ::std::option::Option<FieldOptions_JSType> {
5732 match value {
5733 0 => ::std::option::Option::Some(FieldOptions_JSType::JS_NORMAL),
5734 1 => ::std::option::Option::Some(FieldOptions_JSType::JS_STRING),
5735 2 => ::std::option::Option::Some(FieldOptions_JSType::JS_NUMBER),
5736 _ => ::std::option::Option::None
5737 }
5738 }
5739
5740 fn values() -> &'static [Self] {
5741 static values: &'static [FieldOptions_JSType] = &[
5742 FieldOptions_JSType::JS_NORMAL,
5743 FieldOptions_JSType::JS_STRING,
5744 FieldOptions_JSType::JS_NUMBER,
5745 ];
5746 values
5747 }
5748
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005749 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
5750 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005751 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005752 crate::reflect::EnumDescriptor::new_pb_name::<FieldOptions_JSType>("FieldOptions.JSType", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07005753 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005754 }
5755}
5756
5757impl ::std::marker::Copy for FieldOptions_JSType {
5758}
5759
5760impl ::std::default::Default for FieldOptions_JSType {
5761 fn default() -> Self {
5762 FieldOptions_JSType::JS_NORMAL
5763 }
5764}
5765
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005766impl crate::reflect::ProtobufValue for FieldOptions_JSType {
5767 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
5768 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005769 }
5770}
5771
5772#[derive(PartialEq,Clone,Default)]
5773#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
5774pub struct OneofOptions {
5775 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005776 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005777 // special fields
5778 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005779 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005780 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005781 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005782}
5783
5784impl<'a> ::std::default::Default for &'a OneofOptions {
5785 fn default() -> &'a OneofOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005786 <OneofOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005787 }
5788}
5789
5790impl OneofOptions {
5791 pub fn new() -> OneofOptions {
5792 ::std::default::Default::default()
5793 }
5794
5795 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5796
5797
5798 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
5799 &self.uninterpreted_option
5800 }
5801 pub fn clear_uninterpreted_option(&mut self) {
5802 self.uninterpreted_option.clear();
5803 }
5804
5805 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005806 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005807 self.uninterpreted_option = v;
5808 }
5809
5810 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005811 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005812 &mut self.uninterpreted_option
5813 }
5814
5815 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005816 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
5817 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005818 }
5819}
5820
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005821impl crate::Message for OneofOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005822 fn is_initialized(&self) -> bool {
5823 for v in &self.uninterpreted_option {
5824 if !v.is_initialized() {
5825 return false;
5826 }
5827 };
5828 true
5829 }
5830
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005831 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005832 while !is.eof()? {
5833 let (field_number, wire_type) = is.read_tag_unpack()?;
5834 match field_number {
5835 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005836 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005837 },
5838 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005839 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005840 },
5841 };
5842 }
5843 ::std::result::Result::Ok(())
5844 }
5845
5846 // Compute sizes of nested messages
5847 #[allow(unused_variables)]
5848 fn compute_size(&self) -> u32 {
5849 let mut my_size = 0;
5850 for value in &self.uninterpreted_option {
5851 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005852 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005853 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005854 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005855 self.cached_size.set(my_size);
5856 my_size
5857 }
5858
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005859 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005860 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005861 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005862 os.write_raw_varint32(v.get_cached_size())?;
5863 v.write_to_with_cached_sizes(os)?;
5864 };
5865 os.write_unknown_fields(self.get_unknown_fields())?;
5866 ::std::result::Result::Ok(())
5867 }
5868
5869 fn get_cached_size(&self) -> u32 {
5870 self.cached_size.get()
5871 }
5872
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005873 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005874 &self.unknown_fields
5875 }
5876
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005877 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005878 &mut self.unknown_fields
5879 }
5880
5881 fn as_any(&self) -> &dyn (::std::any::Any) {
5882 self as &dyn (::std::any::Any)
5883 }
5884 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
5885 self as &mut dyn (::std::any::Any)
5886 }
Haibo Huang52aa7852020-07-10 20:23:55 -07005887 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005888 self
5889 }
5890
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005891 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005892 Self::descriptor_static()
5893 }
5894
5895 fn new() -> OneofOptions {
5896 OneofOptions::new()
5897 }
5898
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005899 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
5900 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005901 descriptor.get(|| {
5902 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005903 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005904 "uninterpreted_option",
5905 |m: &OneofOptions| { &m.uninterpreted_option },
5906 |m: &mut OneofOptions| { &mut m.uninterpreted_option },
5907 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005908 crate::reflect::MessageDescriptor::new_pb_name::<OneofOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005909 "OneofOptions",
5910 fields,
5911 file_descriptor_proto()
5912 )
5913 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005914 }
5915
5916 fn default_instance() -> &'static OneofOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005917 static instance: crate::rt::LazyV2<OneofOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005918 instance.get(OneofOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005919 }
5920}
5921
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005922impl crate::Clear for OneofOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005923 fn clear(&mut self) {
5924 self.uninterpreted_option.clear();
5925 self.unknown_fields.clear();
5926 }
5927}
5928
5929impl ::std::fmt::Debug for OneofOptions {
5930 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005931 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005932 }
5933}
5934
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005935impl crate::reflect::ProtobufValue for OneofOptions {
5936 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
5937 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005938 }
5939}
5940
5941#[derive(PartialEq,Clone,Default)]
5942#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
5943pub struct EnumOptions {
5944 // message fields
5945 allow_alias: ::std::option::Option<bool>,
5946 deprecated: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005947 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005948 // special fields
5949 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005950 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005951 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005952 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005953}
5954
5955impl<'a> ::std::default::Default for &'a EnumOptions {
5956 fn default() -> &'a EnumOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005957 <EnumOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005958 }
5959}
5960
5961impl EnumOptions {
5962 pub fn new() -> EnumOptions {
5963 ::std::default::Default::default()
5964 }
5965
5966 // optional bool allow_alias = 2;
5967
5968
5969 pub fn get_allow_alias(&self) -> bool {
5970 self.allow_alias.unwrap_or(false)
5971 }
5972 pub fn clear_allow_alias(&mut self) {
5973 self.allow_alias = ::std::option::Option::None;
5974 }
5975
5976 pub fn has_allow_alias(&self) -> bool {
5977 self.allow_alias.is_some()
5978 }
5979
5980 // Param is passed by value, moved
5981 pub fn set_allow_alias(&mut self, v: bool) {
5982 self.allow_alias = ::std::option::Option::Some(v);
5983 }
5984
5985 // optional bool deprecated = 3;
5986
5987
5988 pub fn get_deprecated(&self) -> bool {
5989 self.deprecated.unwrap_or(false)
5990 }
5991 pub fn clear_deprecated(&mut self) {
5992 self.deprecated = ::std::option::Option::None;
5993 }
5994
5995 pub fn has_deprecated(&self) -> bool {
5996 self.deprecated.is_some()
5997 }
5998
5999 // Param is passed by value, moved
6000 pub fn set_deprecated(&mut self, v: bool) {
6001 self.deprecated = ::std::option::Option::Some(v);
6002 }
6003
6004 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6005
6006
6007 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
6008 &self.uninterpreted_option
6009 }
6010 pub fn clear_uninterpreted_option(&mut self) {
6011 self.uninterpreted_option.clear();
6012 }
6013
6014 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006015 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006016 self.uninterpreted_option = v;
6017 }
6018
6019 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006020 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006021 &mut self.uninterpreted_option
6022 }
6023
6024 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006025 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
6026 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006027 }
6028}
6029
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006030impl crate::Message for EnumOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006031 fn is_initialized(&self) -> bool {
6032 for v in &self.uninterpreted_option {
6033 if !v.is_initialized() {
6034 return false;
6035 }
6036 };
6037 true
6038 }
6039
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006040 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006041 while !is.eof()? {
6042 let (field_number, wire_type) = is.read_tag_unpack()?;
6043 match field_number {
6044 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006045 if wire_type != crate::wire_format::WireTypeVarint {
6046 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006047 }
6048 let tmp = is.read_bool()?;
6049 self.allow_alias = ::std::option::Option::Some(tmp);
6050 },
6051 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006052 if wire_type != crate::wire_format::WireTypeVarint {
6053 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006054 }
6055 let tmp = is.read_bool()?;
6056 self.deprecated = ::std::option::Option::Some(tmp);
6057 },
6058 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006059 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006060 },
6061 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006062 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006063 },
6064 };
6065 }
6066 ::std::result::Result::Ok(())
6067 }
6068
6069 // Compute sizes of nested messages
6070 #[allow(unused_variables)]
6071 fn compute_size(&self) -> u32 {
6072 let mut my_size = 0;
6073 if let Some(v) = self.allow_alias {
6074 my_size += 2;
6075 }
6076 if let Some(v) = self.deprecated {
6077 my_size += 2;
6078 }
6079 for value in &self.uninterpreted_option {
6080 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006081 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006082 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006083 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006084 self.cached_size.set(my_size);
6085 my_size
6086 }
6087
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006088 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006089 if let Some(v) = self.allow_alias {
6090 os.write_bool(2, v)?;
6091 }
6092 if let Some(v) = self.deprecated {
6093 os.write_bool(3, v)?;
6094 }
6095 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006096 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006097 os.write_raw_varint32(v.get_cached_size())?;
6098 v.write_to_with_cached_sizes(os)?;
6099 };
6100 os.write_unknown_fields(self.get_unknown_fields())?;
6101 ::std::result::Result::Ok(())
6102 }
6103
6104 fn get_cached_size(&self) -> u32 {
6105 self.cached_size.get()
6106 }
6107
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006108 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006109 &self.unknown_fields
6110 }
6111
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006112 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006113 &mut self.unknown_fields
6114 }
6115
6116 fn as_any(&self) -> &dyn (::std::any::Any) {
6117 self as &dyn (::std::any::Any)
6118 }
6119 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6120 self as &mut dyn (::std::any::Any)
6121 }
Haibo Huang52aa7852020-07-10 20:23:55 -07006122 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006123 self
6124 }
6125
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006126 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006127 Self::descriptor_static()
6128 }
6129
6130 fn new() -> EnumOptions {
6131 EnumOptions::new()
6132 }
6133
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006134 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
6135 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006136 descriptor.get(|| {
6137 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006138 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006139 "allow_alias",
6140 |m: &EnumOptions| { &m.allow_alias },
6141 |m: &mut EnumOptions| { &mut m.allow_alias },
6142 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006143 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006144 "deprecated",
6145 |m: &EnumOptions| { &m.deprecated },
6146 |m: &mut EnumOptions| { &mut m.deprecated },
6147 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006148 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006149 "uninterpreted_option",
6150 |m: &EnumOptions| { &m.uninterpreted_option },
6151 |m: &mut EnumOptions| { &mut m.uninterpreted_option },
6152 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006153 crate::reflect::MessageDescriptor::new_pb_name::<EnumOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006154 "EnumOptions",
6155 fields,
6156 file_descriptor_proto()
6157 )
6158 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006159 }
6160
6161 fn default_instance() -> &'static EnumOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006162 static instance: crate::rt::LazyV2<EnumOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006163 instance.get(EnumOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006164 }
6165}
6166
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006167impl crate::Clear for EnumOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006168 fn clear(&mut self) {
6169 self.allow_alias = ::std::option::Option::None;
6170 self.deprecated = ::std::option::Option::None;
6171 self.uninterpreted_option.clear();
6172 self.unknown_fields.clear();
6173 }
6174}
6175
6176impl ::std::fmt::Debug for EnumOptions {
6177 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006178 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006179 }
6180}
6181
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006182impl crate::reflect::ProtobufValue for EnumOptions {
6183 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6184 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006185 }
6186}
6187
6188#[derive(PartialEq,Clone,Default)]
6189#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
6190pub struct EnumValueOptions {
6191 // message fields
6192 deprecated: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006193 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006194 // special fields
6195 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006196 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006197 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006198 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006199}
6200
6201impl<'a> ::std::default::Default for &'a EnumValueOptions {
6202 fn default() -> &'a EnumValueOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006203 <EnumValueOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006204 }
6205}
6206
6207impl EnumValueOptions {
6208 pub fn new() -> EnumValueOptions {
6209 ::std::default::Default::default()
6210 }
6211
6212 // optional bool deprecated = 1;
6213
6214
6215 pub fn get_deprecated(&self) -> bool {
6216 self.deprecated.unwrap_or(false)
6217 }
6218 pub fn clear_deprecated(&mut self) {
6219 self.deprecated = ::std::option::Option::None;
6220 }
6221
6222 pub fn has_deprecated(&self) -> bool {
6223 self.deprecated.is_some()
6224 }
6225
6226 // Param is passed by value, moved
6227 pub fn set_deprecated(&mut self, v: bool) {
6228 self.deprecated = ::std::option::Option::Some(v);
6229 }
6230
6231 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6232
6233
6234 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
6235 &self.uninterpreted_option
6236 }
6237 pub fn clear_uninterpreted_option(&mut self) {
6238 self.uninterpreted_option.clear();
6239 }
6240
6241 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006242 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006243 self.uninterpreted_option = v;
6244 }
6245
6246 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006247 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006248 &mut self.uninterpreted_option
6249 }
6250
6251 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006252 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
6253 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006254 }
6255}
6256
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006257impl crate::Message for EnumValueOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006258 fn is_initialized(&self) -> bool {
6259 for v in &self.uninterpreted_option {
6260 if !v.is_initialized() {
6261 return false;
6262 }
6263 };
6264 true
6265 }
6266
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006267 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006268 while !is.eof()? {
6269 let (field_number, wire_type) = is.read_tag_unpack()?;
6270 match field_number {
6271 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006272 if wire_type != crate::wire_format::WireTypeVarint {
6273 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006274 }
6275 let tmp = is.read_bool()?;
6276 self.deprecated = ::std::option::Option::Some(tmp);
6277 },
6278 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006279 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006280 },
6281 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006282 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006283 },
6284 };
6285 }
6286 ::std::result::Result::Ok(())
6287 }
6288
6289 // Compute sizes of nested messages
6290 #[allow(unused_variables)]
6291 fn compute_size(&self) -> u32 {
6292 let mut my_size = 0;
6293 if let Some(v) = self.deprecated {
6294 my_size += 2;
6295 }
6296 for value in &self.uninterpreted_option {
6297 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006298 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006299 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006300 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006301 self.cached_size.set(my_size);
6302 my_size
6303 }
6304
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006305 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006306 if let Some(v) = self.deprecated {
6307 os.write_bool(1, v)?;
6308 }
6309 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006310 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006311 os.write_raw_varint32(v.get_cached_size())?;
6312 v.write_to_with_cached_sizes(os)?;
6313 };
6314 os.write_unknown_fields(self.get_unknown_fields())?;
6315 ::std::result::Result::Ok(())
6316 }
6317
6318 fn get_cached_size(&self) -> u32 {
6319 self.cached_size.get()
6320 }
6321
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006322 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006323 &self.unknown_fields
6324 }
6325
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006326 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006327 &mut self.unknown_fields
6328 }
6329
6330 fn as_any(&self) -> &dyn (::std::any::Any) {
6331 self as &dyn (::std::any::Any)
6332 }
6333 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6334 self as &mut dyn (::std::any::Any)
6335 }
Haibo Huang52aa7852020-07-10 20:23:55 -07006336 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006337 self
6338 }
6339
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006340 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006341 Self::descriptor_static()
6342 }
6343
6344 fn new() -> EnumValueOptions {
6345 EnumValueOptions::new()
6346 }
6347
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006348 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
6349 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006350 descriptor.get(|| {
6351 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006352 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006353 "deprecated",
6354 |m: &EnumValueOptions| { &m.deprecated },
6355 |m: &mut EnumValueOptions| { &mut m.deprecated },
6356 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006357 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006358 "uninterpreted_option",
6359 |m: &EnumValueOptions| { &m.uninterpreted_option },
6360 |m: &mut EnumValueOptions| { &mut m.uninterpreted_option },
6361 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006362 crate::reflect::MessageDescriptor::new_pb_name::<EnumValueOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006363 "EnumValueOptions",
6364 fields,
6365 file_descriptor_proto()
6366 )
6367 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006368 }
6369
6370 fn default_instance() -> &'static EnumValueOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006371 static instance: crate::rt::LazyV2<EnumValueOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006372 instance.get(EnumValueOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006373 }
6374}
6375
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006376impl crate::Clear for EnumValueOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006377 fn clear(&mut self) {
6378 self.deprecated = ::std::option::Option::None;
6379 self.uninterpreted_option.clear();
6380 self.unknown_fields.clear();
6381 }
6382}
6383
6384impl ::std::fmt::Debug for EnumValueOptions {
6385 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006386 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006387 }
6388}
6389
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006390impl crate::reflect::ProtobufValue for EnumValueOptions {
6391 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6392 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006393 }
6394}
6395
6396#[derive(PartialEq,Clone,Default)]
6397#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
6398pub struct ServiceOptions {
6399 // message fields
6400 deprecated: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006401 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006402 // special fields
6403 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006404 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006405 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006406 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006407}
6408
6409impl<'a> ::std::default::Default for &'a ServiceOptions {
6410 fn default() -> &'a ServiceOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006411 <ServiceOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006412 }
6413}
6414
6415impl ServiceOptions {
6416 pub fn new() -> ServiceOptions {
6417 ::std::default::Default::default()
6418 }
6419
6420 // optional bool deprecated = 33;
6421
6422
6423 pub fn get_deprecated(&self) -> bool {
6424 self.deprecated.unwrap_or(false)
6425 }
6426 pub fn clear_deprecated(&mut self) {
6427 self.deprecated = ::std::option::Option::None;
6428 }
6429
6430 pub fn has_deprecated(&self) -> bool {
6431 self.deprecated.is_some()
6432 }
6433
6434 // Param is passed by value, moved
6435 pub fn set_deprecated(&mut self, v: bool) {
6436 self.deprecated = ::std::option::Option::Some(v);
6437 }
6438
6439 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6440
6441
6442 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
6443 &self.uninterpreted_option
6444 }
6445 pub fn clear_uninterpreted_option(&mut self) {
6446 self.uninterpreted_option.clear();
6447 }
6448
6449 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006450 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006451 self.uninterpreted_option = v;
6452 }
6453
6454 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006455 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006456 &mut self.uninterpreted_option
6457 }
6458
6459 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006460 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
6461 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006462 }
6463}
6464
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006465impl crate::Message for ServiceOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006466 fn is_initialized(&self) -> bool {
6467 for v in &self.uninterpreted_option {
6468 if !v.is_initialized() {
6469 return false;
6470 }
6471 };
6472 true
6473 }
6474
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006475 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006476 while !is.eof()? {
6477 let (field_number, wire_type) = is.read_tag_unpack()?;
6478 match field_number {
6479 33 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006480 if wire_type != crate::wire_format::WireTypeVarint {
6481 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006482 }
6483 let tmp = is.read_bool()?;
6484 self.deprecated = ::std::option::Option::Some(tmp);
6485 },
6486 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006487 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006488 },
6489 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006490 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006491 },
6492 };
6493 }
6494 ::std::result::Result::Ok(())
6495 }
6496
6497 // Compute sizes of nested messages
6498 #[allow(unused_variables)]
6499 fn compute_size(&self) -> u32 {
6500 let mut my_size = 0;
6501 if let Some(v) = self.deprecated {
6502 my_size += 3;
6503 }
6504 for value in &self.uninterpreted_option {
6505 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006506 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006507 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006508 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006509 self.cached_size.set(my_size);
6510 my_size
6511 }
6512
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006513 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006514 if let Some(v) = self.deprecated {
6515 os.write_bool(33, v)?;
6516 }
6517 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006518 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006519 os.write_raw_varint32(v.get_cached_size())?;
6520 v.write_to_with_cached_sizes(os)?;
6521 };
6522 os.write_unknown_fields(self.get_unknown_fields())?;
6523 ::std::result::Result::Ok(())
6524 }
6525
6526 fn get_cached_size(&self) -> u32 {
6527 self.cached_size.get()
6528 }
6529
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006530 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006531 &self.unknown_fields
6532 }
6533
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006534 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006535 &mut self.unknown_fields
6536 }
6537
6538 fn as_any(&self) -> &dyn (::std::any::Any) {
6539 self as &dyn (::std::any::Any)
6540 }
6541 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6542 self as &mut dyn (::std::any::Any)
6543 }
Haibo Huang52aa7852020-07-10 20:23:55 -07006544 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006545 self
6546 }
6547
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006548 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006549 Self::descriptor_static()
6550 }
6551
6552 fn new() -> ServiceOptions {
6553 ServiceOptions::new()
6554 }
6555
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006556 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
6557 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006558 descriptor.get(|| {
6559 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006560 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006561 "deprecated",
6562 |m: &ServiceOptions| { &m.deprecated },
6563 |m: &mut ServiceOptions| { &mut m.deprecated },
6564 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006565 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006566 "uninterpreted_option",
6567 |m: &ServiceOptions| { &m.uninterpreted_option },
6568 |m: &mut ServiceOptions| { &mut m.uninterpreted_option },
6569 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006570 crate::reflect::MessageDescriptor::new_pb_name::<ServiceOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006571 "ServiceOptions",
6572 fields,
6573 file_descriptor_proto()
6574 )
6575 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006576 }
6577
6578 fn default_instance() -> &'static ServiceOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006579 static instance: crate::rt::LazyV2<ServiceOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006580 instance.get(ServiceOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006581 }
6582}
6583
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006584impl crate::Clear for ServiceOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006585 fn clear(&mut self) {
6586 self.deprecated = ::std::option::Option::None;
6587 self.uninterpreted_option.clear();
6588 self.unknown_fields.clear();
6589 }
6590}
6591
6592impl ::std::fmt::Debug for ServiceOptions {
6593 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006594 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006595 }
6596}
6597
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006598impl crate::reflect::ProtobufValue for ServiceOptions {
6599 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6600 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006601 }
6602}
6603
6604#[derive(PartialEq,Clone,Default)]
6605#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
6606pub struct MethodOptions {
6607 // message fields
6608 deprecated: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006609 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006610 // special fields
6611 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006612 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006613 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006614 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006615}
6616
6617impl<'a> ::std::default::Default for &'a MethodOptions {
6618 fn default() -> &'a MethodOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006619 <MethodOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006620 }
6621}
6622
6623impl MethodOptions {
6624 pub fn new() -> MethodOptions {
6625 ::std::default::Default::default()
6626 }
6627
6628 // optional bool deprecated = 33;
6629
6630
6631 pub fn get_deprecated(&self) -> bool {
6632 self.deprecated.unwrap_or(false)
6633 }
6634 pub fn clear_deprecated(&mut self) {
6635 self.deprecated = ::std::option::Option::None;
6636 }
6637
6638 pub fn has_deprecated(&self) -> bool {
6639 self.deprecated.is_some()
6640 }
6641
6642 // Param is passed by value, moved
6643 pub fn set_deprecated(&mut self, v: bool) {
6644 self.deprecated = ::std::option::Option::Some(v);
6645 }
6646
6647 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6648
6649
6650 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
6651 &self.uninterpreted_option
6652 }
6653 pub fn clear_uninterpreted_option(&mut self) {
6654 self.uninterpreted_option.clear();
6655 }
6656
6657 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006658 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006659 self.uninterpreted_option = v;
6660 }
6661
6662 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006663 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006664 &mut self.uninterpreted_option
6665 }
6666
6667 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006668 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
6669 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006670 }
6671}
6672
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006673impl crate::Message for MethodOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006674 fn is_initialized(&self) -> bool {
6675 for v in &self.uninterpreted_option {
6676 if !v.is_initialized() {
6677 return false;
6678 }
6679 };
6680 true
6681 }
6682
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006683 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006684 while !is.eof()? {
6685 let (field_number, wire_type) = is.read_tag_unpack()?;
6686 match field_number {
6687 33 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006688 if wire_type != crate::wire_format::WireTypeVarint {
6689 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006690 }
6691 let tmp = is.read_bool()?;
6692 self.deprecated = ::std::option::Option::Some(tmp);
6693 },
6694 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006695 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006696 },
6697 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006698 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006699 },
6700 };
6701 }
6702 ::std::result::Result::Ok(())
6703 }
6704
6705 // Compute sizes of nested messages
6706 #[allow(unused_variables)]
6707 fn compute_size(&self) -> u32 {
6708 let mut my_size = 0;
6709 if let Some(v) = self.deprecated {
6710 my_size += 3;
6711 }
6712 for value in &self.uninterpreted_option {
6713 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006714 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006715 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006716 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006717 self.cached_size.set(my_size);
6718 my_size
6719 }
6720
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006721 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006722 if let Some(v) = self.deprecated {
6723 os.write_bool(33, v)?;
6724 }
6725 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006726 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006727 os.write_raw_varint32(v.get_cached_size())?;
6728 v.write_to_with_cached_sizes(os)?;
6729 };
6730 os.write_unknown_fields(self.get_unknown_fields())?;
6731 ::std::result::Result::Ok(())
6732 }
6733
6734 fn get_cached_size(&self) -> u32 {
6735 self.cached_size.get()
6736 }
6737
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006738 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006739 &self.unknown_fields
6740 }
6741
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006742 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006743 &mut self.unknown_fields
6744 }
6745
6746 fn as_any(&self) -> &dyn (::std::any::Any) {
6747 self as &dyn (::std::any::Any)
6748 }
6749 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6750 self as &mut dyn (::std::any::Any)
6751 }
Haibo Huang52aa7852020-07-10 20:23:55 -07006752 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006753 self
6754 }
6755
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006756 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006757 Self::descriptor_static()
6758 }
6759
6760 fn new() -> MethodOptions {
6761 MethodOptions::new()
6762 }
6763
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006764 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
6765 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006766 descriptor.get(|| {
6767 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006768 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006769 "deprecated",
6770 |m: &MethodOptions| { &m.deprecated },
6771 |m: &mut MethodOptions| { &mut m.deprecated },
6772 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006773 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006774 "uninterpreted_option",
6775 |m: &MethodOptions| { &m.uninterpreted_option },
6776 |m: &mut MethodOptions| { &mut m.uninterpreted_option },
6777 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006778 crate::reflect::MessageDescriptor::new_pb_name::<MethodOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006779 "MethodOptions",
6780 fields,
6781 file_descriptor_proto()
6782 )
6783 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006784 }
6785
6786 fn default_instance() -> &'static MethodOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006787 static instance: crate::rt::LazyV2<MethodOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006788 instance.get(MethodOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006789 }
6790}
6791
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006792impl crate::Clear for MethodOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006793 fn clear(&mut self) {
6794 self.deprecated = ::std::option::Option::None;
6795 self.uninterpreted_option.clear();
6796 self.unknown_fields.clear();
6797 }
6798}
6799
6800impl ::std::fmt::Debug for MethodOptions {
6801 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006802 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006803 }
6804}
6805
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006806impl crate::reflect::ProtobufValue for MethodOptions {
6807 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6808 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006809 }
6810}
6811
6812#[derive(PartialEq,Clone,Default)]
6813#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
6814pub struct UninterpretedOption {
6815 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006816 pub name: crate::RepeatedField<UninterpretedOption_NamePart>,
6817 identifier_value: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006818 positive_int_value: ::std::option::Option<u64>,
6819 negative_int_value: ::std::option::Option<i64>,
6820 double_value: ::std::option::Option<f64>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006821 string_value: crate::SingularField<::std::vec::Vec<u8>>,
6822 aggregate_value: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006823 // special fields
6824 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006825 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006826 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006827 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006828}
6829
6830impl<'a> ::std::default::Default for &'a UninterpretedOption {
6831 fn default() -> &'a UninterpretedOption {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006832 <UninterpretedOption as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006833 }
6834}
6835
6836impl UninterpretedOption {
6837 pub fn new() -> UninterpretedOption {
6838 ::std::default::Default::default()
6839 }
6840
6841 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
6842
6843
6844 pub fn get_name(&self) -> &[UninterpretedOption_NamePart] {
6845 &self.name
6846 }
6847 pub fn clear_name(&mut self) {
6848 self.name.clear();
6849 }
6850
6851 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006852 pub fn set_name(&mut self, v: crate::RepeatedField<UninterpretedOption_NamePart>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006853 self.name = v;
6854 }
6855
6856 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006857 pub fn mut_name(&mut self) -> &mut crate::RepeatedField<UninterpretedOption_NamePart> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006858 &mut self.name
6859 }
6860
6861 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006862 pub fn take_name(&mut self) -> crate::RepeatedField<UninterpretedOption_NamePart> {
6863 ::std::mem::replace(&mut self.name, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006864 }
6865
6866 // optional string identifier_value = 3;
6867
6868
6869 pub fn get_identifier_value(&self) -> &str {
6870 match self.identifier_value.as_ref() {
6871 Some(v) => &v,
6872 None => "",
6873 }
6874 }
6875 pub fn clear_identifier_value(&mut self) {
6876 self.identifier_value.clear();
6877 }
6878
6879 pub fn has_identifier_value(&self) -> bool {
6880 self.identifier_value.is_some()
6881 }
6882
6883 // Param is passed by value, moved
6884 pub fn set_identifier_value(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006885 self.identifier_value = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006886 }
6887
6888 // Mutable pointer to the field.
6889 // If field is not initialized, it is initialized with default value first.
6890 pub fn mut_identifier_value(&mut self) -> &mut ::std::string::String {
6891 if self.identifier_value.is_none() {
6892 self.identifier_value.set_default();
6893 }
6894 self.identifier_value.as_mut().unwrap()
6895 }
6896
6897 // Take field
6898 pub fn take_identifier_value(&mut self) -> ::std::string::String {
6899 self.identifier_value.take().unwrap_or_else(|| ::std::string::String::new())
6900 }
6901
6902 // optional uint64 positive_int_value = 4;
6903
6904
6905 pub fn get_positive_int_value(&self) -> u64 {
6906 self.positive_int_value.unwrap_or(0)
6907 }
6908 pub fn clear_positive_int_value(&mut self) {
6909 self.positive_int_value = ::std::option::Option::None;
6910 }
6911
6912 pub fn has_positive_int_value(&self) -> bool {
6913 self.positive_int_value.is_some()
6914 }
6915
6916 // Param is passed by value, moved
6917 pub fn set_positive_int_value(&mut self, v: u64) {
6918 self.positive_int_value = ::std::option::Option::Some(v);
6919 }
6920
6921 // optional int64 negative_int_value = 5;
6922
6923
6924 pub fn get_negative_int_value(&self) -> i64 {
6925 self.negative_int_value.unwrap_or(0)
6926 }
6927 pub fn clear_negative_int_value(&mut self) {
6928 self.negative_int_value = ::std::option::Option::None;
6929 }
6930
6931 pub fn has_negative_int_value(&self) -> bool {
6932 self.negative_int_value.is_some()
6933 }
6934
6935 // Param is passed by value, moved
6936 pub fn set_negative_int_value(&mut self, v: i64) {
6937 self.negative_int_value = ::std::option::Option::Some(v);
6938 }
6939
6940 // optional double double_value = 6;
6941
6942
6943 pub fn get_double_value(&self) -> f64 {
6944 self.double_value.unwrap_or(0.)
6945 }
6946 pub fn clear_double_value(&mut self) {
6947 self.double_value = ::std::option::Option::None;
6948 }
6949
6950 pub fn has_double_value(&self) -> bool {
6951 self.double_value.is_some()
6952 }
6953
6954 // Param is passed by value, moved
6955 pub fn set_double_value(&mut self, v: f64) {
6956 self.double_value = ::std::option::Option::Some(v);
6957 }
6958
6959 // optional bytes string_value = 7;
6960
6961
6962 pub fn get_string_value(&self) -> &[u8] {
6963 match self.string_value.as_ref() {
6964 Some(v) => &v,
6965 None => &[],
6966 }
6967 }
6968 pub fn clear_string_value(&mut self) {
6969 self.string_value.clear();
6970 }
6971
6972 pub fn has_string_value(&self) -> bool {
6973 self.string_value.is_some()
6974 }
6975
6976 // Param is passed by value, moved
6977 pub fn set_string_value(&mut self, v: ::std::vec::Vec<u8>) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006978 self.string_value = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006979 }
6980
6981 // Mutable pointer to the field.
6982 // If field is not initialized, it is initialized with default value first.
6983 pub fn mut_string_value(&mut self) -> &mut ::std::vec::Vec<u8> {
6984 if self.string_value.is_none() {
6985 self.string_value.set_default();
6986 }
6987 self.string_value.as_mut().unwrap()
6988 }
6989
6990 // Take field
6991 pub fn take_string_value(&mut self) -> ::std::vec::Vec<u8> {
6992 self.string_value.take().unwrap_or_else(|| ::std::vec::Vec::new())
6993 }
6994
6995 // optional string aggregate_value = 8;
6996
6997
6998 pub fn get_aggregate_value(&self) -> &str {
6999 match self.aggregate_value.as_ref() {
7000 Some(v) => &v,
7001 None => "",
7002 }
7003 }
7004 pub fn clear_aggregate_value(&mut self) {
7005 self.aggregate_value.clear();
7006 }
7007
7008 pub fn has_aggregate_value(&self) -> bool {
7009 self.aggregate_value.is_some()
7010 }
7011
7012 // Param is passed by value, moved
7013 pub fn set_aggregate_value(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007014 self.aggregate_value = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007015 }
7016
7017 // Mutable pointer to the field.
7018 // If field is not initialized, it is initialized with default value first.
7019 pub fn mut_aggregate_value(&mut self) -> &mut ::std::string::String {
7020 if self.aggregate_value.is_none() {
7021 self.aggregate_value.set_default();
7022 }
7023 self.aggregate_value.as_mut().unwrap()
7024 }
7025
7026 // Take field
7027 pub fn take_aggregate_value(&mut self) -> ::std::string::String {
7028 self.aggregate_value.take().unwrap_or_else(|| ::std::string::String::new())
7029 }
7030}
7031
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007032impl crate::Message for UninterpretedOption {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007033 fn is_initialized(&self) -> bool {
7034 for v in &self.name {
7035 if !v.is_initialized() {
7036 return false;
7037 }
7038 };
7039 true
7040 }
7041
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007042 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007043 while !is.eof()? {
7044 let (field_number, wire_type) = is.read_tag_unpack()?;
7045 match field_number {
7046 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007047 crate::rt::read_repeated_message_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007048 },
7049 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007050 crate::rt::read_singular_string_into(wire_type, is, &mut self.identifier_value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007051 },
7052 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007053 if wire_type != crate::wire_format::WireTypeVarint {
7054 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007055 }
7056 let tmp = is.read_uint64()?;
7057 self.positive_int_value = ::std::option::Option::Some(tmp);
7058 },
7059 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007060 if wire_type != crate::wire_format::WireTypeVarint {
7061 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007062 }
7063 let tmp = is.read_int64()?;
7064 self.negative_int_value = ::std::option::Option::Some(tmp);
7065 },
7066 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007067 if wire_type != crate::wire_format::WireTypeFixed64 {
7068 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007069 }
7070 let tmp = is.read_double()?;
7071 self.double_value = ::std::option::Option::Some(tmp);
7072 },
7073 7 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007074 crate::rt::read_singular_bytes_into(wire_type, is, &mut self.string_value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007075 },
7076 8 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007077 crate::rt::read_singular_string_into(wire_type, is, &mut self.aggregate_value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007078 },
7079 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007080 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007081 },
7082 };
7083 }
7084 ::std::result::Result::Ok(())
7085 }
7086
7087 // Compute sizes of nested messages
7088 #[allow(unused_variables)]
7089 fn compute_size(&self) -> u32 {
7090 let mut my_size = 0;
7091 for value in &self.name {
7092 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007093 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007094 };
7095 if let Some(ref v) = self.identifier_value.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007096 my_size += crate::rt::string_size(3, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007097 }
7098 if let Some(v) = self.positive_int_value {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007099 my_size += crate::rt::value_size(4, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007100 }
7101 if let Some(v) = self.negative_int_value {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007102 my_size += crate::rt::value_size(5, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007103 }
7104 if let Some(v) = self.double_value {
7105 my_size += 9;
7106 }
7107 if let Some(ref v) = self.string_value.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007108 my_size += crate::rt::bytes_size(7, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007109 }
7110 if let Some(ref v) = self.aggregate_value.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007111 my_size += crate::rt::string_size(8, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007112 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007113 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007114 self.cached_size.set(my_size);
7115 my_size
7116 }
7117
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007118 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007119 for v in &self.name {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007120 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007121 os.write_raw_varint32(v.get_cached_size())?;
7122 v.write_to_with_cached_sizes(os)?;
7123 };
7124 if let Some(ref v) = self.identifier_value.as_ref() {
7125 os.write_string(3, &v)?;
7126 }
7127 if let Some(v) = self.positive_int_value {
7128 os.write_uint64(4, v)?;
7129 }
7130 if let Some(v) = self.negative_int_value {
7131 os.write_int64(5, v)?;
7132 }
7133 if let Some(v) = self.double_value {
7134 os.write_double(6, v)?;
7135 }
7136 if let Some(ref v) = self.string_value.as_ref() {
7137 os.write_bytes(7, &v)?;
7138 }
7139 if let Some(ref v) = self.aggregate_value.as_ref() {
7140 os.write_string(8, &v)?;
7141 }
7142 os.write_unknown_fields(self.get_unknown_fields())?;
7143 ::std::result::Result::Ok(())
7144 }
7145
7146 fn get_cached_size(&self) -> u32 {
7147 self.cached_size.get()
7148 }
7149
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007150 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007151 &self.unknown_fields
7152 }
7153
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007154 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007155 &mut self.unknown_fields
7156 }
7157
7158 fn as_any(&self) -> &dyn (::std::any::Any) {
7159 self as &dyn (::std::any::Any)
7160 }
7161 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
7162 self as &mut dyn (::std::any::Any)
7163 }
Haibo Huang52aa7852020-07-10 20:23:55 -07007164 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007165 self
7166 }
7167
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007168 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007169 Self::descriptor_static()
7170 }
7171
7172 fn new() -> UninterpretedOption {
7173 UninterpretedOption::new()
7174 }
7175
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007176 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
7177 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007178 descriptor.get(|| {
7179 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007180 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption_NamePart>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007181 "name",
7182 |m: &UninterpretedOption| { &m.name },
7183 |m: &mut UninterpretedOption| { &mut m.name },
7184 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007185 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007186 "identifier_value",
7187 |m: &UninterpretedOption| { &m.identifier_value },
7188 |m: &mut UninterpretedOption| { &mut m.identifier_value },
7189 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007190 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeUint64>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007191 "positive_int_value",
7192 |m: &UninterpretedOption| { &m.positive_int_value },
7193 |m: &mut UninterpretedOption| { &mut m.positive_int_value },
7194 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007195 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt64>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007196 "negative_int_value",
7197 |m: &UninterpretedOption| { &m.negative_int_value },
7198 |m: &mut UninterpretedOption| { &mut m.negative_int_value },
7199 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007200 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeDouble>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007201 "double_value",
7202 |m: &UninterpretedOption| { &m.double_value },
7203 |m: &mut UninterpretedOption| { &mut m.double_value },
7204 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007205 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeBytes>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007206 "string_value",
7207 |m: &UninterpretedOption| { &m.string_value },
7208 |m: &mut UninterpretedOption| { &mut m.string_value },
7209 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007210 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007211 "aggregate_value",
7212 |m: &UninterpretedOption| { &m.aggregate_value },
7213 |m: &mut UninterpretedOption| { &mut m.aggregate_value },
7214 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007215 crate::reflect::MessageDescriptor::new_pb_name::<UninterpretedOption>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007216 "UninterpretedOption",
7217 fields,
7218 file_descriptor_proto()
7219 )
7220 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007221 }
7222
7223 fn default_instance() -> &'static UninterpretedOption {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007224 static instance: crate::rt::LazyV2<UninterpretedOption> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007225 instance.get(UninterpretedOption::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007226 }
7227}
7228
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007229impl crate::Clear for UninterpretedOption {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007230 fn clear(&mut self) {
7231 self.name.clear();
7232 self.identifier_value.clear();
7233 self.positive_int_value = ::std::option::Option::None;
7234 self.negative_int_value = ::std::option::Option::None;
7235 self.double_value = ::std::option::Option::None;
7236 self.string_value.clear();
7237 self.aggregate_value.clear();
7238 self.unknown_fields.clear();
7239 }
7240}
7241
7242impl ::std::fmt::Debug for UninterpretedOption {
7243 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007244 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007245 }
7246}
7247
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007248impl crate::reflect::ProtobufValue for UninterpretedOption {
7249 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7250 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007251 }
7252}
7253
7254#[derive(PartialEq,Clone,Default)]
7255#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
7256pub struct UninterpretedOption_NamePart {
7257 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007258 name_part: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007259 is_extension: ::std::option::Option<bool>,
7260 // special fields
7261 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007262 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007263 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007264 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007265}
7266
7267impl<'a> ::std::default::Default for &'a UninterpretedOption_NamePart {
7268 fn default() -> &'a UninterpretedOption_NamePart {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007269 <UninterpretedOption_NamePart as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007270 }
7271}
7272
7273impl UninterpretedOption_NamePart {
7274 pub fn new() -> UninterpretedOption_NamePart {
7275 ::std::default::Default::default()
7276 }
7277
7278 // required string name_part = 1;
7279
7280
7281 pub fn get_name_part(&self) -> &str {
7282 match self.name_part.as_ref() {
7283 Some(v) => &v,
7284 None => "",
7285 }
7286 }
7287 pub fn clear_name_part(&mut self) {
7288 self.name_part.clear();
7289 }
7290
7291 pub fn has_name_part(&self) -> bool {
7292 self.name_part.is_some()
7293 }
7294
7295 // Param is passed by value, moved
7296 pub fn set_name_part(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007297 self.name_part = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007298 }
7299
7300 // Mutable pointer to the field.
7301 // If field is not initialized, it is initialized with default value first.
7302 pub fn mut_name_part(&mut self) -> &mut ::std::string::String {
7303 if self.name_part.is_none() {
7304 self.name_part.set_default();
7305 }
7306 self.name_part.as_mut().unwrap()
7307 }
7308
7309 // Take field
7310 pub fn take_name_part(&mut self) -> ::std::string::String {
7311 self.name_part.take().unwrap_or_else(|| ::std::string::String::new())
7312 }
7313
7314 // required bool is_extension = 2;
7315
7316
7317 pub fn get_is_extension(&self) -> bool {
7318 self.is_extension.unwrap_or(false)
7319 }
7320 pub fn clear_is_extension(&mut self) {
7321 self.is_extension = ::std::option::Option::None;
7322 }
7323
7324 pub fn has_is_extension(&self) -> bool {
7325 self.is_extension.is_some()
7326 }
7327
7328 // Param is passed by value, moved
7329 pub fn set_is_extension(&mut self, v: bool) {
7330 self.is_extension = ::std::option::Option::Some(v);
7331 }
7332}
7333
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007334impl crate::Message for UninterpretedOption_NamePart {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007335 fn is_initialized(&self) -> bool {
7336 if self.name_part.is_none() {
7337 return false;
7338 }
7339 if self.is_extension.is_none() {
7340 return false;
7341 }
7342 true
7343 }
7344
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007345 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007346 while !is.eof()? {
7347 let (field_number, wire_type) = is.read_tag_unpack()?;
7348 match field_number {
7349 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007350 crate::rt::read_singular_string_into(wire_type, is, &mut self.name_part)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007351 },
7352 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007353 if wire_type != crate::wire_format::WireTypeVarint {
7354 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007355 }
7356 let tmp = is.read_bool()?;
7357 self.is_extension = ::std::option::Option::Some(tmp);
7358 },
7359 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007360 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007361 },
7362 };
7363 }
7364 ::std::result::Result::Ok(())
7365 }
7366
7367 // Compute sizes of nested messages
7368 #[allow(unused_variables)]
7369 fn compute_size(&self) -> u32 {
7370 let mut my_size = 0;
7371 if let Some(ref v) = self.name_part.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007372 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007373 }
7374 if let Some(v) = self.is_extension {
7375 my_size += 2;
7376 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007377 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007378 self.cached_size.set(my_size);
7379 my_size
7380 }
7381
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007382 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007383 if let Some(ref v) = self.name_part.as_ref() {
7384 os.write_string(1, &v)?;
7385 }
7386 if let Some(v) = self.is_extension {
7387 os.write_bool(2, v)?;
7388 }
7389 os.write_unknown_fields(self.get_unknown_fields())?;
7390 ::std::result::Result::Ok(())
7391 }
7392
7393 fn get_cached_size(&self) -> u32 {
7394 self.cached_size.get()
7395 }
7396
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007397 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007398 &self.unknown_fields
7399 }
7400
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007401 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007402 &mut self.unknown_fields
7403 }
7404
7405 fn as_any(&self) -> &dyn (::std::any::Any) {
7406 self as &dyn (::std::any::Any)
7407 }
7408 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
7409 self as &mut dyn (::std::any::Any)
7410 }
Haibo Huang52aa7852020-07-10 20:23:55 -07007411 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007412 self
7413 }
7414
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007415 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007416 Self::descriptor_static()
7417 }
7418
7419 fn new() -> UninterpretedOption_NamePart {
7420 UninterpretedOption_NamePart::new()
7421 }
7422
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007423 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
7424 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007425 descriptor.get(|| {
7426 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007427 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007428 "name_part",
7429 |m: &UninterpretedOption_NamePart| { &m.name_part },
7430 |m: &mut UninterpretedOption_NamePart| { &mut m.name_part },
7431 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007432 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007433 "is_extension",
7434 |m: &UninterpretedOption_NamePart| { &m.is_extension },
7435 |m: &mut UninterpretedOption_NamePart| { &mut m.is_extension },
7436 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007437 crate::reflect::MessageDescriptor::new_pb_name::<UninterpretedOption_NamePart>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007438 "UninterpretedOption.NamePart",
7439 fields,
7440 file_descriptor_proto()
7441 )
7442 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007443 }
7444
7445 fn default_instance() -> &'static UninterpretedOption_NamePart {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007446 static instance: crate::rt::LazyV2<UninterpretedOption_NamePart> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007447 instance.get(UninterpretedOption_NamePart::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007448 }
7449}
7450
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007451impl crate::Clear for UninterpretedOption_NamePart {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007452 fn clear(&mut self) {
7453 self.name_part.clear();
7454 self.is_extension = ::std::option::Option::None;
7455 self.unknown_fields.clear();
7456 }
7457}
7458
7459impl ::std::fmt::Debug for UninterpretedOption_NamePart {
7460 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007461 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007462 }
7463}
7464
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007465impl crate::reflect::ProtobufValue for UninterpretedOption_NamePart {
7466 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7467 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007468 }
7469}
7470
7471#[derive(PartialEq,Clone,Default)]
7472#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
7473pub struct SourceCodeInfo {
7474 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007475 pub location: crate::RepeatedField<SourceCodeInfo_Location>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007476 // special fields
7477 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007478 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007479 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007480 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007481}
7482
7483impl<'a> ::std::default::Default for &'a SourceCodeInfo {
7484 fn default() -> &'a SourceCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007485 <SourceCodeInfo as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007486 }
7487}
7488
7489impl SourceCodeInfo {
7490 pub fn new() -> SourceCodeInfo {
7491 ::std::default::Default::default()
7492 }
7493
7494 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
7495
7496
7497 pub fn get_location(&self) -> &[SourceCodeInfo_Location] {
7498 &self.location
7499 }
7500 pub fn clear_location(&mut self) {
7501 self.location.clear();
7502 }
7503
7504 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007505 pub fn set_location(&mut self, v: crate::RepeatedField<SourceCodeInfo_Location>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007506 self.location = v;
7507 }
7508
7509 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007510 pub fn mut_location(&mut self) -> &mut crate::RepeatedField<SourceCodeInfo_Location> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007511 &mut self.location
7512 }
7513
7514 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007515 pub fn take_location(&mut self) -> crate::RepeatedField<SourceCodeInfo_Location> {
7516 ::std::mem::replace(&mut self.location, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007517 }
7518}
7519
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007520impl crate::Message for SourceCodeInfo {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007521 fn is_initialized(&self) -> bool {
7522 for v in &self.location {
7523 if !v.is_initialized() {
7524 return false;
7525 }
7526 };
7527 true
7528 }
7529
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007530 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007531 while !is.eof()? {
7532 let (field_number, wire_type) = is.read_tag_unpack()?;
7533 match field_number {
7534 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007535 crate::rt::read_repeated_message_into(wire_type, is, &mut self.location)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007536 },
7537 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007538 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007539 },
7540 };
7541 }
7542 ::std::result::Result::Ok(())
7543 }
7544
7545 // Compute sizes of nested messages
7546 #[allow(unused_variables)]
7547 fn compute_size(&self) -> u32 {
7548 let mut my_size = 0;
7549 for value in &self.location {
7550 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007551 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007552 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007553 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007554 self.cached_size.set(my_size);
7555 my_size
7556 }
7557
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007558 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007559 for v in &self.location {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007560 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007561 os.write_raw_varint32(v.get_cached_size())?;
7562 v.write_to_with_cached_sizes(os)?;
7563 };
7564 os.write_unknown_fields(self.get_unknown_fields())?;
7565 ::std::result::Result::Ok(())
7566 }
7567
7568 fn get_cached_size(&self) -> u32 {
7569 self.cached_size.get()
7570 }
7571
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007572 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007573 &self.unknown_fields
7574 }
7575
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007576 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007577 &mut self.unknown_fields
7578 }
7579
7580 fn as_any(&self) -> &dyn (::std::any::Any) {
7581 self as &dyn (::std::any::Any)
7582 }
7583 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
7584 self as &mut dyn (::std::any::Any)
7585 }
Haibo Huang52aa7852020-07-10 20:23:55 -07007586 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007587 self
7588 }
7589
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007590 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007591 Self::descriptor_static()
7592 }
7593
7594 fn new() -> SourceCodeInfo {
7595 SourceCodeInfo::new()
7596 }
7597
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007598 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
7599 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007600 descriptor.get(|| {
7601 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007602 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<SourceCodeInfo_Location>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007603 "location",
7604 |m: &SourceCodeInfo| { &m.location },
7605 |m: &mut SourceCodeInfo| { &mut m.location },
7606 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007607 crate::reflect::MessageDescriptor::new_pb_name::<SourceCodeInfo>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007608 "SourceCodeInfo",
7609 fields,
7610 file_descriptor_proto()
7611 )
7612 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007613 }
7614
7615 fn default_instance() -> &'static SourceCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007616 static instance: crate::rt::LazyV2<SourceCodeInfo> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007617 instance.get(SourceCodeInfo::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007618 }
7619}
7620
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007621impl crate::Clear for SourceCodeInfo {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007622 fn clear(&mut self) {
7623 self.location.clear();
7624 self.unknown_fields.clear();
7625 }
7626}
7627
7628impl ::std::fmt::Debug for SourceCodeInfo {
7629 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007630 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007631 }
7632}
7633
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007634impl crate::reflect::ProtobufValue for SourceCodeInfo {
7635 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7636 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007637 }
7638}
7639
7640#[derive(PartialEq,Clone,Default)]
7641#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
7642pub struct SourceCodeInfo_Location {
7643 // message fields
Haibo Huang52aa7852020-07-10 20:23:55 -07007644 pub path: ::std::vec::Vec<i32>,
7645 pub span: ::std::vec::Vec<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007646 leading_comments: crate::SingularField<::std::string::String>,
7647 trailing_comments: crate::SingularField<::std::string::String>,
7648 pub leading_detached_comments: crate::RepeatedField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007649 // special fields
7650 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007651 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007652 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007653 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007654}
7655
7656impl<'a> ::std::default::Default for &'a SourceCodeInfo_Location {
7657 fn default() -> &'a SourceCodeInfo_Location {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007658 <SourceCodeInfo_Location as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007659 }
7660}
7661
7662impl SourceCodeInfo_Location {
7663 pub fn new() -> SourceCodeInfo_Location {
7664 ::std::default::Default::default()
7665 }
7666
7667 // repeated int32 path = 1;
7668
7669
7670 pub fn get_path(&self) -> &[i32] {
7671 &self.path
7672 }
7673 pub fn clear_path(&mut self) {
7674 self.path.clear();
7675 }
7676
7677 // Param is passed by value, moved
7678 pub fn set_path(&mut self, v: ::std::vec::Vec<i32>) {
7679 self.path = v;
7680 }
7681
7682 // Mutable pointer to the field.
7683 pub fn mut_path(&mut self) -> &mut ::std::vec::Vec<i32> {
7684 &mut self.path
7685 }
7686
7687 // Take field
7688 pub fn take_path(&mut self) -> ::std::vec::Vec<i32> {
7689 ::std::mem::replace(&mut self.path, ::std::vec::Vec::new())
7690 }
7691
7692 // repeated int32 span = 2;
7693
7694
7695 pub fn get_span(&self) -> &[i32] {
7696 &self.span
7697 }
7698 pub fn clear_span(&mut self) {
7699 self.span.clear();
7700 }
7701
7702 // Param is passed by value, moved
7703 pub fn set_span(&mut self, v: ::std::vec::Vec<i32>) {
7704 self.span = v;
7705 }
7706
7707 // Mutable pointer to the field.
7708 pub fn mut_span(&mut self) -> &mut ::std::vec::Vec<i32> {
7709 &mut self.span
7710 }
7711
7712 // Take field
7713 pub fn take_span(&mut self) -> ::std::vec::Vec<i32> {
7714 ::std::mem::replace(&mut self.span, ::std::vec::Vec::new())
7715 }
7716
7717 // optional string leading_comments = 3;
7718
7719
7720 pub fn get_leading_comments(&self) -> &str {
7721 match self.leading_comments.as_ref() {
7722 Some(v) => &v,
7723 None => "",
7724 }
7725 }
7726 pub fn clear_leading_comments(&mut self) {
7727 self.leading_comments.clear();
7728 }
7729
7730 pub fn has_leading_comments(&self) -> bool {
7731 self.leading_comments.is_some()
7732 }
7733
7734 // Param is passed by value, moved
7735 pub fn set_leading_comments(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007736 self.leading_comments = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007737 }
7738
7739 // Mutable pointer to the field.
7740 // If field is not initialized, it is initialized with default value first.
7741 pub fn mut_leading_comments(&mut self) -> &mut ::std::string::String {
7742 if self.leading_comments.is_none() {
7743 self.leading_comments.set_default();
7744 }
7745 self.leading_comments.as_mut().unwrap()
7746 }
7747
7748 // Take field
7749 pub fn take_leading_comments(&mut self) -> ::std::string::String {
7750 self.leading_comments.take().unwrap_or_else(|| ::std::string::String::new())
7751 }
7752
7753 // optional string trailing_comments = 4;
7754
7755
7756 pub fn get_trailing_comments(&self) -> &str {
7757 match self.trailing_comments.as_ref() {
7758 Some(v) => &v,
7759 None => "",
7760 }
7761 }
7762 pub fn clear_trailing_comments(&mut self) {
7763 self.trailing_comments.clear();
7764 }
7765
7766 pub fn has_trailing_comments(&self) -> bool {
7767 self.trailing_comments.is_some()
7768 }
7769
7770 // Param is passed by value, moved
7771 pub fn set_trailing_comments(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007772 self.trailing_comments = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007773 }
7774
7775 // Mutable pointer to the field.
7776 // If field is not initialized, it is initialized with default value first.
7777 pub fn mut_trailing_comments(&mut self) -> &mut ::std::string::String {
7778 if self.trailing_comments.is_none() {
7779 self.trailing_comments.set_default();
7780 }
7781 self.trailing_comments.as_mut().unwrap()
7782 }
7783
7784 // Take field
7785 pub fn take_trailing_comments(&mut self) -> ::std::string::String {
7786 self.trailing_comments.take().unwrap_or_else(|| ::std::string::String::new())
7787 }
7788
7789 // repeated string leading_detached_comments = 6;
7790
7791
7792 pub fn get_leading_detached_comments(&self) -> &[::std::string::String] {
7793 &self.leading_detached_comments
7794 }
7795 pub fn clear_leading_detached_comments(&mut self) {
7796 self.leading_detached_comments.clear();
7797 }
7798
7799 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007800 pub fn set_leading_detached_comments(&mut self, v: crate::RepeatedField<::std::string::String>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007801 self.leading_detached_comments = v;
7802 }
7803
7804 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007805 pub fn mut_leading_detached_comments(&mut self) -> &mut crate::RepeatedField<::std::string::String> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007806 &mut self.leading_detached_comments
7807 }
7808
7809 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007810 pub fn take_leading_detached_comments(&mut self) -> crate::RepeatedField<::std::string::String> {
7811 ::std::mem::replace(&mut self.leading_detached_comments, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007812 }
7813}
7814
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007815impl crate::Message for SourceCodeInfo_Location {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007816 fn is_initialized(&self) -> bool {
7817 true
7818 }
7819
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007820 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007821 while !is.eof()? {
7822 let (field_number, wire_type) = is.read_tag_unpack()?;
7823 match field_number {
7824 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007825 crate::rt::read_repeated_int32_into(wire_type, is, &mut self.path)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007826 },
7827 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007828 crate::rt::read_repeated_int32_into(wire_type, is, &mut self.span)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007829 },
7830 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007831 crate::rt::read_singular_string_into(wire_type, is, &mut self.leading_comments)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007832 },
7833 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007834 crate::rt::read_singular_string_into(wire_type, is, &mut self.trailing_comments)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007835 },
7836 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007837 crate::rt::read_repeated_string_into(wire_type, is, &mut self.leading_detached_comments)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007838 },
7839 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007840 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007841 },
7842 };
7843 }
7844 ::std::result::Result::Ok(())
7845 }
7846
7847 // Compute sizes of nested messages
7848 #[allow(unused_variables)]
7849 fn compute_size(&self) -> u32 {
7850 let mut my_size = 0;
7851 if !self.path.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007852 my_size += crate::rt::vec_packed_varint_size(1, &self.path);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007853 }
7854 if !self.span.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007855 my_size += crate::rt::vec_packed_varint_size(2, &self.span);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007856 }
7857 if let Some(ref v) = self.leading_comments.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007858 my_size += crate::rt::string_size(3, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007859 }
7860 if let Some(ref v) = self.trailing_comments.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007861 my_size += crate::rt::string_size(4, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007862 }
7863 for value in &self.leading_detached_comments {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007864 my_size += crate::rt::string_size(6, &value);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007865 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007866 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007867 self.cached_size.set(my_size);
7868 my_size
7869 }
7870
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007871 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007872 if !self.path.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007873 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007874 // TODO: Data size is computed again, it should be cached
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007875 os.write_raw_varint32(crate::rt::vec_packed_varint_data_size(&self.path))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007876 for v in &self.path {
7877 os.write_int32_no_tag(*v)?;
7878 };
7879 }
7880 if !self.span.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007881 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007882 // TODO: Data size is computed again, it should be cached
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007883 os.write_raw_varint32(crate::rt::vec_packed_varint_data_size(&self.span))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007884 for v in &self.span {
7885 os.write_int32_no_tag(*v)?;
7886 };
7887 }
7888 if let Some(ref v) = self.leading_comments.as_ref() {
7889 os.write_string(3, &v)?;
7890 }
7891 if let Some(ref v) = self.trailing_comments.as_ref() {
7892 os.write_string(4, &v)?;
7893 }
7894 for v in &self.leading_detached_comments {
7895 os.write_string(6, &v)?;
7896 };
7897 os.write_unknown_fields(self.get_unknown_fields())?;
7898 ::std::result::Result::Ok(())
7899 }
7900
7901 fn get_cached_size(&self) -> u32 {
7902 self.cached_size.get()
7903 }
7904
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007905 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007906 &self.unknown_fields
7907 }
7908
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007909 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007910 &mut self.unknown_fields
7911 }
7912
7913 fn as_any(&self) -> &dyn (::std::any::Any) {
7914 self as &dyn (::std::any::Any)
7915 }
7916 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
7917 self as &mut dyn (::std::any::Any)
7918 }
Haibo Huang52aa7852020-07-10 20:23:55 -07007919 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007920 self
7921 }
7922
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007923 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007924 Self::descriptor_static()
7925 }
7926
7927 fn new() -> SourceCodeInfo_Location {
7928 SourceCodeInfo_Location::new()
7929 }
7930
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007931 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
7932 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007933 descriptor.get(|| {
7934 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007935 fields.push(crate::reflect::accessor::make_vec_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007936 "path",
7937 |m: &SourceCodeInfo_Location| { &m.path },
7938 |m: &mut SourceCodeInfo_Location| { &mut m.path },
7939 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007940 fields.push(crate::reflect::accessor::make_vec_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007941 "span",
7942 |m: &SourceCodeInfo_Location| { &m.span },
7943 |m: &mut SourceCodeInfo_Location| { &mut m.span },
7944 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007945 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007946 "leading_comments",
7947 |m: &SourceCodeInfo_Location| { &m.leading_comments },
7948 |m: &mut SourceCodeInfo_Location| { &mut m.leading_comments },
7949 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007950 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007951 "trailing_comments",
7952 |m: &SourceCodeInfo_Location| { &m.trailing_comments },
7953 |m: &mut SourceCodeInfo_Location| { &mut m.trailing_comments },
7954 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007955 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007956 "leading_detached_comments",
7957 |m: &SourceCodeInfo_Location| { &m.leading_detached_comments },
7958 |m: &mut SourceCodeInfo_Location| { &mut m.leading_detached_comments },
7959 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007960 crate::reflect::MessageDescriptor::new_pb_name::<SourceCodeInfo_Location>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007961 "SourceCodeInfo.Location",
7962 fields,
7963 file_descriptor_proto()
7964 )
7965 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007966 }
7967
7968 fn default_instance() -> &'static SourceCodeInfo_Location {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007969 static instance: crate::rt::LazyV2<SourceCodeInfo_Location> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007970 instance.get(SourceCodeInfo_Location::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007971 }
7972}
7973
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007974impl crate::Clear for SourceCodeInfo_Location {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007975 fn clear(&mut self) {
7976 self.path.clear();
7977 self.span.clear();
7978 self.leading_comments.clear();
7979 self.trailing_comments.clear();
7980 self.leading_detached_comments.clear();
7981 self.unknown_fields.clear();
7982 }
7983}
7984
7985impl ::std::fmt::Debug for SourceCodeInfo_Location {
7986 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007987 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007988 }
7989}
7990
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007991impl crate::reflect::ProtobufValue for SourceCodeInfo_Location {
7992 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7993 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007994 }
7995}
7996
7997#[derive(PartialEq,Clone,Default)]
7998#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
7999pub struct GeneratedCodeInfo {
8000 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008001 pub annotation: crate::RepeatedField<GeneratedCodeInfo_Annotation>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008002 // special fields
8003 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008004 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008005 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008006 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008007}
8008
8009impl<'a> ::std::default::Default for &'a GeneratedCodeInfo {
8010 fn default() -> &'a GeneratedCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008011 <GeneratedCodeInfo as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008012 }
8013}
8014
8015impl GeneratedCodeInfo {
8016 pub fn new() -> GeneratedCodeInfo {
8017 ::std::default::Default::default()
8018 }
8019
8020 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
8021
8022
8023 pub fn get_annotation(&self) -> &[GeneratedCodeInfo_Annotation] {
8024 &self.annotation
8025 }
8026 pub fn clear_annotation(&mut self) {
8027 self.annotation.clear();
8028 }
8029
8030 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008031 pub fn set_annotation(&mut self, v: crate::RepeatedField<GeneratedCodeInfo_Annotation>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008032 self.annotation = v;
8033 }
8034
8035 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008036 pub fn mut_annotation(&mut self) -> &mut crate::RepeatedField<GeneratedCodeInfo_Annotation> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008037 &mut self.annotation
8038 }
8039
8040 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008041 pub fn take_annotation(&mut self) -> crate::RepeatedField<GeneratedCodeInfo_Annotation> {
8042 ::std::mem::replace(&mut self.annotation, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008043 }
8044}
8045
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008046impl crate::Message for GeneratedCodeInfo {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008047 fn is_initialized(&self) -> bool {
8048 for v in &self.annotation {
8049 if !v.is_initialized() {
8050 return false;
8051 }
8052 };
8053 true
8054 }
8055
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008056 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008057 while !is.eof()? {
8058 let (field_number, wire_type) = is.read_tag_unpack()?;
8059 match field_number {
8060 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008061 crate::rt::read_repeated_message_into(wire_type, is, &mut self.annotation)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008062 },
8063 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008064 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008065 },
8066 };
8067 }
8068 ::std::result::Result::Ok(())
8069 }
8070
8071 // Compute sizes of nested messages
8072 #[allow(unused_variables)]
8073 fn compute_size(&self) -> u32 {
8074 let mut my_size = 0;
8075 for value in &self.annotation {
8076 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008077 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008078 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008079 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008080 self.cached_size.set(my_size);
8081 my_size
8082 }
8083
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008084 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008085 for v in &self.annotation {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008086 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008087 os.write_raw_varint32(v.get_cached_size())?;
8088 v.write_to_with_cached_sizes(os)?;
8089 };
8090 os.write_unknown_fields(self.get_unknown_fields())?;
8091 ::std::result::Result::Ok(())
8092 }
8093
8094 fn get_cached_size(&self) -> u32 {
8095 self.cached_size.get()
8096 }
8097
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008098 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008099 &self.unknown_fields
8100 }
8101
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008102 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008103 &mut self.unknown_fields
8104 }
8105
8106 fn as_any(&self) -> &dyn (::std::any::Any) {
8107 self as &dyn (::std::any::Any)
8108 }
8109 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
8110 self as &mut dyn (::std::any::Any)
8111 }
Haibo Huang52aa7852020-07-10 20:23:55 -07008112 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008113 self
8114 }
8115
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008116 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008117 Self::descriptor_static()
8118 }
8119
8120 fn new() -> GeneratedCodeInfo {
8121 GeneratedCodeInfo::new()
8122 }
8123
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008124 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
8125 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008126 descriptor.get(|| {
8127 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008128 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<GeneratedCodeInfo_Annotation>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008129 "annotation",
8130 |m: &GeneratedCodeInfo| { &m.annotation },
8131 |m: &mut GeneratedCodeInfo| { &mut m.annotation },
8132 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008133 crate::reflect::MessageDescriptor::new_pb_name::<GeneratedCodeInfo>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008134 "GeneratedCodeInfo",
8135 fields,
8136 file_descriptor_proto()
8137 )
8138 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008139 }
8140
8141 fn default_instance() -> &'static GeneratedCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008142 static instance: crate::rt::LazyV2<GeneratedCodeInfo> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008143 instance.get(GeneratedCodeInfo::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008144 }
8145}
8146
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008147impl crate::Clear for GeneratedCodeInfo {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008148 fn clear(&mut self) {
8149 self.annotation.clear();
8150 self.unknown_fields.clear();
8151 }
8152}
8153
8154impl ::std::fmt::Debug for GeneratedCodeInfo {
8155 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008156 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008157 }
8158}
8159
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008160impl crate::reflect::ProtobufValue for GeneratedCodeInfo {
8161 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
8162 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008163 }
8164}
8165
8166#[derive(PartialEq,Clone,Default)]
8167#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
8168pub struct GeneratedCodeInfo_Annotation {
8169 // message fields
Haibo Huang52aa7852020-07-10 20:23:55 -07008170 pub path: ::std::vec::Vec<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008171 source_file: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008172 begin: ::std::option::Option<i32>,
8173 end: ::std::option::Option<i32>,
8174 // special fields
8175 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008176 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008177 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008178 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008179}
8180
8181impl<'a> ::std::default::Default for &'a GeneratedCodeInfo_Annotation {
8182 fn default() -> &'a GeneratedCodeInfo_Annotation {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008183 <GeneratedCodeInfo_Annotation as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008184 }
8185}
8186
8187impl GeneratedCodeInfo_Annotation {
8188 pub fn new() -> GeneratedCodeInfo_Annotation {
8189 ::std::default::Default::default()
8190 }
8191
8192 // repeated int32 path = 1;
8193
8194
8195 pub fn get_path(&self) -> &[i32] {
8196 &self.path
8197 }
8198 pub fn clear_path(&mut self) {
8199 self.path.clear();
8200 }
8201
8202 // Param is passed by value, moved
8203 pub fn set_path(&mut self, v: ::std::vec::Vec<i32>) {
8204 self.path = v;
8205 }
8206
8207 // Mutable pointer to the field.
8208 pub fn mut_path(&mut self) -> &mut ::std::vec::Vec<i32> {
8209 &mut self.path
8210 }
8211
8212 // Take field
8213 pub fn take_path(&mut self) -> ::std::vec::Vec<i32> {
8214 ::std::mem::replace(&mut self.path, ::std::vec::Vec::new())
8215 }
8216
8217 // optional string source_file = 2;
8218
8219
8220 pub fn get_source_file(&self) -> &str {
8221 match self.source_file.as_ref() {
8222 Some(v) => &v,
8223 None => "",
8224 }
8225 }
8226 pub fn clear_source_file(&mut self) {
8227 self.source_file.clear();
8228 }
8229
8230 pub fn has_source_file(&self) -> bool {
8231 self.source_file.is_some()
8232 }
8233
8234 // Param is passed by value, moved
8235 pub fn set_source_file(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008236 self.source_file = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008237 }
8238
8239 // Mutable pointer to the field.
8240 // If field is not initialized, it is initialized with default value first.
8241 pub fn mut_source_file(&mut self) -> &mut ::std::string::String {
8242 if self.source_file.is_none() {
8243 self.source_file.set_default();
8244 }
8245 self.source_file.as_mut().unwrap()
8246 }
8247
8248 // Take field
8249 pub fn take_source_file(&mut self) -> ::std::string::String {
8250 self.source_file.take().unwrap_or_else(|| ::std::string::String::new())
8251 }
8252
8253 // optional int32 begin = 3;
8254
8255
8256 pub fn get_begin(&self) -> i32 {
8257 self.begin.unwrap_or(0)
8258 }
8259 pub fn clear_begin(&mut self) {
8260 self.begin = ::std::option::Option::None;
8261 }
8262
8263 pub fn has_begin(&self) -> bool {
8264 self.begin.is_some()
8265 }
8266
8267 // Param is passed by value, moved
8268 pub fn set_begin(&mut self, v: i32) {
8269 self.begin = ::std::option::Option::Some(v);
8270 }
8271
8272 // optional int32 end = 4;
8273
8274
8275 pub fn get_end(&self) -> i32 {
8276 self.end.unwrap_or(0)
8277 }
8278 pub fn clear_end(&mut self) {
8279 self.end = ::std::option::Option::None;
8280 }
8281
8282 pub fn has_end(&self) -> bool {
8283 self.end.is_some()
8284 }
8285
8286 // Param is passed by value, moved
8287 pub fn set_end(&mut self, v: i32) {
8288 self.end = ::std::option::Option::Some(v);
8289 }
8290}
8291
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008292impl crate::Message for GeneratedCodeInfo_Annotation {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008293 fn is_initialized(&self) -> bool {
8294 true
8295 }
8296
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008297 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008298 while !is.eof()? {
8299 let (field_number, wire_type) = is.read_tag_unpack()?;
8300 match field_number {
8301 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008302 crate::rt::read_repeated_int32_into(wire_type, is, &mut self.path)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008303 },
8304 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008305 crate::rt::read_singular_string_into(wire_type, is, &mut self.source_file)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008306 },
8307 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008308 if wire_type != crate::wire_format::WireTypeVarint {
8309 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008310 }
8311 let tmp = is.read_int32()?;
8312 self.begin = ::std::option::Option::Some(tmp);
8313 },
8314 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008315 if wire_type != crate::wire_format::WireTypeVarint {
8316 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008317 }
8318 let tmp = is.read_int32()?;
8319 self.end = ::std::option::Option::Some(tmp);
8320 },
8321 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008322 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008323 },
8324 };
8325 }
8326 ::std::result::Result::Ok(())
8327 }
8328
8329 // Compute sizes of nested messages
8330 #[allow(unused_variables)]
8331 fn compute_size(&self) -> u32 {
8332 let mut my_size = 0;
8333 if !self.path.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008334 my_size += crate::rt::vec_packed_varint_size(1, &self.path);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008335 }
8336 if let Some(ref v) = self.source_file.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008337 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008338 }
8339 if let Some(v) = self.begin {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008340 my_size += crate::rt::value_size(3, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008341 }
8342 if let Some(v) = self.end {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008343 my_size += crate::rt::value_size(4, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008344 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008345 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008346 self.cached_size.set(my_size);
8347 my_size
8348 }
8349
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008350 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008351 if !self.path.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008352 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008353 // TODO: Data size is computed again, it should be cached
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008354 os.write_raw_varint32(crate::rt::vec_packed_varint_data_size(&self.path))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008355 for v in &self.path {
8356 os.write_int32_no_tag(*v)?;
8357 };
8358 }
8359 if let Some(ref v) = self.source_file.as_ref() {
8360 os.write_string(2, &v)?;
8361 }
8362 if let Some(v) = self.begin {
8363 os.write_int32(3, v)?;
8364 }
8365 if let Some(v) = self.end {
8366 os.write_int32(4, v)?;
8367 }
8368 os.write_unknown_fields(self.get_unknown_fields())?;
8369 ::std::result::Result::Ok(())
8370 }
8371
8372 fn get_cached_size(&self) -> u32 {
8373 self.cached_size.get()
8374 }
8375
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008376 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008377 &self.unknown_fields
8378 }
8379
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008380 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008381 &mut self.unknown_fields
8382 }
8383
8384 fn as_any(&self) -> &dyn (::std::any::Any) {
8385 self as &dyn (::std::any::Any)
8386 }
8387 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
8388 self as &mut dyn (::std::any::Any)
8389 }
Haibo Huang52aa7852020-07-10 20:23:55 -07008390 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008391 self
8392 }
8393
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008394 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008395 Self::descriptor_static()
8396 }
8397
8398 fn new() -> GeneratedCodeInfo_Annotation {
8399 GeneratedCodeInfo_Annotation::new()
8400 }
8401
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008402 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
8403 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008404 descriptor.get(|| {
8405 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008406 fields.push(crate::reflect::accessor::make_vec_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008407 "path",
8408 |m: &GeneratedCodeInfo_Annotation| { &m.path },
8409 |m: &mut GeneratedCodeInfo_Annotation| { &mut m.path },
8410 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008411 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008412 "source_file",
8413 |m: &GeneratedCodeInfo_Annotation| { &m.source_file },
8414 |m: &mut GeneratedCodeInfo_Annotation| { &mut m.source_file },
8415 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008416 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008417 "begin",
8418 |m: &GeneratedCodeInfo_Annotation| { &m.begin },
8419 |m: &mut GeneratedCodeInfo_Annotation| { &mut m.begin },
8420 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008421 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008422 "end",
8423 |m: &GeneratedCodeInfo_Annotation| { &m.end },
8424 |m: &mut GeneratedCodeInfo_Annotation| { &mut m.end },
8425 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008426 crate::reflect::MessageDescriptor::new_pb_name::<GeneratedCodeInfo_Annotation>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008427 "GeneratedCodeInfo.Annotation",
8428 fields,
8429 file_descriptor_proto()
8430 )
8431 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008432 }
8433
8434 fn default_instance() -> &'static GeneratedCodeInfo_Annotation {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008435 static instance: crate::rt::LazyV2<GeneratedCodeInfo_Annotation> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008436 instance.get(GeneratedCodeInfo_Annotation::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008437 }
8438}
8439
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008440impl crate::Clear for GeneratedCodeInfo_Annotation {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008441 fn clear(&mut self) {
8442 self.path.clear();
8443 self.source_file.clear();
8444 self.begin = ::std::option::Option::None;
8445 self.end = ::std::option::Option::None;
8446 self.unknown_fields.clear();
8447 }
8448}
8449
8450impl ::std::fmt::Debug for GeneratedCodeInfo_Annotation {
8451 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008452 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008453 }
8454}
8455
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008456impl crate::reflect::ProtobufValue for GeneratedCodeInfo_Annotation {
8457 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
8458 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008459 }
8460}
8461
8462static file_descriptor_proto_data: &'static [u8] = b"\
8463 \n\x20google/protobuf/descriptor.proto\x12\x0fgoogle.protobuf\"M\n\x11Fi\
8464 leDescriptorSet\x128\n\x04file\x18\x01\x20\x03(\x0b2$.google.protobuf.Fi\
8465 leDescriptorProtoR\x04file\"\xe4\x04\n\x13FileDescriptorProto\x12\x12\n\
8466 \x04name\x18\x01\x20\x01(\tR\x04name\x12\x18\n\x07package\x18\x02\x20\
8467 \x01(\tR\x07package\x12\x1e\n\ndependency\x18\x03\x20\x03(\tR\ndependenc\
8468 y\x12+\n\x11public_dependency\x18\n\x20\x03(\x05R\x10publicDependency\
8469 \x12'\n\x0fweak_dependency\x18\x0b\x20\x03(\x05R\x0eweakDependency\x12C\
8470 \n\x0cmessage_type\x18\x04\x20\x03(\x0b2\x20.google.protobuf.DescriptorP\
8471 rotoR\x0bmessageType\x12A\n\tenum_type\x18\x05\x20\x03(\x0b2$.google.pro\
8472 tobuf.EnumDescriptorProtoR\x08enumType\x12A\n\x07service\x18\x06\x20\x03\
8473 (\x0b2'.google.protobuf.ServiceDescriptorProtoR\x07service\x12C\n\texten\
8474 sion\x18\x07\x20\x03(\x0b2%.google.protobuf.FieldDescriptorProtoR\texten\
8475 sion\x126\n\x07options\x18\x08\x20\x01(\x0b2\x1c.google.protobuf.FileOpt\
8476 ionsR\x07options\x12I\n\x10source_code_info\x18\t\x20\x01(\x0b2\x1f.goog\
8477 le.protobuf.SourceCodeInfoR\x0esourceCodeInfo\x12\x16\n\x06syntax\x18\
8478 \x0c\x20\x01(\tR\x06syntax\"\xf7\x05\n\x0fDescriptorProto\x12\x12\n\x04n\
8479 ame\x18\x01\x20\x01(\tR\x04name\x12;\n\x05field\x18\x02\x20\x03(\x0b2%.g\
8480 oogle.protobuf.FieldDescriptorProtoR\x05field\x12C\n\textension\x18\x06\
8481 \x20\x03(\x0b2%.google.protobuf.FieldDescriptorProtoR\textension\x12A\n\
8482 \x0bnested_type\x18\x03\x20\x03(\x0b2\x20.google.protobuf.DescriptorProt\
8483 oR\nnestedType\x12A\n\tenum_type\x18\x04\x20\x03(\x0b2$.google.protobuf.\
8484 EnumDescriptorProtoR\x08enumType\x12X\n\x0fextension_range\x18\x05\x20\
8485 \x03(\x0b2/.google.protobuf.DescriptorProto.ExtensionRangeR\x0eextension\
8486 Range\x12D\n\noneof_decl\x18\x08\x20\x03(\x0b2%.google.protobuf.OneofDes\
8487 criptorProtoR\toneofDecl\x129\n\x07options\x18\x07\x20\x01(\x0b2\x1f.goo\
8488 gle.protobuf.MessageOptionsR\x07options\x12U\n\x0ereserved_range\x18\t\
8489 \x20\x03(\x0b2..google.protobuf.DescriptorProto.ReservedRangeR\rreserved\
8490 Range\x12#\n\rreserved_name\x18\n\x20\x03(\tR\x0creservedName\x1a8\n\x0e\
8491 ExtensionRange\x12\x14\n\x05start\x18\x01\x20\x01(\x05R\x05start\x12\x10\
8492 \n\x03end\x18\x02\x20\x01(\x05R\x03end\x1a7\n\rReservedRange\x12\x14\n\
8493 \x05start\x18\x01\x20\x01(\x05R\x05start\x12\x10\n\x03end\x18\x02\x20\
8494 \x01(\x05R\x03end\"\x98\x06\n\x14FieldDescriptorProto\x12\x12\n\x04name\
8495 \x18\x01\x20\x01(\tR\x04name\x12\x16\n\x06number\x18\x03\x20\x01(\x05R\
8496 \x06number\x12A\n\x05label\x18\x04\x20\x01(\x0e2+.google.protobuf.FieldD\
8497 escriptorProto.LabelR\x05label\x12>\n\x04type\x18\x05\x20\x01(\x0e2*.goo\
8498 gle.protobuf.FieldDescriptorProto.TypeR\x04type\x12\x1b\n\ttype_name\x18\
8499 \x06\x20\x01(\tR\x08typeName\x12\x1a\n\x08extendee\x18\x02\x20\x01(\tR\
8500 \x08extendee\x12#\n\rdefault_value\x18\x07\x20\x01(\tR\x0cdefaultValue\
8501 \x12\x1f\n\x0boneof_index\x18\t\x20\x01(\x05R\noneofIndex\x12\x1b\n\tjso\
8502 n_name\x18\n\x20\x01(\tR\x08jsonName\x127\n\x07options\x18\x08\x20\x01(\
8503 \x0b2\x1d.google.protobuf.FieldOptionsR\x07options\"\xb6\x02\n\x04Type\
8504 \x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\
8505 \n\nTYPE_INT64\x10\x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_\
8506 INT32\x10\x05\x12\x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED3\
8507 2\x10\x07\x12\r\n\tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\
8508 \x0e\n\nTYPE_GROUP\x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTY\
8509 PE_BYTES\x10\x0c\x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\
8510 \x0e\x12\x11\n\rTYPE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\
8511 \x12\x0f\n\x0bTYPE_SINT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12\"C\n\
8512 \x05Label\x12\x12\n\x0eLABEL_OPTIONAL\x10\x01\x12\x12\n\x0eLABEL_REQUIRE\
8513 D\x10\x02\x12\x12\n\x0eLABEL_REPEATED\x10\x03\"c\n\x14OneofDescriptorPro\
8514 to\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x127\n\x07options\x18\
8515 \x02\x20\x01(\x0b2\x1d.google.protobuf.OneofOptionsR\x07options\"\xa2\
8516 \x01\n\x13EnumDescriptorProto\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04n\
8517 ame\x12?\n\x05value\x18\x02\x20\x03(\x0b2).google.protobuf.EnumValueDesc\
8518 riptorProtoR\x05value\x126\n\x07options\x18\x03\x20\x01(\x0b2\x1c.google\
8519 .protobuf.EnumOptionsR\x07options\"\x83\x01\n\x18EnumValueDescriptorProt\
8520 o\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x16\n\x06number\x18\
8521 \x02\x20\x01(\x05R\x06number\x12;\n\x07options\x18\x03\x20\x01(\x0b2!.go\
8522 ogle.protobuf.EnumValueOptionsR\x07options\"\xa7\x01\n\x16ServiceDescrip\
8523 torProto\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12>\n\x06method\
8524 \x18\x02\x20\x03(\x0b2&.google.protobuf.MethodDescriptorProtoR\x06method\
8525 \x129\n\x07options\x18\x03\x20\x01(\x0b2\x1f.google.protobuf.ServiceOpti\
8526 onsR\x07options\"\x89\x02\n\x15MethodDescriptorProto\x12\x12\n\x04name\
8527 \x18\x01\x20\x01(\tR\x04name\x12\x1d\n\ninput_type\x18\x02\x20\x01(\tR\t\
8528 inputType\x12\x1f\n\x0boutput_type\x18\x03\x20\x01(\tR\noutputType\x128\
8529 \n\x07options\x18\x04\x20\x01(\x0b2\x1e.google.protobuf.MethodOptionsR\
8530 \x07options\x120\n\x10client_streaming\x18\x05\x20\x01(\x08:\x05falseR\
8531 \x0fclientStreaming\x120\n\x10server_streaming\x18\x06\x20\x01(\x08:\x05\
8532 falseR\x0fserverStreaming\"\x88\x07\n\x0bFileOptions\x12!\n\x0cjava_pack\
8533 age\x18\x01\x20\x01(\tR\x0bjavaPackage\x120\n\x14java_outer_classname\
8534 \x18\x08\x20\x01(\tR\x12javaOuterClassname\x125\n\x13java_multiple_files\
8535 \x18\n\x20\x01(\x08:\x05falseR\x11javaMultipleFiles\x12D\n\x1djava_gener\
8536 ate_equals_and_hash\x18\x14\x20\x01(\x08R\x19javaGenerateEqualsAndHashB\
8537 \x02\x18\x01\x12:\n\x16java_string_check_utf8\x18\x1b\x20\x01(\x08:\x05f\
8538 alseR\x13javaStringCheckUtf8\x12S\n\x0coptimize_for\x18\t\x20\x01(\x0e2)\
8539 .google.protobuf.FileOptions.OptimizeMode:\x05SPEEDR\x0boptimizeFor\x12\
8540 \x1d\n\ngo_package\x18\x0b\x20\x01(\tR\tgoPackage\x125\n\x13cc_generic_s\
8541 ervices\x18\x10\x20\x01(\x08:\x05falseR\x11ccGenericServices\x129\n\x15j\
8542 ava_generic_services\x18\x11\x20\x01(\x08:\x05falseR\x13javaGenericServi\
8543 ces\x125\n\x13py_generic_services\x18\x12\x20\x01(\x08:\x05falseR\x11pyG\
8544 enericServices\x12%\n\ndeprecated\x18\x17\x20\x01(\x08:\x05falseR\ndepre\
8545 cated\x12/\n\x10cc_enable_arenas\x18\x1f\x20\x01(\x08:\x05falseR\x0eccEn\
8546 ableArenas\x12*\n\x11objc_class_prefix\x18$\x20\x01(\tR\x0fobjcClassPref\
8547 ix\x12)\n\x10csharp_namespace\x18%\x20\x01(\tR\x0fcsharpNamespace\x12X\n\
8548 \x14uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.Unin\
8549 terpretedOptionR\x13uninterpretedOption\":\n\x0cOptimizeMode\x12\t\n\x05\
8550 SPEED\x10\x01\x12\r\n\tCODE_SIZE\x10\x02\x12\x10\n\x0cLITE_RUNTIME\x10\
8551 \x03*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xc5\x02\n\x0eMessageOption\
8552 s\x12<\n\x17message_set_wire_format\x18\x01\x20\x01(\x08:\x05falseR\x14m\
8553 essageSetWireFormat\x12L\n\x1fno_standard_descriptor_accessor\x18\x02\
8554 \x20\x01(\x08:\x05falseR\x1cnoStandardDescriptorAccessor\x12%\n\ndepreca\
8555 ted\x18\x03\x20\x01(\x08:\x05falseR\ndeprecated\x12\x1b\n\tmap_entry\x18\
8556 \x07\x20\x01(\x08R\x08mapEntry\x12X\n\x14uninterpreted_option\x18\xe7\
8557 \x07\x20\x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterprete\
8558 dOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xdc\x03\n\x0cFieldOptio\
8559 ns\x12A\n\x05ctype\x18\x01\x20\x01(\x0e2#.google.protobuf.FieldOptions.C\
8560 Type:\x06STRINGR\x05ctype\x12\x16\n\x06packed\x18\x02\x20\x01(\x08R\x06p\
8561 acked\x12G\n\x06jstype\x18\x06\x20\x01(\x0e2$.google.protobuf.FieldOptio\
8562 ns.JSType:\tJS_NORMALR\x06jstype\x12\x19\n\x04lazy\x18\x05\x20\x01(\x08:\
8563 \x05falseR\x04lazy\x12%\n\ndeprecated\x18\x03\x20\x01(\x08:\x05falseR\nd\
8564 eprecated\x12\x19\n\x04weak\x18\n\x20\x01(\x08:\x05falseR\x04weak\x12X\n\
8565 \x14uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.Unin\
8566 terpretedOptionR\x13uninterpretedOption\"/\n\x05CType\x12\n\n\x06STRING\
8567 \x10\0\x12\x08\n\x04CORD\x10\x01\x12\x10\n\x0cSTRING_PIECE\x10\x02\"5\n\
8568 \x06JSType\x12\r\n\tJS_NORMAL\x10\0\x12\r\n\tJS_STRING\x10\x01\x12\r\n\t\
8569 JS_NUMBER\x10\x02*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"s\n\x0cOneofOp\
8570 tions\x12X\n\x14uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.p\
8571 rotobuf.UninterpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\
8572 \x80\x80\x80\x80\x02\"\xba\x01\n\x0bEnumOptions\x12\x1f\n\x0ballow_alias\
8573 \x18\x02\x20\x01(\x08R\nallowAlias\x12%\n\ndeprecated\x18\x03\x20\x01(\
8574 \x08:\x05falseR\ndeprecated\x12X\n\x14uninterpreted_option\x18\xe7\x07\
8575 \x20\x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOpt\
8576 ion*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x9e\x01\n\x10EnumValueOptio\
8577 ns\x12%\n\ndeprecated\x18\x01\x20\x01(\x08:\x05falseR\ndeprecated\x12X\n\
8578 \x14uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.Unin\
8579 terpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\
8580 \x80\x02\"\x9c\x01\n\x0eServiceOptions\x12%\n\ndeprecated\x18!\x20\x01(\
8581 \x08:\x05falseR\ndeprecated\x12X\n\x14uninterpreted_option\x18\xe7\x07\
8582 \x20\x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOpt\
8583 ion*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x9b\x01\n\rMethodOptions\
8584 \x12%\n\ndeprecated\x18!\x20\x01(\x08:\x05falseR\ndeprecated\x12X\n\x14u\
8585 ninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.Uninterpr\
8586 etedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\
8587 \x02\"\x9a\x03\n\x13UninterpretedOption\x12A\n\x04name\x18\x02\x20\x03(\
8588 \x0b2-.google.protobuf.UninterpretedOption.NamePartR\x04name\x12)\n\x10i\
8589 dentifier_value\x18\x03\x20\x01(\tR\x0fidentifierValue\x12,\n\x12positiv\
8590 e_int_value\x18\x04\x20\x01(\x04R\x10positiveIntValue\x12,\n\x12negative\
8591 _int_value\x18\x05\x20\x01(\x03R\x10negativeIntValue\x12!\n\x0cdouble_va\
8592 lue\x18\x06\x20\x01(\x01R\x0bdoubleValue\x12!\n\x0cstring_value\x18\x07\
8593 \x20\x01(\x0cR\x0bstringValue\x12'\n\x0faggregate_value\x18\x08\x20\x01(\
8594 \tR\x0eaggregateValue\x1aJ\n\x08NamePart\x12\x1b\n\tname_part\x18\x01\
8595 \x20\x02(\tR\x08namePart\x12!\n\x0cis_extension\x18\x02\x20\x02(\x08R\
8596 \x0bisExtension\"\xa7\x02\n\x0eSourceCodeInfo\x12D\n\x08location\x18\x01\
8597 \x20\x03(\x0b2(.google.protobuf.SourceCodeInfo.LocationR\x08location\x1a\
8598 \xce\x01\n\x08Location\x12\x16\n\x04path\x18\x01\x20\x03(\x05R\x04pathB\
8599 \x02\x10\x01\x12\x16\n\x04span\x18\x02\x20\x03(\x05R\x04spanB\x02\x10\
8600 \x01\x12)\n\x10leading_comments\x18\x03\x20\x01(\tR\x0fleadingComments\
8601 \x12+\n\x11trailing_comments\x18\x04\x20\x01(\tR\x10trailingComments\x12\
8602 :\n\x19leading_detached_comments\x18\x06\x20\x03(\tR\x17leadingDetachedC\
8603 omments\"\xd1\x01\n\x11GeneratedCodeInfo\x12M\n\nannotation\x18\x01\x20\
8604 \x03(\x0b2-.google.protobuf.GeneratedCodeInfo.AnnotationR\nannotation\
8605 \x1am\n\nAnnotation\x12\x16\n\x04path\x18\x01\x20\x03(\x05R\x04pathB\x02\
8606 \x10\x01\x12\x1f\n\x0bsource_file\x18\x02\x20\x01(\tR\nsourceFile\x12\
8607 \x14\n\x05begin\x18\x03\x20\x01(\x05R\x05begin\x12\x10\n\x03end\x18\x04\
8608 \x20\x01(\x05R\x03endBX\n\x13com.google.protobufB\x10DescriptorProtosH\
8609 \x01Z\ndescriptor\xa2\x02\x03GPB\xaa\x02\x1aGoogle.Protobuf.ReflectionJ\
8610 \xb3\x9f\x02\n\x07\x12\x05'\0\xa3\x06\x01\n\xaa\x0f\n\x01\x0c\x12\x03'\0\
8611 \x122\xc1\x0c\x20Protocol\x20Buffers\x20-\x20Google's\x20data\x20interch\
8612 ange\x20format\n\x20Copyright\x202008\x20Google\x20Inc.\x20\x20All\x20ri\
8613 ghts\x20reserved.\n\x20https://developers.google.com/protocol-buffers/\n\
8614 \n\x20Redistribution\x20and\x20use\x20in\x20source\x20and\x20binary\x20f\
8615 orms,\x20with\x20or\x20without\n\x20modification,\x20are\x20permitted\
8616 \x20provided\x20that\x20the\x20following\x20conditions\x20are\n\x20met:\
8617 \n\n\x20\x20\x20\x20\x20*\x20Redistributions\x20of\x20source\x20code\x20\
8618 must\x20retain\x20the\x20above\x20copyright\n\x20notice,\x20this\x20list\
8619 \x20of\x20conditions\x20and\x20the\x20following\x20disclaimer.\n\x20\x20\
8620 \x20\x20\x20*\x20Redistributions\x20in\x20binary\x20form\x20must\x20repr\
8621 oduce\x20the\x20above\n\x20copyright\x20notice,\x20this\x20list\x20of\
8622 \x20conditions\x20and\x20the\x20following\x20disclaimer\n\x20in\x20the\
8623 \x20documentation\x20and/or\x20other\x20materials\x20provided\x20with\
8624 \x20the\n\x20distribution.\n\x20\x20\x20\x20\x20*\x20Neither\x20the\x20n\
8625 ame\x20of\x20Google\x20Inc.\x20nor\x20the\x20names\x20of\x20its\n\x20con\
8626 tributors\x20may\x20be\x20used\x20to\x20endorse\x20or\x20promote\x20prod\
8627 ucts\x20derived\x20from\n\x20this\x20software\x20without\x20specific\x20\
8628 prior\x20written\x20permission.\n\n\x20THIS\x20SOFTWARE\x20IS\x20PROVIDE\
8629 D\x20BY\x20THE\x20COPYRIGHT\x20HOLDERS\x20AND\x20CONTRIBUTORS\n\x20\"AS\
8630 \x20IS\"\x20AND\x20ANY\x20EXPRESS\x20OR\x20IMPLIED\x20WARRANTIES,\x20INC\
8631 LUDING,\x20BUT\x20NOT\n\x20LIMITED\x20TO,\x20THE\x20IMPLIED\x20WARRANTIE\
8632 S\x20OF\x20MERCHANTABILITY\x20AND\x20FITNESS\x20FOR\n\x20A\x20PARTICULAR\
8633 \x20PURPOSE\x20ARE\x20DISCLAIMED.\x20IN\x20NO\x20EVENT\x20SHALL\x20THE\
8634 \x20COPYRIGHT\n\x20OWNER\x20OR\x20CONTRIBUTORS\x20BE\x20LIABLE\x20FOR\
8635 \x20ANY\x20DIRECT,\x20INDIRECT,\x20INCIDENTAL,\n\x20SPECIAL,\x20EXEMPLAR\
8636 Y,\x20OR\x20CONSEQUENTIAL\x20DAMAGES\x20(INCLUDING,\x20BUT\x20NOT\n\x20L\
8637 IMITED\x20TO,\x20PROCUREMENT\x20OF\x20SUBSTITUTE\x20GOODS\x20OR\x20SERVI\
8638 CES;\x20LOSS\x20OF\x20USE,\n\x20DATA,\x20OR\x20PROFITS;\x20OR\x20BUSINES\
8639 S\x20INTERRUPTION)\x20HOWEVER\x20CAUSED\x20AND\x20ON\x20ANY\n\x20THEORY\
8640 \x20OF\x20LIABILITY,\x20WHETHER\x20IN\x20CONTRACT,\x20STRICT\x20LIABILIT\
8641 Y,\x20OR\x20TORT\n\x20(INCLUDING\x20NEGLIGENCE\x20OR\x20OTHERWISE)\x20AR\
8642 ISING\x20IN\x20ANY\x20WAY\x20OUT\x20OF\x20THE\x20USE\n\x20OF\x20THIS\x20\
8643 SOFTWARE,\x20EVEN\x20IF\x20ADVISED\x20OF\x20THE\x20POSSIBILITY\x20OF\x20\
8644 SUCH\x20DAMAGE.\n2\xdb\x02\x20Author:\x20kenton@google.com\x20(Kenton\
8645 \x20Varda)\n\x20\x20Based\x20on\x20original\x20Protocol\x20Buffers\x20de\
8646 sign\x20by\n\x20\x20Sanjay\x20Ghemawat,\x20Jeff\x20Dean,\x20and\x20other\
8647 s.\n\n\x20The\x20messages\x20in\x20this\x20file\x20describe\x20the\x20de\
8648 finitions\x20found\x20in\x20.proto\x20files.\n\x20A\x20valid\x20.proto\
8649 \x20file\x20can\x20be\x20translated\x20directly\x20to\x20a\x20FileDescri\
8650 ptorProto\n\x20without\x20any\x20other\x20information\x20(e.g.\x20withou\
8651 t\x20reading\x20its\x20imports).\n\n\x08\n\x01\x02\x12\x03)\0\x18\n\x08\
8652 \n\x01\x08\x12\x03*\0!\n\t\n\x02\x08\x0b\x12\x03*\0!\n\x08\n\x01\x08\x12\
8653 \x03+\0,\n\t\n\x02\x08\x01\x12\x03+\0,\n\x08\n\x01\x08\x12\x03,\01\n\t\n\
8654 \x02\x08\x08\x12\x03,\01\n\x08\n\x01\x08\x12\x03-\07\n\t\n\x02\x08%\x12\
8655 \x03-\07\n\x08\n\x01\x08\x12\x03.\0!\n\t\n\x02\x08$\x12\x03.\0!\n\x08\n\
8656 \x01\x08\x12\x032\0\x1c\n\x7f\n\x02\x08\t\x12\x032\0\x1c\x1at\x20descrip\
8657 tor.proto\x20must\x20be\x20optimized\x20for\x20speed\x20because\x20refle\
8658 ction-based\n\x20algorithms\x20don't\x20work\x20during\x20bootstrapping.\
8659 \n\nj\n\x02\x04\0\x12\x046\08\x01\x1a^\x20The\x20protocol\x20compiler\
8660 \x20can\x20output\x20a\x20FileDescriptorSet\x20containing\x20the\x20.pro\
8661 to\n\x20files\x20it\x20parses.\n\n\n\n\x03\x04\0\x01\x12\x036\x08\x19\n\
8662 \x0b\n\x04\x04\0\x02\0\x12\x037\x02(\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\
8663 7\x02\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x037\x0b\x1e\n\x0c\n\x05\x04\0\
8664 \x02\0\x01\x12\x037\x1f#\n\x0c\n\x05\x04\0\x02\0\x03\x12\x037&'\n/\n\x02\
8665 \x04\x01\x12\x04;\0X\x01\x1a#\x20Describes\x20a\x20complete\x20.proto\
8666 \x20file.\n\n\n\n\x03\x04\x01\x01\x12\x03;\x08\x1b\n9\n\x04\x04\x01\x02\
8667 \0\x12\x03<\x02\x1b\",\x20file\x20name,\x20relative\x20to\x20root\x20of\
8668 \x20source\x20tree\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03<\x02\n\n\x0c\
8669 \n\x05\x04\x01\x02\0\x05\x12\x03<\x0b\x11\n\x0c\n\x05\x04\x01\x02\0\x01\
8670 \x12\x03<\x12\x16\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03<\x19\x1a\n*\n\
8671 \x04\x04\x01\x02\x01\x12\x03=\x02\x1e\"\x1d\x20e.g.\x20\"foo\",\x20\"foo\
8672 .bar\",\x20etc.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03=\x02\n\n\x0c\n\
8673 \x05\x04\x01\x02\x01\x05\x12\x03=\x0b\x11\n\x0c\n\x05\x04\x01\x02\x01\
8674 \x01\x12\x03=\x12\x19\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03=\x1c\x1d\n\
8675 4\n\x04\x04\x01\x02\x02\x12\x03@\x02!\x1a'\x20Names\x20of\x20files\x20im\
8676 ported\x20by\x20this\x20file.\n\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03@\
8677 \x02\n\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03@\x0b\x11\n\x0c\n\x05\x04\
8678 \x01\x02\x02\x01\x12\x03@\x12\x1c\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\
8679 \x03@\x1f\x20\nQ\n\x04\x04\x01\x02\x03\x12\x03B\x02(\x1aD\x20Indexes\x20\
8680 of\x20the\x20public\x20imported\x20files\x20in\x20the\x20dependency\x20l\
8681 ist\x20above.\n\n\x0c\n\x05\x04\x01\x02\x03\x04\x12\x03B\x02\n\n\x0c\n\
8682 \x05\x04\x01\x02\x03\x05\x12\x03B\x0b\x10\n\x0c\n\x05\x04\x01\x02\x03\
8683 \x01\x12\x03B\x11\"\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03B%'\nz\n\x04\
8684 \x04\x01\x02\x04\x12\x03E\x02&\x1am\x20Indexes\x20of\x20the\x20weak\x20i\
8685 mported\x20files\x20in\x20the\x20dependency\x20list.\n\x20For\x20Google-\
8686 internal\x20migration\x20only.\x20Do\x20not\x20use.\n\n\x0c\n\x05\x04\
8687 \x01\x02\x04\x04\x12\x03E\x02\n\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\x03E\
8688 \x0b\x10\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x03E\x11\x20\n\x0c\n\x05\
8689 \x04\x01\x02\x04\x03\x12\x03E#%\n6\n\x04\x04\x01\x02\x05\x12\x03H\x02,\
8690 \x1a)\x20All\x20top-level\x20definitions\x20in\x20this\x20file.\n\n\x0c\
8691 \n\x05\x04\x01\x02\x05\x04\x12\x03H\x02\n\n\x0c\n\x05\x04\x01\x02\x05\
8692 \x06\x12\x03H\x0b\x1a\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03H\x1b'\n\
8693 \x0c\n\x05\x04\x01\x02\x05\x03\x12\x03H*+\n\x0b\n\x04\x04\x01\x02\x06\
8694 \x12\x03I\x02-\n\x0c\n\x05\x04\x01\x02\x06\x04\x12\x03I\x02\n\n\x0c\n\
8695 \x05\x04\x01\x02\x06\x06\x12\x03I\x0b\x1e\n\x0c\n\x05\x04\x01\x02\x06\
8696 \x01\x12\x03I\x1f(\n\x0c\n\x05\x04\x01\x02\x06\x03\x12\x03I+,\n\x0b\n\
8697 \x04\x04\x01\x02\x07\x12\x03J\x02.\n\x0c\n\x05\x04\x01\x02\x07\x04\x12\
8698 \x03J\x02\n\n\x0c\n\x05\x04\x01\x02\x07\x06\x12\x03J\x0b!\n\x0c\n\x05\
8699 \x04\x01\x02\x07\x01\x12\x03J\")\n\x0c\n\x05\x04\x01\x02\x07\x03\x12\x03\
8700 J,-\n\x0b\n\x04\x04\x01\x02\x08\x12\x03K\x02.\n\x0c\n\x05\x04\x01\x02\
8701 \x08\x04\x12\x03K\x02\n\n\x0c\n\x05\x04\x01\x02\x08\x06\x12\x03K\x0b\x1f\
8702 \n\x0c\n\x05\x04\x01\x02\x08\x01\x12\x03K\x20)\n\x0c\n\x05\x04\x01\x02\
8703 \x08\x03\x12\x03K,-\n\x0b\n\x04\x04\x01\x02\t\x12\x03M\x02#\n\x0c\n\x05\
8704 \x04\x01\x02\t\x04\x12\x03M\x02\n\n\x0c\n\x05\x04\x01\x02\t\x06\x12\x03M\
8705 \x0b\x16\n\x0c\n\x05\x04\x01\x02\t\x01\x12\x03M\x17\x1e\n\x0c\n\x05\x04\
8706 \x01\x02\t\x03\x12\x03M!\"\n\xf4\x01\n\x04\x04\x01\x02\n\x12\x03S\x02/\
8707 \x1a\xe6\x01\x20This\x20field\x20contains\x20optional\x20information\x20\
8708 about\x20the\x20original\x20source\x20code.\n\x20You\x20may\x20safely\
8709 \x20remove\x20this\x20entire\x20field\x20without\x20harming\x20runtime\n\
8710 \x20functionality\x20of\x20the\x20descriptors\x20--\x20the\x20informatio\
8711 n\x20is\x20needed\x20only\x20by\n\x20development\x20tools.\n\n\x0c\n\x05\
8712 \x04\x01\x02\n\x04\x12\x03S\x02\n\n\x0c\n\x05\x04\x01\x02\n\x06\x12\x03S\
8713 \x0b\x19\n\x0c\n\x05\x04\x01\x02\n\x01\x12\x03S\x1a*\n\x0c\n\x05\x04\x01\
8714 \x02\n\x03\x12\x03S-.\n]\n\x04\x04\x01\x02\x0b\x12\x03W\x02\x1e\x1aP\x20\
8715 The\x20syntax\x20of\x20the\x20proto\x20file.\n\x20The\x20supported\x20va\
8716 lues\x20are\x20\"proto2\"\x20and\x20\"proto3\".\n\n\x0c\n\x05\x04\x01\
8717 \x02\x0b\x04\x12\x03W\x02\n\n\x0c\n\x05\x04\x01\x02\x0b\x05\x12\x03W\x0b\
8718 \x11\n\x0c\n\x05\x04\x01\x02\x0b\x01\x12\x03W\x12\x18\n\x0c\n\x05\x04\
8719 \x01\x02\x0b\x03\x12\x03W\x1b\x1d\n'\n\x02\x04\x02\x12\x04[\0y\x01\x1a\
8720 \x1b\x20Describes\x20a\x20message\x20type.\n\n\n\n\x03\x04\x02\x01\x12\
8721 \x03[\x08\x17\n\x0b\n\x04\x04\x02\x02\0\x12\x03\\\x02\x1b\n\x0c\n\x05\
8722 \x04\x02\x02\0\x04\x12\x03\\\x02\n\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\
8723 \\\x0b\x11\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\\\x12\x16\n\x0c\n\x05\
8724 \x04\x02\x02\0\x03\x12\x03\\\x19\x1a\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\
8725 ^\x02*\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03^\x02\n\n\x0c\n\x05\x04\
8726 \x02\x02\x01\x06\x12\x03^\x0b\x1f\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\
8727 \x03^\x20%\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03^()\n\x0b\n\x04\x04\
8728 \x02\x02\x02\x12\x03_\x02.\n\x0c\n\x05\x04\x02\x02\x02\x04\x12\x03_\x02\
8729 \n\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03_\x0b\x1f\n\x0c\n\x05\x04\x02\
8730 \x02\x02\x01\x12\x03_\x20)\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03_,-\n\
8731 \x0b\n\x04\x04\x02\x02\x03\x12\x03a\x02+\n\x0c\n\x05\x04\x02\x02\x03\x04\
8732 \x12\x03a\x02\n\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03a\x0b\x1a\n\x0c\n\
8733 \x05\x04\x02\x02\x03\x01\x12\x03a\x1b&\n\x0c\n\x05\x04\x02\x02\x03\x03\
8734 \x12\x03a)*\n\x0b\n\x04\x04\x02\x02\x04\x12\x03b\x02-\n\x0c\n\x05\x04\
8735 \x02\x02\x04\x04\x12\x03b\x02\n\n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03b\
8736 \x0b\x1e\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03b\x1f(\n\x0c\n\x05\x04\
8737 \x02\x02\x04\x03\x12\x03b+,\n\x0c\n\x04\x04\x02\x03\0\x12\x04d\x02g\x03\
8738 \n\x0c\n\x05\x04\x02\x03\0\x01\x12\x03d\n\x18\n\r\n\x06\x04\x02\x03\0\
8739 \x02\0\x12\x03e\x04\x1d\n\x0e\n\x07\x04\x02\x03\0\x02\0\x04\x12\x03e\x04\
8740 \x0c\n\x0e\n\x07\x04\x02\x03\0\x02\0\x05\x12\x03e\r\x12\n\x0e\n\x07\x04\
8741 \x02\x03\0\x02\0\x01\x12\x03e\x13\x18\n\x0e\n\x07\x04\x02\x03\0\x02\0\
8742 \x03\x12\x03e\x1b\x1c\n\r\n\x06\x04\x02\x03\0\x02\x01\x12\x03f\x04\x1b\n\
8743 \x0e\n\x07\x04\x02\x03\0\x02\x01\x04\x12\x03f\x04\x0c\n\x0e\n\x07\x04\
8744 \x02\x03\0\x02\x01\x05\x12\x03f\r\x12\n\x0e\n\x07\x04\x02\x03\0\x02\x01\
8745 \x01\x12\x03f\x13\x16\n\x0e\n\x07\x04\x02\x03\0\x02\x01\x03\x12\x03f\x19\
8746 \x1a\n\x0b\n\x04\x04\x02\x02\x05\x12\x03h\x02.\n\x0c\n\x05\x04\x02\x02\
8747 \x05\x04\x12\x03h\x02\n\n\x0c\n\x05\x04\x02\x02\x05\x06\x12\x03h\x0b\x19\
8748 \n\x0c\n\x05\x04\x02\x02\x05\x01\x12\x03h\x1a)\n\x0c\n\x05\x04\x02\x02\
8749 \x05\x03\x12\x03h,-\n\x0b\n\x04\x04\x02\x02\x06\x12\x03j\x02/\n\x0c\n\
8750 \x05\x04\x02\x02\x06\x04\x12\x03j\x02\n\n\x0c\n\x05\x04\x02\x02\x06\x06\
8751 \x12\x03j\x0b\x1f\n\x0c\n\x05\x04\x02\x02\x06\x01\x12\x03j\x20*\n\x0c\n\
8752 \x05\x04\x02\x02\x06\x03\x12\x03j-.\n\x0b\n\x04\x04\x02\x02\x07\x12\x03l\
8753 \x02&\n\x0c\n\x05\x04\x02\x02\x07\x04\x12\x03l\x02\n\n\x0c\n\x05\x04\x02\
8754 \x02\x07\x06\x12\x03l\x0b\x19\n\x0c\n\x05\x04\x02\x02\x07\x01\x12\x03l\
8755 \x1a!\n\x0c\n\x05\x04\x02\x02\x07\x03\x12\x03l$%\n\xaa\x01\n\x04\x04\x02\
8756 \x03\x01\x12\x04q\x02t\x03\x1a\x9b\x01\x20Range\x20of\x20reserved\x20tag\
8757 \x20numbers.\x20Reserved\x20tag\x20numbers\x20may\x20not\x20be\x20used\
8758 \x20by\n\x20fields\x20or\x20extension\x20ranges\x20in\x20the\x20same\x20\
8759 message.\x20Reserved\x20ranges\x20may\n\x20not\x20overlap.\n\n\x0c\n\x05\
8760 \x04\x02\x03\x01\x01\x12\x03q\n\x17\n\x1b\n\x06\x04\x02\x03\x01\x02\0\
8761 \x12\x03r\x04\x1d\"\x0c\x20Inclusive.\n\n\x0e\n\x07\x04\x02\x03\x01\x02\
8762 \0\x04\x12\x03r\x04\x0c\n\x0e\n\x07\x04\x02\x03\x01\x02\0\x05\x12\x03r\r\
8763 \x12\n\x0e\n\x07\x04\x02\x03\x01\x02\0\x01\x12\x03r\x13\x18\n\x0e\n\x07\
8764 \x04\x02\x03\x01\x02\0\x03\x12\x03r\x1b\x1c\n\x1b\n\x06\x04\x02\x03\x01\
8765 \x02\x01\x12\x03s\x04\x1b\"\x0c\x20Exclusive.\n\n\x0e\n\x07\x04\x02\x03\
8766 \x01\x02\x01\x04\x12\x03s\x04\x0c\n\x0e\n\x07\x04\x02\x03\x01\x02\x01\
8767 \x05\x12\x03s\r\x12\n\x0e\n\x07\x04\x02\x03\x01\x02\x01\x01\x12\x03s\x13\
8768 \x16\n\x0e\n\x07\x04\x02\x03\x01\x02\x01\x03\x12\x03s\x19\x1a\n\x0b\n\
8769 \x04\x04\x02\x02\x08\x12\x03u\x02,\n\x0c\n\x05\x04\x02\x02\x08\x04\x12\
8770 \x03u\x02\n\n\x0c\n\x05\x04\x02\x02\x08\x06\x12\x03u\x0b\x18\n\x0c\n\x05\
8771 \x04\x02\x02\x08\x01\x12\x03u\x19'\n\x0c\n\x05\x04\x02\x02\x08\x03\x12\
8772 \x03u*+\n\x82\x01\n\x04\x04\x02\x02\t\x12\x03x\x02%\x1au\x20Reserved\x20\
8773 field\x20names,\x20which\x20may\x20not\x20be\x20used\x20by\x20fields\x20\
8774 in\x20the\x20same\x20message.\n\x20A\x20given\x20name\x20may\x20only\x20\
8775 be\x20reserved\x20once.\n\n\x0c\n\x05\x04\x02\x02\t\x04\x12\x03x\x02\n\n\
8776 \x0c\n\x05\x04\x02\x02\t\x05\x12\x03x\x0b\x11\n\x0c\n\x05\x04\x02\x02\t\
8777 \x01\x12\x03x\x12\x1f\n\x0c\n\x05\x04\x02\x02\t\x03\x12\x03x\"$\n2\n\x02\
8778 \x04\x03\x12\x05|\0\xc7\x01\x01\x1a%\x20Describes\x20a\x20field\x20withi\
8779 n\x20a\x20message.\n\n\n\n\x03\x04\x03\x01\x12\x03|\x08\x1c\n\r\n\x04\
8780 \x04\x03\x04\0\x12\x05}\x02\x98\x01\x03\n\x0c\n\x05\x04\x03\x04\0\x01\
8781 \x12\x03}\x07\x0b\nS\n\x06\x04\x03\x04\0\x02\0\x12\x04\x80\x01\x04\x1c\
8782 \x1aC\x200\x20is\x20reserved\x20for\x20errors.\n\x20Order\x20is\x20weird\
8783 \x20for\x20historical\x20reasons.\n\n\x0f\n\x07\x04\x03\x04\0\x02\0\x01\
8784 \x12\x04\x80\x01\x04\x0f\n\x0f\n\x07\x04\x03\x04\0\x02\0\x02\x12\x04\x80\
8785 \x01\x1a\x1b\n\x0e\n\x06\x04\x03\x04\0\x02\x01\x12\x04\x81\x01\x04\x1c\n\
8786 \x0f\n\x07\x04\x03\x04\0\x02\x01\x01\x12\x04\x81\x01\x04\x0e\n\x0f\n\x07\
8787 \x04\x03\x04\0\x02\x01\x02\x12\x04\x81\x01\x1a\x1b\nw\n\x06\x04\x03\x04\
8788 \0\x02\x02\x12\x04\x84\x01\x04\x1c\x1ag\x20Not\x20ZigZag\x20encoded.\x20\
8789 \x20Negative\x20numbers\x20take\x2010\x20bytes.\x20\x20Use\x20TYPE_SINT6\
8790 4\x20if\n\x20negative\x20values\x20are\x20likely.\n\n\x0f\n\x07\x04\x03\
8791 \x04\0\x02\x02\x01\x12\x04\x84\x01\x04\x0e\n\x0f\n\x07\x04\x03\x04\0\x02\
8792 \x02\x02\x12\x04\x84\x01\x1a\x1b\n\x0e\n\x06\x04\x03\x04\0\x02\x03\x12\
8793 \x04\x85\x01\x04\x1c\n\x0f\n\x07\x04\x03\x04\0\x02\x03\x01\x12\x04\x85\
8794 \x01\x04\x0f\n\x0f\n\x07\x04\x03\x04\0\x02\x03\x02\x12\x04\x85\x01\x1a\
8795 \x1b\nw\n\x06\x04\x03\x04\0\x02\x04\x12\x04\x88\x01\x04\x1c\x1ag\x20Not\
8796 \x20ZigZag\x20encoded.\x20\x20Negative\x20numbers\x20take\x2010\x20bytes\
8797 .\x20\x20Use\x20TYPE_SINT32\x20if\n\x20negative\x20values\x20are\x20like\
8798 ly.\n\n\x0f\n\x07\x04\x03\x04\0\x02\x04\x01\x12\x04\x88\x01\x04\x0e\n\
8799 \x0f\n\x07\x04\x03\x04\0\x02\x04\x02\x12\x04\x88\x01\x1a\x1b\n\x0e\n\x06\
8800 \x04\x03\x04\0\x02\x05\x12\x04\x89\x01\x04\x1c\n\x0f\n\x07\x04\x03\x04\0\
8801 \x02\x05\x01\x12\x04\x89\x01\x04\x10\n\x0f\n\x07\x04\x03\x04\0\x02\x05\
8802 \x02\x12\x04\x89\x01\x1a\x1b\n\x0e\n\x06\x04\x03\x04\0\x02\x06\x12\x04\
8803 \x8a\x01\x04\x1c\n\x0f\n\x07\x04\x03\x04\0\x02\x06\x01\x12\x04\x8a\x01\
8804 \x04\x10\n\x0f\n\x07\x04\x03\x04\0\x02\x06\x02\x12\x04\x8a\x01\x1a\x1b\n\
8805 \x0e\n\x06\x04\x03\x04\0\x02\x07\x12\x04\x8b\x01\x04\x1c\n\x0f\n\x07\x04\
8806 \x03\x04\0\x02\x07\x01\x12\x04\x8b\x01\x04\r\n\x0f\n\x07\x04\x03\x04\0\
8807 \x02\x07\x02\x12\x04\x8b\x01\x1a\x1b\n\x0e\n\x06\x04\x03\x04\0\x02\x08\
8808 \x12\x04\x8c\x01\x04\x1c\n\x0f\n\x07\x04\x03\x04\0\x02\x08\x01\x12\x04\
8809 \x8c\x01\x04\x0f\n\x0f\n\x07\x04\x03\x04\0\x02\x08\x02\x12\x04\x8c\x01\
8810 \x1a\x1b\n*\n\x06\x04\x03\x04\0\x02\t\x12\x04\x8d\x01\x04\x1d\"\x1a\x20T\
8811 ag-delimited\x20aggregate.\n\n\x0f\n\x07\x04\x03\x04\0\x02\t\x01\x12\x04\
8812 \x8d\x01\x04\x0e\n\x0f\n\x07\x04\x03\x04\0\x02\t\x02\x12\x04\x8d\x01\x1a\
8813 \x1c\n-\n\x06\x04\x03\x04\0\x02\n\x12\x04\x8e\x01\x04\x1d\"\x1d\x20Lengt\
8814 h-delimited\x20aggregate.\n\n\x0f\n\x07\x04\x03\x04\0\x02\n\x01\x12\x04\
8815 \x8e\x01\x04\x10\n\x0f\n\x07\x04\x03\x04\0\x02\n\x02\x12\x04\x8e\x01\x1a\
8816 \x1c\n#\n\x06\x04\x03\x04\0\x02\x0b\x12\x04\x91\x01\x04\x1d\x1a\x13\x20N\
8817 ew\x20in\x20version\x202.\n\n\x0f\n\x07\x04\x03\x04\0\x02\x0b\x01\x12\
8818 \x04\x91\x01\x04\x0e\n\x0f\n\x07\x04\x03\x04\0\x02\x0b\x02\x12\x04\x91\
8819 \x01\x1a\x1c\n\x0e\n\x06\x04\x03\x04\0\x02\x0c\x12\x04\x92\x01\x04\x1d\n\
8820 \x0f\n\x07\x04\x03\x04\0\x02\x0c\x01\x12\x04\x92\x01\x04\x0f\n\x0f\n\x07\
8821 \x04\x03\x04\0\x02\x0c\x02\x12\x04\x92\x01\x1a\x1c\n\x0e\n\x06\x04\x03\
8822 \x04\0\x02\r\x12\x04\x93\x01\x04\x1d\n\x0f\n\x07\x04\x03\x04\0\x02\r\x01\
8823 \x12\x04\x93\x01\x04\r\n\x0f\n\x07\x04\x03\x04\0\x02\r\x02\x12\x04\x93\
8824 \x01\x1a\x1c\n\x0e\n\x06\x04\x03\x04\0\x02\x0e\x12\x04\x94\x01\x04\x1d\n\
8825 \x0f\n\x07\x04\x03\x04\0\x02\x0e\x01\x12\x04\x94\x01\x04\x11\n\x0f\n\x07\
8826 \x04\x03\x04\0\x02\x0e\x02\x12\x04\x94\x01\x1a\x1c\n\x0e\n\x06\x04\x03\
8827 \x04\0\x02\x0f\x12\x04\x95\x01\x04\x1d\n\x0f\n\x07\x04\x03\x04\0\x02\x0f\
8828 \x01\x12\x04\x95\x01\x04\x11\n\x0f\n\x07\x04\x03\x04\0\x02\x0f\x02\x12\
8829 \x04\x95\x01\x1a\x1c\n'\n\x06\x04\x03\x04\0\x02\x10\x12\x04\x96\x01\x04\
8830 \x1d\"\x17\x20Uses\x20ZigZag\x20encoding.\n\n\x0f\n\x07\x04\x03\x04\0\
8831 \x02\x10\x01\x12\x04\x96\x01\x04\x0f\n\x0f\n\x07\x04\x03\x04\0\x02\x10\
8832 \x02\x12\x04\x96\x01\x1a\x1c\n'\n\x06\x04\x03\x04\0\x02\x11\x12\x04\x97\
8833 \x01\x04\x1d\"\x17\x20Uses\x20ZigZag\x20encoding.\n\n\x0f\n\x07\x04\x03\
8834 \x04\0\x02\x11\x01\x12\x04\x97\x01\x04\x0f\n\x0f\n\x07\x04\x03\x04\0\x02\
8835 \x11\x02\x12\x04\x97\x01\x1a\x1c\n\x0e\n\x04\x04\x03\x04\x01\x12\x06\x9a\
8836 \x01\x02\xa0\x01\x03\n\r\n\x05\x04\x03\x04\x01\x01\x12\x04\x9a\x01\x07\
8837 \x0c\n*\n\x06\x04\x03\x04\x01\x02\0\x12\x04\x9c\x01\x04\x1c\x1a\x1a\x200\
8838 \x20is\x20reserved\x20for\x20errors\n\n\x0f\n\x07\x04\x03\x04\x01\x02\0\
8839 \x01\x12\x04\x9c\x01\x04\x12\n\x0f\n\x07\x04\x03\x04\x01\x02\0\x02\x12\
8840 \x04\x9c\x01\x1a\x1b\n\x0e\n\x06\x04\x03\x04\x01\x02\x01\x12\x04\x9d\x01\
8841 \x04\x1c\n\x0f\n\x07\x04\x03\x04\x01\x02\x01\x01\x12\x04\x9d\x01\x04\x12\
8842 \n\x0f\n\x07\x04\x03\x04\x01\x02\x01\x02\x12\x04\x9d\x01\x1a\x1b\n8\n\
8843 \x06\x04\x03\x04\x01\x02\x02\x12\x04\x9e\x01\x04\x1c\"(\x20TODO(sanjay):\
8844 \x20Should\x20we\x20add\x20LABEL_MAP?\n\n\x0f\n\x07\x04\x03\x04\x01\x02\
8845 \x02\x01\x12\x04\x9e\x01\x04\x12\n\x0f\n\x07\x04\x03\x04\x01\x02\x02\x02\
8846 \x12\x04\x9e\x01\x1a\x1b\n\x0c\n\x04\x04\x03\x02\0\x12\x04\xa2\x01\x02\
8847 \x1b\n\r\n\x05\x04\x03\x02\0\x04\x12\x04\xa2\x01\x02\n\n\r\n\x05\x04\x03\
8848 \x02\0\x05\x12\x04\xa2\x01\x0b\x11\n\r\n\x05\x04\x03\x02\0\x01\x12\x04\
8849 \xa2\x01\x12\x16\n\r\n\x05\x04\x03\x02\0\x03\x12\x04\xa2\x01\x19\x1a\n\
8850 \x0c\n\x04\x04\x03\x02\x01\x12\x04\xa3\x01\x02\x1c\n\r\n\x05\x04\x03\x02\
8851 \x01\x04\x12\x04\xa3\x01\x02\n\n\r\n\x05\x04\x03\x02\x01\x05\x12\x04\xa3\
8852 \x01\x0b\x10\n\r\n\x05\x04\x03\x02\x01\x01\x12\x04\xa3\x01\x11\x17\n\r\n\
8853 \x05\x04\x03\x02\x01\x03\x12\x04\xa3\x01\x1a\x1b\n\x0c\n\x04\x04\x03\x02\
8854 \x02\x12\x04\xa4\x01\x02\x1b\n\r\n\x05\x04\x03\x02\x02\x04\x12\x04\xa4\
8855 \x01\x02\n\n\r\n\x05\x04\x03\x02\x02\x06\x12\x04\xa4\x01\x0b\x10\n\r\n\
8856 \x05\x04\x03\x02\x02\x01\x12\x04\xa4\x01\x11\x16\n\r\n\x05\x04\x03\x02\
8857 \x02\x03\x12\x04\xa4\x01\x19\x1a\n\x9c\x01\n\x04\x04\x03\x02\x03\x12\x04\
8858 \xa8\x01\x02\x19\x1a\x8d\x01\x20If\x20type_name\x20is\x20set,\x20this\
8859 \x20need\x20not\x20be\x20set.\x20\x20If\x20both\x20this\x20and\x20type_n\
8860 ame\n\x20are\x20set,\x20this\x20must\x20be\x20one\x20of\x20TYPE_ENUM,\
8861 \x20TYPE_MESSAGE\x20or\x20TYPE_GROUP.\n\n\r\n\x05\x04\x03\x02\x03\x04\
8862 \x12\x04\xa8\x01\x02\n\n\r\n\x05\x04\x03\x02\x03\x06\x12\x04\xa8\x01\x0b\
8863 \x0f\n\r\n\x05\x04\x03\x02\x03\x01\x12\x04\xa8\x01\x10\x14\n\r\n\x05\x04\
8864 \x03\x02\x03\x03\x12\x04\xa8\x01\x17\x18\n\xb7\x02\n\x04\x04\x03\x02\x04\
8865 \x12\x04\xaf\x01\x02\x20\x1a\xa8\x02\x20For\x20message\x20and\x20enum\
8866 \x20types,\x20this\x20is\x20the\x20name\x20of\x20the\x20type.\x20\x20If\
8867 \x20the\x20name\n\x20starts\x20with\x20a\x20'.',\x20it\x20is\x20fully-qu\
8868 alified.\x20\x20Otherwise,\x20C++-like\x20scoping\n\x20rules\x20are\x20u\
8869 sed\x20to\x20find\x20the\x20type\x20(i.e.\x20first\x20the\x20nested\x20t\
8870 ypes\x20within\x20this\n\x20message\x20are\x20searched,\x20then\x20withi\
8871 n\x20the\x20parent,\x20on\x20up\x20to\x20the\x20root\n\x20namespace).\n\
8872 \n\r\n\x05\x04\x03\x02\x04\x04\x12\x04\xaf\x01\x02\n\n\r\n\x05\x04\x03\
8873 \x02\x04\x05\x12\x04\xaf\x01\x0b\x11\n\r\n\x05\x04\x03\x02\x04\x01\x12\
8874 \x04\xaf\x01\x12\x1b\n\r\n\x05\x04\x03\x02\x04\x03\x12\x04\xaf\x01\x1e\
8875 \x1f\n~\n\x04\x04\x03\x02\x05\x12\x04\xb3\x01\x02\x1f\x1ap\x20For\x20ext\
8876 ensions,\x20this\x20is\x20the\x20name\x20of\x20the\x20type\x20being\x20e\
8877 xtended.\x20\x20It\x20is\n\x20resolved\x20in\x20the\x20same\x20manner\
8878 \x20as\x20type_name.\n\n\r\n\x05\x04\x03\x02\x05\x04\x12\x04\xb3\x01\x02\
8879 \n\n\r\n\x05\x04\x03\x02\x05\x05\x12\x04\xb3\x01\x0b\x11\n\r\n\x05\x04\
8880 \x03\x02\x05\x01\x12\x04\xb3\x01\x12\x1a\n\r\n\x05\x04\x03\x02\x05\x03\
8881 \x12\x04\xb3\x01\x1d\x1e\n\xb1\x02\n\x04\x04\x03\x02\x06\x12\x04\xba\x01\
8882 \x02$\x1a\xa2\x02\x20For\x20numeric\x20types,\x20contains\x20the\x20orig\
8883 inal\x20text\x20representation\x20of\x20the\x20value.\n\x20For\x20boolea\
8884 ns,\x20\"true\"\x20or\x20\"false\".\n\x20For\x20strings,\x20contains\x20\
8885 the\x20default\x20text\x20contents\x20(not\x20escaped\x20in\x20any\x20wa\
8886 y).\n\x20For\x20bytes,\x20contains\x20the\x20C\x20escaped\x20value.\x20\
8887 \x20All\x20bytes\x20>=\x20128\x20are\x20escaped.\n\x20TODO(kenton):\x20\
8888 \x20Base-64\x20encode?\n\n\r\n\x05\x04\x03\x02\x06\x04\x12\x04\xba\x01\
8889 \x02\n\n\r\n\x05\x04\x03\x02\x06\x05\x12\x04\xba\x01\x0b\x11\n\r\n\x05\
8890 \x04\x03\x02\x06\x01\x12\x04\xba\x01\x12\x1f\n\r\n\x05\x04\x03\x02\x06\
8891 \x03\x12\x04\xba\x01\"#\n\x84\x01\n\x04\x04\x03\x02\x07\x12\x04\xbe\x01\
8892 \x02!\x1av\x20If\x20set,\x20gives\x20the\x20index\x20of\x20a\x20oneof\
8893 \x20in\x20the\x20containing\x20type's\x20oneof_decl\n\x20list.\x20\x20Th\
8894 is\x20field\x20is\x20a\x20member\x20of\x20that\x20oneof.\n\n\r\n\x05\x04\
8895 \x03\x02\x07\x04\x12\x04\xbe\x01\x02\n\n\r\n\x05\x04\x03\x02\x07\x05\x12\
8896 \x04\xbe\x01\x0b\x10\n\r\n\x05\x04\x03\x02\x07\x01\x12\x04\xbe\x01\x11\
8897 \x1c\n\r\n\x05\x04\x03\x02\x07\x03\x12\x04\xbe\x01\x1f\x20\n\xfa\x01\n\
8898 \x04\x04\x03\x02\x08\x12\x04\xc4\x01\x02!\x1a\xeb\x01\x20JSON\x20name\
8899 \x20of\x20this\x20field.\x20The\x20value\x20is\x20set\x20by\x20protocol\
8900 \x20compiler.\x20If\x20the\n\x20user\x20has\x20set\x20a\x20\"json_name\"\
8901 \x20option\x20on\x20this\x20field,\x20that\x20option's\x20value\n\x20wil\
8902 l\x20be\x20used.\x20Otherwise,\x20it's\x20deduced\x20from\x20the\x20fiel\
8903 d's\x20name\x20by\x20converting\n\x20it\x20to\x20camelCase.\n\n\r\n\x05\
8904 \x04\x03\x02\x08\x04\x12\x04\xc4\x01\x02\n\n\r\n\x05\x04\x03\x02\x08\x05\
8905 \x12\x04\xc4\x01\x0b\x11\n\r\n\x05\x04\x03\x02\x08\x01\x12\x04\xc4\x01\
8906 \x12\x1b\n\r\n\x05\x04\x03\x02\x08\x03\x12\x04\xc4\x01\x1e\x20\n\x0c\n\
8907 \x04\x04\x03\x02\t\x12\x04\xc6\x01\x02$\n\r\n\x05\x04\x03\x02\t\x04\x12\
8908 \x04\xc6\x01\x02\n\n\r\n\x05\x04\x03\x02\t\x06\x12\x04\xc6\x01\x0b\x17\n\
8909 \r\n\x05\x04\x03\x02\t\x01\x12\x04\xc6\x01\x18\x1f\n\r\n\x05\x04\x03\x02\
8910 \t\x03\x12\x04\xc6\x01\"#\n\"\n\x02\x04\x04\x12\x06\xca\x01\0\xcd\x01\
8911 \x01\x1a\x14\x20Describes\x20a\x20oneof.\n\n\x0b\n\x03\x04\x04\x01\x12\
8912 \x04\xca\x01\x08\x1c\n\x0c\n\x04\x04\x04\x02\0\x12\x04\xcb\x01\x02\x1b\n\
8913 \r\n\x05\x04\x04\x02\0\x04\x12\x04\xcb\x01\x02\n\n\r\n\x05\x04\x04\x02\0\
8914 \x05\x12\x04\xcb\x01\x0b\x11\n\r\n\x05\x04\x04\x02\0\x01\x12\x04\xcb\x01\
8915 \x12\x16\n\r\n\x05\x04\x04\x02\0\x03\x12\x04\xcb\x01\x19\x1a\n\x0c\n\x04\
8916 \x04\x04\x02\x01\x12\x04\xcc\x01\x02$\n\r\n\x05\x04\x04\x02\x01\x04\x12\
8917 \x04\xcc\x01\x02\n\n\r\n\x05\x04\x04\x02\x01\x06\x12\x04\xcc\x01\x0b\x17\
8918 \n\r\n\x05\x04\x04\x02\x01\x01\x12\x04\xcc\x01\x18\x1f\n\r\n\x05\x04\x04\
8919 \x02\x01\x03\x12\x04\xcc\x01\"#\n'\n\x02\x04\x05\x12\x06\xd0\x01\0\xd6\
8920 \x01\x01\x1a\x19\x20Describes\x20an\x20enum\x20type.\n\n\x0b\n\x03\x04\
8921 \x05\x01\x12\x04\xd0\x01\x08\x1b\n\x0c\n\x04\x04\x05\x02\0\x12\x04\xd1\
8922 \x01\x02\x1b\n\r\n\x05\x04\x05\x02\0\x04\x12\x04\xd1\x01\x02\n\n\r\n\x05\
8923 \x04\x05\x02\0\x05\x12\x04\xd1\x01\x0b\x11\n\r\n\x05\x04\x05\x02\0\x01\
8924 \x12\x04\xd1\x01\x12\x16\n\r\n\x05\x04\x05\x02\0\x03\x12\x04\xd1\x01\x19\
8925 \x1a\n\x0c\n\x04\x04\x05\x02\x01\x12\x04\xd3\x01\x02.\n\r\n\x05\x04\x05\
8926 \x02\x01\x04\x12\x04\xd3\x01\x02\n\n\r\n\x05\x04\x05\x02\x01\x06\x12\x04\
8927 \xd3\x01\x0b#\n\r\n\x05\x04\x05\x02\x01\x01\x12\x04\xd3\x01$)\n\r\n\x05\
8928 \x04\x05\x02\x01\x03\x12\x04\xd3\x01,-\n\x0c\n\x04\x04\x05\x02\x02\x12\
8929 \x04\xd5\x01\x02#\n\r\n\x05\x04\x05\x02\x02\x04\x12\x04\xd5\x01\x02\n\n\
8930 \r\n\x05\x04\x05\x02\x02\x06\x12\x04\xd5\x01\x0b\x16\n\r\n\x05\x04\x05\
8931 \x02\x02\x01\x12\x04\xd5\x01\x17\x1e\n\r\n\x05\x04\x05\x02\x02\x03\x12\
8932 \x04\xd5\x01!\"\n1\n\x02\x04\x06\x12\x06\xd9\x01\0\xde\x01\x01\x1a#\x20D\
8933 escribes\x20a\x20value\x20within\x20an\x20enum.\n\n\x0b\n\x03\x04\x06\
8934 \x01\x12\x04\xd9\x01\x08\x20\n\x0c\n\x04\x04\x06\x02\0\x12\x04\xda\x01\
8935 \x02\x1b\n\r\n\x05\x04\x06\x02\0\x04\x12\x04\xda\x01\x02\n\n\r\n\x05\x04\
8936 \x06\x02\0\x05\x12\x04\xda\x01\x0b\x11\n\r\n\x05\x04\x06\x02\0\x01\x12\
8937 \x04\xda\x01\x12\x16\n\r\n\x05\x04\x06\x02\0\x03\x12\x04\xda\x01\x19\x1a\
8938 \n\x0c\n\x04\x04\x06\x02\x01\x12\x04\xdb\x01\x02\x1c\n\r\n\x05\x04\x06\
8939 \x02\x01\x04\x12\x04\xdb\x01\x02\n\n\r\n\x05\x04\x06\x02\x01\x05\x12\x04\
8940 \xdb\x01\x0b\x10\n\r\n\x05\x04\x06\x02\x01\x01\x12\x04\xdb\x01\x11\x17\n\
8941 \r\n\x05\x04\x06\x02\x01\x03\x12\x04\xdb\x01\x1a\x1b\n\x0c\n\x04\x04\x06\
8942 \x02\x02\x12\x04\xdd\x01\x02(\n\r\n\x05\x04\x06\x02\x02\x04\x12\x04\xdd\
8943 \x01\x02\n\n\r\n\x05\x04\x06\x02\x02\x06\x12\x04\xdd\x01\x0b\x1b\n\r\n\
8944 \x05\x04\x06\x02\x02\x01\x12\x04\xdd\x01\x1c#\n\r\n\x05\x04\x06\x02\x02\
8945 \x03\x12\x04\xdd\x01&'\n$\n\x02\x04\x07\x12\x06\xe1\x01\0\xe6\x01\x01\
8946 \x1a\x16\x20Describes\x20a\x20service.\n\n\x0b\n\x03\x04\x07\x01\x12\x04\
8947 \xe1\x01\x08\x1e\n\x0c\n\x04\x04\x07\x02\0\x12\x04\xe2\x01\x02\x1b\n\r\n\
8948 \x05\x04\x07\x02\0\x04\x12\x04\xe2\x01\x02\n\n\r\n\x05\x04\x07\x02\0\x05\
8949 \x12\x04\xe2\x01\x0b\x11\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\xe2\x01\x12\
8950 \x16\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\xe2\x01\x19\x1a\n\x0c\n\x04\x04\
8951 \x07\x02\x01\x12\x04\xe3\x01\x02,\n\r\n\x05\x04\x07\x02\x01\x04\x12\x04\
8952 \xe3\x01\x02\n\n\r\n\x05\x04\x07\x02\x01\x06\x12\x04\xe3\x01\x0b\x20\n\r\
8953 \n\x05\x04\x07\x02\x01\x01\x12\x04\xe3\x01!'\n\r\n\x05\x04\x07\x02\x01\
8954 \x03\x12\x04\xe3\x01*+\n\x0c\n\x04\x04\x07\x02\x02\x12\x04\xe5\x01\x02&\
8955 \n\r\n\x05\x04\x07\x02\x02\x04\x12\x04\xe5\x01\x02\n\n\r\n\x05\x04\x07\
8956 \x02\x02\x06\x12\x04\xe5\x01\x0b\x19\n\r\n\x05\x04\x07\x02\x02\x01\x12\
8957 \x04\xe5\x01\x1a!\n\r\n\x05\x04\x07\x02\x02\x03\x12\x04\xe5\x01$%\n0\n\
8958 \x02\x04\x08\x12\x06\xe9\x01\0\xf7\x01\x01\x1a\"\x20Describes\x20a\x20me\
8959 thod\x20of\x20a\x20service.\n\n\x0b\n\x03\x04\x08\x01\x12\x04\xe9\x01\
8960 \x08\x1d\n\x0c\n\x04\x04\x08\x02\0\x12\x04\xea\x01\x02\x1b\n\r\n\x05\x04\
8961 \x08\x02\0\x04\x12\x04\xea\x01\x02\n\n\r\n\x05\x04\x08\x02\0\x05\x12\x04\
8962 \xea\x01\x0b\x11\n\r\n\x05\x04\x08\x02\0\x01\x12\x04\xea\x01\x12\x16\n\r\
8963 \n\x05\x04\x08\x02\0\x03\x12\x04\xea\x01\x19\x1a\n\x97\x01\n\x04\x04\x08\
8964 \x02\x01\x12\x04\xee\x01\x02!\x1a\x88\x01\x20Input\x20and\x20output\x20t\
8965 ype\x20names.\x20\x20These\x20are\x20resolved\x20in\x20the\x20same\x20wa\
8966 y\x20as\n\x20FieldDescriptorProto.type_name,\x20but\x20must\x20refer\x20\
8967 to\x20a\x20message\x20type.\n\n\r\n\x05\x04\x08\x02\x01\x04\x12\x04\xee\
8968 \x01\x02\n\n\r\n\x05\x04\x08\x02\x01\x05\x12\x04\xee\x01\x0b\x11\n\r\n\
8969 \x05\x04\x08\x02\x01\x01\x12\x04\xee\x01\x12\x1c\n\r\n\x05\x04\x08\x02\
8970 \x01\x03\x12\x04\xee\x01\x1f\x20\n\x0c\n\x04\x04\x08\x02\x02\x12\x04\xef\
8971 \x01\x02\"\n\r\n\x05\x04\x08\x02\x02\x04\x12\x04\xef\x01\x02\n\n\r\n\x05\
8972 \x04\x08\x02\x02\x05\x12\x04\xef\x01\x0b\x11\n\r\n\x05\x04\x08\x02\x02\
8973 \x01\x12\x04\xef\x01\x12\x1d\n\r\n\x05\x04\x08\x02\x02\x03\x12\x04\xef\
8974 \x01\x20!\n\x0c\n\x04\x04\x08\x02\x03\x12\x04\xf1\x01\x02%\n\r\n\x05\x04\
8975 \x08\x02\x03\x04\x12\x04\xf1\x01\x02\n\n\r\n\x05\x04\x08\x02\x03\x06\x12\
8976 \x04\xf1\x01\x0b\x18\n\r\n\x05\x04\x08\x02\x03\x01\x12\x04\xf1\x01\x19\
8977 \x20\n\r\n\x05\x04\x08\x02\x03\x03\x12\x04\xf1\x01#$\nE\n\x04\x04\x08\
8978 \x02\x04\x12\x04\xf4\x01\x025\x1a7\x20Identifies\x20if\x20client\x20stre\
8979 ams\x20multiple\x20client\x20messages\n\n\r\n\x05\x04\x08\x02\x04\x04\
8980 \x12\x04\xf4\x01\x02\n\n\r\n\x05\x04\x08\x02\x04\x05\x12\x04\xf4\x01\x0b\
8981 \x0f\n\r\n\x05\x04\x08\x02\x04\x01\x12\x04\xf4\x01\x10\x20\n\r\n\x05\x04\
8982 \x08\x02\x04\x03\x12\x04\xf4\x01#$\n\r\n\x05\x04\x08\x02\x04\x08\x12\x04\
8983 \xf4\x01%4\n\r\n\x05\x04\x08\x02\x04\x07\x12\x04\xf4\x01.3\nE\n\x04\x04\
8984 \x08\x02\x05\x12\x04\xf6\x01\x025\x1a7\x20Identifies\x20if\x20server\x20\
8985 streams\x20multiple\x20server\x20messages\n\n\r\n\x05\x04\x08\x02\x05\
8986 \x04\x12\x04\xf6\x01\x02\n\n\r\n\x05\x04\x08\x02\x05\x05\x12\x04\xf6\x01\
8987 \x0b\x0f\n\r\n\x05\x04\x08\x02\x05\x01\x12\x04\xf6\x01\x10\x20\n\r\n\x05\
8988 \x04\x08\x02\x05\x03\x12\x04\xf6\x01#$\n\r\n\x05\x04\x08\x02\x05\x08\x12\
8989 \x04\xf6\x01%4\n\r\n\x05\x04\x08\x02\x05\x07\x12\x04\xf6\x01.3\n\xaf\x0e\
8990 \n\x02\x04\t\x12\x06\x9b\x02\0\xf8\x02\x012N\x20========================\
8991 ===========================================\n\x20Options\n2\xd0\r\x20Eac\
8992 h\x20of\x20the\x20definitions\x20above\x20may\x20have\x20\"options\"\x20\
8993 attached.\x20\x20These\x20are\n\x20just\x20annotations\x20which\x20may\
8994 \x20cause\x20code\x20to\x20be\x20generated\x20slightly\x20differently\n\
8995 \x20or\x20may\x20contain\x20hints\x20for\x20code\x20that\x20manipulates\
8996 \x20protocol\x20messages.\n\n\x20Clients\x20may\x20define\x20custom\x20o\
8997 ptions\x20as\x20extensions\x20of\x20the\x20*Options\x20messages.\n\x20Th\
8998 ese\x20extensions\x20may\x20not\x20yet\x20be\x20known\x20at\x20parsing\
8999 \x20time,\x20so\x20the\x20parser\x20cannot\n\x20store\x20the\x20values\
9000 \x20in\x20them.\x20\x20Instead\x20it\x20stores\x20them\x20in\x20a\x20fie\
9001 ld\x20in\x20the\x20*Options\n\x20message\x20called\x20uninterpreted_opti\
9002 on.\x20This\x20field\x20must\x20have\x20the\x20same\x20name\n\x20across\
9003 \x20all\x20*Options\x20messages.\x20We\x20then\x20use\x20this\x20field\
9004 \x20to\x20populate\x20the\n\x20extensions\x20when\x20we\x20build\x20a\
9005 \x20descriptor,\x20at\x20which\x20point\x20all\x20protos\x20have\x20been\
9006 \n\x20parsed\x20and\x20so\x20all\x20extensions\x20are\x20known.\n\n\x20E\
9007 xtension\x20numbers\x20for\x20custom\x20options\x20may\x20be\x20chosen\
9008 \x20as\x20follows:\n\x20*\x20For\x20options\x20which\x20will\x20only\x20\
9009 be\x20used\x20within\x20a\x20single\x20application\x20or\n\x20\x20\x20or\
9010 ganization,\x20or\x20for\x20experimental\x20options,\x20use\x20field\x20\
9011 numbers\x2050000\n\x20\x20\x20through\x2099999.\x20\x20It\x20is\x20up\
9012 \x20to\x20you\x20to\x20ensure\x20that\x20you\x20do\x20not\x20use\x20the\
9013 \n\x20\x20\x20same\x20number\x20for\x20multiple\x20options.\n\x20*\x20Fo\
9014 r\x20options\x20which\x20will\x20be\x20published\x20and\x20used\x20publi\
9015 cly\x20by\x20multiple\n\x20\x20\x20independent\x20entities,\x20e-mail\
9016 \x20protobuf-global-extension-registry@google.com\n\x20\x20\x20to\x20res\
9017 erve\x20extension\x20numbers.\x20Simply\x20provide\x20your\x20project\
9018 \x20name\x20(e.g.\n\x20\x20\x20Objective-C\x20plugin)\x20and\x20your\x20\
9019 project\x20website\x20(if\x20available)\x20--\x20there's\x20no\n\x20\x20\
9020 \x20need\x20to\x20explain\x20how\x20you\x20intend\x20to\x20use\x20them.\
9021 \x20Usually\x20you\x20only\x20need\x20one\n\x20\x20\x20extension\x20numb\
9022 er.\x20You\x20can\x20declare\x20multiple\x20options\x20with\x20only\x20o\
9023 ne\x20extension\n\x20\x20\x20number\x20by\x20putting\x20them\x20in\x20a\
9024 \x20sub-message.\x20See\x20the\x20Custom\x20Options\x20section\x20of\n\
9025 \x20\x20\x20the\x20docs\x20for\x20examples:\n\x20\x20\x20https://develop\
9026 ers.google.com/protocol-buffers/docs/proto#options\n\x20\x20\x20If\x20th\
9027 is\x20turns\x20out\x20to\x20be\x20popular,\x20a\x20web\x20service\x20wil\
9028 l\x20be\x20set\x20up\n\x20\x20\x20to\x20automatically\x20assign\x20optio\
9029 n\x20numbers.\n\n\x0b\n\x03\x04\t\x01\x12\x04\x9b\x02\x08\x13\n\xf4\x01\
9030 \n\x04\x04\t\x02\0\x12\x04\xa1\x02\x02#\x1a\xe5\x01\x20Sets\x20the\x20Ja\
9031 va\x20package\x20where\x20classes\x20generated\x20from\x20this\x20.proto\
9032 \x20will\x20be\n\x20placed.\x20\x20By\x20default,\x20the\x20proto\x20pac\
9033 kage\x20is\x20used,\x20but\x20this\x20is\x20often\n\x20inappropriate\x20\
9034 because\x20proto\x20packages\x20do\x20not\x20normally\x20start\x20with\
9035 \x20backwards\n\x20domain\x20names.\n\n\r\n\x05\x04\t\x02\0\x04\x12\x04\
9036 \xa1\x02\x02\n\n\r\n\x05\x04\t\x02\0\x05\x12\x04\xa1\x02\x0b\x11\n\r\n\
9037 \x05\x04\t\x02\0\x01\x12\x04\xa1\x02\x12\x1e\n\r\n\x05\x04\t\x02\0\x03\
9038 \x12\x04\xa1\x02!\"\n\xbf\x02\n\x04\x04\t\x02\x01\x12\x04\xa9\x02\x02+\
9039 \x1a\xb0\x02\x20If\x20set,\x20all\x20the\x20classes\x20from\x20the\x20.p\
9040 roto\x20file\x20are\x20wrapped\x20in\x20a\x20single\n\x20outer\x20class\
9041 \x20with\x20the\x20given\x20name.\x20\x20This\x20applies\x20to\x20both\
9042 \x20Proto1\n\x20(equivalent\x20to\x20the\x20old\x20\"--one_java_file\"\
9043 \x20option)\x20and\x20Proto2\x20(where\n\x20a\x20.proto\x20always\x20tra\
9044 nslates\x20to\x20a\x20single\x20class,\x20but\x20you\x20may\x20want\x20t\
9045 o\n\x20explicitly\x20choose\x20the\x20class\x20name).\n\n\r\n\x05\x04\t\
9046 \x02\x01\x04\x12\x04\xa9\x02\x02\n\n\r\n\x05\x04\t\x02\x01\x05\x12\x04\
9047 \xa9\x02\x0b\x11\n\r\n\x05\x04\t\x02\x01\x01\x12\x04\xa9\x02\x12&\n\r\n\
9048 \x05\x04\t\x02\x01\x03\x12\x04\xa9\x02)*\n\xa3\x03\n\x04\x04\t\x02\x02\
9049 \x12\x04\xb1\x02\x029\x1a\x94\x03\x20If\x20set\x20true,\x20then\x20the\
9050 \x20Java\x20code\x20generator\x20will\x20generate\x20a\x20separate\x20.j\
9051 ava\n\x20file\x20for\x20each\x20top-level\x20message,\x20enum,\x20and\
9052 \x20service\x20defined\x20in\x20the\x20.proto\n\x20file.\x20\x20Thus,\
9053 \x20these\x20types\x20will\x20*not*\x20be\x20nested\x20inside\x20the\x20\
9054 outer\x20class\n\x20named\x20by\x20java_outer_classname.\x20\x20However,\
9055 \x20the\x20outer\x20class\x20will\x20still\x20be\n\x20generated\x20to\
9056 \x20contain\x20the\x20file's\x20getDescriptor()\x20method\x20as\x20well\
9057 \x20as\x20any\n\x20top-level\x20extensions\x20defined\x20in\x20the\x20fi\
9058 le.\n\n\r\n\x05\x04\t\x02\x02\x04\x12\x04\xb1\x02\x02\n\n\r\n\x05\x04\t\
9059 \x02\x02\x05\x12\x04\xb1\x02\x0b\x0f\n\r\n\x05\x04\t\x02\x02\x01\x12\x04\
9060 \xb1\x02\x10#\n\r\n\x05\x04\t\x02\x02\x03\x12\x04\xb1\x02&(\n\r\n\x05\
9061 \x04\t\x02\x02\x08\x12\x04\xb1\x02)8\n\r\n\x05\x04\t\x02\x02\x07\x12\x04\
9062 \xb1\x0227\n)\n\x04\x04\t\x02\x03\x12\x04\xb4\x02\x02E\x1a\x1b\x20This\
9063 \x20option\x20does\x20nothing.\n\n\r\n\x05\x04\t\x02\x03\x04\x12\x04\xb4\
9064 \x02\x02\n\n\r\n\x05\x04\t\x02\x03\x05\x12\x04\xb4\x02\x0b\x0f\n\r\n\x05\
9065 \x04\t\x02\x03\x01\x12\x04\xb4\x02\x10-\n\r\n\x05\x04\t\x02\x03\x03\x12\
9066 \x04\xb4\x0202\n\r\n\x05\x04\t\x02\x03\x08\x12\x04\xb4\x023D\n\x0e\n\x06\
9067 \x04\t\x02\x03\x08\x03\x12\x04\xb4\x024C\n\xe6\x02\n\x04\x04\t\x02\x04\
9068 \x12\x04\xbc\x02\x02<\x1a\xd7\x02\x20If\x20set\x20true,\x20then\x20the\
9069 \x20Java2\x20code\x20generator\x20will\x20generate\x20code\x20that\n\x20\
9070 throws\x20an\x20exception\x20whenever\x20an\x20attempt\x20is\x20made\x20\
9071 to\x20assign\x20a\x20non-UTF-8\n\x20byte\x20sequence\x20to\x20a\x20strin\
9072 g\x20field.\n\x20Message\x20reflection\x20will\x20do\x20the\x20same.\n\
9073 \x20However,\x20an\x20extension\x20field\x20still\x20accepts\x20non-UTF-\
9074 8\x20byte\x20sequences.\n\x20This\x20option\x20has\x20no\x20effect\x20on\
9075 \x20when\x20used\x20with\x20the\x20lite\x20runtime.\n\n\r\n\x05\x04\t\
9076 \x02\x04\x04\x12\x04\xbc\x02\x02\n\n\r\n\x05\x04\t\x02\x04\x05\x12\x04\
9077 \xbc\x02\x0b\x0f\n\r\n\x05\x04\t\x02\x04\x01\x12\x04\xbc\x02\x10&\n\r\n\
9078 \x05\x04\t\x02\x04\x03\x12\x04\xbc\x02)+\n\r\n\x05\x04\t\x02\x04\x08\x12\
9079 \x04\xbc\x02,;\n\r\n\x05\x04\t\x02\x04\x07\x12\x04\xbc\x025:\nL\n\x04\
9080 \x04\t\x04\0\x12\x06\xc0\x02\x02\xc5\x02\x03\x1a<\x20Generated\x20classe\
9081 s\x20can\x20be\x20optimized\x20for\x20speed\x20or\x20code\x20size.\n\n\r\
9082 \n\x05\x04\t\x04\0\x01\x12\x04\xc0\x02\x07\x13\nD\n\x06\x04\t\x04\0\x02\
9083 \0\x12\x04\xc1\x02\x04\x0e\"4\x20Generate\x20complete\x20code\x20for\x20\
9084 parsing,\x20serialization,\n\n\x0f\n\x07\x04\t\x04\0\x02\0\x01\x12\x04\
9085 \xc1\x02\x04\t\n\x0f\n\x07\x04\t\x04\0\x02\0\x02\x12\x04\xc1\x02\x0c\r\n\
9086 G\n\x06\x04\t\x04\0\x02\x01\x12\x04\xc3\x02\x04\x12\x1a\x06\x20etc.\n\"/\
9087 \x20Use\x20ReflectionOps\x20to\x20implement\x20these\x20methods.\n\n\x0f\
9088 \n\x07\x04\t\x04\0\x02\x01\x01\x12\x04\xc3\x02\x04\r\n\x0f\n\x07\x04\t\
9089 \x04\0\x02\x01\x02\x12\x04\xc3\x02\x10\x11\nG\n\x06\x04\t\x04\0\x02\x02\
9090 \x12\x04\xc4\x02\x04\x15\"7\x20Generate\x20code\x20using\x20MessageLite\
9091 \x20and\x20the\x20lite\x20runtime.\n\n\x0f\n\x07\x04\t\x04\0\x02\x02\x01\
9092 \x12\x04\xc4\x02\x04\x10\n\x0f\n\x07\x04\t\x04\0\x02\x02\x02\x12\x04\xc4\
9093 \x02\x13\x14\n\x0c\n\x04\x04\t\x02\x05\x12\x04\xc6\x02\x029\n\r\n\x05\
9094 \x04\t\x02\x05\x04\x12\x04\xc6\x02\x02\n\n\r\n\x05\x04\t\x02\x05\x06\x12\
9095 \x04\xc6\x02\x0b\x17\n\r\n\x05\x04\t\x02\x05\x01\x12\x04\xc6\x02\x18$\n\
9096 \r\n\x05\x04\t\x02\x05\x03\x12\x04\xc6\x02'(\n\r\n\x05\x04\t\x02\x05\x08\
9097 \x12\x04\xc6\x02)8\n\r\n\x05\x04\t\x02\x05\x07\x12\x04\xc6\x0227\n\xe2\
9098 \x02\n\x04\x04\t\x02\x06\x12\x04\xcd\x02\x02\"\x1a\xd3\x02\x20Sets\x20th\
9099 e\x20Go\x20package\x20where\x20structs\x20generated\x20from\x20this\x20.\
9100 proto\x20will\x20be\n\x20placed.\x20If\x20omitted,\x20the\x20Go\x20packa\
9101 ge\x20will\x20be\x20derived\x20from\x20the\x20following:\n\x20\x20\x20-\
9102 \x20The\x20basename\x20of\x20the\x20package\x20import\x20path,\x20if\x20\
9103 provided.\n\x20\x20\x20-\x20Otherwise,\x20the\x20package\x20statement\
9104 \x20in\x20the\x20.proto\x20file,\x20if\x20present.\n\x20\x20\x20-\x20Oth\
9105 erwise,\x20the\x20basename\x20of\x20the\x20.proto\x20file,\x20without\
9106 \x20extension.\n\n\r\n\x05\x04\t\x02\x06\x04\x12\x04\xcd\x02\x02\n\n\r\n\
9107 \x05\x04\t\x02\x06\x05\x12\x04\xcd\x02\x0b\x11\n\r\n\x05\x04\t\x02\x06\
9108 \x01\x12\x04\xcd\x02\x12\x1c\n\r\n\x05\x04\t\x02\x06\x03\x12\x04\xcd\x02\
9109 \x1f!\n\xd4\x04\n\x04\x04\t\x02\x07\x12\x04\xdb\x02\x029\x1a\xc5\x04\x20\
9110 Should\x20generic\x20services\x20be\x20generated\x20in\x20each\x20langua\
9111 ge?\x20\x20\"Generic\"\x20services\n\x20are\x20not\x20specific\x20to\x20\
9112 any\x20particular\x20RPC\x20system.\x20\x20They\x20are\x20generated\x20b\
9113 y\x20the\n\x20main\x20code\x20generators\x20in\x20each\x20language\x20(w\
9114 ithout\x20additional\x20plugins).\n\x20Generic\x20services\x20were\x20th\
9115 e\x20only\x20kind\x20of\x20service\x20generation\x20supported\x20by\n\
9116 \x20early\x20versions\x20of\x20google.protobuf.\n\n\x20Generic\x20servic\
9117 es\x20are\x20now\x20considered\x20deprecated\x20in\x20favor\x20of\x20usi\
9118 ng\x20plugins\n\x20that\x20generate\x20code\x20specific\x20to\x20your\
9119 \x20particular\x20RPC\x20system.\x20\x20Therefore,\n\x20these\x20default\
9120 \x20to\x20false.\x20\x20Old\x20code\x20which\x20depends\x20on\x20generic\
9121 \x20services\x20should\n\x20explicitly\x20set\x20them\x20to\x20true.\n\n\
9122 \r\n\x05\x04\t\x02\x07\x04\x12\x04\xdb\x02\x02\n\n\r\n\x05\x04\t\x02\x07\
9123 \x05\x12\x04\xdb\x02\x0b\x0f\n\r\n\x05\x04\t\x02\x07\x01\x12\x04\xdb\x02\
9124 \x10#\n\r\n\x05\x04\t\x02\x07\x03\x12\x04\xdb\x02&(\n\r\n\x05\x04\t\x02\
9125 \x07\x08\x12\x04\xdb\x02)8\n\r\n\x05\x04\t\x02\x07\x07\x12\x04\xdb\x0227\
9126 \n\x0c\n\x04\x04\t\x02\x08\x12\x04\xdc\x02\x02;\n\r\n\x05\x04\t\x02\x08\
9127 \x04\x12\x04\xdc\x02\x02\n\n\r\n\x05\x04\t\x02\x08\x05\x12\x04\xdc\x02\
9128 \x0b\x0f\n\r\n\x05\x04\t\x02\x08\x01\x12\x04\xdc\x02\x10%\n\r\n\x05\x04\
9129 \t\x02\x08\x03\x12\x04\xdc\x02(*\n\r\n\x05\x04\t\x02\x08\x08\x12\x04\xdc\
9130 \x02+:\n\r\n\x05\x04\t\x02\x08\x07\x12\x04\xdc\x0249\n\x0c\n\x04\x04\t\
9131 \x02\t\x12\x04\xdd\x02\x029\n\r\n\x05\x04\t\x02\t\x04\x12\x04\xdd\x02\
9132 \x02\n\n\r\n\x05\x04\t\x02\t\x05\x12\x04\xdd\x02\x0b\x0f\n\r\n\x05\x04\t\
9133 \x02\t\x01\x12\x04\xdd\x02\x10#\n\r\n\x05\x04\t\x02\t\x03\x12\x04\xdd\
9134 \x02&(\n\r\n\x05\x04\t\x02\t\x08\x12\x04\xdd\x02)8\n\r\n\x05\x04\t\x02\t\
9135 \x07\x12\x04\xdd\x0227\n\xf3\x01\n\x04\x04\t\x02\n\x12\x04\xe3\x02\x020\
9136 \x1a\xe4\x01\x20Is\x20this\x20file\x20deprecated?\n\x20Depending\x20on\
9137 \x20the\x20target\x20platform,\x20this\x20can\x20emit\x20Deprecated\x20a\
9138 nnotations\n\x20for\x20everything\x20in\x20the\x20file,\x20or\x20it\x20w\
9139 ill\x20be\x20completely\x20ignored;\x20in\x20the\x20very\n\x20least,\x20\
9140 this\x20is\x20a\x20formalization\x20for\x20deprecating\x20files.\n\n\r\n\
9141 \x05\x04\t\x02\n\x04\x12\x04\xe3\x02\x02\n\n\r\n\x05\x04\t\x02\n\x05\x12\
9142 \x04\xe3\x02\x0b\x0f\n\r\n\x05\x04\t\x02\n\x01\x12\x04\xe3\x02\x10\x1a\n\
9143 \r\n\x05\x04\t\x02\n\x03\x12\x04\xe3\x02\x1d\x1f\n\r\n\x05\x04\t\x02\n\
9144 \x08\x12\x04\xe3\x02\x20/\n\r\n\x05\x04\t\x02\n\x07\x12\x04\xe3\x02).\n\
9145 \x7f\n\x04\x04\t\x02\x0b\x12\x04\xe7\x02\x026\x1aq\x20Enables\x20the\x20\
9146 use\x20of\x20arenas\x20for\x20the\x20proto\x20messages\x20in\x20this\x20\
9147 file.\x20This\x20applies\n\x20only\x20to\x20generated\x20classes\x20for\
9148 \x20C++.\n\n\r\n\x05\x04\t\x02\x0b\x04\x12\x04\xe7\x02\x02\n\n\r\n\x05\
9149 \x04\t\x02\x0b\x05\x12\x04\xe7\x02\x0b\x0f\n\r\n\x05\x04\t\x02\x0b\x01\
9150 \x12\x04\xe7\x02\x10\x20\n\r\n\x05\x04\t\x02\x0b\x03\x12\x04\xe7\x02#%\n\
9151 \r\n\x05\x04\t\x02\x0b\x08\x12\x04\xe7\x02&5\n\r\n\x05\x04\t\x02\x0b\x07\
9152 \x12\x04\xe7\x02/4\n\x92\x01\n\x04\x04\t\x02\x0c\x12\x04\xec\x02\x02)\
9153 \x1a\x83\x01\x20Sets\x20the\x20objective\x20c\x20class\x20prefix\x20whic\
9154 h\x20is\x20prepended\x20to\x20all\x20objective\x20c\n\x20generated\x20cl\
9155 asses\x20from\x20this\x20.proto.\x20There\x20is\x20no\x20default.\n\n\r\
9156 \n\x05\x04\t\x02\x0c\x04\x12\x04\xec\x02\x02\n\n\r\n\x05\x04\t\x02\x0c\
9157 \x05\x12\x04\xec\x02\x0b\x11\n\r\n\x05\x04\t\x02\x0c\x01\x12\x04\xec\x02\
9158 \x12#\n\r\n\x05\x04\t\x02\x0c\x03\x12\x04\xec\x02&(\nI\n\x04\x04\t\x02\r\
9159 \x12\x04\xef\x02\x02(\x1a;\x20Namespace\x20for\x20generated\x20classes;\
9160 \x20defaults\x20to\x20the\x20package.\n\n\r\n\x05\x04\t\x02\r\x04\x12\
9161 \x04\xef\x02\x02\n\n\r\n\x05\x04\t\x02\r\x05\x12\x04\xef\x02\x0b\x11\n\r\
9162 \n\x05\x04\t\x02\r\x01\x12\x04\xef\x02\x12\"\n\r\n\x05\x04\t\x02\r\x03\
9163 \x12\x04\xef\x02%'\nO\n\x04\x04\t\x02\x0e\x12\x04\xf2\x02\x02:\x1aA\x20T\
9164 he\x20parser\x20stores\x20options\x20it\x20doesn't\x20recognize\x20here.\
9165 \x20See\x20above.\n\n\r\n\x05\x04\t\x02\x0e\x04\x12\x04\xf2\x02\x02\n\n\
9166 \r\n\x05\x04\t\x02\x0e\x06\x12\x04\xf2\x02\x0b\x1e\n\r\n\x05\x04\t\x02\
9167 \x0e\x01\x12\x04\xf2\x02\x1f3\n\r\n\x05\x04\t\x02\x0e\x03\x12\x04\xf2\
9168 \x0269\nZ\n\x03\x04\t\x05\x12\x04\xf5\x02\x02\x19\x1aM\x20Clients\x20can\
9169 \x20define\x20custom\x20options\x20in\x20extensions\x20of\x20this\x20mes\
9170 sage.\x20See\x20above.\n\n\x0c\n\x04\x04\t\x05\0\x12\x04\xf5\x02\r\x18\n\
9171 \r\n\x05\x04\t\x05\0\x01\x12\x04\xf5\x02\r\x11\n\r\n\x05\x04\t\x05\0\x02\
9172 \x12\x04\xf5\x02\x15\x18\n\x0c\n\x02\x04\n\x12\x06\xfa\x02\0\xb8\x03\x01\
9173 \n\x0b\n\x03\x04\n\x01\x12\x04\xfa\x02\x08\x16\n\xd8\x05\n\x04\x04\n\x02\
9174 \0\x12\x04\x8d\x03\x02<\x1a\xc9\x05\x20Set\x20true\x20to\x20use\x20the\
9175 \x20old\x20proto1\x20MessageSet\x20wire\x20format\x20for\x20extensions.\
9176 \n\x20This\x20is\x20provided\x20for\x20backwards-compatibility\x20with\
9177 \x20the\x20MessageSet\x20wire\n\x20format.\x20\x20You\x20should\x20not\
9178 \x20use\x20this\x20for\x20any\x20other\x20reason:\x20\x20It's\x20less\n\
9179 \x20efficient,\x20has\x20fewer\x20features,\x20and\x20is\x20more\x20comp\
9180 licated.\n\n\x20The\x20message\x20must\x20be\x20defined\x20exactly\x20as\
9181 \x20follows:\n\x20\x20\x20message\x20Foo\x20{\n\x20\x20\x20\x20\x20optio\
9182 n\x20message_set_wire_format\x20=\x20true;\n\x20\x20\x20\x20\x20extensio\
9183 ns\x204\x20to\x20max;\n\x20\x20\x20}\n\x20Note\x20that\x20the\x20message\
9184 \x20cannot\x20have\x20any\x20defined\x20fields;\x20MessageSets\x20only\n\
9185 \x20have\x20extensions.\n\n\x20All\x20extensions\x20of\x20your\x20type\
9186 \x20must\x20be\x20singular\x20messages;\x20e.g.\x20they\x20cannot\n\x20b\
9187 e\x20int32s,\x20enums,\x20or\x20repeated\x20messages.\n\n\x20Because\x20\
9188 this\x20is\x20an\x20option,\x20the\x20above\x20two\x20restrictions\x20ar\
9189 e\x20not\x20enforced\x20by\n\x20the\x20protocol\x20compiler.\n\n\r\n\x05\
9190 \x04\n\x02\0\x04\x12\x04\x8d\x03\x02\n\n\r\n\x05\x04\n\x02\0\x05\x12\x04\
9191 \x8d\x03\x0b\x0f\n\r\n\x05\x04\n\x02\0\x01\x12\x04\x8d\x03\x10'\n\r\n\
9192 \x05\x04\n\x02\0\x03\x12\x04\x8d\x03*+\n\r\n\x05\x04\n\x02\0\x08\x12\x04\
9193 \x8d\x03,;\n\r\n\x05\x04\n\x02\0\x07\x12\x04\x8d\x035:\n\xeb\x01\n\x04\
9194 \x04\n\x02\x01\x12\x04\x92\x03\x02D\x1a\xdc\x01\x20Disables\x20the\x20ge\
9195 neration\x20of\x20the\x20standard\x20\"descriptor()\"\x20accessor,\x20wh\
9196 ich\x20can\n\x20conflict\x20with\x20a\x20field\x20of\x20the\x20same\x20n\
9197 ame.\x20\x20This\x20is\x20meant\x20to\x20make\x20migration\n\x20from\x20\
9198 proto1\x20easier;\x20new\x20code\x20should\x20avoid\x20fields\x20named\
9199 \x20\"descriptor\".\n\n\r\n\x05\x04\n\x02\x01\x04\x12\x04\x92\x03\x02\n\
9200 \n\r\n\x05\x04\n\x02\x01\x05\x12\x04\x92\x03\x0b\x0f\n\r\n\x05\x04\n\x02\
9201 \x01\x01\x12\x04\x92\x03\x10/\n\r\n\x05\x04\n\x02\x01\x03\x12\x04\x92\
9202 \x0323\n\r\n\x05\x04\n\x02\x01\x08\x12\x04\x92\x034C\n\r\n\x05\x04\n\x02\
9203 \x01\x07\x12\x04\x92\x03=B\n\xee\x01\n\x04\x04\n\x02\x02\x12\x04\x98\x03\
9204 \x02/\x1a\xdf\x01\x20Is\x20this\x20message\x20deprecated?\n\x20Depending\
9205 \x20on\x20the\x20target\x20platform,\x20this\x20can\x20emit\x20Deprecate\
9206 d\x20annotations\n\x20for\x20the\x20message,\x20or\x20it\x20will\x20be\
9207 \x20completely\x20ignored;\x20in\x20the\x20very\x20least,\n\x20this\x20i\
9208 s\x20a\x20formalization\x20for\x20deprecating\x20messages.\n\n\r\n\x05\
9209 \x04\n\x02\x02\x04\x12\x04\x98\x03\x02\n\n\r\n\x05\x04\n\x02\x02\x05\x12\
9210 \x04\x98\x03\x0b\x0f\n\r\n\x05\x04\n\x02\x02\x01\x12\x04\x98\x03\x10\x1a\
9211 \n\r\n\x05\x04\n\x02\x02\x03\x12\x04\x98\x03\x1d\x1e\n\r\n\x05\x04\n\x02\
9212 \x02\x08\x12\x04\x98\x03\x1f.\n\r\n\x05\x04\n\x02\x02\x07\x12\x04\x98\
9213 \x03(-\n\x9e\x06\n\x04\x04\n\x02\x03\x12\x04\xaf\x03\x02\x1e\x1a\x8f\x06\
9214 \x20Whether\x20the\x20message\x20is\x20an\x20automatically\x20generated\
9215 \x20map\x20entry\x20type\x20for\x20the\n\x20maps\x20field.\n\n\x20For\
9216 \x20maps\x20fields:\n\x20\x20\x20\x20\x20map<KeyType,\x20ValueType>\x20m\
9217 ap_field\x20=\x201;\n\x20The\x20parsed\x20descriptor\x20looks\x20like:\n\
9218 \x20\x20\x20\x20\x20message\x20MapFieldEntry\x20{\n\x20\x20\x20\x20\x20\
9219 \x20\x20\x20\x20option\x20map_entry\x20=\x20true;\n\x20\x20\x20\x20\x20\
9220 \x20\x20\x20\x20optional\x20KeyType\x20key\x20=\x201;\n\x20\x20\x20\x20\
9221 \x20\x20\x20\x20\x20optional\x20ValueType\x20value\x20=\x202;\n\x20\x20\
9222 \x20\x20\x20}\n\x20\x20\x20\x20\x20repeated\x20MapFieldEntry\x20map_fiel\
9223 d\x20=\x201;\n\n\x20Implementations\x20may\x20choose\x20not\x20to\x20gen\
9224 erate\x20the\x20map_entry=true\x20message,\x20but\n\x20use\x20a\x20nativ\
9225 e\x20map\x20in\x20the\x20target\x20language\x20to\x20hold\x20the\x20keys\
9226 \x20and\x20values.\n\x20The\x20reflection\x20APIs\x20in\x20such\x20imple\
9227 mentions\x20still\x20need\x20to\x20work\x20as\n\x20if\x20the\x20field\
9228 \x20is\x20a\x20repeated\x20message\x20field.\n\n\x20NOTE:\x20Do\x20not\
9229 \x20set\x20the\x20option\x20in\x20.proto\x20files.\x20Always\x20use\x20t\
9230 he\x20maps\x20syntax\n\x20instead.\x20The\x20option\x20should\x20only\
9231 \x20be\x20implicitly\x20set\x20by\x20the\x20proto\x20compiler\n\x20parse\
9232 r.\n\n\r\n\x05\x04\n\x02\x03\x04\x12\x04\xaf\x03\x02\n\n\r\n\x05\x04\n\
9233 \x02\x03\x05\x12\x04\xaf\x03\x0b\x0f\n\r\n\x05\x04\n\x02\x03\x01\x12\x04\
9234 \xaf\x03\x10\x19\n\r\n\x05\x04\n\x02\x03\x03\x12\x04\xaf\x03\x1c\x1d\nO\
9235 \n\x04\x04\n\x02\x04\x12\x04\xb2\x03\x02:\x1aA\x20The\x20parser\x20store\
9236 s\x20options\x20it\x20doesn't\x20recognize\x20here.\x20See\x20above.\n\n\
9237 \r\n\x05\x04\n\x02\x04\x04\x12\x04\xb2\x03\x02\n\n\r\n\x05\x04\n\x02\x04\
9238 \x06\x12\x04\xb2\x03\x0b\x1e\n\r\n\x05\x04\n\x02\x04\x01\x12\x04\xb2\x03\
9239 \x1f3\n\r\n\x05\x04\n\x02\x04\x03\x12\x04\xb2\x0369\nZ\n\x03\x04\n\x05\
9240 \x12\x04\xb5\x03\x02\x19\x1aM\x20Clients\x20can\x20define\x20custom\x20o\
9241 ptions\x20in\x20extensions\x20of\x20this\x20message.\x20See\x20above.\n\
9242 \n\x0c\n\x04\x04\n\x05\0\x12\x04\xb5\x03\r\x18\n\r\n\x05\x04\n\x05\0\x01\
9243 \x12\x04\xb5\x03\r\x11\n\r\n\x05\x04\n\x05\0\x02\x12\x04\xb5\x03\x15\x18\
9244 \n\x0c\n\x02\x04\x0b\x12\x06\xba\x03\0\x93\x04\x01\n\x0b\n\x03\x04\x0b\
9245 \x01\x12\x04\xba\x03\x08\x14\n\xa3\x02\n\x04\x04\x0b\x02\0\x12\x04\xbf\
9246 \x03\x02.\x1a\x94\x02\x20The\x20ctype\x20option\x20instructs\x20the\x20C\
9247 ++\x20code\x20generator\x20to\x20use\x20a\x20different\n\x20representati\
9248 on\x20of\x20the\x20field\x20than\x20it\x20normally\x20would.\x20\x20See\
9249 \x20the\x20specific\n\x20options\x20below.\x20\x20This\x20option\x20is\
9250 \x20not\x20yet\x20implemented\x20in\x20the\x20open\x20source\n\x20releas\
9251 e\x20--\x20sorry,\x20we'll\x20try\x20to\x20include\x20it\x20in\x20a\x20f\
9252 uture\x20version!\n\n\r\n\x05\x04\x0b\x02\0\x04\x12\x04\xbf\x03\x02\n\n\
9253 \r\n\x05\x04\x0b\x02\0\x06\x12\x04\xbf\x03\x0b\x10\n\r\n\x05\x04\x0b\x02\
9254 \0\x01\x12\x04\xbf\x03\x11\x16\n\r\n\x05\x04\x0b\x02\0\x03\x12\x04\xbf\
9255 \x03\x19\x1a\n\r\n\x05\x04\x0b\x02\0\x08\x12\x04\xbf\x03\x1b-\n\r\n\x05\
9256 \x04\x0b\x02\0\x07\x12\x04\xbf\x03&,\n\x0e\n\x04\x04\x0b\x04\0\x12\x06\
9257 \xc0\x03\x02\xc7\x03\x03\n\r\n\x05\x04\x0b\x04\0\x01\x12\x04\xc0\x03\x07\
9258 \x0c\n\x1f\n\x06\x04\x0b\x04\0\x02\0\x12\x04\xc2\x03\x04\x0f\x1a\x0f\x20\
9259 Default\x20mode.\n\n\x0f\n\x07\x04\x0b\x04\0\x02\0\x01\x12\x04\xc2\x03\
9260 \x04\n\n\x0f\n\x07\x04\x0b\x04\0\x02\0\x02\x12\x04\xc2\x03\r\x0e\n\x0e\n\
9261 \x06\x04\x0b\x04\0\x02\x01\x12\x04\xc4\x03\x04\r\n\x0f\n\x07\x04\x0b\x04\
9262 \0\x02\x01\x01\x12\x04\xc4\x03\x04\x08\n\x0f\n\x07\x04\x0b\x04\0\x02\x01\
9263 \x02\x12\x04\xc4\x03\x0b\x0c\n\x0e\n\x06\x04\x0b\x04\0\x02\x02\x12\x04\
9264 \xc6\x03\x04\x15\n\x0f\n\x07\x04\x0b\x04\0\x02\x02\x01\x12\x04\xc6\x03\
9265 \x04\x10\n\x0f\n\x07\x04\x0b\x04\0\x02\x02\x02\x12\x04\xc6\x03\x13\x14\n\
9266 \xda\x02\n\x04\x04\x0b\x02\x01\x12\x04\xcd\x03\x02\x1b\x1a\xcb\x02\x20Th\
9267 e\x20packed\x20option\x20can\x20be\x20enabled\x20for\x20repeated\x20prim\
9268 itive\x20fields\x20to\x20enable\n\x20a\x20more\x20efficient\x20represent\
9269 ation\x20on\x20the\x20wire.\x20Rather\x20than\x20repeatedly\n\x20writing\
9270 \x20the\x20tag\x20and\x20type\x20for\x20each\x20element,\x20the\x20entir\
9271 e\x20array\x20is\x20encoded\x20as\n\x20a\x20single\x20length-delimited\
9272 \x20blob.\x20In\x20proto3,\x20only\x20explicit\x20setting\x20it\x20to\n\
9273 \x20false\x20will\x20avoid\x20using\x20packed\x20encoding.\n\n\r\n\x05\
9274 \x04\x0b\x02\x01\x04\x12\x04\xcd\x03\x02\n\n\r\n\x05\x04\x0b\x02\x01\x05\
9275 \x12\x04\xcd\x03\x0b\x0f\n\r\n\x05\x04\x0b\x02\x01\x01\x12\x04\xcd\x03\
9276 \x10\x16\n\r\n\x05\x04\x0b\x02\x01\x03\x12\x04\xcd\x03\x19\x1a\n\xe4\x04\
9277 \n\x04\x04\x0b\x02\x02\x12\x04\xd8\x03\x023\x1a\xd5\x04\x20The\x20jstype\
9278 \x20option\x20determines\x20the\x20JavaScript\x20type\x20used\x20for\x20\
9279 values\x20of\x20the\n\x20field.\x20\x20The\x20option\x20is\x20permitted\
9280 \x20only\x20for\x2064\x20bit\x20integral\x20and\x20fixed\x20types\n\x20(\
9281 int64,\x20uint64,\x20sint64,\x20fixed64,\x20sfixed64).\x20\x20By\x20defa\
9282 ult\x20these\x20types\x20are\n\x20represented\x20as\x20JavaScript\x20str\
9283 ings.\x20\x20This\x20avoids\x20loss\x20of\x20precision\x20that\x20can\n\
9284 \x20happen\x20when\x20a\x20large\x20value\x20is\x20converted\x20to\x20a\
9285 \x20floating\x20point\x20JavaScript\n\x20numbers.\x20\x20Specifying\x20J\
9286 S_NUMBER\x20for\x20the\x20jstype\x20causes\x20the\x20generated\n\x20Java\
9287 Script\x20code\x20to\x20use\x20the\x20JavaScript\x20\"number\"\x20type\
9288 \x20instead\x20of\x20strings.\n\x20This\x20option\x20is\x20an\x20enum\
9289 \x20to\x20permit\x20additional\x20types\x20to\x20be\x20added,\n\x20e.g.\
9290 \x20goog.math.Integer.\n\n\r\n\x05\x04\x0b\x02\x02\x04\x12\x04\xd8\x03\
9291 \x02\n\n\r\n\x05\x04\x0b\x02\x02\x06\x12\x04\xd8\x03\x0b\x11\n\r\n\x05\
9292 \x04\x0b\x02\x02\x01\x12\x04\xd8\x03\x12\x18\n\r\n\x05\x04\x0b\x02\x02\
9293 \x03\x12\x04\xd8\x03\x1b\x1c\n\r\n\x05\x04\x0b\x02\x02\x08\x12\x04\xd8\
9294 \x03\x1d2\n\r\n\x05\x04\x0b\x02\x02\x07\x12\x04\xd8\x03(1\n\x0e\n\x04\
9295 \x04\x0b\x04\x01\x12\x06\xd9\x03\x02\xe2\x03\x03\n\r\n\x05\x04\x0b\x04\
9296 \x01\x01\x12\x04\xd9\x03\x07\r\n'\n\x06\x04\x0b\x04\x01\x02\0\x12\x04\
9297 \xdb\x03\x04\x12\x1a\x17\x20Use\x20the\x20default\x20type.\n\n\x0f\n\x07\
9298 \x04\x0b\x04\x01\x02\0\x01\x12\x04\xdb\x03\x04\r\n\x0f\n\x07\x04\x0b\x04\
9299 \x01\x02\0\x02\x12\x04\xdb\x03\x10\x11\n)\n\x06\x04\x0b\x04\x01\x02\x01\
9300 \x12\x04\xde\x03\x04\x12\x1a\x19\x20Use\x20JavaScript\x20strings.\n\n\
9301 \x0f\n\x07\x04\x0b\x04\x01\x02\x01\x01\x12\x04\xde\x03\x04\r\n\x0f\n\x07\
9302 \x04\x0b\x04\x01\x02\x01\x02\x12\x04\xde\x03\x10\x11\n)\n\x06\x04\x0b\
9303 \x04\x01\x02\x02\x12\x04\xe1\x03\x04\x12\x1a\x19\x20Use\x20JavaScript\
9304 \x20numbers.\n\n\x0f\n\x07\x04\x0b\x04\x01\x02\x02\x01\x12\x04\xe1\x03\
9305 \x04\r\n\x0f\n\x07\x04\x0b\x04\x01\x02\x02\x02\x12\x04\xe1\x03\x10\x11\n\
9306 \xef\x0c\n\x04\x04\x0b\x02\x03\x12\x04\x80\x04\x02)\x1a\xe0\x0c\x20Shoul\
9307 d\x20this\x20field\x20be\x20parsed\x20lazily?\x20\x20Lazy\x20applies\x20\
9308 only\x20to\x20message-type\n\x20fields.\x20\x20It\x20means\x20that\x20wh\
9309 en\x20the\x20outer\x20message\x20is\x20initially\x20parsed,\x20the\n\x20\
9310 inner\x20message's\x20contents\x20will\x20not\x20be\x20parsed\x20but\x20\
9311 instead\x20stored\x20in\x20encoded\n\x20form.\x20\x20The\x20inner\x20mes\
9312 sage\x20will\x20actually\x20be\x20parsed\x20when\x20it\x20is\x20first\
9313 \x20accessed.\n\n\x20This\x20is\x20only\x20a\x20hint.\x20\x20Implementat\
9314 ions\x20are\x20free\x20to\x20choose\x20whether\x20to\x20use\n\x20eager\
9315 \x20or\x20lazy\x20parsing\x20regardless\x20of\x20the\x20value\x20of\x20t\
9316 his\x20option.\x20\x20However,\n\x20setting\x20this\x20option\x20true\
9317 \x20suggests\x20that\x20the\x20protocol\x20author\x20believes\x20that\n\
9318 \x20using\x20lazy\x20parsing\x20on\x20this\x20field\x20is\x20worth\x20th\
9319 e\x20additional\x20bookkeeping\n\x20overhead\x20typically\x20needed\x20t\
9320 o\x20implement\x20it.\n\n\x20This\x20option\x20does\x20not\x20affect\x20\
9321 the\x20public\x20interface\x20of\x20any\x20generated\x20code;\n\x20all\
9322 \x20method\x20signatures\x20remain\x20the\x20same.\x20\x20Furthermore,\
9323 \x20thread-safety\x20of\x20the\n\x20interface\x20is\x20not\x20affected\
9324 \x20by\x20this\x20option;\x20const\x20methods\x20remain\x20safe\x20to\n\
9325 \x20call\x20from\x20multiple\x20threads\x20concurrently,\x20while\x20non\
9326 -const\x20methods\x20continue\n\x20to\x20require\x20exclusive\x20access.\
9327 \n\n\n\x20Note\x20that\x20implementations\x20may\x20choose\x20not\x20to\
9328 \x20check\x20required\x20fields\x20within\n\x20a\x20lazy\x20sub-message.\
9329 \x20\x20That\x20is,\x20calling\x20IsInitialized()\x20on\x20the\x20outer\
9330 \x20message\n\x20may\x20return\x20true\x20even\x20if\x20the\x20inner\x20\
9331 message\x20has\x20missing\x20required\x20fields.\n\x20This\x20is\x20nece\
9332 ssary\x20because\x20otherwise\x20the\x20inner\x20message\x20would\x20hav\
9333 e\x20to\x20be\n\x20parsed\x20in\x20order\x20to\x20perform\x20the\x20chec\
9334 k,\x20defeating\x20the\x20purpose\x20of\x20lazy\n\x20parsing.\x20\x20An\
9335 \x20implementation\x20which\x20chooses\x20not\x20to\x20check\x20required\
9336 \x20fields\n\x20must\x20be\x20consistent\x20about\x20it.\x20\x20That\x20\
9337 is,\x20for\x20any\x20particular\x20sub-message,\x20the\n\x20implementati\
9338 on\x20must\x20either\x20*always*\x20check\x20its\x20required\x20fields,\
9339 \x20or\x20*never*\n\x20check\x20its\x20required\x20fields,\x20regardless\
9340 \x20of\x20whether\x20or\x20not\x20the\x20message\x20has\n\x20been\x20par\
9341 sed.\n\n\r\n\x05\x04\x0b\x02\x03\x04\x12\x04\x80\x04\x02\n\n\r\n\x05\x04\
9342 \x0b\x02\x03\x05\x12\x04\x80\x04\x0b\x0f\n\r\n\x05\x04\x0b\x02\x03\x01\
9343 \x12\x04\x80\x04\x10\x14\n\r\n\x05\x04\x0b\x02\x03\x03\x12\x04\x80\x04\
9344 \x17\x18\n\r\n\x05\x04\x0b\x02\x03\x08\x12\x04\x80\x04\x19(\n\r\n\x05\
9345 \x04\x0b\x02\x03\x07\x12\x04\x80\x04\"'\n\xe8\x01\n\x04\x04\x0b\x02\x04\
9346 \x12\x04\x86\x04\x02/\x1a\xd9\x01\x20Is\x20this\x20field\x20deprecated?\
9347 \n\x20Depending\x20on\x20the\x20target\x20platform,\x20this\x20can\x20em\
9348 it\x20Deprecated\x20annotations\n\x20for\x20accessors,\x20or\x20it\x20wi\
9349 ll\x20be\x20completely\x20ignored;\x20in\x20the\x20very\x20least,\x20thi\
9350 s\n\x20is\x20a\x20formalization\x20for\x20deprecating\x20fields.\n\n\r\n\
9351 \x05\x04\x0b\x02\x04\x04\x12\x04\x86\x04\x02\n\n\r\n\x05\x04\x0b\x02\x04\
9352 \x05\x12\x04\x86\x04\x0b\x0f\n\r\n\x05\x04\x0b\x02\x04\x01\x12\x04\x86\
9353 \x04\x10\x1a\n\r\n\x05\x04\x0b\x02\x04\x03\x12\x04\x86\x04\x1d\x1e\n\r\n\
9354 \x05\x04\x0b\x02\x04\x08\x12\x04\x86\x04\x1f.\n\r\n\x05\x04\x0b\x02\x04\
9355 \x07\x12\x04\x86\x04(-\n?\n\x04\x04\x0b\x02\x05\x12\x04\x89\x04\x02*\x1a\
9356 1\x20For\x20Google-internal\x20migration\x20only.\x20Do\x20not\x20use.\n\
9357 \n\r\n\x05\x04\x0b\x02\x05\x04\x12\x04\x89\x04\x02\n\n\r\n\x05\x04\x0b\
9358 \x02\x05\x05\x12\x04\x89\x04\x0b\x0f\n\r\n\x05\x04\x0b\x02\x05\x01\x12\
9359 \x04\x89\x04\x10\x14\n\r\n\x05\x04\x0b\x02\x05\x03\x12\x04\x89\x04\x17\
9360 \x19\n\r\n\x05\x04\x0b\x02\x05\x08\x12\x04\x89\x04\x1a)\n\r\n\x05\x04\
9361 \x0b\x02\x05\x07\x12\x04\x89\x04#(\nO\n\x04\x04\x0b\x02\x06\x12\x04\x8d\
9362 \x04\x02:\x1aA\x20The\x20parser\x20stores\x20options\x20it\x20doesn't\
9363 \x20recognize\x20here.\x20See\x20above.\n\n\r\n\x05\x04\x0b\x02\x06\x04\
9364 \x12\x04\x8d\x04\x02\n\n\r\n\x05\x04\x0b\x02\x06\x06\x12\x04\x8d\x04\x0b\
9365 \x1e\n\r\n\x05\x04\x0b\x02\x06\x01\x12\x04\x8d\x04\x1f3\n\r\n\x05\x04\
9366 \x0b\x02\x06\x03\x12\x04\x8d\x0469\nZ\n\x03\x04\x0b\x05\x12\x04\x90\x04\
9367 \x02\x19\x1aM\x20Clients\x20can\x20define\x20custom\x20options\x20in\x20\
9368 extensions\x20of\x20this\x20message.\x20See\x20above.\n\n\x0c\n\x04\x04\
9369 \x0b\x05\0\x12\x04\x90\x04\r\x18\n\r\n\x05\x04\x0b\x05\0\x01\x12\x04\x90\
9370 \x04\r\x11\n\r\n\x05\x04\x0b\x05\0\x02\x12\x04\x90\x04\x15\x18\n\x0c\n\
9371 \x02\x04\x0c\x12\x06\x95\x04\0\x9b\x04\x01\n\x0b\n\x03\x04\x0c\x01\x12\
9372 \x04\x95\x04\x08\x14\nO\n\x04\x04\x0c\x02\0\x12\x04\x97\x04\x02:\x1aA\
9373 \x20The\x20parser\x20stores\x20options\x20it\x20doesn't\x20recognize\x20\
9374 here.\x20See\x20above.\n\n\r\n\x05\x04\x0c\x02\0\x04\x12\x04\x97\x04\x02\
9375 \n\n\r\n\x05\x04\x0c\x02\0\x06\x12\x04\x97\x04\x0b\x1e\n\r\n\x05\x04\x0c\
9376 \x02\0\x01\x12\x04\x97\x04\x1f3\n\r\n\x05\x04\x0c\x02\0\x03\x12\x04\x97\
9377 \x0469\nZ\n\x03\x04\x0c\x05\x12\x04\x9a\x04\x02\x19\x1aM\x20Clients\x20c\
9378 an\x20define\x20custom\x20options\x20in\x20extensions\x20of\x20this\x20m\
9379 essage.\x20See\x20above.\n\n\x0c\n\x04\x04\x0c\x05\0\x12\x04\x9a\x04\r\
9380 \x18\n\r\n\x05\x04\x0c\x05\0\x01\x12\x04\x9a\x04\r\x11\n\r\n\x05\x04\x0c\
9381 \x05\0\x02\x12\x04\x9a\x04\x15\x18\n\x0c\n\x02\x04\r\x12\x06\x9d\x04\0\
9382 \xae\x04\x01\n\x0b\n\x03\x04\r\x01\x12\x04\x9d\x04\x08\x13\n`\n\x04\x04\
9383 \r\x02\0\x12\x04\xa1\x04\x02\x20\x1aR\x20Set\x20this\x20option\x20to\x20\
9384 true\x20to\x20allow\x20mapping\x20different\x20tag\x20names\x20to\x20the\
9385 \x20same\n\x20value.\n\n\r\n\x05\x04\r\x02\0\x04\x12\x04\xa1\x04\x02\n\n\
9386 \r\n\x05\x04\r\x02\0\x05\x12\x04\xa1\x04\x0b\x0f\n\r\n\x05\x04\r\x02\0\
9387 \x01\x12\x04\xa1\x04\x10\x1b\n\r\n\x05\x04\r\x02\0\x03\x12\x04\xa1\x04\
9388 \x1e\x1f\n\xe5\x01\n\x04\x04\r\x02\x01\x12\x04\xa7\x04\x02/\x1a\xd6\x01\
9389 \x20Is\x20this\x20enum\x20deprecated?\n\x20Depending\x20on\x20the\x20tar\
9390 get\x20platform,\x20this\x20can\x20emit\x20Deprecated\x20annotations\n\
9391 \x20for\x20the\x20enum,\x20or\x20it\x20will\x20be\x20completely\x20ignor\
9392 ed;\x20in\x20the\x20very\x20least,\x20this\n\x20is\x20a\x20formalization\
9393 \x20for\x20deprecating\x20enums.\n\n\r\n\x05\x04\r\x02\x01\x04\x12\x04\
9394 \xa7\x04\x02\n\n\r\n\x05\x04\r\x02\x01\x05\x12\x04\xa7\x04\x0b\x0f\n\r\n\
9395 \x05\x04\r\x02\x01\x01\x12\x04\xa7\x04\x10\x1a\n\r\n\x05\x04\r\x02\x01\
9396 \x03\x12\x04\xa7\x04\x1d\x1e\n\r\n\x05\x04\r\x02\x01\x08\x12\x04\xa7\x04\
9397 \x1f.\n\r\n\x05\x04\r\x02\x01\x07\x12\x04\xa7\x04(-\nO\n\x04\x04\r\x02\
9398 \x02\x12\x04\xaa\x04\x02:\x1aA\x20The\x20parser\x20stores\x20options\x20\
9399 it\x20doesn't\x20recognize\x20here.\x20See\x20above.\n\n\r\n\x05\x04\r\
9400 \x02\x02\x04\x12\x04\xaa\x04\x02\n\n\r\n\x05\x04\r\x02\x02\x06\x12\x04\
9401 \xaa\x04\x0b\x1e\n\r\n\x05\x04\r\x02\x02\x01\x12\x04\xaa\x04\x1f3\n\r\n\
9402 \x05\x04\r\x02\x02\x03\x12\x04\xaa\x0469\nZ\n\x03\x04\r\x05\x12\x04\xad\
9403 \x04\x02\x19\x1aM\x20Clients\x20can\x20define\x20custom\x20options\x20in\
9404 \x20extensions\x20of\x20this\x20message.\x20See\x20above.\n\n\x0c\n\x04\
9405 \x04\r\x05\0\x12\x04\xad\x04\r\x18\n\r\n\x05\x04\r\x05\0\x01\x12\x04\xad\
9406 \x04\r\x11\n\r\n\x05\x04\r\x05\0\x02\x12\x04\xad\x04\x15\x18\n\x0c\n\x02\
9407 \x04\x0e\x12\x06\xb0\x04\0\xbc\x04\x01\n\x0b\n\x03\x04\x0e\x01\x12\x04\
9408 \xb0\x04\x08\x18\n\xf7\x01\n\x04\x04\x0e\x02\0\x12\x04\xb5\x04\x02/\x1a\
9409 \xe8\x01\x20Is\x20this\x20enum\x20value\x20deprecated?\n\x20Depending\
9410 \x20on\x20the\x20target\x20platform,\x20this\x20can\x20emit\x20Deprecate\
9411 d\x20annotations\n\x20for\x20the\x20enum\x20value,\x20or\x20it\x20will\
9412 \x20be\x20completely\x20ignored;\x20in\x20the\x20very\x20least,\n\x20thi\
9413 s\x20is\x20a\x20formalization\x20for\x20deprecating\x20enum\x20values.\n\
9414 \n\r\n\x05\x04\x0e\x02\0\x04\x12\x04\xb5\x04\x02\n\n\r\n\x05\x04\x0e\x02\
9415 \0\x05\x12\x04\xb5\x04\x0b\x0f\n\r\n\x05\x04\x0e\x02\0\x01\x12\x04\xb5\
9416 \x04\x10\x1a\n\r\n\x05\x04\x0e\x02\0\x03\x12\x04\xb5\x04\x1d\x1e\n\r\n\
9417 \x05\x04\x0e\x02\0\x08\x12\x04\xb5\x04\x1f.\n\r\n\x05\x04\x0e\x02\0\x07\
9418 \x12\x04\xb5\x04(-\nO\n\x04\x04\x0e\x02\x01\x12\x04\xb8\x04\x02:\x1aA\
9419 \x20The\x20parser\x20stores\x20options\x20it\x20doesn't\x20recognize\x20\
9420 here.\x20See\x20above.\n\n\r\n\x05\x04\x0e\x02\x01\x04\x12\x04\xb8\x04\
9421 \x02\n\n\r\n\x05\x04\x0e\x02\x01\x06\x12\x04\xb8\x04\x0b\x1e\n\r\n\x05\
9422 \x04\x0e\x02\x01\x01\x12\x04\xb8\x04\x1f3\n\r\n\x05\x04\x0e\x02\x01\x03\
9423 \x12\x04\xb8\x0469\nZ\n\x03\x04\x0e\x05\x12\x04\xbb\x04\x02\x19\x1aM\x20\
9424 Clients\x20can\x20define\x20custom\x20options\x20in\x20extensions\x20of\
9425 \x20this\x20message.\x20See\x20above.\n\n\x0c\n\x04\x04\x0e\x05\0\x12\
9426 \x04\xbb\x04\r\x18\n\r\n\x05\x04\x0e\x05\0\x01\x12\x04\xbb\x04\r\x11\n\r\
9427 \n\x05\x04\x0e\x05\0\x02\x12\x04\xbb\x04\x15\x18\n\x0c\n\x02\x04\x0f\x12\
9428 \x06\xbe\x04\0\xd0\x04\x01\n\x0b\n\x03\x04\x0f\x01\x12\x04\xbe\x04\x08\
9429 \x16\n\xd9\x03\n\x04\x04\x0f\x02\0\x12\x04\xc9\x04\x020\x1a\xdf\x01\x20I\
9430 s\x20this\x20service\x20deprecated?\n\x20Depending\x20on\x20the\x20targe\
9431 t\x20platform,\x20this\x20can\x20emit\x20Deprecated\x20annotations\n\x20\
9432 for\x20the\x20service,\x20or\x20it\x20will\x20be\x20completely\x20ignore\
9433 d;\x20in\x20the\x20very\x20least,\n\x20this\x20is\x20a\x20formalization\
9434 \x20for\x20deprecating\x20services.\n2\xe8\x01\x20Note:\x20\x20Field\x20\
9435 numbers\x201\x20through\x2032\x20are\x20reserved\x20for\x20Google's\x20i\
9436 nternal\x20RPC\n\x20\x20\x20framework.\x20\x20We\x20apologize\x20for\x20\
9437 hoarding\x20these\x20numbers\x20to\x20ourselves,\x20but\n\x20\x20\x20we\
9438 \x20were\x20already\x20using\x20them\x20long\x20before\x20we\x20decided\
9439 \x20to\x20release\x20Protocol\n\x20\x20\x20Buffers.\n\n\r\n\x05\x04\x0f\
9440 \x02\0\x04\x12\x04\xc9\x04\x02\n\n\r\n\x05\x04\x0f\x02\0\x05\x12\x04\xc9\
9441 \x04\x0b\x0f\n\r\n\x05\x04\x0f\x02\0\x01\x12\x04\xc9\x04\x10\x1a\n\r\n\
9442 \x05\x04\x0f\x02\0\x03\x12\x04\xc9\x04\x1d\x1f\n\r\n\x05\x04\x0f\x02\0\
9443 \x08\x12\x04\xc9\x04\x20/\n\r\n\x05\x04\x0f\x02\0\x07\x12\x04\xc9\x04).\
9444 \nO\n\x04\x04\x0f\x02\x01\x12\x04\xcc\x04\x02:\x1aA\x20The\x20parser\x20\
9445 stores\x20options\x20it\x20doesn't\x20recognize\x20here.\x20See\x20above\
9446 .\n\n\r\n\x05\x04\x0f\x02\x01\x04\x12\x04\xcc\x04\x02\n\n\r\n\x05\x04\
9447 \x0f\x02\x01\x06\x12\x04\xcc\x04\x0b\x1e\n\r\n\x05\x04\x0f\x02\x01\x01\
9448 \x12\x04\xcc\x04\x1f3\n\r\n\x05\x04\x0f\x02\x01\x03\x12\x04\xcc\x0469\nZ\
9449 \n\x03\x04\x0f\x05\x12\x04\xcf\x04\x02\x19\x1aM\x20Clients\x20can\x20def\
9450 ine\x20custom\x20options\x20in\x20extensions\x20of\x20this\x20message.\
9451 \x20See\x20above.\n\n\x0c\n\x04\x04\x0f\x05\0\x12\x04\xcf\x04\r\x18\n\r\
9452 \n\x05\x04\x0f\x05\0\x01\x12\x04\xcf\x04\r\x11\n\r\n\x05\x04\x0f\x05\0\
9453 \x02\x12\x04\xcf\x04\x15\x18\n\x0c\n\x02\x04\x10\x12\x06\xd2\x04\0\xe4\
9454 \x04\x01\n\x0b\n\x03\x04\x10\x01\x12\x04\xd2\x04\x08\x15\n\xd6\x03\n\x04\
9455 \x04\x10\x02\0\x12\x04\xdd\x04\x020\x1a\xdc\x01\x20Is\x20this\x20method\
9456 \x20deprecated?\n\x20Depending\x20on\x20the\x20target\x20platform,\x20th\
9457 is\x20can\x20emit\x20Deprecated\x20annotations\n\x20for\x20the\x20method\
9458 ,\x20or\x20it\x20will\x20be\x20completely\x20ignored;\x20in\x20the\x20ve\
9459 ry\x20least,\n\x20this\x20is\x20a\x20formalization\x20for\x20deprecating\
9460 \x20methods.\n2\xe8\x01\x20Note:\x20\x20Field\x20numbers\x201\x20through\
9461 \x2032\x20are\x20reserved\x20for\x20Google's\x20internal\x20RPC\n\x20\
9462 \x20\x20framework.\x20\x20We\x20apologize\x20for\x20hoarding\x20these\
9463 \x20numbers\x20to\x20ourselves,\x20but\n\x20\x20\x20we\x20were\x20alread\
9464 y\x20using\x20them\x20long\x20before\x20we\x20decided\x20to\x20release\
9465 \x20Protocol\n\x20\x20\x20Buffers.\n\n\r\n\x05\x04\x10\x02\0\x04\x12\x04\
9466 \xdd\x04\x02\n\n\r\n\x05\x04\x10\x02\0\x05\x12\x04\xdd\x04\x0b\x0f\n\r\n\
9467 \x05\x04\x10\x02\0\x01\x12\x04\xdd\x04\x10\x1a\n\r\n\x05\x04\x10\x02\0\
9468 \x03\x12\x04\xdd\x04\x1d\x1f\n\r\n\x05\x04\x10\x02\0\x08\x12\x04\xdd\x04\
9469 \x20/\n\r\n\x05\x04\x10\x02\0\x07\x12\x04\xdd\x04).\nO\n\x04\x04\x10\x02\
9470 \x01\x12\x04\xe0\x04\x02:\x1aA\x20The\x20parser\x20stores\x20options\x20\
9471 it\x20doesn't\x20recognize\x20here.\x20See\x20above.\n\n\r\n\x05\x04\x10\
9472 \x02\x01\x04\x12\x04\xe0\x04\x02\n\n\r\n\x05\x04\x10\x02\x01\x06\x12\x04\
9473 \xe0\x04\x0b\x1e\n\r\n\x05\x04\x10\x02\x01\x01\x12\x04\xe0\x04\x1f3\n\r\
9474 \n\x05\x04\x10\x02\x01\x03\x12\x04\xe0\x0469\nZ\n\x03\x04\x10\x05\x12\
9475 \x04\xe3\x04\x02\x19\x1aM\x20Clients\x20can\x20define\x20custom\x20optio\
9476 ns\x20in\x20extensions\x20of\x20this\x20message.\x20See\x20above.\n\n\
9477 \x0c\n\x04\x04\x10\x05\0\x12\x04\xe3\x04\r\x18\n\r\n\x05\x04\x10\x05\0\
9478 \x01\x12\x04\xe3\x04\r\x11\n\r\n\x05\x04\x10\x05\0\x02\x12\x04\xe3\x04\
9479 \x15\x18\n\x8b\x03\n\x02\x04\x11\x12\x06\xed\x04\0\x81\x05\x01\x1a\xfc\
9480 \x02\x20A\x20message\x20representing\x20a\x20option\x20the\x20parser\x20\
9481 does\x20not\x20recognize.\x20This\x20only\n\x20appears\x20in\x20options\
9482 \x20protos\x20created\x20by\x20the\x20compiler::Parser\x20class.\n\x20De\
9483 scriptorPool\x20resolves\x20these\x20when\x20building\x20Descriptor\x20o\
9484 bjects.\x20Therefore,\n\x20options\x20protos\x20in\x20descriptor\x20obje\
9485 cts\x20(e.g.\x20returned\x20by\x20Descriptor::options(),\n\x20or\x20prod\
9486 uced\x20by\x20Descriptor::CopyTo())\x20will\x20never\x20have\x20Uninterp\
9487 retedOptions\n\x20in\x20them.\n\n\x0b\n\x03\x04\x11\x01\x12\x04\xed\x04\
9488 \x08\x1b\n\xcb\x02\n\x04\x04\x11\x03\0\x12\x06\xf3\x04\x02\xf6\x04\x03\
9489 \x1a\xba\x02\x20The\x20name\x20of\x20the\x20uninterpreted\x20option.\x20\
9490 \x20Each\x20string\x20represents\x20a\x20segment\x20in\n\x20a\x20dot-sep\
9491 arated\x20name.\x20\x20is_extension\x20is\x20true\x20iff\x20a\x20segment\
9492 \x20represents\x20an\n\x20extension\x20(denoted\x20with\x20parentheses\
9493 \x20in\x20options\x20specs\x20in\x20.proto\x20files).\n\x20E.g.,{\x20[\"\
9494 foo\",\x20false],\x20[\"bar.baz\",\x20true],\x20[\"qux\",\x20false]\x20}\
9495 \x20represents\n\x20\"foo.(bar.baz).qux\".\n\n\r\n\x05\x04\x11\x03\0\x01\
9496 \x12\x04\xf3\x04\n\x12\n\x0e\n\x06\x04\x11\x03\0\x02\0\x12\x04\xf4\x04\
9497 \x04\"\n\x0f\n\x07\x04\x11\x03\0\x02\0\x04\x12\x04\xf4\x04\x04\x0c\n\x0f\
9498 \n\x07\x04\x11\x03\0\x02\0\x05\x12\x04\xf4\x04\r\x13\n\x0f\n\x07\x04\x11\
9499 \x03\0\x02\0\x01\x12\x04\xf4\x04\x14\x1d\n\x0f\n\x07\x04\x11\x03\0\x02\0\
9500 \x03\x12\x04\xf4\x04\x20!\n\x0e\n\x06\x04\x11\x03\0\x02\x01\x12\x04\xf5\
9501 \x04\x04#\n\x0f\n\x07\x04\x11\x03\0\x02\x01\x04\x12\x04\xf5\x04\x04\x0c\
9502 \n\x0f\n\x07\x04\x11\x03\0\x02\x01\x05\x12\x04\xf5\x04\r\x11\n\x0f\n\x07\
9503 \x04\x11\x03\0\x02\x01\x01\x12\x04\xf5\x04\x12\x1e\n\x0f\n\x07\x04\x11\
9504 \x03\0\x02\x01\x03\x12\x04\xf5\x04!\"\n\x0c\n\x04\x04\x11\x02\0\x12\x04\
9505 \xf7\x04\x02\x1d\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xf7\x04\x02\n\n\r\n\
9506 \x05\x04\x11\x02\0\x06\x12\x04\xf7\x04\x0b\x13\n\r\n\x05\x04\x11\x02\0\
9507 \x01\x12\x04\xf7\x04\x14\x18\n\r\n\x05\x04\x11\x02\0\x03\x12\x04\xf7\x04\
9508 \x1b\x1c\n\x9c\x01\n\x04\x04\x11\x02\x01\x12\x04\xfb\x04\x02'\x1a\x8d\
9509 \x01\x20The\x20value\x20of\x20the\x20uninterpreted\x20option,\x20in\x20w\
9510 hatever\x20type\x20the\x20tokenizer\n\x20identified\x20it\x20as\x20durin\
9511 g\x20parsing.\x20Exactly\x20one\x20of\x20these\x20should\x20be\x20set.\n\
9512 \n\r\n\x05\x04\x11\x02\x01\x04\x12\x04\xfb\x04\x02\n\n\r\n\x05\x04\x11\
9513 \x02\x01\x05\x12\x04\xfb\x04\x0b\x11\n\r\n\x05\x04\x11\x02\x01\x01\x12\
9514 \x04\xfb\x04\x12\"\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xfb\x04%&\n\x0c\
9515 \n\x04\x04\x11\x02\x02\x12\x04\xfc\x04\x02)\n\r\n\x05\x04\x11\x02\x02\
9516 \x04\x12\x04\xfc\x04\x02\n\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xfc\x04\
9517 \x0b\x11\n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xfc\x04\x12$\n\r\n\x05\
9518 \x04\x11\x02\x02\x03\x12\x04\xfc\x04'(\n\x0c\n\x04\x04\x11\x02\x03\x12\
9519 \x04\xfd\x04\x02(\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xfd\x04\x02\n\n\
9520 \r\n\x05\x04\x11\x02\x03\x05\x12\x04\xfd\x04\x0b\x10\n\r\n\x05\x04\x11\
9521 \x02\x03\x01\x12\x04\xfd\x04\x11#\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\
9522 \xfd\x04&'\n\x0c\n\x04\x04\x11\x02\x04\x12\x04\xfe\x04\x02#\n\r\n\x05\
9523 \x04\x11\x02\x04\x04\x12\x04\xfe\x04\x02\n\n\r\n\x05\x04\x11\x02\x04\x05\
9524 \x12\x04\xfe\x04\x0b\x11\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\xfe\x04\
9525 \x12\x1e\n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\xfe\x04!\"\n\x0c\n\x04\
9526 \x04\x11\x02\x05\x12\x04\xff\x04\x02\"\n\r\n\x05\x04\x11\x02\x05\x04\x12\
9527 \x04\xff\x04\x02\n\n\r\n\x05\x04\x11\x02\x05\x05\x12\x04\xff\x04\x0b\x10\
9528 \n\r\n\x05\x04\x11\x02\x05\x01\x12\x04\xff\x04\x11\x1d\n\r\n\x05\x04\x11\
9529 \x02\x05\x03\x12\x04\xff\x04\x20!\n\x0c\n\x04\x04\x11\x02\x06\x12\x04\
9530 \x80\x05\x02&\n\r\n\x05\x04\x11\x02\x06\x04\x12\x04\x80\x05\x02\n\n\r\n\
9531 \x05\x04\x11\x02\x06\x05\x12\x04\x80\x05\x0b\x11\n\r\n\x05\x04\x11\x02\
9532 \x06\x01\x12\x04\x80\x05\x12!\n\r\n\x05\x04\x11\x02\x06\x03\x12\x04\x80\
9533 \x05$%\n\xda\x01\n\x02\x04\x12\x12\x06\x88\x05\0\x89\x06\x01\x1aj\x20Enc\
9534 apsulates\x20information\x20about\x20the\x20original\x20source\x20file\
9535 \x20from\x20which\x20a\n\x20FileDescriptorProto\x20was\x20generated.\n2`\
9536 \x20===================================================================\
9537 \n\x20Optional\x20source\x20code\x20info\n\n\x0b\n\x03\x04\x12\x01\x12\
9538 \x04\x88\x05\x08\x16\n\x82\x11\n\x04\x04\x12\x02\0\x12\x04\xb4\x05\x02!\
9539 \x1a\xf3\x10\x20A\x20Location\x20identifies\x20a\x20piece\x20of\x20sourc\
9540 e\x20code\x20in\x20a\x20.proto\x20file\x20which\n\x20corresponds\x20to\
9541 \x20a\x20particular\x20definition.\x20\x20This\x20information\x20is\x20i\
9542 ntended\n\x20to\x20be\x20useful\x20to\x20IDEs,\x20code\x20indexers,\x20d\
9543 ocumentation\x20generators,\x20and\x20similar\n\x20tools.\n\n\x20For\x20\
9544 example,\x20say\x20we\x20have\x20a\x20file\x20like:\n\x20\x20\x20message\
9545 \x20Foo\x20{\n\x20\x20\x20\x20\x20optional\x20string\x20foo\x20=\x201;\n\
9546 \x20\x20\x20}\n\x20Let's\x20look\x20at\x20just\x20the\x20field\x20defini\
9547 tion:\n\x20\x20\x20optional\x20string\x20foo\x20=\x201;\n\x20\x20\x20^\
9548 \x20\x20\x20\x20\x20\x20\x20^^\x20\x20\x20\x20\x20^^\x20\x20^\x20\x20^^^\
9549 \n\x20\x20\x20a\x20\x20\x20\x20\x20\x20\x20bc\x20\x20\x20\x20\x20de\x20\
9550 \x20f\x20\x20ghi\n\x20We\x20have\x20the\x20following\x20locations:\n\x20\
9551 \x20\x20span\x20\x20\x20path\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
9552 \x20\x20\x20\x20represents\n\x20\x20\x20[a,i)\x20\x20[\x204,\x200,\x202,\
9553 \x200\x20]\x20\x20\x20\x20\x20The\x20whole\x20field\x20definition.\n\x20\
9554 \x20\x20[a,b)\x20\x20[\x204,\x200,\x202,\x200,\x204\x20]\x20\x20The\x20l\
9555 abel\x20(optional).\n\x20\x20\x20[c,d)\x20\x20[\x204,\x200,\x202,\x200,\
9556 \x205\x20]\x20\x20The\x20type\x20(string).\n\x20\x20\x20[e,f)\x20\x20[\
9557 \x204,\x200,\x202,\x200,\x201\x20]\x20\x20The\x20name\x20(foo).\n\x20\
9558 \x20\x20[g,h)\x20\x20[\x204,\x200,\x202,\x200,\x203\x20]\x20\x20The\x20n\
9559 umber\x20(1).\n\n\x20Notes:\n\x20-\x20A\x20location\x20may\x20refer\x20t\
9560 o\x20a\x20repeated\x20field\x20itself\x20(i.e.\x20not\x20to\x20any\n\x20\
9561 \x20\x20particular\x20index\x20within\x20it).\x20\x20This\x20is\x20used\
9562 \x20whenever\x20a\x20set\x20of\x20elements\x20are\n\x20\x20\x20logically\
9563 \x20enclosed\x20in\x20a\x20single\x20code\x20segment.\x20\x20For\x20exam\
9564 ple,\x20an\x20entire\n\x20\x20\x20extend\x20block\x20(possibly\x20contai\
9565 ning\x20multiple\x20extension\x20definitions)\x20will\n\x20\x20\x20have\
9566 \x20an\x20outer\x20location\x20whose\x20path\x20refers\x20to\x20the\x20\
9567 \"extensions\"\x20repeated\n\x20\x20\x20field\x20without\x20an\x20index.\
9568 \n\x20-\x20Multiple\x20locations\x20may\x20have\x20the\x20same\x20path.\
9569 \x20\x20This\x20happens\x20when\x20a\x20single\n\x20\x20\x20logical\x20d\
9570 eclaration\x20is\x20spread\x20out\x20across\x20multiple\x20places.\x20\
9571 \x20The\x20most\n\x20\x20\x20obvious\x20example\x20is\x20the\x20\"extend\
9572 \"\x20block\x20again\x20--\x20there\x20may\x20be\x20multiple\n\x20\x20\
9573 \x20extend\x20blocks\x20in\x20the\x20same\x20scope,\x20each\x20of\x20whi\
9574 ch\x20will\x20have\x20the\x20same\x20path.\n\x20-\x20A\x20location's\x20\
9575 span\x20is\x20not\x20always\x20a\x20subset\x20of\x20its\x20parent's\x20s\
9576 pan.\x20\x20For\n\x20\x20\x20example,\x20the\x20\"extendee\"\x20of\x20an\
9577 \x20extension\x20declaration\x20appears\x20at\x20the\n\x20\x20\x20beginn\
9578 ing\x20of\x20the\x20\"extend\"\x20block\x20and\x20is\x20shared\x20by\x20\
9579 all\x20extensions\x20within\n\x20\x20\x20the\x20block.\n\x20-\x20Just\
9580 \x20because\x20a\x20location's\x20span\x20is\x20a\x20subset\x20of\x20som\
9581 e\x20other\x20location's\x20span\n\x20\x20\x20does\x20not\x20mean\x20tha\
9582 t\x20it\x20is\x20a\x20descendent.\x20\x20For\x20example,\x20a\x20\"group\
9583 \"\x20defines\n\x20\x20\x20both\x20a\x20type\x20and\x20a\x20field\x20in\
9584 \x20a\x20single\x20declaration.\x20\x20Thus,\x20the\x20locations\n\x20\
9585 \x20\x20corresponding\x20to\x20the\x20type\x20and\x20field\x20and\x20the\
9586 ir\x20components\x20will\x20overlap.\n\x20-\x20Code\x20which\x20tries\
9587 \x20to\x20interpret\x20locations\x20should\x20probably\x20be\x20designed\
9588 \x20to\n\x20\x20\x20ignore\x20those\x20that\x20it\x20doesn't\x20understa\
9589 nd,\x20as\x20more\x20types\x20of\x20locations\x20could\n\x20\x20\x20be\
9590 \x20recorded\x20in\x20the\x20future.\n\n\r\n\x05\x04\x12\x02\0\x04\x12\
9591 \x04\xb4\x05\x02\n\n\r\n\x05\x04\x12\x02\0\x06\x12\x04\xb4\x05\x0b\x13\n\
9592 \r\n\x05\x04\x12\x02\0\x01\x12\x04\xb4\x05\x14\x1c\n\r\n\x05\x04\x12\x02\
9593 \0\x03\x12\x04\xb4\x05\x1f\x20\n\x0e\n\x04\x04\x12\x03\0\x12\x06\xb5\x05\
9594 \x02\x88\x06\x03\n\r\n\x05\x04\x12\x03\0\x01\x12\x04\xb5\x05\n\x12\n\x83\
9595 \x07\n\x06\x04\x12\x03\0\x02\0\x12\x04\xcd\x05\x04*\x1a\xf2\x06\x20Ident\
9596 ifies\x20which\x20part\x20of\x20the\x20FileDescriptorProto\x20was\x20def\
9597 ined\x20at\x20this\n\x20location.\n\n\x20Each\x20element\x20is\x20a\x20f\
9598 ield\x20number\x20or\x20an\x20index.\x20\x20They\x20form\x20a\x20path\
9599 \x20from\n\x20the\x20root\x20FileDescriptorProto\x20to\x20the\x20place\
9600 \x20where\x20the\x20definition.\x20\x20For\n\x20example,\x20this\x20path\
9601 :\n\x20\x20\x20[\x204,\x203,\x202,\x207,\x201\x20]\n\x20refers\x20to:\n\
9602 \x20\x20\x20file.message_type(3)\x20\x20//\x204,\x203\n\x20\x20\x20\x20\
9603 \x20\x20\x20.field(7)\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x202,\x207\n\
9604 \x20\x20\x20\x20\x20\x20\x20.name()\x20\x20\x20\x20\x20\x20\x20\x20\x20\
9605 \x20\x20//\x201\n\x20This\x20is\x20because\x20FileDescriptorProto.messag\
9606 e_type\x20has\x20field\x20number\x204:\n\x20\x20\x20repeated\x20Descript\
9607 orProto\x20message_type\x20=\x204;\n\x20and\x20DescriptorProto.field\x20\
9608 has\x20field\x20number\x202:\n\x20\x20\x20repeated\x20FieldDescriptorPro\
9609 to\x20field\x20=\x202;\n\x20and\x20FieldDescriptorProto.name\x20has\x20f\
9610 ield\x20number\x201:\n\x20\x20\x20optional\x20string\x20name\x20=\x201;\
9611 \n\n\x20Thus,\x20the\x20above\x20path\x20gives\x20the\x20location\x20of\
9612 \x20a\x20field\x20name.\x20\x20If\x20we\x20removed\n\x20the\x20last\x20e\
9613 lement:\n\x20\x20\x20[\x204,\x203,\x202,\x207\x20]\n\x20this\x20path\x20\
9614 refers\x20to\x20the\x20whole\x20field\x20declaration\x20(from\x20the\x20\
9615 beginning\n\x20of\x20the\x20label\x20to\x20the\x20terminating\x20semicol\
9616 on).\n\n\x0f\n\x07\x04\x12\x03\0\x02\0\x04\x12\x04\xcd\x05\x04\x0c\n\x0f\
9617 \n\x07\x04\x12\x03\0\x02\0\x05\x12\x04\xcd\x05\r\x12\n\x0f\n\x07\x04\x12\
9618 \x03\0\x02\0\x01\x12\x04\xcd\x05\x13\x17\n\x0f\n\x07\x04\x12\x03\0\x02\0\
9619 \x03\x12\x04\xcd\x05\x1a\x1b\n\x0f\n\x07\x04\x12\x03\0\x02\0\x08\x12\x04\
9620 \xcd\x05\x1c)\n\x10\n\x08\x04\x12\x03\0\x02\0\x08\x02\x12\x04\xcd\x05\
9621 \x1d(\n\xd2\x02\n\x06\x04\x12\x03\0\x02\x01\x12\x04\xd4\x05\x04*\x1a\xc1\
9622 \x02\x20Always\x20has\x20exactly\x20three\x20or\x20four\x20elements:\x20\
9623 start\x20line,\x20start\x20column,\n\x20end\x20line\x20(optional,\x20oth\
9624 erwise\x20assumed\x20same\x20as\x20start\x20line),\x20end\x20column.\n\
9625 \x20These\x20are\x20packed\x20into\x20a\x20single\x20field\x20for\x20eff\
9626 iciency.\x20\x20Note\x20that\x20line\n\x20and\x20column\x20numbers\x20ar\
9627 e\x20zero-based\x20--\x20typically\x20you\x20will\x20want\x20to\x20add\n\
9628 \x201\x20to\x20each\x20before\x20displaying\x20to\x20a\x20user.\n\n\x0f\
9629 \n\x07\x04\x12\x03\0\x02\x01\x04\x12\x04\xd4\x05\x04\x0c\n\x0f\n\x07\x04\
9630 \x12\x03\0\x02\x01\x05\x12\x04\xd4\x05\r\x12\n\x0f\n\x07\x04\x12\x03\0\
9631 \x02\x01\x01\x12\x04\xd4\x05\x13\x17\n\x0f\n\x07\x04\x12\x03\0\x02\x01\
9632 \x03\x12\x04\xd4\x05\x1a\x1b\n\x0f\n\x07\x04\x12\x03\0\x02\x01\x08\x12\
9633 \x04\xd4\x05\x1c)\n\x10\n\x08\x04\x12\x03\0\x02\x01\x08\x02\x12\x04\xd4\
9634 \x05\x1d(\n\xa5\x0c\n\x06\x04\x12\x03\0\x02\x02\x12\x04\x85\x06\x04)\x1a\
9635 \x94\x0c\x20If\x20this\x20SourceCodeInfo\x20represents\x20a\x20complete\
9636 \x20declaration,\x20these\x20are\x20any\n\x20comments\x20appearing\x20be\
9637 fore\x20and\x20after\x20the\x20declaration\x20which\x20appear\x20to\x20b\
9638 e\n\x20attached\x20to\x20the\x20declaration.\n\n\x20A\x20series\x20of\
9639 \x20line\x20comments\x20appearing\x20on\x20consecutive\x20lines,\x20with\
9640 \x20no\x20other\n\x20tokens\x20appearing\x20on\x20those\x20lines,\x20wil\
9641 l\x20be\x20treated\x20as\x20a\x20single\x20comment.\n\n\x20leading_detac\
9642 hed_comments\x20will\x20keep\x20paragraphs\x20of\x20comments\x20that\x20\
9643 appear\n\x20before\x20(but\x20not\x20connected\x20to)\x20the\x20current\
9644 \x20element.\x20Each\x20paragraph,\n\x20separated\x20by\x20empty\x20line\
9645 s,\x20will\x20be\x20one\x20comment\x20element\x20in\x20the\x20repeated\n\
9646 \x20field.\n\n\x20Only\x20the\x20comment\x20content\x20is\x20provided;\
9647 \x20comment\x20markers\x20(e.g.\x20//)\x20are\n\x20stripped\x20out.\x20\
9648 \x20For\x20block\x20comments,\x20leading\x20whitespace\x20and\x20an\x20a\
9649 sterisk\n\x20will\x20be\x20stripped\x20from\x20the\x20beginning\x20of\
9650 \x20each\x20line\x20other\x20than\x20the\x20first.\n\x20Newlines\x20are\
9651 \x20included\x20in\x20the\x20output.\n\n\x20Examples:\n\n\x20\x20\x20opt\
9652 ional\x20int32\x20foo\x20=\x201;\x20\x20//\x20Comment\x20attached\x20to\
9653 \x20foo.\n\x20\x20\x20//\x20Comment\x20attached\x20to\x20bar.\n\x20\x20\
9654 \x20optional\x20int32\x20bar\x20=\x202;\n\n\x20\x20\x20optional\x20strin\
9655 g\x20baz\x20=\x203;\n\x20\x20\x20//\x20Comment\x20attached\x20to\x20baz.\
9656 \n\x20\x20\x20//\x20Another\x20line\x20attached\x20to\x20baz.\n\n\x20\
9657 \x20\x20//\x20Comment\x20attached\x20to\x20qux.\n\x20\x20\x20//\n\x20\
9658 \x20\x20//\x20Another\x20line\x20attached\x20to\x20qux.\n\x20\x20\x20opt\
9659 ional\x20double\x20qux\x20=\x204;\n\n\x20\x20\x20//\x20Detached\x20comme\
9660 nt\x20for\x20corge.\x20This\x20is\x20not\x20leading\x20or\x20trailing\
9661 \x20comments\n\x20\x20\x20//\x20to\x20qux\x20or\x20corge\x20because\x20t\
9662 here\x20are\x20blank\x20lines\x20separating\x20it\x20from\n\x20\x20\x20/\
9663 /\x20both.\n\n\x20\x20\x20//\x20Detached\x20comment\x20for\x20corge\x20p\
9664 aragraph\x202.\n\n\x20\x20\x20optional\x20string\x20corge\x20=\x205;\n\
9665 \x20\x20\x20/*\x20Block\x20comment\x20attached\n\x20\x20\x20\x20*\x20to\
9666 \x20corge.\x20\x20Leading\x20asterisks\n\x20\x20\x20\x20*\x20will\x20be\
9667 \x20removed.\x20*/\n\x20\x20\x20/*\x20Block\x20comment\x20attached\x20to\
9668 \n\x20\x20\x20\x20*\x20grault.\x20*/\n\x20\x20\x20optional\x20int32\x20g\
9669 rault\x20=\x206;\n\n\x20\x20\x20//\x20ignored\x20detached\x20comments.\n\
9670 \n\x0f\n\x07\x04\x12\x03\0\x02\x02\x04\x12\x04\x85\x06\x04\x0c\n\x0f\n\
9671 \x07\x04\x12\x03\0\x02\x02\x05\x12\x04\x85\x06\r\x13\n\x0f\n\x07\x04\x12\
9672 \x03\0\x02\x02\x01\x12\x04\x85\x06\x14$\n\x0f\n\x07\x04\x12\x03\0\x02\
9673 \x02\x03\x12\x04\x85\x06'(\n\x0e\n\x06\x04\x12\x03\0\x02\x03\x12\x04\x86\
9674 \x06\x04*\n\x0f\n\x07\x04\x12\x03\0\x02\x03\x04\x12\x04\x86\x06\x04\x0c\
9675 \n\x0f\n\x07\x04\x12\x03\0\x02\x03\x05\x12\x04\x86\x06\r\x13\n\x0f\n\x07\
9676 \x04\x12\x03\0\x02\x03\x01\x12\x04\x86\x06\x14%\n\x0f\n\x07\x04\x12\x03\
9677 \0\x02\x03\x03\x12\x04\x86\x06()\n\x0e\n\x06\x04\x12\x03\0\x02\x04\x12\
9678 \x04\x87\x06\x042\n\x0f\n\x07\x04\x12\x03\0\x02\x04\x04\x12\x04\x87\x06\
9679 \x04\x0c\n\x0f\n\x07\x04\x12\x03\0\x02\x04\x05\x12\x04\x87\x06\r\x13\n\
9680 \x0f\n\x07\x04\x12\x03\0\x02\x04\x01\x12\x04\x87\x06\x14-\n\x0f\n\x07\
9681 \x04\x12\x03\0\x02\x04\x03\x12\x04\x87\x0601\n\xee\x01\n\x02\x04\x13\x12\
9682 \x06\x8e\x06\0\xa3\x06\x01\x1a\xdf\x01\x20Describes\x20the\x20relationsh\
9683 ip\x20between\x20generated\x20code\x20and\x20its\x20original\x20source\n\
9684 \x20file.\x20A\x20GeneratedCodeInfo\x20message\x20is\x20associated\x20wi\
9685 th\x20only\x20one\x20generated\n\x20source\x20file,\x20but\x20may\x20con\
9686 tain\x20references\x20to\x20different\x20source\x20.proto\x20files.\n\n\
9687 \x0b\n\x03\x04\x13\x01\x12\x04\x8e\x06\x08\x19\nx\n\x04\x04\x13\x02\0\
9688 \x12\x04\x91\x06\x02%\x1aj\x20An\x20Annotation\x20connects\x20some\x20sp\
9689 an\x20of\x20text\x20in\x20generated\x20code\x20to\x20an\x20element\n\x20\
9690 of\x20its\x20generating\x20.proto\x20file.\n\n\r\n\x05\x04\x13\x02\0\x04\
9691 \x12\x04\x91\x06\x02\n\n\r\n\x05\x04\x13\x02\0\x06\x12\x04\x91\x06\x0b\
9692 \x15\n\r\n\x05\x04\x13\x02\0\x01\x12\x04\x91\x06\x16\x20\n\r\n\x05\x04\
9693 \x13\x02\0\x03\x12\x04\x91\x06#$\n\x0e\n\x04\x04\x13\x03\0\x12\x06\x92\
9694 \x06\x02\xa2\x06\x03\n\r\n\x05\x04\x13\x03\0\x01\x12\x04\x92\x06\n\x14\n\
9695 \x8f\x01\n\x06\x04\x13\x03\0\x02\0\x12\x04\x95\x06\x04*\x1a\x7f\x20Ident\
9696 ifies\x20the\x20element\x20in\x20the\x20original\x20source\x20.proto\x20\
9697 file.\x20This\x20field\n\x20is\x20formatted\x20the\x20same\x20as\x20Sour\
9698 ceCodeInfo.Location.path.\n\n\x0f\n\x07\x04\x13\x03\0\x02\0\x04\x12\x04\
9699 \x95\x06\x04\x0c\n\x0f\n\x07\x04\x13\x03\0\x02\0\x05\x12\x04\x95\x06\r\
9700 \x12\n\x0f\n\x07\x04\x13\x03\0\x02\0\x01\x12\x04\x95\x06\x13\x17\n\x0f\n\
9701 \x07\x04\x13\x03\0\x02\0\x03\x12\x04\x95\x06\x1a\x1b\n\x0f\n\x07\x04\x13\
9702 \x03\0\x02\0\x08\x12\x04\x95\x06\x1c)\n\x10\n\x08\x04\x13\x03\0\x02\0\
9703 \x08\x02\x12\x04\x95\x06\x1d(\nO\n\x06\x04\x13\x03\0\x02\x01\x12\x04\x98\
9704 \x06\x04$\x1a?\x20Identifies\x20the\x20filesystem\x20path\x20to\x20the\
9705 \x20original\x20source\x20.proto.\n\n\x0f\n\x07\x04\x13\x03\0\x02\x01\
9706 \x04\x12\x04\x98\x06\x04\x0c\n\x0f\n\x07\x04\x13\x03\0\x02\x01\x05\x12\
9707 \x04\x98\x06\r\x13\n\x0f\n\x07\x04\x13\x03\0\x02\x01\x01\x12\x04\x98\x06\
9708 \x14\x1f\n\x0f\n\x07\x04\x13\x03\0\x02\x01\x03\x12\x04\x98\x06\"#\nw\n\
9709 \x06\x04\x13\x03\0\x02\x02\x12\x04\x9c\x06\x04\x1d\x1ag\x20Identifies\
9710 \x20the\x20starting\x20offset\x20in\x20bytes\x20in\x20the\x20generated\
9711 \x20code\n\x20that\x20relates\x20to\x20the\x20identified\x20object.\n\n\
9712 \x0f\n\x07\x04\x13\x03\0\x02\x02\x04\x12\x04\x9c\x06\x04\x0c\n\x0f\n\x07\
9713 \x04\x13\x03\0\x02\x02\x05\x12\x04\x9c\x06\r\x12\n\x0f\n\x07\x04\x13\x03\
9714 \0\x02\x02\x01\x12\x04\x9c\x06\x13\x18\n\x0f\n\x07\x04\x13\x03\0\x02\x02\
9715 \x03\x12\x04\x9c\x06\x1b\x1c\n\xdb\x01\n\x06\x04\x13\x03\0\x02\x03\x12\
9716 \x04\xa1\x06\x04\x1b\x1a\xca\x01\x20Identifies\x20the\x20ending\x20offse\
9717 t\x20in\x20bytes\x20in\x20the\x20generated\x20code\x20that\n\x20relates\
9718 \x20to\x20the\x20identified\x20offset.\x20The\x20end\x20offset\x20should\
9719 \x20be\x20one\x20past\n\x20the\x20last\x20relevant\x20byte\x20(so\x20the\
9720 \x20length\x20of\x20the\x20text\x20=\x20end\x20-\x20begin).\n\n\x0f\n\
9721 \x07\x04\x13\x03\0\x02\x03\x04\x12\x04\xa1\x06\x04\x0c\n\x0f\n\x07\x04\
9722 \x13\x03\0\x02\x03\x05\x12\x04\xa1\x06\r\x12\n\x0f\n\x07\x04\x13\x03\0\
9723 \x02\x03\x01\x12\x04\xa1\x06\x13\x16\n\x0f\n\x07\x04\x13\x03\0\x02\x03\
9724 \x03\x12\x04\xa1\x06\x19\x1a\
9725";
9726
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009727static file_descriptor_proto_lazy: crate::rt::LazyV2<crate::descriptor::FileDescriptorProto> = crate::rt::LazyV2::INIT;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009728
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009729fn parse_descriptor_proto() -> crate::descriptor::FileDescriptorProto {
9730 crate::parse_from_bytes(file_descriptor_proto_data).unwrap()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009731}
9732
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009733pub fn file_descriptor_proto() -> &'static crate::descriptor::FileDescriptorProto {
Haibo Huang52aa7852020-07-10 20:23:55 -07009734 file_descriptor_proto_lazy.get(|| {
9735 parse_descriptor_proto()
9736 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009737}