blob: 8f3dd2f2690f36fd03ae7efc2da92e29fd1f0d5f [file] [log] [blame]
Joel Galensonfa77f002021-04-02 11:32:01 -07001// This file is generated by rust-protobuf 2.22.0. Do not edit
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002// @generated
3
4// https://github.com/rust-lang/rust-clippy/issues/702
5#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
Haibo Huang52aa7852020-07-10 20:23:55 -07008#![allow(unused_attributes)]
Joel Galensonfa77f002021-04-02 11:32:01 -07009#![cfg_attr(rustfmt, rustfmt::skip)]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010
11#![allow(box_pointers)]
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070018#![allow(unused_imports)]
19#![allow(unused_results)]
20//! Generated file from `google/protobuf/descriptor.proto`
21
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070022#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -080023#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070024pub struct 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)]
Haibo Huangca95bfd2021-02-09 17:48:30 -0800192#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700193pub 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)]
Haibo Huangca95bfd2021-02-09 17:48:30 -0800901#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -0700902pub 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)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08001514#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001515pub struct DescriptorProto_ExtensionRange {
1516 // message fields
1517 start: ::std::option::Option<i32>,
1518 end: ::std::option::Option<i32>,
Haibo Huangca95bfd2021-02-09 17:48:30 -08001519 pub options: crate::SingularPtrField<ExtensionRangeOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001520 // special fields
1521 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001522 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001523 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001524 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001525}
1526
1527impl<'a> ::std::default::Default for &'a DescriptorProto_ExtensionRange {
1528 fn default() -> &'a DescriptorProto_ExtensionRange {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001529 <DescriptorProto_ExtensionRange as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001530 }
1531}
1532
1533impl DescriptorProto_ExtensionRange {
1534 pub fn new() -> DescriptorProto_ExtensionRange {
1535 ::std::default::Default::default()
1536 }
1537
1538 // optional int32 start = 1;
1539
1540
1541 pub fn get_start(&self) -> i32 {
1542 self.start.unwrap_or(0)
1543 }
1544 pub fn clear_start(&mut self) {
1545 self.start = ::std::option::Option::None;
1546 }
1547
1548 pub fn has_start(&self) -> bool {
1549 self.start.is_some()
1550 }
1551
1552 // Param is passed by value, moved
1553 pub fn set_start(&mut self, v: i32) {
1554 self.start = ::std::option::Option::Some(v);
1555 }
1556
1557 // optional int32 end = 2;
1558
1559
1560 pub fn get_end(&self) -> i32 {
1561 self.end.unwrap_or(0)
1562 }
1563 pub fn clear_end(&mut self) {
1564 self.end = ::std::option::Option::None;
1565 }
1566
1567 pub fn has_end(&self) -> bool {
1568 self.end.is_some()
1569 }
1570
1571 // Param is passed by value, moved
1572 pub fn set_end(&mut self, v: i32) {
1573 self.end = ::std::option::Option::Some(v);
1574 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08001575
1576 // optional .google.protobuf.ExtensionRangeOptions options = 3;
1577
1578
1579 pub fn get_options(&self) -> &ExtensionRangeOptions {
1580 self.options.as_ref().unwrap_or_else(|| <ExtensionRangeOptions as crate::Message>::default_instance())
1581 }
1582 pub fn clear_options(&mut self) {
1583 self.options.clear();
1584 }
1585
1586 pub fn has_options(&self) -> bool {
1587 self.options.is_some()
1588 }
1589
1590 // Param is passed by value, moved
1591 pub fn set_options(&mut self, v: ExtensionRangeOptions) {
1592 self.options = crate::SingularPtrField::some(v);
1593 }
1594
1595 // Mutable pointer to the field.
1596 // If field is not initialized, it is initialized with default value first.
1597 pub fn mut_options(&mut self) -> &mut ExtensionRangeOptions {
1598 if self.options.is_none() {
1599 self.options.set_default();
1600 }
1601 self.options.as_mut().unwrap()
1602 }
1603
1604 // Take field
1605 pub fn take_options(&mut self) -> ExtensionRangeOptions {
1606 self.options.take().unwrap_or_else(|| ExtensionRangeOptions::new())
1607 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001608}
1609
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001610impl crate::Message for DescriptorProto_ExtensionRange {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001611 fn is_initialized(&self) -> bool {
Haibo Huangca95bfd2021-02-09 17:48:30 -08001612 for v in &self.options {
1613 if !v.is_initialized() {
1614 return false;
1615 }
1616 };
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001617 true
1618 }
1619
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001620 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001621 while !is.eof()? {
1622 let (field_number, wire_type) = is.read_tag_unpack()?;
1623 match field_number {
1624 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001625 if wire_type != crate::wire_format::WireTypeVarint {
1626 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001627 }
1628 let tmp = is.read_int32()?;
1629 self.start = ::std::option::Option::Some(tmp);
1630 },
1631 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001632 if wire_type != crate::wire_format::WireTypeVarint {
1633 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001634 }
1635 let tmp = is.read_int32()?;
1636 self.end = ::std::option::Option::Some(tmp);
1637 },
Haibo Huangca95bfd2021-02-09 17:48:30 -08001638 3 => {
1639 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
1640 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001641 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001642 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001643 },
1644 };
1645 }
1646 ::std::result::Result::Ok(())
1647 }
1648
1649 // Compute sizes of nested messages
1650 #[allow(unused_variables)]
1651 fn compute_size(&self) -> u32 {
1652 let mut my_size = 0;
1653 if let Some(v) = self.start {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001654 my_size += crate::rt::value_size(1, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001655 }
1656 if let Some(v) = self.end {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001657 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001658 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08001659 if let Some(ref v) = self.options.as_ref() {
1660 let len = v.compute_size();
1661 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
1662 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001663 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001664 self.cached_size.set(my_size);
1665 my_size
1666 }
1667
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001668 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001669 if let Some(v) = self.start {
1670 os.write_int32(1, v)?;
1671 }
1672 if let Some(v) = self.end {
1673 os.write_int32(2, v)?;
1674 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08001675 if let Some(ref v) = self.options.as_ref() {
1676 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
1677 os.write_raw_varint32(v.get_cached_size())?;
1678 v.write_to_with_cached_sizes(os)?;
1679 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001680 os.write_unknown_fields(self.get_unknown_fields())?;
1681 ::std::result::Result::Ok(())
1682 }
1683
1684 fn get_cached_size(&self) -> u32 {
1685 self.cached_size.get()
1686 }
1687
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001688 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001689 &self.unknown_fields
1690 }
1691
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001692 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001693 &mut self.unknown_fields
1694 }
1695
1696 fn as_any(&self) -> &dyn (::std::any::Any) {
1697 self as &dyn (::std::any::Any)
1698 }
1699 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1700 self as &mut dyn (::std::any::Any)
1701 }
Haibo Huang52aa7852020-07-10 20:23:55 -07001702 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001703 self
1704 }
1705
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001706 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001707 Self::descriptor_static()
1708 }
1709
1710 fn new() -> DescriptorProto_ExtensionRange {
1711 DescriptorProto_ExtensionRange::new()
1712 }
1713
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001714 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
1715 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001716 descriptor.get(|| {
1717 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001718 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001719 "start",
1720 |m: &DescriptorProto_ExtensionRange| { &m.start },
1721 |m: &mut DescriptorProto_ExtensionRange| { &mut m.start },
1722 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001723 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001724 "end",
1725 |m: &DescriptorProto_ExtensionRange| { &m.end },
1726 |m: &mut DescriptorProto_ExtensionRange| { &mut m.end },
1727 ));
Haibo Huangca95bfd2021-02-09 17:48:30 -08001728 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<ExtensionRangeOptions>>(
1729 "options",
1730 |m: &DescriptorProto_ExtensionRange| { &m.options },
1731 |m: &mut DescriptorProto_ExtensionRange| { &mut m.options },
1732 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001733 crate::reflect::MessageDescriptor::new_pb_name::<DescriptorProto_ExtensionRange>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001734 "DescriptorProto.ExtensionRange",
1735 fields,
1736 file_descriptor_proto()
1737 )
1738 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001739 }
1740
1741 fn default_instance() -> &'static DescriptorProto_ExtensionRange {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001742 static instance: crate::rt::LazyV2<DescriptorProto_ExtensionRange> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001743 instance.get(DescriptorProto_ExtensionRange::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001744 }
1745}
1746
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001747impl crate::Clear for DescriptorProto_ExtensionRange {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001748 fn clear(&mut self) {
1749 self.start = ::std::option::Option::None;
1750 self.end = ::std::option::Option::None;
Haibo Huangca95bfd2021-02-09 17:48:30 -08001751 self.options.clear();
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001752 self.unknown_fields.clear();
1753 }
1754}
1755
1756impl ::std::fmt::Debug for DescriptorProto_ExtensionRange {
1757 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001758 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001759 }
1760}
1761
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001762impl crate::reflect::ProtobufValue for DescriptorProto_ExtensionRange {
1763 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
1764 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001765 }
1766}
1767
1768#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08001769#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001770pub struct DescriptorProto_ReservedRange {
1771 // message fields
1772 start: ::std::option::Option<i32>,
1773 end: ::std::option::Option<i32>,
1774 // special fields
1775 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001776 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001777 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001778 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001779}
1780
1781impl<'a> ::std::default::Default for &'a DescriptorProto_ReservedRange {
1782 fn default() -> &'a DescriptorProto_ReservedRange {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001783 <DescriptorProto_ReservedRange as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001784 }
1785}
1786
1787impl DescriptorProto_ReservedRange {
1788 pub fn new() -> DescriptorProto_ReservedRange {
1789 ::std::default::Default::default()
1790 }
1791
1792 // optional int32 start = 1;
1793
1794
1795 pub fn get_start(&self) -> i32 {
1796 self.start.unwrap_or(0)
1797 }
1798 pub fn clear_start(&mut self) {
1799 self.start = ::std::option::Option::None;
1800 }
1801
1802 pub fn has_start(&self) -> bool {
1803 self.start.is_some()
1804 }
1805
1806 // Param is passed by value, moved
1807 pub fn set_start(&mut self, v: i32) {
1808 self.start = ::std::option::Option::Some(v);
1809 }
1810
1811 // optional int32 end = 2;
1812
1813
1814 pub fn get_end(&self) -> i32 {
1815 self.end.unwrap_or(0)
1816 }
1817 pub fn clear_end(&mut self) {
1818 self.end = ::std::option::Option::None;
1819 }
1820
1821 pub fn has_end(&self) -> bool {
1822 self.end.is_some()
1823 }
1824
1825 // Param is passed by value, moved
1826 pub fn set_end(&mut self, v: i32) {
1827 self.end = ::std::option::Option::Some(v);
1828 }
1829}
1830
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001831impl crate::Message for DescriptorProto_ReservedRange {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001832 fn is_initialized(&self) -> bool {
1833 true
1834 }
1835
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001836 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001837 while !is.eof()? {
1838 let (field_number, wire_type) = is.read_tag_unpack()?;
1839 match field_number {
1840 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001841 if wire_type != crate::wire_format::WireTypeVarint {
1842 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001843 }
1844 let tmp = is.read_int32()?;
1845 self.start = ::std::option::Option::Some(tmp);
1846 },
1847 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001848 if wire_type != crate::wire_format::WireTypeVarint {
1849 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001850 }
1851 let tmp = is.read_int32()?;
1852 self.end = ::std::option::Option::Some(tmp);
1853 },
1854 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001855 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001856 },
1857 };
1858 }
1859 ::std::result::Result::Ok(())
1860 }
1861
1862 // Compute sizes of nested messages
1863 #[allow(unused_variables)]
1864 fn compute_size(&self) -> u32 {
1865 let mut my_size = 0;
1866 if let Some(v) = self.start {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001867 my_size += crate::rt::value_size(1, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001868 }
1869 if let Some(v) = self.end {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001870 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001871 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001872 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001873 self.cached_size.set(my_size);
1874 my_size
1875 }
1876
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001877 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001878 if let Some(v) = self.start {
1879 os.write_int32(1, v)?;
1880 }
1881 if let Some(v) = self.end {
1882 os.write_int32(2, v)?;
1883 }
1884 os.write_unknown_fields(self.get_unknown_fields())?;
1885 ::std::result::Result::Ok(())
1886 }
1887
1888 fn get_cached_size(&self) -> u32 {
1889 self.cached_size.get()
1890 }
1891
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001892 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001893 &self.unknown_fields
1894 }
1895
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001896 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001897 &mut self.unknown_fields
1898 }
1899
1900 fn as_any(&self) -> &dyn (::std::any::Any) {
1901 self as &dyn (::std::any::Any)
1902 }
1903 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1904 self as &mut dyn (::std::any::Any)
1905 }
Haibo Huang52aa7852020-07-10 20:23:55 -07001906 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001907 self
1908 }
1909
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001910 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001911 Self::descriptor_static()
1912 }
1913
1914 fn new() -> DescriptorProto_ReservedRange {
1915 DescriptorProto_ReservedRange::new()
1916 }
1917
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001918 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
1919 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001920 descriptor.get(|| {
1921 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001922 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001923 "start",
1924 |m: &DescriptorProto_ReservedRange| { &m.start },
1925 |m: &mut DescriptorProto_ReservedRange| { &mut m.start },
1926 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001927 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001928 "end",
1929 |m: &DescriptorProto_ReservedRange| { &m.end },
1930 |m: &mut DescriptorProto_ReservedRange| { &mut m.end },
1931 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001932 crate::reflect::MessageDescriptor::new_pb_name::<DescriptorProto_ReservedRange>(
Haibo Huang52aa7852020-07-10 20:23:55 -07001933 "DescriptorProto.ReservedRange",
1934 fields,
1935 file_descriptor_proto()
1936 )
1937 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001938 }
1939
1940 fn default_instance() -> &'static DescriptorProto_ReservedRange {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001941 static instance: crate::rt::LazyV2<DescriptorProto_ReservedRange> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07001942 instance.get(DescriptorProto_ReservedRange::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001943 }
1944}
1945
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001946impl crate::Clear for DescriptorProto_ReservedRange {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001947 fn clear(&mut self) {
1948 self.start = ::std::option::Option::None;
1949 self.end = ::std::option::Option::None;
1950 self.unknown_fields.clear();
1951 }
1952}
1953
1954impl ::std::fmt::Debug for DescriptorProto_ReservedRange {
1955 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001956 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001957 }
1958}
1959
Haibo Huangd32e6ee2020-08-12 13:52:04 -07001960impl crate::reflect::ProtobufValue for DescriptorProto_ReservedRange {
1961 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
1962 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07001963 }
1964}
1965
1966#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08001967#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
1968pub struct ExtensionRangeOptions {
1969 // message fields
1970 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
1971 // special fields
1972 #[cfg_attr(feature = "with-serde", serde(skip))]
1973 pub unknown_fields: crate::UnknownFields,
1974 #[cfg_attr(feature = "with-serde", serde(skip))]
1975 pub cached_size: crate::CachedSize,
1976}
1977
1978impl<'a> ::std::default::Default for &'a ExtensionRangeOptions {
1979 fn default() -> &'a ExtensionRangeOptions {
1980 <ExtensionRangeOptions as crate::Message>::default_instance()
1981 }
1982}
1983
1984impl ExtensionRangeOptions {
1985 pub fn new() -> ExtensionRangeOptions {
1986 ::std::default::Default::default()
1987 }
1988
1989 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
1990
1991
1992 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
1993 &self.uninterpreted_option
1994 }
1995 pub fn clear_uninterpreted_option(&mut self) {
1996 self.uninterpreted_option.clear();
1997 }
1998
1999 // Param is passed by value, moved
2000 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
2001 self.uninterpreted_option = v;
2002 }
2003
2004 // Mutable pointer to the field.
2005 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
2006 &mut self.uninterpreted_option
2007 }
2008
2009 // Take field
2010 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
2011 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
2012 }
2013}
2014
2015impl crate::Message for ExtensionRangeOptions {
2016 fn is_initialized(&self) -> bool {
2017 for v in &self.uninterpreted_option {
2018 if !v.is_initialized() {
2019 return false;
2020 }
2021 };
2022 true
2023 }
2024
2025 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
2026 while !is.eof()? {
2027 let (field_number, wire_type) = is.read_tag_unpack()?;
2028 match field_number {
2029 999 => {
2030 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
2031 },
2032 _ => {
2033 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2034 },
2035 };
2036 }
2037 ::std::result::Result::Ok(())
2038 }
2039
2040 // Compute sizes of nested messages
2041 #[allow(unused_variables)]
2042 fn compute_size(&self) -> u32 {
2043 let mut my_size = 0;
2044 for value in &self.uninterpreted_option {
2045 let len = value.compute_size();
2046 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
2047 };
2048 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
2049 self.cached_size.set(my_size);
2050 my_size
2051 }
2052
2053 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
2054 for v in &self.uninterpreted_option {
2055 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
2056 os.write_raw_varint32(v.get_cached_size())?;
2057 v.write_to_with_cached_sizes(os)?;
2058 };
2059 os.write_unknown_fields(self.get_unknown_fields())?;
2060 ::std::result::Result::Ok(())
2061 }
2062
2063 fn get_cached_size(&self) -> u32 {
2064 self.cached_size.get()
2065 }
2066
2067 fn get_unknown_fields(&self) -> &crate::UnknownFields {
2068 &self.unknown_fields
2069 }
2070
2071 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
2072 &mut self.unknown_fields
2073 }
2074
2075 fn as_any(&self) -> &dyn (::std::any::Any) {
2076 self as &dyn (::std::any::Any)
2077 }
2078 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2079 self as &mut dyn (::std::any::Any)
2080 }
2081 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
2082 self
2083 }
2084
2085 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
2086 Self::descriptor_static()
2087 }
2088
2089 fn new() -> ExtensionRangeOptions {
2090 ExtensionRangeOptions::new()
2091 }
2092
2093 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
2094 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
2095 descriptor.get(|| {
2096 let mut fields = ::std::vec::Vec::new();
2097 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
2098 "uninterpreted_option",
2099 |m: &ExtensionRangeOptions| { &m.uninterpreted_option },
2100 |m: &mut ExtensionRangeOptions| { &mut m.uninterpreted_option },
2101 ));
2102 crate::reflect::MessageDescriptor::new_pb_name::<ExtensionRangeOptions>(
2103 "ExtensionRangeOptions",
2104 fields,
2105 file_descriptor_proto()
2106 )
2107 })
2108 }
2109
2110 fn default_instance() -> &'static ExtensionRangeOptions {
2111 static instance: crate::rt::LazyV2<ExtensionRangeOptions> = crate::rt::LazyV2::INIT;
2112 instance.get(ExtensionRangeOptions::new)
2113 }
2114}
2115
2116impl crate::Clear for ExtensionRangeOptions {
2117 fn clear(&mut self) {
2118 self.uninterpreted_option.clear();
2119 self.unknown_fields.clear();
2120 }
2121}
2122
2123impl ::std::fmt::Debug for ExtensionRangeOptions {
2124 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2125 crate::text_format::fmt(self, f)
2126 }
2127}
2128
2129impl crate::reflect::ProtobufValue for ExtensionRangeOptions {
2130 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
2131 crate::reflect::ReflectValueRef::Message(self)
2132 }
2133}
2134
2135#[derive(PartialEq,Clone,Default)]
2136#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002137pub struct FieldDescriptorProto {
2138 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002139 name: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002140 number: ::std::option::Option<i32>,
2141 label: ::std::option::Option<FieldDescriptorProto_Label>,
2142 field_type: ::std::option::Option<FieldDescriptorProto_Type>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002143 type_name: crate::SingularField<::std::string::String>,
2144 extendee: crate::SingularField<::std::string::String>,
2145 default_value: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002146 oneof_index: ::std::option::Option<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002147 json_name: crate::SingularField<::std::string::String>,
2148 pub options: crate::SingularPtrField<FieldOptions>,
Haibo Huangca95bfd2021-02-09 17:48:30 -08002149 proto3_optional: ::std::option::Option<bool>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002150 // special fields
2151 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002152 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002153 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002154 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002155}
2156
2157impl<'a> ::std::default::Default for &'a FieldDescriptorProto {
2158 fn default() -> &'a FieldDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002159 <FieldDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002160 }
2161}
2162
2163impl FieldDescriptorProto {
2164 pub fn new() -> FieldDescriptorProto {
2165 ::std::default::Default::default()
2166 }
2167
2168 // optional string name = 1;
2169
2170
2171 pub fn get_name(&self) -> &str {
2172 match self.name.as_ref() {
2173 Some(v) => &v,
2174 None => "",
2175 }
2176 }
2177 pub fn clear_name(&mut self) {
2178 self.name.clear();
2179 }
2180
2181 pub fn has_name(&self) -> bool {
2182 self.name.is_some()
2183 }
2184
2185 // Param is passed by value, moved
2186 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002187 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002188 }
2189
2190 // Mutable pointer to the field.
2191 // If field is not initialized, it is initialized with default value first.
2192 pub fn mut_name(&mut self) -> &mut ::std::string::String {
2193 if self.name.is_none() {
2194 self.name.set_default();
2195 }
2196 self.name.as_mut().unwrap()
2197 }
2198
2199 // Take field
2200 pub fn take_name(&mut self) -> ::std::string::String {
2201 self.name.take().unwrap_or_else(|| ::std::string::String::new())
2202 }
2203
2204 // optional int32 number = 3;
2205
2206
2207 pub fn get_number(&self) -> i32 {
2208 self.number.unwrap_or(0)
2209 }
2210 pub fn clear_number(&mut self) {
2211 self.number = ::std::option::Option::None;
2212 }
2213
2214 pub fn has_number(&self) -> bool {
2215 self.number.is_some()
2216 }
2217
2218 // Param is passed by value, moved
2219 pub fn set_number(&mut self, v: i32) {
2220 self.number = ::std::option::Option::Some(v);
2221 }
2222
2223 // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
2224
2225
2226 pub fn get_label(&self) -> FieldDescriptorProto_Label {
2227 self.label.unwrap_or(FieldDescriptorProto_Label::LABEL_OPTIONAL)
2228 }
2229 pub fn clear_label(&mut self) {
2230 self.label = ::std::option::Option::None;
2231 }
2232
2233 pub fn has_label(&self) -> bool {
2234 self.label.is_some()
2235 }
2236
2237 // Param is passed by value, moved
2238 pub fn set_label(&mut self, v: FieldDescriptorProto_Label) {
2239 self.label = ::std::option::Option::Some(v);
2240 }
2241
2242 // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
2243
2244
2245 pub fn get_field_type(&self) -> FieldDescriptorProto_Type {
2246 self.field_type.unwrap_or(FieldDescriptorProto_Type::TYPE_DOUBLE)
2247 }
2248 pub fn clear_field_type(&mut self) {
2249 self.field_type = ::std::option::Option::None;
2250 }
2251
2252 pub fn has_field_type(&self) -> bool {
2253 self.field_type.is_some()
2254 }
2255
2256 // Param is passed by value, moved
2257 pub fn set_field_type(&mut self, v: FieldDescriptorProto_Type) {
2258 self.field_type = ::std::option::Option::Some(v);
2259 }
2260
2261 // optional string type_name = 6;
2262
2263
2264 pub fn get_type_name(&self) -> &str {
2265 match self.type_name.as_ref() {
2266 Some(v) => &v,
2267 None => "",
2268 }
2269 }
2270 pub fn clear_type_name(&mut self) {
2271 self.type_name.clear();
2272 }
2273
2274 pub fn has_type_name(&self) -> bool {
2275 self.type_name.is_some()
2276 }
2277
2278 // Param is passed by value, moved
2279 pub fn set_type_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002280 self.type_name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002281 }
2282
2283 // Mutable pointer to the field.
2284 // If field is not initialized, it is initialized with default value first.
2285 pub fn mut_type_name(&mut self) -> &mut ::std::string::String {
2286 if self.type_name.is_none() {
2287 self.type_name.set_default();
2288 }
2289 self.type_name.as_mut().unwrap()
2290 }
2291
2292 // Take field
2293 pub fn take_type_name(&mut self) -> ::std::string::String {
2294 self.type_name.take().unwrap_or_else(|| ::std::string::String::new())
2295 }
2296
2297 // optional string extendee = 2;
2298
2299
2300 pub fn get_extendee(&self) -> &str {
2301 match self.extendee.as_ref() {
2302 Some(v) => &v,
2303 None => "",
2304 }
2305 }
2306 pub fn clear_extendee(&mut self) {
2307 self.extendee.clear();
2308 }
2309
2310 pub fn has_extendee(&self) -> bool {
2311 self.extendee.is_some()
2312 }
2313
2314 // Param is passed by value, moved
2315 pub fn set_extendee(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002316 self.extendee = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002317 }
2318
2319 // Mutable pointer to the field.
2320 // If field is not initialized, it is initialized with default value first.
2321 pub fn mut_extendee(&mut self) -> &mut ::std::string::String {
2322 if self.extendee.is_none() {
2323 self.extendee.set_default();
2324 }
2325 self.extendee.as_mut().unwrap()
2326 }
2327
2328 // Take field
2329 pub fn take_extendee(&mut self) -> ::std::string::String {
2330 self.extendee.take().unwrap_or_else(|| ::std::string::String::new())
2331 }
2332
2333 // optional string default_value = 7;
2334
2335
2336 pub fn get_default_value(&self) -> &str {
2337 match self.default_value.as_ref() {
2338 Some(v) => &v,
2339 None => "",
2340 }
2341 }
2342 pub fn clear_default_value(&mut self) {
2343 self.default_value.clear();
2344 }
2345
2346 pub fn has_default_value(&self) -> bool {
2347 self.default_value.is_some()
2348 }
2349
2350 // Param is passed by value, moved
2351 pub fn set_default_value(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002352 self.default_value = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002353 }
2354
2355 // Mutable pointer to the field.
2356 // If field is not initialized, it is initialized with default value first.
2357 pub fn mut_default_value(&mut self) -> &mut ::std::string::String {
2358 if self.default_value.is_none() {
2359 self.default_value.set_default();
2360 }
2361 self.default_value.as_mut().unwrap()
2362 }
2363
2364 // Take field
2365 pub fn take_default_value(&mut self) -> ::std::string::String {
2366 self.default_value.take().unwrap_or_else(|| ::std::string::String::new())
2367 }
2368
2369 // optional int32 oneof_index = 9;
2370
2371
2372 pub fn get_oneof_index(&self) -> i32 {
2373 self.oneof_index.unwrap_or(0)
2374 }
2375 pub fn clear_oneof_index(&mut self) {
2376 self.oneof_index = ::std::option::Option::None;
2377 }
2378
2379 pub fn has_oneof_index(&self) -> bool {
2380 self.oneof_index.is_some()
2381 }
2382
2383 // Param is passed by value, moved
2384 pub fn set_oneof_index(&mut self, v: i32) {
2385 self.oneof_index = ::std::option::Option::Some(v);
2386 }
2387
2388 // optional string json_name = 10;
2389
2390
2391 pub fn get_json_name(&self) -> &str {
2392 match self.json_name.as_ref() {
2393 Some(v) => &v,
2394 None => "",
2395 }
2396 }
2397 pub fn clear_json_name(&mut self) {
2398 self.json_name.clear();
2399 }
2400
2401 pub fn has_json_name(&self) -> bool {
2402 self.json_name.is_some()
2403 }
2404
2405 // Param is passed by value, moved
2406 pub fn set_json_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002407 self.json_name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002408 }
2409
2410 // Mutable pointer to the field.
2411 // If field is not initialized, it is initialized with default value first.
2412 pub fn mut_json_name(&mut self) -> &mut ::std::string::String {
2413 if self.json_name.is_none() {
2414 self.json_name.set_default();
2415 }
2416 self.json_name.as_mut().unwrap()
2417 }
2418
2419 // Take field
2420 pub fn take_json_name(&mut self) -> ::std::string::String {
2421 self.json_name.take().unwrap_or_else(|| ::std::string::String::new())
2422 }
2423
2424 // optional .google.protobuf.FieldOptions options = 8;
2425
2426
2427 pub fn get_options(&self) -> &FieldOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002428 self.options.as_ref().unwrap_or_else(|| <FieldOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002429 }
2430 pub fn clear_options(&mut self) {
2431 self.options.clear();
2432 }
2433
2434 pub fn has_options(&self) -> bool {
2435 self.options.is_some()
2436 }
2437
2438 // Param is passed by value, moved
2439 pub fn set_options(&mut self, v: FieldOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002440 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002441 }
2442
2443 // Mutable pointer to the field.
2444 // If field is not initialized, it is initialized with default value first.
2445 pub fn mut_options(&mut self) -> &mut FieldOptions {
2446 if self.options.is_none() {
2447 self.options.set_default();
2448 }
2449 self.options.as_mut().unwrap()
2450 }
2451
2452 // Take field
2453 pub fn take_options(&mut self) -> FieldOptions {
2454 self.options.take().unwrap_or_else(|| FieldOptions::new())
2455 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08002456
2457 // optional bool proto3_optional = 17;
2458
2459
2460 pub fn get_proto3_optional(&self) -> bool {
2461 self.proto3_optional.unwrap_or(false)
2462 }
2463 pub fn clear_proto3_optional(&mut self) {
2464 self.proto3_optional = ::std::option::Option::None;
2465 }
2466
2467 pub fn has_proto3_optional(&self) -> bool {
2468 self.proto3_optional.is_some()
2469 }
2470
2471 // Param is passed by value, moved
2472 pub fn set_proto3_optional(&mut self, v: bool) {
2473 self.proto3_optional = ::std::option::Option::Some(v);
2474 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002475}
2476
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002477impl crate::Message for FieldDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002478 fn is_initialized(&self) -> bool {
2479 for v in &self.options {
2480 if !v.is_initialized() {
2481 return false;
2482 }
2483 };
2484 true
2485 }
2486
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002487 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002488 while !is.eof()? {
2489 let (field_number, wire_type) = is.read_tag_unpack()?;
2490 match field_number {
2491 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002492 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002493 },
2494 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002495 if wire_type != crate::wire_format::WireTypeVarint {
2496 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002497 }
2498 let tmp = is.read_int32()?;
2499 self.number = ::std::option::Option::Some(tmp);
2500 },
2501 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002502 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 -07002503 },
2504 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002505 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 -07002506 },
2507 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002508 crate::rt::read_singular_string_into(wire_type, is, &mut self.type_name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002509 },
2510 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002511 crate::rt::read_singular_string_into(wire_type, is, &mut self.extendee)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002512 },
2513 7 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002514 crate::rt::read_singular_string_into(wire_type, is, &mut self.default_value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002515 },
2516 9 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002517 if wire_type != crate::wire_format::WireTypeVarint {
2518 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002519 }
2520 let tmp = is.read_int32()?;
2521 self.oneof_index = ::std::option::Option::Some(tmp);
2522 },
2523 10 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002524 crate::rt::read_singular_string_into(wire_type, is, &mut self.json_name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002525 },
2526 8 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002527 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002528 },
Haibo Huangca95bfd2021-02-09 17:48:30 -08002529 17 => {
2530 if wire_type != crate::wire_format::WireTypeVarint {
2531 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
2532 }
2533 let tmp = is.read_bool()?;
2534 self.proto3_optional = ::std::option::Option::Some(tmp);
2535 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002536 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002537 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002538 },
2539 };
2540 }
2541 ::std::result::Result::Ok(())
2542 }
2543
2544 // Compute sizes of nested messages
2545 #[allow(unused_variables)]
2546 fn compute_size(&self) -> u32 {
2547 let mut my_size = 0;
2548 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002549 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002550 }
2551 if let Some(v) = self.number {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002552 my_size += crate::rt::value_size(3, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002553 }
2554 if let Some(v) = self.label {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002555 my_size += crate::rt::enum_size(4, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002556 }
2557 if let Some(v) = self.field_type {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002558 my_size += crate::rt::enum_size(5, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002559 }
2560 if let Some(ref v) = self.type_name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002561 my_size += crate::rt::string_size(6, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002562 }
2563 if let Some(ref v) = self.extendee.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002564 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002565 }
2566 if let Some(ref v) = self.default_value.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002567 my_size += crate::rt::string_size(7, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002568 }
2569 if let Some(v) = self.oneof_index {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002570 my_size += crate::rt::value_size(9, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002571 }
2572 if let Some(ref v) = self.json_name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002573 my_size += crate::rt::string_size(10, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002574 }
2575 if let Some(ref v) = self.options.as_ref() {
2576 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002577 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002578 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08002579 if let Some(v) = self.proto3_optional {
2580 my_size += 3;
2581 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002582 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002583 self.cached_size.set(my_size);
2584 my_size
2585 }
2586
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002587 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002588 if let Some(ref v) = self.name.as_ref() {
2589 os.write_string(1, &v)?;
2590 }
2591 if let Some(v) = self.number {
2592 os.write_int32(3, v)?;
2593 }
2594 if let Some(v) = self.label {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002595 os.write_enum(4, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002596 }
2597 if let Some(v) = self.field_type {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002598 os.write_enum(5, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002599 }
2600 if let Some(ref v) = self.type_name.as_ref() {
2601 os.write_string(6, &v)?;
2602 }
2603 if let Some(ref v) = self.extendee.as_ref() {
2604 os.write_string(2, &v)?;
2605 }
2606 if let Some(ref v) = self.default_value.as_ref() {
2607 os.write_string(7, &v)?;
2608 }
2609 if let Some(v) = self.oneof_index {
2610 os.write_int32(9, v)?;
2611 }
2612 if let Some(ref v) = self.json_name.as_ref() {
2613 os.write_string(10, &v)?;
2614 }
2615 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002616 os.write_tag(8, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002617 os.write_raw_varint32(v.get_cached_size())?;
2618 v.write_to_with_cached_sizes(os)?;
2619 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08002620 if let Some(v) = self.proto3_optional {
2621 os.write_bool(17, v)?;
2622 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002623 os.write_unknown_fields(self.get_unknown_fields())?;
2624 ::std::result::Result::Ok(())
2625 }
2626
2627 fn get_cached_size(&self) -> u32 {
2628 self.cached_size.get()
2629 }
2630
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002631 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002632 &self.unknown_fields
2633 }
2634
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002635 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002636 &mut self.unknown_fields
2637 }
2638
2639 fn as_any(&self) -> &dyn (::std::any::Any) {
2640 self as &dyn (::std::any::Any)
2641 }
2642 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2643 self as &mut dyn (::std::any::Any)
2644 }
Haibo Huang52aa7852020-07-10 20:23:55 -07002645 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002646 self
2647 }
2648
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002649 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002650 Self::descriptor_static()
2651 }
2652
2653 fn new() -> FieldDescriptorProto {
2654 FieldDescriptorProto::new()
2655 }
2656
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002657 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
2658 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002659 descriptor.get(|| {
2660 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002661 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002662 "name",
2663 |m: &FieldDescriptorProto| { &m.name },
2664 |m: &mut FieldDescriptorProto| { &mut m.name },
2665 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002666 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002667 "number",
2668 |m: &FieldDescriptorProto| { &m.number },
2669 |m: &mut FieldDescriptorProto| { &mut m.number },
2670 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002671 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FieldDescriptorProto_Label>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002672 "label",
2673 |m: &FieldDescriptorProto| { &m.label },
2674 |m: &mut FieldDescriptorProto| { &mut m.label },
2675 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002676 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FieldDescriptorProto_Type>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002677 "type",
2678 |m: &FieldDescriptorProto| { &m.field_type },
2679 |m: &mut FieldDescriptorProto| { &mut m.field_type },
2680 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002681 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002682 "type_name",
2683 |m: &FieldDescriptorProto| { &m.type_name },
2684 |m: &mut FieldDescriptorProto| { &mut m.type_name },
2685 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002686 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002687 "extendee",
2688 |m: &FieldDescriptorProto| { &m.extendee },
2689 |m: &mut FieldDescriptorProto| { &mut m.extendee },
2690 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002691 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002692 "default_value",
2693 |m: &FieldDescriptorProto| { &m.default_value },
2694 |m: &mut FieldDescriptorProto| { &mut m.default_value },
2695 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002696 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002697 "oneof_index",
2698 |m: &FieldDescriptorProto| { &m.oneof_index },
2699 |m: &mut FieldDescriptorProto| { &mut m.oneof_index },
2700 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002701 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002702 "json_name",
2703 |m: &FieldDescriptorProto| { &m.json_name },
2704 |m: &mut FieldDescriptorProto| { &mut m.json_name },
2705 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002706 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<FieldOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002707 "options",
2708 |m: &FieldDescriptorProto| { &m.options },
2709 |m: &mut FieldDescriptorProto| { &mut m.options },
2710 ));
Haibo Huangca95bfd2021-02-09 17:48:30 -08002711 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
2712 "proto3_optional",
2713 |m: &FieldDescriptorProto| { &m.proto3_optional },
2714 |m: &mut FieldDescriptorProto| { &mut m.proto3_optional },
2715 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002716 crate::reflect::MessageDescriptor::new_pb_name::<FieldDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07002717 "FieldDescriptorProto",
2718 fields,
2719 file_descriptor_proto()
2720 )
2721 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002722 }
2723
2724 fn default_instance() -> &'static FieldDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002725 static instance: crate::rt::LazyV2<FieldDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002726 instance.get(FieldDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002727 }
2728}
2729
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002730impl crate::Clear for FieldDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002731 fn clear(&mut self) {
2732 self.name.clear();
2733 self.number = ::std::option::Option::None;
2734 self.label = ::std::option::Option::None;
2735 self.field_type = ::std::option::Option::None;
2736 self.type_name.clear();
2737 self.extendee.clear();
2738 self.default_value.clear();
2739 self.oneof_index = ::std::option::Option::None;
2740 self.json_name.clear();
2741 self.options.clear();
Haibo Huangca95bfd2021-02-09 17:48:30 -08002742 self.proto3_optional = ::std::option::Option::None;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002743 self.unknown_fields.clear();
2744 }
2745}
2746
2747impl ::std::fmt::Debug for FieldDescriptorProto {
2748 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002749 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002750 }
2751}
2752
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002753impl crate::reflect::ProtobufValue for FieldDescriptorProto {
2754 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
2755 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002756 }
2757}
2758
2759#[derive(Clone,PartialEq,Eq,Debug,Hash)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08002760#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002761pub enum FieldDescriptorProto_Type {
2762 TYPE_DOUBLE = 1,
2763 TYPE_FLOAT = 2,
2764 TYPE_INT64 = 3,
2765 TYPE_UINT64 = 4,
2766 TYPE_INT32 = 5,
2767 TYPE_FIXED64 = 6,
2768 TYPE_FIXED32 = 7,
2769 TYPE_BOOL = 8,
2770 TYPE_STRING = 9,
2771 TYPE_GROUP = 10,
2772 TYPE_MESSAGE = 11,
2773 TYPE_BYTES = 12,
2774 TYPE_UINT32 = 13,
2775 TYPE_ENUM = 14,
2776 TYPE_SFIXED32 = 15,
2777 TYPE_SFIXED64 = 16,
2778 TYPE_SINT32 = 17,
2779 TYPE_SINT64 = 18,
2780}
2781
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002782impl crate::ProtobufEnum for FieldDescriptorProto_Type {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002783 fn value(&self) -> i32 {
2784 *self as i32
2785 }
2786
2787 fn from_i32(value: i32) -> ::std::option::Option<FieldDescriptorProto_Type> {
2788 match value {
2789 1 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_DOUBLE),
2790 2 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_FLOAT),
2791 3 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_INT64),
2792 4 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_UINT64),
2793 5 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_INT32),
2794 6 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_FIXED64),
2795 7 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_FIXED32),
2796 8 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_BOOL),
2797 9 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_STRING),
2798 10 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_GROUP),
2799 11 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_MESSAGE),
2800 12 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_BYTES),
2801 13 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_UINT32),
2802 14 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_ENUM),
2803 15 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_SFIXED32),
2804 16 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_SFIXED64),
2805 17 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_SINT32),
2806 18 => ::std::option::Option::Some(FieldDescriptorProto_Type::TYPE_SINT64),
2807 _ => ::std::option::Option::None
2808 }
2809 }
2810
2811 fn values() -> &'static [Self] {
2812 static values: &'static [FieldDescriptorProto_Type] = &[
2813 FieldDescriptorProto_Type::TYPE_DOUBLE,
2814 FieldDescriptorProto_Type::TYPE_FLOAT,
2815 FieldDescriptorProto_Type::TYPE_INT64,
2816 FieldDescriptorProto_Type::TYPE_UINT64,
2817 FieldDescriptorProto_Type::TYPE_INT32,
2818 FieldDescriptorProto_Type::TYPE_FIXED64,
2819 FieldDescriptorProto_Type::TYPE_FIXED32,
2820 FieldDescriptorProto_Type::TYPE_BOOL,
2821 FieldDescriptorProto_Type::TYPE_STRING,
2822 FieldDescriptorProto_Type::TYPE_GROUP,
2823 FieldDescriptorProto_Type::TYPE_MESSAGE,
2824 FieldDescriptorProto_Type::TYPE_BYTES,
2825 FieldDescriptorProto_Type::TYPE_UINT32,
2826 FieldDescriptorProto_Type::TYPE_ENUM,
2827 FieldDescriptorProto_Type::TYPE_SFIXED32,
2828 FieldDescriptorProto_Type::TYPE_SFIXED64,
2829 FieldDescriptorProto_Type::TYPE_SINT32,
2830 FieldDescriptorProto_Type::TYPE_SINT64,
2831 ];
2832 values
2833 }
2834
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002835 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
2836 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002837 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002838 crate::reflect::EnumDescriptor::new_pb_name::<FieldDescriptorProto_Type>("FieldDescriptorProto.Type", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07002839 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002840 }
2841}
2842
2843impl ::std::marker::Copy for FieldDescriptorProto_Type {
2844}
2845
2846// Note, `Default` is implemented although default value is not 0
2847impl ::std::default::Default for FieldDescriptorProto_Type {
2848 fn default() -> Self {
2849 FieldDescriptorProto_Type::TYPE_DOUBLE
2850 }
2851}
2852
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002853impl crate::reflect::ProtobufValue for FieldDescriptorProto_Type {
2854 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
2855 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002856 }
2857}
2858
2859#[derive(Clone,PartialEq,Eq,Debug,Hash)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08002860#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002861pub enum FieldDescriptorProto_Label {
2862 LABEL_OPTIONAL = 1,
2863 LABEL_REQUIRED = 2,
2864 LABEL_REPEATED = 3,
2865}
2866
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002867impl crate::ProtobufEnum for FieldDescriptorProto_Label {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002868 fn value(&self) -> i32 {
2869 *self as i32
2870 }
2871
2872 fn from_i32(value: i32) -> ::std::option::Option<FieldDescriptorProto_Label> {
2873 match value {
2874 1 => ::std::option::Option::Some(FieldDescriptorProto_Label::LABEL_OPTIONAL),
2875 2 => ::std::option::Option::Some(FieldDescriptorProto_Label::LABEL_REQUIRED),
2876 3 => ::std::option::Option::Some(FieldDescriptorProto_Label::LABEL_REPEATED),
2877 _ => ::std::option::Option::None
2878 }
2879 }
2880
2881 fn values() -> &'static [Self] {
2882 static values: &'static [FieldDescriptorProto_Label] = &[
2883 FieldDescriptorProto_Label::LABEL_OPTIONAL,
2884 FieldDescriptorProto_Label::LABEL_REQUIRED,
2885 FieldDescriptorProto_Label::LABEL_REPEATED,
2886 ];
2887 values
2888 }
2889
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002890 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
2891 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07002892 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002893 crate::reflect::EnumDescriptor::new_pb_name::<FieldDescriptorProto_Label>("FieldDescriptorProto.Label", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07002894 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002895 }
2896}
2897
2898impl ::std::marker::Copy for FieldDescriptorProto_Label {
2899}
2900
2901// Note, `Default` is implemented although default value is not 0
2902impl ::std::default::Default for FieldDescriptorProto_Label {
2903 fn default() -> Self {
2904 FieldDescriptorProto_Label::LABEL_OPTIONAL
2905 }
2906}
2907
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002908impl crate::reflect::ProtobufValue for FieldDescriptorProto_Label {
2909 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
2910 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002911 }
2912}
2913
2914#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08002915#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002916pub struct OneofDescriptorProto {
2917 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002918 name: crate::SingularField<::std::string::String>,
2919 pub options: crate::SingularPtrField<OneofOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002920 // special fields
2921 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002922 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002923 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002924 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002925}
2926
2927impl<'a> ::std::default::Default for &'a OneofDescriptorProto {
2928 fn default() -> &'a OneofDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002929 <OneofDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002930 }
2931}
2932
2933impl OneofDescriptorProto {
2934 pub fn new() -> OneofDescriptorProto {
2935 ::std::default::Default::default()
2936 }
2937
2938 // optional string name = 1;
2939
2940
2941 pub fn get_name(&self) -> &str {
2942 match self.name.as_ref() {
2943 Some(v) => &v,
2944 None => "",
2945 }
2946 }
2947 pub fn clear_name(&mut self) {
2948 self.name.clear();
2949 }
2950
2951 pub fn has_name(&self) -> bool {
2952 self.name.is_some()
2953 }
2954
2955 // Param is passed by value, moved
2956 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002957 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002958 }
2959
2960 // Mutable pointer to the field.
2961 // If field is not initialized, it is initialized with default value first.
2962 pub fn mut_name(&mut self) -> &mut ::std::string::String {
2963 if self.name.is_none() {
2964 self.name.set_default();
2965 }
2966 self.name.as_mut().unwrap()
2967 }
2968
2969 // Take field
2970 pub fn take_name(&mut self) -> ::std::string::String {
2971 self.name.take().unwrap_or_else(|| ::std::string::String::new())
2972 }
2973
2974 // optional .google.protobuf.OneofOptions options = 2;
2975
2976
2977 pub fn get_options(&self) -> &OneofOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002978 self.options.as_ref().unwrap_or_else(|| <OneofOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002979 }
2980 pub fn clear_options(&mut self) {
2981 self.options.clear();
2982 }
2983
2984 pub fn has_options(&self) -> bool {
2985 self.options.is_some()
2986 }
2987
2988 // Param is passed by value, moved
2989 pub fn set_options(&mut self, v: OneofOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07002990 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07002991 }
2992
2993 // Mutable pointer to the field.
2994 // If field is not initialized, it is initialized with default value first.
2995 pub fn mut_options(&mut self) -> &mut OneofOptions {
2996 if self.options.is_none() {
2997 self.options.set_default();
2998 }
2999 self.options.as_mut().unwrap()
3000 }
3001
3002 // Take field
3003 pub fn take_options(&mut self) -> OneofOptions {
3004 self.options.take().unwrap_or_else(|| OneofOptions::new())
3005 }
3006}
3007
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003008impl crate::Message for OneofDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003009 fn is_initialized(&self) -> bool {
3010 for v in &self.options {
3011 if !v.is_initialized() {
3012 return false;
3013 }
3014 };
3015 true
3016 }
3017
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003018 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003019 while !is.eof()? {
3020 let (field_number, wire_type) = is.read_tag_unpack()?;
3021 match field_number {
3022 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003023 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003024 },
3025 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003026 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003027 },
3028 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003029 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003030 },
3031 };
3032 }
3033 ::std::result::Result::Ok(())
3034 }
3035
3036 // Compute sizes of nested messages
3037 #[allow(unused_variables)]
3038 fn compute_size(&self) -> u32 {
3039 let mut my_size = 0;
3040 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003041 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003042 }
3043 if let Some(ref v) = self.options.as_ref() {
3044 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003045 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003046 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003047 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003048 self.cached_size.set(my_size);
3049 my_size
3050 }
3051
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003052 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003053 if let Some(ref v) = self.name.as_ref() {
3054 os.write_string(1, &v)?;
3055 }
3056 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003057 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003058 os.write_raw_varint32(v.get_cached_size())?;
3059 v.write_to_with_cached_sizes(os)?;
3060 }
3061 os.write_unknown_fields(self.get_unknown_fields())?;
3062 ::std::result::Result::Ok(())
3063 }
3064
3065 fn get_cached_size(&self) -> u32 {
3066 self.cached_size.get()
3067 }
3068
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003069 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003070 &self.unknown_fields
3071 }
3072
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003073 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003074 &mut self.unknown_fields
3075 }
3076
3077 fn as_any(&self) -> &dyn (::std::any::Any) {
3078 self as &dyn (::std::any::Any)
3079 }
3080 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3081 self as &mut dyn (::std::any::Any)
3082 }
Haibo Huang52aa7852020-07-10 20:23:55 -07003083 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003084 self
3085 }
3086
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003087 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003088 Self::descriptor_static()
3089 }
3090
3091 fn new() -> OneofDescriptorProto {
3092 OneofDescriptorProto::new()
3093 }
3094
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003095 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
3096 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003097 descriptor.get(|| {
3098 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003099 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003100 "name",
3101 |m: &OneofDescriptorProto| { &m.name },
3102 |m: &mut OneofDescriptorProto| { &mut m.name },
3103 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003104 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<OneofOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003105 "options",
3106 |m: &OneofDescriptorProto| { &m.options },
3107 |m: &mut OneofDescriptorProto| { &mut m.options },
3108 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003109 crate::reflect::MessageDescriptor::new_pb_name::<OneofDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003110 "OneofDescriptorProto",
3111 fields,
3112 file_descriptor_proto()
3113 )
3114 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003115 }
3116
3117 fn default_instance() -> &'static OneofDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003118 static instance: crate::rt::LazyV2<OneofDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003119 instance.get(OneofDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003120 }
3121}
3122
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003123impl crate::Clear for OneofDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003124 fn clear(&mut self) {
3125 self.name.clear();
3126 self.options.clear();
3127 self.unknown_fields.clear();
3128 }
3129}
3130
3131impl ::std::fmt::Debug for OneofDescriptorProto {
3132 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003133 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003134 }
3135}
3136
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003137impl crate::reflect::ProtobufValue for OneofDescriptorProto {
3138 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
3139 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003140 }
3141}
3142
3143#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08003144#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003145pub struct EnumDescriptorProto {
3146 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003147 name: crate::SingularField<::std::string::String>,
3148 pub value: crate::RepeatedField<EnumValueDescriptorProto>,
3149 pub options: crate::SingularPtrField<EnumOptions>,
Haibo Huangca95bfd2021-02-09 17:48:30 -08003150 pub reserved_range: crate::RepeatedField<EnumDescriptorProto_EnumReservedRange>,
3151 pub reserved_name: crate::RepeatedField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003152 // special fields
3153 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003154 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003155 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003156 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003157}
3158
3159impl<'a> ::std::default::Default for &'a EnumDescriptorProto {
3160 fn default() -> &'a EnumDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003161 <EnumDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003162 }
3163}
3164
3165impl EnumDescriptorProto {
3166 pub fn new() -> EnumDescriptorProto {
3167 ::std::default::Default::default()
3168 }
3169
3170 // optional string name = 1;
3171
3172
3173 pub fn get_name(&self) -> &str {
3174 match self.name.as_ref() {
3175 Some(v) => &v,
3176 None => "",
3177 }
3178 }
3179 pub fn clear_name(&mut self) {
3180 self.name.clear();
3181 }
3182
3183 pub fn has_name(&self) -> bool {
3184 self.name.is_some()
3185 }
3186
3187 // Param is passed by value, moved
3188 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003189 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003190 }
3191
3192 // Mutable pointer to the field.
3193 // If field is not initialized, it is initialized with default value first.
3194 pub fn mut_name(&mut self) -> &mut ::std::string::String {
3195 if self.name.is_none() {
3196 self.name.set_default();
3197 }
3198 self.name.as_mut().unwrap()
3199 }
3200
3201 // Take field
3202 pub fn take_name(&mut self) -> ::std::string::String {
3203 self.name.take().unwrap_or_else(|| ::std::string::String::new())
3204 }
3205
3206 // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
3207
3208
3209 pub fn get_value(&self) -> &[EnumValueDescriptorProto] {
3210 &self.value
3211 }
3212 pub fn clear_value(&mut self) {
3213 self.value.clear();
3214 }
3215
3216 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003217 pub fn set_value(&mut self, v: crate::RepeatedField<EnumValueDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003218 self.value = v;
3219 }
3220
3221 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003222 pub fn mut_value(&mut self) -> &mut crate::RepeatedField<EnumValueDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003223 &mut self.value
3224 }
3225
3226 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003227 pub fn take_value(&mut self) -> crate::RepeatedField<EnumValueDescriptorProto> {
3228 ::std::mem::replace(&mut self.value, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003229 }
3230
3231 // optional .google.protobuf.EnumOptions options = 3;
3232
3233
3234 pub fn get_options(&self) -> &EnumOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003235 self.options.as_ref().unwrap_or_else(|| <EnumOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003236 }
3237 pub fn clear_options(&mut self) {
3238 self.options.clear();
3239 }
3240
3241 pub fn has_options(&self) -> bool {
3242 self.options.is_some()
3243 }
3244
3245 // Param is passed by value, moved
3246 pub fn set_options(&mut self, v: EnumOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003247 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003248 }
3249
3250 // Mutable pointer to the field.
3251 // If field is not initialized, it is initialized with default value first.
3252 pub fn mut_options(&mut self) -> &mut EnumOptions {
3253 if self.options.is_none() {
3254 self.options.set_default();
3255 }
3256 self.options.as_mut().unwrap()
3257 }
3258
3259 // Take field
3260 pub fn take_options(&mut self) -> EnumOptions {
3261 self.options.take().unwrap_or_else(|| EnumOptions::new())
3262 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08003263
3264 // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
3265
3266
3267 pub fn get_reserved_range(&self) -> &[EnumDescriptorProto_EnumReservedRange] {
3268 &self.reserved_range
3269 }
3270 pub fn clear_reserved_range(&mut self) {
3271 self.reserved_range.clear();
3272 }
3273
3274 // Param is passed by value, moved
3275 pub fn set_reserved_range(&mut self, v: crate::RepeatedField<EnumDescriptorProto_EnumReservedRange>) {
3276 self.reserved_range = v;
3277 }
3278
3279 // Mutable pointer to the field.
3280 pub fn mut_reserved_range(&mut self) -> &mut crate::RepeatedField<EnumDescriptorProto_EnumReservedRange> {
3281 &mut self.reserved_range
3282 }
3283
3284 // Take field
3285 pub fn take_reserved_range(&mut self) -> crate::RepeatedField<EnumDescriptorProto_EnumReservedRange> {
3286 ::std::mem::replace(&mut self.reserved_range, crate::RepeatedField::new())
3287 }
3288
3289 // repeated string reserved_name = 5;
3290
3291
3292 pub fn get_reserved_name(&self) -> &[::std::string::String] {
3293 &self.reserved_name
3294 }
3295 pub fn clear_reserved_name(&mut self) {
3296 self.reserved_name.clear();
3297 }
3298
3299 // Param is passed by value, moved
3300 pub fn set_reserved_name(&mut self, v: crate::RepeatedField<::std::string::String>) {
3301 self.reserved_name = v;
3302 }
3303
3304 // Mutable pointer to the field.
3305 pub fn mut_reserved_name(&mut self) -> &mut crate::RepeatedField<::std::string::String> {
3306 &mut self.reserved_name
3307 }
3308
3309 // Take field
3310 pub fn take_reserved_name(&mut self) -> crate::RepeatedField<::std::string::String> {
3311 ::std::mem::replace(&mut self.reserved_name, crate::RepeatedField::new())
3312 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003313}
3314
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003315impl crate::Message for EnumDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003316 fn is_initialized(&self) -> bool {
3317 for v in &self.value {
3318 if !v.is_initialized() {
3319 return false;
3320 }
3321 };
3322 for v in &self.options {
3323 if !v.is_initialized() {
3324 return false;
3325 }
3326 };
Haibo Huangca95bfd2021-02-09 17:48:30 -08003327 for v in &self.reserved_range {
3328 if !v.is_initialized() {
3329 return false;
3330 }
3331 };
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003332 true
3333 }
3334
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003335 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003336 while !is.eof()? {
3337 let (field_number, wire_type) = is.read_tag_unpack()?;
3338 match field_number {
3339 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003340 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003341 },
3342 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003343 crate::rt::read_repeated_message_into(wire_type, is, &mut self.value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003344 },
3345 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003346 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003347 },
Haibo Huangca95bfd2021-02-09 17:48:30 -08003348 4 => {
3349 crate::rt::read_repeated_message_into(wire_type, is, &mut self.reserved_range)?;
3350 },
3351 5 => {
3352 crate::rt::read_repeated_string_into(wire_type, is, &mut self.reserved_name)?;
3353 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003354 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003355 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003356 },
3357 };
3358 }
3359 ::std::result::Result::Ok(())
3360 }
3361
3362 // Compute sizes of nested messages
3363 #[allow(unused_variables)]
3364 fn compute_size(&self) -> u32 {
3365 let mut my_size = 0;
3366 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003367 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003368 }
3369 for value in &self.value {
3370 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003371 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003372 };
3373 if let Some(ref v) = self.options.as_ref() {
3374 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003375 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003376 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08003377 for value in &self.reserved_range {
3378 let len = value.compute_size();
3379 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
3380 };
3381 for value in &self.reserved_name {
3382 my_size += crate::rt::string_size(5, &value);
3383 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003384 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003385 self.cached_size.set(my_size);
3386 my_size
3387 }
3388
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003389 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003390 if let Some(ref v) = self.name.as_ref() {
3391 os.write_string(1, &v)?;
3392 }
3393 for v in &self.value {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003394 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003395 os.write_raw_varint32(v.get_cached_size())?;
3396 v.write_to_with_cached_sizes(os)?;
3397 };
3398 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003399 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003400 os.write_raw_varint32(v.get_cached_size())?;
3401 v.write_to_with_cached_sizes(os)?;
3402 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08003403 for v in &self.reserved_range {
3404 os.write_tag(4, crate::wire_format::WireTypeLengthDelimited)?;
3405 os.write_raw_varint32(v.get_cached_size())?;
3406 v.write_to_with_cached_sizes(os)?;
3407 };
3408 for v in &self.reserved_name {
3409 os.write_string(5, &v)?;
3410 };
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003411 os.write_unknown_fields(self.get_unknown_fields())?;
3412 ::std::result::Result::Ok(())
3413 }
3414
3415 fn get_cached_size(&self) -> u32 {
3416 self.cached_size.get()
3417 }
3418
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003419 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003420 &self.unknown_fields
3421 }
3422
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003423 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003424 &mut self.unknown_fields
3425 }
3426
3427 fn as_any(&self) -> &dyn (::std::any::Any) {
3428 self as &dyn (::std::any::Any)
3429 }
3430 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3431 self as &mut dyn (::std::any::Any)
3432 }
Haibo Huang52aa7852020-07-10 20:23:55 -07003433 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003434 self
3435 }
3436
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003437 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003438 Self::descriptor_static()
3439 }
3440
3441 fn new() -> EnumDescriptorProto {
3442 EnumDescriptorProto::new()
3443 }
3444
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003445 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
3446 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003447 descriptor.get(|| {
3448 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003449 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003450 "name",
3451 |m: &EnumDescriptorProto| { &m.name },
3452 |m: &mut EnumDescriptorProto| { &mut m.name },
3453 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003454 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumValueDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003455 "value",
3456 |m: &EnumDescriptorProto| { &m.value },
3457 |m: &mut EnumDescriptorProto| { &mut m.value },
3458 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003459 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003460 "options",
3461 |m: &EnumDescriptorProto| { &m.options },
3462 |m: &mut EnumDescriptorProto| { &mut m.options },
3463 ));
Haibo Huangca95bfd2021-02-09 17:48:30 -08003464 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumDescriptorProto_EnumReservedRange>>(
3465 "reserved_range",
3466 |m: &EnumDescriptorProto| { &m.reserved_range },
3467 |m: &mut EnumDescriptorProto| { &mut m.reserved_range },
3468 ));
3469 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeString>(
3470 "reserved_name",
3471 |m: &EnumDescriptorProto| { &m.reserved_name },
3472 |m: &mut EnumDescriptorProto| { &mut m.reserved_name },
3473 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003474 crate::reflect::MessageDescriptor::new_pb_name::<EnumDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003475 "EnumDescriptorProto",
3476 fields,
3477 file_descriptor_proto()
3478 )
3479 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003480 }
3481
3482 fn default_instance() -> &'static EnumDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003483 static instance: crate::rt::LazyV2<EnumDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003484 instance.get(EnumDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003485 }
3486}
3487
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003488impl crate::Clear for EnumDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003489 fn clear(&mut self) {
3490 self.name.clear();
3491 self.value.clear();
3492 self.options.clear();
Haibo Huangca95bfd2021-02-09 17:48:30 -08003493 self.reserved_range.clear();
3494 self.reserved_name.clear();
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003495 self.unknown_fields.clear();
3496 }
3497}
3498
3499impl ::std::fmt::Debug for EnumDescriptorProto {
3500 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003501 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003502 }
3503}
3504
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003505impl crate::reflect::ProtobufValue for EnumDescriptorProto {
3506 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
3507 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003508 }
3509}
3510
3511#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08003512#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
3513pub struct EnumDescriptorProto_EnumReservedRange {
3514 // message fields
3515 start: ::std::option::Option<i32>,
3516 end: ::std::option::Option<i32>,
3517 // special fields
3518 #[cfg_attr(feature = "with-serde", serde(skip))]
3519 pub unknown_fields: crate::UnknownFields,
3520 #[cfg_attr(feature = "with-serde", serde(skip))]
3521 pub cached_size: crate::CachedSize,
3522}
3523
3524impl<'a> ::std::default::Default for &'a EnumDescriptorProto_EnumReservedRange {
3525 fn default() -> &'a EnumDescriptorProto_EnumReservedRange {
3526 <EnumDescriptorProto_EnumReservedRange as crate::Message>::default_instance()
3527 }
3528}
3529
3530impl EnumDescriptorProto_EnumReservedRange {
3531 pub fn new() -> EnumDescriptorProto_EnumReservedRange {
3532 ::std::default::Default::default()
3533 }
3534
3535 // optional int32 start = 1;
3536
3537
3538 pub fn get_start(&self) -> i32 {
3539 self.start.unwrap_or(0)
3540 }
3541 pub fn clear_start(&mut self) {
3542 self.start = ::std::option::Option::None;
3543 }
3544
3545 pub fn has_start(&self) -> bool {
3546 self.start.is_some()
3547 }
3548
3549 // Param is passed by value, moved
3550 pub fn set_start(&mut self, v: i32) {
3551 self.start = ::std::option::Option::Some(v);
3552 }
3553
3554 // optional int32 end = 2;
3555
3556
3557 pub fn get_end(&self) -> i32 {
3558 self.end.unwrap_or(0)
3559 }
3560 pub fn clear_end(&mut self) {
3561 self.end = ::std::option::Option::None;
3562 }
3563
3564 pub fn has_end(&self) -> bool {
3565 self.end.is_some()
3566 }
3567
3568 // Param is passed by value, moved
3569 pub fn set_end(&mut self, v: i32) {
3570 self.end = ::std::option::Option::Some(v);
3571 }
3572}
3573
3574impl crate::Message for EnumDescriptorProto_EnumReservedRange {
3575 fn is_initialized(&self) -> bool {
3576 true
3577 }
3578
3579 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
3580 while !is.eof()? {
3581 let (field_number, wire_type) = is.read_tag_unpack()?;
3582 match field_number {
3583 1 => {
3584 if wire_type != crate::wire_format::WireTypeVarint {
3585 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
3586 }
3587 let tmp = is.read_int32()?;
3588 self.start = ::std::option::Option::Some(tmp);
3589 },
3590 2 => {
3591 if wire_type != crate::wire_format::WireTypeVarint {
3592 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
3593 }
3594 let tmp = is.read_int32()?;
3595 self.end = ::std::option::Option::Some(tmp);
3596 },
3597 _ => {
3598 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
3599 },
3600 };
3601 }
3602 ::std::result::Result::Ok(())
3603 }
3604
3605 // Compute sizes of nested messages
3606 #[allow(unused_variables)]
3607 fn compute_size(&self) -> u32 {
3608 let mut my_size = 0;
3609 if let Some(v) = self.start {
3610 my_size += crate::rt::value_size(1, v, crate::wire_format::WireTypeVarint);
3611 }
3612 if let Some(v) = self.end {
3613 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
3614 }
3615 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
3616 self.cached_size.set(my_size);
3617 my_size
3618 }
3619
3620 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
3621 if let Some(v) = self.start {
3622 os.write_int32(1, v)?;
3623 }
3624 if let Some(v) = self.end {
3625 os.write_int32(2, v)?;
3626 }
3627 os.write_unknown_fields(self.get_unknown_fields())?;
3628 ::std::result::Result::Ok(())
3629 }
3630
3631 fn get_cached_size(&self) -> u32 {
3632 self.cached_size.get()
3633 }
3634
3635 fn get_unknown_fields(&self) -> &crate::UnknownFields {
3636 &self.unknown_fields
3637 }
3638
3639 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
3640 &mut self.unknown_fields
3641 }
3642
3643 fn as_any(&self) -> &dyn (::std::any::Any) {
3644 self as &dyn (::std::any::Any)
3645 }
3646 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3647 self as &mut dyn (::std::any::Any)
3648 }
3649 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
3650 self
3651 }
3652
3653 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
3654 Self::descriptor_static()
3655 }
3656
3657 fn new() -> EnumDescriptorProto_EnumReservedRange {
3658 EnumDescriptorProto_EnumReservedRange::new()
3659 }
3660
3661 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
3662 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
3663 descriptor.get(|| {
3664 let mut fields = ::std::vec::Vec::new();
3665 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
3666 "start",
3667 |m: &EnumDescriptorProto_EnumReservedRange| { &m.start },
3668 |m: &mut EnumDescriptorProto_EnumReservedRange| { &mut m.start },
3669 ));
3670 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
3671 "end",
3672 |m: &EnumDescriptorProto_EnumReservedRange| { &m.end },
3673 |m: &mut EnumDescriptorProto_EnumReservedRange| { &mut m.end },
3674 ));
3675 crate::reflect::MessageDescriptor::new_pb_name::<EnumDescriptorProto_EnumReservedRange>(
3676 "EnumDescriptorProto.EnumReservedRange",
3677 fields,
3678 file_descriptor_proto()
3679 )
3680 })
3681 }
3682
3683 fn default_instance() -> &'static EnumDescriptorProto_EnumReservedRange {
3684 static instance: crate::rt::LazyV2<EnumDescriptorProto_EnumReservedRange> = crate::rt::LazyV2::INIT;
3685 instance.get(EnumDescriptorProto_EnumReservedRange::new)
3686 }
3687}
3688
3689impl crate::Clear for EnumDescriptorProto_EnumReservedRange {
3690 fn clear(&mut self) {
3691 self.start = ::std::option::Option::None;
3692 self.end = ::std::option::Option::None;
3693 self.unknown_fields.clear();
3694 }
3695}
3696
3697impl ::std::fmt::Debug for EnumDescriptorProto_EnumReservedRange {
3698 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3699 crate::text_format::fmt(self, f)
3700 }
3701}
3702
3703impl crate::reflect::ProtobufValue for EnumDescriptorProto_EnumReservedRange {
3704 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
3705 crate::reflect::ReflectValueRef::Message(self)
3706 }
3707}
3708
3709#[derive(PartialEq,Clone,Default)]
3710#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003711pub struct EnumValueDescriptorProto {
3712 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003713 name: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003714 number: ::std::option::Option<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003715 pub options: crate::SingularPtrField<EnumValueOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003716 // special fields
3717 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003718 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003719 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003720 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003721}
3722
3723impl<'a> ::std::default::Default for &'a EnumValueDescriptorProto {
3724 fn default() -> &'a EnumValueDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003725 <EnumValueDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003726 }
3727}
3728
3729impl EnumValueDescriptorProto {
3730 pub fn new() -> EnumValueDescriptorProto {
3731 ::std::default::Default::default()
3732 }
3733
3734 // optional string name = 1;
3735
3736
3737 pub fn get_name(&self) -> &str {
3738 match self.name.as_ref() {
3739 Some(v) => &v,
3740 None => "",
3741 }
3742 }
3743 pub fn clear_name(&mut self) {
3744 self.name.clear();
3745 }
3746
3747 pub fn has_name(&self) -> bool {
3748 self.name.is_some()
3749 }
3750
3751 // Param is passed by value, moved
3752 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003753 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003754 }
3755
3756 // Mutable pointer to the field.
3757 // If field is not initialized, it is initialized with default value first.
3758 pub fn mut_name(&mut self) -> &mut ::std::string::String {
3759 if self.name.is_none() {
3760 self.name.set_default();
3761 }
3762 self.name.as_mut().unwrap()
3763 }
3764
3765 // Take field
3766 pub fn take_name(&mut self) -> ::std::string::String {
3767 self.name.take().unwrap_or_else(|| ::std::string::String::new())
3768 }
3769
3770 // optional int32 number = 2;
3771
3772
3773 pub fn get_number(&self) -> i32 {
3774 self.number.unwrap_or(0)
3775 }
3776 pub fn clear_number(&mut self) {
3777 self.number = ::std::option::Option::None;
3778 }
3779
3780 pub fn has_number(&self) -> bool {
3781 self.number.is_some()
3782 }
3783
3784 // Param is passed by value, moved
3785 pub fn set_number(&mut self, v: i32) {
3786 self.number = ::std::option::Option::Some(v);
3787 }
3788
3789 // optional .google.protobuf.EnumValueOptions options = 3;
3790
3791
3792 pub fn get_options(&self) -> &EnumValueOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003793 self.options.as_ref().unwrap_or_else(|| <EnumValueOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003794 }
3795 pub fn clear_options(&mut self) {
3796 self.options.clear();
3797 }
3798
3799 pub fn has_options(&self) -> bool {
3800 self.options.is_some()
3801 }
3802
3803 // Param is passed by value, moved
3804 pub fn set_options(&mut self, v: EnumValueOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003805 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003806 }
3807
3808 // Mutable pointer to the field.
3809 // If field is not initialized, it is initialized with default value first.
3810 pub fn mut_options(&mut self) -> &mut EnumValueOptions {
3811 if self.options.is_none() {
3812 self.options.set_default();
3813 }
3814 self.options.as_mut().unwrap()
3815 }
3816
3817 // Take field
3818 pub fn take_options(&mut self) -> EnumValueOptions {
3819 self.options.take().unwrap_or_else(|| EnumValueOptions::new())
3820 }
3821}
3822
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003823impl crate::Message for EnumValueDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003824 fn is_initialized(&self) -> bool {
3825 for v in &self.options {
3826 if !v.is_initialized() {
3827 return false;
3828 }
3829 };
3830 true
3831 }
3832
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003833 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003834 while !is.eof()? {
3835 let (field_number, wire_type) = is.read_tag_unpack()?;
3836 match field_number {
3837 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003838 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003839 },
3840 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003841 if wire_type != crate::wire_format::WireTypeVarint {
3842 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003843 }
3844 let tmp = is.read_int32()?;
3845 self.number = ::std::option::Option::Some(tmp);
3846 },
3847 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003848 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003849 },
3850 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003851 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003852 },
3853 };
3854 }
3855 ::std::result::Result::Ok(())
3856 }
3857
3858 // Compute sizes of nested messages
3859 #[allow(unused_variables)]
3860 fn compute_size(&self) -> u32 {
3861 let mut my_size = 0;
3862 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003863 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003864 }
3865 if let Some(v) = self.number {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003866 my_size += crate::rt::value_size(2, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003867 }
3868 if let Some(ref v) = self.options.as_ref() {
3869 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003870 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003871 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003872 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003873 self.cached_size.set(my_size);
3874 my_size
3875 }
3876
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003877 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003878 if let Some(ref v) = self.name.as_ref() {
3879 os.write_string(1, &v)?;
3880 }
3881 if let Some(v) = self.number {
3882 os.write_int32(2, v)?;
3883 }
3884 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003885 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003886 os.write_raw_varint32(v.get_cached_size())?;
3887 v.write_to_with_cached_sizes(os)?;
3888 }
3889 os.write_unknown_fields(self.get_unknown_fields())?;
3890 ::std::result::Result::Ok(())
3891 }
3892
3893 fn get_cached_size(&self) -> u32 {
3894 self.cached_size.get()
3895 }
3896
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003897 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003898 &self.unknown_fields
3899 }
3900
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003901 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003902 &mut self.unknown_fields
3903 }
3904
3905 fn as_any(&self) -> &dyn (::std::any::Any) {
3906 self as &dyn (::std::any::Any)
3907 }
3908 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
3909 self as &mut dyn (::std::any::Any)
3910 }
Haibo Huang52aa7852020-07-10 20:23:55 -07003911 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003912 self
3913 }
3914
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003915 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003916 Self::descriptor_static()
3917 }
3918
3919 fn new() -> EnumValueDescriptorProto {
3920 EnumValueDescriptorProto::new()
3921 }
3922
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003923 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
3924 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003925 descriptor.get(|| {
3926 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003927 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003928 "name",
3929 |m: &EnumValueDescriptorProto| { &m.name },
3930 |m: &mut EnumValueDescriptorProto| { &mut m.name },
3931 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003932 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003933 "number",
3934 |m: &EnumValueDescriptorProto| { &m.number },
3935 |m: &mut EnumValueDescriptorProto| { &mut m.number },
3936 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003937 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<EnumValueOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003938 "options",
3939 |m: &EnumValueDescriptorProto| { &m.options },
3940 |m: &mut EnumValueDescriptorProto| { &mut m.options },
3941 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003942 crate::reflect::MessageDescriptor::new_pb_name::<EnumValueDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07003943 "EnumValueDescriptorProto",
3944 fields,
3945 file_descriptor_proto()
3946 )
3947 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003948 }
3949
3950 fn default_instance() -> &'static EnumValueDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003951 static instance: crate::rt::LazyV2<EnumValueDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07003952 instance.get(EnumValueDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003953 }
3954}
3955
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003956impl crate::Clear for EnumValueDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003957 fn clear(&mut self) {
3958 self.name.clear();
3959 self.number = ::std::option::Option::None;
3960 self.options.clear();
3961 self.unknown_fields.clear();
3962 }
3963}
3964
3965impl ::std::fmt::Debug for EnumValueDescriptorProto {
3966 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003967 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003968 }
3969}
3970
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003971impl crate::reflect::ProtobufValue for EnumValueDescriptorProto {
3972 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
3973 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003974 }
3975}
3976
3977#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08003978#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003979pub struct ServiceDescriptorProto {
3980 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003981 name: crate::SingularField<::std::string::String>,
3982 pub method: crate::RepeatedField<MethodDescriptorProto>,
3983 pub options: crate::SingularPtrField<ServiceOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003984 // special fields
3985 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003986 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003987 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003988 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003989}
3990
3991impl<'a> ::std::default::Default for &'a ServiceDescriptorProto {
3992 fn default() -> &'a ServiceDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07003993 <ServiceDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07003994 }
3995}
3996
3997impl ServiceDescriptorProto {
3998 pub fn new() -> ServiceDescriptorProto {
3999 ::std::default::Default::default()
4000 }
4001
4002 // optional string name = 1;
4003
4004
4005 pub fn get_name(&self) -> &str {
4006 match self.name.as_ref() {
4007 Some(v) => &v,
4008 None => "",
4009 }
4010 }
4011 pub fn clear_name(&mut self) {
4012 self.name.clear();
4013 }
4014
4015 pub fn has_name(&self) -> bool {
4016 self.name.is_some()
4017 }
4018
4019 // Param is passed by value, moved
4020 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004021 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004022 }
4023
4024 // Mutable pointer to the field.
4025 // If field is not initialized, it is initialized with default value first.
4026 pub fn mut_name(&mut self) -> &mut ::std::string::String {
4027 if self.name.is_none() {
4028 self.name.set_default();
4029 }
4030 self.name.as_mut().unwrap()
4031 }
4032
4033 // Take field
4034 pub fn take_name(&mut self) -> ::std::string::String {
4035 self.name.take().unwrap_or_else(|| ::std::string::String::new())
4036 }
4037
4038 // repeated .google.protobuf.MethodDescriptorProto method = 2;
4039
4040
4041 pub fn get_method(&self) -> &[MethodDescriptorProto] {
4042 &self.method
4043 }
4044 pub fn clear_method(&mut self) {
4045 self.method.clear();
4046 }
4047
4048 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004049 pub fn set_method(&mut self, v: crate::RepeatedField<MethodDescriptorProto>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004050 self.method = v;
4051 }
4052
4053 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004054 pub fn mut_method(&mut self) -> &mut crate::RepeatedField<MethodDescriptorProto> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004055 &mut self.method
4056 }
4057
4058 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004059 pub fn take_method(&mut self) -> crate::RepeatedField<MethodDescriptorProto> {
4060 ::std::mem::replace(&mut self.method, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004061 }
4062
4063 // optional .google.protobuf.ServiceOptions options = 3;
4064
4065
4066 pub fn get_options(&self) -> &ServiceOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004067 self.options.as_ref().unwrap_or_else(|| <ServiceOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004068 }
4069 pub fn clear_options(&mut self) {
4070 self.options.clear();
4071 }
4072
4073 pub fn has_options(&self) -> bool {
4074 self.options.is_some()
4075 }
4076
4077 // Param is passed by value, moved
4078 pub fn set_options(&mut self, v: ServiceOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004079 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004080 }
4081
4082 // Mutable pointer to the field.
4083 // If field is not initialized, it is initialized with default value first.
4084 pub fn mut_options(&mut self) -> &mut ServiceOptions {
4085 if self.options.is_none() {
4086 self.options.set_default();
4087 }
4088 self.options.as_mut().unwrap()
4089 }
4090
4091 // Take field
4092 pub fn take_options(&mut self) -> ServiceOptions {
4093 self.options.take().unwrap_or_else(|| ServiceOptions::new())
4094 }
4095}
4096
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004097impl crate::Message for ServiceDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004098 fn is_initialized(&self) -> bool {
4099 for v in &self.method {
4100 if !v.is_initialized() {
4101 return false;
4102 }
4103 };
4104 for v in &self.options {
4105 if !v.is_initialized() {
4106 return false;
4107 }
4108 };
4109 true
4110 }
4111
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004112 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004113 while !is.eof()? {
4114 let (field_number, wire_type) = is.read_tag_unpack()?;
4115 match field_number {
4116 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004117 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004118 },
4119 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004120 crate::rt::read_repeated_message_into(wire_type, is, &mut self.method)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004121 },
4122 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004123 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004124 },
4125 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004126 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004127 },
4128 };
4129 }
4130 ::std::result::Result::Ok(())
4131 }
4132
4133 // Compute sizes of nested messages
4134 #[allow(unused_variables)]
4135 fn compute_size(&self) -> u32 {
4136 let mut my_size = 0;
4137 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004138 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004139 }
4140 for value in &self.method {
4141 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004142 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004143 };
4144 if let Some(ref v) = self.options.as_ref() {
4145 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004146 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004147 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004148 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004149 self.cached_size.set(my_size);
4150 my_size
4151 }
4152
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004153 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004154 if let Some(ref v) = self.name.as_ref() {
4155 os.write_string(1, &v)?;
4156 }
4157 for v in &self.method {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004158 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004159 os.write_raw_varint32(v.get_cached_size())?;
4160 v.write_to_with_cached_sizes(os)?;
4161 };
4162 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004163 os.write_tag(3, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004164 os.write_raw_varint32(v.get_cached_size())?;
4165 v.write_to_with_cached_sizes(os)?;
4166 }
4167 os.write_unknown_fields(self.get_unknown_fields())?;
4168 ::std::result::Result::Ok(())
4169 }
4170
4171 fn get_cached_size(&self) -> u32 {
4172 self.cached_size.get()
4173 }
4174
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004175 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004176 &self.unknown_fields
4177 }
4178
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004179 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004180 &mut self.unknown_fields
4181 }
4182
4183 fn as_any(&self) -> &dyn (::std::any::Any) {
4184 self as &dyn (::std::any::Any)
4185 }
4186 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4187 self as &mut dyn (::std::any::Any)
4188 }
Haibo Huang52aa7852020-07-10 20:23:55 -07004189 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004190 self
4191 }
4192
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004193 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004194 Self::descriptor_static()
4195 }
4196
4197 fn new() -> ServiceDescriptorProto {
4198 ServiceDescriptorProto::new()
4199 }
4200
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004201 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
4202 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004203 descriptor.get(|| {
4204 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004205 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004206 "name",
4207 |m: &ServiceDescriptorProto| { &m.name },
4208 |m: &mut ServiceDescriptorProto| { &mut m.name },
4209 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004210 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<MethodDescriptorProto>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004211 "method",
4212 |m: &ServiceDescriptorProto| { &m.method },
4213 |m: &mut ServiceDescriptorProto| { &mut m.method },
4214 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004215 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<ServiceOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004216 "options",
4217 |m: &ServiceDescriptorProto| { &m.options },
4218 |m: &mut ServiceDescriptorProto| { &mut m.options },
4219 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004220 crate::reflect::MessageDescriptor::new_pb_name::<ServiceDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004221 "ServiceDescriptorProto",
4222 fields,
4223 file_descriptor_proto()
4224 )
4225 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004226 }
4227
4228 fn default_instance() -> &'static ServiceDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004229 static instance: crate::rt::LazyV2<ServiceDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004230 instance.get(ServiceDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004231 }
4232}
4233
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004234impl crate::Clear for ServiceDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004235 fn clear(&mut self) {
4236 self.name.clear();
4237 self.method.clear();
4238 self.options.clear();
4239 self.unknown_fields.clear();
4240 }
4241}
4242
4243impl ::std::fmt::Debug for ServiceDescriptorProto {
4244 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004245 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004246 }
4247}
4248
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004249impl crate::reflect::ProtobufValue for ServiceDescriptorProto {
4250 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
4251 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004252 }
4253}
4254
4255#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08004256#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004257pub struct MethodDescriptorProto {
4258 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004259 name: crate::SingularField<::std::string::String>,
4260 input_type: crate::SingularField<::std::string::String>,
4261 output_type: crate::SingularField<::std::string::String>,
4262 pub options: crate::SingularPtrField<MethodOptions>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004263 client_streaming: ::std::option::Option<bool>,
4264 server_streaming: ::std::option::Option<bool>,
4265 // special fields
4266 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004267 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004268 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004269 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004270}
4271
4272impl<'a> ::std::default::Default for &'a MethodDescriptorProto {
4273 fn default() -> &'a MethodDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004274 <MethodDescriptorProto as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004275 }
4276}
4277
4278impl MethodDescriptorProto {
4279 pub fn new() -> MethodDescriptorProto {
4280 ::std::default::Default::default()
4281 }
4282
4283 // optional string name = 1;
4284
4285
4286 pub fn get_name(&self) -> &str {
4287 match self.name.as_ref() {
4288 Some(v) => &v,
4289 None => "",
4290 }
4291 }
4292 pub fn clear_name(&mut self) {
4293 self.name.clear();
4294 }
4295
4296 pub fn has_name(&self) -> bool {
4297 self.name.is_some()
4298 }
4299
4300 // Param is passed by value, moved
4301 pub fn set_name(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004302 self.name = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004303 }
4304
4305 // Mutable pointer to the field.
4306 // If field is not initialized, it is initialized with default value first.
4307 pub fn mut_name(&mut self) -> &mut ::std::string::String {
4308 if self.name.is_none() {
4309 self.name.set_default();
4310 }
4311 self.name.as_mut().unwrap()
4312 }
4313
4314 // Take field
4315 pub fn take_name(&mut self) -> ::std::string::String {
4316 self.name.take().unwrap_or_else(|| ::std::string::String::new())
4317 }
4318
4319 // optional string input_type = 2;
4320
4321
4322 pub fn get_input_type(&self) -> &str {
4323 match self.input_type.as_ref() {
4324 Some(v) => &v,
4325 None => "",
4326 }
4327 }
4328 pub fn clear_input_type(&mut self) {
4329 self.input_type.clear();
4330 }
4331
4332 pub fn has_input_type(&self) -> bool {
4333 self.input_type.is_some()
4334 }
4335
4336 // Param is passed by value, moved
4337 pub fn set_input_type(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004338 self.input_type = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004339 }
4340
4341 // Mutable pointer to the field.
4342 // If field is not initialized, it is initialized with default value first.
4343 pub fn mut_input_type(&mut self) -> &mut ::std::string::String {
4344 if self.input_type.is_none() {
4345 self.input_type.set_default();
4346 }
4347 self.input_type.as_mut().unwrap()
4348 }
4349
4350 // Take field
4351 pub fn take_input_type(&mut self) -> ::std::string::String {
4352 self.input_type.take().unwrap_or_else(|| ::std::string::String::new())
4353 }
4354
4355 // optional string output_type = 3;
4356
4357
4358 pub fn get_output_type(&self) -> &str {
4359 match self.output_type.as_ref() {
4360 Some(v) => &v,
4361 None => "",
4362 }
4363 }
4364 pub fn clear_output_type(&mut self) {
4365 self.output_type.clear();
4366 }
4367
4368 pub fn has_output_type(&self) -> bool {
4369 self.output_type.is_some()
4370 }
4371
4372 // Param is passed by value, moved
4373 pub fn set_output_type(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004374 self.output_type = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004375 }
4376
4377 // Mutable pointer to the field.
4378 // If field is not initialized, it is initialized with default value first.
4379 pub fn mut_output_type(&mut self) -> &mut ::std::string::String {
4380 if self.output_type.is_none() {
4381 self.output_type.set_default();
4382 }
4383 self.output_type.as_mut().unwrap()
4384 }
4385
4386 // Take field
4387 pub fn take_output_type(&mut self) -> ::std::string::String {
4388 self.output_type.take().unwrap_or_else(|| ::std::string::String::new())
4389 }
4390
4391 // optional .google.protobuf.MethodOptions options = 4;
4392
4393
4394 pub fn get_options(&self) -> &MethodOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004395 self.options.as_ref().unwrap_or_else(|| <MethodOptions as crate::Message>::default_instance())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004396 }
4397 pub fn clear_options(&mut self) {
4398 self.options.clear();
4399 }
4400
4401 pub fn has_options(&self) -> bool {
4402 self.options.is_some()
4403 }
4404
4405 // Param is passed by value, moved
4406 pub fn set_options(&mut self, v: MethodOptions) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004407 self.options = crate::SingularPtrField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004408 }
4409
4410 // Mutable pointer to the field.
4411 // If field is not initialized, it is initialized with default value first.
4412 pub fn mut_options(&mut self) -> &mut MethodOptions {
4413 if self.options.is_none() {
4414 self.options.set_default();
4415 }
4416 self.options.as_mut().unwrap()
4417 }
4418
4419 // Take field
4420 pub fn take_options(&mut self) -> MethodOptions {
4421 self.options.take().unwrap_or_else(|| MethodOptions::new())
4422 }
4423
4424 // optional bool client_streaming = 5;
4425
4426
4427 pub fn get_client_streaming(&self) -> bool {
4428 self.client_streaming.unwrap_or(false)
4429 }
4430 pub fn clear_client_streaming(&mut self) {
4431 self.client_streaming = ::std::option::Option::None;
4432 }
4433
4434 pub fn has_client_streaming(&self) -> bool {
4435 self.client_streaming.is_some()
4436 }
4437
4438 // Param is passed by value, moved
4439 pub fn set_client_streaming(&mut self, v: bool) {
4440 self.client_streaming = ::std::option::Option::Some(v);
4441 }
4442
4443 // optional bool server_streaming = 6;
4444
4445
4446 pub fn get_server_streaming(&self) -> bool {
4447 self.server_streaming.unwrap_or(false)
4448 }
4449 pub fn clear_server_streaming(&mut self) {
4450 self.server_streaming = ::std::option::Option::None;
4451 }
4452
4453 pub fn has_server_streaming(&self) -> bool {
4454 self.server_streaming.is_some()
4455 }
4456
4457 // Param is passed by value, moved
4458 pub fn set_server_streaming(&mut self, v: bool) {
4459 self.server_streaming = ::std::option::Option::Some(v);
4460 }
4461}
4462
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004463impl crate::Message for MethodDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004464 fn is_initialized(&self) -> bool {
4465 for v in &self.options {
4466 if !v.is_initialized() {
4467 return false;
4468 }
4469 };
4470 true
4471 }
4472
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004473 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004474 while !is.eof()? {
4475 let (field_number, wire_type) = is.read_tag_unpack()?;
4476 match field_number {
4477 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004478 crate::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004479 },
4480 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004481 crate::rt::read_singular_string_into(wire_type, is, &mut self.input_type)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004482 },
4483 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004484 crate::rt::read_singular_string_into(wire_type, is, &mut self.output_type)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004485 },
4486 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004487 crate::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004488 },
4489 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004490 if wire_type != crate::wire_format::WireTypeVarint {
4491 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004492 }
4493 let tmp = is.read_bool()?;
4494 self.client_streaming = ::std::option::Option::Some(tmp);
4495 },
4496 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004497 if wire_type != crate::wire_format::WireTypeVarint {
4498 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004499 }
4500 let tmp = is.read_bool()?;
4501 self.server_streaming = ::std::option::Option::Some(tmp);
4502 },
4503 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004504 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004505 },
4506 };
4507 }
4508 ::std::result::Result::Ok(())
4509 }
4510
4511 // Compute sizes of nested messages
4512 #[allow(unused_variables)]
4513 fn compute_size(&self) -> u32 {
4514 let mut my_size = 0;
4515 if let Some(ref v) = self.name.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004516 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004517 }
4518 if let Some(ref v) = self.input_type.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004519 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004520 }
4521 if let Some(ref v) = self.output_type.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004522 my_size += crate::rt::string_size(3, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004523 }
4524 if let Some(ref v) = self.options.as_ref() {
4525 let len = v.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004526 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004527 }
4528 if let Some(v) = self.client_streaming {
4529 my_size += 2;
4530 }
4531 if let Some(v) = self.server_streaming {
4532 my_size += 2;
4533 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004534 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004535 self.cached_size.set(my_size);
4536 my_size
4537 }
4538
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004539 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004540 if let Some(ref v) = self.name.as_ref() {
4541 os.write_string(1, &v)?;
4542 }
4543 if let Some(ref v) = self.input_type.as_ref() {
4544 os.write_string(2, &v)?;
4545 }
4546 if let Some(ref v) = self.output_type.as_ref() {
4547 os.write_string(3, &v)?;
4548 }
4549 if let Some(ref v) = self.options.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004550 os.write_tag(4, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004551 os.write_raw_varint32(v.get_cached_size())?;
4552 v.write_to_with_cached_sizes(os)?;
4553 }
4554 if let Some(v) = self.client_streaming {
4555 os.write_bool(5, v)?;
4556 }
4557 if let Some(v) = self.server_streaming {
4558 os.write_bool(6, v)?;
4559 }
4560 os.write_unknown_fields(self.get_unknown_fields())?;
4561 ::std::result::Result::Ok(())
4562 }
4563
4564 fn get_cached_size(&self) -> u32 {
4565 self.cached_size.get()
4566 }
4567
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004568 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004569 &self.unknown_fields
4570 }
4571
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004572 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004573 &mut self.unknown_fields
4574 }
4575
4576 fn as_any(&self) -> &dyn (::std::any::Any) {
4577 self as &dyn (::std::any::Any)
4578 }
4579 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
4580 self as &mut dyn (::std::any::Any)
4581 }
Haibo Huang52aa7852020-07-10 20:23:55 -07004582 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004583 self
4584 }
4585
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004586 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004587 Self::descriptor_static()
4588 }
4589
4590 fn new() -> MethodDescriptorProto {
4591 MethodDescriptorProto::new()
4592 }
4593
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004594 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
4595 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004596 descriptor.get(|| {
4597 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004598 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004599 "name",
4600 |m: &MethodDescriptorProto| { &m.name },
4601 |m: &mut MethodDescriptorProto| { &mut m.name },
4602 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004603 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004604 "input_type",
4605 |m: &MethodDescriptorProto| { &m.input_type },
4606 |m: &mut MethodDescriptorProto| { &mut m.input_type },
4607 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004608 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004609 "output_type",
4610 |m: &MethodDescriptorProto| { &m.output_type },
4611 |m: &mut MethodDescriptorProto| { &mut m.output_type },
4612 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004613 fields.push(crate::reflect::accessor::make_singular_ptr_field_accessor::<_, crate::types::ProtobufTypeMessage<MethodOptions>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004614 "options",
4615 |m: &MethodDescriptorProto| { &m.options },
4616 |m: &mut MethodDescriptorProto| { &mut m.options },
4617 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004618 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004619 "client_streaming",
4620 |m: &MethodDescriptorProto| { &m.client_streaming },
4621 |m: &mut MethodDescriptorProto| { &mut m.client_streaming },
4622 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004623 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004624 "server_streaming",
4625 |m: &MethodDescriptorProto| { &m.server_streaming },
4626 |m: &mut MethodDescriptorProto| { &mut m.server_streaming },
4627 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004628 crate::reflect::MessageDescriptor::new_pb_name::<MethodDescriptorProto>(
Haibo Huang52aa7852020-07-10 20:23:55 -07004629 "MethodDescriptorProto",
4630 fields,
4631 file_descriptor_proto()
4632 )
4633 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004634 }
4635
4636 fn default_instance() -> &'static MethodDescriptorProto {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004637 static instance: crate::rt::LazyV2<MethodDescriptorProto> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07004638 instance.get(MethodDescriptorProto::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004639 }
4640}
4641
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004642impl crate::Clear for MethodDescriptorProto {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004643 fn clear(&mut self) {
4644 self.name.clear();
4645 self.input_type.clear();
4646 self.output_type.clear();
4647 self.options.clear();
4648 self.client_streaming = ::std::option::Option::None;
4649 self.server_streaming = ::std::option::Option::None;
4650 self.unknown_fields.clear();
4651 }
4652}
4653
4654impl ::std::fmt::Debug for MethodDescriptorProto {
4655 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004656 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004657 }
4658}
4659
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004660impl crate::reflect::ProtobufValue for MethodDescriptorProto {
4661 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
4662 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004663 }
4664}
4665
4666#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08004667#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004668pub struct FileOptions {
4669 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004670 java_package: crate::SingularField<::std::string::String>,
4671 java_outer_classname: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004672 java_multiple_files: ::std::option::Option<bool>,
4673 java_generate_equals_and_hash: ::std::option::Option<bool>,
4674 java_string_check_utf8: ::std::option::Option<bool>,
4675 optimize_for: ::std::option::Option<FileOptions_OptimizeMode>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004676 go_package: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004677 cc_generic_services: ::std::option::Option<bool>,
4678 java_generic_services: ::std::option::Option<bool>,
4679 py_generic_services: ::std::option::Option<bool>,
Haibo Huangca95bfd2021-02-09 17:48:30 -08004680 php_generic_services: ::std::option::Option<bool>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004681 deprecated: ::std::option::Option<bool>,
4682 cc_enable_arenas: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004683 objc_class_prefix: crate::SingularField<::std::string::String>,
4684 csharp_namespace: crate::SingularField<::std::string::String>,
Haibo Huangca95bfd2021-02-09 17:48:30 -08004685 swift_prefix: crate::SingularField<::std::string::String>,
4686 php_class_prefix: crate::SingularField<::std::string::String>,
4687 php_namespace: crate::SingularField<::std::string::String>,
4688 php_metadata_namespace: crate::SingularField<::std::string::String>,
4689 ruby_package: crate::SingularField<::std::string::String>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004690 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004691 // special fields
4692 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004693 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004694 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004695 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004696}
4697
4698impl<'a> ::std::default::Default for &'a FileOptions {
4699 fn default() -> &'a FileOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004700 <FileOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004701 }
4702}
4703
4704impl FileOptions {
4705 pub fn new() -> FileOptions {
4706 ::std::default::Default::default()
4707 }
4708
4709 // optional string java_package = 1;
4710
4711
4712 pub fn get_java_package(&self) -> &str {
4713 match self.java_package.as_ref() {
4714 Some(v) => &v,
4715 None => "",
4716 }
4717 }
4718 pub fn clear_java_package(&mut self) {
4719 self.java_package.clear();
4720 }
4721
4722 pub fn has_java_package(&self) -> bool {
4723 self.java_package.is_some()
4724 }
4725
4726 // Param is passed by value, moved
4727 pub fn set_java_package(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004728 self.java_package = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004729 }
4730
4731 // Mutable pointer to the field.
4732 // If field is not initialized, it is initialized with default value first.
4733 pub fn mut_java_package(&mut self) -> &mut ::std::string::String {
4734 if self.java_package.is_none() {
4735 self.java_package.set_default();
4736 }
4737 self.java_package.as_mut().unwrap()
4738 }
4739
4740 // Take field
4741 pub fn take_java_package(&mut self) -> ::std::string::String {
4742 self.java_package.take().unwrap_or_else(|| ::std::string::String::new())
4743 }
4744
4745 // optional string java_outer_classname = 8;
4746
4747
4748 pub fn get_java_outer_classname(&self) -> &str {
4749 match self.java_outer_classname.as_ref() {
4750 Some(v) => &v,
4751 None => "",
4752 }
4753 }
4754 pub fn clear_java_outer_classname(&mut self) {
4755 self.java_outer_classname.clear();
4756 }
4757
4758 pub fn has_java_outer_classname(&self) -> bool {
4759 self.java_outer_classname.is_some()
4760 }
4761
4762 // Param is passed by value, moved
4763 pub fn set_java_outer_classname(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004764 self.java_outer_classname = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004765 }
4766
4767 // Mutable pointer to the field.
4768 // If field is not initialized, it is initialized with default value first.
4769 pub fn mut_java_outer_classname(&mut self) -> &mut ::std::string::String {
4770 if self.java_outer_classname.is_none() {
4771 self.java_outer_classname.set_default();
4772 }
4773 self.java_outer_classname.as_mut().unwrap()
4774 }
4775
4776 // Take field
4777 pub fn take_java_outer_classname(&mut self) -> ::std::string::String {
4778 self.java_outer_classname.take().unwrap_or_else(|| ::std::string::String::new())
4779 }
4780
4781 // optional bool java_multiple_files = 10;
4782
4783
4784 pub fn get_java_multiple_files(&self) -> bool {
4785 self.java_multiple_files.unwrap_or(false)
4786 }
4787 pub fn clear_java_multiple_files(&mut self) {
4788 self.java_multiple_files = ::std::option::Option::None;
4789 }
4790
4791 pub fn has_java_multiple_files(&self) -> bool {
4792 self.java_multiple_files.is_some()
4793 }
4794
4795 // Param is passed by value, moved
4796 pub fn set_java_multiple_files(&mut self, v: bool) {
4797 self.java_multiple_files = ::std::option::Option::Some(v);
4798 }
4799
4800 // optional bool java_generate_equals_and_hash = 20;
4801
4802
4803 pub fn get_java_generate_equals_and_hash(&self) -> bool {
4804 self.java_generate_equals_and_hash.unwrap_or(false)
4805 }
4806 pub fn clear_java_generate_equals_and_hash(&mut self) {
4807 self.java_generate_equals_and_hash = ::std::option::Option::None;
4808 }
4809
4810 pub fn has_java_generate_equals_and_hash(&self) -> bool {
4811 self.java_generate_equals_and_hash.is_some()
4812 }
4813
4814 // Param is passed by value, moved
4815 pub fn set_java_generate_equals_and_hash(&mut self, v: bool) {
4816 self.java_generate_equals_and_hash = ::std::option::Option::Some(v);
4817 }
4818
4819 // optional bool java_string_check_utf8 = 27;
4820
4821
4822 pub fn get_java_string_check_utf8(&self) -> bool {
4823 self.java_string_check_utf8.unwrap_or(false)
4824 }
4825 pub fn clear_java_string_check_utf8(&mut self) {
4826 self.java_string_check_utf8 = ::std::option::Option::None;
4827 }
4828
4829 pub fn has_java_string_check_utf8(&self) -> bool {
4830 self.java_string_check_utf8.is_some()
4831 }
4832
4833 // Param is passed by value, moved
4834 pub fn set_java_string_check_utf8(&mut self, v: bool) {
4835 self.java_string_check_utf8 = ::std::option::Option::Some(v);
4836 }
4837
4838 // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9;
4839
4840
4841 pub fn get_optimize_for(&self) -> FileOptions_OptimizeMode {
4842 self.optimize_for.unwrap_or(FileOptions_OptimizeMode::SPEED)
4843 }
4844 pub fn clear_optimize_for(&mut self) {
4845 self.optimize_for = ::std::option::Option::None;
4846 }
4847
4848 pub fn has_optimize_for(&self) -> bool {
4849 self.optimize_for.is_some()
4850 }
4851
4852 // Param is passed by value, moved
4853 pub fn set_optimize_for(&mut self, v: FileOptions_OptimizeMode) {
4854 self.optimize_for = ::std::option::Option::Some(v);
4855 }
4856
4857 // optional string go_package = 11;
4858
4859
4860 pub fn get_go_package(&self) -> &str {
4861 match self.go_package.as_ref() {
4862 Some(v) => &v,
4863 None => "",
4864 }
4865 }
4866 pub fn clear_go_package(&mut self) {
4867 self.go_package.clear();
4868 }
4869
4870 pub fn has_go_package(&self) -> bool {
4871 self.go_package.is_some()
4872 }
4873
4874 // Param is passed by value, moved
4875 pub fn set_go_package(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07004876 self.go_package = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004877 }
4878
4879 // Mutable pointer to the field.
4880 // If field is not initialized, it is initialized with default value first.
4881 pub fn mut_go_package(&mut self) -> &mut ::std::string::String {
4882 if self.go_package.is_none() {
4883 self.go_package.set_default();
4884 }
4885 self.go_package.as_mut().unwrap()
4886 }
4887
4888 // Take field
4889 pub fn take_go_package(&mut self) -> ::std::string::String {
4890 self.go_package.take().unwrap_or_else(|| ::std::string::String::new())
4891 }
4892
4893 // optional bool cc_generic_services = 16;
4894
4895
4896 pub fn get_cc_generic_services(&self) -> bool {
4897 self.cc_generic_services.unwrap_or(false)
4898 }
4899 pub fn clear_cc_generic_services(&mut self) {
4900 self.cc_generic_services = ::std::option::Option::None;
4901 }
4902
4903 pub fn has_cc_generic_services(&self) -> bool {
4904 self.cc_generic_services.is_some()
4905 }
4906
4907 // Param is passed by value, moved
4908 pub fn set_cc_generic_services(&mut self, v: bool) {
4909 self.cc_generic_services = ::std::option::Option::Some(v);
4910 }
4911
4912 // optional bool java_generic_services = 17;
4913
4914
4915 pub fn get_java_generic_services(&self) -> bool {
4916 self.java_generic_services.unwrap_or(false)
4917 }
4918 pub fn clear_java_generic_services(&mut self) {
4919 self.java_generic_services = ::std::option::Option::None;
4920 }
4921
4922 pub fn has_java_generic_services(&self) -> bool {
4923 self.java_generic_services.is_some()
4924 }
4925
4926 // Param is passed by value, moved
4927 pub fn set_java_generic_services(&mut self, v: bool) {
4928 self.java_generic_services = ::std::option::Option::Some(v);
4929 }
4930
4931 // optional bool py_generic_services = 18;
4932
4933
4934 pub fn get_py_generic_services(&self) -> bool {
4935 self.py_generic_services.unwrap_or(false)
4936 }
4937 pub fn clear_py_generic_services(&mut self) {
4938 self.py_generic_services = ::std::option::Option::None;
4939 }
4940
4941 pub fn has_py_generic_services(&self) -> bool {
4942 self.py_generic_services.is_some()
4943 }
4944
4945 // Param is passed by value, moved
4946 pub fn set_py_generic_services(&mut self, v: bool) {
4947 self.py_generic_services = ::std::option::Option::Some(v);
4948 }
4949
Haibo Huangca95bfd2021-02-09 17:48:30 -08004950 // optional bool php_generic_services = 42;
4951
4952
4953 pub fn get_php_generic_services(&self) -> bool {
4954 self.php_generic_services.unwrap_or(false)
4955 }
4956 pub fn clear_php_generic_services(&mut self) {
4957 self.php_generic_services = ::std::option::Option::None;
4958 }
4959
4960 pub fn has_php_generic_services(&self) -> bool {
4961 self.php_generic_services.is_some()
4962 }
4963
4964 // Param is passed by value, moved
4965 pub fn set_php_generic_services(&mut self, v: bool) {
4966 self.php_generic_services = ::std::option::Option::Some(v);
4967 }
4968
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004969 // optional bool deprecated = 23;
4970
4971
4972 pub fn get_deprecated(&self) -> bool {
4973 self.deprecated.unwrap_or(false)
4974 }
4975 pub fn clear_deprecated(&mut self) {
4976 self.deprecated = ::std::option::Option::None;
4977 }
4978
4979 pub fn has_deprecated(&self) -> bool {
4980 self.deprecated.is_some()
4981 }
4982
4983 // Param is passed by value, moved
4984 pub fn set_deprecated(&mut self, v: bool) {
4985 self.deprecated = ::std::option::Option::Some(v);
4986 }
4987
4988 // optional bool cc_enable_arenas = 31;
4989
4990
4991 pub fn get_cc_enable_arenas(&self) -> bool {
Haibo Huangca95bfd2021-02-09 17:48:30 -08004992 self.cc_enable_arenas.unwrap_or(true)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07004993 }
4994 pub fn clear_cc_enable_arenas(&mut self) {
4995 self.cc_enable_arenas = ::std::option::Option::None;
4996 }
4997
4998 pub fn has_cc_enable_arenas(&self) -> bool {
4999 self.cc_enable_arenas.is_some()
5000 }
5001
5002 // Param is passed by value, moved
5003 pub fn set_cc_enable_arenas(&mut self, v: bool) {
5004 self.cc_enable_arenas = ::std::option::Option::Some(v);
5005 }
5006
5007 // optional string objc_class_prefix = 36;
5008
5009
5010 pub fn get_objc_class_prefix(&self) -> &str {
5011 match self.objc_class_prefix.as_ref() {
5012 Some(v) => &v,
5013 None => "",
5014 }
5015 }
5016 pub fn clear_objc_class_prefix(&mut self) {
5017 self.objc_class_prefix.clear();
5018 }
5019
5020 pub fn has_objc_class_prefix(&self) -> bool {
5021 self.objc_class_prefix.is_some()
5022 }
5023
5024 // Param is passed by value, moved
5025 pub fn set_objc_class_prefix(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005026 self.objc_class_prefix = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005027 }
5028
5029 // Mutable pointer to the field.
5030 // If field is not initialized, it is initialized with default value first.
5031 pub fn mut_objc_class_prefix(&mut self) -> &mut ::std::string::String {
5032 if self.objc_class_prefix.is_none() {
5033 self.objc_class_prefix.set_default();
5034 }
5035 self.objc_class_prefix.as_mut().unwrap()
5036 }
5037
5038 // Take field
5039 pub fn take_objc_class_prefix(&mut self) -> ::std::string::String {
5040 self.objc_class_prefix.take().unwrap_or_else(|| ::std::string::String::new())
5041 }
5042
5043 // optional string csharp_namespace = 37;
5044
5045
5046 pub fn get_csharp_namespace(&self) -> &str {
5047 match self.csharp_namespace.as_ref() {
5048 Some(v) => &v,
5049 None => "",
5050 }
5051 }
5052 pub fn clear_csharp_namespace(&mut self) {
5053 self.csharp_namespace.clear();
5054 }
5055
5056 pub fn has_csharp_namespace(&self) -> bool {
5057 self.csharp_namespace.is_some()
5058 }
5059
5060 // Param is passed by value, moved
5061 pub fn set_csharp_namespace(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005062 self.csharp_namespace = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005063 }
5064
5065 // Mutable pointer to the field.
5066 // If field is not initialized, it is initialized with default value first.
5067 pub fn mut_csharp_namespace(&mut self) -> &mut ::std::string::String {
5068 if self.csharp_namespace.is_none() {
5069 self.csharp_namespace.set_default();
5070 }
5071 self.csharp_namespace.as_mut().unwrap()
5072 }
5073
5074 // Take field
5075 pub fn take_csharp_namespace(&mut self) -> ::std::string::String {
5076 self.csharp_namespace.take().unwrap_or_else(|| ::std::string::String::new())
5077 }
5078
Haibo Huangca95bfd2021-02-09 17:48:30 -08005079 // optional string swift_prefix = 39;
5080
5081
5082 pub fn get_swift_prefix(&self) -> &str {
5083 match self.swift_prefix.as_ref() {
5084 Some(v) => &v,
5085 None => "",
5086 }
5087 }
5088 pub fn clear_swift_prefix(&mut self) {
5089 self.swift_prefix.clear();
5090 }
5091
5092 pub fn has_swift_prefix(&self) -> bool {
5093 self.swift_prefix.is_some()
5094 }
5095
5096 // Param is passed by value, moved
5097 pub fn set_swift_prefix(&mut self, v: ::std::string::String) {
5098 self.swift_prefix = crate::SingularField::some(v);
5099 }
5100
5101 // Mutable pointer to the field.
5102 // If field is not initialized, it is initialized with default value first.
5103 pub fn mut_swift_prefix(&mut self) -> &mut ::std::string::String {
5104 if self.swift_prefix.is_none() {
5105 self.swift_prefix.set_default();
5106 }
5107 self.swift_prefix.as_mut().unwrap()
5108 }
5109
5110 // Take field
5111 pub fn take_swift_prefix(&mut self) -> ::std::string::String {
5112 self.swift_prefix.take().unwrap_or_else(|| ::std::string::String::new())
5113 }
5114
5115 // optional string php_class_prefix = 40;
5116
5117
5118 pub fn get_php_class_prefix(&self) -> &str {
5119 match self.php_class_prefix.as_ref() {
5120 Some(v) => &v,
5121 None => "",
5122 }
5123 }
5124 pub fn clear_php_class_prefix(&mut self) {
5125 self.php_class_prefix.clear();
5126 }
5127
5128 pub fn has_php_class_prefix(&self) -> bool {
5129 self.php_class_prefix.is_some()
5130 }
5131
5132 // Param is passed by value, moved
5133 pub fn set_php_class_prefix(&mut self, v: ::std::string::String) {
5134 self.php_class_prefix = crate::SingularField::some(v);
5135 }
5136
5137 // Mutable pointer to the field.
5138 // If field is not initialized, it is initialized with default value first.
5139 pub fn mut_php_class_prefix(&mut self) -> &mut ::std::string::String {
5140 if self.php_class_prefix.is_none() {
5141 self.php_class_prefix.set_default();
5142 }
5143 self.php_class_prefix.as_mut().unwrap()
5144 }
5145
5146 // Take field
5147 pub fn take_php_class_prefix(&mut self) -> ::std::string::String {
5148 self.php_class_prefix.take().unwrap_or_else(|| ::std::string::String::new())
5149 }
5150
5151 // optional string php_namespace = 41;
5152
5153
5154 pub fn get_php_namespace(&self) -> &str {
5155 match self.php_namespace.as_ref() {
5156 Some(v) => &v,
5157 None => "",
5158 }
5159 }
5160 pub fn clear_php_namespace(&mut self) {
5161 self.php_namespace.clear();
5162 }
5163
5164 pub fn has_php_namespace(&self) -> bool {
5165 self.php_namespace.is_some()
5166 }
5167
5168 // Param is passed by value, moved
5169 pub fn set_php_namespace(&mut self, v: ::std::string::String) {
5170 self.php_namespace = crate::SingularField::some(v);
5171 }
5172
5173 // Mutable pointer to the field.
5174 // If field is not initialized, it is initialized with default value first.
5175 pub fn mut_php_namespace(&mut self) -> &mut ::std::string::String {
5176 if self.php_namespace.is_none() {
5177 self.php_namespace.set_default();
5178 }
5179 self.php_namespace.as_mut().unwrap()
5180 }
5181
5182 // Take field
5183 pub fn take_php_namespace(&mut self) -> ::std::string::String {
5184 self.php_namespace.take().unwrap_or_else(|| ::std::string::String::new())
5185 }
5186
5187 // optional string php_metadata_namespace = 44;
5188
5189
5190 pub fn get_php_metadata_namespace(&self) -> &str {
5191 match self.php_metadata_namespace.as_ref() {
5192 Some(v) => &v,
5193 None => "",
5194 }
5195 }
5196 pub fn clear_php_metadata_namespace(&mut self) {
5197 self.php_metadata_namespace.clear();
5198 }
5199
5200 pub fn has_php_metadata_namespace(&self) -> bool {
5201 self.php_metadata_namespace.is_some()
5202 }
5203
5204 // Param is passed by value, moved
5205 pub fn set_php_metadata_namespace(&mut self, v: ::std::string::String) {
5206 self.php_metadata_namespace = crate::SingularField::some(v);
5207 }
5208
5209 // Mutable pointer to the field.
5210 // If field is not initialized, it is initialized with default value first.
5211 pub fn mut_php_metadata_namespace(&mut self) -> &mut ::std::string::String {
5212 if self.php_metadata_namespace.is_none() {
5213 self.php_metadata_namespace.set_default();
5214 }
5215 self.php_metadata_namespace.as_mut().unwrap()
5216 }
5217
5218 // Take field
5219 pub fn take_php_metadata_namespace(&mut self) -> ::std::string::String {
5220 self.php_metadata_namespace.take().unwrap_or_else(|| ::std::string::String::new())
5221 }
5222
5223 // optional string ruby_package = 45;
5224
5225
5226 pub fn get_ruby_package(&self) -> &str {
5227 match self.ruby_package.as_ref() {
5228 Some(v) => &v,
5229 None => "",
5230 }
5231 }
5232 pub fn clear_ruby_package(&mut self) {
5233 self.ruby_package.clear();
5234 }
5235
5236 pub fn has_ruby_package(&self) -> bool {
5237 self.ruby_package.is_some()
5238 }
5239
5240 // Param is passed by value, moved
5241 pub fn set_ruby_package(&mut self, v: ::std::string::String) {
5242 self.ruby_package = crate::SingularField::some(v);
5243 }
5244
5245 // Mutable pointer to the field.
5246 // If field is not initialized, it is initialized with default value first.
5247 pub fn mut_ruby_package(&mut self) -> &mut ::std::string::String {
5248 if self.ruby_package.is_none() {
5249 self.ruby_package.set_default();
5250 }
5251 self.ruby_package.as_mut().unwrap()
5252 }
5253
5254 // Take field
5255 pub fn take_ruby_package(&mut self) -> ::std::string::String {
5256 self.ruby_package.take().unwrap_or_else(|| ::std::string::String::new())
5257 }
5258
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005259 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5260
5261
5262 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
5263 &self.uninterpreted_option
5264 }
5265 pub fn clear_uninterpreted_option(&mut self) {
5266 self.uninterpreted_option.clear();
5267 }
5268
5269 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005270 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005271 self.uninterpreted_option = v;
5272 }
5273
5274 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005275 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005276 &mut self.uninterpreted_option
5277 }
5278
5279 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005280 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
5281 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005282 }
5283}
5284
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005285impl crate::Message for FileOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005286 fn is_initialized(&self) -> bool {
5287 for v in &self.uninterpreted_option {
5288 if !v.is_initialized() {
5289 return false;
5290 }
5291 };
5292 true
5293 }
5294
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005295 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005296 while !is.eof()? {
5297 let (field_number, wire_type) = is.read_tag_unpack()?;
5298 match field_number {
5299 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005300 crate::rt::read_singular_string_into(wire_type, is, &mut self.java_package)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005301 },
5302 8 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005303 crate::rt::read_singular_string_into(wire_type, is, &mut self.java_outer_classname)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005304 },
5305 10 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005306 if wire_type != crate::wire_format::WireTypeVarint {
5307 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005308 }
5309 let tmp = is.read_bool()?;
5310 self.java_multiple_files = ::std::option::Option::Some(tmp);
5311 },
5312 20 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005313 if wire_type != crate::wire_format::WireTypeVarint {
5314 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005315 }
5316 let tmp = is.read_bool()?;
5317 self.java_generate_equals_and_hash = ::std::option::Option::Some(tmp);
5318 },
5319 27 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005320 if wire_type != crate::wire_format::WireTypeVarint {
5321 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005322 }
5323 let tmp = is.read_bool()?;
5324 self.java_string_check_utf8 = ::std::option::Option::Some(tmp);
5325 },
5326 9 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005327 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 -07005328 },
5329 11 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005330 crate::rt::read_singular_string_into(wire_type, is, &mut self.go_package)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005331 },
5332 16 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005333 if wire_type != crate::wire_format::WireTypeVarint {
5334 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005335 }
5336 let tmp = is.read_bool()?;
5337 self.cc_generic_services = ::std::option::Option::Some(tmp);
5338 },
5339 17 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005340 if wire_type != crate::wire_format::WireTypeVarint {
5341 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005342 }
5343 let tmp = is.read_bool()?;
5344 self.java_generic_services = ::std::option::Option::Some(tmp);
5345 },
5346 18 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005347 if wire_type != crate::wire_format::WireTypeVarint {
5348 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005349 }
5350 let tmp = is.read_bool()?;
5351 self.py_generic_services = ::std::option::Option::Some(tmp);
5352 },
Haibo Huangca95bfd2021-02-09 17:48:30 -08005353 42 => {
5354 if wire_type != crate::wire_format::WireTypeVarint {
5355 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
5356 }
5357 let tmp = is.read_bool()?;
5358 self.php_generic_services = ::std::option::Option::Some(tmp);
5359 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005360 23 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005361 if wire_type != crate::wire_format::WireTypeVarint {
5362 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005363 }
5364 let tmp = is.read_bool()?;
5365 self.deprecated = ::std::option::Option::Some(tmp);
5366 },
5367 31 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005368 if wire_type != crate::wire_format::WireTypeVarint {
5369 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005370 }
5371 let tmp = is.read_bool()?;
5372 self.cc_enable_arenas = ::std::option::Option::Some(tmp);
5373 },
5374 36 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005375 crate::rt::read_singular_string_into(wire_type, is, &mut self.objc_class_prefix)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005376 },
5377 37 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005378 crate::rt::read_singular_string_into(wire_type, is, &mut self.csharp_namespace)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005379 },
Haibo Huangca95bfd2021-02-09 17:48:30 -08005380 39 => {
5381 crate::rt::read_singular_string_into(wire_type, is, &mut self.swift_prefix)?;
5382 },
5383 40 => {
5384 crate::rt::read_singular_string_into(wire_type, is, &mut self.php_class_prefix)?;
5385 },
5386 41 => {
5387 crate::rt::read_singular_string_into(wire_type, is, &mut self.php_namespace)?;
5388 },
5389 44 => {
5390 crate::rt::read_singular_string_into(wire_type, is, &mut self.php_metadata_namespace)?;
5391 },
5392 45 => {
5393 crate::rt::read_singular_string_into(wire_type, is, &mut self.ruby_package)?;
5394 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005395 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005396 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005397 },
5398 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005399 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005400 },
5401 };
5402 }
5403 ::std::result::Result::Ok(())
5404 }
5405
5406 // Compute sizes of nested messages
5407 #[allow(unused_variables)]
5408 fn compute_size(&self) -> u32 {
5409 let mut my_size = 0;
5410 if let Some(ref v) = self.java_package.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005411 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005412 }
5413 if let Some(ref v) = self.java_outer_classname.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005414 my_size += crate::rt::string_size(8, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005415 }
5416 if let Some(v) = self.java_multiple_files {
5417 my_size += 2;
5418 }
5419 if let Some(v) = self.java_generate_equals_and_hash {
5420 my_size += 3;
5421 }
5422 if let Some(v) = self.java_string_check_utf8 {
5423 my_size += 3;
5424 }
5425 if let Some(v) = self.optimize_for {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005426 my_size += crate::rt::enum_size(9, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005427 }
5428 if let Some(ref v) = self.go_package.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005429 my_size += crate::rt::string_size(11, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005430 }
5431 if let Some(v) = self.cc_generic_services {
5432 my_size += 3;
5433 }
5434 if let Some(v) = self.java_generic_services {
5435 my_size += 3;
5436 }
5437 if let Some(v) = self.py_generic_services {
5438 my_size += 3;
5439 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08005440 if let Some(v) = self.php_generic_services {
5441 my_size += 3;
5442 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005443 if let Some(v) = self.deprecated {
5444 my_size += 3;
5445 }
5446 if let Some(v) = self.cc_enable_arenas {
5447 my_size += 3;
5448 }
5449 if let Some(ref v) = self.objc_class_prefix.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005450 my_size += crate::rt::string_size(36, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005451 }
5452 if let Some(ref v) = self.csharp_namespace.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005453 my_size += crate::rt::string_size(37, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005454 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08005455 if let Some(ref v) = self.swift_prefix.as_ref() {
5456 my_size += crate::rt::string_size(39, &v);
5457 }
5458 if let Some(ref v) = self.php_class_prefix.as_ref() {
5459 my_size += crate::rt::string_size(40, &v);
5460 }
5461 if let Some(ref v) = self.php_namespace.as_ref() {
5462 my_size += crate::rt::string_size(41, &v);
5463 }
5464 if let Some(ref v) = self.php_metadata_namespace.as_ref() {
5465 my_size += crate::rt::string_size(44, &v);
5466 }
5467 if let Some(ref v) = self.ruby_package.as_ref() {
5468 my_size += crate::rt::string_size(45, &v);
5469 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005470 for value in &self.uninterpreted_option {
5471 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005472 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005473 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005474 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005475 self.cached_size.set(my_size);
5476 my_size
5477 }
5478
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005479 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005480 if let Some(ref v) = self.java_package.as_ref() {
5481 os.write_string(1, &v)?;
5482 }
5483 if let Some(ref v) = self.java_outer_classname.as_ref() {
5484 os.write_string(8, &v)?;
5485 }
5486 if let Some(v) = self.java_multiple_files {
5487 os.write_bool(10, v)?;
5488 }
5489 if let Some(v) = self.java_generate_equals_and_hash {
5490 os.write_bool(20, v)?;
5491 }
5492 if let Some(v) = self.java_string_check_utf8 {
5493 os.write_bool(27, v)?;
5494 }
5495 if let Some(v) = self.optimize_for {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005496 os.write_enum(9, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005497 }
5498 if let Some(ref v) = self.go_package.as_ref() {
5499 os.write_string(11, &v)?;
5500 }
5501 if let Some(v) = self.cc_generic_services {
5502 os.write_bool(16, v)?;
5503 }
5504 if let Some(v) = self.java_generic_services {
5505 os.write_bool(17, v)?;
5506 }
5507 if let Some(v) = self.py_generic_services {
5508 os.write_bool(18, v)?;
5509 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08005510 if let Some(v) = self.php_generic_services {
5511 os.write_bool(42, v)?;
5512 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005513 if let Some(v) = self.deprecated {
5514 os.write_bool(23, v)?;
5515 }
5516 if let Some(v) = self.cc_enable_arenas {
5517 os.write_bool(31, v)?;
5518 }
5519 if let Some(ref v) = self.objc_class_prefix.as_ref() {
5520 os.write_string(36, &v)?;
5521 }
5522 if let Some(ref v) = self.csharp_namespace.as_ref() {
5523 os.write_string(37, &v)?;
5524 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08005525 if let Some(ref v) = self.swift_prefix.as_ref() {
5526 os.write_string(39, &v)?;
5527 }
5528 if let Some(ref v) = self.php_class_prefix.as_ref() {
5529 os.write_string(40, &v)?;
5530 }
5531 if let Some(ref v) = self.php_namespace.as_ref() {
5532 os.write_string(41, &v)?;
5533 }
5534 if let Some(ref v) = self.php_metadata_namespace.as_ref() {
5535 os.write_string(44, &v)?;
5536 }
5537 if let Some(ref v) = self.ruby_package.as_ref() {
5538 os.write_string(45, &v)?;
5539 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005540 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005541 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005542 os.write_raw_varint32(v.get_cached_size())?;
5543 v.write_to_with_cached_sizes(os)?;
5544 };
5545 os.write_unknown_fields(self.get_unknown_fields())?;
5546 ::std::result::Result::Ok(())
5547 }
5548
5549 fn get_cached_size(&self) -> u32 {
5550 self.cached_size.get()
5551 }
5552
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005553 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005554 &self.unknown_fields
5555 }
5556
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005557 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005558 &mut self.unknown_fields
5559 }
5560
5561 fn as_any(&self) -> &dyn (::std::any::Any) {
5562 self as &dyn (::std::any::Any)
5563 }
5564 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
5565 self as &mut dyn (::std::any::Any)
5566 }
Haibo Huang52aa7852020-07-10 20:23:55 -07005567 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005568 self
5569 }
5570
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005571 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005572 Self::descriptor_static()
5573 }
5574
5575 fn new() -> FileOptions {
5576 FileOptions::new()
5577 }
5578
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005579 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
5580 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005581 descriptor.get(|| {
5582 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005583 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005584 "java_package",
5585 |m: &FileOptions| { &m.java_package },
5586 |m: &mut FileOptions| { &mut m.java_package },
5587 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005588 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005589 "java_outer_classname",
5590 |m: &FileOptions| { &m.java_outer_classname },
5591 |m: &mut FileOptions| { &mut m.java_outer_classname },
5592 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005593 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005594 "java_multiple_files",
5595 |m: &FileOptions| { &m.java_multiple_files },
5596 |m: &mut FileOptions| { &mut m.java_multiple_files },
5597 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005598 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005599 "java_generate_equals_and_hash",
5600 |m: &FileOptions| { &m.java_generate_equals_and_hash },
5601 |m: &mut FileOptions| { &mut m.java_generate_equals_and_hash },
5602 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005603 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005604 "java_string_check_utf8",
5605 |m: &FileOptions| { &m.java_string_check_utf8 },
5606 |m: &mut FileOptions| { &mut m.java_string_check_utf8 },
5607 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005608 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FileOptions_OptimizeMode>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005609 "optimize_for",
5610 |m: &FileOptions| { &m.optimize_for },
5611 |m: &mut FileOptions| { &mut m.optimize_for },
5612 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005613 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005614 "go_package",
5615 |m: &FileOptions| { &m.go_package },
5616 |m: &mut FileOptions| { &mut m.go_package },
5617 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005618 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005619 "cc_generic_services",
5620 |m: &FileOptions| { &m.cc_generic_services },
5621 |m: &mut FileOptions| { &mut m.cc_generic_services },
5622 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005623 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005624 "java_generic_services",
5625 |m: &FileOptions| { &m.java_generic_services },
5626 |m: &mut FileOptions| { &mut m.java_generic_services },
5627 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005628 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005629 "py_generic_services",
5630 |m: &FileOptions| { &m.py_generic_services },
5631 |m: &mut FileOptions| { &mut m.py_generic_services },
5632 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005633 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huangca95bfd2021-02-09 17:48:30 -08005634 "php_generic_services",
5635 |m: &FileOptions| { &m.php_generic_services },
5636 |m: &mut FileOptions| { &mut m.php_generic_services },
5637 ));
5638 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005639 "deprecated",
5640 |m: &FileOptions| { &m.deprecated },
5641 |m: &mut FileOptions| { &mut m.deprecated },
5642 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005643 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005644 "cc_enable_arenas",
5645 |m: &FileOptions| { &m.cc_enable_arenas },
5646 |m: &mut FileOptions| { &mut m.cc_enable_arenas },
5647 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005648 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005649 "objc_class_prefix",
5650 |m: &FileOptions| { &m.objc_class_prefix },
5651 |m: &mut FileOptions| { &mut m.objc_class_prefix },
5652 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005653 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005654 "csharp_namespace",
5655 |m: &FileOptions| { &m.csharp_namespace },
5656 |m: &mut FileOptions| { &mut m.csharp_namespace },
5657 ));
Haibo Huangca95bfd2021-02-09 17:48:30 -08005658 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
5659 "swift_prefix",
5660 |m: &FileOptions| { &m.swift_prefix },
5661 |m: &mut FileOptions| { &mut m.swift_prefix },
5662 ));
5663 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
5664 "php_class_prefix",
5665 |m: &FileOptions| { &m.php_class_prefix },
5666 |m: &mut FileOptions| { &mut m.php_class_prefix },
5667 ));
5668 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
5669 "php_namespace",
5670 |m: &FileOptions| { &m.php_namespace },
5671 |m: &mut FileOptions| { &mut m.php_namespace },
5672 ));
5673 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
5674 "php_metadata_namespace",
5675 |m: &FileOptions| { &m.php_metadata_namespace },
5676 |m: &mut FileOptions| { &mut m.php_metadata_namespace },
5677 ));
5678 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
5679 "ruby_package",
5680 |m: &FileOptions| { &m.ruby_package },
5681 |m: &mut FileOptions| { &mut m.ruby_package },
5682 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005683 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005684 "uninterpreted_option",
5685 |m: &FileOptions| { &m.uninterpreted_option },
5686 |m: &mut FileOptions| { &mut m.uninterpreted_option },
5687 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005688 crate::reflect::MessageDescriptor::new_pb_name::<FileOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07005689 "FileOptions",
5690 fields,
5691 file_descriptor_proto()
5692 )
5693 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005694 }
5695
5696 fn default_instance() -> &'static FileOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005697 static instance: crate::rt::LazyV2<FileOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005698 instance.get(FileOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005699 }
5700}
5701
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005702impl crate::Clear for FileOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005703 fn clear(&mut self) {
5704 self.java_package.clear();
5705 self.java_outer_classname.clear();
5706 self.java_multiple_files = ::std::option::Option::None;
5707 self.java_generate_equals_and_hash = ::std::option::Option::None;
5708 self.java_string_check_utf8 = ::std::option::Option::None;
5709 self.optimize_for = ::std::option::Option::None;
5710 self.go_package.clear();
5711 self.cc_generic_services = ::std::option::Option::None;
5712 self.java_generic_services = ::std::option::Option::None;
5713 self.py_generic_services = ::std::option::Option::None;
Haibo Huangca95bfd2021-02-09 17:48:30 -08005714 self.php_generic_services = ::std::option::Option::None;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005715 self.deprecated = ::std::option::Option::None;
5716 self.cc_enable_arenas = ::std::option::Option::None;
5717 self.objc_class_prefix.clear();
5718 self.csharp_namespace.clear();
Haibo Huangca95bfd2021-02-09 17:48:30 -08005719 self.swift_prefix.clear();
5720 self.php_class_prefix.clear();
5721 self.php_namespace.clear();
5722 self.php_metadata_namespace.clear();
5723 self.ruby_package.clear();
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005724 self.uninterpreted_option.clear();
5725 self.unknown_fields.clear();
5726 }
5727}
5728
5729impl ::std::fmt::Debug for FileOptions {
5730 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005731 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005732 }
5733}
5734
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005735impl crate::reflect::ProtobufValue for FileOptions {
5736 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
5737 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005738 }
5739}
5740
5741#[derive(Clone,PartialEq,Eq,Debug,Hash)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08005742#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005743pub enum FileOptions_OptimizeMode {
5744 SPEED = 1,
5745 CODE_SIZE = 2,
5746 LITE_RUNTIME = 3,
5747}
5748
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005749impl crate::ProtobufEnum for FileOptions_OptimizeMode {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005750 fn value(&self) -> i32 {
5751 *self as i32
5752 }
5753
5754 fn from_i32(value: i32) -> ::std::option::Option<FileOptions_OptimizeMode> {
5755 match value {
5756 1 => ::std::option::Option::Some(FileOptions_OptimizeMode::SPEED),
5757 2 => ::std::option::Option::Some(FileOptions_OptimizeMode::CODE_SIZE),
5758 3 => ::std::option::Option::Some(FileOptions_OptimizeMode::LITE_RUNTIME),
5759 _ => ::std::option::Option::None
5760 }
5761 }
5762
5763 fn values() -> &'static [Self] {
5764 static values: &'static [FileOptions_OptimizeMode] = &[
5765 FileOptions_OptimizeMode::SPEED,
5766 FileOptions_OptimizeMode::CODE_SIZE,
5767 FileOptions_OptimizeMode::LITE_RUNTIME,
5768 ];
5769 values
5770 }
5771
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005772 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
5773 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07005774 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005775 crate::reflect::EnumDescriptor::new_pb_name::<FileOptions_OptimizeMode>("FileOptions.OptimizeMode", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07005776 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005777 }
5778}
5779
5780impl ::std::marker::Copy for FileOptions_OptimizeMode {
5781}
5782
5783// Note, `Default` is implemented although default value is not 0
5784impl ::std::default::Default for FileOptions_OptimizeMode {
5785 fn default() -> Self {
5786 FileOptions_OptimizeMode::SPEED
5787 }
5788}
5789
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005790impl crate::reflect::ProtobufValue for FileOptions_OptimizeMode {
5791 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
5792 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005793 }
5794}
5795
5796#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08005797#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005798pub struct MessageOptions {
5799 // message fields
5800 message_set_wire_format: ::std::option::Option<bool>,
5801 no_standard_descriptor_accessor: ::std::option::Option<bool>,
5802 deprecated: ::std::option::Option<bool>,
5803 map_entry: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005804 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005805 // special fields
5806 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005807 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005808 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005809 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005810}
5811
5812impl<'a> ::std::default::Default for &'a MessageOptions {
5813 fn default() -> &'a MessageOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005814 <MessageOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005815 }
5816}
5817
5818impl MessageOptions {
5819 pub fn new() -> MessageOptions {
5820 ::std::default::Default::default()
5821 }
5822
5823 // optional bool message_set_wire_format = 1;
5824
5825
5826 pub fn get_message_set_wire_format(&self) -> bool {
5827 self.message_set_wire_format.unwrap_or(false)
5828 }
5829 pub fn clear_message_set_wire_format(&mut self) {
5830 self.message_set_wire_format = ::std::option::Option::None;
5831 }
5832
5833 pub fn has_message_set_wire_format(&self) -> bool {
5834 self.message_set_wire_format.is_some()
5835 }
5836
5837 // Param is passed by value, moved
5838 pub fn set_message_set_wire_format(&mut self, v: bool) {
5839 self.message_set_wire_format = ::std::option::Option::Some(v);
5840 }
5841
5842 // optional bool no_standard_descriptor_accessor = 2;
5843
5844
5845 pub fn get_no_standard_descriptor_accessor(&self) -> bool {
5846 self.no_standard_descriptor_accessor.unwrap_or(false)
5847 }
5848 pub fn clear_no_standard_descriptor_accessor(&mut self) {
5849 self.no_standard_descriptor_accessor = ::std::option::Option::None;
5850 }
5851
5852 pub fn has_no_standard_descriptor_accessor(&self) -> bool {
5853 self.no_standard_descriptor_accessor.is_some()
5854 }
5855
5856 // Param is passed by value, moved
5857 pub fn set_no_standard_descriptor_accessor(&mut self, v: bool) {
5858 self.no_standard_descriptor_accessor = ::std::option::Option::Some(v);
5859 }
5860
5861 // optional bool deprecated = 3;
5862
5863
5864 pub fn get_deprecated(&self) -> bool {
5865 self.deprecated.unwrap_or(false)
5866 }
5867 pub fn clear_deprecated(&mut self) {
5868 self.deprecated = ::std::option::Option::None;
5869 }
5870
5871 pub fn has_deprecated(&self) -> bool {
5872 self.deprecated.is_some()
5873 }
5874
5875 // Param is passed by value, moved
5876 pub fn set_deprecated(&mut self, v: bool) {
5877 self.deprecated = ::std::option::Option::Some(v);
5878 }
5879
5880 // optional bool map_entry = 7;
5881
5882
5883 pub fn get_map_entry(&self) -> bool {
5884 self.map_entry.unwrap_or(false)
5885 }
5886 pub fn clear_map_entry(&mut self) {
5887 self.map_entry = ::std::option::Option::None;
5888 }
5889
5890 pub fn has_map_entry(&self) -> bool {
5891 self.map_entry.is_some()
5892 }
5893
5894 // Param is passed by value, moved
5895 pub fn set_map_entry(&mut self, v: bool) {
5896 self.map_entry = ::std::option::Option::Some(v);
5897 }
5898
5899 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
5900
5901
5902 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
5903 &self.uninterpreted_option
5904 }
5905 pub fn clear_uninterpreted_option(&mut self) {
5906 self.uninterpreted_option.clear();
5907 }
5908
5909 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005910 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005911 self.uninterpreted_option = v;
5912 }
5913
5914 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005915 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005916 &mut self.uninterpreted_option
5917 }
5918
5919 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005920 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
5921 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005922 }
5923}
5924
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005925impl crate::Message for MessageOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005926 fn is_initialized(&self) -> bool {
5927 for v in &self.uninterpreted_option {
5928 if !v.is_initialized() {
5929 return false;
5930 }
5931 };
5932 true
5933 }
5934
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005935 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005936 while !is.eof()? {
5937 let (field_number, wire_type) = is.read_tag_unpack()?;
5938 match field_number {
5939 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005940 if wire_type != crate::wire_format::WireTypeVarint {
5941 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005942 }
5943 let tmp = is.read_bool()?;
5944 self.message_set_wire_format = ::std::option::Option::Some(tmp);
5945 },
5946 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005947 if wire_type != crate::wire_format::WireTypeVarint {
5948 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005949 }
5950 let tmp = is.read_bool()?;
5951 self.no_standard_descriptor_accessor = ::std::option::Option::Some(tmp);
5952 },
5953 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005954 if wire_type != crate::wire_format::WireTypeVarint {
5955 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005956 }
5957 let tmp = is.read_bool()?;
5958 self.deprecated = ::std::option::Option::Some(tmp);
5959 },
5960 7 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005961 if wire_type != crate::wire_format::WireTypeVarint {
5962 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005963 }
5964 let tmp = is.read_bool()?;
5965 self.map_entry = ::std::option::Option::Some(tmp);
5966 },
5967 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005968 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005969 },
5970 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005971 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005972 },
5973 };
5974 }
5975 ::std::result::Result::Ok(())
5976 }
5977
5978 // Compute sizes of nested messages
5979 #[allow(unused_variables)]
5980 fn compute_size(&self) -> u32 {
5981 let mut my_size = 0;
5982 if let Some(v) = self.message_set_wire_format {
5983 my_size += 2;
5984 }
5985 if let Some(v) = self.no_standard_descriptor_accessor {
5986 my_size += 2;
5987 }
5988 if let Some(v) = self.deprecated {
5989 my_size += 2;
5990 }
5991 if let Some(v) = self.map_entry {
5992 my_size += 2;
5993 }
5994 for value in &self.uninterpreted_option {
5995 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005996 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005997 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07005998 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07005999 self.cached_size.set(my_size);
6000 my_size
6001 }
6002
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006003 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006004 if let Some(v) = self.message_set_wire_format {
6005 os.write_bool(1, v)?;
6006 }
6007 if let Some(v) = self.no_standard_descriptor_accessor {
6008 os.write_bool(2, v)?;
6009 }
6010 if let Some(v) = self.deprecated {
6011 os.write_bool(3, v)?;
6012 }
6013 if let Some(v) = self.map_entry {
6014 os.write_bool(7, v)?;
6015 }
6016 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006017 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006018 os.write_raw_varint32(v.get_cached_size())?;
6019 v.write_to_with_cached_sizes(os)?;
6020 };
6021 os.write_unknown_fields(self.get_unknown_fields())?;
6022 ::std::result::Result::Ok(())
6023 }
6024
6025 fn get_cached_size(&self) -> u32 {
6026 self.cached_size.get()
6027 }
6028
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006029 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006030 &self.unknown_fields
6031 }
6032
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006033 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006034 &mut self.unknown_fields
6035 }
6036
6037 fn as_any(&self) -> &dyn (::std::any::Any) {
6038 self as &dyn (::std::any::Any)
6039 }
6040 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6041 self as &mut dyn (::std::any::Any)
6042 }
Haibo Huang52aa7852020-07-10 20:23:55 -07006043 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006044 self
6045 }
6046
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006047 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006048 Self::descriptor_static()
6049 }
6050
6051 fn new() -> MessageOptions {
6052 MessageOptions::new()
6053 }
6054
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006055 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
6056 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006057 descriptor.get(|| {
6058 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006059 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006060 "message_set_wire_format",
6061 |m: &MessageOptions| { &m.message_set_wire_format },
6062 |m: &mut MessageOptions| { &mut m.message_set_wire_format },
6063 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006064 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006065 "no_standard_descriptor_accessor",
6066 |m: &MessageOptions| { &m.no_standard_descriptor_accessor },
6067 |m: &mut MessageOptions| { &mut m.no_standard_descriptor_accessor },
6068 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006069 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006070 "deprecated",
6071 |m: &MessageOptions| { &m.deprecated },
6072 |m: &mut MessageOptions| { &mut m.deprecated },
6073 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006074 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006075 "map_entry",
6076 |m: &MessageOptions| { &m.map_entry },
6077 |m: &mut MessageOptions| { &mut m.map_entry },
6078 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006079 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006080 "uninterpreted_option",
6081 |m: &MessageOptions| { &m.uninterpreted_option },
6082 |m: &mut MessageOptions| { &mut m.uninterpreted_option },
6083 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006084 crate::reflect::MessageDescriptor::new_pb_name::<MessageOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006085 "MessageOptions",
6086 fields,
6087 file_descriptor_proto()
6088 )
6089 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006090 }
6091
6092 fn default_instance() -> &'static MessageOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006093 static instance: crate::rt::LazyV2<MessageOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006094 instance.get(MessageOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006095 }
6096}
6097
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006098impl crate::Clear for MessageOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006099 fn clear(&mut self) {
6100 self.message_set_wire_format = ::std::option::Option::None;
6101 self.no_standard_descriptor_accessor = ::std::option::Option::None;
6102 self.deprecated = ::std::option::Option::None;
6103 self.map_entry = ::std::option::Option::None;
6104 self.uninterpreted_option.clear();
6105 self.unknown_fields.clear();
6106 }
6107}
6108
6109impl ::std::fmt::Debug for MessageOptions {
6110 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006111 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006112 }
6113}
6114
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006115impl crate::reflect::ProtobufValue for MessageOptions {
6116 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6117 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006118 }
6119}
6120
6121#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08006122#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006123pub struct FieldOptions {
6124 // message fields
6125 ctype: ::std::option::Option<FieldOptions_CType>,
6126 packed: ::std::option::Option<bool>,
6127 jstype: ::std::option::Option<FieldOptions_JSType>,
6128 lazy: ::std::option::Option<bool>,
6129 deprecated: ::std::option::Option<bool>,
6130 weak: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006131 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006132 // special fields
6133 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006134 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006135 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006136 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006137}
6138
6139impl<'a> ::std::default::Default for &'a FieldOptions {
6140 fn default() -> &'a FieldOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006141 <FieldOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006142 }
6143}
6144
6145impl FieldOptions {
6146 pub fn new() -> FieldOptions {
6147 ::std::default::Default::default()
6148 }
6149
6150 // optional .google.protobuf.FieldOptions.CType ctype = 1;
6151
6152
6153 pub fn get_ctype(&self) -> FieldOptions_CType {
6154 self.ctype.unwrap_or(FieldOptions_CType::STRING)
6155 }
6156 pub fn clear_ctype(&mut self) {
6157 self.ctype = ::std::option::Option::None;
6158 }
6159
6160 pub fn has_ctype(&self) -> bool {
6161 self.ctype.is_some()
6162 }
6163
6164 // Param is passed by value, moved
6165 pub fn set_ctype(&mut self, v: FieldOptions_CType) {
6166 self.ctype = ::std::option::Option::Some(v);
6167 }
6168
6169 // optional bool packed = 2;
6170
6171
6172 pub fn get_packed(&self) -> bool {
6173 self.packed.unwrap_or(false)
6174 }
6175 pub fn clear_packed(&mut self) {
6176 self.packed = ::std::option::Option::None;
6177 }
6178
6179 pub fn has_packed(&self) -> bool {
6180 self.packed.is_some()
6181 }
6182
6183 // Param is passed by value, moved
6184 pub fn set_packed(&mut self, v: bool) {
6185 self.packed = ::std::option::Option::Some(v);
6186 }
6187
6188 // optional .google.protobuf.FieldOptions.JSType jstype = 6;
6189
6190
6191 pub fn get_jstype(&self) -> FieldOptions_JSType {
6192 self.jstype.unwrap_or(FieldOptions_JSType::JS_NORMAL)
6193 }
6194 pub fn clear_jstype(&mut self) {
6195 self.jstype = ::std::option::Option::None;
6196 }
6197
6198 pub fn has_jstype(&self) -> bool {
6199 self.jstype.is_some()
6200 }
6201
6202 // Param is passed by value, moved
6203 pub fn set_jstype(&mut self, v: FieldOptions_JSType) {
6204 self.jstype = ::std::option::Option::Some(v);
6205 }
6206
6207 // optional bool lazy = 5;
6208
6209
6210 pub fn get_lazy(&self) -> bool {
6211 self.lazy.unwrap_or(false)
6212 }
6213 pub fn clear_lazy(&mut self) {
6214 self.lazy = ::std::option::Option::None;
6215 }
6216
6217 pub fn has_lazy(&self) -> bool {
6218 self.lazy.is_some()
6219 }
6220
6221 // Param is passed by value, moved
6222 pub fn set_lazy(&mut self, v: bool) {
6223 self.lazy = ::std::option::Option::Some(v);
6224 }
6225
6226 // optional bool deprecated = 3;
6227
6228
6229 pub fn get_deprecated(&self) -> bool {
6230 self.deprecated.unwrap_or(false)
6231 }
6232 pub fn clear_deprecated(&mut self) {
6233 self.deprecated = ::std::option::Option::None;
6234 }
6235
6236 pub fn has_deprecated(&self) -> bool {
6237 self.deprecated.is_some()
6238 }
6239
6240 // Param is passed by value, moved
6241 pub fn set_deprecated(&mut self, v: bool) {
6242 self.deprecated = ::std::option::Option::Some(v);
6243 }
6244
6245 // optional bool weak = 10;
6246
6247
6248 pub fn get_weak(&self) -> bool {
6249 self.weak.unwrap_or(false)
6250 }
6251 pub fn clear_weak(&mut self) {
6252 self.weak = ::std::option::Option::None;
6253 }
6254
6255 pub fn has_weak(&self) -> bool {
6256 self.weak.is_some()
6257 }
6258
6259 // Param is passed by value, moved
6260 pub fn set_weak(&mut self, v: bool) {
6261 self.weak = ::std::option::Option::Some(v);
6262 }
6263
6264 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6265
6266
6267 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
6268 &self.uninterpreted_option
6269 }
6270 pub fn clear_uninterpreted_option(&mut self) {
6271 self.uninterpreted_option.clear();
6272 }
6273
6274 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006275 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006276 self.uninterpreted_option = v;
6277 }
6278
6279 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006280 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006281 &mut self.uninterpreted_option
6282 }
6283
6284 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006285 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
6286 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006287 }
6288}
6289
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006290impl crate::Message for FieldOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006291 fn is_initialized(&self) -> bool {
6292 for v in &self.uninterpreted_option {
6293 if !v.is_initialized() {
6294 return false;
6295 }
6296 };
6297 true
6298 }
6299
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006300 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006301 while !is.eof()? {
6302 let (field_number, wire_type) = is.read_tag_unpack()?;
6303 match field_number {
6304 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006305 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 -07006306 },
6307 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006308 if wire_type != crate::wire_format::WireTypeVarint {
6309 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006310 }
6311 let tmp = is.read_bool()?;
6312 self.packed = ::std::option::Option::Some(tmp);
6313 },
6314 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006315 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 -07006316 },
6317 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006318 if wire_type != crate::wire_format::WireTypeVarint {
6319 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006320 }
6321 let tmp = is.read_bool()?;
6322 self.lazy = ::std::option::Option::Some(tmp);
6323 },
6324 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006325 if wire_type != crate::wire_format::WireTypeVarint {
6326 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006327 }
6328 let tmp = is.read_bool()?;
6329 self.deprecated = ::std::option::Option::Some(tmp);
6330 },
6331 10 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006332 if wire_type != crate::wire_format::WireTypeVarint {
6333 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006334 }
6335 let tmp = is.read_bool()?;
6336 self.weak = ::std::option::Option::Some(tmp);
6337 },
6338 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006339 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006340 },
6341 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006342 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006343 },
6344 };
6345 }
6346 ::std::result::Result::Ok(())
6347 }
6348
6349 // Compute sizes of nested messages
6350 #[allow(unused_variables)]
6351 fn compute_size(&self) -> u32 {
6352 let mut my_size = 0;
6353 if let Some(v) = self.ctype {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006354 my_size += crate::rt::enum_size(1, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006355 }
6356 if let Some(v) = self.packed {
6357 my_size += 2;
6358 }
6359 if let Some(v) = self.jstype {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006360 my_size += crate::rt::enum_size(6, v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006361 }
6362 if let Some(v) = self.lazy {
6363 my_size += 2;
6364 }
6365 if let Some(v) = self.deprecated {
6366 my_size += 2;
6367 }
6368 if let Some(v) = self.weak {
6369 my_size += 2;
6370 }
6371 for value in &self.uninterpreted_option {
6372 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006373 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006374 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006375 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006376 self.cached_size.set(my_size);
6377 my_size
6378 }
6379
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006380 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006381 if let Some(v) = self.ctype {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006382 os.write_enum(1, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006383 }
6384 if let Some(v) = self.packed {
6385 os.write_bool(2, v)?;
6386 }
6387 if let Some(v) = self.jstype {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006388 os.write_enum(6, crate::ProtobufEnum::value(&v))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006389 }
6390 if let Some(v) = self.lazy {
6391 os.write_bool(5, v)?;
6392 }
6393 if let Some(v) = self.deprecated {
6394 os.write_bool(3, v)?;
6395 }
6396 if let Some(v) = self.weak {
6397 os.write_bool(10, v)?;
6398 }
6399 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006400 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006401 os.write_raw_varint32(v.get_cached_size())?;
6402 v.write_to_with_cached_sizes(os)?;
6403 };
6404 os.write_unknown_fields(self.get_unknown_fields())?;
6405 ::std::result::Result::Ok(())
6406 }
6407
6408 fn get_cached_size(&self) -> u32 {
6409 self.cached_size.get()
6410 }
6411
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006412 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006413 &self.unknown_fields
6414 }
6415
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006416 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006417 &mut self.unknown_fields
6418 }
6419
6420 fn as_any(&self) -> &dyn (::std::any::Any) {
6421 self as &dyn (::std::any::Any)
6422 }
6423 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6424 self as &mut dyn (::std::any::Any)
6425 }
Haibo Huang52aa7852020-07-10 20:23:55 -07006426 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006427 self
6428 }
6429
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006430 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006431 Self::descriptor_static()
6432 }
6433
6434 fn new() -> FieldOptions {
6435 FieldOptions::new()
6436 }
6437
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006438 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
6439 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006440 descriptor.get(|| {
6441 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006442 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FieldOptions_CType>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006443 "ctype",
6444 |m: &FieldOptions| { &m.ctype },
6445 |m: &mut FieldOptions| { &mut m.ctype },
6446 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006447 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006448 "packed",
6449 |m: &FieldOptions| { &m.packed },
6450 |m: &mut FieldOptions| { &mut m.packed },
6451 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006452 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<FieldOptions_JSType>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006453 "jstype",
6454 |m: &FieldOptions| { &m.jstype },
6455 |m: &mut FieldOptions| { &mut m.jstype },
6456 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006457 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006458 "lazy",
6459 |m: &FieldOptions| { &m.lazy },
6460 |m: &mut FieldOptions| { &mut m.lazy },
6461 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006462 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006463 "deprecated",
6464 |m: &FieldOptions| { &m.deprecated },
6465 |m: &mut FieldOptions| { &mut m.deprecated },
6466 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006467 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006468 "weak",
6469 |m: &FieldOptions| { &m.weak },
6470 |m: &mut FieldOptions| { &mut m.weak },
6471 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006472 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006473 "uninterpreted_option",
6474 |m: &FieldOptions| { &m.uninterpreted_option },
6475 |m: &mut FieldOptions| { &mut m.uninterpreted_option },
6476 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006477 crate::reflect::MessageDescriptor::new_pb_name::<FieldOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006478 "FieldOptions",
6479 fields,
6480 file_descriptor_proto()
6481 )
6482 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006483 }
6484
6485 fn default_instance() -> &'static FieldOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006486 static instance: crate::rt::LazyV2<FieldOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006487 instance.get(FieldOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006488 }
6489}
6490
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006491impl crate::Clear for FieldOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006492 fn clear(&mut self) {
6493 self.ctype = ::std::option::Option::None;
6494 self.packed = ::std::option::Option::None;
6495 self.jstype = ::std::option::Option::None;
6496 self.lazy = ::std::option::Option::None;
6497 self.deprecated = ::std::option::Option::None;
6498 self.weak = ::std::option::Option::None;
6499 self.uninterpreted_option.clear();
6500 self.unknown_fields.clear();
6501 }
6502}
6503
6504impl ::std::fmt::Debug for FieldOptions {
6505 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006506 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006507 }
6508}
6509
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006510impl crate::reflect::ProtobufValue for FieldOptions {
6511 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6512 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006513 }
6514}
6515
6516#[derive(Clone,PartialEq,Eq,Debug,Hash)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08006517#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006518pub enum FieldOptions_CType {
6519 STRING = 0,
6520 CORD = 1,
6521 STRING_PIECE = 2,
6522}
6523
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006524impl crate::ProtobufEnum for FieldOptions_CType {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006525 fn value(&self) -> i32 {
6526 *self as i32
6527 }
6528
6529 fn from_i32(value: i32) -> ::std::option::Option<FieldOptions_CType> {
6530 match value {
6531 0 => ::std::option::Option::Some(FieldOptions_CType::STRING),
6532 1 => ::std::option::Option::Some(FieldOptions_CType::CORD),
6533 2 => ::std::option::Option::Some(FieldOptions_CType::STRING_PIECE),
6534 _ => ::std::option::Option::None
6535 }
6536 }
6537
6538 fn values() -> &'static [Self] {
6539 static values: &'static [FieldOptions_CType] = &[
6540 FieldOptions_CType::STRING,
6541 FieldOptions_CType::CORD,
6542 FieldOptions_CType::STRING_PIECE,
6543 ];
6544 values
6545 }
6546
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006547 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
6548 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006549 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006550 crate::reflect::EnumDescriptor::new_pb_name::<FieldOptions_CType>("FieldOptions.CType", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07006551 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006552 }
6553}
6554
6555impl ::std::marker::Copy for FieldOptions_CType {
6556}
6557
6558impl ::std::default::Default for FieldOptions_CType {
6559 fn default() -> Self {
6560 FieldOptions_CType::STRING
6561 }
6562}
6563
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006564impl crate::reflect::ProtobufValue for FieldOptions_CType {
6565 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6566 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006567 }
6568}
6569
6570#[derive(Clone,PartialEq,Eq,Debug,Hash)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08006571#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006572pub enum FieldOptions_JSType {
6573 JS_NORMAL = 0,
6574 JS_STRING = 1,
6575 JS_NUMBER = 2,
6576}
6577
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006578impl crate::ProtobufEnum for FieldOptions_JSType {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006579 fn value(&self) -> i32 {
6580 *self as i32
6581 }
6582
6583 fn from_i32(value: i32) -> ::std::option::Option<FieldOptions_JSType> {
6584 match value {
6585 0 => ::std::option::Option::Some(FieldOptions_JSType::JS_NORMAL),
6586 1 => ::std::option::Option::Some(FieldOptions_JSType::JS_STRING),
6587 2 => ::std::option::Option::Some(FieldOptions_JSType::JS_NUMBER),
6588 _ => ::std::option::Option::None
6589 }
6590 }
6591
6592 fn values() -> &'static [Self] {
6593 static values: &'static [FieldOptions_JSType] = &[
6594 FieldOptions_JSType::JS_NORMAL,
6595 FieldOptions_JSType::JS_STRING,
6596 FieldOptions_JSType::JS_NUMBER,
6597 ];
6598 values
6599 }
6600
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006601 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
6602 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006603 descriptor.get(|| {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006604 crate::reflect::EnumDescriptor::new_pb_name::<FieldOptions_JSType>("FieldOptions.JSType", file_descriptor_proto())
Haibo Huang52aa7852020-07-10 20:23:55 -07006605 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006606 }
6607}
6608
6609impl ::std::marker::Copy for FieldOptions_JSType {
6610}
6611
6612impl ::std::default::Default for FieldOptions_JSType {
6613 fn default() -> Self {
6614 FieldOptions_JSType::JS_NORMAL
6615 }
6616}
6617
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006618impl crate::reflect::ProtobufValue for FieldOptions_JSType {
6619 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6620 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006621 }
6622}
6623
6624#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08006625#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006626pub struct OneofOptions {
6627 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006628 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006629 // special fields
6630 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006631 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006632 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006633 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006634}
6635
6636impl<'a> ::std::default::Default for &'a OneofOptions {
6637 fn default() -> &'a OneofOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006638 <OneofOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006639 }
6640}
6641
6642impl OneofOptions {
6643 pub fn new() -> OneofOptions {
6644 ::std::default::Default::default()
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 OneofOptions {
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 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006688 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006689 },
6690 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006691 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006692 },
6693 };
6694 }
6695 ::std::result::Result::Ok(())
6696 }
6697
6698 // Compute sizes of nested messages
6699 #[allow(unused_variables)]
6700 fn compute_size(&self) -> u32 {
6701 let mut my_size = 0;
6702 for value in &self.uninterpreted_option {
6703 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006704 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006705 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006706 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006707 self.cached_size.set(my_size);
6708 my_size
6709 }
6710
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006711 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006712 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006713 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006714 os.write_raw_varint32(v.get_cached_size())?;
6715 v.write_to_with_cached_sizes(os)?;
6716 };
6717 os.write_unknown_fields(self.get_unknown_fields())?;
6718 ::std::result::Result::Ok(())
6719 }
6720
6721 fn get_cached_size(&self) -> u32 {
6722 self.cached_size.get()
6723 }
6724
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006725 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006726 &self.unknown_fields
6727 }
6728
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006729 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006730 &mut self.unknown_fields
6731 }
6732
6733 fn as_any(&self) -> &dyn (::std::any::Any) {
6734 self as &dyn (::std::any::Any)
6735 }
6736 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6737 self as &mut dyn (::std::any::Any)
6738 }
Haibo Huang52aa7852020-07-10 20:23:55 -07006739 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006740 self
6741 }
6742
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006743 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006744 Self::descriptor_static()
6745 }
6746
6747 fn new() -> OneofOptions {
6748 OneofOptions::new()
6749 }
6750
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006751 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
6752 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006753 descriptor.get(|| {
6754 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006755 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006756 "uninterpreted_option",
6757 |m: &OneofOptions| { &m.uninterpreted_option },
6758 |m: &mut OneofOptions| { &mut m.uninterpreted_option },
6759 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006760 crate::reflect::MessageDescriptor::new_pb_name::<OneofOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006761 "OneofOptions",
6762 fields,
6763 file_descriptor_proto()
6764 )
6765 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006766 }
6767
6768 fn default_instance() -> &'static OneofOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006769 static instance: crate::rt::LazyV2<OneofOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006770 instance.get(OneofOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006771 }
6772}
6773
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006774impl crate::Clear for OneofOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006775 fn clear(&mut self) {
6776 self.uninterpreted_option.clear();
6777 self.unknown_fields.clear();
6778 }
6779}
6780
6781impl ::std::fmt::Debug for OneofOptions {
6782 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006783 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006784 }
6785}
6786
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006787impl crate::reflect::ProtobufValue for OneofOptions {
6788 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
6789 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006790 }
6791}
6792
6793#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08006794#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006795pub struct EnumOptions {
6796 // message fields
6797 allow_alias: ::std::option::Option<bool>,
6798 deprecated: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006799 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006800 // special fields
6801 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006802 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006803 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006804 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006805}
6806
6807impl<'a> ::std::default::Default for &'a EnumOptions {
6808 fn default() -> &'a EnumOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006809 <EnumOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006810 }
6811}
6812
6813impl EnumOptions {
6814 pub fn new() -> EnumOptions {
6815 ::std::default::Default::default()
6816 }
6817
6818 // optional bool allow_alias = 2;
6819
6820
6821 pub fn get_allow_alias(&self) -> bool {
6822 self.allow_alias.unwrap_or(false)
6823 }
6824 pub fn clear_allow_alias(&mut self) {
6825 self.allow_alias = ::std::option::Option::None;
6826 }
6827
6828 pub fn has_allow_alias(&self) -> bool {
6829 self.allow_alias.is_some()
6830 }
6831
6832 // Param is passed by value, moved
6833 pub fn set_allow_alias(&mut self, v: bool) {
6834 self.allow_alias = ::std::option::Option::Some(v);
6835 }
6836
6837 // optional bool deprecated = 3;
6838
6839
6840 pub fn get_deprecated(&self) -> bool {
6841 self.deprecated.unwrap_or(false)
6842 }
6843 pub fn clear_deprecated(&mut self) {
6844 self.deprecated = ::std::option::Option::None;
6845 }
6846
6847 pub fn has_deprecated(&self) -> bool {
6848 self.deprecated.is_some()
6849 }
6850
6851 // Param is passed by value, moved
6852 pub fn set_deprecated(&mut self, v: bool) {
6853 self.deprecated = ::std::option::Option::Some(v);
6854 }
6855
6856 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
6857
6858
6859 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
6860 &self.uninterpreted_option
6861 }
6862 pub fn clear_uninterpreted_option(&mut self) {
6863 self.uninterpreted_option.clear();
6864 }
6865
6866 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006867 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006868 self.uninterpreted_option = v;
6869 }
6870
6871 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006872 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006873 &mut self.uninterpreted_option
6874 }
6875
6876 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006877 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
6878 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006879 }
6880}
6881
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006882impl crate::Message for EnumOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006883 fn is_initialized(&self) -> bool {
6884 for v in &self.uninterpreted_option {
6885 if !v.is_initialized() {
6886 return false;
6887 }
6888 };
6889 true
6890 }
6891
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006892 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006893 while !is.eof()? {
6894 let (field_number, wire_type) = is.read_tag_unpack()?;
6895 match field_number {
6896 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006897 if wire_type != crate::wire_format::WireTypeVarint {
6898 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006899 }
6900 let tmp = is.read_bool()?;
6901 self.allow_alias = ::std::option::Option::Some(tmp);
6902 },
6903 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006904 if wire_type != crate::wire_format::WireTypeVarint {
6905 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006906 }
6907 let tmp = is.read_bool()?;
6908 self.deprecated = ::std::option::Option::Some(tmp);
6909 },
6910 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006911 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006912 },
6913 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006914 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006915 },
6916 };
6917 }
6918 ::std::result::Result::Ok(())
6919 }
6920
6921 // Compute sizes of nested messages
6922 #[allow(unused_variables)]
6923 fn compute_size(&self) -> u32 {
6924 let mut my_size = 0;
6925 if let Some(v) = self.allow_alias {
6926 my_size += 2;
6927 }
6928 if let Some(v) = self.deprecated {
6929 my_size += 2;
6930 }
6931 for value in &self.uninterpreted_option {
6932 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006933 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006934 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006935 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006936 self.cached_size.set(my_size);
6937 my_size
6938 }
6939
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006940 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006941 if let Some(v) = self.allow_alias {
6942 os.write_bool(2, v)?;
6943 }
6944 if let Some(v) = self.deprecated {
6945 os.write_bool(3, v)?;
6946 }
6947 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006948 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006949 os.write_raw_varint32(v.get_cached_size())?;
6950 v.write_to_with_cached_sizes(os)?;
6951 };
6952 os.write_unknown_fields(self.get_unknown_fields())?;
6953 ::std::result::Result::Ok(())
6954 }
6955
6956 fn get_cached_size(&self) -> u32 {
6957 self.cached_size.get()
6958 }
6959
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006960 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006961 &self.unknown_fields
6962 }
6963
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006964 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006965 &mut self.unknown_fields
6966 }
6967
6968 fn as_any(&self) -> &dyn (::std::any::Any) {
6969 self as &dyn (::std::any::Any)
6970 }
6971 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
6972 self as &mut dyn (::std::any::Any)
6973 }
Haibo Huang52aa7852020-07-10 20:23:55 -07006974 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006975 self
6976 }
6977
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006978 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07006979 Self::descriptor_static()
6980 }
6981
6982 fn new() -> EnumOptions {
6983 EnumOptions::new()
6984 }
6985
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006986 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
6987 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07006988 descriptor.get(|| {
6989 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006990 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006991 "allow_alias",
6992 |m: &EnumOptions| { &m.allow_alias },
6993 |m: &mut EnumOptions| { &mut m.allow_alias },
6994 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07006995 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07006996 "deprecated",
6997 |m: &EnumOptions| { &m.deprecated },
6998 |m: &mut EnumOptions| { &mut m.deprecated },
6999 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007000 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007001 "uninterpreted_option",
7002 |m: &EnumOptions| { &m.uninterpreted_option },
7003 |m: &mut EnumOptions| { &mut m.uninterpreted_option },
7004 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007005 crate::reflect::MessageDescriptor::new_pb_name::<EnumOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007006 "EnumOptions",
7007 fields,
7008 file_descriptor_proto()
7009 )
7010 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007011 }
7012
7013 fn default_instance() -> &'static EnumOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007014 static instance: crate::rt::LazyV2<EnumOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007015 instance.get(EnumOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007016 }
7017}
7018
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007019impl crate::Clear for EnumOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007020 fn clear(&mut self) {
7021 self.allow_alias = ::std::option::Option::None;
7022 self.deprecated = ::std::option::Option::None;
7023 self.uninterpreted_option.clear();
7024 self.unknown_fields.clear();
7025 }
7026}
7027
7028impl ::std::fmt::Debug for EnumOptions {
7029 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007030 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007031 }
7032}
7033
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007034impl crate::reflect::ProtobufValue for EnumOptions {
7035 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7036 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007037 }
7038}
7039
7040#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08007041#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007042pub struct EnumValueOptions {
7043 // message fields
7044 deprecated: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007045 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007046 // special fields
7047 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007048 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007049 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007050 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007051}
7052
7053impl<'a> ::std::default::Default for &'a EnumValueOptions {
7054 fn default() -> &'a EnumValueOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007055 <EnumValueOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007056 }
7057}
7058
7059impl EnumValueOptions {
7060 pub fn new() -> EnumValueOptions {
7061 ::std::default::Default::default()
7062 }
7063
7064 // optional bool deprecated = 1;
7065
7066
7067 pub fn get_deprecated(&self) -> bool {
7068 self.deprecated.unwrap_or(false)
7069 }
7070 pub fn clear_deprecated(&mut self) {
7071 self.deprecated = ::std::option::Option::None;
7072 }
7073
7074 pub fn has_deprecated(&self) -> bool {
7075 self.deprecated.is_some()
7076 }
7077
7078 // Param is passed by value, moved
7079 pub fn set_deprecated(&mut self, v: bool) {
7080 self.deprecated = ::std::option::Option::Some(v);
7081 }
7082
7083 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
7084
7085
7086 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
7087 &self.uninterpreted_option
7088 }
7089 pub fn clear_uninterpreted_option(&mut self) {
7090 self.uninterpreted_option.clear();
7091 }
7092
7093 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007094 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007095 self.uninterpreted_option = v;
7096 }
7097
7098 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007099 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007100 &mut self.uninterpreted_option
7101 }
7102
7103 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007104 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
7105 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007106 }
7107}
7108
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007109impl crate::Message for EnumValueOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007110 fn is_initialized(&self) -> bool {
7111 for v in &self.uninterpreted_option {
7112 if !v.is_initialized() {
7113 return false;
7114 }
7115 };
7116 true
7117 }
7118
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007119 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007120 while !is.eof()? {
7121 let (field_number, wire_type) = is.read_tag_unpack()?;
7122 match field_number {
7123 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007124 if wire_type != crate::wire_format::WireTypeVarint {
7125 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007126 }
7127 let tmp = is.read_bool()?;
7128 self.deprecated = ::std::option::Option::Some(tmp);
7129 },
7130 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007131 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007132 },
7133 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007134 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007135 },
7136 };
7137 }
7138 ::std::result::Result::Ok(())
7139 }
7140
7141 // Compute sizes of nested messages
7142 #[allow(unused_variables)]
7143 fn compute_size(&self) -> u32 {
7144 let mut my_size = 0;
7145 if let Some(v) = self.deprecated {
7146 my_size += 2;
7147 }
7148 for value in &self.uninterpreted_option {
7149 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007150 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007151 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007152 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007153 self.cached_size.set(my_size);
7154 my_size
7155 }
7156
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007157 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007158 if let Some(v) = self.deprecated {
7159 os.write_bool(1, v)?;
7160 }
7161 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007162 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007163 os.write_raw_varint32(v.get_cached_size())?;
7164 v.write_to_with_cached_sizes(os)?;
7165 };
7166 os.write_unknown_fields(self.get_unknown_fields())?;
7167 ::std::result::Result::Ok(())
7168 }
7169
7170 fn get_cached_size(&self) -> u32 {
7171 self.cached_size.get()
7172 }
7173
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007174 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007175 &self.unknown_fields
7176 }
7177
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007178 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007179 &mut self.unknown_fields
7180 }
7181
7182 fn as_any(&self) -> &dyn (::std::any::Any) {
7183 self as &dyn (::std::any::Any)
7184 }
7185 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
7186 self as &mut dyn (::std::any::Any)
7187 }
Haibo Huang52aa7852020-07-10 20:23:55 -07007188 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007189 self
7190 }
7191
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007192 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007193 Self::descriptor_static()
7194 }
7195
7196 fn new() -> EnumValueOptions {
7197 EnumValueOptions::new()
7198 }
7199
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007200 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
7201 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007202 descriptor.get(|| {
7203 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007204 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007205 "deprecated",
7206 |m: &EnumValueOptions| { &m.deprecated },
7207 |m: &mut EnumValueOptions| { &mut m.deprecated },
7208 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007209 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007210 "uninterpreted_option",
7211 |m: &EnumValueOptions| { &m.uninterpreted_option },
7212 |m: &mut EnumValueOptions| { &mut m.uninterpreted_option },
7213 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007214 crate::reflect::MessageDescriptor::new_pb_name::<EnumValueOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007215 "EnumValueOptions",
7216 fields,
7217 file_descriptor_proto()
7218 )
7219 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007220 }
7221
7222 fn default_instance() -> &'static EnumValueOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007223 static instance: crate::rt::LazyV2<EnumValueOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007224 instance.get(EnumValueOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007225 }
7226}
7227
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007228impl crate::Clear for EnumValueOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007229 fn clear(&mut self) {
7230 self.deprecated = ::std::option::Option::None;
7231 self.uninterpreted_option.clear();
7232 self.unknown_fields.clear();
7233 }
7234}
7235
7236impl ::std::fmt::Debug for EnumValueOptions {
7237 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007238 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007239 }
7240}
7241
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007242impl crate::reflect::ProtobufValue for EnumValueOptions {
7243 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7244 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007245 }
7246}
7247
7248#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08007249#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007250pub struct ServiceOptions {
7251 // message fields
7252 deprecated: ::std::option::Option<bool>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007253 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007254 // special fields
7255 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007256 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007257 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007258 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007259}
7260
7261impl<'a> ::std::default::Default for &'a ServiceOptions {
7262 fn default() -> &'a ServiceOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007263 <ServiceOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007264 }
7265}
7266
7267impl ServiceOptions {
7268 pub fn new() -> ServiceOptions {
7269 ::std::default::Default::default()
7270 }
7271
7272 // optional bool deprecated = 33;
7273
7274
7275 pub fn get_deprecated(&self) -> bool {
7276 self.deprecated.unwrap_or(false)
7277 }
7278 pub fn clear_deprecated(&mut self) {
7279 self.deprecated = ::std::option::Option::None;
7280 }
7281
7282 pub fn has_deprecated(&self) -> bool {
7283 self.deprecated.is_some()
7284 }
7285
7286 // Param is passed by value, moved
7287 pub fn set_deprecated(&mut self, v: bool) {
7288 self.deprecated = ::std::option::Option::Some(v);
7289 }
7290
7291 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
7292
7293
7294 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
7295 &self.uninterpreted_option
7296 }
7297 pub fn clear_uninterpreted_option(&mut self) {
7298 self.uninterpreted_option.clear();
7299 }
7300
7301 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007302 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007303 self.uninterpreted_option = v;
7304 }
7305
7306 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007307 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007308 &mut self.uninterpreted_option
7309 }
7310
7311 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007312 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
7313 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007314 }
7315}
7316
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007317impl crate::Message for ServiceOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007318 fn is_initialized(&self) -> bool {
7319 for v in &self.uninterpreted_option {
7320 if !v.is_initialized() {
7321 return false;
7322 }
7323 };
7324 true
7325 }
7326
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007327 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007328 while !is.eof()? {
7329 let (field_number, wire_type) = is.read_tag_unpack()?;
7330 match field_number {
7331 33 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007332 if wire_type != crate::wire_format::WireTypeVarint {
7333 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007334 }
7335 let tmp = is.read_bool()?;
7336 self.deprecated = ::std::option::Option::Some(tmp);
7337 },
7338 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007339 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007340 },
7341 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007342 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007343 },
7344 };
7345 }
7346 ::std::result::Result::Ok(())
7347 }
7348
7349 // Compute sizes of nested messages
7350 #[allow(unused_variables)]
7351 fn compute_size(&self) -> u32 {
7352 let mut my_size = 0;
7353 if let Some(v) = self.deprecated {
7354 my_size += 3;
7355 }
7356 for value in &self.uninterpreted_option {
7357 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007358 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007359 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007360 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007361 self.cached_size.set(my_size);
7362 my_size
7363 }
7364
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007365 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007366 if let Some(v) = self.deprecated {
7367 os.write_bool(33, v)?;
7368 }
7369 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007370 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007371 os.write_raw_varint32(v.get_cached_size())?;
7372 v.write_to_with_cached_sizes(os)?;
7373 };
7374 os.write_unknown_fields(self.get_unknown_fields())?;
7375 ::std::result::Result::Ok(())
7376 }
7377
7378 fn get_cached_size(&self) -> u32 {
7379 self.cached_size.get()
7380 }
7381
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007382 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007383 &self.unknown_fields
7384 }
7385
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007386 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007387 &mut self.unknown_fields
7388 }
7389
7390 fn as_any(&self) -> &dyn (::std::any::Any) {
7391 self as &dyn (::std::any::Any)
7392 }
7393 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
7394 self as &mut dyn (::std::any::Any)
7395 }
Haibo Huang52aa7852020-07-10 20:23:55 -07007396 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007397 self
7398 }
7399
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007400 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007401 Self::descriptor_static()
7402 }
7403
7404 fn new() -> ServiceOptions {
7405 ServiceOptions::new()
7406 }
7407
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007408 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
7409 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007410 descriptor.get(|| {
7411 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007412 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007413 "deprecated",
7414 |m: &ServiceOptions| { &m.deprecated },
7415 |m: &mut ServiceOptions| { &mut m.deprecated },
7416 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007417 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007418 "uninterpreted_option",
7419 |m: &ServiceOptions| { &m.uninterpreted_option },
7420 |m: &mut ServiceOptions| { &mut m.uninterpreted_option },
7421 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007422 crate::reflect::MessageDescriptor::new_pb_name::<ServiceOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007423 "ServiceOptions",
7424 fields,
7425 file_descriptor_proto()
7426 )
7427 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007428 }
7429
7430 fn default_instance() -> &'static ServiceOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007431 static instance: crate::rt::LazyV2<ServiceOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007432 instance.get(ServiceOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007433 }
7434}
7435
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007436impl crate::Clear for ServiceOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007437 fn clear(&mut self) {
7438 self.deprecated = ::std::option::Option::None;
7439 self.uninterpreted_option.clear();
7440 self.unknown_fields.clear();
7441 }
7442}
7443
7444impl ::std::fmt::Debug for ServiceOptions {
7445 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007446 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007447 }
7448}
7449
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007450impl crate::reflect::ProtobufValue for ServiceOptions {
7451 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7452 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007453 }
7454}
7455
7456#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08007457#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007458pub struct MethodOptions {
7459 // message fields
7460 deprecated: ::std::option::Option<bool>,
Haibo Huangca95bfd2021-02-09 17:48:30 -08007461 idempotency_level: ::std::option::Option<MethodOptions_IdempotencyLevel>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007462 pub uninterpreted_option: crate::RepeatedField<UninterpretedOption>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007463 // special fields
7464 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007465 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007466 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007467 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007468}
7469
7470impl<'a> ::std::default::Default for &'a MethodOptions {
7471 fn default() -> &'a MethodOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007472 <MethodOptions as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007473 }
7474}
7475
7476impl MethodOptions {
7477 pub fn new() -> MethodOptions {
7478 ::std::default::Default::default()
7479 }
7480
7481 // optional bool deprecated = 33;
7482
7483
7484 pub fn get_deprecated(&self) -> bool {
7485 self.deprecated.unwrap_or(false)
7486 }
7487 pub fn clear_deprecated(&mut self) {
7488 self.deprecated = ::std::option::Option::None;
7489 }
7490
7491 pub fn has_deprecated(&self) -> bool {
7492 self.deprecated.is_some()
7493 }
7494
7495 // Param is passed by value, moved
7496 pub fn set_deprecated(&mut self, v: bool) {
7497 self.deprecated = ::std::option::Option::Some(v);
7498 }
7499
Haibo Huangca95bfd2021-02-09 17:48:30 -08007500 // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34;
7501
7502
7503 pub fn get_idempotency_level(&self) -> MethodOptions_IdempotencyLevel {
7504 self.idempotency_level.unwrap_or(MethodOptions_IdempotencyLevel::IDEMPOTENCY_UNKNOWN)
7505 }
7506 pub fn clear_idempotency_level(&mut self) {
7507 self.idempotency_level = ::std::option::Option::None;
7508 }
7509
7510 pub fn has_idempotency_level(&self) -> bool {
7511 self.idempotency_level.is_some()
7512 }
7513
7514 // Param is passed by value, moved
7515 pub fn set_idempotency_level(&mut self, v: MethodOptions_IdempotencyLevel) {
7516 self.idempotency_level = ::std::option::Option::Some(v);
7517 }
7518
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007519 // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
7520
7521
7522 pub fn get_uninterpreted_option(&self) -> &[UninterpretedOption] {
7523 &self.uninterpreted_option
7524 }
7525 pub fn clear_uninterpreted_option(&mut self) {
7526 self.uninterpreted_option.clear();
7527 }
7528
7529 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007530 pub fn set_uninterpreted_option(&mut self, v: crate::RepeatedField<UninterpretedOption>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007531 self.uninterpreted_option = v;
7532 }
7533
7534 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007535 pub fn mut_uninterpreted_option(&mut self) -> &mut crate::RepeatedField<UninterpretedOption> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007536 &mut self.uninterpreted_option
7537 }
7538
7539 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007540 pub fn take_uninterpreted_option(&mut self) -> crate::RepeatedField<UninterpretedOption> {
7541 ::std::mem::replace(&mut self.uninterpreted_option, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007542 }
7543}
7544
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007545impl crate::Message for MethodOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007546 fn is_initialized(&self) -> bool {
7547 for v in &self.uninterpreted_option {
7548 if !v.is_initialized() {
7549 return false;
7550 }
7551 };
7552 true
7553 }
7554
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007555 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007556 while !is.eof()? {
7557 let (field_number, wire_type) = is.read_tag_unpack()?;
7558 match field_number {
7559 33 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007560 if wire_type != crate::wire_format::WireTypeVarint {
7561 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007562 }
7563 let tmp = is.read_bool()?;
7564 self.deprecated = ::std::option::Option::Some(tmp);
7565 },
Haibo Huangca95bfd2021-02-09 17:48:30 -08007566 34 => {
7567 crate::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.idempotency_level, 34, &mut self.unknown_fields)?
7568 },
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007569 999 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007570 crate::rt::read_repeated_message_into(wire_type, is, &mut self.uninterpreted_option)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007571 },
7572 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007573 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007574 },
7575 };
7576 }
7577 ::std::result::Result::Ok(())
7578 }
7579
7580 // Compute sizes of nested messages
7581 #[allow(unused_variables)]
7582 fn compute_size(&self) -> u32 {
7583 let mut my_size = 0;
7584 if let Some(v) = self.deprecated {
7585 my_size += 3;
7586 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08007587 if let Some(v) = self.idempotency_level {
7588 my_size += crate::rt::enum_size(34, v);
7589 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007590 for value in &self.uninterpreted_option {
7591 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007592 my_size += 2 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007593 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007594 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007595 self.cached_size.set(my_size);
7596 my_size
7597 }
7598
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007599 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007600 if let Some(v) = self.deprecated {
7601 os.write_bool(33, v)?;
7602 }
Haibo Huangca95bfd2021-02-09 17:48:30 -08007603 if let Some(v) = self.idempotency_level {
7604 os.write_enum(34, crate::ProtobufEnum::value(&v))?;
7605 }
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007606 for v in &self.uninterpreted_option {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007607 os.write_tag(999, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007608 os.write_raw_varint32(v.get_cached_size())?;
7609 v.write_to_with_cached_sizes(os)?;
7610 };
7611 os.write_unknown_fields(self.get_unknown_fields())?;
7612 ::std::result::Result::Ok(())
7613 }
7614
7615 fn get_cached_size(&self) -> u32 {
7616 self.cached_size.get()
7617 }
7618
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007619 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007620 &self.unknown_fields
7621 }
7622
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007623 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007624 &mut self.unknown_fields
7625 }
7626
7627 fn as_any(&self) -> &dyn (::std::any::Any) {
7628 self as &dyn (::std::any::Any)
7629 }
7630 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
7631 self as &mut dyn (::std::any::Any)
7632 }
Haibo Huang52aa7852020-07-10 20:23:55 -07007633 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007634 self
7635 }
7636
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007637 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007638 Self::descriptor_static()
7639 }
7640
7641 fn new() -> MethodOptions {
7642 MethodOptions::new()
7643 }
7644
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007645 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
7646 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007647 descriptor.get(|| {
7648 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007649 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007650 "deprecated",
7651 |m: &MethodOptions| { &m.deprecated },
7652 |m: &mut MethodOptions| { &mut m.deprecated },
7653 ));
Haibo Huangca95bfd2021-02-09 17:48:30 -08007654 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeEnum<MethodOptions_IdempotencyLevel>>(
7655 "idempotency_level",
7656 |m: &MethodOptions| { &m.idempotency_level },
7657 |m: &mut MethodOptions| { &mut m.idempotency_level },
7658 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007659 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007660 "uninterpreted_option",
7661 |m: &MethodOptions| { &m.uninterpreted_option },
7662 |m: &mut MethodOptions| { &mut m.uninterpreted_option },
7663 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007664 crate::reflect::MessageDescriptor::new_pb_name::<MethodOptions>(
Haibo Huang52aa7852020-07-10 20:23:55 -07007665 "MethodOptions",
7666 fields,
7667 file_descriptor_proto()
7668 )
7669 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007670 }
7671
7672 fn default_instance() -> &'static MethodOptions {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007673 static instance: crate::rt::LazyV2<MethodOptions> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07007674 instance.get(MethodOptions::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007675 }
7676}
7677
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007678impl crate::Clear for MethodOptions {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007679 fn clear(&mut self) {
7680 self.deprecated = ::std::option::Option::None;
Haibo Huangca95bfd2021-02-09 17:48:30 -08007681 self.idempotency_level = ::std::option::Option::None;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007682 self.uninterpreted_option.clear();
7683 self.unknown_fields.clear();
7684 }
7685}
7686
7687impl ::std::fmt::Debug for MethodOptions {
7688 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007689 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007690 }
7691}
7692
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007693impl crate::reflect::ProtobufValue for MethodOptions {
7694 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7695 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007696 }
7697}
7698
Haibo Huangca95bfd2021-02-09 17:48:30 -08007699#[derive(Clone,PartialEq,Eq,Debug,Hash)]
7700#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
7701pub enum MethodOptions_IdempotencyLevel {
7702 IDEMPOTENCY_UNKNOWN = 0,
7703 NO_SIDE_EFFECTS = 1,
7704 IDEMPOTENT = 2,
7705}
7706
7707impl crate::ProtobufEnum for MethodOptions_IdempotencyLevel {
7708 fn value(&self) -> i32 {
7709 *self as i32
7710 }
7711
7712 fn from_i32(value: i32) -> ::std::option::Option<MethodOptions_IdempotencyLevel> {
7713 match value {
7714 0 => ::std::option::Option::Some(MethodOptions_IdempotencyLevel::IDEMPOTENCY_UNKNOWN),
7715 1 => ::std::option::Option::Some(MethodOptions_IdempotencyLevel::NO_SIDE_EFFECTS),
7716 2 => ::std::option::Option::Some(MethodOptions_IdempotencyLevel::IDEMPOTENT),
7717 _ => ::std::option::Option::None
7718 }
7719 }
7720
7721 fn values() -> &'static [Self] {
7722 static values: &'static [MethodOptions_IdempotencyLevel] = &[
7723 MethodOptions_IdempotencyLevel::IDEMPOTENCY_UNKNOWN,
7724 MethodOptions_IdempotencyLevel::NO_SIDE_EFFECTS,
7725 MethodOptions_IdempotencyLevel::IDEMPOTENT,
7726 ];
7727 values
7728 }
7729
7730 fn enum_descriptor_static() -> &'static crate::reflect::EnumDescriptor {
7731 static descriptor: crate::rt::LazyV2<crate::reflect::EnumDescriptor> = crate::rt::LazyV2::INIT;
7732 descriptor.get(|| {
7733 crate::reflect::EnumDescriptor::new_pb_name::<MethodOptions_IdempotencyLevel>("MethodOptions.IdempotencyLevel", file_descriptor_proto())
7734 })
7735 }
7736}
7737
7738impl ::std::marker::Copy for MethodOptions_IdempotencyLevel {
7739}
7740
7741impl ::std::default::Default for MethodOptions_IdempotencyLevel {
7742 fn default() -> Self {
7743 MethodOptions_IdempotencyLevel::IDEMPOTENCY_UNKNOWN
7744 }
7745}
7746
7747impl crate::reflect::ProtobufValue for MethodOptions_IdempotencyLevel {
7748 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
7749 crate::reflect::ReflectValueRef::Enum(crate::ProtobufEnum::descriptor(self))
7750 }
7751}
7752
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007753#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08007754#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007755pub struct UninterpretedOption {
7756 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007757 pub name: crate::RepeatedField<UninterpretedOption_NamePart>,
7758 identifier_value: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007759 positive_int_value: ::std::option::Option<u64>,
7760 negative_int_value: ::std::option::Option<i64>,
7761 double_value: ::std::option::Option<f64>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007762 string_value: crate::SingularField<::std::vec::Vec<u8>>,
7763 aggregate_value: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007764 // special fields
7765 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007766 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007767 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007768 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007769}
7770
7771impl<'a> ::std::default::Default for &'a UninterpretedOption {
7772 fn default() -> &'a UninterpretedOption {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007773 <UninterpretedOption as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007774 }
7775}
7776
7777impl UninterpretedOption {
7778 pub fn new() -> UninterpretedOption {
7779 ::std::default::Default::default()
7780 }
7781
7782 // repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
7783
7784
7785 pub fn get_name(&self) -> &[UninterpretedOption_NamePart] {
7786 &self.name
7787 }
7788 pub fn clear_name(&mut self) {
7789 self.name.clear();
7790 }
7791
7792 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007793 pub fn set_name(&mut self, v: crate::RepeatedField<UninterpretedOption_NamePart>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007794 self.name = v;
7795 }
7796
7797 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007798 pub fn mut_name(&mut self) -> &mut crate::RepeatedField<UninterpretedOption_NamePart> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007799 &mut self.name
7800 }
7801
7802 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007803 pub fn take_name(&mut self) -> crate::RepeatedField<UninterpretedOption_NamePart> {
7804 ::std::mem::replace(&mut self.name, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007805 }
7806
7807 // optional string identifier_value = 3;
7808
7809
7810 pub fn get_identifier_value(&self) -> &str {
7811 match self.identifier_value.as_ref() {
7812 Some(v) => &v,
7813 None => "",
7814 }
7815 }
7816 pub fn clear_identifier_value(&mut self) {
7817 self.identifier_value.clear();
7818 }
7819
7820 pub fn has_identifier_value(&self) -> bool {
7821 self.identifier_value.is_some()
7822 }
7823
7824 // Param is passed by value, moved
7825 pub fn set_identifier_value(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007826 self.identifier_value = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007827 }
7828
7829 // Mutable pointer to the field.
7830 // If field is not initialized, it is initialized with default value first.
7831 pub fn mut_identifier_value(&mut self) -> &mut ::std::string::String {
7832 if self.identifier_value.is_none() {
7833 self.identifier_value.set_default();
7834 }
7835 self.identifier_value.as_mut().unwrap()
7836 }
7837
7838 // Take field
7839 pub fn take_identifier_value(&mut self) -> ::std::string::String {
7840 self.identifier_value.take().unwrap_or_else(|| ::std::string::String::new())
7841 }
7842
7843 // optional uint64 positive_int_value = 4;
7844
7845
7846 pub fn get_positive_int_value(&self) -> u64 {
7847 self.positive_int_value.unwrap_or(0)
7848 }
7849 pub fn clear_positive_int_value(&mut self) {
7850 self.positive_int_value = ::std::option::Option::None;
7851 }
7852
7853 pub fn has_positive_int_value(&self) -> bool {
7854 self.positive_int_value.is_some()
7855 }
7856
7857 // Param is passed by value, moved
7858 pub fn set_positive_int_value(&mut self, v: u64) {
7859 self.positive_int_value = ::std::option::Option::Some(v);
7860 }
7861
7862 // optional int64 negative_int_value = 5;
7863
7864
7865 pub fn get_negative_int_value(&self) -> i64 {
7866 self.negative_int_value.unwrap_or(0)
7867 }
7868 pub fn clear_negative_int_value(&mut self) {
7869 self.negative_int_value = ::std::option::Option::None;
7870 }
7871
7872 pub fn has_negative_int_value(&self) -> bool {
7873 self.negative_int_value.is_some()
7874 }
7875
7876 // Param is passed by value, moved
7877 pub fn set_negative_int_value(&mut self, v: i64) {
7878 self.negative_int_value = ::std::option::Option::Some(v);
7879 }
7880
7881 // optional double double_value = 6;
7882
7883
7884 pub fn get_double_value(&self) -> f64 {
7885 self.double_value.unwrap_or(0.)
7886 }
7887 pub fn clear_double_value(&mut self) {
7888 self.double_value = ::std::option::Option::None;
7889 }
7890
7891 pub fn has_double_value(&self) -> bool {
7892 self.double_value.is_some()
7893 }
7894
7895 // Param is passed by value, moved
7896 pub fn set_double_value(&mut self, v: f64) {
7897 self.double_value = ::std::option::Option::Some(v);
7898 }
7899
7900 // optional bytes string_value = 7;
7901
7902
7903 pub fn get_string_value(&self) -> &[u8] {
7904 match self.string_value.as_ref() {
7905 Some(v) => &v,
7906 None => &[],
7907 }
7908 }
7909 pub fn clear_string_value(&mut self) {
7910 self.string_value.clear();
7911 }
7912
7913 pub fn has_string_value(&self) -> bool {
7914 self.string_value.is_some()
7915 }
7916
7917 // Param is passed by value, moved
7918 pub fn set_string_value(&mut self, v: ::std::vec::Vec<u8>) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007919 self.string_value = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007920 }
7921
7922 // Mutable pointer to the field.
7923 // If field is not initialized, it is initialized with default value first.
7924 pub fn mut_string_value(&mut self) -> &mut ::std::vec::Vec<u8> {
7925 if self.string_value.is_none() {
7926 self.string_value.set_default();
7927 }
7928 self.string_value.as_mut().unwrap()
7929 }
7930
7931 // Take field
7932 pub fn take_string_value(&mut self) -> ::std::vec::Vec<u8> {
7933 self.string_value.take().unwrap_or_else(|| ::std::vec::Vec::new())
7934 }
7935
7936 // optional string aggregate_value = 8;
7937
7938
7939 pub fn get_aggregate_value(&self) -> &str {
7940 match self.aggregate_value.as_ref() {
7941 Some(v) => &v,
7942 None => "",
7943 }
7944 }
7945 pub fn clear_aggregate_value(&mut self) {
7946 self.aggregate_value.clear();
7947 }
7948
7949 pub fn has_aggregate_value(&self) -> bool {
7950 self.aggregate_value.is_some()
7951 }
7952
7953 // Param is passed by value, moved
7954 pub fn set_aggregate_value(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007955 self.aggregate_value = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007956 }
7957
7958 // Mutable pointer to the field.
7959 // If field is not initialized, it is initialized with default value first.
7960 pub fn mut_aggregate_value(&mut self) -> &mut ::std::string::String {
7961 if self.aggregate_value.is_none() {
7962 self.aggregate_value.set_default();
7963 }
7964 self.aggregate_value.as_mut().unwrap()
7965 }
7966
7967 // Take field
7968 pub fn take_aggregate_value(&mut self) -> ::std::string::String {
7969 self.aggregate_value.take().unwrap_or_else(|| ::std::string::String::new())
7970 }
7971}
7972
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007973impl crate::Message for UninterpretedOption {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007974 fn is_initialized(&self) -> bool {
7975 for v in &self.name {
7976 if !v.is_initialized() {
7977 return false;
7978 }
7979 };
7980 true
7981 }
7982
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007983 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007984 while !is.eof()? {
7985 let (field_number, wire_type) = is.read_tag_unpack()?;
7986 match field_number {
7987 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007988 crate::rt::read_repeated_message_into(wire_type, is, &mut self.name)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007989 },
7990 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007991 crate::rt::read_singular_string_into(wire_type, is, &mut self.identifier_value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007992 },
7993 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07007994 if wire_type != crate::wire_format::WireTypeVarint {
7995 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07007996 }
7997 let tmp = is.read_uint64()?;
7998 self.positive_int_value = ::std::option::Option::Some(tmp);
7999 },
8000 5 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008001 if wire_type != crate::wire_format::WireTypeVarint {
8002 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008003 }
8004 let tmp = is.read_int64()?;
8005 self.negative_int_value = ::std::option::Option::Some(tmp);
8006 },
8007 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008008 if wire_type != crate::wire_format::WireTypeFixed64 {
8009 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008010 }
8011 let tmp = is.read_double()?;
8012 self.double_value = ::std::option::Option::Some(tmp);
8013 },
8014 7 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008015 crate::rt::read_singular_bytes_into(wire_type, is, &mut self.string_value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008016 },
8017 8 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008018 crate::rt::read_singular_string_into(wire_type, is, &mut self.aggregate_value)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008019 },
8020 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008021 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008022 },
8023 };
8024 }
8025 ::std::result::Result::Ok(())
8026 }
8027
8028 // Compute sizes of nested messages
8029 #[allow(unused_variables)]
8030 fn compute_size(&self) -> u32 {
8031 let mut my_size = 0;
8032 for value in &self.name {
8033 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008034 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008035 };
8036 if let Some(ref v) = self.identifier_value.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008037 my_size += crate::rt::string_size(3, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008038 }
8039 if let Some(v) = self.positive_int_value {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008040 my_size += crate::rt::value_size(4, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008041 }
8042 if let Some(v) = self.negative_int_value {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008043 my_size += crate::rt::value_size(5, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008044 }
8045 if let Some(v) = self.double_value {
8046 my_size += 9;
8047 }
8048 if let Some(ref v) = self.string_value.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008049 my_size += crate::rt::bytes_size(7, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008050 }
8051 if let Some(ref v) = self.aggregate_value.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008052 my_size += crate::rt::string_size(8, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008053 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008054 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008055 self.cached_size.set(my_size);
8056 my_size
8057 }
8058
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008059 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008060 for v in &self.name {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008061 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008062 os.write_raw_varint32(v.get_cached_size())?;
8063 v.write_to_with_cached_sizes(os)?;
8064 };
8065 if let Some(ref v) = self.identifier_value.as_ref() {
8066 os.write_string(3, &v)?;
8067 }
8068 if let Some(v) = self.positive_int_value {
8069 os.write_uint64(4, v)?;
8070 }
8071 if let Some(v) = self.negative_int_value {
8072 os.write_int64(5, v)?;
8073 }
8074 if let Some(v) = self.double_value {
8075 os.write_double(6, v)?;
8076 }
8077 if let Some(ref v) = self.string_value.as_ref() {
8078 os.write_bytes(7, &v)?;
8079 }
8080 if let Some(ref v) = self.aggregate_value.as_ref() {
8081 os.write_string(8, &v)?;
8082 }
8083 os.write_unknown_fields(self.get_unknown_fields())?;
8084 ::std::result::Result::Ok(())
8085 }
8086
8087 fn get_cached_size(&self) -> u32 {
8088 self.cached_size.get()
8089 }
8090
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008091 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008092 &self.unknown_fields
8093 }
8094
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008095 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008096 &mut self.unknown_fields
8097 }
8098
8099 fn as_any(&self) -> &dyn (::std::any::Any) {
8100 self as &dyn (::std::any::Any)
8101 }
8102 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
8103 self as &mut dyn (::std::any::Any)
8104 }
Haibo Huang52aa7852020-07-10 20:23:55 -07008105 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008106 self
8107 }
8108
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008109 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008110 Self::descriptor_static()
8111 }
8112
8113 fn new() -> UninterpretedOption {
8114 UninterpretedOption::new()
8115 }
8116
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008117 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
8118 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008119 descriptor.get(|| {
8120 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008121 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<UninterpretedOption_NamePart>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008122 "name",
8123 |m: &UninterpretedOption| { &m.name },
8124 |m: &mut UninterpretedOption| { &mut m.name },
8125 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008126 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008127 "identifier_value",
8128 |m: &UninterpretedOption| { &m.identifier_value },
8129 |m: &mut UninterpretedOption| { &mut m.identifier_value },
8130 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008131 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeUint64>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008132 "positive_int_value",
8133 |m: &UninterpretedOption| { &m.positive_int_value },
8134 |m: &mut UninterpretedOption| { &mut m.positive_int_value },
8135 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008136 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt64>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008137 "negative_int_value",
8138 |m: &UninterpretedOption| { &m.negative_int_value },
8139 |m: &mut UninterpretedOption| { &mut m.negative_int_value },
8140 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008141 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeDouble>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008142 "double_value",
8143 |m: &UninterpretedOption| { &m.double_value },
8144 |m: &mut UninterpretedOption| { &mut m.double_value },
8145 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008146 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeBytes>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008147 "string_value",
8148 |m: &UninterpretedOption| { &m.string_value },
8149 |m: &mut UninterpretedOption| { &mut m.string_value },
8150 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008151 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008152 "aggregate_value",
8153 |m: &UninterpretedOption| { &m.aggregate_value },
8154 |m: &mut UninterpretedOption| { &mut m.aggregate_value },
8155 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008156 crate::reflect::MessageDescriptor::new_pb_name::<UninterpretedOption>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008157 "UninterpretedOption",
8158 fields,
8159 file_descriptor_proto()
8160 )
8161 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008162 }
8163
8164 fn default_instance() -> &'static UninterpretedOption {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008165 static instance: crate::rt::LazyV2<UninterpretedOption> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008166 instance.get(UninterpretedOption::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008167 }
8168}
8169
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008170impl crate::Clear for UninterpretedOption {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008171 fn clear(&mut self) {
8172 self.name.clear();
8173 self.identifier_value.clear();
8174 self.positive_int_value = ::std::option::Option::None;
8175 self.negative_int_value = ::std::option::Option::None;
8176 self.double_value = ::std::option::Option::None;
8177 self.string_value.clear();
8178 self.aggregate_value.clear();
8179 self.unknown_fields.clear();
8180 }
8181}
8182
8183impl ::std::fmt::Debug for UninterpretedOption {
8184 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008185 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008186 }
8187}
8188
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008189impl crate::reflect::ProtobufValue for UninterpretedOption {
8190 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
8191 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008192 }
8193}
8194
8195#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08008196#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008197pub struct UninterpretedOption_NamePart {
8198 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008199 name_part: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008200 is_extension: ::std::option::Option<bool>,
8201 // special fields
8202 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008203 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008204 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008205 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008206}
8207
8208impl<'a> ::std::default::Default for &'a UninterpretedOption_NamePart {
8209 fn default() -> &'a UninterpretedOption_NamePart {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008210 <UninterpretedOption_NamePart as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008211 }
8212}
8213
8214impl UninterpretedOption_NamePart {
8215 pub fn new() -> UninterpretedOption_NamePart {
8216 ::std::default::Default::default()
8217 }
8218
8219 // required string name_part = 1;
8220
8221
8222 pub fn get_name_part(&self) -> &str {
8223 match self.name_part.as_ref() {
8224 Some(v) => &v,
8225 None => "",
8226 }
8227 }
8228 pub fn clear_name_part(&mut self) {
8229 self.name_part.clear();
8230 }
8231
8232 pub fn has_name_part(&self) -> bool {
8233 self.name_part.is_some()
8234 }
8235
8236 // Param is passed by value, moved
8237 pub fn set_name_part(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008238 self.name_part = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008239 }
8240
8241 // Mutable pointer to the field.
8242 // If field is not initialized, it is initialized with default value first.
8243 pub fn mut_name_part(&mut self) -> &mut ::std::string::String {
8244 if self.name_part.is_none() {
8245 self.name_part.set_default();
8246 }
8247 self.name_part.as_mut().unwrap()
8248 }
8249
8250 // Take field
8251 pub fn take_name_part(&mut self) -> ::std::string::String {
8252 self.name_part.take().unwrap_or_else(|| ::std::string::String::new())
8253 }
8254
8255 // required bool is_extension = 2;
8256
8257
8258 pub fn get_is_extension(&self) -> bool {
8259 self.is_extension.unwrap_or(false)
8260 }
8261 pub fn clear_is_extension(&mut self) {
8262 self.is_extension = ::std::option::Option::None;
8263 }
8264
8265 pub fn has_is_extension(&self) -> bool {
8266 self.is_extension.is_some()
8267 }
8268
8269 // Param is passed by value, moved
8270 pub fn set_is_extension(&mut self, v: bool) {
8271 self.is_extension = ::std::option::Option::Some(v);
8272 }
8273}
8274
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008275impl crate::Message for UninterpretedOption_NamePart {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008276 fn is_initialized(&self) -> bool {
8277 if self.name_part.is_none() {
8278 return false;
8279 }
8280 if self.is_extension.is_none() {
8281 return false;
8282 }
8283 true
8284 }
8285
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008286 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008287 while !is.eof()? {
8288 let (field_number, wire_type) = is.read_tag_unpack()?;
8289 match field_number {
8290 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008291 crate::rt::read_singular_string_into(wire_type, is, &mut self.name_part)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008292 },
8293 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008294 if wire_type != crate::wire_format::WireTypeVarint {
8295 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008296 }
8297 let tmp = is.read_bool()?;
8298 self.is_extension = ::std::option::Option::Some(tmp);
8299 },
8300 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008301 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008302 },
8303 };
8304 }
8305 ::std::result::Result::Ok(())
8306 }
8307
8308 // Compute sizes of nested messages
8309 #[allow(unused_variables)]
8310 fn compute_size(&self) -> u32 {
8311 let mut my_size = 0;
8312 if let Some(ref v) = self.name_part.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008313 my_size += crate::rt::string_size(1, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008314 }
8315 if let Some(v) = self.is_extension {
8316 my_size += 2;
8317 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008318 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008319 self.cached_size.set(my_size);
8320 my_size
8321 }
8322
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008323 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008324 if let Some(ref v) = self.name_part.as_ref() {
8325 os.write_string(1, &v)?;
8326 }
8327 if let Some(v) = self.is_extension {
8328 os.write_bool(2, v)?;
8329 }
8330 os.write_unknown_fields(self.get_unknown_fields())?;
8331 ::std::result::Result::Ok(())
8332 }
8333
8334 fn get_cached_size(&self) -> u32 {
8335 self.cached_size.get()
8336 }
8337
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008338 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008339 &self.unknown_fields
8340 }
8341
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008342 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008343 &mut self.unknown_fields
8344 }
8345
8346 fn as_any(&self) -> &dyn (::std::any::Any) {
8347 self as &dyn (::std::any::Any)
8348 }
8349 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
8350 self as &mut dyn (::std::any::Any)
8351 }
Haibo Huang52aa7852020-07-10 20:23:55 -07008352 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008353 self
8354 }
8355
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008356 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008357 Self::descriptor_static()
8358 }
8359
8360 fn new() -> UninterpretedOption_NamePart {
8361 UninterpretedOption_NamePart::new()
8362 }
8363
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008364 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
8365 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008366 descriptor.get(|| {
8367 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008368 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008369 "name_part",
8370 |m: &UninterpretedOption_NamePart| { &m.name_part },
8371 |m: &mut UninterpretedOption_NamePart| { &mut m.name_part },
8372 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008373 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeBool>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008374 "is_extension",
8375 |m: &UninterpretedOption_NamePart| { &m.is_extension },
8376 |m: &mut UninterpretedOption_NamePart| { &mut m.is_extension },
8377 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008378 crate::reflect::MessageDescriptor::new_pb_name::<UninterpretedOption_NamePart>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008379 "UninterpretedOption.NamePart",
8380 fields,
8381 file_descriptor_proto()
8382 )
8383 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008384 }
8385
8386 fn default_instance() -> &'static UninterpretedOption_NamePart {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008387 static instance: crate::rt::LazyV2<UninterpretedOption_NamePart> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008388 instance.get(UninterpretedOption_NamePart::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008389 }
8390}
8391
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008392impl crate::Clear for UninterpretedOption_NamePart {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008393 fn clear(&mut self) {
8394 self.name_part.clear();
8395 self.is_extension = ::std::option::Option::None;
8396 self.unknown_fields.clear();
8397 }
8398}
8399
8400impl ::std::fmt::Debug for UninterpretedOption_NamePart {
8401 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008402 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008403 }
8404}
8405
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008406impl crate::reflect::ProtobufValue for UninterpretedOption_NamePart {
8407 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
8408 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008409 }
8410}
8411
8412#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08008413#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008414pub struct SourceCodeInfo {
8415 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008416 pub location: crate::RepeatedField<SourceCodeInfo_Location>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008417 // special fields
8418 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008419 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008420 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008421 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008422}
8423
8424impl<'a> ::std::default::Default for &'a SourceCodeInfo {
8425 fn default() -> &'a SourceCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008426 <SourceCodeInfo as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008427 }
8428}
8429
8430impl SourceCodeInfo {
8431 pub fn new() -> SourceCodeInfo {
8432 ::std::default::Default::default()
8433 }
8434
8435 // repeated .google.protobuf.SourceCodeInfo.Location location = 1;
8436
8437
8438 pub fn get_location(&self) -> &[SourceCodeInfo_Location] {
8439 &self.location
8440 }
8441 pub fn clear_location(&mut self) {
8442 self.location.clear();
8443 }
8444
8445 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008446 pub fn set_location(&mut self, v: crate::RepeatedField<SourceCodeInfo_Location>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008447 self.location = v;
8448 }
8449
8450 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008451 pub fn mut_location(&mut self) -> &mut crate::RepeatedField<SourceCodeInfo_Location> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008452 &mut self.location
8453 }
8454
8455 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008456 pub fn take_location(&mut self) -> crate::RepeatedField<SourceCodeInfo_Location> {
8457 ::std::mem::replace(&mut self.location, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008458 }
8459}
8460
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008461impl crate::Message for SourceCodeInfo {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008462 fn is_initialized(&self) -> bool {
8463 for v in &self.location {
8464 if !v.is_initialized() {
8465 return false;
8466 }
8467 };
8468 true
8469 }
8470
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008471 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008472 while !is.eof()? {
8473 let (field_number, wire_type) = is.read_tag_unpack()?;
8474 match field_number {
8475 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008476 crate::rt::read_repeated_message_into(wire_type, is, &mut self.location)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008477 },
8478 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008479 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008480 },
8481 };
8482 }
8483 ::std::result::Result::Ok(())
8484 }
8485
8486 // Compute sizes of nested messages
8487 #[allow(unused_variables)]
8488 fn compute_size(&self) -> u32 {
8489 let mut my_size = 0;
8490 for value in &self.location {
8491 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008492 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008493 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008494 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008495 self.cached_size.set(my_size);
8496 my_size
8497 }
8498
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008499 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008500 for v in &self.location {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008501 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008502 os.write_raw_varint32(v.get_cached_size())?;
8503 v.write_to_with_cached_sizes(os)?;
8504 };
8505 os.write_unknown_fields(self.get_unknown_fields())?;
8506 ::std::result::Result::Ok(())
8507 }
8508
8509 fn get_cached_size(&self) -> u32 {
8510 self.cached_size.get()
8511 }
8512
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008513 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008514 &self.unknown_fields
8515 }
8516
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008517 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008518 &mut self.unknown_fields
8519 }
8520
8521 fn as_any(&self) -> &dyn (::std::any::Any) {
8522 self as &dyn (::std::any::Any)
8523 }
8524 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
8525 self as &mut dyn (::std::any::Any)
8526 }
Haibo Huang52aa7852020-07-10 20:23:55 -07008527 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008528 self
8529 }
8530
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008531 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008532 Self::descriptor_static()
8533 }
8534
8535 fn new() -> SourceCodeInfo {
8536 SourceCodeInfo::new()
8537 }
8538
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008539 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
8540 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008541 descriptor.get(|| {
8542 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008543 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<SourceCodeInfo_Location>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008544 "location",
8545 |m: &SourceCodeInfo| { &m.location },
8546 |m: &mut SourceCodeInfo| { &mut m.location },
8547 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008548 crate::reflect::MessageDescriptor::new_pb_name::<SourceCodeInfo>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008549 "SourceCodeInfo",
8550 fields,
8551 file_descriptor_proto()
8552 )
8553 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008554 }
8555
8556 fn default_instance() -> &'static SourceCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008557 static instance: crate::rt::LazyV2<SourceCodeInfo> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008558 instance.get(SourceCodeInfo::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008559 }
8560}
8561
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008562impl crate::Clear for SourceCodeInfo {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008563 fn clear(&mut self) {
8564 self.location.clear();
8565 self.unknown_fields.clear();
8566 }
8567}
8568
8569impl ::std::fmt::Debug for SourceCodeInfo {
8570 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008571 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008572 }
8573}
8574
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008575impl crate::reflect::ProtobufValue for SourceCodeInfo {
8576 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
8577 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008578 }
8579}
8580
8581#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08008582#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008583pub struct SourceCodeInfo_Location {
8584 // message fields
Haibo Huang52aa7852020-07-10 20:23:55 -07008585 pub path: ::std::vec::Vec<i32>,
8586 pub span: ::std::vec::Vec<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008587 leading_comments: crate::SingularField<::std::string::String>,
8588 trailing_comments: crate::SingularField<::std::string::String>,
8589 pub leading_detached_comments: crate::RepeatedField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008590 // special fields
8591 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008592 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008593 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008594 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008595}
8596
8597impl<'a> ::std::default::Default for &'a SourceCodeInfo_Location {
8598 fn default() -> &'a SourceCodeInfo_Location {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008599 <SourceCodeInfo_Location as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008600 }
8601}
8602
8603impl SourceCodeInfo_Location {
8604 pub fn new() -> SourceCodeInfo_Location {
8605 ::std::default::Default::default()
8606 }
8607
8608 // repeated int32 path = 1;
8609
8610
8611 pub fn get_path(&self) -> &[i32] {
8612 &self.path
8613 }
8614 pub fn clear_path(&mut self) {
8615 self.path.clear();
8616 }
8617
8618 // Param is passed by value, moved
8619 pub fn set_path(&mut self, v: ::std::vec::Vec<i32>) {
8620 self.path = v;
8621 }
8622
8623 // Mutable pointer to the field.
8624 pub fn mut_path(&mut self) -> &mut ::std::vec::Vec<i32> {
8625 &mut self.path
8626 }
8627
8628 // Take field
8629 pub fn take_path(&mut self) -> ::std::vec::Vec<i32> {
8630 ::std::mem::replace(&mut self.path, ::std::vec::Vec::new())
8631 }
8632
8633 // repeated int32 span = 2;
8634
8635
8636 pub fn get_span(&self) -> &[i32] {
8637 &self.span
8638 }
8639 pub fn clear_span(&mut self) {
8640 self.span.clear();
8641 }
8642
8643 // Param is passed by value, moved
8644 pub fn set_span(&mut self, v: ::std::vec::Vec<i32>) {
8645 self.span = v;
8646 }
8647
8648 // Mutable pointer to the field.
8649 pub fn mut_span(&mut self) -> &mut ::std::vec::Vec<i32> {
8650 &mut self.span
8651 }
8652
8653 // Take field
8654 pub fn take_span(&mut self) -> ::std::vec::Vec<i32> {
8655 ::std::mem::replace(&mut self.span, ::std::vec::Vec::new())
8656 }
8657
8658 // optional string leading_comments = 3;
8659
8660
8661 pub fn get_leading_comments(&self) -> &str {
8662 match self.leading_comments.as_ref() {
8663 Some(v) => &v,
8664 None => "",
8665 }
8666 }
8667 pub fn clear_leading_comments(&mut self) {
8668 self.leading_comments.clear();
8669 }
8670
8671 pub fn has_leading_comments(&self) -> bool {
8672 self.leading_comments.is_some()
8673 }
8674
8675 // Param is passed by value, moved
8676 pub fn set_leading_comments(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008677 self.leading_comments = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008678 }
8679
8680 // Mutable pointer to the field.
8681 // If field is not initialized, it is initialized with default value first.
8682 pub fn mut_leading_comments(&mut self) -> &mut ::std::string::String {
8683 if self.leading_comments.is_none() {
8684 self.leading_comments.set_default();
8685 }
8686 self.leading_comments.as_mut().unwrap()
8687 }
8688
8689 // Take field
8690 pub fn take_leading_comments(&mut self) -> ::std::string::String {
8691 self.leading_comments.take().unwrap_or_else(|| ::std::string::String::new())
8692 }
8693
8694 // optional string trailing_comments = 4;
8695
8696
8697 pub fn get_trailing_comments(&self) -> &str {
8698 match self.trailing_comments.as_ref() {
8699 Some(v) => &v,
8700 None => "",
8701 }
8702 }
8703 pub fn clear_trailing_comments(&mut self) {
8704 self.trailing_comments.clear();
8705 }
8706
8707 pub fn has_trailing_comments(&self) -> bool {
8708 self.trailing_comments.is_some()
8709 }
8710
8711 // Param is passed by value, moved
8712 pub fn set_trailing_comments(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008713 self.trailing_comments = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008714 }
8715
8716 // Mutable pointer to the field.
8717 // If field is not initialized, it is initialized with default value first.
8718 pub fn mut_trailing_comments(&mut self) -> &mut ::std::string::String {
8719 if self.trailing_comments.is_none() {
8720 self.trailing_comments.set_default();
8721 }
8722 self.trailing_comments.as_mut().unwrap()
8723 }
8724
8725 // Take field
8726 pub fn take_trailing_comments(&mut self) -> ::std::string::String {
8727 self.trailing_comments.take().unwrap_or_else(|| ::std::string::String::new())
8728 }
8729
8730 // repeated string leading_detached_comments = 6;
8731
8732
8733 pub fn get_leading_detached_comments(&self) -> &[::std::string::String] {
8734 &self.leading_detached_comments
8735 }
8736 pub fn clear_leading_detached_comments(&mut self) {
8737 self.leading_detached_comments.clear();
8738 }
8739
8740 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008741 pub fn set_leading_detached_comments(&mut self, v: crate::RepeatedField<::std::string::String>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008742 self.leading_detached_comments = v;
8743 }
8744
8745 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008746 pub fn mut_leading_detached_comments(&mut self) -> &mut crate::RepeatedField<::std::string::String> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008747 &mut self.leading_detached_comments
8748 }
8749
8750 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008751 pub fn take_leading_detached_comments(&mut self) -> crate::RepeatedField<::std::string::String> {
8752 ::std::mem::replace(&mut self.leading_detached_comments, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008753 }
8754}
8755
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008756impl crate::Message for SourceCodeInfo_Location {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008757 fn is_initialized(&self) -> bool {
8758 true
8759 }
8760
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008761 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008762 while !is.eof()? {
8763 let (field_number, wire_type) = is.read_tag_unpack()?;
8764 match field_number {
8765 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008766 crate::rt::read_repeated_int32_into(wire_type, is, &mut self.path)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008767 },
8768 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008769 crate::rt::read_repeated_int32_into(wire_type, is, &mut self.span)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008770 },
8771 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008772 crate::rt::read_singular_string_into(wire_type, is, &mut self.leading_comments)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008773 },
8774 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008775 crate::rt::read_singular_string_into(wire_type, is, &mut self.trailing_comments)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008776 },
8777 6 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008778 crate::rt::read_repeated_string_into(wire_type, is, &mut self.leading_detached_comments)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008779 },
8780 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008781 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008782 },
8783 };
8784 }
8785 ::std::result::Result::Ok(())
8786 }
8787
8788 // Compute sizes of nested messages
8789 #[allow(unused_variables)]
8790 fn compute_size(&self) -> u32 {
8791 let mut my_size = 0;
8792 if !self.path.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008793 my_size += crate::rt::vec_packed_varint_size(1, &self.path);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008794 }
8795 if !self.span.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008796 my_size += crate::rt::vec_packed_varint_size(2, &self.span);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008797 }
8798 if let Some(ref v) = self.leading_comments.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008799 my_size += crate::rt::string_size(3, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008800 }
8801 if let Some(ref v) = self.trailing_comments.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008802 my_size += crate::rt::string_size(4, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008803 }
8804 for value in &self.leading_detached_comments {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008805 my_size += crate::rt::string_size(6, &value);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008806 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008807 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008808 self.cached_size.set(my_size);
8809 my_size
8810 }
8811
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008812 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008813 if !self.path.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008814 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008815 // TODO: Data size is computed again, it should be cached
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008816 os.write_raw_varint32(crate::rt::vec_packed_varint_data_size(&self.path))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008817 for v in &self.path {
8818 os.write_int32_no_tag(*v)?;
8819 };
8820 }
8821 if !self.span.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008822 os.write_tag(2, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008823 // TODO: Data size is computed again, it should be cached
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008824 os.write_raw_varint32(crate::rt::vec_packed_varint_data_size(&self.span))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008825 for v in &self.span {
8826 os.write_int32_no_tag(*v)?;
8827 };
8828 }
8829 if let Some(ref v) = self.leading_comments.as_ref() {
8830 os.write_string(3, &v)?;
8831 }
8832 if let Some(ref v) = self.trailing_comments.as_ref() {
8833 os.write_string(4, &v)?;
8834 }
8835 for v in &self.leading_detached_comments {
8836 os.write_string(6, &v)?;
8837 };
8838 os.write_unknown_fields(self.get_unknown_fields())?;
8839 ::std::result::Result::Ok(())
8840 }
8841
8842 fn get_cached_size(&self) -> u32 {
8843 self.cached_size.get()
8844 }
8845
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008846 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008847 &self.unknown_fields
8848 }
8849
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008850 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008851 &mut self.unknown_fields
8852 }
8853
8854 fn as_any(&self) -> &dyn (::std::any::Any) {
8855 self as &dyn (::std::any::Any)
8856 }
8857 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
8858 self as &mut dyn (::std::any::Any)
8859 }
Haibo Huang52aa7852020-07-10 20:23:55 -07008860 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008861 self
8862 }
8863
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008864 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008865 Self::descriptor_static()
8866 }
8867
8868 fn new() -> SourceCodeInfo_Location {
8869 SourceCodeInfo_Location::new()
8870 }
8871
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008872 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
8873 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008874 descriptor.get(|| {
8875 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008876 fields.push(crate::reflect::accessor::make_vec_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008877 "path",
8878 |m: &SourceCodeInfo_Location| { &m.path },
8879 |m: &mut SourceCodeInfo_Location| { &mut m.path },
8880 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008881 fields.push(crate::reflect::accessor::make_vec_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008882 "span",
8883 |m: &SourceCodeInfo_Location| { &m.span },
8884 |m: &mut SourceCodeInfo_Location| { &mut m.span },
8885 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008886 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008887 "leading_comments",
8888 |m: &SourceCodeInfo_Location| { &m.leading_comments },
8889 |m: &mut SourceCodeInfo_Location| { &mut m.leading_comments },
8890 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008891 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008892 "trailing_comments",
8893 |m: &SourceCodeInfo_Location| { &m.trailing_comments },
8894 |m: &mut SourceCodeInfo_Location| { &mut m.trailing_comments },
8895 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008896 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008897 "leading_detached_comments",
8898 |m: &SourceCodeInfo_Location| { &m.leading_detached_comments },
8899 |m: &mut SourceCodeInfo_Location| { &mut m.leading_detached_comments },
8900 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008901 crate::reflect::MessageDescriptor::new_pb_name::<SourceCodeInfo_Location>(
Haibo Huang52aa7852020-07-10 20:23:55 -07008902 "SourceCodeInfo.Location",
8903 fields,
8904 file_descriptor_proto()
8905 )
8906 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008907 }
8908
8909 fn default_instance() -> &'static SourceCodeInfo_Location {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008910 static instance: crate::rt::LazyV2<SourceCodeInfo_Location> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07008911 instance.get(SourceCodeInfo_Location::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008912 }
8913}
8914
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008915impl crate::Clear for SourceCodeInfo_Location {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008916 fn clear(&mut self) {
8917 self.path.clear();
8918 self.span.clear();
8919 self.leading_comments.clear();
8920 self.trailing_comments.clear();
8921 self.leading_detached_comments.clear();
8922 self.unknown_fields.clear();
8923 }
8924}
8925
8926impl ::std::fmt::Debug for SourceCodeInfo_Location {
8927 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008928 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008929 }
8930}
8931
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008932impl crate::reflect::ProtobufValue for SourceCodeInfo_Location {
8933 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
8934 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008935 }
8936}
8937
8938#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08008939#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008940pub struct GeneratedCodeInfo {
8941 // message fields
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008942 pub annotation: crate::RepeatedField<GeneratedCodeInfo_Annotation>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008943 // special fields
8944 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008945 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008946 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008947 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008948}
8949
8950impl<'a> ::std::default::Default for &'a GeneratedCodeInfo {
8951 fn default() -> &'a GeneratedCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008952 <GeneratedCodeInfo as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008953 }
8954}
8955
8956impl GeneratedCodeInfo {
8957 pub fn new() -> GeneratedCodeInfo {
8958 ::std::default::Default::default()
8959 }
8960
8961 // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
8962
8963
8964 pub fn get_annotation(&self) -> &[GeneratedCodeInfo_Annotation] {
8965 &self.annotation
8966 }
8967 pub fn clear_annotation(&mut self) {
8968 self.annotation.clear();
8969 }
8970
8971 // Param is passed by value, moved
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008972 pub fn set_annotation(&mut self, v: crate::RepeatedField<GeneratedCodeInfo_Annotation>) {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008973 self.annotation = v;
8974 }
8975
8976 // Mutable pointer to the field.
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008977 pub fn mut_annotation(&mut self) -> &mut crate::RepeatedField<GeneratedCodeInfo_Annotation> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008978 &mut self.annotation
8979 }
8980
8981 // Take field
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008982 pub fn take_annotation(&mut self) -> crate::RepeatedField<GeneratedCodeInfo_Annotation> {
8983 ::std::mem::replace(&mut self.annotation, crate::RepeatedField::new())
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008984 }
8985}
8986
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008987impl crate::Message for GeneratedCodeInfo {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008988 fn is_initialized(&self) -> bool {
8989 for v in &self.annotation {
8990 if !v.is_initialized() {
8991 return false;
8992 }
8993 };
8994 true
8995 }
8996
Haibo Huangd32e6ee2020-08-12 13:52:04 -07008997 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07008998 while !is.eof()? {
8999 let (field_number, wire_type) = is.read_tag_unpack()?;
9000 match field_number {
9001 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009002 crate::rt::read_repeated_message_into(wire_type, is, &mut self.annotation)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009003 },
9004 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009005 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009006 },
9007 };
9008 }
9009 ::std::result::Result::Ok(())
9010 }
9011
9012 // Compute sizes of nested messages
9013 #[allow(unused_variables)]
9014 fn compute_size(&self) -> u32 {
9015 let mut my_size = 0;
9016 for value in &self.annotation {
9017 let len = value.compute_size();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009018 my_size += 1 + crate::rt::compute_raw_varint32_size(len) + len;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009019 };
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009020 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009021 self.cached_size.set(my_size);
9022 my_size
9023 }
9024
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009025 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009026 for v in &self.annotation {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009027 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009028 os.write_raw_varint32(v.get_cached_size())?;
9029 v.write_to_with_cached_sizes(os)?;
9030 };
9031 os.write_unknown_fields(self.get_unknown_fields())?;
9032 ::std::result::Result::Ok(())
9033 }
9034
9035 fn get_cached_size(&self) -> u32 {
9036 self.cached_size.get()
9037 }
9038
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009039 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009040 &self.unknown_fields
9041 }
9042
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009043 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009044 &mut self.unknown_fields
9045 }
9046
9047 fn as_any(&self) -> &dyn (::std::any::Any) {
9048 self as &dyn (::std::any::Any)
9049 }
9050 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
9051 self as &mut dyn (::std::any::Any)
9052 }
Haibo Huang52aa7852020-07-10 20:23:55 -07009053 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009054 self
9055 }
9056
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009057 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009058 Self::descriptor_static()
9059 }
9060
9061 fn new() -> GeneratedCodeInfo {
9062 GeneratedCodeInfo::new()
9063 }
9064
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009065 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
9066 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07009067 descriptor.get(|| {
9068 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009069 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeMessage<GeneratedCodeInfo_Annotation>>(
Haibo Huang52aa7852020-07-10 20:23:55 -07009070 "annotation",
9071 |m: &GeneratedCodeInfo| { &m.annotation },
9072 |m: &mut GeneratedCodeInfo| { &mut m.annotation },
9073 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009074 crate::reflect::MessageDescriptor::new_pb_name::<GeneratedCodeInfo>(
Haibo Huang52aa7852020-07-10 20:23:55 -07009075 "GeneratedCodeInfo",
9076 fields,
9077 file_descriptor_proto()
9078 )
9079 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009080 }
9081
9082 fn default_instance() -> &'static GeneratedCodeInfo {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009083 static instance: crate::rt::LazyV2<GeneratedCodeInfo> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07009084 instance.get(GeneratedCodeInfo::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009085 }
9086}
9087
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009088impl crate::Clear for GeneratedCodeInfo {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009089 fn clear(&mut self) {
9090 self.annotation.clear();
9091 self.unknown_fields.clear();
9092 }
9093}
9094
9095impl ::std::fmt::Debug for GeneratedCodeInfo {
9096 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009097 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009098 }
9099}
9100
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009101impl crate::reflect::ProtobufValue for GeneratedCodeInfo {
9102 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
9103 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009104 }
9105}
9106
9107#[derive(PartialEq,Clone,Default)]
Haibo Huangca95bfd2021-02-09 17:48:30 -08009108#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009109pub struct GeneratedCodeInfo_Annotation {
9110 // message fields
Haibo Huang52aa7852020-07-10 20:23:55 -07009111 pub path: ::std::vec::Vec<i32>,
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009112 source_file: crate::SingularField<::std::string::String>,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009113 begin: ::std::option::Option<i32>,
9114 end: ::std::option::Option<i32>,
9115 // special fields
9116 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009117 pub unknown_fields: crate::UnknownFields,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009118 #[cfg_attr(feature = "with-serde", serde(skip))]
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009119 pub cached_size: crate::CachedSize,
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009120}
9121
9122impl<'a> ::std::default::Default for &'a GeneratedCodeInfo_Annotation {
9123 fn default() -> &'a GeneratedCodeInfo_Annotation {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009124 <GeneratedCodeInfo_Annotation as crate::Message>::default_instance()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009125 }
9126}
9127
9128impl GeneratedCodeInfo_Annotation {
9129 pub fn new() -> GeneratedCodeInfo_Annotation {
9130 ::std::default::Default::default()
9131 }
9132
9133 // repeated int32 path = 1;
9134
9135
9136 pub fn get_path(&self) -> &[i32] {
9137 &self.path
9138 }
9139 pub fn clear_path(&mut self) {
9140 self.path.clear();
9141 }
9142
9143 // Param is passed by value, moved
9144 pub fn set_path(&mut self, v: ::std::vec::Vec<i32>) {
9145 self.path = v;
9146 }
9147
9148 // Mutable pointer to the field.
9149 pub fn mut_path(&mut self) -> &mut ::std::vec::Vec<i32> {
9150 &mut self.path
9151 }
9152
9153 // Take field
9154 pub fn take_path(&mut self) -> ::std::vec::Vec<i32> {
9155 ::std::mem::replace(&mut self.path, ::std::vec::Vec::new())
9156 }
9157
9158 // optional string source_file = 2;
9159
9160
9161 pub fn get_source_file(&self) -> &str {
9162 match self.source_file.as_ref() {
9163 Some(v) => &v,
9164 None => "",
9165 }
9166 }
9167 pub fn clear_source_file(&mut self) {
9168 self.source_file.clear();
9169 }
9170
9171 pub fn has_source_file(&self) -> bool {
9172 self.source_file.is_some()
9173 }
9174
9175 // Param is passed by value, moved
9176 pub fn set_source_file(&mut self, v: ::std::string::String) {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009177 self.source_file = crate::SingularField::some(v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009178 }
9179
9180 // Mutable pointer to the field.
9181 // If field is not initialized, it is initialized with default value first.
9182 pub fn mut_source_file(&mut self) -> &mut ::std::string::String {
9183 if self.source_file.is_none() {
9184 self.source_file.set_default();
9185 }
9186 self.source_file.as_mut().unwrap()
9187 }
9188
9189 // Take field
9190 pub fn take_source_file(&mut self) -> ::std::string::String {
9191 self.source_file.take().unwrap_or_else(|| ::std::string::String::new())
9192 }
9193
9194 // optional int32 begin = 3;
9195
9196
9197 pub fn get_begin(&self) -> i32 {
9198 self.begin.unwrap_or(0)
9199 }
9200 pub fn clear_begin(&mut self) {
9201 self.begin = ::std::option::Option::None;
9202 }
9203
9204 pub fn has_begin(&self) -> bool {
9205 self.begin.is_some()
9206 }
9207
9208 // Param is passed by value, moved
9209 pub fn set_begin(&mut self, v: i32) {
9210 self.begin = ::std::option::Option::Some(v);
9211 }
9212
9213 // optional int32 end = 4;
9214
9215
9216 pub fn get_end(&self) -> i32 {
9217 self.end.unwrap_or(0)
9218 }
9219 pub fn clear_end(&mut self) {
9220 self.end = ::std::option::Option::None;
9221 }
9222
9223 pub fn has_end(&self) -> bool {
9224 self.end.is_some()
9225 }
9226
9227 // Param is passed by value, moved
9228 pub fn set_end(&mut self, v: i32) {
9229 self.end = ::std::option::Option::Some(v);
9230 }
9231}
9232
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009233impl crate::Message for GeneratedCodeInfo_Annotation {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009234 fn is_initialized(&self) -> bool {
9235 true
9236 }
9237
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009238 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009239 while !is.eof()? {
9240 let (field_number, wire_type) = is.read_tag_unpack()?;
9241 match field_number {
9242 1 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009243 crate::rt::read_repeated_int32_into(wire_type, is, &mut self.path)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009244 },
9245 2 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009246 crate::rt::read_singular_string_into(wire_type, is, &mut self.source_file)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009247 },
9248 3 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009249 if wire_type != crate::wire_format::WireTypeVarint {
9250 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009251 }
9252 let tmp = is.read_int32()?;
9253 self.begin = ::std::option::Option::Some(tmp);
9254 },
9255 4 => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009256 if wire_type != crate::wire_format::WireTypeVarint {
9257 return ::std::result::Result::Err(crate::rt::unexpected_wire_type(wire_type));
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009258 }
9259 let tmp = is.read_int32()?;
9260 self.end = ::std::option::Option::Some(tmp);
9261 },
9262 _ => {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009263 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009264 },
9265 };
9266 }
9267 ::std::result::Result::Ok(())
9268 }
9269
9270 // Compute sizes of nested messages
9271 #[allow(unused_variables)]
9272 fn compute_size(&self) -> u32 {
9273 let mut my_size = 0;
9274 if !self.path.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009275 my_size += crate::rt::vec_packed_varint_size(1, &self.path);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009276 }
9277 if let Some(ref v) = self.source_file.as_ref() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009278 my_size += crate::rt::string_size(2, &v);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009279 }
9280 if let Some(v) = self.begin {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009281 my_size += crate::rt::value_size(3, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009282 }
9283 if let Some(v) = self.end {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009284 my_size += crate::rt::value_size(4, v, crate::wire_format::WireTypeVarint);
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009285 }
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009286 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009287 self.cached_size.set(my_size);
9288 my_size
9289 }
9290
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009291 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009292 if !self.path.is_empty() {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009293 os.write_tag(1, crate::wire_format::WireTypeLengthDelimited)?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009294 // TODO: Data size is computed again, it should be cached
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009295 os.write_raw_varint32(crate::rt::vec_packed_varint_data_size(&self.path))?;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009296 for v in &self.path {
9297 os.write_int32_no_tag(*v)?;
9298 };
9299 }
9300 if let Some(ref v) = self.source_file.as_ref() {
9301 os.write_string(2, &v)?;
9302 }
9303 if let Some(v) = self.begin {
9304 os.write_int32(3, v)?;
9305 }
9306 if let Some(v) = self.end {
9307 os.write_int32(4, v)?;
9308 }
9309 os.write_unknown_fields(self.get_unknown_fields())?;
9310 ::std::result::Result::Ok(())
9311 }
9312
9313 fn get_cached_size(&self) -> u32 {
9314 self.cached_size.get()
9315 }
9316
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009317 fn get_unknown_fields(&self) -> &crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009318 &self.unknown_fields
9319 }
9320
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009321 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009322 &mut self.unknown_fields
9323 }
9324
9325 fn as_any(&self) -> &dyn (::std::any::Any) {
9326 self as &dyn (::std::any::Any)
9327 }
9328 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
9329 self as &mut dyn (::std::any::Any)
9330 }
Haibo Huang52aa7852020-07-10 20:23:55 -07009331 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009332 self
9333 }
9334
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009335 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009336 Self::descriptor_static()
9337 }
9338
9339 fn new() -> GeneratedCodeInfo_Annotation {
9340 GeneratedCodeInfo_Annotation::new()
9341 }
9342
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009343 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
9344 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07009345 descriptor.get(|| {
9346 let mut fields = ::std::vec::Vec::new();
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009347 fields.push(crate::reflect::accessor::make_vec_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07009348 "path",
9349 |m: &GeneratedCodeInfo_Annotation| { &m.path },
9350 |m: &mut GeneratedCodeInfo_Annotation| { &mut m.path },
9351 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009352 fields.push(crate::reflect::accessor::make_singular_field_accessor::<_, crate::types::ProtobufTypeString>(
Haibo Huang52aa7852020-07-10 20:23:55 -07009353 "source_file",
9354 |m: &GeneratedCodeInfo_Annotation| { &m.source_file },
9355 |m: &mut GeneratedCodeInfo_Annotation| { &mut m.source_file },
9356 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009357 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07009358 "begin",
9359 |m: &GeneratedCodeInfo_Annotation| { &m.begin },
9360 |m: &mut GeneratedCodeInfo_Annotation| { &mut m.begin },
9361 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009362 fields.push(crate::reflect::accessor::make_option_accessor::<_, crate::types::ProtobufTypeInt32>(
Haibo Huang52aa7852020-07-10 20:23:55 -07009363 "end",
9364 |m: &GeneratedCodeInfo_Annotation| { &m.end },
9365 |m: &mut GeneratedCodeInfo_Annotation| { &mut m.end },
9366 ));
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009367 crate::reflect::MessageDescriptor::new_pb_name::<GeneratedCodeInfo_Annotation>(
Haibo Huang52aa7852020-07-10 20:23:55 -07009368 "GeneratedCodeInfo.Annotation",
9369 fields,
9370 file_descriptor_proto()
9371 )
9372 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009373 }
9374
9375 fn default_instance() -> &'static GeneratedCodeInfo_Annotation {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009376 static instance: crate::rt::LazyV2<GeneratedCodeInfo_Annotation> = crate::rt::LazyV2::INIT;
Haibo Huang52aa7852020-07-10 20:23:55 -07009377 instance.get(GeneratedCodeInfo_Annotation::new)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009378 }
9379}
9380
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009381impl crate::Clear for GeneratedCodeInfo_Annotation {
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009382 fn clear(&mut self) {
9383 self.path.clear();
9384 self.source_file.clear();
9385 self.begin = ::std::option::Option::None;
9386 self.end = ::std::option::Option::None;
9387 self.unknown_fields.clear();
9388 }
9389}
9390
9391impl ::std::fmt::Debug for GeneratedCodeInfo_Annotation {
9392 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009393 crate::text_format::fmt(self, f)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009394 }
9395}
9396
Haibo Huangd32e6ee2020-08-12 13:52:04 -07009397impl crate::reflect::ProtobufValue for GeneratedCodeInfo_Annotation {
9398 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
9399 crate::reflect::ReflectValueRef::Message(self)
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009400 }
9401}
9402
9403static file_descriptor_proto_data: &'static [u8] = b"\
9404 \n\x20google/protobuf/descriptor.proto\x12\x0fgoogle.protobuf\"M\n\x11Fi\
9405 leDescriptorSet\x128\n\x04file\x18\x01\x20\x03(\x0b2$.google.protobuf.Fi\
9406 leDescriptorProtoR\x04file\"\xe4\x04\n\x13FileDescriptorProto\x12\x12\n\
9407 \x04name\x18\x01\x20\x01(\tR\x04name\x12\x18\n\x07package\x18\x02\x20\
9408 \x01(\tR\x07package\x12\x1e\n\ndependency\x18\x03\x20\x03(\tR\ndependenc\
9409 y\x12+\n\x11public_dependency\x18\n\x20\x03(\x05R\x10publicDependency\
9410 \x12'\n\x0fweak_dependency\x18\x0b\x20\x03(\x05R\x0eweakDependency\x12C\
9411 \n\x0cmessage_type\x18\x04\x20\x03(\x0b2\x20.google.protobuf.DescriptorP\
9412 rotoR\x0bmessageType\x12A\n\tenum_type\x18\x05\x20\x03(\x0b2$.google.pro\
9413 tobuf.EnumDescriptorProtoR\x08enumType\x12A\n\x07service\x18\x06\x20\x03\
9414 (\x0b2'.google.protobuf.ServiceDescriptorProtoR\x07service\x12C\n\texten\
9415 sion\x18\x07\x20\x03(\x0b2%.google.protobuf.FieldDescriptorProtoR\texten\
9416 sion\x126\n\x07options\x18\x08\x20\x01(\x0b2\x1c.google.protobuf.FileOpt\
9417 ionsR\x07options\x12I\n\x10source_code_info\x18\t\x20\x01(\x0b2\x1f.goog\
9418 le.protobuf.SourceCodeInfoR\x0esourceCodeInfo\x12\x16\n\x06syntax\x18\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009419 \x0c\x20\x01(\tR\x06syntax\"\xb9\x06\n\x0fDescriptorProto\x12\x12\n\x04n\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009420 ame\x18\x01\x20\x01(\tR\x04name\x12;\n\x05field\x18\x02\x20\x03(\x0b2%.g\
9421 oogle.protobuf.FieldDescriptorProtoR\x05field\x12C\n\textension\x18\x06\
9422 \x20\x03(\x0b2%.google.protobuf.FieldDescriptorProtoR\textension\x12A\n\
9423 \x0bnested_type\x18\x03\x20\x03(\x0b2\x20.google.protobuf.DescriptorProt\
9424 oR\nnestedType\x12A\n\tenum_type\x18\x04\x20\x03(\x0b2$.google.protobuf.\
9425 EnumDescriptorProtoR\x08enumType\x12X\n\x0fextension_range\x18\x05\x20\
9426 \x03(\x0b2/.google.protobuf.DescriptorProto.ExtensionRangeR\x0eextension\
9427 Range\x12D\n\noneof_decl\x18\x08\x20\x03(\x0b2%.google.protobuf.OneofDes\
9428 criptorProtoR\toneofDecl\x129\n\x07options\x18\x07\x20\x01(\x0b2\x1f.goo\
9429 gle.protobuf.MessageOptionsR\x07options\x12U\n\x0ereserved_range\x18\t\
9430 \x20\x03(\x0b2..google.protobuf.DescriptorProto.ReservedRangeR\rreserved\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009431 Range\x12#\n\rreserved_name\x18\n\x20\x03(\tR\x0creservedName\x1az\n\x0e\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009432 ExtensionRange\x12\x14\n\x05start\x18\x01\x20\x01(\x05R\x05start\x12\x10\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009433 \n\x03end\x18\x02\x20\x01(\x05R\x03end\x12@\n\x07options\x18\x03\x20\x01\
9434 (\x0b2&.google.protobuf.ExtensionRangeOptionsR\x07options\x1a7\n\rReserv\
9435 edRange\x12\x14\n\x05start\x18\x01\x20\x01(\x05R\x05start\x12\x10\n\x03e\
9436 nd\x18\x02\x20\x01(\x05R\x03end\"|\n\x15ExtensionRangeOptions\x12X\n\x14\
9437 uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.Uninterp\
9438 retedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\
9439 \x02\"\xc1\x06\n\x14FieldDescriptorProto\x12\x12\n\x04name\x18\x01\x20\
9440 \x01(\tR\x04name\x12\x16\n\x06number\x18\x03\x20\x01(\x05R\x06number\x12\
9441 A\n\x05label\x18\x04\x20\x01(\x0e2+.google.protobuf.FieldDescriptorProto\
9442 .LabelR\x05label\x12>\n\x04type\x18\x05\x20\x01(\x0e2*.google.protobuf.F\
9443 ieldDescriptorProto.TypeR\x04type\x12\x1b\n\ttype_name\x18\x06\x20\x01(\
9444 \tR\x08typeName\x12\x1a\n\x08extendee\x18\x02\x20\x01(\tR\x08extendee\
9445 \x12#\n\rdefault_value\x18\x07\x20\x01(\tR\x0cdefaultValue\x12\x1f\n\x0b\
9446 oneof_index\x18\t\x20\x01(\x05R\noneofIndex\x12\x1b\n\tjson_name\x18\n\
9447 \x20\x01(\tR\x08jsonName\x127\n\x07options\x18\x08\x20\x01(\x0b2\x1d.goo\
9448 gle.protobuf.FieldOptionsR\x07options\x12'\n\x0fproto3_optional\x18\x11\
9449 \x20\x01(\x08R\x0eproto3Optional\"\xb6\x02\n\x04Type\x12\x0f\n\x0bTYPE_D\
9450 OUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\n\nTYPE_INT64\x10\
9451 \x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_INT32\x10\x05\x12\
9452 \x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED32\x10\x07\x12\r\n\
9453 \tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\x0e\n\nTYPE_GROUP\
9454 \x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTYPE_BYTES\x10\x0c\
9455 \x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\x0e\x12\x11\n\rTY\
9456 PE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\x12\x0f\n\x0bTYPE_S\
9457 INT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12\"C\n\x05Label\x12\x12\n\
9458 \x0eLABEL_OPTIONAL\x10\x01\x12\x12\n\x0eLABEL_REQUIRED\x10\x02\x12\x12\n\
9459 \x0eLABEL_REPEATED\x10\x03\"c\n\x14OneofDescriptorProto\x12\x12\n\x04nam\
9460 e\x18\x01\x20\x01(\tR\x04name\x127\n\x07options\x18\x02\x20\x01(\x0b2\
9461 \x1d.google.protobuf.OneofOptionsR\x07options\"\xe3\x02\n\x13EnumDescrip\
9462 torProto\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12?\n\x05value\
9463 \x18\x02\x20\x03(\x0b2).google.protobuf.EnumValueDescriptorProtoR\x05val\
9464 ue\x126\n\x07options\x18\x03\x20\x01(\x0b2\x1c.google.protobuf.EnumOptio\
9465 nsR\x07options\x12]\n\x0ereserved_range\x18\x04\x20\x03(\x0b26.google.pr\
9466 otobuf.EnumDescriptorProto.EnumReservedRangeR\rreservedRange\x12#\n\rres\
9467 erved_name\x18\x05\x20\x03(\tR\x0creservedName\x1a;\n\x11EnumReservedRan\
9468 ge\x12\x14\n\x05start\x18\x01\x20\x01(\x05R\x05start\x12\x10\n\x03end\
9469 \x18\x02\x20\x01(\x05R\x03end\"\x83\x01\n\x18EnumValueDescriptorProto\
9470 \x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x16\n\x06number\x18\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009471 \x02\x20\x01(\x05R\x06number\x12;\n\x07options\x18\x03\x20\x01(\x0b2!.go\
9472 ogle.protobuf.EnumValueOptionsR\x07options\"\xa7\x01\n\x16ServiceDescrip\
9473 torProto\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12>\n\x06method\
9474 \x18\x02\x20\x03(\x0b2&.google.protobuf.MethodDescriptorProtoR\x06method\
9475 \x129\n\x07options\x18\x03\x20\x01(\x0b2\x1f.google.protobuf.ServiceOpti\
9476 onsR\x07options\"\x89\x02\n\x15MethodDescriptorProto\x12\x12\n\x04name\
9477 \x18\x01\x20\x01(\tR\x04name\x12\x1d\n\ninput_type\x18\x02\x20\x01(\tR\t\
9478 inputType\x12\x1f\n\x0boutput_type\x18\x03\x20\x01(\tR\noutputType\x128\
9479 \n\x07options\x18\x04\x20\x01(\x0b2\x1e.google.protobuf.MethodOptionsR\
9480 \x07options\x120\n\x10client_streaming\x18\x05\x20\x01(\x08:\x05falseR\
9481 \x0fclientStreaming\x120\n\x10server_streaming\x18\x06\x20\x01(\x08:\x05\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009482 falseR\x0fserverStreaming\"\x91\t\n\x0bFileOptions\x12!\n\x0cjava_packag\
9483 e\x18\x01\x20\x01(\tR\x0bjavaPackage\x120\n\x14java_outer_classname\x18\
9484 \x08\x20\x01(\tR\x12javaOuterClassname\x125\n\x13java_multiple_files\x18\
9485 \n\x20\x01(\x08:\x05falseR\x11javaMultipleFiles\x12D\n\x1djava_generate_\
9486 equals_and_hash\x18\x14\x20\x01(\x08R\x19javaGenerateEqualsAndHashB\x02\
9487 \x18\x01\x12:\n\x16java_string_check_utf8\x18\x1b\x20\x01(\x08:\x05false\
9488 R\x13javaStringCheckUtf8\x12S\n\x0coptimize_for\x18\t\x20\x01(\x0e2).goo\
9489 gle.protobuf.FileOptions.OptimizeMode:\x05SPEEDR\x0boptimizeFor\x12\x1d\
9490 \n\ngo_package\x18\x0b\x20\x01(\tR\tgoPackage\x125\n\x13cc_generic_servi\
9491 ces\x18\x10\x20\x01(\x08:\x05falseR\x11ccGenericServices\x129\n\x15java_\
9492 generic_services\x18\x11\x20\x01(\x08:\x05falseR\x13javaGenericServices\
9493 \x125\n\x13py_generic_services\x18\x12\x20\x01(\x08:\x05falseR\x11pyGene\
9494 ricServices\x127\n\x14php_generic_services\x18*\x20\x01(\x08:\x05falseR\
9495 \x12phpGenericServices\x12%\n\ndeprecated\x18\x17\x20\x01(\x08:\x05false\
9496 R\ndeprecated\x12.\n\x10cc_enable_arenas\x18\x1f\x20\x01(\x08:\x04trueR\
9497 \x0eccEnableArenas\x12*\n\x11objc_class_prefix\x18$\x20\x01(\tR\x0fobjcC\
9498 lassPrefix\x12)\n\x10csharp_namespace\x18%\x20\x01(\tR\x0fcsharpNamespac\
9499 e\x12!\n\x0cswift_prefix\x18'\x20\x01(\tR\x0bswiftPrefix\x12(\n\x10php_c\
9500 lass_prefix\x18(\x20\x01(\tR\x0ephpClassPrefix\x12#\n\rphp_namespace\x18\
9501 )\x20\x01(\tR\x0cphpNamespace\x124\n\x16php_metadata_namespace\x18,\x20\
9502 \x01(\tR\x14phpMetadataNamespace\x12!\n\x0cruby_package\x18-\x20\x01(\tR\
9503 \x0brubyPackage\x12X\n\x14uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2\
9504 $.google.protobuf.UninterpretedOptionR\x13uninterpretedOption\":\n\x0cOp\
9505 timizeMode\x12\t\n\x05SPEED\x10\x01\x12\r\n\tCODE_SIZE\x10\x02\x12\x10\n\
9506 \x0cLITE_RUNTIME\x10\x03*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\
9507 &\x10'\"\xd1\x02\n\x0eMessageOptions\x12<\n\x17message_set_wire_format\
9508 \x18\x01\x20\x01(\x08:\x05falseR\x14messageSetWireFormat\x12L\n\x1fno_st\
9509 andard_descriptor_accessor\x18\x02\x20\x01(\x08:\x05falseR\x1cnoStandard\
9510 DescriptorAccessor\x12%\n\ndeprecated\x18\x03\x20\x01(\x08:\x05falseR\nd\
9511 eprecated\x12\x1b\n\tmap_entry\x18\x07\x20\x01(\x08R\x08mapEntry\x12X\n\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009512 \x14uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.Unin\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009513 terpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\
9514 \x80\x02J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"\xe2\x03\n\x0cFieldOptions\
9515 \x12A\n\x05ctype\x18\x01\x20\x01(\x0e2#.google.protobuf.FieldOptions.CTy\
9516 pe:\x06STRINGR\x05ctype\x12\x16\n\x06packed\x18\x02\x20\x01(\x08R\x06pac\
9517 ked\x12G\n\x06jstype\x18\x06\x20\x01(\x0e2$.google.protobuf.FieldOptions\
9518 .JSType:\tJS_NORMALR\x06jstype\x12\x19\n\x04lazy\x18\x05\x20\x01(\x08:\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009519 \x05falseR\x04lazy\x12%\n\ndeprecated\x18\x03\x20\x01(\x08:\x05falseR\nd\
9520 eprecated\x12\x19\n\x04weak\x18\n\x20\x01(\x08:\x05falseR\x04weak\x12X\n\
9521 \x14uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.Unin\
9522 terpretedOptionR\x13uninterpretedOption\"/\n\x05CType\x12\n\n\x06STRING\
9523 \x10\0\x12\x08\n\x04CORD\x10\x01\x12\x10\n\x0cSTRING_PIECE\x10\x02\"5\n\
9524 \x06JSType\x12\r\n\tJS_NORMAL\x10\0\x12\r\n\tJS_STRING\x10\x01\x12\r\n\t\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009525 JS_NUMBER\x10\x02*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\
9526 \x10\x05\"s\n\x0cOneofOptions\x12X\n\x14uninterpreted_option\x18\xe7\x07\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009527 \x20\x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOpt\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009528 ion*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xc0\x01\n\x0bEnumOptions\
9529 \x12\x1f\n\x0ballow_alias\x18\x02\x20\x01(\x08R\nallowAlias\x12%\n\ndepr\
9530 ecated\x18\x03\x20\x01(\x08:\x05falseR\ndeprecated\x12X\n\x14uninterpret\
9531 ed_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.UninterpretedOption\
9532 R\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\
9533 \x05\x10\x06\"\x9e\x01\n\x10EnumValueOptions\x12%\n\ndeprecated\x18\x01\
9534 \x20\x01(\x08:\x05falseR\ndeprecated\x12X\n\x14uninterpreted_option\x18\
9535 \xe7\x07\x20\x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterp\
9536 retedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x9c\x01\n\x0eServic\
9537 eOptions\x12%\n\ndeprecated\x18!\x20\x01(\x08:\x05falseR\ndeprecated\x12\
9538 X\n\x14uninterpreted_option\x18\xe7\x07\x20\x03(\x0b2$.google.protobuf.U\
9539 ninterpretedOptionR\x13uninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\
9540 \x80\x80\x02\"\xe0\x02\n\rMethodOptions\x12%\n\ndeprecated\x18!\x20\x01(\
9541 \x08:\x05falseR\ndeprecated\x12q\n\x11idempotency_level\x18\"\x20\x01(\
9542 \x0e2/.google.protobuf.MethodOptions.IdempotencyLevel:\x13IDEMPOTENCY_UN\
9543 KNOWNR\x10idempotencyLevel\x12X\n\x14uninterpreted_option\x18\xe7\x07\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009544 \x20\x03(\x0b2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOpt\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009545 ion\"P\n\x10IdempotencyLevel\x12\x17\n\x13IDEMPOTENCY_UNKNOWN\x10\0\x12\
9546 \x13\n\x0fNO_SIDE_EFFECTS\x10\x01\x12\x0e\n\nIDEMPOTENT\x10\x02*\t\x08\
9547 \xe8\x07\x10\x80\x80\x80\x80\x02\"\x9a\x03\n\x13UninterpretedOption\x12A\
9548 \n\x04name\x18\x02\x20\x03(\x0b2-.google.protobuf.UninterpretedOption.Na\
9549 mePartR\x04name\x12)\n\x10identifier_value\x18\x03\x20\x01(\tR\x0fidenti\
9550 fierValue\x12,\n\x12positive_int_value\x18\x04\x20\x01(\x04R\x10positive\
9551 IntValue\x12,\n\x12negative_int_value\x18\x05\x20\x01(\x03R\x10negativeI\
9552 ntValue\x12!\n\x0cdouble_value\x18\x06\x20\x01(\x01R\x0bdoubleValue\x12!\
9553 \n\x0cstring_value\x18\x07\x20\x01(\x0cR\x0bstringValue\x12'\n\x0faggreg\
9554 ate_value\x18\x08\x20\x01(\tR\x0eaggregateValue\x1aJ\n\x08NamePart\x12\
9555 \x1b\n\tname_part\x18\x01\x20\x02(\tR\x08namePart\x12!\n\x0cis_extension\
9556 \x18\x02\x20\x02(\x08R\x0bisExtension\"\xa7\x02\n\x0eSourceCodeInfo\x12D\
9557 \n\x08location\x18\x01\x20\x03(\x0b2(.google.protobuf.SourceCodeInfo.Loc\
9558 ationR\x08location\x1a\xce\x01\n\x08Location\x12\x16\n\x04path\x18\x01\
9559 \x20\x03(\x05R\x04pathB\x02\x10\x01\x12\x16\n\x04span\x18\x02\x20\x03(\
9560 \x05R\x04spanB\x02\x10\x01\x12)\n\x10leading_comments\x18\x03\x20\x01(\t\
9561 R\x0fleadingComments\x12+\n\x11trailing_comments\x18\x04\x20\x01(\tR\x10\
9562 trailingComments\x12:\n\x19leading_detached_comments\x18\x06\x20\x03(\tR\
9563 \x17leadingDetachedComments\"\xd1\x01\n\x11GeneratedCodeInfo\x12M\n\nann\
9564 otation\x18\x01\x20\x03(\x0b2-.google.protobuf.GeneratedCodeInfo.Annotat\
9565 ionR\nannotation\x1am\n\nAnnotation\x12\x16\n\x04path\x18\x01\x20\x03(\
9566 \x05R\x04pathB\x02\x10\x01\x12\x1f\n\x0bsource_file\x18\x02\x20\x01(\tR\
9567 \nsourceFile\x12\x14\n\x05begin\x18\x03\x20\x01(\x05R\x05begin\x12\x10\n\
9568 \x03end\x18\x04\x20\x01(\x05R\x03endB~\n\x13com.google.protobufB\x10Desc\
9569 riptorProtosH\x01Z-google.golang.org/protobuf/types/descriptorpb\xf8\x01\
9570 \x01\xa2\x02\x03GPB\xaa\x02\x1aGoogle.Protobuf.ReflectionJ\xbc\xc8\x02\n\
9571 \x07\x12\x05'\0\x8c\x07\x01\n\xaa\x0f\n\x01\x0c\x12\x03'\0\x122\xc1\x0c\
9572 \x20Protocol\x20Buffers\x20-\x20Google's\x20data\x20interchange\x20forma\
9573 t\n\x20Copyright\x202008\x20Google\x20Inc.\x20\x20All\x20rights\x20reser\
9574 ved.\n\x20https://developers.google.com/protocol-buffers/\n\n\x20Redistr\
9575 ibution\x20and\x20use\x20in\x20source\x20and\x20binary\x20forms,\x20with\
9576 \x20or\x20without\n\x20modification,\x20are\x20permitted\x20provided\x20\
9577 that\x20the\x20following\x20conditions\x20are\n\x20met:\n\n\x20\x20\x20\
9578 \x20\x20*\x20Redistributions\x20of\x20source\x20code\x20must\x20retain\
9579 \x20the\x20above\x20copyright\n\x20notice,\x20this\x20list\x20of\x20cond\
9580 itions\x20and\x20the\x20following\x20disclaimer.\n\x20\x20\x20\x20\x20*\
9581 \x20Redistributions\x20in\x20binary\x20form\x20must\x20reproduce\x20the\
9582 \x20above\n\x20copyright\x20notice,\x20this\x20list\x20of\x20conditions\
9583 \x20and\x20the\x20following\x20disclaimer\n\x20in\x20the\x20documentatio\
9584 n\x20and/or\x20other\x20materials\x20provided\x20with\x20the\n\x20distri\
9585 bution.\n\x20\x20\x20\x20\x20*\x20Neither\x20the\x20name\x20of\x20Google\
9586 \x20Inc.\x20nor\x20the\x20names\x20of\x20its\n\x20contributors\x20may\
9587 \x20be\x20used\x20to\x20endorse\x20or\x20promote\x20products\x20derived\
9588 \x20from\n\x20this\x20software\x20without\x20specific\x20prior\x20writte\
9589 n\x20permission.\n\n\x20THIS\x20SOFTWARE\x20IS\x20PROVIDED\x20BY\x20THE\
9590 \x20COPYRIGHT\x20HOLDERS\x20AND\x20CONTRIBUTORS\n\x20\"AS\x20IS\"\x20AND\
9591 \x20ANY\x20EXPRESS\x20OR\x20IMPLIED\x20WARRANTIES,\x20INCLUDING,\x20BUT\
9592 \x20NOT\n\x20LIMITED\x20TO,\x20THE\x20IMPLIED\x20WARRANTIES\x20OF\x20MER\
9593 CHANTABILITY\x20AND\x20FITNESS\x20FOR\n\x20A\x20PARTICULAR\x20PURPOSE\
9594 \x20ARE\x20DISCLAIMED.\x20IN\x20NO\x20EVENT\x20SHALL\x20THE\x20COPYRIGHT\
9595 \n\x20OWNER\x20OR\x20CONTRIBUTORS\x20BE\x20LIABLE\x20FOR\x20ANY\x20DIREC\
9596 T,\x20INDIRECT,\x20INCIDENTAL,\n\x20SPECIAL,\x20EXEMPLARY,\x20OR\x20CONS\
9597 EQUENTIAL\x20DAMAGES\x20(INCLUDING,\x20BUT\x20NOT\n\x20LIMITED\x20TO,\
9598 \x20PROCUREMENT\x20OF\x20SUBSTITUTE\x20GOODS\x20OR\x20SERVICES;\x20LOSS\
9599 \x20OF\x20USE,\n\x20DATA,\x20OR\x20PROFITS;\x20OR\x20BUSINESS\x20INTERRU\
9600 PTION)\x20HOWEVER\x20CAUSED\x20AND\x20ON\x20ANY\n\x20THEORY\x20OF\x20LIA\
9601 BILITY,\x20WHETHER\x20IN\x20CONTRACT,\x20STRICT\x20LIABILITY,\x20OR\x20T\
9602 ORT\n\x20(INCLUDING\x20NEGLIGENCE\x20OR\x20OTHERWISE)\x20ARISING\x20IN\
9603 \x20ANY\x20WAY\x20OUT\x20OF\x20THE\x20USE\n\x20OF\x20THIS\x20SOFTWARE,\
9604 \x20EVEN\x20IF\x20ADVISED\x20OF\x20THE\x20POSSIBILITY\x20OF\x20SUCH\x20D\
9605 AMAGE.\n2\xdb\x02\x20Author:\x20kenton@google.com\x20(Kenton\x20Varda)\n\
9606 \x20\x20Based\x20on\x20original\x20Protocol\x20Buffers\x20design\x20by\n\
9607 \x20\x20Sanjay\x20Ghemawat,\x20Jeff\x20Dean,\x20and\x20others.\n\n\x20Th\
9608 e\x20messages\x20in\x20this\x20file\x20describe\x20the\x20definitions\
9609 \x20found\x20in\x20.proto\x20files.\n\x20A\x20valid\x20.proto\x20file\
9610 \x20can\x20be\x20translated\x20directly\x20to\x20a\x20FileDescriptorProt\
9611 o\n\x20without\x20any\x20other\x20information\x20(e.g.\x20without\x20rea\
9612 ding\x20its\x20imports).\n\n\x08\n\x01\x02\x12\x03)\0\x18\n\x08\n\x01\
9613 \x08\x12\x03+\0D\n\t\n\x02\x08\x0b\x12\x03+\0D\n\x08\n\x01\x08\x12\x03,\
9614 \0,\n\t\n\x02\x08\x01\x12\x03,\0,\n\x08\n\x01\x08\x12\x03-\01\n\t\n\x02\
9615 \x08\x08\x12\x03-\01\n\x08\n\x01\x08\x12\x03.\07\n\t\n\x02\x08%\x12\x03.\
9616 \07\n\x08\n\x01\x08\x12\x03/\0!\n\t\n\x02\x08$\x12\x03/\0!\n\x08\n\x01\
9617 \x08\x12\x030\0\x1f\n\t\n\x02\x08\x1f\x12\x030\0\x1f\n\x08\n\x01\x08\x12\
9618 \x034\0\x1c\n\x7f\n\x02\x08\t\x12\x034\0\x1c\x1at\x20descriptor.proto\
9619 \x20must\x20be\x20optimized\x20for\x20speed\x20because\x20reflection-bas\
9620 ed\n\x20algorithms\x20don't\x20work\x20during\x20bootstrapping.\n\nj\n\
9621 \x02\x04\0\x12\x048\0:\x01\x1a^\x20The\x20protocol\x20compiler\x20can\
9622 \x20output\x20a\x20FileDescriptorSet\x20containing\x20the\x20.proto\n\
9623 \x20files\x20it\x20parses.\n\n\n\n\x03\x04\0\x01\x12\x038\x08\x19\n\x0b\
9624 \n\x04\x04\0\x02\0\x12\x039\x02(\n\x0c\n\x05\x04\0\x02\0\x04\x12\x039\
9625 \x02\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x039\x0b\x1e\n\x0c\n\x05\x04\0\
9626 \x02\0\x01\x12\x039\x1f#\n\x0c\n\x05\x04\0\x02\0\x03\x12\x039&'\n/\n\x02\
9627 \x04\x01\x12\x04=\0Z\x01\x1a#\x20Describes\x20a\x20complete\x20.proto\
9628 \x20file.\n\n\n\n\x03\x04\x01\x01\x12\x03=\x08\x1b\n9\n\x04\x04\x01\x02\
9629 \0\x12\x03>\x02\x1b\",\x20file\x20name,\x20relative\x20to\x20root\x20of\
9630 \x20source\x20tree\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03>\x02\n\n\x0c\
9631 \n\x05\x04\x01\x02\0\x05\x12\x03>\x0b\x11\n\x0c\n\x05\x04\x01\x02\0\x01\
9632 \x12\x03>\x12\x16\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03>\x19\x1a\n*\n\
9633 \x04\x04\x01\x02\x01\x12\x03?\x02\x1e\"\x1d\x20e.g.\x20\"foo\",\x20\"foo\
9634 .bar\",\x20etc.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03?\x02\n\n\x0c\n\
9635 \x05\x04\x01\x02\x01\x05\x12\x03?\x0b\x11\n\x0c\n\x05\x04\x01\x02\x01\
9636 \x01\x12\x03?\x12\x19\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03?\x1c\x1d\n\
9637 4\n\x04\x04\x01\x02\x02\x12\x03B\x02!\x1a'\x20Names\x20of\x20files\x20im\
9638 ported\x20by\x20this\x20file.\n\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03B\
9639 \x02\n\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03B\x0b\x11\n\x0c\n\x05\x04\
9640 \x01\x02\x02\x01\x12\x03B\x12\x1c\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\
9641 \x03B\x1f\x20\nQ\n\x04\x04\x01\x02\x03\x12\x03D\x02(\x1aD\x20Indexes\x20\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009642 of\x20the\x20public\x20imported\x20files\x20in\x20the\x20dependency\x20l\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009643 ist\x20above.\n\n\x0c\n\x05\x04\x01\x02\x03\x04\x12\x03D\x02\n\n\x0c\n\
9644 \x05\x04\x01\x02\x03\x05\x12\x03D\x0b\x10\n\x0c\n\x05\x04\x01\x02\x03\
9645 \x01\x12\x03D\x11\"\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03D%'\nz\n\x04\
9646 \x04\x01\x02\x04\x12\x03G\x02&\x1am\x20Indexes\x20of\x20the\x20weak\x20i\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009647 mported\x20files\x20in\x20the\x20dependency\x20list.\n\x20For\x20Google-\
9648 internal\x20migration\x20only.\x20Do\x20not\x20use.\n\n\x0c\n\x05\x04\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009649 \x01\x02\x04\x04\x12\x03G\x02\n\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\x03G\
9650 \x0b\x10\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x03G\x11\x20\n\x0c\n\x05\
9651 \x04\x01\x02\x04\x03\x12\x03G#%\n6\n\x04\x04\x01\x02\x05\x12\x03J\x02,\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009652 \x1a)\x20All\x20top-level\x20definitions\x20in\x20this\x20file.\n\n\x0c\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009653 \n\x05\x04\x01\x02\x05\x04\x12\x03J\x02\n\n\x0c\n\x05\x04\x01\x02\x05\
9654 \x06\x12\x03J\x0b\x1a\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03J\x1b'\n\
9655 \x0c\n\x05\x04\x01\x02\x05\x03\x12\x03J*+\n\x0b\n\x04\x04\x01\x02\x06\
9656 \x12\x03K\x02-\n\x0c\n\x05\x04\x01\x02\x06\x04\x12\x03K\x02\n\n\x0c\n\
9657 \x05\x04\x01\x02\x06\x06\x12\x03K\x0b\x1e\n\x0c\n\x05\x04\x01\x02\x06\
9658 \x01\x12\x03K\x1f(\n\x0c\n\x05\x04\x01\x02\x06\x03\x12\x03K+,\n\x0b\n\
9659 \x04\x04\x01\x02\x07\x12\x03L\x02.\n\x0c\n\x05\x04\x01\x02\x07\x04\x12\
9660 \x03L\x02\n\n\x0c\n\x05\x04\x01\x02\x07\x06\x12\x03L\x0b!\n\x0c\n\x05\
9661 \x04\x01\x02\x07\x01\x12\x03L\")\n\x0c\n\x05\x04\x01\x02\x07\x03\x12\x03\
9662 L,-\n\x0b\n\x04\x04\x01\x02\x08\x12\x03M\x02.\n\x0c\n\x05\x04\x01\x02\
9663 \x08\x04\x12\x03M\x02\n\n\x0c\n\x05\x04\x01\x02\x08\x06\x12\x03M\x0b\x1f\
9664 \n\x0c\n\x05\x04\x01\x02\x08\x01\x12\x03M\x20)\n\x0c\n\x05\x04\x01\x02\
9665 \x08\x03\x12\x03M,-\n\x0b\n\x04\x04\x01\x02\t\x12\x03O\x02#\n\x0c\n\x05\
9666 \x04\x01\x02\t\x04\x12\x03O\x02\n\n\x0c\n\x05\x04\x01\x02\t\x06\x12\x03O\
9667 \x0b\x16\n\x0c\n\x05\x04\x01\x02\t\x01\x12\x03O\x17\x1e\n\x0c\n\x05\x04\
9668 \x01\x02\t\x03\x12\x03O!\"\n\xf4\x01\n\x04\x04\x01\x02\n\x12\x03U\x02/\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009669 \x1a\xe6\x01\x20This\x20field\x20contains\x20optional\x20information\x20\
9670 about\x20the\x20original\x20source\x20code.\n\x20You\x20may\x20safely\
9671 \x20remove\x20this\x20entire\x20field\x20without\x20harming\x20runtime\n\
9672 \x20functionality\x20of\x20the\x20descriptors\x20--\x20the\x20informatio\
9673 n\x20is\x20needed\x20only\x20by\n\x20development\x20tools.\n\n\x0c\n\x05\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009674 \x04\x01\x02\n\x04\x12\x03U\x02\n\n\x0c\n\x05\x04\x01\x02\n\x06\x12\x03U\
9675 \x0b\x19\n\x0c\n\x05\x04\x01\x02\n\x01\x12\x03U\x1a*\n\x0c\n\x05\x04\x01\
9676 \x02\n\x03\x12\x03U-.\n]\n\x04\x04\x01\x02\x0b\x12\x03Y\x02\x1e\x1aP\x20\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009677 The\x20syntax\x20of\x20the\x20proto\x20file.\n\x20The\x20supported\x20va\
9678 lues\x20are\x20\"proto2\"\x20and\x20\"proto3\".\n\n\x0c\n\x05\x04\x01\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009679 \x02\x0b\x04\x12\x03Y\x02\n\n\x0c\n\x05\x04\x01\x02\x0b\x05\x12\x03Y\x0b\
9680 \x11\n\x0c\n\x05\x04\x01\x02\x0b\x01\x12\x03Y\x12\x18\n\x0c\n\x05\x04\
9681 \x01\x02\x0b\x03\x12\x03Y\x1b\x1d\n'\n\x02\x04\x02\x12\x04]\0}\x01\x1a\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -07009682 \x1b\x20Describes\x20a\x20message\x20type.\n\n\n\n\x03\x04\x02\x01\x12\
Haibo Huangca95bfd2021-02-09 17:48:30 -08009683 \x03]\x08\x17\n\x0b\n\x04\x04\x02\x02\0\x12\x03^\x02\x1b\n\x0c\n\x05\x04\
9684 \x02\x02\0\x04\x12\x03^\x02\n\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03^\x0b\
9685 \x11\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03^\x12\x16\n\x0c\n\x05\x04\x02\
9686 \x02\0\x03\x12\x03^\x19\x1a\n\x0b\n\x04\x04\x02\x02\x01\x12\x03`\x02*\n\
9687 \x0c\n\x05\x04\x02\x02\x01\x04\x12\x03`\x02\n\n\x0c\n\x05\x04\x02\x02\
9688 \x01\x06\x12\x03`\x0b\x1f\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03`\x20%\
9689 \n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03`()\n\x0b\n\x04\x04\x02\x02\x02\
9690 \x12\x03a\x02.\n\x0c\n\x05\x04\x02\x02\x02\x04\x12\x03a\x02\n\n\x0c\n\
9691 \x05\x04\x02\x02\x02\x06\x12\x03a\x0b\x1f\n\x0c\n\x05\x04\x02\x02\x02\
9692 \x01\x12\x03a\x20)\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03a,-\n\x0b\n\
9693 \x04\x04\x02\x02\x03\x12\x03c\x02+\n\x0c\n\x05\x04\x02\x02\x03\x04\x12\
9694 \x03c\x02\n\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03c\x0b\x1a\n\x0c\n\x05\
9695 \x04\x02\x02\x03\x01\x12\x03c\x1b&\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\
9696 \x03c)*\n\x0b\n\x04\x04\x02\x02\x04\x12\x03d\x02-\n\x0c\n\x05\x04\x02\
9697 \x02\x04\x04\x12\x03d\x02\n\n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03d\x0b\
9698 \x1e\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03d\x1f(\n\x0c\n\x05\x04\x02\
9699 \x02\x04\x03\x12\x03d+,\n\x0c\n\x04\x04\x02\x03\0\x12\x04f\x02k\x03\n\
9700 \x0c\n\x05\x04\x02\x03\0\x01\x12\x03f\n\x18\n\x1b\n\x06\x04\x02\x03\0\
9701 \x02\0\x12\x03g\x04\x1d\"\x0c\x20Inclusive.\n\n\x0e\n\x07\x04\x02\x03\0\
9702 \x02\0\x04\x12\x03g\x04\x0c\n\x0e\n\x07\x04\x02\x03\0\x02\0\x05\x12\x03g\
9703 \r\x12\n\x0e\n\x07\x04\x02\x03\0\x02\0\x01\x12\x03g\x13\x18\n\x0e\n\x07\
9704 \x04\x02\x03\0\x02\0\x03\x12\x03g\x1b\x1c\n\x1b\n\x06\x04\x02\x03\0\x02\
9705 \x01\x12\x03h\x04\x1b\"\x0c\x20Exclusive.\n\n\x0e\n\x07\x04\x02\x03\0\
9706 \x02\x01\x04\x12\x03h\x04\x0c\n\x0e\n\x07\x04\x02\x03\0\x02\x01\x05\x12\
9707 \x03h\r\x12\n\x0e\n\x07\x04\x02\x03\0\x02\x01\x01\x12\x03h\x13\x16\n\x0e\
9708 \n\x07\x04\x02\x03\0\x02\x01\x03\x12\x03h\x19\x1a\n\r\n\x06\x04\x02\x03\
9709 \0\x02\x02\x12\x03j\x04/\n\x0e\n\x07\x04\x02\x03\0\x02\x02\x04\x12\x03j\
9710 \x04\x0c\n\x0e\n\x07\x04\x02\x03\0\x02\x02\x06\x12\x03j\r\"\n\x0e\n\x07\
9711 \x04\x02\x03\0\x02\x02\x01\x12\x03j#*\n\x0e\n\x07\x04\x02\x03\0\x02\x02\
9712 \x03\x12\x03j-.\n\x0b\n\x04\x04\x02\x02\x05\x12\x03l\x02.\n\x0c\n\x05\
9713 \x04\x02\x02\x05\x04\x12\x03l\x02\n\n\x0c\n\x05\x04\x02\x02\x05\x06\x12\
9714 \x03l\x0b\x19\n\x0c\n\x05\x04\x02\x02\x05\x01\x12\x03l\x1a)\n\x0c\n\x05\
9715 \x04\x02\x02\x05\x03\x12\x03l,-\n\x0b\n\x04\x04\x02\x02\x06\x12\x03n\x02\
9716 /\n\x0c\n\x05\x04\x02\x02\x06\x04\x12\x03n\x02\n\n\x0c\n\x05\x04\x02\x02\
9717 \x06\x06\x12\x03n\x0b\x1f\n\x0c\n\x05\x04\x02\x02\x06\x01\x12\x03n\x20*\
9718 \n\x0c\n\x05\x04\x02\x02\x06\x03\x12\x03n-.\n\x0b\n\x04\x04\x02\x02\x07\
9719 \x12\x03p\x02&\n\x0c\n\x05\x04\x02\x02\x07\x04\x12\x03p\x02\n\n\x0c\n\
9720 \x05\x04\x02\x02\x07\x06\x12\x03p\x0b\x19\n\x0c\n\x05\x04\x02\x02\x07\
9721 \x01\x12\x03p\x1a!\n\x0c\n\x05\x04\x02\x02\x07\x03\x12\x03p$%\n\xaa\x01\
9722 \n\x04\x04\x02\x03\x01\x12\x04u\x02x\x03\x1a\x9b\x01\x20Range\x20of\x20r\
9723 eserved\x20tag\x20numbers.\x20Reserved\x20tag\x20numbers\x20may\x20not\
9724 \x20be\x20used\x20by\n\x20fields\x20or\x20extension\x20ranges\x20in\x20t\
9725 he\x20same\x20message.\x20Reserved\x20ranges\x20may\n\x20not\x20overlap.\
9726 \n\n\x0c\n\x05\x04\x02\x03\x01\x01\x12\x03u\n\x17\n\x1b\n\x06\x04\x02\
9727 \x03\x01\x02\0\x12\x03v\x04\x1d\"\x0c\x20Inclusive.\n\n\x0e\n\x07\x04\
9728 \x02\x03\x01\x02\0\x04\x12\x03v\x04\x0c\n\x0e\n\x07\x04\x02\x03\x01\x02\
9729 \0\x05\x12\x03v\r\x12\n\x0e\n\x07\x04\x02\x03\x01\x02\0\x01\x12\x03v\x13\
9730 \x18\n\x0e\n\x07\x04\x02\x03\x01\x02\0\x03\x12\x03v\x1b\x1c\n\x1b\n\x06\
9731 \x04\x02\x03\x01\x02\x01\x12\x03w\x04\x1b\"\x0c\x20Exclusive.\n\n\x0e\n\
9732 \x07\x04\x02\x03\x01\x02\x01\x04\x12\x03w\x04\x0c\n\x0e\n\x07\x04\x02\
9733 \x03\x01\x02\x01\x05\x12\x03w\r\x12\n\x0e\n\x07\x04\x02\x03\x01\x02\x01\
9734 \x01\x12\x03w\x13\x16\n\x0e\n\x07\x04\x02\x03\x01\x02\x01\x03\x12\x03w\
9735 \x19\x1a\n\x0b\n\x04\x04\x02\x02\x08\x12\x03y\x02,\n\x0c\n\x05\x04\x02\
9736 \x02\x08\x04\x12\x03y\x02\n\n\x0c\n\x05\x04\x02\x02\x08\x06\x12\x03y\x0b\
9737 \x18\n\x0c\n\x05\x04\x02\x02\x08\x01\x12\x03y\x19'\n\x0c\n\x05\x04\x02\
9738 \x02\x08\x03\x12\x03y*+\n\x82\x01\n\x04\x04\x02\x02\t\x12\x03|\x02%\x1au\
9739 \x20Reserved\x20field\x20names,\x20which\x20may\x20not\x20be\x20used\x20\
9740 by\x20fields\x20in\x20the\x20same\x20message.\n\x20A\x20given\x20name\
9741 \x20may\x20only\x20be\x20reserved\x20once.\n\n\x0c\n\x05\x04\x02\x02\t\
9742 \x04\x12\x03|\x02\n\n\x0c\n\x05\x04\x02\x02\t\x05\x12\x03|\x0b\x11\n\x0c\
9743 \n\x05\x04\x02\x02\t\x01\x12\x03|\x12\x1f\n\x0c\n\x05\x04\x02\x02\t\x03\
9744 \x12\x03|\"$\n\x0b\n\x02\x04\x03\x12\x05\x7f\0\x86\x01\x01\n\n\n\x03\x04\
9745 \x03\x01\x12\x03\x7f\x08\x1d\nO\n\x04\x04\x03\x02\0\x12\x04\x81\x01\x02:\
9746 \x1aA\x20The\x20parser\x20stores\x20options\x20it\x20doesn't\x20recogniz\
9747 e\x20here.\x20See\x20above.\n\n\r\n\x05\x04\x03\x02\0\x04\x12\x04\x81\
9748 \x01\x02\n\n\r\n\x05\x04\x03\x02\0\x06\x12\x04\x81\x01\x0b\x1e\n\r\n\x05\
9749 \x04\x03\x02\0\x01\x12\x04\x81\x01\x1f3\n\r\n\x05\x04\x03\x02\0\x03\x12\
9750 \x04\x81\x0169\nZ\n\x03\x04\x03\x05\x12\x04\x85\x01\x02\x19\x1aM\x20Clie\
9751 nts\x20can\x20define\x20custom\x20options\x20in\x20extensions\x20of\x20t\
9752 his\x20message.\x20See\x20above.\n\n\x0c\n\x04\x04\x03\x05\0\x12\x04\x85\
9753 \x01\r\x18\n\r\n\x05\x04\x03\x05\0\x01\x12\x04\x85\x01\r\x11\n\r\n\x05\
9754 \x04\x03\x05\0\x02\x12\x04\x85\x01\x15\x18\n3\n\x02\x04\x04\x12\x06\x89\
9755 \x01\0\xee\x01\x01\x1a%\x20Describes\x20a\x20field\x20within\x20a\x20mes\
9756 sage.\n\n\x0b\n\x03\x04\x04\x01\x12\x04\x89\x01\x08\x1c\n\x0e\n\x04\x04\
9757 \x04\x04\0\x12\x06\x8a\x01\x02\xa9\x01\x03\n\r\n\x05\x04\x04\x04\0\x01\
9758 \x12\x04\x8a\x01\x07\x0b\nS\n\x06\x04\x04\x04\0\x02\0\x12\x04\x8d\x01\
9759 \x04\x14\x1aC\x200\x20is\x20reserved\x20for\x20errors.\n\x20Order\x20is\
9760 \x20weird\x20for\x20historical\x20reasons.\n\n\x0f\n\x07\x04\x04\x04\0\
9761 \x02\0\x01\x12\x04\x8d\x01\x04\x0f\n\x0f\n\x07\x04\x04\x04\0\x02\0\x02\
9762 \x12\x04\x8d\x01\x12\x13\n\x0e\n\x06\x04\x04\x04\0\x02\x01\x12\x04\x8e\
9763 \x01\x04\x13\n\x0f\n\x07\x04\x04\x04\0\x02\x01\x01\x12\x04\x8e\x01\x04\
9764 \x0e\n\x0f\n\x07\x04\x04\x04\0\x02\x01\x02\x12\x04\x8e\x01\x11\x12\nw\n\
9765 \x06\x04\x04\x04\0\x02\x02\x12\x04\x91\x01\x04\x13\x1ag\x20Not\x20ZigZag\
9766 \x20encoded.\x20\x20Negative\x20numbers\x20take\x2010\x20bytes.\x20\x20U\
9767 se\x20TYPE_SINT64\x20if\n\x20negative\x20values\x20are\x20likely.\n\n\
9768 \x0f\n\x07\x04\x04\x04\0\x02\x02\x01\x12\x04\x91\x01\x04\x0e\n\x0f\n\x07\
9769 \x04\x04\x04\0\x02\x02\x02\x12\x04\x91\x01\x11\x12\n\x0e\n\x06\x04\x04\
9770 \x04\0\x02\x03\x12\x04\x92\x01\x04\x14\n\x0f\n\x07\x04\x04\x04\0\x02\x03\
9771 \x01\x12\x04\x92\x01\x04\x0f\n\x0f\n\x07\x04\x04\x04\0\x02\x03\x02\x12\
9772 \x04\x92\x01\x12\x13\nw\n\x06\x04\x04\x04\0\x02\x04\x12\x04\x95\x01\x04\
9773 \x13\x1ag\x20Not\x20ZigZag\x20encoded.\x20\x20Negative\x20numbers\x20tak\
9774 e\x2010\x20bytes.\x20\x20Use\x20TYPE_SINT32\x20if\n\x20negative\x20value\
9775 s\x20are\x20likely.\n\n\x0f\n\x07\x04\x04\x04\0\x02\x04\x01\x12\x04\x95\
9776 \x01\x04\x0e\n\x0f\n\x07\x04\x04\x04\0\x02\x04\x02\x12\x04\x95\x01\x11\
9777 \x12\n\x0e\n\x06\x04\x04\x04\0\x02\x05\x12\x04\x96\x01\x04\x15\n\x0f\n\
9778 \x07\x04\x04\x04\0\x02\x05\x01\x12\x04\x96\x01\x04\x10\n\x0f\n\x07\x04\
9779 \x04\x04\0\x02\x05\x02\x12\x04\x96\x01\x13\x14\n\x0e\n\x06\x04\x04\x04\0\
9780 \x02\x06\x12\x04\x97\x01\x04\x15\n\x0f\n\x07\x04\x04\x04\0\x02\x06\x01\
9781 \x12\x04\x97\x01\x04\x10\n\x0f\n\x07\x04\x04\x04\0\x02\x06\x02\x12\x04\
9782 \x97\x01\x13\x14\n\x0e\n\x06\x04\x04\x04\0\x02\x07\x12\x04\x98\x01\x04\
9783 \x12\n\x0f\n\x07\x04\x04\x04\0\x02\x07\x01\x12\x04\x98\x01\x04\r\n\x0f\n\
9784 \x07\x04\x04\x04\0\x02\x07\x02\x12\x04\x98\x01\x10\x11\n\x0e\n\x06\x04\
9785 \x04\x04\0\x02\x08\x12\x04\x99\x01\x04\x14\n\x0f\n\x07\x04\x04\x04\0\x02\
9786 \x08\x01\x12\x04\x99\x01\x04\x0f\n\x0f\n\x07\x04\x04\x04\0\x02\x08\x02\
9787 \x12\x04\x99\x01\x12\x13\n\xe2\x01\n\x06\x04\x04\x04\0\x02\t\x12\x04\x9e\
9788 \x01\x04\x14\x1a\xd1\x01\x20Tag-delimited\x20aggregate.\n\x20Group\x20ty\
9789 pe\x20is\x20deprecated\x20and\x20not\x20supported\x20in\x20proto3.\x20Ho\
9790 wever,\x20Proto3\n\x20implementations\x20should\x20still\x20be\x20able\
9791 \x20to\x20parse\x20the\x20group\x20wire\x20format\x20and\n\x20treat\x20g\
9792 roup\x20fields\x20as\x20unknown\x20fields.\n\n\x0f\n\x07\x04\x04\x04\0\
9793 \x02\t\x01\x12\x04\x9e\x01\x04\x0e\n\x0f\n\x07\x04\x04\x04\0\x02\t\x02\
9794 \x12\x04\x9e\x01\x11\x13\n-\n\x06\x04\x04\x04\0\x02\n\x12\x04\x9f\x01\
9795 \x04\x16\"\x1d\x20Length-delimited\x20aggregate.\n\n\x0f\n\x07\x04\x04\
9796 \x04\0\x02\n\x01\x12\x04\x9f\x01\x04\x10\n\x0f\n\x07\x04\x04\x04\0\x02\n\
9797 \x02\x12\x04\x9f\x01\x13\x15\n#\n\x06\x04\x04\x04\0\x02\x0b\x12\x04\xa2\
9798 \x01\x04\x14\x1a\x13\x20New\x20in\x20version\x202.\n\n\x0f\n\x07\x04\x04\
9799 \x04\0\x02\x0b\x01\x12\x04\xa2\x01\x04\x0e\n\x0f\n\x07\x04\x04\x04\0\x02\
9800 \x0b\x02\x12\x04\xa2\x01\x11\x13\n\x0e\n\x06\x04\x04\x04\0\x02\x0c\x12\
9801 \x04\xa3\x01\x04\x15\n\x0f\n\x07\x04\x04\x04\0\x02\x0c\x01\x12\x04\xa3\
9802 \x01\x04\x0f\n\x0f\n\x07\x04\x04\x04\0\x02\x0c\x02\x12\x04\xa3\x01\x12\
9803 \x14\n\x0e\n\x06\x04\x04\x04\0\x02\r\x12\x04\xa4\x01\x04\x13\n\x0f\n\x07\
9804 \x04\x04\x04\0\x02\r\x01\x12\x04\xa4\x01\x04\r\n\x0f\n\x07\x04\x04\x04\0\
9805 \x02\r\x02\x12\x04\xa4\x01\x10\x12\n\x0e\n\x06\x04\x04\x04\0\x02\x0e\x12\
9806 \x04\xa5\x01\x04\x17\n\x0f\n\x07\x04\x04\x04\0\x02\x0e\x01\x12\x04\xa5\
9807 \x01\x04\x11\n\x0f\n\x07\x04\x04\x04\0\x02\x0e\x02\x12\x04\xa5\x01\x14\
9808 \x16\n\x0e\n\x06\x04\x04\x04\0\x02\x0f\x12\x04\xa6\x01\x04\x17\n\x0f\n\
9809 \x07\x04\x04\x04\0\x02\x0f\x01\x12\x04\xa6\x01\x04\x11\n\x0f\n\x07\x04\
9810 \x04\x04\0\x02\x0f\x02\x12\x04\xa6\x01\x14\x16\n'\n\x06\x04\x04\x04\0\
9811 \x02\x10\x12\x04\xa7\x01\x04\x15\"\x17\x20Uses\x20ZigZag\x20encoding.\n\
9812 \n\x0f\n\x07\x04\x04\x04\0\x02\x10\x01\x12\x04\xa7\x01\x04\x0f\n\x0f\n\
9813 \x07\x04\x04\x04\0\x02\x10\x02\x12\x04\xa7\x01\x12\x14\n'\n\x06\x04\x04\
9814 \x04\0\x02\x11\x12\x04\xa8\x01\x04\x15\"\x17\x20Uses\x20ZigZag\x20encodi\
9815 ng.\n\n\x0f\n\x07\x04\x04\x04\0\x02\x11\x01\x12\x04\xa8\x01\x04\x0f\n\
9816 \x0f\n\x07\x04\x04\x04\0\x02\x11\x02\x12\x04\xa8\x01\x12\x14\n\x0e\n\x04\
9817 \x04\x04\x04\x01\x12\x06\xab\x01\x02\xb0\x01\x03\n\r\n\x05\x04\x04\x04\
9818 \x01\x01\x12\x04\xab\x01\x07\x0c\n*\n\x06\x04\x04\x04\x01\x02\0\x12\x04\
9819 \xad\x01\x04\x17\x1a\x1a\x200\x20is\x20reserved\x20for\x20errors\n\n\x0f\
9820 \n\x07\x04\x04\x04\x01\x02\0\x01\x12\x04\xad\x01\x04\x12\n\x0f\n\x07\x04\
9821 \x04\x04\x01\x02\0\x02\x12\x04\xad\x01\x15\x16\n\x0e\n\x06\x04\x04\x04\
9822 \x01\x02\x01\x12\x04\xae\x01\x04\x17\n\x0f\n\x07\x04\x04\x04\x01\x02\x01\
9823 \x01\x12\x04\xae\x01\x04\x12\n\x0f\n\x07\x04\x04\x04\x01\x02\x01\x02\x12\
9824 \x04\xae\x01\x15\x16\n\x0e\n\x06\x04\x04\x04\x01\x02\x02\x12\x04\xaf\x01\
9825 \x04\x17\n\x0f\n\x07\x04\x04\x04\x01\x02\x02\x01\x12\x04\xaf\x01\x04\x12\
9826 \n\x0f\n\x07\x04\x04\x04\x01\x02\x02\x02\x12\x04\xaf\x01\x15\x16\n\x0c\n\
9827 \x04\x04\x04\x02\0\x12\x04\xb2\x01\x02\x1b\n\r\n\x05\x04\x04\x02\0\x04\
9828 \x12\x04\xb2\x01\x02\n\n\r\n\x05\x04\x04\x02\0\x05\x12\x04\xb2\x01\x0b\
9829 \x11\n\r\n\x05\x04\x04\x02\0\x01\x12\x04\xb2\x01\x12\x16\n\r\n\x05\x04\
9830 \x04\x02\0\x03\x12\x04\xb2\x01\x19\x1a\n\x0c\n\x04\x04\x04\x02\x01\x12\
9831 \x04\xb3\x01\x02\x1c\n\r\n\x05\x04\x04\x02\x01\x04\x12\x04\xb3\x01\x02\n\
9832 \n\r\n\x05\x04\x04\x02\x01\x05\x12\x04\xb3\x01\x0b\x10\n\r\n\x05\x04\x04\
9833 \x02\x01\x01\x12\x04\xb3\x01\x11\x17\n\r\n\x05\x04\x04\x02\x01\x03\x12\
9834 \x04\xb3\x01\x1a\x1b\n\x0c\n\x04\x04\x04\x02\x02\x12\x04\xb4\x01\x02\x1b\
9835 \n\r\n\x05\x04\x04\x02\x02\x04\x12\x04\xb4\x01\x02\n\n\r\n\x05\x04\x04\
9836 \x02\x02\x06\x12\x04\xb4\x01\x0b\x10\n\r\n\x05\x04\x04\x02\x02\x01\x12\
9837 \x04\xb4\x01\x11\x16\n\r\n\x05\x04\x04\x02\x02\x03\x12\x04\xb4\x01\x19\
9838 \x1a\n\x9c\x01\n\x04\x04\x04\x02\x03\x12\x04\xb8\x01\x02\x19\x1a\x8d\x01\
9839 \x20If\x20type_name\x20is\x20set,\x20this\x20need\x20not\x20be\x20set.\
9840 \x20\x20If\x20both\x20this\x20and\x20type_name\n\x20are\x20set,\x20this\
9841 \x20must\x20be\x20one\x20of\x20TYPE_ENUM,\x20TYPE_MESSAGE\x20or\x20TYPE_\
9842 GROUP.\n\n\r\n\x05\x04\x04\x02\x03\x04\x12\x04\xb8\x01\x02\n\n\r\n\x05\
9843 \x04\x04\x02\x03\x06\x12\x04\xb8\x01\x0b\x0f\n\r\n\x05\x04\x04\x02\x03\
9844 \x01\x12\x04\xb8\x01\x10\x14\n\r\n\x05\x04\x04\x02\x03\x03\x12\x04\xb8\
9845 \x01\x17\x18\n\xb7\x02\n\x04\x04\x04\x02\x04\x12\x04\xbf\x01\x02\x20\x1a\
9846 \xa8\x02\x20For\x20message\x20and\x20enum\x20types,\x20this\x20is\x20the\
9847 \x20name\x20of\x20the\x20type.\x20\x20If\x20the\x20name\n\x20starts\x20w\
9848 ith\x20a\x20'.',\x20it\x20is\x20fully-qualified.\x20\x20Otherwise,\x20C+\
9849 +-like\x20scoping\n\x20rules\x20are\x20used\x20to\x20find\x20the\x20type\
9850 \x20(i.e.\x20first\x20the\x20nested\x20types\x20within\x20this\n\x20mess\
9851 age\x20are\x20searched,\x20then\x20within\x20the\x20parent,\x20on\x20up\
9852 \x20to\x20the\x20root\n\x20namespace).\n\n\r\n\x05\x04\x04\x02\x04\x04\
9853 \x12\x04\xbf\x01\x02\n\n\r\n\x05\x04\x04\x02\x04\x05\x12\x04\xbf\x01\x0b\
9854 \x11\n\r\n\x05\x04\x04\x02\x04\x01\x12\x04\xbf\x01\x12\x1b\n\r\n\x05\x04\
9855 \x04\x02\x04\x03\x12\x04\xbf\x01\x1e\x1f\n~\n\x04\x04\x04\x02\x05\x12\
9856 \x04\xc3\x01\x02\x1f\x1ap\x20For\x20extensions,\x20this\x20is\x20the\x20\
9857 name\x20of\x20the\x20type\x20being\x20extended.\x20\x20It\x20is\n\x20res\
9858 olved\x20in\x20the\x20same\x20manner\x20as\x20type_name.\n\n\r\n\x05\x04\
9859 \x04\x02\x05\x04\x12\x04\xc3\x01\x02\n\n\r\n\x05\x04\x04\x02\x05\x05\x12\
9860 \x04\xc3\x01\x0b\x11\n\r\n\x05\x04\x04\x02\x05\x01\x12\x04\xc3\x01\x12\
9861 \x1a\n\r\n\x05\x04\x04\x02\x05\x03\x12\x04\xc3\x01\x1d\x1e\n\xb1\x02\n\
9862 \x04\x04\x04\x02\x06\x12\x04\xca\x01\x02$\x1a\xa2\x02\x20For\x20numeric\
9863 \x20types,\x20contains\x20the\x20original\x20text\x20representation\x20o\
9864 f\x20the\x20value.\n\x20For\x20booleans,\x20\"true\"\x20or\x20\"false\".\
9865 \n\x20For\x20strings,\x20contains\x20the\x20default\x20text\x20contents\
9866 \x20(not\x20escaped\x20in\x20any\x20way).\n\x20For\x20bytes,\x20contains\
9867 \x20the\x20C\x20escaped\x20value.\x20\x20All\x20bytes\x20>=\x20128\x20ar\
9868 e\x20escaped.\n\x20TODO(kenton):\x20\x20Base-64\x20encode?\n\n\r\n\x05\
9869 \x04\x04\x02\x06\x04\x12\x04\xca\x01\x02\n\n\r\n\x05\x04\x04\x02\x06\x05\
9870 \x12\x04\xca\x01\x0b\x11\n\r\n\x05\x04\x04\x02\x06\x01\x12\x04\xca\x01\
9871 \x12\x1f\n\r\n\x05\x04\x04\x02\x06\x03\x12\x04\xca\x01\"#\n\x84\x01\n\
9872 \x04\x04\x04\x02\x07\x12\x04\xce\x01\x02!\x1av\x20If\x20set,\x20gives\
9873 \x20the\x20index\x20of\x20a\x20oneof\x20in\x20the\x20containing\x20type'\
9874 s\x20oneof_decl\n\x20list.\x20\x20This\x20field\x20is\x20a\x20member\x20\
9875 of\x20that\x20oneof.\n\n\r\n\x05\x04\x04\x02\x07\x04\x12\x04\xce\x01\x02\
9876 \n\n\r\n\x05\x04\x04\x02\x07\x05\x12\x04\xce\x01\x0b\x10\n\r\n\x05\x04\
9877 \x04\x02\x07\x01\x12\x04\xce\x01\x11\x1c\n\r\n\x05\x04\x04\x02\x07\x03\
9878 \x12\x04\xce\x01\x1f\x20\n\xfa\x01\n\x04\x04\x04\x02\x08\x12\x04\xd4\x01\
9879 \x02!\x1a\xeb\x01\x20JSON\x20name\x20of\x20this\x20field.\x20The\x20valu\
9880 e\x20is\x20set\x20by\x20protocol\x20compiler.\x20If\x20the\n\x20user\x20\
9881 has\x20set\x20a\x20\"json_name\"\x20option\x20on\x20this\x20field,\x20th\
9882 at\x20option's\x20value\n\x20will\x20be\x20used.\x20Otherwise,\x20it's\
9883 \x20deduced\x20from\x20the\x20field's\x20name\x20by\x20converting\n\x20i\
9884 t\x20to\x20camelCase.\n\n\r\n\x05\x04\x04\x02\x08\x04\x12\x04\xd4\x01\
9885 \x02\n\n\r\n\x05\x04\x04\x02\x08\x05\x12\x04\xd4\x01\x0b\x11\n\r\n\x05\
9886 \x04\x04\x02\x08\x01\x12\x04\xd4\x01\x12\x1b\n\r\n\x05\x04\x04\x02\x08\
9887 \x03\x12\x04\xd4\x01\x1e\x20\n\x0c\n\x04\x04\x04\x02\t\x12\x04\xd6\x01\
9888 \x02$\n\r\n\x05\x04\x04\x02\t\x04\x12\x04\xd6\x01\x02\n\n\r\n\x05\x04\
9889 \x04\x02\t\x06\x12\x04\xd6\x01\x0b\x17\n\r\n\x05\x04\x04\x02\t\x01\x12\
9890 \x04\xd6\x01\x18\x1f\n\r\n\x05\x04\x04\x02\t\x03\x12\x04\xd6\x01\"#\n\
9891 \xb3\t\n\x04\x04\x04\x02\n\x12\x04\xed\x01\x02%\x1a\xa4\t\x20If\x20true,\
9892 \x20this\x20is\x20a\x20proto3\x20\"optional\".\x20When\x20a\x20proto3\
9893 \x20field\x20is\x20optional,\x20it\n\x20tracks\x20presence\x20regardless\
9894 \x20of\x20field\x20type.\n\n\x20When\x20proto3_optional\x20is\x20true,\
9895 \x20this\x20field\x20must\x20be\x20belong\x20to\x20a\x20oneof\x20to\n\
9896 \x20signal\x20to\x20old\x20proto3\x20clients\x20that\x20presence\x20is\
9897 \x20tracked\x20for\x20this\x20field.\x20This\n\x20oneof\x20is\x20known\
9898 \x20as\x20a\x20\"synthetic\"\x20oneof,\x20and\x20this\x20field\x20must\
9899 \x20be\x20its\x20sole\n\x20member\x20(each\x20proto3\x20optional\x20fiel\
9900 d\x20gets\x20its\x20own\x20synthetic\x20oneof).\x20Synthetic\n\x20oneofs\
9901 \x20exist\x20in\x20the\x20descriptor\x20only,\x20and\x20do\x20not\x20gen\
9902 erate\x20any\x20API.\x20Synthetic\n\x20oneofs\x20must\x20be\x20ordered\
9903 \x20after\x20all\x20\"real\"\x20oneofs.\n\n\x20For\x20message\x20fields,\
9904 \x20proto3_optional\x20doesn't\x20create\x20any\x20semantic\x20change,\n\
9905 \x20since\x20non-repeated\x20message\x20fields\x20always\x20track\x20pre\
9906 sence.\x20However\x20it\x20still\n\x20indicates\x20the\x20semantic\x20de\
9907 tail\x20of\x20whether\x20the\x20user\x20wrote\x20\"optional\"\x20or\x20n\
9908 ot.\n\x20This\x20can\x20be\x20useful\x20for\x20round-tripping\x20the\x20\
9909 .proto\x20file.\x20For\x20consistency\x20we\n\x20give\x20message\x20fiel\
9910 ds\x20a\x20synthetic\x20oneof\x20also,\x20even\x20though\x20it\x20is\x20\
9911 not\x20required\n\x20to\x20track\x20presence.\x20This\x20is\x20especiall\
9912 y\x20important\x20because\x20the\x20parser\x20can't\n\x20tell\x20if\x20a\
9913 \x20field\x20is\x20a\x20message\x20or\x20an\x20enum,\x20so\x20it\x20must\
9914 \x20always\x20create\x20a\n\x20synthetic\x20oneof.\n\n\x20Proto2\x20opti\
9915 onal\x20fields\x20do\x20not\x20set\x20this\x20flag,\x20because\x20they\
9916 \x20already\x20indicate\n\x20optional\x20with\x20`LABEL_OPTIONAL`.\n\n\r\
9917 \n\x05\x04\x04\x02\n\x04\x12\x04\xed\x01\x02\n\n\r\n\x05\x04\x04\x02\n\
9918 \x05\x12\x04\xed\x01\x0b\x0f\n\r\n\x05\x04\x04\x02\n\x01\x12\x04\xed\x01\
9919 \x10\x1f\n\r\n\x05\x04\x04\x02\n\x03\x12\x04\xed\x01\"$\n\"\n\x02\x04\
9920 \x05\x12\x06\xf1\x01\0\xf4\x01\x01\x1a\x14\x20Describes\x20a\x20oneof.\n\
9921 \n\x0b\n\x03\x04\x05\x01\x12\x04\xf1\x01\x08\x1c\n\x0c\n\x04\x04\x05\x02\
9922 \0\x12\x04\xf2\x01\x02\x1b\n\r\n\x05\x04\x05\x02\0\x04\x12\x04\xf2\x01\
9923 \x02\n\n\r\n\x05\x04\x05\x02\0\x05\x12\x04\xf2\x01\x0b\x11\n\r\n\x05\x04\
9924 \x05\x02\0\x01\x12\x04\xf2\x01\x12\x16\n\r\n\x05\x04\x05\x02\0\x03\x12\
9925 \x04\xf2\x01\x19\x1a\n\x0c\n\x04\x04\x05\x02\x01\x12\x04\xf3\x01\x02$\n\
9926 \r\n\x05\x04\x05\x02\x01\x04\x12\x04\xf3\x01\x02\n\n\r\n\x05\x04\x05\x02\
9927 \x01\x06\x12\x04\xf3\x01\x0b\x17\n\r\n\x05\x04\x05\x02\x01\x01\x12\x04\
9928 \xf3\x01\x18\x1f\n\r\n\x05\x04\x05\x02\x01\x03\x12\x04\xf3\x01\"#\n'\n\
9929 \x02\x04\x06\x12\x06\xf7\x01\0\x91\x02\x01\x1a\x19\x20Describes\x20an\
9930 \x20enum\x20type.\n\n\x0b\n\x03\x04\x06\x01\x12\x04\xf7\x01\x08\x1b\n\
9931 \x0c\n\x04\x04\x06\x02\0\x12\x04\xf8\x01\x02\x1b\n\r\n\x05\x04\x06\x02\0\
9932 \x04\x12\x04\xf8\x01\x02\n\n\r\n\x05\x04\x06\x02\0\x05\x12\x04\xf8\x01\
9933 \x0b\x11\n\r\n\x05\x04\x06\x02\0\x01\x12\x04\xf8\x01\x12\x16\n\r\n\x05\
9934 \x04\x06\x02\0\x03\x12\x04\xf8\x01\x19\x1a\n\x0c\n\x04\x04\x06\x02\x01\
9935 \x12\x04\xfa\x01\x02.\n\r\n\x05\x04\x06\x02\x01\x04\x12\x04\xfa\x01\x02\
9936 \n\n\r\n\x05\x04\x06\x02\x01\x06\x12\x04\xfa\x01\x0b#\n\r\n\x05\x04\x06\
9937 \x02\x01\x01\x12\x04\xfa\x01$)\n\r\n\x05\x04\x06\x02\x01\x03\x12\x04\xfa\
9938 \x01,-\n\x0c\n\x04\x04\x06\x02\x02\x12\x04\xfc\x01\x02#\n\r\n\x05\x04\
9939 \x06\x02\x02\x04\x12\x04\xfc\x01\x02\n\n\r\n\x05\x04\x06\x02\x02\x06\x12\
9940 \x04\xfc\x01\x0b\x16\n\r\n\x05\x04\x06\x02\x02\x01\x12\x04\xfc\x01\x17\
9941 \x1e\n\r\n\x05\x04\x06\x02\x02\x03\x12\x04\xfc\x01!\"\n\xaf\x02\n\x04\
9942 \x04\x06\x03\0\x12\x06\x84\x02\x02\x87\x02\x03\x1a\x9e\x02\x20Range\x20o\
9943 f\x20reserved\x20numeric\x20values.\x20Reserved\x20values\x20may\x20not\
9944 \x20be\x20used\x20by\n\x20entries\x20in\x20the\x20same\x20enum.\x20Reser\
9945 ved\x20ranges\x20may\x20not\x20overlap.\n\n\x20Note\x20that\x20this\x20i\
9946 s\x20distinct\x20from\x20DescriptorProto.ReservedRange\x20in\x20that\x20\
9947 it\n\x20is\x20inclusive\x20such\x20that\x20it\x20can\x20appropriately\
9948 \x20represent\x20the\x20entire\x20int32\n\x20domain.\n\n\r\n\x05\x04\x06\
9949 \x03\0\x01\x12\x04\x84\x02\n\x1b\n\x1c\n\x06\x04\x06\x03\0\x02\0\x12\x04\
9950 \x85\x02\x04\x1d\"\x0c\x20Inclusive.\n\n\x0f\n\x07\x04\x06\x03\0\x02\0\
9951 \x04\x12\x04\x85\x02\x04\x0c\n\x0f\n\x07\x04\x06\x03\0\x02\0\x05\x12\x04\
9952 \x85\x02\r\x12\n\x0f\n\x07\x04\x06\x03\0\x02\0\x01\x12\x04\x85\x02\x13\
9953 \x18\n\x0f\n\x07\x04\x06\x03\0\x02\0\x03\x12\x04\x85\x02\x1b\x1c\n\x1c\n\
9954 \x06\x04\x06\x03\0\x02\x01\x12\x04\x86\x02\x04\x1b\"\x0c\x20Inclusive.\n\
9955 \n\x0f\n\x07\x04\x06\x03\0\x02\x01\x04\x12\x04\x86\x02\x04\x0c\n\x0f\n\
9956 \x07\x04\x06\x03\0\x02\x01\x05\x12\x04\x86\x02\r\x12\n\x0f\n\x07\x04\x06\
9957 \x03\0\x02\x01\x01\x12\x04\x86\x02\x13\x16\n\x0f\n\x07\x04\x06\x03\0\x02\
9958 \x01\x03\x12\x04\x86\x02\x19\x1a\n\xaa\x01\n\x04\x04\x06\x02\x03\x12\x04\
9959 \x8c\x02\x020\x1a\x9b\x01\x20Range\x20of\x20reserved\x20numeric\x20value\
9960 s.\x20Reserved\x20numeric\x20values\x20may\x20not\x20be\x20used\n\x20by\
9961 \x20enum\x20values\x20in\x20the\x20same\x20enum\x20declaration.\x20Reser\
9962 ved\x20ranges\x20may\x20not\n\x20overlap.\n\n\r\n\x05\x04\x06\x02\x03\
9963 \x04\x12\x04\x8c\x02\x02\n\n\r\n\x05\x04\x06\x02\x03\x06\x12\x04\x8c\x02\
9964 \x0b\x1c\n\r\n\x05\x04\x06\x02\x03\x01\x12\x04\x8c\x02\x1d+\n\r\n\x05\
9965 \x04\x06\x02\x03\x03\x12\x04\x8c\x02./\nl\n\x04\x04\x06\x02\x04\x12\x04\
9966 \x90\x02\x02$\x1a^\x20Reserved\x20enum\x20value\x20names,\x20which\x20ma\
9967 y\x20not\x20be\x20reused.\x20A\x20given\x20name\x20may\x20only\n\x20be\
9968 \x20reserved\x20once.\n\n\r\n\x05\x04\x06\x02\x04\x04\x12\x04\x90\x02\
9969 \x02\n\n\r\n\x05\x04\x06\x02\x04\x05\x12\x04\x90\x02\x0b\x11\n\r\n\x05\
9970 \x04\x06\x02\x04\x01\x12\x04\x90\x02\x12\x1f\n\r\n\x05\x04\x06\x02\x04\
9971 \x03\x12\x04\x90\x02\"#\n1\n\x02\x04\x07\x12\x06\x94\x02\0\x99\x02\x01\
9972 \x1a#\x20Describes\x20a\x20value\x20within\x20an\x20enum.\n\n\x0b\n\x03\
9973 \x04\x07\x01\x12\x04\x94\x02\x08\x20\n\x0c\n\x04\x04\x07\x02\0\x12\x04\
9974 \x95\x02\x02\x1b\n\r\n\x05\x04\x07\x02\0\x04\x12\x04\x95\x02\x02\n\n\r\n\
9975 \x05\x04\x07\x02\0\x05\x12\x04\x95\x02\x0b\x11\n\r\n\x05\x04\x07\x02\0\
9976 \x01\x12\x04\x95\x02\x12\x16\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\x95\x02\
9977 \x19\x1a\n\x0c\n\x04\x04\x07\x02\x01\x12\x04\x96\x02\x02\x1c\n\r\n\x05\
9978 \x04\x07\x02\x01\x04\x12\x04\x96\x02\x02\n\n\r\n\x05\x04\x07\x02\x01\x05\
9979 \x12\x04\x96\x02\x0b\x10\n\r\n\x05\x04\x07\x02\x01\x01\x12\x04\x96\x02\
9980 \x11\x17\n\r\n\x05\x04\x07\x02\x01\x03\x12\x04\x96\x02\x1a\x1b\n\x0c\n\
9981 \x04\x04\x07\x02\x02\x12\x04\x98\x02\x02(\n\r\n\x05\x04\x07\x02\x02\x04\
9982 \x12\x04\x98\x02\x02\n\n\r\n\x05\x04\x07\x02\x02\x06\x12\x04\x98\x02\x0b\
9983 \x1b\n\r\n\x05\x04\x07\x02\x02\x01\x12\x04\x98\x02\x1c#\n\r\n\x05\x04\
9984 \x07\x02\x02\x03\x12\x04\x98\x02&'\n$\n\x02\x04\x08\x12\x06\x9c\x02\0\
9985 \xa1\x02\x01\x1a\x16\x20Describes\x20a\x20service.\n\n\x0b\n\x03\x04\x08\
9986 \x01\x12\x04\x9c\x02\x08\x1e\n\x0c\n\x04\x04\x08\x02\0\x12\x04\x9d\x02\
9987 \x02\x1b\n\r\n\x05\x04\x08\x02\0\x04\x12\x04\x9d\x02\x02\n\n\r\n\x05\x04\
9988 \x08\x02\0\x05\x12\x04\x9d\x02\x0b\x11\n\r\n\x05\x04\x08\x02\0\x01\x12\
9989 \x04\x9d\x02\x12\x16\n\r\n\x05\x04\x08\x02\0\x03\x12\x04\x9d\x02\x19\x1a\
9990 \n\x0c\n\x04\x04\x08\x02\x01\x12\x04\x9e\x02\x02,\n\r\n\x05\x04\x08\x02\
9991 \x01\x04\x12\x04\x9e\x02\x02\n\n\r\n\x05\x04\x08\x02\x01\x06\x12\x04\x9e\
9992 \x02\x0b\x20\n\r\n\x05\x04\x08\x02\x01\x01\x12\x04\x9e\x02!'\n\r\n\x05\
9993 \x04\x08\x02\x01\x03\x12\x04\x9e\x02*+\n\x0c\n\x04\x04\x08\x02\x02\x12\
9994 \x04\xa0\x02\x02&\n\r\n\x05\x04\x08\x02\x02\x04\x12\x04\xa0\x02\x02\n\n\
9995 \r\n\x05\x04\x08\x02\x02\x06\x12\x04\xa0\x02\x0b\x19\n\r\n\x05\x04\x08\
9996 \x02\x02\x01\x12\x04\xa0\x02\x1a!\n\r\n\x05\x04\x08\x02\x02\x03\x12\x04\
9997 \xa0\x02$%\n0\n\x02\x04\t\x12\x06\xa4\x02\0\xb2\x02\x01\x1a\"\x20Describ\
9998 es\x20a\x20method\x20of\x20a\x20service.\n\n\x0b\n\x03\x04\t\x01\x12\x04\
9999 \xa4\x02\x08\x1d\n\x0c\n\x04\x04\t\x02\0\x12\x04\xa5\x02\x02\x1b\n\r\n\
10000 \x05\x04\t\x02\0\x04\x12\x04\xa5\x02\x02\n\n\r\n\x05\x04\t\x02\0\x05\x12\
10001 \x04\xa5\x02\x0b\x11\n\r\n\x05\x04\t\x02\0\x01\x12\x04\xa5\x02\x12\x16\n\
10002 \r\n\x05\x04\t\x02\0\x03\x12\x04\xa5\x02\x19\x1a\n\x97\x01\n\x04\x04\t\
10003 \x02\x01\x12\x04\xa9\x02\x02!\x1a\x88\x01\x20Input\x20and\x20output\x20t\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010004 ype\x20names.\x20\x20These\x20are\x20resolved\x20in\x20the\x20same\x20wa\
10005 y\x20as\n\x20FieldDescriptorProto.type_name,\x20but\x20must\x20refer\x20\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010006 to\x20a\x20message\x20type.\n\n\r\n\x05\x04\t\x02\x01\x04\x12\x04\xa9\
10007 \x02\x02\n\n\r\n\x05\x04\t\x02\x01\x05\x12\x04\xa9\x02\x0b\x11\n\r\n\x05\
10008 \x04\t\x02\x01\x01\x12\x04\xa9\x02\x12\x1c\n\r\n\x05\x04\t\x02\x01\x03\
10009 \x12\x04\xa9\x02\x1f\x20\n\x0c\n\x04\x04\t\x02\x02\x12\x04\xaa\x02\x02\"\
10010 \n\r\n\x05\x04\t\x02\x02\x04\x12\x04\xaa\x02\x02\n\n\r\n\x05\x04\t\x02\
10011 \x02\x05\x12\x04\xaa\x02\x0b\x11\n\r\n\x05\x04\t\x02\x02\x01\x12\x04\xaa\
10012 \x02\x12\x1d\n\r\n\x05\x04\t\x02\x02\x03\x12\x04\xaa\x02\x20!\n\x0c\n\
10013 \x04\x04\t\x02\x03\x12\x04\xac\x02\x02%\n\r\n\x05\x04\t\x02\x03\x04\x12\
10014 \x04\xac\x02\x02\n\n\r\n\x05\x04\t\x02\x03\x06\x12\x04\xac\x02\x0b\x18\n\
10015 \r\n\x05\x04\t\x02\x03\x01\x12\x04\xac\x02\x19\x20\n\r\n\x05\x04\t\x02\
10016 \x03\x03\x12\x04\xac\x02#$\nE\n\x04\x04\t\x02\x04\x12\x04\xaf\x02\x027\
10017 \x1a7\x20Identifies\x20if\x20client\x20streams\x20multiple\x20client\x20\
10018 messages\n\n\r\n\x05\x04\t\x02\x04\x04\x12\x04\xaf\x02\x02\n\n\r\n\x05\
10019 \x04\t\x02\x04\x05\x12\x04\xaf\x02\x0b\x0f\n\r\n\x05\x04\t\x02\x04\x01\
10020 \x12\x04\xaf\x02\x10\x20\n\r\n\x05\x04\t\x02\x04\x03\x12\x04\xaf\x02#$\n\
10021 \r\n\x05\x04\t\x02\x04\x08\x12\x04\xaf\x02%6\n\r\n\x05\x04\t\x02\x04\x07\
10022 \x12\x04\xaf\x0205\nE\n\x04\x04\t\x02\x05\x12\x04\xb1\x02\x027\x1a7\x20I\
10023 dentifies\x20if\x20server\x20streams\x20multiple\x20server\x20messages\n\
10024 \n\r\n\x05\x04\t\x02\x05\x04\x12\x04\xb1\x02\x02\n\n\r\n\x05\x04\t\x02\
10025 \x05\x05\x12\x04\xb1\x02\x0b\x0f\n\r\n\x05\x04\t\x02\x05\x01\x12\x04\xb1\
10026 \x02\x10\x20\n\r\n\x05\x04\t\x02\x05\x03\x12\x04\xb1\x02#$\n\r\n\x05\x04\
10027 \t\x02\x05\x08\x12\x04\xb1\x02%6\n\r\n\x05\x04\t\x02\x05\x07\x12\x04\xb1\
10028 \x0205\n\xaf\x0e\n\x02\x04\n\x12\x06\xd5\x02\0\xd0\x03\x012N\x20========\
10029 ===========================================================\n\x20Options\
10030 \n2\xd0\r\x20Each\x20of\x20the\x20definitions\x20above\x20may\x20have\
10031 \x20\"options\"\x20attached.\x20\x20These\x20are\n\x20just\x20annotation\
10032 s\x20which\x20may\x20cause\x20code\x20to\x20be\x20generated\x20slightly\
10033 \x20differently\n\x20or\x20may\x20contain\x20hints\x20for\x20code\x20tha\
10034 t\x20manipulates\x20protocol\x20messages.\n\n\x20Clients\x20may\x20defin\
10035 e\x20custom\x20options\x20as\x20extensions\x20of\x20the\x20*Options\x20m\
10036 essages.\n\x20These\x20extensions\x20may\x20not\x20yet\x20be\x20known\
10037 \x20at\x20parsing\x20time,\x20so\x20the\x20parser\x20cannot\n\x20store\
10038 \x20the\x20values\x20in\x20them.\x20\x20Instead\x20it\x20stores\x20them\
10039 \x20in\x20a\x20field\x20in\x20the\x20*Options\n\x20message\x20called\x20\
10040 uninterpreted_option.\x20This\x20field\x20must\x20have\x20the\x20same\
10041 \x20name\n\x20across\x20all\x20*Options\x20messages.\x20We\x20then\x20us\
10042 e\x20this\x20field\x20to\x20populate\x20the\n\x20extensions\x20when\x20w\
10043 e\x20build\x20a\x20descriptor,\x20at\x20which\x20point\x20all\x20protos\
10044 \x20have\x20been\n\x20parsed\x20and\x20so\x20all\x20extensions\x20are\
10045 \x20known.\n\n\x20Extension\x20numbers\x20for\x20custom\x20options\x20ma\
10046 y\x20be\x20chosen\x20as\x20follows:\n\x20*\x20For\x20options\x20which\
10047 \x20will\x20only\x20be\x20used\x20within\x20a\x20single\x20application\
10048 \x20or\n\x20\x20\x20organization,\x20or\x20for\x20experimental\x20option\
10049 s,\x20use\x20field\x20numbers\x2050000\n\x20\x20\x20through\x2099999.\
10050 \x20\x20It\x20is\x20up\x20to\x20you\x20to\x20ensure\x20that\x20you\x20do\
10051 \x20not\x20use\x20the\n\x20\x20\x20same\x20number\x20for\x20multiple\x20\
10052 options.\n\x20*\x20For\x20options\x20which\x20will\x20be\x20published\
10053 \x20and\x20used\x20publicly\x20by\x20multiple\n\x20\x20\x20independent\
10054 \x20entities,\x20e-mail\x20protobuf-global-extension-registry@google.com\
10055 \n\x20\x20\x20to\x20reserve\x20extension\x20numbers.\x20Simply\x20provid\
10056 e\x20your\x20project\x20name\x20(e.g.\n\x20\x20\x20Objective-C\x20plugin\
10057 )\x20and\x20your\x20project\x20website\x20(if\x20available)\x20--\x20the\
10058 re's\x20no\n\x20\x20\x20need\x20to\x20explain\x20how\x20you\x20intend\
10059 \x20to\x20use\x20them.\x20Usually\x20you\x20only\x20need\x20one\n\x20\
10060 \x20\x20extension\x20number.\x20You\x20can\x20declare\x20multiple\x20opt\
10061 ions\x20with\x20only\x20one\x20extension\n\x20\x20\x20number\x20by\x20pu\
10062 tting\x20them\x20in\x20a\x20sub-message.\x20See\x20the\x20Custom\x20Opti\
10063 ons\x20section\x20of\n\x20\x20\x20the\x20docs\x20for\x20examples:\n\x20\
10064 \x20\x20https://developers.google.com/protocol-buffers/docs/proto#option\
10065 s\n\x20\x20\x20If\x20this\x20turns\x20out\x20to\x20be\x20popular,\x20a\
10066 \x20web\x20service\x20will\x20be\x20set\x20up\n\x20\x20\x20to\x20automat\
10067 ically\x20assign\x20option\x20numbers.\n\n\x0b\n\x03\x04\n\x01\x12\x04\
10068 \xd5\x02\x08\x13\n\xf4\x01\n\x04\x04\n\x02\0\x12\x04\xdb\x02\x02#\x1a\
10069 \xe5\x01\x20Sets\x20the\x20Java\x20package\x20where\x20classes\x20genera\
10070 ted\x20from\x20this\x20.proto\x20will\x20be\n\x20placed.\x20\x20By\x20de\
10071 fault,\x20the\x20proto\x20package\x20is\x20used,\x20but\x20this\x20is\
10072 \x20often\n\x20inappropriate\x20because\x20proto\x20packages\x20do\x20no\
10073 t\x20normally\x20start\x20with\x20backwards\n\x20domain\x20names.\n\n\r\
10074 \n\x05\x04\n\x02\0\x04\x12\x04\xdb\x02\x02\n\n\r\n\x05\x04\n\x02\0\x05\
10075 \x12\x04\xdb\x02\x0b\x11\n\r\n\x05\x04\n\x02\0\x01\x12\x04\xdb\x02\x12\
10076 \x1e\n\r\n\x05\x04\n\x02\0\x03\x12\x04\xdb\x02!\"\n\xbf\x02\n\x04\x04\n\
10077 \x02\x01\x12\x04\xe3\x02\x02+\x1a\xb0\x02\x20If\x20set,\x20all\x20the\
10078 \x20classes\x20from\x20the\x20.proto\x20file\x20are\x20wrapped\x20in\x20\
10079 a\x20single\n\x20outer\x20class\x20with\x20the\x20given\x20name.\x20\x20\
10080 This\x20applies\x20to\x20both\x20Proto1\n\x20(equivalent\x20to\x20the\
10081 \x20old\x20\"--one_java_file\"\x20option)\x20and\x20Proto2\x20(where\n\
10082 \x20a\x20.proto\x20always\x20translates\x20to\x20a\x20single\x20class,\
10083 \x20but\x20you\x20may\x20want\x20to\n\x20explicitly\x20choose\x20the\x20\
10084 class\x20name).\n\n\r\n\x05\x04\n\x02\x01\x04\x12\x04\xe3\x02\x02\n\n\r\
10085 \n\x05\x04\n\x02\x01\x05\x12\x04\xe3\x02\x0b\x11\n\r\n\x05\x04\n\x02\x01\
10086 \x01\x12\x04\xe3\x02\x12&\n\r\n\x05\x04\n\x02\x01\x03\x12\x04\xe3\x02)*\
10087 \n\xa3\x03\n\x04\x04\n\x02\x02\x12\x04\xeb\x02\x02;\x1a\x94\x03\x20If\
10088 \x20set\x20true,\x20then\x20the\x20Java\x20code\x20generator\x20will\x20\
10089 generate\x20a\x20separate\x20.java\n\x20file\x20for\x20each\x20top-level\
10090 \x20message,\x20enum,\x20and\x20service\x20defined\x20in\x20the\x20.prot\
10091 o\n\x20file.\x20\x20Thus,\x20these\x20types\x20will\x20*not*\x20be\x20ne\
10092 sted\x20inside\x20the\x20outer\x20class\n\x20named\x20by\x20java_outer_c\
10093 lassname.\x20\x20However,\x20the\x20outer\x20class\x20will\x20still\x20b\
10094 e\n\x20generated\x20to\x20contain\x20the\x20file's\x20getDescriptor()\
10095 \x20method\x20as\x20well\x20as\x20any\n\x20top-level\x20extensions\x20de\
10096 fined\x20in\x20the\x20file.\n\n\r\n\x05\x04\n\x02\x02\x04\x12\x04\xeb\
10097 \x02\x02\n\n\r\n\x05\x04\n\x02\x02\x05\x12\x04\xeb\x02\x0b\x0f\n\r\n\x05\
10098 \x04\n\x02\x02\x01\x12\x04\xeb\x02\x10#\n\r\n\x05\x04\n\x02\x02\x03\x12\
10099 \x04\xeb\x02&(\n\r\n\x05\x04\n\x02\x02\x08\x12\x04\xeb\x02):\n\r\n\x05\
10100 \x04\n\x02\x02\x07\x12\x04\xeb\x0249\n)\n\x04\x04\n\x02\x03\x12\x04\xee\
10101 \x02\x02E\x1a\x1b\x20This\x20option\x20does\x20nothing.\n\n\r\n\x05\x04\
10102 \n\x02\x03\x04\x12\x04\xee\x02\x02\n\n\r\n\x05\x04\n\x02\x03\x05\x12\x04\
10103 \xee\x02\x0b\x0f\n\r\n\x05\x04\n\x02\x03\x01\x12\x04\xee\x02\x10-\n\r\n\
10104 \x05\x04\n\x02\x03\x03\x12\x04\xee\x0202\n\r\n\x05\x04\n\x02\x03\x08\x12\
10105 \x04\xee\x023D\n\x0e\n\x06\x04\n\x02\x03\x08\x03\x12\x04\xee\x024C\n\xe6\
10106 \x02\n\x04\x04\n\x02\x04\x12\x04\xf6\x02\x02>\x1a\xd7\x02\x20If\x20set\
10107 \x20true,\x20then\x20the\x20Java2\x20code\x20generator\x20will\x20genera\
10108 te\x20code\x20that\n\x20throws\x20an\x20exception\x20whenever\x20an\x20a\
10109 ttempt\x20is\x20made\x20to\x20assign\x20a\x20non-UTF-8\n\x20byte\x20sequ\
10110 ence\x20to\x20a\x20string\x20field.\n\x20Message\x20reflection\x20will\
10111 \x20do\x20the\x20same.\n\x20However,\x20an\x20extension\x20field\x20stil\
10112 l\x20accepts\x20non-UTF-8\x20byte\x20sequences.\n\x20This\x20option\x20h\
10113 as\x20no\x20effect\x20on\x20when\x20used\x20with\x20the\x20lite\x20runti\
10114 me.\n\n\r\n\x05\x04\n\x02\x04\x04\x12\x04\xf6\x02\x02\n\n\r\n\x05\x04\n\
10115 \x02\x04\x05\x12\x04\xf6\x02\x0b\x0f\n\r\n\x05\x04\n\x02\x04\x01\x12\x04\
10116 \xf6\x02\x10&\n\r\n\x05\x04\n\x02\x04\x03\x12\x04\xf6\x02)+\n\r\n\x05\
10117 \x04\n\x02\x04\x08\x12\x04\xf6\x02,=\n\r\n\x05\x04\n\x02\x04\x07\x12\x04\
10118 \xf6\x027<\nL\n\x04\x04\n\x04\0\x12\x06\xfa\x02\x02\xff\x02\x03\x1a<\x20\
10119 Generated\x20classes\x20can\x20be\x20optimized\x20for\x20speed\x20or\x20\
10120 code\x20size.\n\n\r\n\x05\x04\n\x04\0\x01\x12\x04\xfa\x02\x07\x13\nD\n\
10121 \x06\x04\n\x04\0\x02\0\x12\x04\xfb\x02\x04\x0e\"4\x20Generate\x20complet\
10122 e\x20code\x20for\x20parsing,\x20serialization,\n\n\x0f\n\x07\x04\n\x04\0\
10123 \x02\0\x01\x12\x04\xfb\x02\x04\t\n\x0f\n\x07\x04\n\x04\0\x02\0\x02\x12\
10124 \x04\xfb\x02\x0c\r\nG\n\x06\x04\n\x04\0\x02\x01\x12\x04\xfd\x02\x04\x12\
10125 \x1a\x06\x20etc.\n\"/\x20Use\x20ReflectionOps\x20to\x20implement\x20thes\
10126 e\x20methods.\n\n\x0f\n\x07\x04\n\x04\0\x02\x01\x01\x12\x04\xfd\x02\x04\
10127 \r\n\x0f\n\x07\x04\n\x04\0\x02\x01\x02\x12\x04\xfd\x02\x10\x11\nG\n\x06\
10128 \x04\n\x04\0\x02\x02\x12\x04\xfe\x02\x04\x15\"7\x20Generate\x20code\x20u\
10129 sing\x20MessageLite\x20and\x20the\x20lite\x20runtime.\n\n\x0f\n\x07\x04\
10130 \n\x04\0\x02\x02\x01\x12\x04\xfe\x02\x04\x10\n\x0f\n\x07\x04\n\x04\0\x02\
10131 \x02\x02\x12\x04\xfe\x02\x13\x14\n\x0c\n\x04\x04\n\x02\x05\x12\x04\x80\
10132 \x03\x02;\n\r\n\x05\x04\n\x02\x05\x04\x12\x04\x80\x03\x02\n\n\r\n\x05\
10133 \x04\n\x02\x05\x06\x12\x04\x80\x03\x0b\x17\n\r\n\x05\x04\n\x02\x05\x01\
10134 \x12\x04\x80\x03\x18$\n\r\n\x05\x04\n\x02\x05\x03\x12\x04\x80\x03'(\n\r\
10135 \n\x05\x04\n\x02\x05\x08\x12\x04\x80\x03):\n\r\n\x05\x04\n\x02\x05\x07\
10136 \x12\x04\x80\x0349\n\xe2\x02\n\x04\x04\n\x02\x06\x12\x04\x87\x03\x02\"\
10137 \x1a\xd3\x02\x20Sets\x20the\x20Go\x20package\x20where\x20structs\x20gene\
10138 rated\x20from\x20this\x20.proto\x20will\x20be\n\x20placed.\x20If\x20omit\
10139 ted,\x20the\x20Go\x20package\x20will\x20be\x20derived\x20from\x20the\x20\
10140 following:\n\x20\x20\x20-\x20The\x20basename\x20of\x20the\x20package\x20\
10141 import\x20path,\x20if\x20provided.\n\x20\x20\x20-\x20Otherwise,\x20the\
10142 \x20package\x20statement\x20in\x20the\x20.proto\x20file,\x20if\x20presen\
10143 t.\n\x20\x20\x20-\x20Otherwise,\x20the\x20basename\x20of\x20the\x20.prot\
10144 o\x20file,\x20without\x20extension.\n\n\r\n\x05\x04\n\x02\x06\x04\x12\
10145 \x04\x87\x03\x02\n\n\r\n\x05\x04\n\x02\x06\x05\x12\x04\x87\x03\x0b\x11\n\
10146 \r\n\x05\x04\n\x02\x06\x01\x12\x04\x87\x03\x12\x1c\n\r\n\x05\x04\n\x02\
10147 \x06\x03\x12\x04\x87\x03\x1f!\n\xd4\x04\n\x04\x04\n\x02\x07\x12\x04\x96\
10148 \x03\x02;\x1a\xc5\x04\x20Should\x20generic\x20services\x20be\x20generate\
10149 d\x20in\x20each\x20language?\x20\x20\"Generic\"\x20services\n\x20are\x20\
10150 not\x20specific\x20to\x20any\x20particular\x20RPC\x20system.\x20\x20They\
10151 \x20are\x20generated\x20by\x20the\n\x20main\x20code\x20generators\x20in\
10152 \x20each\x20language\x20(without\x20additional\x20plugins).\n\x20Generic\
10153 \x20services\x20were\x20the\x20only\x20kind\x20of\x20service\x20generati\
10154 on\x20supported\x20by\n\x20early\x20versions\x20of\x20google.protobuf.\n\
10155 \n\x20Generic\x20services\x20are\x20now\x20considered\x20deprecated\x20i\
10156 n\x20favor\x20of\x20using\x20plugins\n\x20that\x20generate\x20code\x20sp\
10157 ecific\x20to\x20your\x20particular\x20RPC\x20system.\x20\x20Therefore,\n\
10158 \x20these\x20default\x20to\x20false.\x20\x20Old\x20code\x20which\x20depe\
10159 nds\x20on\x20generic\x20services\x20should\n\x20explicitly\x20set\x20the\
10160 m\x20to\x20true.\n\n\r\n\x05\x04\n\x02\x07\x04\x12\x04\x96\x03\x02\n\n\r\
10161 \n\x05\x04\n\x02\x07\x05\x12\x04\x96\x03\x0b\x0f\n\r\n\x05\x04\n\x02\x07\
10162 \x01\x12\x04\x96\x03\x10#\n\r\n\x05\x04\n\x02\x07\x03\x12\x04\x96\x03&(\
10163 \n\r\n\x05\x04\n\x02\x07\x08\x12\x04\x96\x03):\n\r\n\x05\x04\n\x02\x07\
10164 \x07\x12\x04\x96\x0349\n\x0c\n\x04\x04\n\x02\x08\x12\x04\x97\x03\x02=\n\
10165 \r\n\x05\x04\n\x02\x08\x04\x12\x04\x97\x03\x02\n\n\r\n\x05\x04\n\x02\x08\
10166 \x05\x12\x04\x97\x03\x0b\x0f\n\r\n\x05\x04\n\x02\x08\x01\x12\x04\x97\x03\
10167 \x10%\n\r\n\x05\x04\n\x02\x08\x03\x12\x04\x97\x03(*\n\r\n\x05\x04\n\x02\
10168 \x08\x08\x12\x04\x97\x03+<\n\r\n\x05\x04\n\x02\x08\x07\x12\x04\x97\x036;\
10169 \n\x0c\n\x04\x04\n\x02\t\x12\x04\x98\x03\x02;\n\r\n\x05\x04\n\x02\t\x04\
10170 \x12\x04\x98\x03\x02\n\n\r\n\x05\x04\n\x02\t\x05\x12\x04\x98\x03\x0b\x0f\
10171 \n\r\n\x05\x04\n\x02\t\x01\x12\x04\x98\x03\x10#\n\r\n\x05\x04\n\x02\t\
10172 \x03\x12\x04\x98\x03&(\n\r\n\x05\x04\n\x02\t\x08\x12\x04\x98\x03):\n\r\n\
10173 \x05\x04\n\x02\t\x07\x12\x04\x98\x0349\n\x0c\n\x04\x04\n\x02\n\x12\x04\
10174 \x99\x03\x02<\n\r\n\x05\x04\n\x02\n\x04\x12\x04\x99\x03\x02\n\n\r\n\x05\
10175 \x04\n\x02\n\x05\x12\x04\x99\x03\x0b\x0f\n\r\n\x05\x04\n\x02\n\x01\x12\
10176 \x04\x99\x03\x10$\n\r\n\x05\x04\n\x02\n\x03\x12\x04\x99\x03')\n\r\n\x05\
10177 \x04\n\x02\n\x08\x12\x04\x99\x03*;\n\r\n\x05\x04\n\x02\n\x07\x12\x04\x99\
10178 \x035:\n\xf3\x01\n\x04\x04\n\x02\x0b\x12\x04\x9f\x03\x022\x1a\xe4\x01\
10179 \x20Is\x20this\x20file\x20deprecated?\n\x20Depending\x20on\x20the\x20tar\
10180 get\x20platform,\x20this\x20can\x20emit\x20Deprecated\x20annotations\n\
10181 \x20for\x20everything\x20in\x20the\x20file,\x20or\x20it\x20will\x20be\
10182 \x20completely\x20ignored;\x20in\x20the\x20very\n\x20least,\x20this\x20i\
10183 s\x20a\x20formalization\x20for\x20deprecating\x20files.\n\n\r\n\x05\x04\
10184 \n\x02\x0b\x04\x12\x04\x9f\x03\x02\n\n\r\n\x05\x04\n\x02\x0b\x05\x12\x04\
10185 \x9f\x03\x0b\x0f\n\r\n\x05\x04\n\x02\x0b\x01\x12\x04\x9f\x03\x10\x1a\n\r\
10186 \n\x05\x04\n\x02\x0b\x03\x12\x04\x9f\x03\x1d\x1f\n\r\n\x05\x04\n\x02\x0b\
10187 \x08\x12\x04\x9f\x03\x201\n\r\n\x05\x04\n\x02\x0b\x07\x12\x04\x9f\x03+0\
10188 \n\x7f\n\x04\x04\n\x02\x0c\x12\x04\xa3\x03\x027\x1aq\x20Enables\x20the\
10189 \x20use\x20of\x20arenas\x20for\x20the\x20proto\x20messages\x20in\x20this\
10190 \x20file.\x20This\x20applies\n\x20only\x20to\x20generated\x20classes\x20\
10191 for\x20C++.\n\n\r\n\x05\x04\n\x02\x0c\x04\x12\x04\xa3\x03\x02\n\n\r\n\
10192 \x05\x04\n\x02\x0c\x05\x12\x04\xa3\x03\x0b\x0f\n\r\n\x05\x04\n\x02\x0c\
10193 \x01\x12\x04\xa3\x03\x10\x20\n\r\n\x05\x04\n\x02\x0c\x03\x12\x04\xa3\x03\
10194 #%\n\r\n\x05\x04\n\x02\x0c\x08\x12\x04\xa3\x03&6\n\r\n\x05\x04\n\x02\x0c\
10195 \x07\x12\x04\xa3\x0315\n\x92\x01\n\x04\x04\n\x02\r\x12\x04\xa8\x03\x02)\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010196 \x1a\x83\x01\x20Sets\x20the\x20objective\x20c\x20class\x20prefix\x20whic\
10197 h\x20is\x20prepended\x20to\x20all\x20objective\x20c\n\x20generated\x20cl\
10198 asses\x20from\x20this\x20.proto.\x20There\x20is\x20no\x20default.\n\n\r\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010199 \n\x05\x04\n\x02\r\x04\x12\x04\xa8\x03\x02\n\n\r\n\x05\x04\n\x02\r\x05\
10200 \x12\x04\xa8\x03\x0b\x11\n\r\n\x05\x04\n\x02\r\x01\x12\x04\xa8\x03\x12#\
10201 \n\r\n\x05\x04\n\x02\r\x03\x12\x04\xa8\x03&(\nI\n\x04\x04\n\x02\x0e\x12\
10202 \x04\xab\x03\x02(\x1a;\x20Namespace\x20for\x20generated\x20classes;\x20d\
10203 efaults\x20to\x20the\x20package.\n\n\r\n\x05\x04\n\x02\x0e\x04\x12\x04\
10204 \xab\x03\x02\n\n\r\n\x05\x04\n\x02\x0e\x05\x12\x04\xab\x03\x0b\x11\n\r\n\
10205 \x05\x04\n\x02\x0e\x01\x12\x04\xab\x03\x12\"\n\r\n\x05\x04\n\x02\x0e\x03\
10206 \x12\x04\xab\x03%'\n\x91\x02\n\x04\x04\n\x02\x0f\x12\x04\xb1\x03\x02$\
10207 \x1a\x82\x02\x20By\x20default\x20Swift\x20generators\x20will\x20take\x20\
10208 the\x20proto\x20package\x20and\x20CamelCase\x20it\n\x20replacing\x20'.'\
10209 \x20with\x20underscore\x20and\x20use\x20that\x20to\x20prefix\x20the\x20t\
10210 ypes/symbols\n\x20defined.\x20When\x20this\x20options\x20is\x20provided,\
10211 \x20they\x20will\x20use\x20this\x20value\x20instead\n\x20to\x20prefix\
10212 \x20the\x20types/symbols\x20defined.\n\n\r\n\x05\x04\n\x02\x0f\x04\x12\
10213 \x04\xb1\x03\x02\n\n\r\n\x05\x04\n\x02\x0f\x05\x12\x04\xb1\x03\x0b\x11\n\
10214 \r\n\x05\x04\n\x02\x0f\x01\x12\x04\xb1\x03\x12\x1e\n\r\n\x05\x04\n\x02\
10215 \x0f\x03\x12\x04\xb1\x03!#\n~\n\x04\x04\n\x02\x10\x12\x04\xb5\x03\x02(\
10216 \x1ap\x20Sets\x20the\x20php\x20class\x20prefix\x20which\x20is\x20prepend\
10217 ed\x20to\x20all\x20php\x20generated\x20classes\n\x20from\x20this\x20.pro\
10218 to.\x20Default\x20is\x20empty.\n\n\r\n\x05\x04\n\x02\x10\x04\x12\x04\xb5\
10219 \x03\x02\n\n\r\n\x05\x04\n\x02\x10\x05\x12\x04\xb5\x03\x0b\x11\n\r\n\x05\
10220 \x04\n\x02\x10\x01\x12\x04\xb5\x03\x12\"\n\r\n\x05\x04\n\x02\x10\x03\x12\
10221 \x04\xb5\x03%'\n\xbe\x01\n\x04\x04\n\x02\x11\x12\x04\xba\x03\x02%\x1a\
10222 \xaf\x01\x20Use\x20this\x20option\x20to\x20change\x20the\x20namespace\
10223 \x20of\x20php\x20generated\x20classes.\x20Default\n\x20is\x20empty.\x20W\
10224 hen\x20this\x20option\x20is\x20empty,\x20the\x20package\x20name\x20will\
10225 \x20be\x20used\x20for\n\x20determining\x20the\x20namespace.\n\n\r\n\x05\
10226 \x04\n\x02\x11\x04\x12\x04\xba\x03\x02\n\n\r\n\x05\x04\n\x02\x11\x05\x12\
10227 \x04\xba\x03\x0b\x11\n\r\n\x05\x04\n\x02\x11\x01\x12\x04\xba\x03\x12\x1f\
10228 \n\r\n\x05\x04\n\x02\x11\x03\x12\x04\xba\x03\"$\n\xca\x01\n\x04\x04\n\
10229 \x02\x12\x12\x04\xbf\x03\x02.\x1a\xbb\x01\x20Use\x20this\x20option\x20to\
10230 \x20change\x20the\x20namespace\x20of\x20php\x20generated\x20metadata\x20\
10231 classes.\n\x20Default\x20is\x20empty.\x20When\x20this\x20option\x20is\
10232 \x20empty,\x20the\x20proto\x20file\x20name\x20will\x20be\n\x20used\x20fo\
10233 r\x20determining\x20the\x20namespace.\n\n\r\n\x05\x04\n\x02\x12\x04\x12\
10234 \x04\xbf\x03\x02\n\n\r\n\x05\x04\n\x02\x12\x05\x12\x04\xbf\x03\x0b\x11\n\
10235 \r\n\x05\x04\n\x02\x12\x01\x12\x04\xbf\x03\x12(\n\r\n\x05\x04\n\x02\x12\
10236 \x03\x12\x04\xbf\x03+-\n\xc2\x01\n\x04\x04\n\x02\x13\x12\x04\xc4\x03\x02\
10237 $\x1a\xb3\x01\x20Use\x20this\x20option\x20to\x20change\x20the\x20package\
10238 \x20of\x20ruby\x20generated\x20classes.\x20Default\n\x20is\x20empty.\x20\
10239 When\x20this\x20option\x20is\x20not\x20set,\x20the\x20package\x20name\
10240 \x20will\x20be\x20used\x20for\n\x20determining\x20the\x20ruby\x20package\
10241 .\n\n\r\n\x05\x04\n\x02\x13\x04\x12\x04\xc4\x03\x02\n\n\r\n\x05\x04\n\
10242 \x02\x13\x05\x12\x04\xc4\x03\x0b\x11\n\r\n\x05\x04\n\x02\x13\x01\x12\x04\
10243 \xc4\x03\x12\x1e\n\r\n\x05\x04\n\x02\x13\x03\x12\x04\xc4\x03!#\n|\n\x04\
10244 \x04\n\x02\x14\x12\x04\xc9\x03\x02:\x1an\x20The\x20parser\x20stores\x20o\
10245 ptions\x20it\x20doesn't\x20recognize\x20here.\n\x20See\x20the\x20documen\
10246 tation\x20for\x20the\x20\"Options\"\x20section\x20above.\n\n\r\n\x05\x04\
10247 \n\x02\x14\x04\x12\x04\xc9\x03\x02\n\n\r\n\x05\x04\n\x02\x14\x06\x12\x04\
10248 \xc9\x03\x0b\x1e\n\r\n\x05\x04\n\x02\x14\x01\x12\x04\xc9\x03\x1f3\n\r\n\
10249 \x05\x04\n\x02\x14\x03\x12\x04\xc9\x0369\n\x87\x01\n\x03\x04\n\x05\x12\
10250 \x04\xcd\x03\x02\x19\x1az\x20Clients\x20can\x20define\x20custom\x20optio\
10251 ns\x20in\x20extensions\x20of\x20this\x20message.\n\x20See\x20the\x20docu\
10252 mentation\x20for\x20the\x20\"Options\"\x20section\x20above.\n\n\x0c\n\
10253 \x04\x04\n\x05\0\x12\x04\xcd\x03\r\x18\n\r\n\x05\x04\n\x05\0\x01\x12\x04\
10254 \xcd\x03\r\x11\n\r\n\x05\x04\n\x05\0\x02\x12\x04\xcd\x03\x15\x18\n\x0b\n\
10255 \x03\x04\n\t\x12\x04\xcf\x03\x02\x0e\n\x0c\n\x04\x04\n\t\0\x12\x04\xcf\
10256 \x03\x0b\r\n\r\n\x05\x04\n\t\0\x01\x12\x04\xcf\x03\x0b\r\n\r\n\x05\x04\n\
10257 \t\0\x02\x12\x04\xcf\x03\x0b\r\n\x0c\n\x02\x04\x0b\x12\x06\xd2\x03\0\x92\
10258 \x04\x01\n\x0b\n\x03\x04\x0b\x01\x12\x04\xd2\x03\x08\x16\n\xd8\x05\n\x04\
10259 \x04\x0b\x02\0\x12\x04\xe5\x03\x02>\x1a\xc9\x05\x20Set\x20true\x20to\x20\
10260 use\x20the\x20old\x20proto1\x20MessageSet\x20wire\x20format\x20for\x20ex\
10261 tensions.\n\x20This\x20is\x20provided\x20for\x20backwards-compatibility\
10262 \x20with\x20the\x20MessageSet\x20wire\n\x20format.\x20\x20You\x20should\
10263 \x20not\x20use\x20this\x20for\x20any\x20other\x20reason:\x20\x20It's\x20\
10264 less\n\x20efficient,\x20has\x20fewer\x20features,\x20and\x20is\x20more\
10265 \x20complicated.\n\n\x20The\x20message\x20must\x20be\x20defined\x20exact\
10266 ly\x20as\x20follows:\n\x20\x20\x20message\x20Foo\x20{\n\x20\x20\x20\x20\
10267 \x20option\x20message_set_wire_format\x20=\x20true;\n\x20\x20\x20\x20\
10268 \x20extensions\x204\x20to\x20max;\n\x20\x20\x20}\n\x20Note\x20that\x20th\
10269 e\x20message\x20cannot\x20have\x20any\x20defined\x20fields;\x20MessageSe\
10270 ts\x20only\n\x20have\x20extensions.\n\n\x20All\x20extensions\x20of\x20yo\
10271 ur\x20type\x20must\x20be\x20singular\x20messages;\x20e.g.\x20they\x20can\
10272 not\n\x20be\x20int32s,\x20enums,\x20or\x20repeated\x20messages.\n\n\x20B\
10273 ecause\x20this\x20is\x20an\x20option,\x20the\x20above\x20two\x20restrict\
10274 ions\x20are\x20not\x20enforced\x20by\n\x20the\x20protocol\x20compiler.\n\
10275 \n\r\n\x05\x04\x0b\x02\0\x04\x12\x04\xe5\x03\x02\n\n\r\n\x05\x04\x0b\x02\
10276 \0\x05\x12\x04\xe5\x03\x0b\x0f\n\r\n\x05\x04\x0b\x02\0\x01\x12\x04\xe5\
10277 \x03\x10'\n\r\n\x05\x04\x0b\x02\0\x03\x12\x04\xe5\x03*+\n\r\n\x05\x04\
10278 \x0b\x02\0\x08\x12\x04\xe5\x03,=\n\r\n\x05\x04\x0b\x02\0\x07\x12\x04\xe5\
10279 \x037<\n\xeb\x01\n\x04\x04\x0b\x02\x01\x12\x04\xea\x03\x02F\x1a\xdc\x01\
10280 \x20Disables\x20the\x20generation\x20of\x20the\x20standard\x20\"descript\
10281 or()\"\x20accessor,\x20which\x20can\n\x20conflict\x20with\x20a\x20field\
10282 \x20of\x20the\x20same\x20name.\x20\x20This\x20is\x20meant\x20to\x20make\
10283 \x20migration\n\x20from\x20proto1\x20easier;\x20new\x20code\x20should\
10284 \x20avoid\x20fields\x20named\x20\"descriptor\".\n\n\r\n\x05\x04\x0b\x02\
10285 \x01\x04\x12\x04\xea\x03\x02\n\n\r\n\x05\x04\x0b\x02\x01\x05\x12\x04\xea\
10286 \x03\x0b\x0f\n\r\n\x05\x04\x0b\x02\x01\x01\x12\x04\xea\x03\x10/\n\r\n\
10287 \x05\x04\x0b\x02\x01\x03\x12\x04\xea\x0323\n\r\n\x05\x04\x0b\x02\x01\x08\
10288 \x12\x04\xea\x034E\n\r\n\x05\x04\x0b\x02\x01\x07\x12\x04\xea\x03?D\n\xee\
10289 \x01\n\x04\x04\x0b\x02\x02\x12\x04\xf0\x03\x021\x1a\xdf\x01\x20Is\x20thi\
10290 s\x20message\x20deprecated?\n\x20Depending\x20on\x20the\x20target\x20pla\
10291 tform,\x20this\x20can\x20emit\x20Deprecated\x20annotations\n\x20for\x20t\
10292 he\x20message,\x20or\x20it\x20will\x20be\x20completely\x20ignored;\x20in\
10293 \x20the\x20very\x20least,\n\x20this\x20is\x20a\x20formalization\x20for\
10294 \x20deprecating\x20messages.\n\n\r\n\x05\x04\x0b\x02\x02\x04\x12\x04\xf0\
10295 \x03\x02\n\n\r\n\x05\x04\x0b\x02\x02\x05\x12\x04\xf0\x03\x0b\x0f\n\r\n\
10296 \x05\x04\x0b\x02\x02\x01\x12\x04\xf0\x03\x10\x1a\n\r\n\x05\x04\x0b\x02\
10297 \x02\x03\x12\x04\xf0\x03\x1d\x1e\n\r\n\x05\x04\x0b\x02\x02\x08\x12\x04\
10298 \xf0\x03\x1f0\n\r\n\x05\x04\x0b\x02\x02\x07\x12\x04\xf0\x03*/\n\xa0\x06\
10299 \n\x04\x04\x0b\x02\x03\x12\x04\x87\x04\x02\x1e\x1a\x91\x06\x20Whether\
10300 \x20the\x20message\x20is\x20an\x20automatically\x20generated\x20map\x20e\
10301 ntry\x20type\x20for\x20the\n\x20maps\x20field.\n\n\x20For\x20maps\x20fie\
10302 lds:\n\x20\x20\x20\x20\x20map<KeyType,\x20ValueType>\x20map_field\x20=\
10303 \x201;\n\x20The\x20parsed\x20descriptor\x20looks\x20like:\n\x20\x20\x20\
10304 \x20\x20message\x20MapFieldEntry\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\
10305 \x20option\x20map_entry\x20=\x20true;\n\x20\x20\x20\x20\x20\x20\x20\x20\
10306 \x20optional\x20KeyType\x20key\x20=\x201;\n\x20\x20\x20\x20\x20\x20\x20\
10307 \x20\x20optional\x20ValueType\x20value\x20=\x202;\n\x20\x20\x20\x20\x20}\
10308 \n\x20\x20\x20\x20\x20repeated\x20MapFieldEntry\x20map_field\x20=\x201;\
10309 \n\n\x20Implementations\x20may\x20choose\x20not\x20to\x20generate\x20the\
10310 \x20map_entry=true\x20message,\x20but\n\x20use\x20a\x20native\x20map\x20\
10311 in\x20the\x20target\x20language\x20to\x20hold\x20the\x20keys\x20and\x20v\
10312 alues.\n\x20The\x20reflection\x20APIs\x20in\x20such\x20implementations\
10313 \x20still\x20need\x20to\x20work\x20as\n\x20if\x20the\x20field\x20is\x20a\
10314 \x20repeated\x20message\x20field.\n\n\x20NOTE:\x20Do\x20not\x20set\x20th\
10315 e\x20option\x20in\x20.proto\x20files.\x20Always\x20use\x20the\x20maps\
10316 \x20syntax\n\x20instead.\x20The\x20option\x20should\x20only\x20be\x20imp\
10317 licitly\x20set\x20by\x20the\x20proto\x20compiler\n\x20parser.\n\n\r\n\
10318 \x05\x04\x0b\x02\x03\x04\x12\x04\x87\x04\x02\n\n\r\n\x05\x04\x0b\x02\x03\
10319 \x05\x12\x04\x87\x04\x0b\x0f\n\r\n\x05\x04\x0b\x02\x03\x01\x12\x04\x87\
10320 \x04\x10\x19\n\r\n\x05\x04\x0b\x02\x03\x03\x12\x04\x87\x04\x1c\x1d\n$\n\
10321 \x03\x04\x0b\t\x12\x04\x89\x04\x02\r\"\x17\x20javalite_serializable\n\n\
10322 \x0c\n\x04\x04\x0b\t\0\x12\x04\x89\x04\x0b\x0c\n\r\n\x05\x04\x0b\t\0\x01\
10323 \x12\x04\x89\x04\x0b\x0c\n\r\n\x05\x04\x0b\t\0\x02\x12\x04\x89\x04\x0b\
10324 \x0c\n\x1f\n\x03\x04\x0b\t\x12\x04\x8a\x04\x02\r\"\x12\x20javanano_as_li\
10325 te\n\n\x0c\n\x04\x04\x0b\t\x01\x12\x04\x8a\x04\x0b\x0c\n\r\n\x05\x04\x0b\
10326 \t\x01\x01\x12\x04\x8a\x04\x0b\x0c\n\r\n\x05\x04\x0b\t\x01\x02\x12\x04\
10327 \x8a\x04\x0b\x0c\nO\n\x04\x04\x0b\x02\x04\x12\x04\x8e\x04\x02:\x1aA\x20T\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010328 he\x20parser\x20stores\x20options\x20it\x20doesn't\x20recognize\x20here.\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010329 \x20See\x20above.\n\n\r\n\x05\x04\x0b\x02\x04\x04\x12\x04\x8e\x04\x02\n\
10330 \n\r\n\x05\x04\x0b\x02\x04\x06\x12\x04\x8e\x04\x0b\x1e\n\r\n\x05\x04\x0b\
10331 \x02\x04\x01\x12\x04\x8e\x04\x1f3\n\r\n\x05\x04\x0b\x02\x04\x03\x12\x04\
10332 \x8e\x0469\nZ\n\x03\x04\x0b\x05\x12\x04\x91\x04\x02\x19\x1aM\x20Clients\
10333 \x20can\x20define\x20custom\x20options\x20in\x20extensions\x20of\x20this\
10334 \x20message.\x20See\x20above.\n\n\x0c\n\x04\x04\x0b\x05\0\x12\x04\x91\
10335 \x04\r\x18\n\r\n\x05\x04\x0b\x05\0\x01\x12\x04\x91\x04\r\x11\n\r\n\x05\
10336 \x04\x0b\x05\0\x02\x12\x04\x91\x04\x15\x18\n\x0c\n\x02\x04\x0c\x12\x06\
10337 \x94\x04\0\xef\x04\x01\n\x0b\n\x03\x04\x0c\x01\x12\x04\x94\x04\x08\x14\n\
10338 \xa3\x02\n\x04\x04\x0c\x02\0\x12\x04\x99\x04\x02.\x1a\x94\x02\x20The\x20\
10339 ctype\x20option\x20instructs\x20the\x20C++\x20code\x20generator\x20to\
10340 \x20use\x20a\x20different\n\x20representation\x20of\x20the\x20field\x20t\
10341 han\x20it\x20normally\x20would.\x20\x20See\x20the\x20specific\n\x20optio\
10342 ns\x20below.\x20\x20This\x20option\x20is\x20not\x20yet\x20implemented\
10343 \x20in\x20the\x20open\x20source\n\x20release\x20--\x20sorry,\x20we'll\
10344 \x20try\x20to\x20include\x20it\x20in\x20a\x20future\x20version!\n\n\r\n\
10345 \x05\x04\x0c\x02\0\x04\x12\x04\x99\x04\x02\n\n\r\n\x05\x04\x0c\x02\0\x06\
10346 \x12\x04\x99\x04\x0b\x10\n\r\n\x05\x04\x0c\x02\0\x01\x12\x04\x99\x04\x11\
10347 \x16\n\r\n\x05\x04\x0c\x02\0\x03\x12\x04\x99\x04\x19\x1a\n\r\n\x05\x04\
10348 \x0c\x02\0\x08\x12\x04\x99\x04\x1b-\n\r\n\x05\x04\x0c\x02\0\x07\x12\x04\
10349 \x99\x04&,\n\x0e\n\x04\x04\x0c\x04\0\x12\x06\x9a\x04\x02\xa1\x04\x03\n\r\
10350 \n\x05\x04\x0c\x04\0\x01\x12\x04\x9a\x04\x07\x0c\n\x1f\n\x06\x04\x0c\x04\
10351 \0\x02\0\x12\x04\x9c\x04\x04\x0f\x1a\x0f\x20Default\x20mode.\n\n\x0f\n\
10352 \x07\x04\x0c\x04\0\x02\0\x01\x12\x04\x9c\x04\x04\n\n\x0f\n\x07\x04\x0c\
10353 \x04\0\x02\0\x02\x12\x04\x9c\x04\r\x0e\n\x0e\n\x06\x04\x0c\x04\0\x02\x01\
10354 \x12\x04\x9e\x04\x04\r\n\x0f\n\x07\x04\x0c\x04\0\x02\x01\x01\x12\x04\x9e\
10355 \x04\x04\x08\n\x0f\n\x07\x04\x0c\x04\0\x02\x01\x02\x12\x04\x9e\x04\x0b\
10356 \x0c\n\x0e\n\x06\x04\x0c\x04\0\x02\x02\x12\x04\xa0\x04\x04\x15\n\x0f\n\
10357 \x07\x04\x0c\x04\0\x02\x02\x01\x12\x04\xa0\x04\x04\x10\n\x0f\n\x07\x04\
10358 \x0c\x04\0\x02\x02\x02\x12\x04\xa0\x04\x13\x14\n\xda\x02\n\x04\x04\x0c\
10359 \x02\x01\x12\x04\xa7\x04\x02\x1b\x1a\xcb\x02\x20The\x20packed\x20option\
10360 \x20can\x20be\x20enabled\x20for\x20repeated\x20primitive\x20fields\x20to\
10361 \x20enable\n\x20a\x20more\x20efficient\x20representation\x20on\x20the\
10362 \x20wire.\x20Rather\x20than\x20repeatedly\n\x20writing\x20the\x20tag\x20\
10363 and\x20type\x20for\x20each\x20element,\x20the\x20entire\x20array\x20is\
10364 \x20encoded\x20as\n\x20a\x20single\x20length-delimited\x20blob.\x20In\
10365 \x20proto3,\x20only\x20explicit\x20setting\x20it\x20to\n\x20false\x20wil\
10366 l\x20avoid\x20using\x20packed\x20encoding.\n\n\r\n\x05\x04\x0c\x02\x01\
10367 \x04\x12\x04\xa7\x04\x02\n\n\r\n\x05\x04\x0c\x02\x01\x05\x12\x04\xa7\x04\
10368 \x0b\x0f\n\r\n\x05\x04\x0c\x02\x01\x01\x12\x04\xa7\x04\x10\x16\n\r\n\x05\
10369 \x04\x0c\x02\x01\x03\x12\x04\xa7\x04\x19\x1a\n\x9a\x05\n\x04\x04\x0c\x02\
10370 \x02\x12\x04\xb4\x04\x023\x1a\x8b\x05\x20The\x20jstype\x20option\x20dete\
10371 rmines\x20the\x20JavaScript\x20type\x20used\x20for\x20values\x20of\x20th\
10372 e\n\x20field.\x20\x20The\x20option\x20is\x20permitted\x20only\x20for\x20\
10373 64\x20bit\x20integral\x20and\x20fixed\x20types\n\x20(int64,\x20uint64,\
10374 \x20sint64,\x20fixed64,\x20sfixed64).\x20\x20A\x20field\x20with\x20jstyp\
10375 e\x20JS_STRING\n\x20is\x20represented\x20as\x20JavaScript\x20string,\x20\
10376 which\x20avoids\x20loss\x20of\x20precision\x20that\n\x20can\x20happen\
10377 \x20when\x20a\x20large\x20value\x20is\x20converted\x20to\x20a\x20floatin\
10378 g\x20point\x20JavaScript.\n\x20Specifying\x20JS_NUMBER\x20for\x20the\x20\
10379 jstype\x20causes\x20the\x20generated\x20JavaScript\x20code\x20to\n\x20us\
10380 e\x20the\x20JavaScript\x20\"number\"\x20type.\x20\x20The\x20behavior\x20\
10381 of\x20the\x20default\x20option\n\x20JS_NORMAL\x20is\x20implementation\
10382 \x20dependent.\n\n\x20This\x20option\x20is\x20an\x20enum\x20to\x20permit\
10383 \x20additional\x20types\x20to\x20be\x20added,\x20e.g.\n\x20goog.math.Int\
10384 eger.\n\n\r\n\x05\x04\x0c\x02\x02\x04\x12\x04\xb4\x04\x02\n\n\r\n\x05\
10385 \x04\x0c\x02\x02\x06\x12\x04\xb4\x04\x0b\x11\n\r\n\x05\x04\x0c\x02\x02\
10386 \x01\x12\x04\xb4\x04\x12\x18\n\r\n\x05\x04\x0c\x02\x02\x03\x12\x04\xb4\
10387 \x04\x1b\x1c\n\r\n\x05\x04\x0c\x02\x02\x08\x12\x04\xb4\x04\x1d2\n\r\n\
10388 \x05\x04\x0c\x02\x02\x07\x12\x04\xb4\x04(1\n\x0e\n\x04\x04\x0c\x04\x01\
10389 \x12\x06\xb5\x04\x02\xbe\x04\x03\n\r\n\x05\x04\x0c\x04\x01\x01\x12\x04\
10390 \xb5\x04\x07\r\n'\n\x06\x04\x0c\x04\x01\x02\0\x12\x04\xb7\x04\x04\x12\
10391 \x1a\x17\x20Use\x20the\x20default\x20type.\n\n\x0f\n\x07\x04\x0c\x04\x01\
10392 \x02\0\x01\x12\x04\xb7\x04\x04\r\n\x0f\n\x07\x04\x0c\x04\x01\x02\0\x02\
10393 \x12\x04\xb7\x04\x10\x11\n)\n\x06\x04\x0c\x04\x01\x02\x01\x12\x04\xba\
10394 \x04\x04\x12\x1a\x19\x20Use\x20JavaScript\x20strings.\n\n\x0f\n\x07\x04\
10395 \x0c\x04\x01\x02\x01\x01\x12\x04\xba\x04\x04\r\n\x0f\n\x07\x04\x0c\x04\
10396 \x01\x02\x01\x02\x12\x04\xba\x04\x10\x11\n)\n\x06\x04\x0c\x04\x01\x02\
10397 \x02\x12\x04\xbd\x04\x04\x12\x1a\x19\x20Use\x20JavaScript\x20numbers.\n\
10398 \n\x0f\n\x07\x04\x0c\x04\x01\x02\x02\x01\x12\x04\xbd\x04\x04\r\n\x0f\n\
10399 \x07\x04\x0c\x04\x01\x02\x02\x02\x12\x04\xbd\x04\x10\x11\n\xef\x0c\n\x04\
10400 \x04\x0c\x02\x03\x12\x04\xdc\x04\x02+\x1a\xe0\x0c\x20Should\x20this\x20f\
10401 ield\x20be\x20parsed\x20lazily?\x20\x20Lazy\x20applies\x20only\x20to\x20\
10402 message-type\n\x20fields.\x20\x20It\x20means\x20that\x20when\x20the\x20o\
10403 uter\x20message\x20is\x20initially\x20parsed,\x20the\n\x20inner\x20messa\
10404 ge's\x20contents\x20will\x20not\x20be\x20parsed\x20but\x20instead\x20sto\
10405 red\x20in\x20encoded\n\x20form.\x20\x20The\x20inner\x20message\x20will\
10406 \x20actually\x20be\x20parsed\x20when\x20it\x20is\x20first\x20accessed.\n\
10407 \n\x20This\x20is\x20only\x20a\x20hint.\x20\x20Implementations\x20are\x20\
10408 free\x20to\x20choose\x20whether\x20to\x20use\n\x20eager\x20or\x20lazy\
10409 \x20parsing\x20regardless\x20of\x20the\x20value\x20of\x20this\x20option.\
10410 \x20\x20However,\n\x20setting\x20this\x20option\x20true\x20suggests\x20t\
10411 hat\x20the\x20protocol\x20author\x20believes\x20that\n\x20using\x20lazy\
10412 \x20parsing\x20on\x20this\x20field\x20is\x20worth\x20the\x20additional\
10413 \x20bookkeeping\n\x20overhead\x20typically\x20needed\x20to\x20implement\
10414 \x20it.\n\n\x20This\x20option\x20does\x20not\x20affect\x20the\x20public\
10415 \x20interface\x20of\x20any\x20generated\x20code;\n\x20all\x20method\x20s\
10416 ignatures\x20remain\x20the\x20same.\x20\x20Furthermore,\x20thread-safety\
10417 \x20of\x20the\n\x20interface\x20is\x20not\x20affected\x20by\x20this\x20o\
10418 ption;\x20const\x20methods\x20remain\x20safe\x20to\n\x20call\x20from\x20\
10419 multiple\x20threads\x20concurrently,\x20while\x20non-const\x20methods\
10420 \x20continue\n\x20to\x20require\x20exclusive\x20access.\n\n\n\x20Note\
10421 \x20that\x20implementations\x20may\x20choose\x20not\x20to\x20check\x20re\
10422 quired\x20fields\x20within\n\x20a\x20lazy\x20sub-message.\x20\x20That\
10423 \x20is,\x20calling\x20IsInitialized()\x20on\x20the\x20outer\x20message\n\
10424 \x20may\x20return\x20true\x20even\x20if\x20the\x20inner\x20message\x20ha\
10425 s\x20missing\x20required\x20fields.\n\x20This\x20is\x20necessary\x20beca\
10426 use\x20otherwise\x20the\x20inner\x20message\x20would\x20have\x20to\x20be\
10427 \n\x20parsed\x20in\x20order\x20to\x20perform\x20the\x20check,\x20defeati\
10428 ng\x20the\x20purpose\x20of\x20lazy\n\x20parsing.\x20\x20An\x20implementa\
10429 tion\x20which\x20chooses\x20not\x20to\x20check\x20required\x20fields\n\
10430 \x20must\x20be\x20consistent\x20about\x20it.\x20\x20That\x20is,\x20for\
10431 \x20any\x20particular\x20sub-message,\x20the\n\x20implementation\x20must\
10432 \x20either\x20*always*\x20check\x20its\x20required\x20fields,\x20or\x20*\
10433 never*\n\x20check\x20its\x20required\x20fields,\x20regardless\x20of\x20w\
10434 hether\x20or\x20not\x20the\x20message\x20has\n\x20been\x20parsed.\n\n\r\
10435 \n\x05\x04\x0c\x02\x03\x04\x12\x04\xdc\x04\x02\n\n\r\n\x05\x04\x0c\x02\
10436 \x03\x05\x12\x04\xdc\x04\x0b\x0f\n\r\n\x05\x04\x0c\x02\x03\x01\x12\x04\
10437 \xdc\x04\x10\x14\n\r\n\x05\x04\x0c\x02\x03\x03\x12\x04\xdc\x04\x17\x18\n\
10438 \r\n\x05\x04\x0c\x02\x03\x08\x12\x04\xdc\x04\x19*\n\r\n\x05\x04\x0c\x02\
10439 \x03\x07\x12\x04\xdc\x04$)\n\xe8\x01\n\x04\x04\x0c\x02\x04\x12\x04\xe2\
10440 \x04\x021\x1a\xd9\x01\x20Is\x20this\x20field\x20deprecated?\n\x20Dependi\
10441 ng\x20on\x20the\x20target\x20platform,\x20this\x20can\x20emit\x20Depreca\
10442 ted\x20annotations\n\x20for\x20accessors,\x20or\x20it\x20will\x20be\x20c\
10443 ompletely\x20ignored;\x20in\x20the\x20very\x20least,\x20this\n\x20is\x20\
10444 a\x20formalization\x20for\x20deprecating\x20fields.\n\n\r\n\x05\x04\x0c\
10445 \x02\x04\x04\x12\x04\xe2\x04\x02\n\n\r\n\x05\x04\x0c\x02\x04\x05\x12\x04\
10446 \xe2\x04\x0b\x0f\n\r\n\x05\x04\x0c\x02\x04\x01\x12\x04\xe2\x04\x10\x1a\n\
10447 \r\n\x05\x04\x0c\x02\x04\x03\x12\x04\xe2\x04\x1d\x1e\n\r\n\x05\x04\x0c\
10448 \x02\x04\x08\x12\x04\xe2\x04\x1f0\n\r\n\x05\x04\x0c\x02\x04\x07\x12\x04\
10449 \xe2\x04*/\n?\n\x04\x04\x0c\x02\x05\x12\x04\xe5\x04\x02,\x1a1\x20For\x20\
10450 Google-internal\x20migration\x20only.\x20Do\x20not\x20use.\n\n\r\n\x05\
10451 \x04\x0c\x02\x05\x04\x12\x04\xe5\x04\x02\n\n\r\n\x05\x04\x0c\x02\x05\x05\
10452 \x12\x04\xe5\x04\x0b\x0f\n\r\n\x05\x04\x0c\x02\x05\x01\x12\x04\xe5\x04\
10453 \x10\x14\n\r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xe5\x04\x17\x19\n\r\n\x05\
10454 \x04\x0c\x02\x05\x08\x12\x04\xe5\x04\x1a+\n\r\n\x05\x04\x0c\x02\x05\x07\
10455 \x12\x04\xe5\x04%*\nO\n\x04\x04\x0c\x02\x06\x12\x04\xe9\x04\x02:\x1aA\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010456 \x20The\x20parser\x20stores\x20options\x20it\x20doesn't\x20recognize\x20\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010457 here.\x20See\x20above.\n\n\r\n\x05\x04\x0c\x02\x06\x04\x12\x04\xe9\x04\
10458 \x02\n\n\r\n\x05\x04\x0c\x02\x06\x06\x12\x04\xe9\x04\x0b\x1e\n\r\n\x05\
10459 \x04\x0c\x02\x06\x01\x12\x04\xe9\x04\x1f3\n\r\n\x05\x04\x0c\x02\x06\x03\
10460 \x12\x04\xe9\x0469\nZ\n\x03\x04\x0c\x05\x12\x04\xec\x04\x02\x19\x1aM\x20\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010461 Clients\x20can\x20define\x20custom\x20options\x20in\x20extensions\x20of\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010462 \x20this\x20message.\x20See\x20above.\n\n\x0c\n\x04\x04\x0c\x05\0\x12\
10463 \x04\xec\x04\r\x18\n\r\n\x05\x04\x0c\x05\0\x01\x12\x04\xec\x04\r\x11\n\r\
10464 \n\x05\x04\x0c\x05\0\x02\x12\x04\xec\x04\x15\x18\n\x1c\n\x03\x04\x0c\t\
10465 \x12\x04\xee\x04\x02\r\"\x0f\x20removed\x20jtype\n\n\x0c\n\x04\x04\x0c\t\
10466 \0\x12\x04\xee\x04\x0b\x0c\n\r\n\x05\x04\x0c\t\0\x01\x12\x04\xee\x04\x0b\
10467 \x0c\n\r\n\x05\x04\x0c\t\0\x02\x12\x04\xee\x04\x0b\x0c\n\x0c\n\x02\x04\r\
10468 \x12\x06\xf1\x04\0\xf7\x04\x01\n\x0b\n\x03\x04\r\x01\x12\x04\xf1\x04\x08\
10469 \x14\nO\n\x04\x04\r\x02\0\x12\x04\xf3\x04\x02:\x1aA\x20The\x20parser\x20\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010470 stores\x20options\x20it\x20doesn't\x20recognize\x20here.\x20See\x20above\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010471 .\n\n\r\n\x05\x04\r\x02\0\x04\x12\x04\xf3\x04\x02\n\n\r\n\x05\x04\r\x02\
10472 \0\x06\x12\x04\xf3\x04\x0b\x1e\n\r\n\x05\x04\r\x02\0\x01\x12\x04\xf3\x04\
10473 \x1f3\n\r\n\x05\x04\r\x02\0\x03\x12\x04\xf3\x0469\nZ\n\x03\x04\r\x05\x12\
10474 \x04\xf6\x04\x02\x19\x1aM\x20Clients\x20can\x20define\x20custom\x20optio\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010475 ns\x20in\x20extensions\x20of\x20this\x20message.\x20See\x20above.\n\n\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010476 \x0c\n\x04\x04\r\x05\0\x12\x04\xf6\x04\r\x18\n\r\n\x05\x04\r\x05\0\x01\
10477 \x12\x04\xf6\x04\r\x11\n\r\n\x05\x04\r\x05\0\x02\x12\x04\xf6\x04\x15\x18\
10478 \n\x0c\n\x02\x04\x0e\x12\x06\xf9\x04\0\x8c\x05\x01\n\x0b\n\x03\x04\x0e\
10479 \x01\x12\x04\xf9\x04\x08\x13\n`\n\x04\x04\x0e\x02\0\x12\x04\xfd\x04\x02\
10480 \x20\x1aR\x20Set\x20this\x20option\x20to\x20true\x20to\x20allow\x20mappi\
10481 ng\x20different\x20tag\x20names\x20to\x20the\x20same\n\x20value.\n\n\r\n\
10482 \x05\x04\x0e\x02\0\x04\x12\x04\xfd\x04\x02\n\n\r\n\x05\x04\x0e\x02\0\x05\
10483 \x12\x04\xfd\x04\x0b\x0f\n\r\n\x05\x04\x0e\x02\0\x01\x12\x04\xfd\x04\x10\
10484 \x1b\n\r\n\x05\x04\x0e\x02\0\x03\x12\x04\xfd\x04\x1e\x1f\n\xe5\x01\n\x04\
10485 \x04\x0e\x02\x01\x12\x04\x83\x05\x021\x1a\xd6\x01\x20Is\x20this\x20enum\
10486 \x20deprecated?\n\x20Depending\x20on\x20the\x20target\x20platform,\x20th\
10487 is\x20can\x20emit\x20Deprecated\x20annotations\n\x20for\x20the\x20enum,\
10488 \x20or\x20it\x20will\x20be\x20completely\x20ignored;\x20in\x20the\x20ver\
10489 y\x20least,\x20this\n\x20is\x20a\x20formalization\x20for\x20deprecating\
10490 \x20enums.\n\n\r\n\x05\x04\x0e\x02\x01\x04\x12\x04\x83\x05\x02\n\n\r\n\
10491 \x05\x04\x0e\x02\x01\x05\x12\x04\x83\x05\x0b\x0f\n\r\n\x05\x04\x0e\x02\
10492 \x01\x01\x12\x04\x83\x05\x10\x1a\n\r\n\x05\x04\x0e\x02\x01\x03\x12\x04\
10493 \x83\x05\x1d\x1e\n\r\n\x05\x04\x0e\x02\x01\x08\x12\x04\x83\x05\x1f0\n\r\
10494 \n\x05\x04\x0e\x02\x01\x07\x12\x04\x83\x05*/\n\x1f\n\x03\x04\x0e\t\x12\
10495 \x04\x85\x05\x02\r\"\x12\x20javanano_as_lite\n\n\x0c\n\x04\x04\x0e\t\0\
10496 \x12\x04\x85\x05\x0b\x0c\n\r\n\x05\x04\x0e\t\0\x01\x12\x04\x85\x05\x0b\
10497 \x0c\n\r\n\x05\x04\x0e\t\0\x02\x12\x04\x85\x05\x0b\x0c\nO\n\x04\x04\x0e\
10498 \x02\x02\x12\x04\x88\x05\x02:\x1aA\x20The\x20parser\x20stores\x20options\
10499 \x20it\x20doesn't\x20recognize\x20here.\x20See\x20above.\n\n\r\n\x05\x04\
10500 \x0e\x02\x02\x04\x12\x04\x88\x05\x02\n\n\r\n\x05\x04\x0e\x02\x02\x06\x12\
10501 \x04\x88\x05\x0b\x1e\n\r\n\x05\x04\x0e\x02\x02\x01\x12\x04\x88\x05\x1f3\
10502 \n\r\n\x05\x04\x0e\x02\x02\x03\x12\x04\x88\x0569\nZ\n\x03\x04\x0e\x05\
10503 \x12\x04\x8b\x05\x02\x19\x1aM\x20Clients\x20can\x20define\x20custom\x20o\
10504 ptions\x20in\x20extensions\x20of\x20this\x20message.\x20See\x20above.\n\
10505 \n\x0c\n\x04\x04\x0e\x05\0\x12\x04\x8b\x05\r\x18\n\r\n\x05\x04\x0e\x05\0\
10506 \x01\x12\x04\x8b\x05\r\x11\n\r\n\x05\x04\x0e\x05\0\x02\x12\x04\x8b\x05\
10507 \x15\x18\n\x0c\n\x02\x04\x0f\x12\x06\x8e\x05\0\x9a\x05\x01\n\x0b\n\x03\
10508 \x04\x0f\x01\x12\x04\x8e\x05\x08\x18\n\xf7\x01\n\x04\x04\x0f\x02\0\x12\
10509 \x04\x93\x05\x021\x1a\xe8\x01\x20Is\x20this\x20enum\x20value\x20deprecat\
10510 ed?\n\x20Depending\x20on\x20the\x20target\x20platform,\x20this\x20can\
10511 \x20emit\x20Deprecated\x20annotations\n\x20for\x20the\x20enum\x20value,\
10512 \x20or\x20it\x20will\x20be\x20completely\x20ignored;\x20in\x20the\x20ver\
10513 y\x20least,\n\x20this\x20is\x20a\x20formalization\x20for\x20deprecating\
10514 \x20enum\x20values.\n\n\r\n\x05\x04\x0f\x02\0\x04\x12\x04\x93\x05\x02\n\
10515 \n\r\n\x05\x04\x0f\x02\0\x05\x12\x04\x93\x05\x0b\x0f\n\r\n\x05\x04\x0f\
10516 \x02\0\x01\x12\x04\x93\x05\x10\x1a\n\r\n\x05\x04\x0f\x02\0\x03\x12\x04\
10517 \x93\x05\x1d\x1e\n\r\n\x05\x04\x0f\x02\0\x08\x12\x04\x93\x05\x1f0\n\r\n\
10518 \x05\x04\x0f\x02\0\x07\x12\x04\x93\x05*/\nO\n\x04\x04\x0f\x02\x01\x12\
10519 \x04\x96\x05\x02:\x1aA\x20The\x20parser\x20stores\x20options\x20it\x20do\
10520 esn't\x20recognize\x20here.\x20See\x20above.\n\n\r\n\x05\x04\x0f\x02\x01\
10521 \x04\x12\x04\x96\x05\x02\n\n\r\n\x05\x04\x0f\x02\x01\x06\x12\x04\x96\x05\
10522 \x0b\x1e\n\r\n\x05\x04\x0f\x02\x01\x01\x12\x04\x96\x05\x1f3\n\r\n\x05\
10523 \x04\x0f\x02\x01\x03\x12\x04\x96\x0569\nZ\n\x03\x04\x0f\x05\x12\x04\x99\
10524 \x05\x02\x19\x1aM\x20Clients\x20can\x20define\x20custom\x20options\x20in\
10525 \x20extensions\x20of\x20this\x20message.\x20See\x20above.\n\n\x0c\n\x04\
10526 \x04\x0f\x05\0\x12\x04\x99\x05\r\x18\n\r\n\x05\x04\x0f\x05\0\x01\x12\x04\
10527 \x99\x05\r\x11\n\r\n\x05\x04\x0f\x05\0\x02\x12\x04\x99\x05\x15\x18\n\x0c\
10528 \n\x02\x04\x10\x12\x06\x9c\x05\0\xae\x05\x01\n\x0b\n\x03\x04\x10\x01\x12\
10529 \x04\x9c\x05\x08\x16\n\xd9\x03\n\x04\x04\x10\x02\0\x12\x04\xa7\x05\x022\
10530 \x1a\xdf\x01\x20Is\x20this\x20service\x20deprecated?\n\x20Depending\x20o\
10531 n\x20the\x20target\x20platform,\x20this\x20can\x20emit\x20Deprecated\x20\
10532 annotations\n\x20for\x20the\x20service,\x20or\x20it\x20will\x20be\x20com\
10533 pletely\x20ignored;\x20in\x20the\x20very\x20least,\n\x20this\x20is\x20a\
10534 \x20formalization\x20for\x20deprecating\x20services.\n2\xe8\x01\x20Note:\
10535 \x20\x20Field\x20numbers\x201\x20through\x2032\x20are\x20reserved\x20for\
10536 \x20Google's\x20internal\x20RPC\n\x20\x20\x20framework.\x20\x20We\x20apo\
10537 logize\x20for\x20hoarding\x20these\x20numbers\x20to\x20ourselves,\x20but\
10538 \n\x20\x20\x20we\x20were\x20already\x20using\x20them\x20long\x20before\
10539 \x20we\x20decided\x20to\x20release\x20Protocol\n\x20\x20\x20Buffers.\n\n\
10540 \r\n\x05\x04\x10\x02\0\x04\x12\x04\xa7\x05\x02\n\n\r\n\x05\x04\x10\x02\0\
10541 \x05\x12\x04\xa7\x05\x0b\x0f\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xa7\x05\
10542 \x10\x1a\n\r\n\x05\x04\x10\x02\0\x03\x12\x04\xa7\x05\x1d\x1f\n\r\n\x05\
10543 \x04\x10\x02\0\x08\x12\x04\xa7\x05\x201\n\r\n\x05\x04\x10\x02\0\x07\x12\
10544 \x04\xa7\x05+0\nO\n\x04\x04\x10\x02\x01\x12\x04\xaa\x05\x02:\x1aA\x20The\
10545 \x20parser\x20stores\x20options\x20it\x20doesn't\x20recognize\x20here.\
10546 \x20See\x20above.\n\n\r\n\x05\x04\x10\x02\x01\x04\x12\x04\xaa\x05\x02\n\
10547 \n\r\n\x05\x04\x10\x02\x01\x06\x12\x04\xaa\x05\x0b\x1e\n\r\n\x05\x04\x10\
10548 \x02\x01\x01\x12\x04\xaa\x05\x1f3\n\r\n\x05\x04\x10\x02\x01\x03\x12\x04\
10549 \xaa\x0569\nZ\n\x03\x04\x10\x05\x12\x04\xad\x05\x02\x19\x1aM\x20Clients\
10550 \x20can\x20define\x20custom\x20options\x20in\x20extensions\x20of\x20this\
10551 \x20message.\x20See\x20above.\n\n\x0c\n\x04\x04\x10\x05\0\x12\x04\xad\
10552 \x05\r\x18\n\r\n\x05\x04\x10\x05\0\x01\x12\x04\xad\x05\r\x11\n\r\n\x05\
10553 \x04\x10\x05\0\x02\x12\x04\xad\x05\x15\x18\n\x0c\n\x02\x04\x11\x12\x06\
10554 \xb0\x05\0\xcd\x05\x01\n\x0b\n\x03\x04\x11\x01\x12\x04\xb0\x05\x08\x15\n\
10555 \xd6\x03\n\x04\x04\x11\x02\0\x12\x04\xbb\x05\x022\x1a\xdc\x01\x20Is\x20t\
10556 his\x20method\x20deprecated?\n\x20Depending\x20on\x20the\x20target\x20pl\
10557 atform,\x20this\x20can\x20emit\x20Deprecated\x20annotations\n\x20for\x20\
10558 the\x20method,\x20or\x20it\x20will\x20be\x20completely\x20ignored;\x20in\
10559 \x20the\x20very\x20least,\n\x20this\x20is\x20a\x20formalization\x20for\
10560 \x20deprecating\x20methods.\n2\xe8\x01\x20Note:\x20\x20Field\x20numbers\
10561 \x201\x20through\x2032\x20are\x20reserved\x20for\x20Google's\x20internal\
10562 \x20RPC\n\x20\x20\x20framework.\x20\x20We\x20apologize\x20for\x20hoardin\
10563 g\x20these\x20numbers\x20to\x20ourselves,\x20but\n\x20\x20\x20we\x20were\
10564 \x20already\x20using\x20them\x20long\x20before\x20we\x20decided\x20to\
10565 \x20release\x20Protocol\n\x20\x20\x20Buffers.\n\n\r\n\x05\x04\x11\x02\0\
10566 \x04\x12\x04\xbb\x05\x02\n\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xbb\x05\
10567 \x0b\x0f\n\r\n\x05\x04\x11\x02\0\x01\x12\x04\xbb\x05\x10\x1a\n\r\n\x05\
10568 \x04\x11\x02\0\x03\x12\x04\xbb\x05\x1d\x1f\n\r\n\x05\x04\x11\x02\0\x08\
10569 \x12\x04\xbb\x05\x201\n\r\n\x05\x04\x11\x02\0\x07\x12\x04\xbb\x05+0\n\
10570 \xf0\x01\n\x04\x04\x11\x04\0\x12\x06\xc0\x05\x02\xc4\x05\x03\x1a\xdf\x01\
10571 \x20Is\x20this\x20method\x20side-effect-free\x20(or\x20safe\x20in\x20HTT\
10572 P\x20parlance),\x20or\x20idempotent,\n\x20or\x20neither?\x20HTTP\x20base\
10573 d\x20RPC\x20implementation\x20may\x20choose\x20GET\x20verb\x20for\x20saf\
10574 e\n\x20methods,\x20and\x20PUT\x20verb\x20for\x20idempotent\x20methods\
10575 \x20instead\x20of\x20the\x20default\x20POST.\n\n\r\n\x05\x04\x11\x04\0\
10576 \x01\x12\x04\xc0\x05\x07\x17\n\x0e\n\x06\x04\x11\x04\0\x02\0\x12\x04\xc1\
10577 \x05\x04\x1c\n\x0f\n\x07\x04\x11\x04\0\x02\0\x01\x12\x04\xc1\x05\x04\x17\
10578 \n\x0f\n\x07\x04\x11\x04\0\x02\0\x02\x12\x04\xc1\x05\x1a\x1b\n$\n\x06\
10579 \x04\x11\x04\0\x02\x01\x12\x04\xc2\x05\x04\x18\"\x14\x20implies\x20idemp\
10580 otent\n\n\x0f\n\x07\x04\x11\x04\0\x02\x01\x01\x12\x04\xc2\x05\x04\x13\n\
10581 \x0f\n\x07\x04\x11\x04\0\x02\x01\x02\x12\x04\xc2\x05\x16\x17\n7\n\x06\
10582 \x04\x11\x04\0\x02\x02\x12\x04\xc3\x05\x04\x13\"'\x20idempotent,\x20but\
10583 \x20may\x20have\x20side\x20effects\n\n\x0f\n\x07\x04\x11\x04\0\x02\x02\
10584 \x01\x12\x04\xc3\x05\x04\x0e\n\x0f\n\x07\x04\x11\x04\0\x02\x02\x02\x12\
10585 \x04\xc3\x05\x11\x12\n\x0e\n\x04\x04\x11\x02\x01\x12\x06\xc5\x05\x02\xc6\
10586 \x05&\n\r\n\x05\x04\x11\x02\x01\x04\x12\x04\xc5\x05\x02\n\n\r\n\x05\x04\
10587 \x11\x02\x01\x06\x12\x04\xc5\x05\x0b\x1b\n\r\n\x05\x04\x11\x02\x01\x01\
10588 \x12\x04\xc5\x05\x1c-\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xc5\x0502\n\
10589 \r\n\x05\x04\x11\x02\x01\x08\x12\x04\xc6\x05\x06%\n\r\n\x05\x04\x11\x02\
10590 \x01\x07\x12\x04\xc6\x05\x11$\nO\n\x04\x04\x11\x02\x02\x12\x04\xc9\x05\
10591 \x02:\x1aA\x20The\x20parser\x20stores\x20options\x20it\x20doesn't\x20rec\
10592 ognize\x20here.\x20See\x20above.\n\n\r\n\x05\x04\x11\x02\x02\x04\x12\x04\
10593 \xc9\x05\x02\n\n\r\n\x05\x04\x11\x02\x02\x06\x12\x04\xc9\x05\x0b\x1e\n\r\
10594 \n\x05\x04\x11\x02\x02\x01\x12\x04\xc9\x05\x1f3\n\r\n\x05\x04\x11\x02\
10595 \x02\x03\x12\x04\xc9\x0569\nZ\n\x03\x04\x11\x05\x12\x04\xcc\x05\x02\x19\
10596 \x1aM\x20Clients\x20can\x20define\x20custom\x20options\x20in\x20extensio\
10597 ns\x20of\x20this\x20message.\x20See\x20above.\n\n\x0c\n\x04\x04\x11\x05\
10598 \0\x12\x04\xcc\x05\r\x18\n\r\n\x05\x04\x11\x05\0\x01\x12\x04\xcc\x05\r\
10599 \x11\n\r\n\x05\x04\x11\x05\0\x02\x12\x04\xcc\x05\x15\x18\n\x8b\x03\n\x02\
10600 \x04\x12\x12\x06\xd6\x05\0\xea\x05\x01\x1a\xfc\x02\x20A\x20message\x20re\
10601 presenting\x20a\x20option\x20the\x20parser\x20does\x20not\x20recognize.\
10602 \x20This\x20only\n\x20appears\x20in\x20options\x20protos\x20created\x20b\
10603 y\x20the\x20compiler::Parser\x20class.\n\x20DescriptorPool\x20resolves\
10604 \x20these\x20when\x20building\x20Descriptor\x20objects.\x20Therefore,\n\
10605 \x20options\x20protos\x20in\x20descriptor\x20objects\x20(e.g.\x20returne\
10606 d\x20by\x20Descriptor::options(),\n\x20or\x20produced\x20by\x20Descripto\
10607 r::CopyTo())\x20will\x20never\x20have\x20UninterpretedOptions\n\x20in\
10608 \x20them.\n\n\x0b\n\x03\x04\x12\x01\x12\x04\xd6\x05\x08\x1b\n\xcb\x02\n\
10609 \x04\x04\x12\x03\0\x12\x06\xdc\x05\x02\xdf\x05\x03\x1a\xba\x02\x20The\
10610 \x20name\x20of\x20the\x20uninterpreted\x20option.\x20\x20Each\x20string\
10611 \x20represents\x20a\x20segment\x20in\n\x20a\x20dot-separated\x20name.\
10612 \x20\x20is_extension\x20is\x20true\x20iff\x20a\x20segment\x20represents\
10613 \x20an\n\x20extension\x20(denoted\x20with\x20parentheses\x20in\x20option\
10614 s\x20specs\x20in\x20.proto\x20files).\n\x20E.g.,{\x20[\"foo\",\x20false]\
10615 ,\x20[\"bar.baz\",\x20true],\x20[\"qux\",\x20false]\x20}\x20represents\n\
10616 \x20\"foo.(bar.baz).qux\".\n\n\r\n\x05\x04\x12\x03\0\x01\x12\x04\xdc\x05\
10617 \n\x12\n\x0e\n\x06\x04\x12\x03\0\x02\0\x12\x04\xdd\x05\x04\"\n\x0f\n\x07\
10618 \x04\x12\x03\0\x02\0\x04\x12\x04\xdd\x05\x04\x0c\n\x0f\n\x07\x04\x12\x03\
10619 \0\x02\0\x05\x12\x04\xdd\x05\r\x13\n\x0f\n\x07\x04\x12\x03\0\x02\0\x01\
10620 \x12\x04\xdd\x05\x14\x1d\n\x0f\n\x07\x04\x12\x03\0\x02\0\x03\x12\x04\xdd\
10621 \x05\x20!\n\x0e\n\x06\x04\x12\x03\0\x02\x01\x12\x04\xde\x05\x04#\n\x0f\n\
10622 \x07\x04\x12\x03\0\x02\x01\x04\x12\x04\xde\x05\x04\x0c\n\x0f\n\x07\x04\
10623 \x12\x03\0\x02\x01\x05\x12\x04\xde\x05\r\x11\n\x0f\n\x07\x04\x12\x03\0\
10624 \x02\x01\x01\x12\x04\xde\x05\x12\x1e\n\x0f\n\x07\x04\x12\x03\0\x02\x01\
10625 \x03\x12\x04\xde\x05!\"\n\x0c\n\x04\x04\x12\x02\0\x12\x04\xe0\x05\x02\
10626 \x1d\n\r\n\x05\x04\x12\x02\0\x04\x12\x04\xe0\x05\x02\n\n\r\n\x05\x04\x12\
10627 \x02\0\x06\x12\x04\xe0\x05\x0b\x13\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\
10628 \xe0\x05\x14\x18\n\r\n\x05\x04\x12\x02\0\x03\x12\x04\xe0\x05\x1b\x1c\n\
10629 \x9c\x01\n\x04\x04\x12\x02\x01\x12\x04\xe4\x05\x02'\x1a\x8d\x01\x20The\
10630 \x20value\x20of\x20the\x20uninterpreted\x20option,\x20in\x20whatever\x20\
10631 type\x20the\x20tokenizer\n\x20identified\x20it\x20as\x20during\x20parsin\
10632 g.\x20Exactly\x20one\x20of\x20these\x20should\x20be\x20set.\n\n\r\n\x05\
10633 \x04\x12\x02\x01\x04\x12\x04\xe4\x05\x02\n\n\r\n\x05\x04\x12\x02\x01\x05\
10634 \x12\x04\xe4\x05\x0b\x11\n\r\n\x05\x04\x12\x02\x01\x01\x12\x04\xe4\x05\
10635 \x12\"\n\r\n\x05\x04\x12\x02\x01\x03\x12\x04\xe4\x05%&\n\x0c\n\x04\x04\
10636 \x12\x02\x02\x12\x04\xe5\x05\x02)\n\r\n\x05\x04\x12\x02\x02\x04\x12\x04\
10637 \xe5\x05\x02\n\n\r\n\x05\x04\x12\x02\x02\x05\x12\x04\xe5\x05\x0b\x11\n\r\
10638 \n\x05\x04\x12\x02\x02\x01\x12\x04\xe5\x05\x12$\n\r\n\x05\x04\x12\x02\
10639 \x02\x03\x12\x04\xe5\x05'(\n\x0c\n\x04\x04\x12\x02\x03\x12\x04\xe6\x05\
10640 \x02(\n\r\n\x05\x04\x12\x02\x03\x04\x12\x04\xe6\x05\x02\n\n\r\n\x05\x04\
10641 \x12\x02\x03\x05\x12\x04\xe6\x05\x0b\x10\n\r\n\x05\x04\x12\x02\x03\x01\
10642 \x12\x04\xe6\x05\x11#\n\r\n\x05\x04\x12\x02\x03\x03\x12\x04\xe6\x05&'\n\
10643 \x0c\n\x04\x04\x12\x02\x04\x12\x04\xe7\x05\x02#\n\r\n\x05\x04\x12\x02\
10644 \x04\x04\x12\x04\xe7\x05\x02\n\n\r\n\x05\x04\x12\x02\x04\x05\x12\x04\xe7\
10645 \x05\x0b\x11\n\r\n\x05\x04\x12\x02\x04\x01\x12\x04\xe7\x05\x12\x1e\n\r\n\
10646 \x05\x04\x12\x02\x04\x03\x12\x04\xe7\x05!\"\n\x0c\n\x04\x04\x12\x02\x05\
10647 \x12\x04\xe8\x05\x02\"\n\r\n\x05\x04\x12\x02\x05\x04\x12\x04\xe8\x05\x02\
10648 \n\n\r\n\x05\x04\x12\x02\x05\x05\x12\x04\xe8\x05\x0b\x10\n\r\n\x05\x04\
10649 \x12\x02\x05\x01\x12\x04\xe8\x05\x11\x1d\n\r\n\x05\x04\x12\x02\x05\x03\
10650 \x12\x04\xe8\x05\x20!\n\x0c\n\x04\x04\x12\x02\x06\x12\x04\xe9\x05\x02&\n\
10651 \r\n\x05\x04\x12\x02\x06\x04\x12\x04\xe9\x05\x02\n\n\r\n\x05\x04\x12\x02\
10652 \x06\x05\x12\x04\xe9\x05\x0b\x11\n\r\n\x05\x04\x12\x02\x06\x01\x12\x04\
10653 \xe9\x05\x12!\n\r\n\x05\x04\x12\x02\x06\x03\x12\x04\xe9\x05$%\n\xda\x01\
10654 \n\x02\x04\x13\x12\x06\xf1\x05\0\xf2\x06\x01\x1aj\x20Encapsulates\x20inf\
10655 ormation\x20about\x20the\x20original\x20source\x20file\x20from\x20which\
10656 \x20a\n\x20FileDescriptorProto\x20was\x20generated.\n2`\x20=============\
10657 ======================================================\n\x20Optional\x20\
10658 source\x20code\x20info\n\n\x0b\n\x03\x04\x13\x01\x12\x04\xf1\x05\x08\x16\
10659 \n\x82\x11\n\x04\x04\x13\x02\0\x12\x04\x9d\x06\x02!\x1a\xf3\x10\x20A\x20\
10660 Location\x20identifies\x20a\x20piece\x20of\x20source\x20code\x20in\x20a\
10661 \x20.proto\x20file\x20which\n\x20corresponds\x20to\x20a\x20particular\
10662 \x20definition.\x20\x20This\x20information\x20is\x20intended\n\x20to\x20\
10663 be\x20useful\x20to\x20IDEs,\x20code\x20indexers,\x20documentation\x20gen\
10664 erators,\x20and\x20similar\n\x20tools.\n\n\x20For\x20example,\x20say\x20\
10665 we\x20have\x20a\x20file\x20like:\n\x20\x20\x20message\x20Foo\x20{\n\x20\
10666 \x20\x20\x20\x20optional\x20string\x20foo\x20=\x201;\n\x20\x20\x20}\n\
10667 \x20Let's\x20look\x20at\x20just\x20the\x20field\x20definition:\n\x20\x20\
10668 \x20optional\x20string\x20foo\x20=\x201;\n\x20\x20\x20^\x20\x20\x20\x20\
10669 \x20\x20\x20^^\x20\x20\x20\x20\x20^^\x20\x20^\x20\x20^^^\n\x20\x20\x20a\
10670 \x20\x20\x20\x20\x20\x20\x20bc\x20\x20\x20\x20\x20de\x20\x20f\x20\x20ghi\
10671 \n\x20We\x20have\x20the\x20following\x20locations:\n\x20\x20\x20span\x20\
10672 \x20\x20path\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
10673 represents\n\x20\x20\x20[a,i)\x20\x20[\x204,\x200,\x202,\x200\x20]\x20\
10674 \x20\x20\x20\x20The\x20whole\x20field\x20definition.\n\x20\x20\x20[a,b)\
10675 \x20\x20[\x204,\x200,\x202,\x200,\x204\x20]\x20\x20The\x20label\x20(opti\
10676 onal).\n\x20\x20\x20[c,d)\x20\x20[\x204,\x200,\x202,\x200,\x205\x20]\x20\
10677 \x20The\x20type\x20(string).\n\x20\x20\x20[e,f)\x20\x20[\x204,\x200,\x20\
10678 2,\x200,\x201\x20]\x20\x20The\x20name\x20(foo).\n\x20\x20\x20[g,h)\x20\
10679 \x20[\x204,\x200,\x202,\x200,\x203\x20]\x20\x20The\x20number\x20(1).\n\n\
10680 \x20Notes:\n\x20-\x20A\x20location\x20may\x20refer\x20to\x20a\x20repeate\
10681 d\x20field\x20itself\x20(i.e.\x20not\x20to\x20any\n\x20\x20\x20particula\
10682 r\x20index\x20within\x20it).\x20\x20This\x20is\x20used\x20whenever\x20a\
10683 \x20set\x20of\x20elements\x20are\n\x20\x20\x20logically\x20enclosed\x20i\
10684 n\x20a\x20single\x20code\x20segment.\x20\x20For\x20example,\x20an\x20ent\
10685 ire\n\x20\x20\x20extend\x20block\x20(possibly\x20containing\x20multiple\
10686 \x20extension\x20definitions)\x20will\n\x20\x20\x20have\x20an\x20outer\
10687 \x20location\x20whose\x20path\x20refers\x20to\x20the\x20\"extensions\"\
10688 \x20repeated\n\x20\x20\x20field\x20without\x20an\x20index.\n\x20-\x20Mul\
10689 tiple\x20locations\x20may\x20have\x20the\x20same\x20path.\x20\x20This\
10690 \x20happens\x20when\x20a\x20single\n\x20\x20\x20logical\x20declaration\
10691 \x20is\x20spread\x20out\x20across\x20multiple\x20places.\x20\x20The\x20m\
10692 ost\n\x20\x20\x20obvious\x20example\x20is\x20the\x20\"extend\"\x20block\
10693 \x20again\x20--\x20there\x20may\x20be\x20multiple\n\x20\x20\x20extend\
10694 \x20blocks\x20in\x20the\x20same\x20scope,\x20each\x20of\x20which\x20will\
10695 \x20have\x20the\x20same\x20path.\n\x20-\x20A\x20location's\x20span\x20is\
10696 \x20not\x20always\x20a\x20subset\x20of\x20its\x20parent's\x20span.\x20\
10697 \x20For\n\x20\x20\x20example,\x20the\x20\"extendee\"\x20of\x20an\x20exte\
10698 nsion\x20declaration\x20appears\x20at\x20the\n\x20\x20\x20beginning\x20o\
10699 f\x20the\x20\"extend\"\x20block\x20and\x20is\x20shared\x20by\x20all\x20e\
10700 xtensions\x20within\n\x20\x20\x20the\x20block.\n\x20-\x20Just\x20because\
10701 \x20a\x20location's\x20span\x20is\x20a\x20subset\x20of\x20some\x20other\
10702 \x20location's\x20span\n\x20\x20\x20does\x20not\x20mean\x20that\x20it\
10703 \x20is\x20a\x20descendant.\x20\x20For\x20example,\x20a\x20\"group\"\x20d\
10704 efines\n\x20\x20\x20both\x20a\x20type\x20and\x20a\x20field\x20in\x20a\
10705 \x20single\x20declaration.\x20\x20Thus,\x20the\x20locations\n\x20\x20\
10706 \x20corresponding\x20to\x20the\x20type\x20and\x20field\x20and\x20their\
10707 \x20components\x20will\x20overlap.\n\x20-\x20Code\x20which\x20tries\x20t\
10708 o\x20interpret\x20locations\x20should\x20probably\x20be\x20designed\x20t\
10709 o\n\x20\x20\x20ignore\x20those\x20that\x20it\x20doesn't\x20understand,\
10710 \x20as\x20more\x20types\x20of\x20locations\x20could\n\x20\x20\x20be\x20r\
10711 ecorded\x20in\x20the\x20future.\n\n\r\n\x05\x04\x13\x02\0\x04\x12\x04\
10712 \x9d\x06\x02\n\n\r\n\x05\x04\x13\x02\0\x06\x12\x04\x9d\x06\x0b\x13\n\r\n\
10713 \x05\x04\x13\x02\0\x01\x12\x04\x9d\x06\x14\x1c\n\r\n\x05\x04\x13\x02\0\
10714 \x03\x12\x04\x9d\x06\x1f\x20\n\x0e\n\x04\x04\x13\x03\0\x12\x06\x9e\x06\
10715 \x02\xf1\x06\x03\n\r\n\x05\x04\x13\x03\0\x01\x12\x04\x9e\x06\n\x12\n\x83\
10716 \x07\n\x06\x04\x13\x03\0\x02\0\x12\x04\xb6\x06\x04,\x1a\xf2\x06\x20Ident\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010717 ifies\x20which\x20part\x20of\x20the\x20FileDescriptorProto\x20was\x20def\
10718 ined\x20at\x20this\n\x20location.\n\n\x20Each\x20element\x20is\x20a\x20f\
10719 ield\x20number\x20or\x20an\x20index.\x20\x20They\x20form\x20a\x20path\
10720 \x20from\n\x20the\x20root\x20FileDescriptorProto\x20to\x20the\x20place\
10721 \x20where\x20the\x20definition.\x20\x20For\n\x20example,\x20this\x20path\
10722 :\n\x20\x20\x20[\x204,\x203,\x202,\x207,\x201\x20]\n\x20refers\x20to:\n\
10723 \x20\x20\x20file.message_type(3)\x20\x20//\x204,\x203\n\x20\x20\x20\x20\
10724 \x20\x20\x20.field(7)\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x202,\x207\n\
10725 \x20\x20\x20\x20\x20\x20\x20.name()\x20\x20\x20\x20\x20\x20\x20\x20\x20\
10726 \x20\x20//\x201\n\x20This\x20is\x20because\x20FileDescriptorProto.messag\
10727 e_type\x20has\x20field\x20number\x204:\n\x20\x20\x20repeated\x20Descript\
10728 orProto\x20message_type\x20=\x204;\n\x20and\x20DescriptorProto.field\x20\
10729 has\x20field\x20number\x202:\n\x20\x20\x20repeated\x20FieldDescriptorPro\
10730 to\x20field\x20=\x202;\n\x20and\x20FieldDescriptorProto.name\x20has\x20f\
10731 ield\x20number\x201:\n\x20\x20\x20optional\x20string\x20name\x20=\x201;\
10732 \n\n\x20Thus,\x20the\x20above\x20path\x20gives\x20the\x20location\x20of\
10733 \x20a\x20field\x20name.\x20\x20If\x20we\x20removed\n\x20the\x20last\x20e\
10734 lement:\n\x20\x20\x20[\x204,\x203,\x202,\x207\x20]\n\x20this\x20path\x20\
10735 refers\x20to\x20the\x20whole\x20field\x20declaration\x20(from\x20the\x20\
10736 beginning\n\x20of\x20the\x20label\x20to\x20the\x20terminating\x20semicol\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010737 on).\n\n\x0f\n\x07\x04\x13\x03\0\x02\0\x04\x12\x04\xb6\x06\x04\x0c\n\x0f\
10738 \n\x07\x04\x13\x03\0\x02\0\x05\x12\x04\xb6\x06\r\x12\n\x0f\n\x07\x04\x13\
10739 \x03\0\x02\0\x01\x12\x04\xb6\x06\x13\x17\n\x0f\n\x07\x04\x13\x03\0\x02\0\
10740 \x03\x12\x04\xb6\x06\x1a\x1b\n\x0f\n\x07\x04\x13\x03\0\x02\0\x08\x12\x04\
10741 \xb6\x06\x1c+\n\x10\n\x08\x04\x13\x03\0\x02\0\x08\x02\x12\x04\xb6\x06\
10742 \x1d*\n\xd2\x02\n\x06\x04\x13\x03\0\x02\x01\x12\x04\xbd\x06\x04,\x1a\xc1\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010743 \x02\x20Always\x20has\x20exactly\x20three\x20or\x20four\x20elements:\x20\
10744 start\x20line,\x20start\x20column,\n\x20end\x20line\x20(optional,\x20oth\
10745 erwise\x20assumed\x20same\x20as\x20start\x20line),\x20end\x20column.\n\
10746 \x20These\x20are\x20packed\x20into\x20a\x20single\x20field\x20for\x20eff\
10747 iciency.\x20\x20Note\x20that\x20line\n\x20and\x20column\x20numbers\x20ar\
10748 e\x20zero-based\x20--\x20typically\x20you\x20will\x20want\x20to\x20add\n\
10749 \x201\x20to\x20each\x20before\x20displaying\x20to\x20a\x20user.\n\n\x0f\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010750 \n\x07\x04\x13\x03\0\x02\x01\x04\x12\x04\xbd\x06\x04\x0c\n\x0f\n\x07\x04\
10751 \x13\x03\0\x02\x01\x05\x12\x04\xbd\x06\r\x12\n\x0f\n\x07\x04\x13\x03\0\
10752 \x02\x01\x01\x12\x04\xbd\x06\x13\x17\n\x0f\n\x07\x04\x13\x03\0\x02\x01\
10753 \x03\x12\x04\xbd\x06\x1a\x1b\n\x0f\n\x07\x04\x13\x03\0\x02\x01\x08\x12\
10754 \x04\xbd\x06\x1c+\n\x10\n\x08\x04\x13\x03\0\x02\x01\x08\x02\x12\x04\xbd\
10755 \x06\x1d*\n\xa5\x0c\n\x06\x04\x13\x03\0\x02\x02\x12\x04\xee\x06\x04)\x1a\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010756 \x94\x0c\x20If\x20this\x20SourceCodeInfo\x20represents\x20a\x20complete\
10757 \x20declaration,\x20these\x20are\x20any\n\x20comments\x20appearing\x20be\
10758 fore\x20and\x20after\x20the\x20declaration\x20which\x20appear\x20to\x20b\
10759 e\n\x20attached\x20to\x20the\x20declaration.\n\n\x20A\x20series\x20of\
10760 \x20line\x20comments\x20appearing\x20on\x20consecutive\x20lines,\x20with\
10761 \x20no\x20other\n\x20tokens\x20appearing\x20on\x20those\x20lines,\x20wil\
10762 l\x20be\x20treated\x20as\x20a\x20single\x20comment.\n\n\x20leading_detac\
10763 hed_comments\x20will\x20keep\x20paragraphs\x20of\x20comments\x20that\x20\
10764 appear\n\x20before\x20(but\x20not\x20connected\x20to)\x20the\x20current\
10765 \x20element.\x20Each\x20paragraph,\n\x20separated\x20by\x20empty\x20line\
10766 s,\x20will\x20be\x20one\x20comment\x20element\x20in\x20the\x20repeated\n\
10767 \x20field.\n\n\x20Only\x20the\x20comment\x20content\x20is\x20provided;\
10768 \x20comment\x20markers\x20(e.g.\x20//)\x20are\n\x20stripped\x20out.\x20\
10769 \x20For\x20block\x20comments,\x20leading\x20whitespace\x20and\x20an\x20a\
10770 sterisk\n\x20will\x20be\x20stripped\x20from\x20the\x20beginning\x20of\
10771 \x20each\x20line\x20other\x20than\x20the\x20first.\n\x20Newlines\x20are\
10772 \x20included\x20in\x20the\x20output.\n\n\x20Examples:\n\n\x20\x20\x20opt\
10773 ional\x20int32\x20foo\x20=\x201;\x20\x20//\x20Comment\x20attached\x20to\
10774 \x20foo.\n\x20\x20\x20//\x20Comment\x20attached\x20to\x20bar.\n\x20\x20\
10775 \x20optional\x20int32\x20bar\x20=\x202;\n\n\x20\x20\x20optional\x20strin\
10776 g\x20baz\x20=\x203;\n\x20\x20\x20//\x20Comment\x20attached\x20to\x20baz.\
10777 \n\x20\x20\x20//\x20Another\x20line\x20attached\x20to\x20baz.\n\n\x20\
10778 \x20\x20//\x20Comment\x20attached\x20to\x20qux.\n\x20\x20\x20//\n\x20\
10779 \x20\x20//\x20Another\x20line\x20attached\x20to\x20qux.\n\x20\x20\x20opt\
10780 ional\x20double\x20qux\x20=\x204;\n\n\x20\x20\x20//\x20Detached\x20comme\
10781 nt\x20for\x20corge.\x20This\x20is\x20not\x20leading\x20or\x20trailing\
10782 \x20comments\n\x20\x20\x20//\x20to\x20qux\x20or\x20corge\x20because\x20t\
10783 here\x20are\x20blank\x20lines\x20separating\x20it\x20from\n\x20\x20\x20/\
10784 /\x20both.\n\n\x20\x20\x20//\x20Detached\x20comment\x20for\x20corge\x20p\
10785 aragraph\x202.\n\n\x20\x20\x20optional\x20string\x20corge\x20=\x205;\n\
10786 \x20\x20\x20/*\x20Block\x20comment\x20attached\n\x20\x20\x20\x20*\x20to\
10787 \x20corge.\x20\x20Leading\x20asterisks\n\x20\x20\x20\x20*\x20will\x20be\
10788 \x20removed.\x20*/\n\x20\x20\x20/*\x20Block\x20comment\x20attached\x20to\
10789 \n\x20\x20\x20\x20*\x20grault.\x20*/\n\x20\x20\x20optional\x20int32\x20g\
10790 rault\x20=\x206;\n\n\x20\x20\x20//\x20ignored\x20detached\x20comments.\n\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010791 \n\x0f\n\x07\x04\x13\x03\0\x02\x02\x04\x12\x04\xee\x06\x04\x0c\n\x0f\n\
10792 \x07\x04\x13\x03\0\x02\x02\x05\x12\x04\xee\x06\r\x13\n\x0f\n\x07\x04\x13\
10793 \x03\0\x02\x02\x01\x12\x04\xee\x06\x14$\n\x0f\n\x07\x04\x13\x03\0\x02\
10794 \x02\x03\x12\x04\xee\x06'(\n\x0e\n\x06\x04\x13\x03\0\x02\x03\x12\x04\xef\
10795 \x06\x04*\n\x0f\n\x07\x04\x13\x03\0\x02\x03\x04\x12\x04\xef\x06\x04\x0c\
10796 \n\x0f\n\x07\x04\x13\x03\0\x02\x03\x05\x12\x04\xef\x06\r\x13\n\x0f\n\x07\
10797 \x04\x13\x03\0\x02\x03\x01\x12\x04\xef\x06\x14%\n\x0f\n\x07\x04\x13\x03\
10798 \0\x02\x03\x03\x12\x04\xef\x06()\n\x0e\n\x06\x04\x13\x03\0\x02\x04\x12\
10799 \x04\xf0\x06\x042\n\x0f\n\x07\x04\x13\x03\0\x02\x04\x04\x12\x04\xf0\x06\
10800 \x04\x0c\n\x0f\n\x07\x04\x13\x03\0\x02\x04\x05\x12\x04\xf0\x06\r\x13\n\
10801 \x0f\n\x07\x04\x13\x03\0\x02\x04\x01\x12\x04\xf0\x06\x14-\n\x0f\n\x07\
10802 \x04\x13\x03\0\x02\x04\x03\x12\x04\xf0\x0601\n\xee\x01\n\x02\x04\x14\x12\
10803 \x06\xf7\x06\0\x8c\x07\x01\x1a\xdf\x01\x20Describes\x20the\x20relationsh\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010804 ip\x20between\x20generated\x20code\x20and\x20its\x20original\x20source\n\
10805 \x20file.\x20A\x20GeneratedCodeInfo\x20message\x20is\x20associated\x20wi\
10806 th\x20only\x20one\x20generated\n\x20source\x20file,\x20but\x20may\x20con\
10807 tain\x20references\x20to\x20different\x20source\x20.proto\x20files.\n\n\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010808 \x0b\n\x03\x04\x14\x01\x12\x04\xf7\x06\x08\x19\nx\n\x04\x04\x14\x02\0\
10809 \x12\x04\xfa\x06\x02%\x1aj\x20An\x20Annotation\x20connects\x20some\x20sp\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010810 an\x20of\x20text\x20in\x20generated\x20code\x20to\x20an\x20element\n\x20\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010811 of\x20its\x20generating\x20.proto\x20file.\n\n\r\n\x05\x04\x14\x02\0\x04\
10812 \x12\x04\xfa\x06\x02\n\n\r\n\x05\x04\x14\x02\0\x06\x12\x04\xfa\x06\x0b\
10813 \x15\n\r\n\x05\x04\x14\x02\0\x01\x12\x04\xfa\x06\x16\x20\n\r\n\x05\x04\
10814 \x14\x02\0\x03\x12\x04\xfa\x06#$\n\x0e\n\x04\x04\x14\x03\0\x12\x06\xfb\
10815 \x06\x02\x8b\x07\x03\n\r\n\x05\x04\x14\x03\0\x01\x12\x04\xfb\x06\n\x14\n\
10816 \x8f\x01\n\x06\x04\x14\x03\0\x02\0\x12\x04\xfe\x06\x04,\x1a\x7f\x20Ident\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010817 ifies\x20the\x20element\x20in\x20the\x20original\x20source\x20.proto\x20\
10818 file.\x20This\x20field\n\x20is\x20formatted\x20the\x20same\x20as\x20Sour\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010819 ceCodeInfo.Location.path.\n\n\x0f\n\x07\x04\x14\x03\0\x02\0\x04\x12\x04\
10820 \xfe\x06\x04\x0c\n\x0f\n\x07\x04\x14\x03\0\x02\0\x05\x12\x04\xfe\x06\r\
10821 \x12\n\x0f\n\x07\x04\x14\x03\0\x02\0\x01\x12\x04\xfe\x06\x13\x17\n\x0f\n\
10822 \x07\x04\x14\x03\0\x02\0\x03\x12\x04\xfe\x06\x1a\x1b\n\x0f\n\x07\x04\x14\
10823 \x03\0\x02\0\x08\x12\x04\xfe\x06\x1c+\n\x10\n\x08\x04\x14\x03\0\x02\0\
10824 \x08\x02\x12\x04\xfe\x06\x1d*\nO\n\x06\x04\x14\x03\0\x02\x01\x12\x04\x81\
10825 \x07\x04$\x1a?\x20Identifies\x20the\x20filesystem\x20path\x20to\x20the\
10826 \x20original\x20source\x20.proto.\n\n\x0f\n\x07\x04\x14\x03\0\x02\x01\
10827 \x04\x12\x04\x81\x07\x04\x0c\n\x0f\n\x07\x04\x14\x03\0\x02\x01\x05\x12\
10828 \x04\x81\x07\r\x13\n\x0f\n\x07\x04\x14\x03\0\x02\x01\x01\x12\x04\x81\x07\
10829 \x14\x1f\n\x0f\n\x07\x04\x14\x03\0\x02\x01\x03\x12\x04\x81\x07\"#\nw\n\
10830 \x06\x04\x14\x03\0\x02\x02\x12\x04\x85\x07\x04\x1d\x1ag\x20Identifies\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010831 \x20the\x20starting\x20offset\x20in\x20bytes\x20in\x20the\x20generated\
10832 \x20code\n\x20that\x20relates\x20to\x20the\x20identified\x20object.\n\n\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010833 \x0f\n\x07\x04\x14\x03\0\x02\x02\x04\x12\x04\x85\x07\x04\x0c\n\x0f\n\x07\
10834 \x04\x14\x03\0\x02\x02\x05\x12\x04\x85\x07\r\x12\n\x0f\n\x07\x04\x14\x03\
10835 \0\x02\x02\x01\x12\x04\x85\x07\x13\x18\n\x0f\n\x07\x04\x14\x03\0\x02\x02\
10836 \x03\x12\x04\x85\x07\x1b\x1c\n\xdb\x01\n\x06\x04\x14\x03\0\x02\x03\x12\
10837 \x04\x8a\x07\x04\x1b\x1a\xca\x01\x20Identifies\x20the\x20ending\x20offse\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010838 t\x20in\x20bytes\x20in\x20the\x20generated\x20code\x20that\n\x20relates\
10839 \x20to\x20the\x20identified\x20offset.\x20The\x20end\x20offset\x20should\
10840 \x20be\x20one\x20past\n\x20the\x20last\x20relevant\x20byte\x20(so\x20the\
10841 \x20length\x20of\x20the\x20text\x20=\x20end\x20-\x20begin).\n\n\x0f\n\
Haibo Huangca95bfd2021-02-09 17:48:30 -080010842 \x07\x04\x14\x03\0\x02\x03\x04\x12\x04\x8a\x07\x04\x0c\n\x0f\n\x07\x04\
10843 \x14\x03\0\x02\x03\x05\x12\x04\x8a\x07\r\x12\n\x0f\n\x07\x04\x14\x03\0\
10844 \x02\x03\x01\x12\x04\x8a\x07\x13\x16\n\x0f\n\x07\x04\x14\x03\0\x02\x03\
10845 \x03\x12\x04\x8a\x07\x19\x1a\
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010846";
10847
Haibo Huangd32e6ee2020-08-12 13:52:04 -070010848static file_descriptor_proto_lazy: crate::rt::LazyV2<crate::descriptor::FileDescriptorProto> = crate::rt::LazyV2::INIT;
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010849
Haibo Huangd32e6ee2020-08-12 13:52:04 -070010850fn parse_descriptor_proto() -> crate::descriptor::FileDescriptorProto {
Haibo Huang914311b2021-01-07 18:06:15 -080010851 crate::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010852}
10853
Haibo Huangd32e6ee2020-08-12 13:52:04 -070010854pub fn file_descriptor_proto() -> &'static crate::descriptor::FileDescriptorProto {
Haibo Huang52aa7852020-07-10 20:23:55 -070010855 file_descriptor_proto_lazy.get(|| {
10856 parse_descriptor_proto()
10857 })
Chih-Hung Hsiehcfc3a232020-06-10 20:13:05 -070010858}