Skip to main content

buffa_descriptor/generated/
google.protobuf.descriptor.rs

1// @generated by protoc-gen-buffa. DO NOT EDIT.
2// source: google/protobuf/descriptor.proto
3
4/// The full set of known editions.
5#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
6#[repr(i32)]
7pub enum Edition {
8    /// A placeholder for an unknown edition value.
9    EDITION_UNKNOWN = 0i32,
10    /// A placeholder edition for specifying default behaviors *before* a feature
11    /// was first introduced.  This is effectively an "infinite past".
12    EDITION_LEGACY = 900i32,
13    /// Legacy syntax "editions".  These pre-date editions, but behave much like
14    /// distinct editions.  These can't be used to specify the edition of proto
15    /// files, but feature definitions must supply proto2/proto3 defaults for
16    /// backwards compatibility.
17    EDITION_PROTO2 = 998i32,
18    EDITION_PROTO3 = 999i32,
19    /// Editions that have been released.  The specific values are arbitrary and
20    /// should not be depended on, but they will always be time-ordered for easy
21    /// comparison.
22    EDITION_2023 = 1000i32,
23    EDITION_2024 = 1001i32,
24    /// A placeholder edition for developing and testing unscheduled features.
25    EDITION_UNSTABLE = 9999i32,
26    /// Placeholder editions for testing feature resolution.  These should not be
27    /// used or relied on outside of tests.
28    EDITION_1_TEST_ONLY = 1i32,
29    EDITION_2_TEST_ONLY = 2i32,
30    EDITION_99997_TEST_ONLY = 99997i32,
31    EDITION_99998_TEST_ONLY = 99998i32,
32    EDITION_99999_TEST_ONLY = 99999i32,
33    /// Placeholder for specifying unbounded edition support.  This should only
34    /// ever be used by plugins that can expect to never require any changes to
35    /// support a new edition.
36    EDITION_MAX = 2147483647i32,
37}
38impl ::core::default::Default for Edition {
39    fn default() -> Self {
40        Self::EDITION_UNKNOWN
41    }
42}
43impl ::buffa::Enumeration for Edition {
44    fn from_i32(value: i32) -> ::core::option::Option<Self> {
45        match value {
46            0i32 => ::core::option::Option::Some(Self::EDITION_UNKNOWN),
47            900i32 => ::core::option::Option::Some(Self::EDITION_LEGACY),
48            998i32 => ::core::option::Option::Some(Self::EDITION_PROTO2),
49            999i32 => ::core::option::Option::Some(Self::EDITION_PROTO3),
50            1000i32 => ::core::option::Option::Some(Self::EDITION_2023),
51            1001i32 => ::core::option::Option::Some(Self::EDITION_2024),
52            9999i32 => ::core::option::Option::Some(Self::EDITION_UNSTABLE),
53            1i32 => ::core::option::Option::Some(Self::EDITION_1_TEST_ONLY),
54            2i32 => ::core::option::Option::Some(Self::EDITION_2_TEST_ONLY),
55            99997i32 => ::core::option::Option::Some(Self::EDITION_99997_TEST_ONLY),
56            99998i32 => ::core::option::Option::Some(Self::EDITION_99998_TEST_ONLY),
57            99999i32 => ::core::option::Option::Some(Self::EDITION_99999_TEST_ONLY),
58            2147483647i32 => ::core::option::Option::Some(Self::EDITION_MAX),
59            _ => ::core::option::Option::None,
60        }
61    }
62    fn to_i32(&self) -> i32 {
63        *self as i32
64    }
65    fn proto_name(&self) -> &'static str {
66        match self {
67            Self::EDITION_UNKNOWN => "EDITION_UNKNOWN",
68            Self::EDITION_LEGACY => "EDITION_LEGACY",
69            Self::EDITION_PROTO2 => "EDITION_PROTO2",
70            Self::EDITION_PROTO3 => "EDITION_PROTO3",
71            Self::EDITION_2023 => "EDITION_2023",
72            Self::EDITION_2024 => "EDITION_2024",
73            Self::EDITION_UNSTABLE => "EDITION_UNSTABLE",
74            Self::EDITION_1_TEST_ONLY => "EDITION_1_TEST_ONLY",
75            Self::EDITION_2_TEST_ONLY => "EDITION_2_TEST_ONLY",
76            Self::EDITION_99997_TEST_ONLY => "EDITION_99997_TEST_ONLY",
77            Self::EDITION_99998_TEST_ONLY => "EDITION_99998_TEST_ONLY",
78            Self::EDITION_99999_TEST_ONLY => "EDITION_99999_TEST_ONLY",
79            Self::EDITION_MAX => "EDITION_MAX",
80        }
81    }
82    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
83        match name {
84            "EDITION_UNKNOWN" => ::core::option::Option::Some(Self::EDITION_UNKNOWN),
85            "EDITION_LEGACY" => ::core::option::Option::Some(Self::EDITION_LEGACY),
86            "EDITION_PROTO2" => ::core::option::Option::Some(Self::EDITION_PROTO2),
87            "EDITION_PROTO3" => ::core::option::Option::Some(Self::EDITION_PROTO3),
88            "EDITION_2023" => ::core::option::Option::Some(Self::EDITION_2023),
89            "EDITION_2024" => ::core::option::Option::Some(Self::EDITION_2024),
90            "EDITION_UNSTABLE" => ::core::option::Option::Some(Self::EDITION_UNSTABLE),
91            "EDITION_1_TEST_ONLY" => {
92                ::core::option::Option::Some(Self::EDITION_1_TEST_ONLY)
93            }
94            "EDITION_2_TEST_ONLY" => {
95                ::core::option::Option::Some(Self::EDITION_2_TEST_ONLY)
96            }
97            "EDITION_99997_TEST_ONLY" => {
98                ::core::option::Option::Some(Self::EDITION_99997_TEST_ONLY)
99            }
100            "EDITION_99998_TEST_ONLY" => {
101                ::core::option::Option::Some(Self::EDITION_99998_TEST_ONLY)
102            }
103            "EDITION_99999_TEST_ONLY" => {
104                ::core::option::Option::Some(Self::EDITION_99999_TEST_ONLY)
105            }
106            "EDITION_MAX" => ::core::option::Option::Some(Self::EDITION_MAX),
107            _ => ::core::option::Option::None,
108        }
109    }
110}
111/// Describes the 'visibility' of a symbol with respect to the proto import
112/// system. Symbols can only be imported when the visibility rules do not prevent
113/// it (ex: local symbols cannot be imported).  Visibility modifiers can only set
114/// on `message` and `enum` as they are the only types available to be referenced
115/// from other files.
116#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
117#[repr(i32)]
118pub enum SymbolVisibility {
119    VISIBILITY_UNSET = 0i32,
120    VISIBILITY_LOCAL = 1i32,
121    VISIBILITY_EXPORT = 2i32,
122}
123impl ::core::default::Default for SymbolVisibility {
124    fn default() -> Self {
125        Self::VISIBILITY_UNSET
126    }
127}
128impl ::buffa::Enumeration for SymbolVisibility {
129    fn from_i32(value: i32) -> ::core::option::Option<Self> {
130        match value {
131            0i32 => ::core::option::Option::Some(Self::VISIBILITY_UNSET),
132            1i32 => ::core::option::Option::Some(Self::VISIBILITY_LOCAL),
133            2i32 => ::core::option::Option::Some(Self::VISIBILITY_EXPORT),
134            _ => ::core::option::Option::None,
135        }
136    }
137    fn to_i32(&self) -> i32 {
138        *self as i32
139    }
140    fn proto_name(&self) -> &'static str {
141        match self {
142            Self::VISIBILITY_UNSET => "VISIBILITY_UNSET",
143            Self::VISIBILITY_LOCAL => "VISIBILITY_LOCAL",
144            Self::VISIBILITY_EXPORT => "VISIBILITY_EXPORT",
145        }
146    }
147    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
148        match name {
149            "VISIBILITY_UNSET" => ::core::option::Option::Some(Self::VISIBILITY_UNSET),
150            "VISIBILITY_LOCAL" => ::core::option::Option::Some(Self::VISIBILITY_LOCAL),
151            "VISIBILITY_EXPORT" => ::core::option::Option::Some(Self::VISIBILITY_EXPORT),
152            _ => ::core::option::Option::None,
153        }
154    }
155}
156/// The protocol compiler can output a FileDescriptorSet containing the .proto
157/// files it parses.
158#[derive(Clone, PartialEq, Default)]
159pub struct FileDescriptorSet {
160    /// Field 1: `file`
161    pub file: ::buffa::alloc::vec::Vec<FileDescriptorProto>,
162    #[doc(hidden)]
163    pub __buffa_unknown_fields: ::buffa::UnknownFields,
164    #[doc(hidden)]
165    pub __buffa_cached_size: ::buffa::__private::CachedSize,
166}
167impl ::core::fmt::Debug for FileDescriptorSet {
168    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
169        f.debug_struct("FileDescriptorSet").field("file", &self.file).finish()
170    }
171}
172impl FileDescriptorSet {
173    /// Protobuf type URL for this message, for use with `Any::pack` and
174    /// `Any::unpack_if`.
175    ///
176    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
177    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FileDescriptorSet";
178}
179unsafe impl ::buffa::DefaultInstance for FileDescriptorSet {
180    fn default_instance() -> &'static Self {
181        static VALUE: ::buffa::__private::OnceBox<FileDescriptorSet> = ::buffa::__private::OnceBox::new();
182        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
183    }
184}
185impl ::buffa::Message for FileDescriptorSet {
186    /// Returns the total encoded size in bytes.
187    ///
188    /// The result is a `u32`; the protobuf specification requires all
189    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
190    /// compliant message will never overflow this type.
191    fn compute_size(&self) -> u32 {
192        #[allow(unused_imports)]
193        use ::buffa::Enumeration as _;
194        let mut size = 0u32;
195        for v in &self.file {
196            let inner_size = v.compute_size();
197            size
198                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
199                    + inner_size;
200        }
201        size += self.__buffa_unknown_fields.encoded_len() as u32;
202        self.__buffa_cached_size.set(size);
203        size
204    }
205    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
206        #[allow(unused_imports)]
207        use ::buffa::Enumeration as _;
208        for v in &self.file {
209            ::buffa::encoding::Tag::new(
210                    1u32,
211                    ::buffa::encoding::WireType::LengthDelimited,
212                )
213                .encode(buf);
214            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
215            v.write_to(buf);
216        }
217        self.__buffa_unknown_fields.write_to(buf);
218    }
219    fn merge_field(
220        &mut self,
221        tag: ::buffa::encoding::Tag,
222        buf: &mut impl ::buffa::bytes::Buf,
223        depth: u32,
224    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
225        #[allow(unused_imports)]
226        use ::buffa::bytes::Buf as _;
227        #[allow(unused_imports)]
228        use ::buffa::Enumeration as _;
229        match tag.field_number() {
230            1u32 => {
231                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
232                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
233                        field_number: 1u32,
234                        expected: 2u8,
235                        actual: tag.wire_type() as u8,
236                    });
237                }
238                let mut elem = ::core::default::Default::default();
239                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
240                self.file.push(elem);
241            }
242            _ => {
243                self.__buffa_unknown_fields
244                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
245            }
246        }
247        ::core::result::Result::Ok(())
248    }
249    fn cached_size(&self) -> u32 {
250        self.__buffa_cached_size.get()
251    }
252    fn clear(&mut self) {
253        self.file.clear();
254        self.__buffa_unknown_fields.clear();
255        self.__buffa_cached_size.set(0);
256    }
257}
258impl ::buffa::ExtensionSet for FileDescriptorSet {
259    const PROTO_FQN: &'static str = "google.protobuf.FileDescriptorSet";
260    fn unknown_fields(&self) -> &::buffa::UnknownFields {
261        &self.__buffa_unknown_fields
262    }
263    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
264        &mut self.__buffa_unknown_fields
265    }
266}
267/// Describes a complete .proto file.
268#[derive(Clone, PartialEq, Default)]
269pub struct FileDescriptorProto {
270    /// file name, relative to root of source tree
271    ///
272    /// Field 1: `name`
273    pub name: Option<::buffa::alloc::string::String>,
274    /// e.g. "foo", "foo.bar", etc.
275    ///
276    /// Field 2: `package`
277    pub package: Option<::buffa::alloc::string::String>,
278    /// Names of files imported by this file.
279    ///
280    /// Field 3: `dependency`
281    pub dependency: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
282    /// Indexes of the public imported files in the dependency list above.
283    ///
284    /// Field 10: `public_dependency`
285    pub public_dependency: ::buffa::alloc::vec::Vec<i32>,
286    /// Indexes of the weak imported files in the dependency list.
287    /// For Google-internal migration only. Do not use.
288    ///
289    /// Field 11: `weak_dependency`
290    pub weak_dependency: ::buffa::alloc::vec::Vec<i32>,
291    /// Names of files imported by this file purely for the purpose of providing
292    /// option extensions. These are excluded from the dependency list above.
293    ///
294    /// Field 15: `option_dependency`
295    pub option_dependency: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
296    /// All top-level definitions in this file.
297    ///
298    /// Field 4: `message_type`
299    pub message_type: ::buffa::alloc::vec::Vec<DescriptorProto>,
300    /// Field 5: `enum_type`
301    pub enum_type: ::buffa::alloc::vec::Vec<EnumDescriptorProto>,
302    /// Field 6: `service`
303    pub service: ::buffa::alloc::vec::Vec<ServiceDescriptorProto>,
304    /// Field 7: `extension`
305    pub extension: ::buffa::alloc::vec::Vec<FieldDescriptorProto>,
306    /// Field 8: `options`
307    pub options: ::buffa::MessageField<FileOptions>,
308    /// This field contains optional information about the original source code.
309    /// You may safely remove this entire field without harming runtime
310    /// functionality of the descriptors -- the information is needed only by
311    /// development tools.
312    ///
313    /// Field 9: `source_code_info`
314    pub source_code_info: ::buffa::MessageField<SourceCodeInfo>,
315    /// The syntax of the proto file.
316    /// The supported values are "proto2", "proto3", and "editions".
317    ///
318    /// If `edition` is present, this value must be "editions".
319    /// WARNING: This field should only be used by protobuf plugins or special
320    /// cases like the proto compiler. Other uses are discouraged and
321    /// developers should rely on the protoreflect APIs for their client language.
322    ///
323    /// Field 12: `syntax`
324    pub syntax: Option<::buffa::alloc::string::String>,
325    /// The edition of the proto file.
326    /// WARNING: This field should only be used by protobuf plugins or special
327    /// cases like the proto compiler. Other uses are discouraged and
328    /// developers should rely on the protoreflect APIs for their client language.
329    ///
330    /// Field 14: `edition`
331    pub edition: Option<Edition>,
332    #[doc(hidden)]
333    pub __buffa_unknown_fields: ::buffa::UnknownFields,
334    #[doc(hidden)]
335    pub __buffa_cached_size: ::buffa::__private::CachedSize,
336}
337impl ::core::fmt::Debug for FileDescriptorProto {
338    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
339        f.debug_struct("FileDescriptorProto")
340            .field("name", &self.name)
341            .field("package", &self.package)
342            .field("dependency", &self.dependency)
343            .field("public_dependency", &self.public_dependency)
344            .field("weak_dependency", &self.weak_dependency)
345            .field("option_dependency", &self.option_dependency)
346            .field("message_type", &self.message_type)
347            .field("enum_type", &self.enum_type)
348            .field("service", &self.service)
349            .field("extension", &self.extension)
350            .field("options", &self.options)
351            .field("source_code_info", &self.source_code_info)
352            .field("syntax", &self.syntax)
353            .field("edition", &self.edition)
354            .finish()
355    }
356}
357impl FileDescriptorProto {
358    /// Protobuf type URL for this message, for use with `Any::pack` and
359    /// `Any::unpack_if`.
360    ///
361    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
362    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FileDescriptorProto";
363}
364unsafe impl ::buffa::DefaultInstance for FileDescriptorProto {
365    fn default_instance() -> &'static Self {
366        static VALUE: ::buffa::__private::OnceBox<FileDescriptorProto> = ::buffa::__private::OnceBox::new();
367        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
368    }
369}
370impl ::buffa::Message for FileDescriptorProto {
371    /// Returns the total encoded size in bytes.
372    ///
373    /// The result is a `u32`; the protobuf specification requires all
374    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
375    /// compliant message will never overflow this type.
376    fn compute_size(&self) -> u32 {
377        #[allow(unused_imports)]
378        use ::buffa::Enumeration as _;
379        let mut size = 0u32;
380        if let Some(ref v) = self.name {
381            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
382        }
383        if let Some(ref v) = self.package {
384            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
385        }
386        if self.options.is_set() {
387            let inner_size = self.options.compute_size();
388            size
389                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
390                    + inner_size;
391        }
392        if self.source_code_info.is_set() {
393            let inner_size = self.source_code_info.compute_size();
394            size
395                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
396                    + inner_size;
397        }
398        if let Some(ref v) = self.syntax {
399            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
400        }
401        if let Some(ref v) = self.edition {
402            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
403        }
404        for v in &self.dependency {
405            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
406        }
407        for v in &self.public_dependency {
408            size += 1u32 + ::buffa::types::int32_encoded_len(*v) as u32;
409        }
410        for v in &self.weak_dependency {
411            size += 1u32 + ::buffa::types::int32_encoded_len(*v) as u32;
412        }
413        for v in &self.option_dependency {
414            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
415        }
416        for v in &self.message_type {
417            let inner_size = v.compute_size();
418            size
419                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
420                    + inner_size;
421        }
422        for v in &self.enum_type {
423            let inner_size = v.compute_size();
424            size
425                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
426                    + inner_size;
427        }
428        for v in &self.service {
429            let inner_size = v.compute_size();
430            size
431                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
432                    + inner_size;
433        }
434        for v in &self.extension {
435            let inner_size = v.compute_size();
436            size
437                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
438                    + inner_size;
439        }
440        size += self.__buffa_unknown_fields.encoded_len() as u32;
441        self.__buffa_cached_size.set(size);
442        size
443    }
444    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
445        #[allow(unused_imports)]
446        use ::buffa::Enumeration as _;
447        if let Some(ref v) = self.name {
448            ::buffa::encoding::Tag::new(
449                    1u32,
450                    ::buffa::encoding::WireType::LengthDelimited,
451                )
452                .encode(buf);
453            ::buffa::types::encode_string(v, buf);
454        }
455        if let Some(ref v) = self.package {
456            ::buffa::encoding::Tag::new(
457                    2u32,
458                    ::buffa::encoding::WireType::LengthDelimited,
459                )
460                .encode(buf);
461            ::buffa::types::encode_string(v, buf);
462        }
463        if self.options.is_set() {
464            ::buffa::encoding::Tag::new(
465                    8u32,
466                    ::buffa::encoding::WireType::LengthDelimited,
467                )
468                .encode(buf);
469            ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
470            self.options.write_to(buf);
471        }
472        if self.source_code_info.is_set() {
473            ::buffa::encoding::Tag::new(
474                    9u32,
475                    ::buffa::encoding::WireType::LengthDelimited,
476                )
477                .encode(buf);
478            ::buffa::encoding::encode_varint(
479                self.source_code_info.cached_size() as u64,
480                buf,
481            );
482            self.source_code_info.write_to(buf);
483        }
484        if let Some(ref v) = self.syntax {
485            ::buffa::encoding::Tag::new(
486                    12u32,
487                    ::buffa::encoding::WireType::LengthDelimited,
488                )
489                .encode(buf);
490            ::buffa::types::encode_string(v, buf);
491        }
492        if let Some(ref v) = self.edition {
493            ::buffa::encoding::Tag::new(14u32, ::buffa::encoding::WireType::Varint)
494                .encode(buf);
495            ::buffa::types::encode_int32(v.to_i32(), buf);
496        }
497        for v in &self.dependency {
498            ::buffa::encoding::Tag::new(
499                    3u32,
500                    ::buffa::encoding::WireType::LengthDelimited,
501                )
502                .encode(buf);
503            ::buffa::types::encode_string(v, buf);
504        }
505        for v in &self.public_dependency {
506            ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
507                .encode(buf);
508            ::buffa::types::encode_int32(*v, buf);
509        }
510        for v in &self.weak_dependency {
511            ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
512                .encode(buf);
513            ::buffa::types::encode_int32(*v, buf);
514        }
515        for v in &self.option_dependency {
516            ::buffa::encoding::Tag::new(
517                    15u32,
518                    ::buffa::encoding::WireType::LengthDelimited,
519                )
520                .encode(buf);
521            ::buffa::types::encode_string(v, buf);
522        }
523        for v in &self.message_type {
524            ::buffa::encoding::Tag::new(
525                    4u32,
526                    ::buffa::encoding::WireType::LengthDelimited,
527                )
528                .encode(buf);
529            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
530            v.write_to(buf);
531        }
532        for v in &self.enum_type {
533            ::buffa::encoding::Tag::new(
534                    5u32,
535                    ::buffa::encoding::WireType::LengthDelimited,
536                )
537                .encode(buf);
538            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
539            v.write_to(buf);
540        }
541        for v in &self.service {
542            ::buffa::encoding::Tag::new(
543                    6u32,
544                    ::buffa::encoding::WireType::LengthDelimited,
545                )
546                .encode(buf);
547            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
548            v.write_to(buf);
549        }
550        for v in &self.extension {
551            ::buffa::encoding::Tag::new(
552                    7u32,
553                    ::buffa::encoding::WireType::LengthDelimited,
554                )
555                .encode(buf);
556            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
557            v.write_to(buf);
558        }
559        self.__buffa_unknown_fields.write_to(buf);
560    }
561    fn merge_field(
562        &mut self,
563        tag: ::buffa::encoding::Tag,
564        buf: &mut impl ::buffa::bytes::Buf,
565        depth: u32,
566    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
567        #[allow(unused_imports)]
568        use ::buffa::bytes::Buf as _;
569        #[allow(unused_imports)]
570        use ::buffa::Enumeration as _;
571        match tag.field_number() {
572            1u32 => {
573                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
574                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
575                        field_number: 1u32,
576                        expected: 2u8,
577                        actual: tag.wire_type() as u8,
578                    });
579                }
580                ::buffa::types::merge_string(
581                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
582                    buf,
583                )?;
584            }
585            2u32 => {
586                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
587                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
588                        field_number: 2u32,
589                        expected: 2u8,
590                        actual: tag.wire_type() as u8,
591                    });
592                }
593                ::buffa::types::merge_string(
594                    self.package.get_or_insert_with(::buffa::alloc::string::String::new),
595                    buf,
596                )?;
597            }
598            8u32 => {
599                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
600                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
601                        field_number: 8u32,
602                        expected: 2u8,
603                        actual: tag.wire_type() as u8,
604                    });
605                }
606                ::buffa::Message::merge_length_delimited(
607                    self.options.get_or_insert_default(),
608                    buf,
609                    depth,
610                )?;
611            }
612            9u32 => {
613                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
614                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
615                        field_number: 9u32,
616                        expected: 2u8,
617                        actual: tag.wire_type() as u8,
618                    });
619                }
620                ::buffa::Message::merge_length_delimited(
621                    self.source_code_info.get_or_insert_default(),
622                    buf,
623                    depth,
624                )?;
625            }
626            12u32 => {
627                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
628                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
629                        field_number: 12u32,
630                        expected: 2u8,
631                        actual: tag.wire_type() as u8,
632                    });
633                }
634                ::buffa::types::merge_string(
635                    self.syntax.get_or_insert_with(::buffa::alloc::string::String::new),
636                    buf,
637                )?;
638            }
639            14u32 => {
640                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
641                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
642                        field_number: 14u32,
643                        expected: 0u8,
644                        actual: tag.wire_type() as u8,
645                    });
646                }
647                let __raw = ::buffa::types::decode_int32(buf)?;
648                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
649                    __raw,
650                ) {
651                    self.edition = ::core::option::Option::Some(__v);
652                } else {
653                    self.__buffa_unknown_fields
654                        .push(::buffa::UnknownField {
655                            number: 14u32,
656                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
657                        });
658                }
659            }
660            3u32 => {
661                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
662                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
663                        field_number: 3u32,
664                        expected: 2u8,
665                        actual: tag.wire_type() as u8,
666                    });
667                }
668                self.dependency.push(::buffa::types::decode_string(buf)?);
669            }
670            10u32 => {
671                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
672                    let len = ::buffa::encoding::decode_varint(buf)?;
673                    let len = usize::try_from(len)
674                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
675                    if buf.remaining() < len {
676                        return ::core::result::Result::Err(
677                            ::buffa::DecodeError::UnexpectedEof,
678                        );
679                    }
680                    self.public_dependency.reserve(len);
681                    let mut limited = buf.take(len);
682                    while limited.has_remaining() {
683                        self.public_dependency
684                            .push(::buffa::types::decode_int32(&mut limited)?);
685                    }
686                    let leftover = limited.remaining();
687                    if leftover > 0 {
688                        limited.advance(leftover);
689                    }
690                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
691                    self.public_dependency.push(::buffa::types::decode_int32(buf)?);
692                } else {
693                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
694                        field_number: 10u32,
695                        expected: 2u8,
696                        actual: tag.wire_type() as u8,
697                    });
698                }
699            }
700            11u32 => {
701                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
702                    let len = ::buffa::encoding::decode_varint(buf)?;
703                    let len = usize::try_from(len)
704                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
705                    if buf.remaining() < len {
706                        return ::core::result::Result::Err(
707                            ::buffa::DecodeError::UnexpectedEof,
708                        );
709                    }
710                    self.weak_dependency.reserve(len);
711                    let mut limited = buf.take(len);
712                    while limited.has_remaining() {
713                        self.weak_dependency
714                            .push(::buffa::types::decode_int32(&mut limited)?);
715                    }
716                    let leftover = limited.remaining();
717                    if leftover > 0 {
718                        limited.advance(leftover);
719                    }
720                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
721                    self.weak_dependency.push(::buffa::types::decode_int32(buf)?);
722                } else {
723                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
724                        field_number: 11u32,
725                        expected: 2u8,
726                        actual: tag.wire_type() as u8,
727                    });
728                }
729            }
730            15u32 => {
731                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
732                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
733                        field_number: 15u32,
734                        expected: 2u8,
735                        actual: tag.wire_type() as u8,
736                    });
737                }
738                self.option_dependency.push(::buffa::types::decode_string(buf)?);
739            }
740            4u32 => {
741                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
742                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
743                        field_number: 4u32,
744                        expected: 2u8,
745                        actual: tag.wire_type() as u8,
746                    });
747                }
748                let mut elem = ::core::default::Default::default();
749                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
750                self.message_type.push(elem);
751            }
752            5u32 => {
753                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
754                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
755                        field_number: 5u32,
756                        expected: 2u8,
757                        actual: tag.wire_type() as u8,
758                    });
759                }
760                let mut elem = ::core::default::Default::default();
761                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
762                self.enum_type.push(elem);
763            }
764            6u32 => {
765                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
766                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
767                        field_number: 6u32,
768                        expected: 2u8,
769                        actual: tag.wire_type() as u8,
770                    });
771                }
772                let mut elem = ::core::default::Default::default();
773                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
774                self.service.push(elem);
775            }
776            7u32 => {
777                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
778                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
779                        field_number: 7u32,
780                        expected: 2u8,
781                        actual: tag.wire_type() as u8,
782                    });
783                }
784                let mut elem = ::core::default::Default::default();
785                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
786                self.extension.push(elem);
787            }
788            _ => {
789                self.__buffa_unknown_fields
790                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
791            }
792        }
793        ::core::result::Result::Ok(())
794    }
795    fn cached_size(&self) -> u32 {
796        self.__buffa_cached_size.get()
797    }
798    fn clear(&mut self) {
799        self.name = ::core::option::Option::None;
800        self.package = ::core::option::Option::None;
801        self.options = ::buffa::MessageField::none();
802        self.source_code_info = ::buffa::MessageField::none();
803        self.syntax = ::core::option::Option::None;
804        self.edition = ::core::option::Option::None;
805        self.dependency.clear();
806        self.public_dependency.clear();
807        self.weak_dependency.clear();
808        self.option_dependency.clear();
809        self.message_type.clear();
810        self.enum_type.clear();
811        self.service.clear();
812        self.extension.clear();
813        self.__buffa_unknown_fields.clear();
814        self.__buffa_cached_size.set(0);
815    }
816}
817impl ::buffa::ExtensionSet for FileDescriptorProto {
818    const PROTO_FQN: &'static str = "google.protobuf.FileDescriptorProto";
819    fn unknown_fields(&self) -> &::buffa::UnknownFields {
820        &self.__buffa_unknown_fields
821    }
822    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
823        &mut self.__buffa_unknown_fields
824    }
825}
826/// Describes a message type.
827#[derive(Clone, PartialEq, Default)]
828pub struct DescriptorProto {
829    /// Field 1: `name`
830    pub name: Option<::buffa::alloc::string::String>,
831    /// Field 2: `field`
832    pub field: ::buffa::alloc::vec::Vec<FieldDescriptorProto>,
833    /// Field 6: `extension`
834    pub extension: ::buffa::alloc::vec::Vec<FieldDescriptorProto>,
835    /// Field 3: `nested_type`
836    pub nested_type: ::buffa::alloc::vec::Vec<Self>,
837    /// Field 4: `enum_type`
838    pub enum_type: ::buffa::alloc::vec::Vec<EnumDescriptorProto>,
839    /// Field 5: `extension_range`
840    pub extension_range: ::buffa::alloc::vec::Vec<descriptor_proto::ExtensionRange>,
841    /// Field 8: `oneof_decl`
842    pub oneof_decl: ::buffa::alloc::vec::Vec<OneofDescriptorProto>,
843    /// Field 7: `options`
844    pub options: ::buffa::MessageField<MessageOptions>,
845    /// Field 9: `reserved_range`
846    pub reserved_range: ::buffa::alloc::vec::Vec<descriptor_proto::ReservedRange>,
847    /// Reserved field names, which may not be used by fields in the same message.
848    /// A given name may only be reserved once.
849    ///
850    /// Field 10: `reserved_name`
851    pub reserved_name: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
852    /// Support for `export` and `local` keywords on enums.
853    ///
854    /// Field 11: `visibility`
855    pub visibility: Option<SymbolVisibility>,
856    #[doc(hidden)]
857    pub __buffa_unknown_fields: ::buffa::UnknownFields,
858    #[doc(hidden)]
859    pub __buffa_cached_size: ::buffa::__private::CachedSize,
860}
861impl ::core::fmt::Debug for DescriptorProto {
862    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
863        f.debug_struct("DescriptorProto")
864            .field("name", &self.name)
865            .field("field", &self.field)
866            .field("extension", &self.extension)
867            .field("nested_type", &self.nested_type)
868            .field("enum_type", &self.enum_type)
869            .field("extension_range", &self.extension_range)
870            .field("oneof_decl", &self.oneof_decl)
871            .field("options", &self.options)
872            .field("reserved_range", &self.reserved_range)
873            .field("reserved_name", &self.reserved_name)
874            .field("visibility", &self.visibility)
875            .finish()
876    }
877}
878impl DescriptorProto {
879    /// Protobuf type URL for this message, for use with `Any::pack` and
880    /// `Any::unpack_if`.
881    ///
882    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
883    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DescriptorProto";
884}
885unsafe impl ::buffa::DefaultInstance for DescriptorProto {
886    fn default_instance() -> &'static Self {
887        static VALUE: ::buffa::__private::OnceBox<DescriptorProto> = ::buffa::__private::OnceBox::new();
888        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
889    }
890}
891impl ::buffa::Message for DescriptorProto {
892    /// Returns the total encoded size in bytes.
893    ///
894    /// The result is a `u32`; the protobuf specification requires all
895    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
896    /// compliant message will never overflow this type.
897    fn compute_size(&self) -> u32 {
898        #[allow(unused_imports)]
899        use ::buffa::Enumeration as _;
900        let mut size = 0u32;
901        if let Some(ref v) = self.name {
902            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
903        }
904        if self.options.is_set() {
905            let inner_size = self.options.compute_size();
906            size
907                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
908                    + inner_size;
909        }
910        if let Some(ref v) = self.visibility {
911            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
912        }
913        for v in &self.field {
914            let inner_size = v.compute_size();
915            size
916                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
917                    + inner_size;
918        }
919        for v in &self.extension {
920            let inner_size = v.compute_size();
921            size
922                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
923                    + inner_size;
924        }
925        for v in &self.nested_type {
926            let inner_size = v.compute_size();
927            size
928                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
929                    + inner_size;
930        }
931        for v in &self.enum_type {
932            let inner_size = v.compute_size();
933            size
934                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
935                    + inner_size;
936        }
937        for v in &self.extension_range {
938            let inner_size = v.compute_size();
939            size
940                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
941                    + inner_size;
942        }
943        for v in &self.oneof_decl {
944            let inner_size = v.compute_size();
945            size
946                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
947                    + inner_size;
948        }
949        for v in &self.reserved_range {
950            let inner_size = v.compute_size();
951            size
952                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
953                    + inner_size;
954        }
955        for v in &self.reserved_name {
956            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
957        }
958        size += self.__buffa_unknown_fields.encoded_len() as u32;
959        self.__buffa_cached_size.set(size);
960        size
961    }
962    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
963        #[allow(unused_imports)]
964        use ::buffa::Enumeration as _;
965        if let Some(ref v) = self.name {
966            ::buffa::encoding::Tag::new(
967                    1u32,
968                    ::buffa::encoding::WireType::LengthDelimited,
969                )
970                .encode(buf);
971            ::buffa::types::encode_string(v, buf);
972        }
973        if self.options.is_set() {
974            ::buffa::encoding::Tag::new(
975                    7u32,
976                    ::buffa::encoding::WireType::LengthDelimited,
977                )
978                .encode(buf);
979            ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
980            self.options.write_to(buf);
981        }
982        if let Some(ref v) = self.visibility {
983            ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
984                .encode(buf);
985            ::buffa::types::encode_int32(v.to_i32(), buf);
986        }
987        for v in &self.field {
988            ::buffa::encoding::Tag::new(
989                    2u32,
990                    ::buffa::encoding::WireType::LengthDelimited,
991                )
992                .encode(buf);
993            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
994            v.write_to(buf);
995        }
996        for v in &self.extension {
997            ::buffa::encoding::Tag::new(
998                    6u32,
999                    ::buffa::encoding::WireType::LengthDelimited,
1000                )
1001                .encode(buf);
1002            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
1003            v.write_to(buf);
1004        }
1005        for v in &self.nested_type {
1006            ::buffa::encoding::Tag::new(
1007                    3u32,
1008                    ::buffa::encoding::WireType::LengthDelimited,
1009                )
1010                .encode(buf);
1011            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
1012            v.write_to(buf);
1013        }
1014        for v in &self.enum_type {
1015            ::buffa::encoding::Tag::new(
1016                    4u32,
1017                    ::buffa::encoding::WireType::LengthDelimited,
1018                )
1019                .encode(buf);
1020            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
1021            v.write_to(buf);
1022        }
1023        for v in &self.extension_range {
1024            ::buffa::encoding::Tag::new(
1025                    5u32,
1026                    ::buffa::encoding::WireType::LengthDelimited,
1027                )
1028                .encode(buf);
1029            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
1030            v.write_to(buf);
1031        }
1032        for v in &self.oneof_decl {
1033            ::buffa::encoding::Tag::new(
1034                    8u32,
1035                    ::buffa::encoding::WireType::LengthDelimited,
1036                )
1037                .encode(buf);
1038            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
1039            v.write_to(buf);
1040        }
1041        for v in &self.reserved_range {
1042            ::buffa::encoding::Tag::new(
1043                    9u32,
1044                    ::buffa::encoding::WireType::LengthDelimited,
1045                )
1046                .encode(buf);
1047            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
1048            v.write_to(buf);
1049        }
1050        for v in &self.reserved_name {
1051            ::buffa::encoding::Tag::new(
1052                    10u32,
1053                    ::buffa::encoding::WireType::LengthDelimited,
1054                )
1055                .encode(buf);
1056            ::buffa::types::encode_string(v, buf);
1057        }
1058        self.__buffa_unknown_fields.write_to(buf);
1059    }
1060    fn merge_field(
1061        &mut self,
1062        tag: ::buffa::encoding::Tag,
1063        buf: &mut impl ::buffa::bytes::Buf,
1064        depth: u32,
1065    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1066        #[allow(unused_imports)]
1067        use ::buffa::bytes::Buf as _;
1068        #[allow(unused_imports)]
1069        use ::buffa::Enumeration as _;
1070        match tag.field_number() {
1071            1u32 => {
1072                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1073                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1074                        field_number: 1u32,
1075                        expected: 2u8,
1076                        actual: tag.wire_type() as u8,
1077                    });
1078                }
1079                ::buffa::types::merge_string(
1080                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
1081                    buf,
1082                )?;
1083            }
1084            7u32 => {
1085                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1086                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1087                        field_number: 7u32,
1088                        expected: 2u8,
1089                        actual: tag.wire_type() as u8,
1090                    });
1091                }
1092                ::buffa::Message::merge_length_delimited(
1093                    self.options.get_or_insert_default(),
1094                    buf,
1095                    depth,
1096                )?;
1097            }
1098            11u32 => {
1099                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1100                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1101                        field_number: 11u32,
1102                        expected: 0u8,
1103                        actual: tag.wire_type() as u8,
1104                    });
1105                }
1106                let __raw = ::buffa::types::decode_int32(buf)?;
1107                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
1108                    __raw,
1109                ) {
1110                    self.visibility = ::core::option::Option::Some(__v);
1111                } else {
1112                    self.__buffa_unknown_fields
1113                        .push(::buffa::UnknownField {
1114                            number: 11u32,
1115                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
1116                        });
1117                }
1118            }
1119            2u32 => {
1120                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1121                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1122                        field_number: 2u32,
1123                        expected: 2u8,
1124                        actual: tag.wire_type() as u8,
1125                    });
1126                }
1127                let mut elem = ::core::default::Default::default();
1128                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1129                self.field.push(elem);
1130            }
1131            6u32 => {
1132                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1133                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1134                        field_number: 6u32,
1135                        expected: 2u8,
1136                        actual: tag.wire_type() as u8,
1137                    });
1138                }
1139                let mut elem = ::core::default::Default::default();
1140                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1141                self.extension.push(elem);
1142            }
1143            3u32 => {
1144                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1145                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1146                        field_number: 3u32,
1147                        expected: 2u8,
1148                        actual: tag.wire_type() as u8,
1149                    });
1150                }
1151                let mut elem = ::core::default::Default::default();
1152                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1153                self.nested_type.push(elem);
1154            }
1155            4u32 => {
1156                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1157                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1158                        field_number: 4u32,
1159                        expected: 2u8,
1160                        actual: tag.wire_type() as u8,
1161                    });
1162                }
1163                let mut elem = ::core::default::Default::default();
1164                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1165                self.enum_type.push(elem);
1166            }
1167            5u32 => {
1168                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1169                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1170                        field_number: 5u32,
1171                        expected: 2u8,
1172                        actual: tag.wire_type() as u8,
1173                    });
1174                }
1175                let mut elem = ::core::default::Default::default();
1176                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1177                self.extension_range.push(elem);
1178            }
1179            8u32 => {
1180                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1181                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1182                        field_number: 8u32,
1183                        expected: 2u8,
1184                        actual: tag.wire_type() as u8,
1185                    });
1186                }
1187                let mut elem = ::core::default::Default::default();
1188                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1189                self.oneof_decl.push(elem);
1190            }
1191            9u32 => {
1192                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1193                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1194                        field_number: 9u32,
1195                        expected: 2u8,
1196                        actual: tag.wire_type() as u8,
1197                    });
1198                }
1199                let mut elem = ::core::default::Default::default();
1200                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1201                self.reserved_range.push(elem);
1202            }
1203            10u32 => {
1204                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1205                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1206                        field_number: 10u32,
1207                        expected: 2u8,
1208                        actual: tag.wire_type() as u8,
1209                    });
1210                }
1211                self.reserved_name.push(::buffa::types::decode_string(buf)?);
1212            }
1213            _ => {
1214                self.__buffa_unknown_fields
1215                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1216            }
1217        }
1218        ::core::result::Result::Ok(())
1219    }
1220    fn cached_size(&self) -> u32 {
1221        self.__buffa_cached_size.get()
1222    }
1223    fn clear(&mut self) {
1224        self.name = ::core::option::Option::None;
1225        self.options = ::buffa::MessageField::none();
1226        self.visibility = ::core::option::Option::None;
1227        self.field.clear();
1228        self.extension.clear();
1229        self.nested_type.clear();
1230        self.enum_type.clear();
1231        self.extension_range.clear();
1232        self.oneof_decl.clear();
1233        self.reserved_range.clear();
1234        self.reserved_name.clear();
1235        self.__buffa_unknown_fields.clear();
1236        self.__buffa_cached_size.set(0);
1237    }
1238}
1239impl ::buffa::ExtensionSet for DescriptorProto {
1240    const PROTO_FQN: &'static str = "google.protobuf.DescriptorProto";
1241    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1242        &self.__buffa_unknown_fields
1243    }
1244    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1245        &mut self.__buffa_unknown_fields
1246    }
1247}
1248pub mod descriptor_proto {
1249    #[allow(unused_imports)]
1250    use super::*;
1251    #[derive(Clone, PartialEq, Default)]
1252    pub struct ExtensionRange {
1253        /// Inclusive.
1254        ///
1255        /// Field 1: `start`
1256        pub start: Option<i32>,
1257        /// Exclusive.
1258        ///
1259        /// Field 2: `end`
1260        pub end: Option<i32>,
1261        /// Field 3: `options`
1262        pub options: ::buffa::MessageField<ExtensionRangeOptions>,
1263        #[doc(hidden)]
1264        pub __buffa_unknown_fields: ::buffa::UnknownFields,
1265        #[doc(hidden)]
1266        pub __buffa_cached_size: ::buffa::__private::CachedSize,
1267    }
1268    impl ::core::fmt::Debug for ExtensionRange {
1269        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1270            f.debug_struct("ExtensionRange")
1271                .field("start", &self.start)
1272                .field("end", &self.end)
1273                .field("options", &self.options)
1274                .finish()
1275        }
1276    }
1277    impl ExtensionRange {
1278        /// Protobuf type URL for this message, for use with `Any::pack` and
1279        /// `Any::unpack_if`.
1280        ///
1281        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1282        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DescriptorProto.ExtensionRange";
1283    }
1284    unsafe impl ::buffa::DefaultInstance for ExtensionRange {
1285        fn default_instance() -> &'static Self {
1286            static VALUE: ::buffa::__private::OnceBox<ExtensionRange> = ::buffa::__private::OnceBox::new();
1287            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1288        }
1289    }
1290    impl ::buffa::Message for ExtensionRange {
1291        /// Returns the total encoded size in bytes.
1292        ///
1293        /// The result is a `u32`; the protobuf specification requires all
1294        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1295        /// compliant message will never overflow this type.
1296        fn compute_size(&self) -> u32 {
1297            #[allow(unused_imports)]
1298            use ::buffa::Enumeration as _;
1299            let mut size = 0u32;
1300            if let Some(v) = self.start {
1301                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1302            }
1303            if let Some(v) = self.end {
1304                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1305            }
1306            if self.options.is_set() {
1307                let inner_size = self.options.compute_size();
1308                size
1309                    += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1310                        + inner_size;
1311            }
1312            size += self.__buffa_unknown_fields.encoded_len() as u32;
1313            self.__buffa_cached_size.set(size);
1314            size
1315        }
1316        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
1317            #[allow(unused_imports)]
1318            use ::buffa::Enumeration as _;
1319            if let Some(v) = self.start {
1320                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1321                    .encode(buf);
1322                ::buffa::types::encode_int32(v, buf);
1323            }
1324            if let Some(v) = self.end {
1325                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1326                    .encode(buf);
1327                ::buffa::types::encode_int32(v, buf);
1328            }
1329            if self.options.is_set() {
1330                ::buffa::encoding::Tag::new(
1331                        3u32,
1332                        ::buffa::encoding::WireType::LengthDelimited,
1333                    )
1334                    .encode(buf);
1335                ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
1336                self.options.write_to(buf);
1337            }
1338            self.__buffa_unknown_fields.write_to(buf);
1339        }
1340        fn merge_field(
1341            &mut self,
1342            tag: ::buffa::encoding::Tag,
1343            buf: &mut impl ::buffa::bytes::Buf,
1344            depth: u32,
1345        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1346            #[allow(unused_imports)]
1347            use ::buffa::bytes::Buf as _;
1348            #[allow(unused_imports)]
1349            use ::buffa::Enumeration as _;
1350            match tag.field_number() {
1351                1u32 => {
1352                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1353                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1354                            field_number: 1u32,
1355                            expected: 0u8,
1356                            actual: tag.wire_type() as u8,
1357                        });
1358                    }
1359                    self.start = ::core::option::Option::Some(
1360                        ::buffa::types::decode_int32(buf)?,
1361                    );
1362                }
1363                2u32 => {
1364                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1365                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1366                            field_number: 2u32,
1367                            expected: 0u8,
1368                            actual: tag.wire_type() as u8,
1369                        });
1370                    }
1371                    self.end = ::core::option::Option::Some(
1372                        ::buffa::types::decode_int32(buf)?,
1373                    );
1374                }
1375                3u32 => {
1376                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1377                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1378                            field_number: 3u32,
1379                            expected: 2u8,
1380                            actual: tag.wire_type() as u8,
1381                        });
1382                    }
1383                    ::buffa::Message::merge_length_delimited(
1384                        self.options.get_or_insert_default(),
1385                        buf,
1386                        depth,
1387                    )?;
1388                }
1389                _ => {
1390                    self.__buffa_unknown_fields
1391                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1392                }
1393            }
1394            ::core::result::Result::Ok(())
1395        }
1396        fn cached_size(&self) -> u32 {
1397            self.__buffa_cached_size.get()
1398        }
1399        fn clear(&mut self) {
1400            self.start = ::core::option::Option::None;
1401            self.end = ::core::option::Option::None;
1402            self.options = ::buffa::MessageField::none();
1403            self.__buffa_unknown_fields.clear();
1404            self.__buffa_cached_size.set(0);
1405        }
1406    }
1407    impl ::buffa::ExtensionSet for ExtensionRange {
1408        const PROTO_FQN: &'static str = "google.protobuf.DescriptorProto.ExtensionRange";
1409        fn unknown_fields(&self) -> &::buffa::UnknownFields {
1410            &self.__buffa_unknown_fields
1411        }
1412        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1413            &mut self.__buffa_unknown_fields
1414        }
1415    }
1416    /// Range of reserved tag numbers. Reserved tag numbers may not be used by
1417    /// fields or extension ranges in the same message. Reserved ranges may
1418    /// not overlap.
1419    #[derive(Clone, PartialEq, Default)]
1420    pub struct ReservedRange {
1421        /// Inclusive.
1422        ///
1423        /// Field 1: `start`
1424        pub start: Option<i32>,
1425        /// Exclusive.
1426        ///
1427        /// Field 2: `end`
1428        pub end: Option<i32>,
1429        #[doc(hidden)]
1430        pub __buffa_unknown_fields: ::buffa::UnknownFields,
1431        #[doc(hidden)]
1432        pub __buffa_cached_size: ::buffa::__private::CachedSize,
1433    }
1434    impl ::core::fmt::Debug for ReservedRange {
1435        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1436            f.debug_struct("ReservedRange")
1437                .field("start", &self.start)
1438                .field("end", &self.end)
1439                .finish()
1440        }
1441    }
1442    impl ReservedRange {
1443        /// Protobuf type URL for this message, for use with `Any::pack` and
1444        /// `Any::unpack_if`.
1445        ///
1446        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1447        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DescriptorProto.ReservedRange";
1448    }
1449    unsafe impl ::buffa::DefaultInstance for ReservedRange {
1450        fn default_instance() -> &'static Self {
1451            static VALUE: ::buffa::__private::OnceBox<ReservedRange> = ::buffa::__private::OnceBox::new();
1452            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1453        }
1454    }
1455    impl ::buffa::Message for ReservedRange {
1456        /// Returns the total encoded size in bytes.
1457        ///
1458        /// The result is a `u32`; the protobuf specification requires all
1459        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1460        /// compliant message will never overflow this type.
1461        fn compute_size(&self) -> u32 {
1462            #[allow(unused_imports)]
1463            use ::buffa::Enumeration as _;
1464            let mut size = 0u32;
1465            if let Some(v) = self.start {
1466                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1467            }
1468            if let Some(v) = self.end {
1469                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1470            }
1471            size += self.__buffa_unknown_fields.encoded_len() as u32;
1472            self.__buffa_cached_size.set(size);
1473            size
1474        }
1475        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
1476            #[allow(unused_imports)]
1477            use ::buffa::Enumeration as _;
1478            if let Some(v) = self.start {
1479                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1480                    .encode(buf);
1481                ::buffa::types::encode_int32(v, buf);
1482            }
1483            if let Some(v) = self.end {
1484                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1485                    .encode(buf);
1486                ::buffa::types::encode_int32(v, buf);
1487            }
1488            self.__buffa_unknown_fields.write_to(buf);
1489        }
1490        fn merge_field(
1491            &mut self,
1492            tag: ::buffa::encoding::Tag,
1493            buf: &mut impl ::buffa::bytes::Buf,
1494            depth: u32,
1495        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1496            #[allow(unused_imports)]
1497            use ::buffa::bytes::Buf as _;
1498            #[allow(unused_imports)]
1499            use ::buffa::Enumeration as _;
1500            match tag.field_number() {
1501                1u32 => {
1502                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1503                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1504                            field_number: 1u32,
1505                            expected: 0u8,
1506                            actual: tag.wire_type() as u8,
1507                        });
1508                    }
1509                    self.start = ::core::option::Option::Some(
1510                        ::buffa::types::decode_int32(buf)?,
1511                    );
1512                }
1513                2u32 => {
1514                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1515                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1516                            field_number: 2u32,
1517                            expected: 0u8,
1518                            actual: tag.wire_type() as u8,
1519                        });
1520                    }
1521                    self.end = ::core::option::Option::Some(
1522                        ::buffa::types::decode_int32(buf)?,
1523                    );
1524                }
1525                _ => {
1526                    self.__buffa_unknown_fields
1527                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1528                }
1529            }
1530            ::core::result::Result::Ok(())
1531        }
1532        fn cached_size(&self) -> u32 {
1533            self.__buffa_cached_size.get()
1534        }
1535        fn clear(&mut self) {
1536            self.start = ::core::option::Option::None;
1537            self.end = ::core::option::Option::None;
1538            self.__buffa_unknown_fields.clear();
1539            self.__buffa_cached_size.set(0);
1540        }
1541    }
1542    impl ::buffa::ExtensionSet for ReservedRange {
1543        const PROTO_FQN: &'static str = "google.protobuf.DescriptorProto.ReservedRange";
1544        fn unknown_fields(&self) -> &::buffa::UnknownFields {
1545            &self.__buffa_unknown_fields
1546        }
1547        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1548            &mut self.__buffa_unknown_fields
1549        }
1550    }
1551}
1552#[derive(Clone, PartialEq, Default)]
1553pub struct ExtensionRangeOptions {
1554    /// The parser stores options it doesn't recognize here. See above.
1555    ///
1556    /// Field 999: `uninterpreted_option`
1557    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
1558    /// For external users: DO NOT USE. We are in the process of open sourcing
1559    /// extension declaration and executing internal cleanups before it can be
1560    /// used externally.
1561    ///
1562    /// Field 2: `declaration`
1563    pub declaration: ::buffa::alloc::vec::Vec<extension_range_options::Declaration>,
1564    /// Any features defined in the specific edition.
1565    ///
1566    /// Field 50: `features`
1567    pub features: ::buffa::MessageField<FeatureSet>,
1568    /// The verification state of the range.
1569    /// TODO: flip the default to DECLARATION once all empty ranges
1570    /// are marked as UNVERIFIED.
1571    ///
1572    /// Field 3: `verification`
1573    pub verification: Option<extension_range_options::VerificationState>,
1574    #[doc(hidden)]
1575    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1576    #[doc(hidden)]
1577    pub __buffa_cached_size: ::buffa::__private::CachedSize,
1578}
1579impl ::core::fmt::Debug for ExtensionRangeOptions {
1580    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1581        f.debug_struct("ExtensionRangeOptions")
1582            .field("uninterpreted_option", &self.uninterpreted_option)
1583            .field("declaration", &self.declaration)
1584            .field("features", &self.features)
1585            .field("verification", &self.verification)
1586            .finish()
1587    }
1588}
1589impl ExtensionRangeOptions {
1590    /// Protobuf type URL for this message, for use with `Any::pack` and
1591    /// `Any::unpack_if`.
1592    ///
1593    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1594    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.ExtensionRangeOptions";
1595}
1596unsafe impl ::buffa::DefaultInstance for ExtensionRangeOptions {
1597    fn default_instance() -> &'static Self {
1598        static VALUE: ::buffa::__private::OnceBox<ExtensionRangeOptions> = ::buffa::__private::OnceBox::new();
1599        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1600    }
1601}
1602impl ::buffa::Message for ExtensionRangeOptions {
1603    /// Returns the total encoded size in bytes.
1604    ///
1605    /// The result is a `u32`; the protobuf specification requires all
1606    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1607    /// compliant message will never overflow this type.
1608    fn compute_size(&self) -> u32 {
1609        #[allow(unused_imports)]
1610        use ::buffa::Enumeration as _;
1611        let mut size = 0u32;
1612        if self.features.is_set() {
1613            let inner_size = self.features.compute_size();
1614            size
1615                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1616                    + inner_size;
1617        }
1618        if let Some(ref v) = self.verification {
1619            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
1620        }
1621        for v in &self.uninterpreted_option {
1622            let inner_size = v.compute_size();
1623            size
1624                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1625                    + inner_size;
1626        }
1627        for v in &self.declaration {
1628            let inner_size = v.compute_size();
1629            size
1630                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1631                    + inner_size;
1632        }
1633        size += self.__buffa_unknown_fields.encoded_len() as u32;
1634        self.__buffa_cached_size.set(size);
1635        size
1636    }
1637    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
1638        #[allow(unused_imports)]
1639        use ::buffa::Enumeration as _;
1640        if self.features.is_set() {
1641            ::buffa::encoding::Tag::new(
1642                    50u32,
1643                    ::buffa::encoding::WireType::LengthDelimited,
1644                )
1645                .encode(buf);
1646            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
1647            self.features.write_to(buf);
1648        }
1649        if let Some(ref v) = self.verification {
1650            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
1651                .encode(buf);
1652            ::buffa::types::encode_int32(v.to_i32(), buf);
1653        }
1654        for v in &self.uninterpreted_option {
1655            ::buffa::encoding::Tag::new(
1656                    999u32,
1657                    ::buffa::encoding::WireType::LengthDelimited,
1658                )
1659                .encode(buf);
1660            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
1661            v.write_to(buf);
1662        }
1663        for v in &self.declaration {
1664            ::buffa::encoding::Tag::new(
1665                    2u32,
1666                    ::buffa::encoding::WireType::LengthDelimited,
1667                )
1668                .encode(buf);
1669            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
1670            v.write_to(buf);
1671        }
1672        self.__buffa_unknown_fields.write_to(buf);
1673    }
1674    fn merge_field(
1675        &mut self,
1676        tag: ::buffa::encoding::Tag,
1677        buf: &mut impl ::buffa::bytes::Buf,
1678        depth: u32,
1679    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1680        #[allow(unused_imports)]
1681        use ::buffa::bytes::Buf as _;
1682        #[allow(unused_imports)]
1683        use ::buffa::Enumeration as _;
1684        match tag.field_number() {
1685            50u32 => {
1686                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1687                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1688                        field_number: 50u32,
1689                        expected: 2u8,
1690                        actual: tag.wire_type() as u8,
1691                    });
1692                }
1693                ::buffa::Message::merge_length_delimited(
1694                    self.features.get_or_insert_default(),
1695                    buf,
1696                    depth,
1697                )?;
1698            }
1699            3u32 => {
1700                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1701                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1702                        field_number: 3u32,
1703                        expected: 0u8,
1704                        actual: tag.wire_type() as u8,
1705                    });
1706                }
1707                let __raw = ::buffa::types::decode_int32(buf)?;
1708                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
1709                    __raw,
1710                ) {
1711                    self.verification = ::core::option::Option::Some(__v);
1712                } else {
1713                    self.__buffa_unknown_fields
1714                        .push(::buffa::UnknownField {
1715                            number: 3u32,
1716                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
1717                        });
1718                }
1719            }
1720            999u32 => {
1721                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1722                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1723                        field_number: 999u32,
1724                        expected: 2u8,
1725                        actual: tag.wire_type() as u8,
1726                    });
1727                }
1728                let mut elem = ::core::default::Default::default();
1729                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1730                self.uninterpreted_option.push(elem);
1731            }
1732            2u32 => {
1733                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1734                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1735                        field_number: 2u32,
1736                        expected: 2u8,
1737                        actual: tag.wire_type() as u8,
1738                    });
1739                }
1740                let mut elem = ::core::default::Default::default();
1741                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1742                self.declaration.push(elem);
1743            }
1744            _ => {
1745                self.__buffa_unknown_fields
1746                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1747            }
1748        }
1749        ::core::result::Result::Ok(())
1750    }
1751    fn cached_size(&self) -> u32 {
1752        self.__buffa_cached_size.get()
1753    }
1754    fn clear(&mut self) {
1755        self.features = ::buffa::MessageField::none();
1756        self.verification = ::core::option::Option::None;
1757        self.uninterpreted_option.clear();
1758        self.declaration.clear();
1759        self.__buffa_unknown_fields.clear();
1760        self.__buffa_cached_size.set(0);
1761    }
1762}
1763impl ::buffa::ExtensionSet for ExtensionRangeOptions {
1764    const PROTO_FQN: &'static str = "google.protobuf.ExtensionRangeOptions";
1765    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1766        &self.__buffa_unknown_fields
1767    }
1768    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1769        &mut self.__buffa_unknown_fields
1770    }
1771}
1772pub mod extension_range_options {
1773    #[allow(unused_imports)]
1774    use super::*;
1775    /// The verification state of the extension range.
1776    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1777    #[repr(i32)]
1778    pub enum VerificationState {
1779        /// All the extensions of the range must be declared.
1780        DECLARATION = 0i32,
1781        UNVERIFIED = 1i32,
1782    }
1783    impl ::core::default::Default for VerificationState {
1784        fn default() -> Self {
1785            Self::DECLARATION
1786        }
1787    }
1788    impl ::buffa::Enumeration for VerificationState {
1789        fn from_i32(value: i32) -> ::core::option::Option<Self> {
1790            match value {
1791                0i32 => ::core::option::Option::Some(Self::DECLARATION),
1792                1i32 => ::core::option::Option::Some(Self::UNVERIFIED),
1793                _ => ::core::option::Option::None,
1794            }
1795        }
1796        fn to_i32(&self) -> i32 {
1797            *self as i32
1798        }
1799        fn proto_name(&self) -> &'static str {
1800            match self {
1801                Self::DECLARATION => "DECLARATION",
1802                Self::UNVERIFIED => "UNVERIFIED",
1803            }
1804        }
1805        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1806            match name {
1807                "DECLARATION" => ::core::option::Option::Some(Self::DECLARATION),
1808                "UNVERIFIED" => ::core::option::Option::Some(Self::UNVERIFIED),
1809                _ => ::core::option::Option::None,
1810            }
1811        }
1812    }
1813    #[derive(Clone, PartialEq, Default)]
1814    pub struct Declaration {
1815        /// The extension number declared within the extension range.
1816        ///
1817        /// Field 1: `number`
1818        pub number: Option<i32>,
1819        /// The fully-qualified name of the extension field. There must be a leading
1820        /// dot in front of the full name.
1821        ///
1822        /// Field 2: `full_name`
1823        pub full_name: Option<::buffa::alloc::string::String>,
1824        /// The fully-qualified type name of the extension field. Unlike
1825        /// Metadata.type, Declaration.type must have a leading dot for messages
1826        /// and enums.
1827        ///
1828        /// Field 3: `type`
1829        pub r#type: Option<::buffa::alloc::string::String>,
1830        /// If true, indicates that the number is reserved in the extension range,
1831        /// and any extension field with the number will fail to compile. Set this
1832        /// when a declared extension field is deleted.
1833        ///
1834        /// Field 5: `reserved`
1835        pub reserved: Option<bool>,
1836        /// If true, indicates that the extension must be defined as repeated.
1837        /// Otherwise the extension must be defined as optional.
1838        ///
1839        /// Field 6: `repeated`
1840        pub repeated: Option<bool>,
1841        #[doc(hidden)]
1842        pub __buffa_unknown_fields: ::buffa::UnknownFields,
1843        #[doc(hidden)]
1844        pub __buffa_cached_size: ::buffa::__private::CachedSize,
1845    }
1846    impl ::core::fmt::Debug for Declaration {
1847        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1848            f.debug_struct("Declaration")
1849                .field("number", &self.number)
1850                .field("full_name", &self.full_name)
1851                .field("r#type", &self.r#type)
1852                .field("reserved", &self.reserved)
1853                .field("repeated", &self.repeated)
1854                .finish()
1855        }
1856    }
1857    impl Declaration {
1858        /// Protobuf type URL for this message, for use with `Any::pack` and
1859        /// `Any::unpack_if`.
1860        ///
1861        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1862        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.ExtensionRangeOptions.Declaration";
1863    }
1864    unsafe impl ::buffa::DefaultInstance for Declaration {
1865        fn default_instance() -> &'static Self {
1866            static VALUE: ::buffa::__private::OnceBox<Declaration> = ::buffa::__private::OnceBox::new();
1867            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1868        }
1869    }
1870    impl ::buffa::Message for Declaration {
1871        /// Returns the total encoded size in bytes.
1872        ///
1873        /// The result is a `u32`; the protobuf specification requires all
1874        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1875        /// compliant message will never overflow this type.
1876        fn compute_size(&self) -> u32 {
1877            #[allow(unused_imports)]
1878            use ::buffa::Enumeration as _;
1879            let mut size = 0u32;
1880            if let Some(v) = self.number {
1881                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1882            }
1883            if let Some(ref v) = self.full_name {
1884                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1885            }
1886            if let Some(ref v) = self.r#type {
1887                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1888            }
1889            if self.reserved.is_some() {
1890                size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1891            }
1892            if self.repeated.is_some() {
1893                size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1894            }
1895            size += self.__buffa_unknown_fields.encoded_len() as u32;
1896            self.__buffa_cached_size.set(size);
1897            size
1898        }
1899        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
1900            #[allow(unused_imports)]
1901            use ::buffa::Enumeration as _;
1902            if let Some(v) = self.number {
1903                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1904                    .encode(buf);
1905                ::buffa::types::encode_int32(v, buf);
1906            }
1907            if let Some(ref v) = self.full_name {
1908                ::buffa::encoding::Tag::new(
1909                        2u32,
1910                        ::buffa::encoding::WireType::LengthDelimited,
1911                    )
1912                    .encode(buf);
1913                ::buffa::types::encode_string(v, buf);
1914            }
1915            if let Some(ref v) = self.r#type {
1916                ::buffa::encoding::Tag::new(
1917                        3u32,
1918                        ::buffa::encoding::WireType::LengthDelimited,
1919                    )
1920                    .encode(buf);
1921                ::buffa::types::encode_string(v, buf);
1922            }
1923            if let Some(v) = self.reserved {
1924                ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
1925                    .encode(buf);
1926                ::buffa::types::encode_bool(v, buf);
1927            }
1928            if let Some(v) = self.repeated {
1929                ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
1930                    .encode(buf);
1931                ::buffa::types::encode_bool(v, buf);
1932            }
1933            self.__buffa_unknown_fields.write_to(buf);
1934        }
1935        fn merge_field(
1936            &mut self,
1937            tag: ::buffa::encoding::Tag,
1938            buf: &mut impl ::buffa::bytes::Buf,
1939            depth: u32,
1940        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1941            #[allow(unused_imports)]
1942            use ::buffa::bytes::Buf as _;
1943            #[allow(unused_imports)]
1944            use ::buffa::Enumeration as _;
1945            match tag.field_number() {
1946                1u32 => {
1947                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1948                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1949                            field_number: 1u32,
1950                            expected: 0u8,
1951                            actual: tag.wire_type() as u8,
1952                        });
1953                    }
1954                    self.number = ::core::option::Option::Some(
1955                        ::buffa::types::decode_int32(buf)?,
1956                    );
1957                }
1958                2u32 => {
1959                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1960                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1961                            field_number: 2u32,
1962                            expected: 2u8,
1963                            actual: tag.wire_type() as u8,
1964                        });
1965                    }
1966                    ::buffa::types::merge_string(
1967                        self
1968                            .full_name
1969                            .get_or_insert_with(::buffa::alloc::string::String::new),
1970                        buf,
1971                    )?;
1972                }
1973                3u32 => {
1974                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1975                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1976                            field_number: 3u32,
1977                            expected: 2u8,
1978                            actual: tag.wire_type() as u8,
1979                        });
1980                    }
1981                    ::buffa::types::merge_string(
1982                        self
1983                            .r#type
1984                            .get_or_insert_with(::buffa::alloc::string::String::new),
1985                        buf,
1986                    )?;
1987                }
1988                5u32 => {
1989                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1990                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1991                            field_number: 5u32,
1992                            expected: 0u8,
1993                            actual: tag.wire_type() as u8,
1994                        });
1995                    }
1996                    self.reserved = ::core::option::Option::Some(
1997                        ::buffa::types::decode_bool(buf)?,
1998                    );
1999                }
2000                6u32 => {
2001                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2002                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2003                            field_number: 6u32,
2004                            expected: 0u8,
2005                            actual: tag.wire_type() as u8,
2006                        });
2007                    }
2008                    self.repeated = ::core::option::Option::Some(
2009                        ::buffa::types::decode_bool(buf)?,
2010                    );
2011                }
2012                _ => {
2013                    self.__buffa_unknown_fields
2014                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2015                }
2016            }
2017            ::core::result::Result::Ok(())
2018        }
2019        fn cached_size(&self) -> u32 {
2020            self.__buffa_cached_size.get()
2021        }
2022        fn clear(&mut self) {
2023            self.number = ::core::option::Option::None;
2024            self.full_name = ::core::option::Option::None;
2025            self.r#type = ::core::option::Option::None;
2026            self.reserved = ::core::option::Option::None;
2027            self.repeated = ::core::option::Option::None;
2028            self.__buffa_unknown_fields.clear();
2029            self.__buffa_cached_size.set(0);
2030        }
2031    }
2032    impl ::buffa::ExtensionSet for Declaration {
2033        const PROTO_FQN: &'static str = "google.protobuf.ExtensionRangeOptions.Declaration";
2034        fn unknown_fields(&self) -> &::buffa::UnknownFields {
2035            &self.__buffa_unknown_fields
2036        }
2037        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2038            &mut self.__buffa_unknown_fields
2039        }
2040    }
2041}
2042/// Describes a field within a message.
2043#[derive(Clone, PartialEq, Default)]
2044pub struct FieldDescriptorProto {
2045    /// Field 1: `name`
2046    pub name: Option<::buffa::alloc::string::String>,
2047    /// Field 3: `number`
2048    pub number: Option<i32>,
2049    /// Field 4: `label`
2050    pub label: Option<field_descriptor_proto::Label>,
2051    /// If type_name is set, this need not be set.  If both this and type_name
2052    /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
2053    ///
2054    /// Field 5: `type`
2055    pub r#type: Option<field_descriptor_proto::Type>,
2056    /// For message and enum types, this is the name of the type.  If the name
2057    /// starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
2058    /// rules are used to find the type (i.e. first the nested types within this
2059    /// message are searched, then within the parent, on up to the root
2060    /// namespace).
2061    ///
2062    /// Field 6: `type_name`
2063    pub type_name: Option<::buffa::alloc::string::String>,
2064    /// For extensions, this is the name of the type being extended.  It is
2065    /// resolved in the same manner as type_name.
2066    ///
2067    /// Field 2: `extendee`
2068    pub extendee: Option<::buffa::alloc::string::String>,
2069    /// For numeric types, contains the original text representation of the value.
2070    /// For booleans, "true" or "false".
2071    /// For strings, contains the default text contents (not escaped in any way).
2072    /// For bytes, contains the C escaped value.  All bytes \>= 128 are escaped.
2073    ///
2074    /// Field 7: `default_value`
2075    pub default_value: Option<::buffa::alloc::string::String>,
2076    /// If set, gives the index of a oneof in the containing type's oneof_decl
2077    /// list.  This field is a member of that oneof.
2078    ///
2079    /// Field 9: `oneof_index`
2080    pub oneof_index: Option<i32>,
2081    /// JSON name of this field. The value is set by protocol compiler. If the
2082    /// user has set a "json_name" option on this field, that option's value
2083    /// will be used. Otherwise, it's deduced from the field's name by converting
2084    /// it to camelCase.
2085    ///
2086    /// Field 10: `json_name`
2087    pub json_name: Option<::buffa::alloc::string::String>,
2088    /// Field 8: `options`
2089    pub options: ::buffa::MessageField<FieldOptions>,
2090    /// If true, this is a proto3 "optional". When a proto3 field is optional, it
2091    /// tracks presence regardless of field type.
2092    ///
2093    /// When proto3_optional is true, this field must belong to a oneof to signal
2094    /// to old proto3 clients that presence is tracked for this field. This oneof
2095    /// is known as a "synthetic" oneof, and this field must be its sole member
2096    /// (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
2097    /// exist in the descriptor only, and do not generate any API. Synthetic oneofs
2098    /// must be ordered after all "real" oneofs.
2099    ///
2100    /// For message fields, proto3_optional doesn't create any semantic change,
2101    /// since non-repeated message fields always track presence. However it still
2102    /// indicates the semantic detail of whether the user wrote "optional" or not.
2103    /// This can be useful for round-tripping the .proto file. For consistency we
2104    /// give message fields a synthetic oneof also, even though it is not required
2105    /// to track presence. This is especially important because the parser can't
2106    /// tell if a field is a message or an enum, so it must always create a
2107    /// synthetic oneof.
2108    ///
2109    /// Proto2 optional fields do not set this flag, because they already indicate
2110    /// optional with `LABEL_OPTIONAL`.
2111    ///
2112    /// Field 17: `proto3_optional`
2113    pub proto3_optional: Option<bool>,
2114    #[doc(hidden)]
2115    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2116    #[doc(hidden)]
2117    pub __buffa_cached_size: ::buffa::__private::CachedSize,
2118}
2119impl ::core::fmt::Debug for FieldDescriptorProto {
2120    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2121        f.debug_struct("FieldDescriptorProto")
2122            .field("name", &self.name)
2123            .field("number", &self.number)
2124            .field("label", &self.label)
2125            .field("r#type", &self.r#type)
2126            .field("type_name", &self.type_name)
2127            .field("extendee", &self.extendee)
2128            .field("default_value", &self.default_value)
2129            .field("oneof_index", &self.oneof_index)
2130            .field("json_name", &self.json_name)
2131            .field("options", &self.options)
2132            .field("proto3_optional", &self.proto3_optional)
2133            .finish()
2134    }
2135}
2136impl FieldDescriptorProto {
2137    /// Protobuf type URL for this message, for use with `Any::pack` and
2138    /// `Any::unpack_if`.
2139    ///
2140    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2141    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FieldDescriptorProto";
2142}
2143unsafe impl ::buffa::DefaultInstance for FieldDescriptorProto {
2144    fn default_instance() -> &'static Self {
2145        static VALUE: ::buffa::__private::OnceBox<FieldDescriptorProto> = ::buffa::__private::OnceBox::new();
2146        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2147    }
2148}
2149impl ::buffa::Message for FieldDescriptorProto {
2150    /// Returns the total encoded size in bytes.
2151    ///
2152    /// The result is a `u32`; the protobuf specification requires all
2153    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2154    /// compliant message will never overflow this type.
2155    fn compute_size(&self) -> u32 {
2156        #[allow(unused_imports)]
2157        use ::buffa::Enumeration as _;
2158        let mut size = 0u32;
2159        if let Some(ref v) = self.name {
2160            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2161        }
2162        if let Some(v) = self.number {
2163            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
2164        }
2165        if let Some(ref v) = self.label {
2166            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2167        }
2168        if let Some(ref v) = self.r#type {
2169            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2170        }
2171        if let Some(ref v) = self.type_name {
2172            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2173        }
2174        if let Some(ref v) = self.extendee {
2175            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2176        }
2177        if let Some(ref v) = self.default_value {
2178            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2179        }
2180        if let Some(v) = self.oneof_index {
2181            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
2182        }
2183        if let Some(ref v) = self.json_name {
2184            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2185        }
2186        if self.options.is_set() {
2187            let inner_size = self.options.compute_size();
2188            size
2189                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2190                    + inner_size;
2191        }
2192        if self.proto3_optional.is_some() {
2193            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2194        }
2195        size += self.__buffa_unknown_fields.encoded_len() as u32;
2196        self.__buffa_cached_size.set(size);
2197        size
2198    }
2199    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
2200        #[allow(unused_imports)]
2201        use ::buffa::Enumeration as _;
2202        if let Some(ref v) = self.name {
2203            ::buffa::encoding::Tag::new(
2204                    1u32,
2205                    ::buffa::encoding::WireType::LengthDelimited,
2206                )
2207                .encode(buf);
2208            ::buffa::types::encode_string(v, buf);
2209        }
2210        if let Some(v) = self.number {
2211            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
2212                .encode(buf);
2213            ::buffa::types::encode_int32(v, buf);
2214        }
2215        if let Some(ref v) = self.label {
2216            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
2217                .encode(buf);
2218            ::buffa::types::encode_int32(v.to_i32(), buf);
2219        }
2220        if let Some(ref v) = self.r#type {
2221            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
2222                .encode(buf);
2223            ::buffa::types::encode_int32(v.to_i32(), buf);
2224        }
2225        if let Some(ref v) = self.type_name {
2226            ::buffa::encoding::Tag::new(
2227                    6u32,
2228                    ::buffa::encoding::WireType::LengthDelimited,
2229                )
2230                .encode(buf);
2231            ::buffa::types::encode_string(v, buf);
2232        }
2233        if let Some(ref v) = self.extendee {
2234            ::buffa::encoding::Tag::new(
2235                    2u32,
2236                    ::buffa::encoding::WireType::LengthDelimited,
2237                )
2238                .encode(buf);
2239            ::buffa::types::encode_string(v, buf);
2240        }
2241        if let Some(ref v) = self.default_value {
2242            ::buffa::encoding::Tag::new(
2243                    7u32,
2244                    ::buffa::encoding::WireType::LengthDelimited,
2245                )
2246                .encode(buf);
2247            ::buffa::types::encode_string(v, buf);
2248        }
2249        if let Some(v) = self.oneof_index {
2250            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
2251                .encode(buf);
2252            ::buffa::types::encode_int32(v, buf);
2253        }
2254        if let Some(ref v) = self.json_name {
2255            ::buffa::encoding::Tag::new(
2256                    10u32,
2257                    ::buffa::encoding::WireType::LengthDelimited,
2258                )
2259                .encode(buf);
2260            ::buffa::types::encode_string(v, buf);
2261        }
2262        if self.options.is_set() {
2263            ::buffa::encoding::Tag::new(
2264                    8u32,
2265                    ::buffa::encoding::WireType::LengthDelimited,
2266                )
2267                .encode(buf);
2268            ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
2269            self.options.write_to(buf);
2270        }
2271        if let Some(v) = self.proto3_optional {
2272            ::buffa::encoding::Tag::new(17u32, ::buffa::encoding::WireType::Varint)
2273                .encode(buf);
2274            ::buffa::types::encode_bool(v, buf);
2275        }
2276        self.__buffa_unknown_fields.write_to(buf);
2277    }
2278    fn merge_field(
2279        &mut self,
2280        tag: ::buffa::encoding::Tag,
2281        buf: &mut impl ::buffa::bytes::Buf,
2282        depth: u32,
2283    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2284        #[allow(unused_imports)]
2285        use ::buffa::bytes::Buf as _;
2286        #[allow(unused_imports)]
2287        use ::buffa::Enumeration as _;
2288        match tag.field_number() {
2289            1u32 => {
2290                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2291                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2292                        field_number: 1u32,
2293                        expected: 2u8,
2294                        actual: tag.wire_type() as u8,
2295                    });
2296                }
2297                ::buffa::types::merge_string(
2298                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
2299                    buf,
2300                )?;
2301            }
2302            3u32 => {
2303                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2304                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2305                        field_number: 3u32,
2306                        expected: 0u8,
2307                        actual: tag.wire_type() as u8,
2308                    });
2309                }
2310                self.number = ::core::option::Option::Some(
2311                    ::buffa::types::decode_int32(buf)?,
2312                );
2313            }
2314            4u32 => {
2315                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2316                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2317                        field_number: 4u32,
2318                        expected: 0u8,
2319                        actual: tag.wire_type() as u8,
2320                    });
2321                }
2322                let __raw = ::buffa::types::decode_int32(buf)?;
2323                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
2324                    __raw,
2325                ) {
2326                    self.label = ::core::option::Option::Some(__v);
2327                } else {
2328                    self.__buffa_unknown_fields
2329                        .push(::buffa::UnknownField {
2330                            number: 4u32,
2331                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
2332                        });
2333                }
2334            }
2335            5u32 => {
2336                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2337                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2338                        field_number: 5u32,
2339                        expected: 0u8,
2340                        actual: tag.wire_type() as u8,
2341                    });
2342                }
2343                let __raw = ::buffa::types::decode_int32(buf)?;
2344                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
2345                    __raw,
2346                ) {
2347                    self.r#type = ::core::option::Option::Some(__v);
2348                } else {
2349                    self.__buffa_unknown_fields
2350                        .push(::buffa::UnknownField {
2351                            number: 5u32,
2352                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
2353                        });
2354                }
2355            }
2356            6u32 => {
2357                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2358                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2359                        field_number: 6u32,
2360                        expected: 2u8,
2361                        actual: tag.wire_type() as u8,
2362                    });
2363                }
2364                ::buffa::types::merge_string(
2365                    self
2366                        .type_name
2367                        .get_or_insert_with(::buffa::alloc::string::String::new),
2368                    buf,
2369                )?;
2370            }
2371            2u32 => {
2372                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2373                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2374                        field_number: 2u32,
2375                        expected: 2u8,
2376                        actual: tag.wire_type() as u8,
2377                    });
2378                }
2379                ::buffa::types::merge_string(
2380                    self
2381                        .extendee
2382                        .get_or_insert_with(::buffa::alloc::string::String::new),
2383                    buf,
2384                )?;
2385            }
2386            7u32 => {
2387                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2388                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2389                        field_number: 7u32,
2390                        expected: 2u8,
2391                        actual: tag.wire_type() as u8,
2392                    });
2393                }
2394                ::buffa::types::merge_string(
2395                    self
2396                        .default_value
2397                        .get_or_insert_with(::buffa::alloc::string::String::new),
2398                    buf,
2399                )?;
2400            }
2401            9u32 => {
2402                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2403                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2404                        field_number: 9u32,
2405                        expected: 0u8,
2406                        actual: tag.wire_type() as u8,
2407                    });
2408                }
2409                self.oneof_index = ::core::option::Option::Some(
2410                    ::buffa::types::decode_int32(buf)?,
2411                );
2412            }
2413            10u32 => {
2414                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2415                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2416                        field_number: 10u32,
2417                        expected: 2u8,
2418                        actual: tag.wire_type() as u8,
2419                    });
2420                }
2421                ::buffa::types::merge_string(
2422                    self
2423                        .json_name
2424                        .get_or_insert_with(::buffa::alloc::string::String::new),
2425                    buf,
2426                )?;
2427            }
2428            8u32 => {
2429                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2430                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2431                        field_number: 8u32,
2432                        expected: 2u8,
2433                        actual: tag.wire_type() as u8,
2434                    });
2435                }
2436                ::buffa::Message::merge_length_delimited(
2437                    self.options.get_or_insert_default(),
2438                    buf,
2439                    depth,
2440                )?;
2441            }
2442            17u32 => {
2443                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2444                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2445                        field_number: 17u32,
2446                        expected: 0u8,
2447                        actual: tag.wire_type() as u8,
2448                    });
2449                }
2450                self.proto3_optional = ::core::option::Option::Some(
2451                    ::buffa::types::decode_bool(buf)?,
2452                );
2453            }
2454            _ => {
2455                self.__buffa_unknown_fields
2456                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2457            }
2458        }
2459        ::core::result::Result::Ok(())
2460    }
2461    fn cached_size(&self) -> u32 {
2462        self.__buffa_cached_size.get()
2463    }
2464    fn clear(&mut self) {
2465        self.name = ::core::option::Option::None;
2466        self.number = ::core::option::Option::None;
2467        self.label = ::core::option::Option::None;
2468        self.r#type = ::core::option::Option::None;
2469        self.type_name = ::core::option::Option::None;
2470        self.extendee = ::core::option::Option::None;
2471        self.default_value = ::core::option::Option::None;
2472        self.oneof_index = ::core::option::Option::None;
2473        self.json_name = ::core::option::Option::None;
2474        self.options = ::buffa::MessageField::none();
2475        self.proto3_optional = ::core::option::Option::None;
2476        self.__buffa_unknown_fields.clear();
2477        self.__buffa_cached_size.set(0);
2478    }
2479}
2480impl ::buffa::ExtensionSet for FieldDescriptorProto {
2481    const PROTO_FQN: &'static str = "google.protobuf.FieldDescriptorProto";
2482    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2483        &self.__buffa_unknown_fields
2484    }
2485    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2486        &mut self.__buffa_unknown_fields
2487    }
2488}
2489pub mod field_descriptor_proto {
2490    #[allow(unused_imports)]
2491    use super::*;
2492    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2493    #[repr(i32)]
2494    pub enum Type {
2495        /// 0 is reserved for errors.
2496        /// Order is weird for historical reasons.
2497        TYPE_DOUBLE = 1i32,
2498        TYPE_FLOAT = 2i32,
2499        /// Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if
2500        /// negative values are likely.
2501        TYPE_INT64 = 3i32,
2502        TYPE_UINT64 = 4i32,
2503        /// Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if
2504        /// negative values are likely.
2505        TYPE_INT32 = 5i32,
2506        TYPE_FIXED64 = 6i32,
2507        TYPE_FIXED32 = 7i32,
2508        TYPE_BOOL = 8i32,
2509        TYPE_STRING = 9i32,
2510        /// Tag-delimited aggregate.
2511        /// Group type is deprecated and not supported after google.protobuf. However, Proto3
2512        /// implementations should still be able to parse the group wire format and
2513        /// treat group fields as unknown fields.  In Editions, the group wire format
2514        /// can be enabled via the `message_encoding` feature.
2515        TYPE_GROUP = 10i32,
2516        /// Length-delimited aggregate.
2517        TYPE_MESSAGE = 11i32,
2518        /// New in version 2.
2519        TYPE_BYTES = 12i32,
2520        TYPE_UINT32 = 13i32,
2521        TYPE_ENUM = 14i32,
2522        TYPE_SFIXED32 = 15i32,
2523        TYPE_SFIXED64 = 16i32,
2524        /// Uses ZigZag encoding.
2525        TYPE_SINT32 = 17i32,
2526        /// Uses ZigZag encoding.
2527        TYPE_SINT64 = 18i32,
2528    }
2529    impl ::core::default::Default for Type {
2530        fn default() -> Self {
2531            Self::TYPE_DOUBLE
2532        }
2533    }
2534    impl ::buffa::Enumeration for Type {
2535        fn from_i32(value: i32) -> ::core::option::Option<Self> {
2536            match value {
2537                1i32 => ::core::option::Option::Some(Self::TYPE_DOUBLE),
2538                2i32 => ::core::option::Option::Some(Self::TYPE_FLOAT),
2539                3i32 => ::core::option::Option::Some(Self::TYPE_INT64),
2540                4i32 => ::core::option::Option::Some(Self::TYPE_UINT64),
2541                5i32 => ::core::option::Option::Some(Self::TYPE_INT32),
2542                6i32 => ::core::option::Option::Some(Self::TYPE_FIXED64),
2543                7i32 => ::core::option::Option::Some(Self::TYPE_FIXED32),
2544                8i32 => ::core::option::Option::Some(Self::TYPE_BOOL),
2545                9i32 => ::core::option::Option::Some(Self::TYPE_STRING),
2546                10i32 => ::core::option::Option::Some(Self::TYPE_GROUP),
2547                11i32 => ::core::option::Option::Some(Self::TYPE_MESSAGE),
2548                12i32 => ::core::option::Option::Some(Self::TYPE_BYTES),
2549                13i32 => ::core::option::Option::Some(Self::TYPE_UINT32),
2550                14i32 => ::core::option::Option::Some(Self::TYPE_ENUM),
2551                15i32 => ::core::option::Option::Some(Self::TYPE_SFIXED32),
2552                16i32 => ::core::option::Option::Some(Self::TYPE_SFIXED64),
2553                17i32 => ::core::option::Option::Some(Self::TYPE_SINT32),
2554                18i32 => ::core::option::Option::Some(Self::TYPE_SINT64),
2555                _ => ::core::option::Option::None,
2556            }
2557        }
2558        fn to_i32(&self) -> i32 {
2559            *self as i32
2560        }
2561        fn proto_name(&self) -> &'static str {
2562            match self {
2563                Self::TYPE_DOUBLE => "TYPE_DOUBLE",
2564                Self::TYPE_FLOAT => "TYPE_FLOAT",
2565                Self::TYPE_INT64 => "TYPE_INT64",
2566                Self::TYPE_UINT64 => "TYPE_UINT64",
2567                Self::TYPE_INT32 => "TYPE_INT32",
2568                Self::TYPE_FIXED64 => "TYPE_FIXED64",
2569                Self::TYPE_FIXED32 => "TYPE_FIXED32",
2570                Self::TYPE_BOOL => "TYPE_BOOL",
2571                Self::TYPE_STRING => "TYPE_STRING",
2572                Self::TYPE_GROUP => "TYPE_GROUP",
2573                Self::TYPE_MESSAGE => "TYPE_MESSAGE",
2574                Self::TYPE_BYTES => "TYPE_BYTES",
2575                Self::TYPE_UINT32 => "TYPE_UINT32",
2576                Self::TYPE_ENUM => "TYPE_ENUM",
2577                Self::TYPE_SFIXED32 => "TYPE_SFIXED32",
2578                Self::TYPE_SFIXED64 => "TYPE_SFIXED64",
2579                Self::TYPE_SINT32 => "TYPE_SINT32",
2580                Self::TYPE_SINT64 => "TYPE_SINT64",
2581            }
2582        }
2583        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2584            match name {
2585                "TYPE_DOUBLE" => ::core::option::Option::Some(Self::TYPE_DOUBLE),
2586                "TYPE_FLOAT" => ::core::option::Option::Some(Self::TYPE_FLOAT),
2587                "TYPE_INT64" => ::core::option::Option::Some(Self::TYPE_INT64),
2588                "TYPE_UINT64" => ::core::option::Option::Some(Self::TYPE_UINT64),
2589                "TYPE_INT32" => ::core::option::Option::Some(Self::TYPE_INT32),
2590                "TYPE_FIXED64" => ::core::option::Option::Some(Self::TYPE_FIXED64),
2591                "TYPE_FIXED32" => ::core::option::Option::Some(Self::TYPE_FIXED32),
2592                "TYPE_BOOL" => ::core::option::Option::Some(Self::TYPE_BOOL),
2593                "TYPE_STRING" => ::core::option::Option::Some(Self::TYPE_STRING),
2594                "TYPE_GROUP" => ::core::option::Option::Some(Self::TYPE_GROUP),
2595                "TYPE_MESSAGE" => ::core::option::Option::Some(Self::TYPE_MESSAGE),
2596                "TYPE_BYTES" => ::core::option::Option::Some(Self::TYPE_BYTES),
2597                "TYPE_UINT32" => ::core::option::Option::Some(Self::TYPE_UINT32),
2598                "TYPE_ENUM" => ::core::option::Option::Some(Self::TYPE_ENUM),
2599                "TYPE_SFIXED32" => ::core::option::Option::Some(Self::TYPE_SFIXED32),
2600                "TYPE_SFIXED64" => ::core::option::Option::Some(Self::TYPE_SFIXED64),
2601                "TYPE_SINT32" => ::core::option::Option::Some(Self::TYPE_SINT32),
2602                "TYPE_SINT64" => ::core::option::Option::Some(Self::TYPE_SINT64),
2603                _ => ::core::option::Option::None,
2604            }
2605        }
2606    }
2607    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2608    #[repr(i32)]
2609    pub enum Label {
2610        /// 0 is reserved for errors
2611        LABEL_OPTIONAL = 1i32,
2612        LABEL_REPEATED = 3i32,
2613        /// The required label is only allowed in google.protobuf.  In proto3 and Editions
2614        /// it's explicitly prohibited.  In Editions, the `field_presence` feature
2615        /// can be used to get this behavior.
2616        LABEL_REQUIRED = 2i32,
2617    }
2618    impl ::core::default::Default for Label {
2619        fn default() -> Self {
2620            Self::LABEL_OPTIONAL
2621        }
2622    }
2623    impl ::buffa::Enumeration for Label {
2624        fn from_i32(value: i32) -> ::core::option::Option<Self> {
2625            match value {
2626                1i32 => ::core::option::Option::Some(Self::LABEL_OPTIONAL),
2627                3i32 => ::core::option::Option::Some(Self::LABEL_REPEATED),
2628                2i32 => ::core::option::Option::Some(Self::LABEL_REQUIRED),
2629                _ => ::core::option::Option::None,
2630            }
2631        }
2632        fn to_i32(&self) -> i32 {
2633            *self as i32
2634        }
2635        fn proto_name(&self) -> &'static str {
2636            match self {
2637                Self::LABEL_OPTIONAL => "LABEL_OPTIONAL",
2638                Self::LABEL_REPEATED => "LABEL_REPEATED",
2639                Self::LABEL_REQUIRED => "LABEL_REQUIRED",
2640            }
2641        }
2642        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2643            match name {
2644                "LABEL_OPTIONAL" => ::core::option::Option::Some(Self::LABEL_OPTIONAL),
2645                "LABEL_REPEATED" => ::core::option::Option::Some(Self::LABEL_REPEATED),
2646                "LABEL_REQUIRED" => ::core::option::Option::Some(Self::LABEL_REQUIRED),
2647                _ => ::core::option::Option::None,
2648            }
2649        }
2650    }
2651}
2652/// Describes a oneof.
2653#[derive(Clone, PartialEq, Default)]
2654pub struct OneofDescriptorProto {
2655    /// Field 1: `name`
2656    pub name: Option<::buffa::alloc::string::String>,
2657    /// Field 2: `options`
2658    pub options: ::buffa::MessageField<OneofOptions>,
2659    #[doc(hidden)]
2660    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2661    #[doc(hidden)]
2662    pub __buffa_cached_size: ::buffa::__private::CachedSize,
2663}
2664impl ::core::fmt::Debug for OneofDescriptorProto {
2665    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2666        f.debug_struct("OneofDescriptorProto")
2667            .field("name", &self.name)
2668            .field("options", &self.options)
2669            .finish()
2670    }
2671}
2672impl OneofDescriptorProto {
2673    /// Protobuf type URL for this message, for use with `Any::pack` and
2674    /// `Any::unpack_if`.
2675    ///
2676    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2677    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.OneofDescriptorProto";
2678}
2679unsafe impl ::buffa::DefaultInstance for OneofDescriptorProto {
2680    fn default_instance() -> &'static Self {
2681        static VALUE: ::buffa::__private::OnceBox<OneofDescriptorProto> = ::buffa::__private::OnceBox::new();
2682        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2683    }
2684}
2685impl ::buffa::Message for OneofDescriptorProto {
2686    /// Returns the total encoded size in bytes.
2687    ///
2688    /// The result is a `u32`; the protobuf specification requires all
2689    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2690    /// compliant message will never overflow this type.
2691    fn compute_size(&self) -> u32 {
2692        #[allow(unused_imports)]
2693        use ::buffa::Enumeration as _;
2694        let mut size = 0u32;
2695        if let Some(ref v) = self.name {
2696            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2697        }
2698        if self.options.is_set() {
2699            let inner_size = self.options.compute_size();
2700            size
2701                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2702                    + inner_size;
2703        }
2704        size += self.__buffa_unknown_fields.encoded_len() as u32;
2705        self.__buffa_cached_size.set(size);
2706        size
2707    }
2708    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
2709        #[allow(unused_imports)]
2710        use ::buffa::Enumeration as _;
2711        if let Some(ref v) = self.name {
2712            ::buffa::encoding::Tag::new(
2713                    1u32,
2714                    ::buffa::encoding::WireType::LengthDelimited,
2715                )
2716                .encode(buf);
2717            ::buffa::types::encode_string(v, buf);
2718        }
2719        if self.options.is_set() {
2720            ::buffa::encoding::Tag::new(
2721                    2u32,
2722                    ::buffa::encoding::WireType::LengthDelimited,
2723                )
2724                .encode(buf);
2725            ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
2726            self.options.write_to(buf);
2727        }
2728        self.__buffa_unknown_fields.write_to(buf);
2729    }
2730    fn merge_field(
2731        &mut self,
2732        tag: ::buffa::encoding::Tag,
2733        buf: &mut impl ::buffa::bytes::Buf,
2734        depth: u32,
2735    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2736        #[allow(unused_imports)]
2737        use ::buffa::bytes::Buf as _;
2738        #[allow(unused_imports)]
2739        use ::buffa::Enumeration as _;
2740        match tag.field_number() {
2741            1u32 => {
2742                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2743                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2744                        field_number: 1u32,
2745                        expected: 2u8,
2746                        actual: tag.wire_type() as u8,
2747                    });
2748                }
2749                ::buffa::types::merge_string(
2750                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
2751                    buf,
2752                )?;
2753            }
2754            2u32 => {
2755                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2756                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2757                        field_number: 2u32,
2758                        expected: 2u8,
2759                        actual: tag.wire_type() as u8,
2760                    });
2761                }
2762                ::buffa::Message::merge_length_delimited(
2763                    self.options.get_or_insert_default(),
2764                    buf,
2765                    depth,
2766                )?;
2767            }
2768            _ => {
2769                self.__buffa_unknown_fields
2770                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2771            }
2772        }
2773        ::core::result::Result::Ok(())
2774    }
2775    fn cached_size(&self) -> u32 {
2776        self.__buffa_cached_size.get()
2777    }
2778    fn clear(&mut self) {
2779        self.name = ::core::option::Option::None;
2780        self.options = ::buffa::MessageField::none();
2781        self.__buffa_unknown_fields.clear();
2782        self.__buffa_cached_size.set(0);
2783    }
2784}
2785impl ::buffa::ExtensionSet for OneofDescriptorProto {
2786    const PROTO_FQN: &'static str = "google.protobuf.OneofDescriptorProto";
2787    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2788        &self.__buffa_unknown_fields
2789    }
2790    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2791        &mut self.__buffa_unknown_fields
2792    }
2793}
2794/// Describes an enum type.
2795#[derive(Clone, PartialEq, Default)]
2796pub struct EnumDescriptorProto {
2797    /// Field 1: `name`
2798    pub name: Option<::buffa::alloc::string::String>,
2799    /// Field 2: `value`
2800    pub value: ::buffa::alloc::vec::Vec<EnumValueDescriptorProto>,
2801    /// Field 3: `options`
2802    pub options: ::buffa::MessageField<EnumOptions>,
2803    /// Range of reserved numeric values. Reserved numeric values may not be used
2804    /// by enum values in the same enum declaration. Reserved ranges may not
2805    /// overlap.
2806    ///
2807    /// Field 4: `reserved_range`
2808    pub reserved_range: ::buffa::alloc::vec::Vec<
2809        enum_descriptor_proto::EnumReservedRange,
2810    >,
2811    /// Reserved enum value names, which may not be reused. A given name may only
2812    /// be reserved once.
2813    ///
2814    /// Field 5: `reserved_name`
2815    pub reserved_name: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
2816    /// Support for `export` and `local` keywords on enums.
2817    ///
2818    /// Field 6: `visibility`
2819    pub visibility: Option<SymbolVisibility>,
2820    #[doc(hidden)]
2821    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2822    #[doc(hidden)]
2823    pub __buffa_cached_size: ::buffa::__private::CachedSize,
2824}
2825impl ::core::fmt::Debug for EnumDescriptorProto {
2826    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2827        f.debug_struct("EnumDescriptorProto")
2828            .field("name", &self.name)
2829            .field("value", &self.value)
2830            .field("options", &self.options)
2831            .field("reserved_range", &self.reserved_range)
2832            .field("reserved_name", &self.reserved_name)
2833            .field("visibility", &self.visibility)
2834            .finish()
2835    }
2836}
2837impl EnumDescriptorProto {
2838    /// Protobuf type URL for this message, for use with `Any::pack` and
2839    /// `Any::unpack_if`.
2840    ///
2841    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2842    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumDescriptorProto";
2843}
2844unsafe impl ::buffa::DefaultInstance for EnumDescriptorProto {
2845    fn default_instance() -> &'static Self {
2846        static VALUE: ::buffa::__private::OnceBox<EnumDescriptorProto> = ::buffa::__private::OnceBox::new();
2847        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2848    }
2849}
2850impl ::buffa::Message for EnumDescriptorProto {
2851    /// Returns the total encoded size in bytes.
2852    ///
2853    /// The result is a `u32`; the protobuf specification requires all
2854    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2855    /// compliant message will never overflow this type.
2856    fn compute_size(&self) -> u32 {
2857        #[allow(unused_imports)]
2858        use ::buffa::Enumeration as _;
2859        let mut size = 0u32;
2860        if let Some(ref v) = self.name {
2861            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2862        }
2863        if self.options.is_set() {
2864            let inner_size = self.options.compute_size();
2865            size
2866                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2867                    + inner_size;
2868        }
2869        if let Some(ref v) = self.visibility {
2870            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2871        }
2872        for v in &self.value {
2873            let inner_size = v.compute_size();
2874            size
2875                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2876                    + inner_size;
2877        }
2878        for v in &self.reserved_range {
2879            let inner_size = v.compute_size();
2880            size
2881                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2882                    + inner_size;
2883        }
2884        for v in &self.reserved_name {
2885            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2886        }
2887        size += self.__buffa_unknown_fields.encoded_len() as u32;
2888        self.__buffa_cached_size.set(size);
2889        size
2890    }
2891    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
2892        #[allow(unused_imports)]
2893        use ::buffa::Enumeration as _;
2894        if let Some(ref v) = self.name {
2895            ::buffa::encoding::Tag::new(
2896                    1u32,
2897                    ::buffa::encoding::WireType::LengthDelimited,
2898                )
2899                .encode(buf);
2900            ::buffa::types::encode_string(v, buf);
2901        }
2902        if self.options.is_set() {
2903            ::buffa::encoding::Tag::new(
2904                    3u32,
2905                    ::buffa::encoding::WireType::LengthDelimited,
2906                )
2907                .encode(buf);
2908            ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
2909            self.options.write_to(buf);
2910        }
2911        if let Some(ref v) = self.visibility {
2912            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
2913                .encode(buf);
2914            ::buffa::types::encode_int32(v.to_i32(), buf);
2915        }
2916        for v in &self.value {
2917            ::buffa::encoding::Tag::new(
2918                    2u32,
2919                    ::buffa::encoding::WireType::LengthDelimited,
2920                )
2921                .encode(buf);
2922            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
2923            v.write_to(buf);
2924        }
2925        for v in &self.reserved_range {
2926            ::buffa::encoding::Tag::new(
2927                    4u32,
2928                    ::buffa::encoding::WireType::LengthDelimited,
2929                )
2930                .encode(buf);
2931            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
2932            v.write_to(buf);
2933        }
2934        for v in &self.reserved_name {
2935            ::buffa::encoding::Tag::new(
2936                    5u32,
2937                    ::buffa::encoding::WireType::LengthDelimited,
2938                )
2939                .encode(buf);
2940            ::buffa::types::encode_string(v, buf);
2941        }
2942        self.__buffa_unknown_fields.write_to(buf);
2943    }
2944    fn merge_field(
2945        &mut self,
2946        tag: ::buffa::encoding::Tag,
2947        buf: &mut impl ::buffa::bytes::Buf,
2948        depth: u32,
2949    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2950        #[allow(unused_imports)]
2951        use ::buffa::bytes::Buf as _;
2952        #[allow(unused_imports)]
2953        use ::buffa::Enumeration as _;
2954        match tag.field_number() {
2955            1u32 => {
2956                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2957                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2958                        field_number: 1u32,
2959                        expected: 2u8,
2960                        actual: tag.wire_type() as u8,
2961                    });
2962                }
2963                ::buffa::types::merge_string(
2964                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
2965                    buf,
2966                )?;
2967            }
2968            3u32 => {
2969                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2970                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2971                        field_number: 3u32,
2972                        expected: 2u8,
2973                        actual: tag.wire_type() as u8,
2974                    });
2975                }
2976                ::buffa::Message::merge_length_delimited(
2977                    self.options.get_or_insert_default(),
2978                    buf,
2979                    depth,
2980                )?;
2981            }
2982            6u32 => {
2983                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2984                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2985                        field_number: 6u32,
2986                        expected: 0u8,
2987                        actual: tag.wire_type() as u8,
2988                    });
2989                }
2990                let __raw = ::buffa::types::decode_int32(buf)?;
2991                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
2992                    __raw,
2993                ) {
2994                    self.visibility = ::core::option::Option::Some(__v);
2995                } else {
2996                    self.__buffa_unknown_fields
2997                        .push(::buffa::UnknownField {
2998                            number: 6u32,
2999                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
3000                        });
3001                }
3002            }
3003            2u32 => {
3004                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3005                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3006                        field_number: 2u32,
3007                        expected: 2u8,
3008                        actual: tag.wire_type() as u8,
3009                    });
3010                }
3011                let mut elem = ::core::default::Default::default();
3012                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3013                self.value.push(elem);
3014            }
3015            4u32 => {
3016                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3017                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3018                        field_number: 4u32,
3019                        expected: 2u8,
3020                        actual: tag.wire_type() as u8,
3021                    });
3022                }
3023                let mut elem = ::core::default::Default::default();
3024                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3025                self.reserved_range.push(elem);
3026            }
3027            5u32 => {
3028                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3029                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3030                        field_number: 5u32,
3031                        expected: 2u8,
3032                        actual: tag.wire_type() as u8,
3033                    });
3034                }
3035                self.reserved_name.push(::buffa::types::decode_string(buf)?);
3036            }
3037            _ => {
3038                self.__buffa_unknown_fields
3039                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3040            }
3041        }
3042        ::core::result::Result::Ok(())
3043    }
3044    fn cached_size(&self) -> u32 {
3045        self.__buffa_cached_size.get()
3046    }
3047    fn clear(&mut self) {
3048        self.name = ::core::option::Option::None;
3049        self.options = ::buffa::MessageField::none();
3050        self.visibility = ::core::option::Option::None;
3051        self.value.clear();
3052        self.reserved_range.clear();
3053        self.reserved_name.clear();
3054        self.__buffa_unknown_fields.clear();
3055        self.__buffa_cached_size.set(0);
3056    }
3057}
3058impl ::buffa::ExtensionSet for EnumDescriptorProto {
3059    const PROTO_FQN: &'static str = "google.protobuf.EnumDescriptorProto";
3060    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3061        &self.__buffa_unknown_fields
3062    }
3063    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3064        &mut self.__buffa_unknown_fields
3065    }
3066}
3067pub mod enum_descriptor_proto {
3068    #[allow(unused_imports)]
3069    use super::*;
3070    /// Range of reserved numeric values. Reserved values may not be used by
3071    /// entries in the same enum. Reserved ranges may not overlap.
3072    ///
3073    /// Note that this is distinct from DescriptorProto.ReservedRange in that it
3074    /// is inclusive such that it can appropriately represent the entire int32
3075    /// domain.
3076    #[derive(Clone, PartialEq, Default)]
3077    pub struct EnumReservedRange {
3078        /// Inclusive.
3079        ///
3080        /// Field 1: `start`
3081        pub start: Option<i32>,
3082        /// Inclusive.
3083        ///
3084        /// Field 2: `end`
3085        pub end: Option<i32>,
3086        #[doc(hidden)]
3087        pub __buffa_unknown_fields: ::buffa::UnknownFields,
3088        #[doc(hidden)]
3089        pub __buffa_cached_size: ::buffa::__private::CachedSize,
3090    }
3091    impl ::core::fmt::Debug for EnumReservedRange {
3092        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3093            f.debug_struct("EnumReservedRange")
3094                .field("start", &self.start)
3095                .field("end", &self.end)
3096                .finish()
3097        }
3098    }
3099    impl EnumReservedRange {
3100        /// Protobuf type URL for this message, for use with `Any::pack` and
3101        /// `Any::unpack_if`.
3102        ///
3103        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3104        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumDescriptorProto.EnumReservedRange";
3105    }
3106    unsafe impl ::buffa::DefaultInstance for EnumReservedRange {
3107        fn default_instance() -> &'static Self {
3108            static VALUE: ::buffa::__private::OnceBox<EnumReservedRange> = ::buffa::__private::OnceBox::new();
3109            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3110        }
3111    }
3112    impl ::buffa::Message for EnumReservedRange {
3113        /// Returns the total encoded size in bytes.
3114        ///
3115        /// The result is a `u32`; the protobuf specification requires all
3116        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3117        /// compliant message will never overflow this type.
3118        fn compute_size(&self) -> u32 {
3119            #[allow(unused_imports)]
3120            use ::buffa::Enumeration as _;
3121            let mut size = 0u32;
3122            if let Some(v) = self.start {
3123                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3124            }
3125            if let Some(v) = self.end {
3126                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3127            }
3128            size += self.__buffa_unknown_fields.encoded_len() as u32;
3129            self.__buffa_cached_size.set(size);
3130            size
3131        }
3132        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
3133            #[allow(unused_imports)]
3134            use ::buffa::Enumeration as _;
3135            if let Some(v) = self.start {
3136                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
3137                    .encode(buf);
3138                ::buffa::types::encode_int32(v, buf);
3139            }
3140            if let Some(v) = self.end {
3141                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
3142                    .encode(buf);
3143                ::buffa::types::encode_int32(v, buf);
3144            }
3145            self.__buffa_unknown_fields.write_to(buf);
3146        }
3147        fn merge_field(
3148            &mut self,
3149            tag: ::buffa::encoding::Tag,
3150            buf: &mut impl ::buffa::bytes::Buf,
3151            depth: u32,
3152        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3153            #[allow(unused_imports)]
3154            use ::buffa::bytes::Buf as _;
3155            #[allow(unused_imports)]
3156            use ::buffa::Enumeration as _;
3157            match tag.field_number() {
3158                1u32 => {
3159                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3160                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3161                            field_number: 1u32,
3162                            expected: 0u8,
3163                            actual: tag.wire_type() as u8,
3164                        });
3165                    }
3166                    self.start = ::core::option::Option::Some(
3167                        ::buffa::types::decode_int32(buf)?,
3168                    );
3169                }
3170                2u32 => {
3171                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3172                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3173                            field_number: 2u32,
3174                            expected: 0u8,
3175                            actual: tag.wire_type() as u8,
3176                        });
3177                    }
3178                    self.end = ::core::option::Option::Some(
3179                        ::buffa::types::decode_int32(buf)?,
3180                    );
3181                }
3182                _ => {
3183                    self.__buffa_unknown_fields
3184                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3185                }
3186            }
3187            ::core::result::Result::Ok(())
3188        }
3189        fn cached_size(&self) -> u32 {
3190            self.__buffa_cached_size.get()
3191        }
3192        fn clear(&mut self) {
3193            self.start = ::core::option::Option::None;
3194            self.end = ::core::option::Option::None;
3195            self.__buffa_unknown_fields.clear();
3196            self.__buffa_cached_size.set(0);
3197        }
3198    }
3199    impl ::buffa::ExtensionSet for EnumReservedRange {
3200        const PROTO_FQN: &'static str = "google.protobuf.EnumDescriptorProto.EnumReservedRange";
3201        fn unknown_fields(&self) -> &::buffa::UnknownFields {
3202            &self.__buffa_unknown_fields
3203        }
3204        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3205            &mut self.__buffa_unknown_fields
3206        }
3207    }
3208}
3209/// Describes a value within an enum.
3210#[derive(Clone, PartialEq, Default)]
3211pub struct EnumValueDescriptorProto {
3212    /// Field 1: `name`
3213    pub name: Option<::buffa::alloc::string::String>,
3214    /// Field 2: `number`
3215    pub number: Option<i32>,
3216    /// Field 3: `options`
3217    pub options: ::buffa::MessageField<EnumValueOptions>,
3218    #[doc(hidden)]
3219    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3220    #[doc(hidden)]
3221    pub __buffa_cached_size: ::buffa::__private::CachedSize,
3222}
3223impl ::core::fmt::Debug for EnumValueDescriptorProto {
3224    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3225        f.debug_struct("EnumValueDescriptorProto")
3226            .field("name", &self.name)
3227            .field("number", &self.number)
3228            .field("options", &self.options)
3229            .finish()
3230    }
3231}
3232impl EnumValueDescriptorProto {
3233    /// Protobuf type URL for this message, for use with `Any::pack` and
3234    /// `Any::unpack_if`.
3235    ///
3236    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3237    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumValueDescriptorProto";
3238}
3239unsafe impl ::buffa::DefaultInstance for EnumValueDescriptorProto {
3240    fn default_instance() -> &'static Self {
3241        static VALUE: ::buffa::__private::OnceBox<EnumValueDescriptorProto> = ::buffa::__private::OnceBox::new();
3242        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3243    }
3244}
3245impl ::buffa::Message for EnumValueDescriptorProto {
3246    /// Returns the total encoded size in bytes.
3247    ///
3248    /// The result is a `u32`; the protobuf specification requires all
3249    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3250    /// compliant message will never overflow this type.
3251    fn compute_size(&self) -> u32 {
3252        #[allow(unused_imports)]
3253        use ::buffa::Enumeration as _;
3254        let mut size = 0u32;
3255        if let Some(ref v) = self.name {
3256            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3257        }
3258        if let Some(v) = self.number {
3259            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3260        }
3261        if self.options.is_set() {
3262            let inner_size = self.options.compute_size();
3263            size
3264                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3265                    + inner_size;
3266        }
3267        size += self.__buffa_unknown_fields.encoded_len() as u32;
3268        self.__buffa_cached_size.set(size);
3269        size
3270    }
3271    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
3272        #[allow(unused_imports)]
3273        use ::buffa::Enumeration as _;
3274        if let Some(ref v) = self.name {
3275            ::buffa::encoding::Tag::new(
3276                    1u32,
3277                    ::buffa::encoding::WireType::LengthDelimited,
3278                )
3279                .encode(buf);
3280            ::buffa::types::encode_string(v, buf);
3281        }
3282        if let Some(v) = self.number {
3283            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
3284                .encode(buf);
3285            ::buffa::types::encode_int32(v, buf);
3286        }
3287        if self.options.is_set() {
3288            ::buffa::encoding::Tag::new(
3289                    3u32,
3290                    ::buffa::encoding::WireType::LengthDelimited,
3291                )
3292                .encode(buf);
3293            ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
3294            self.options.write_to(buf);
3295        }
3296        self.__buffa_unknown_fields.write_to(buf);
3297    }
3298    fn merge_field(
3299        &mut self,
3300        tag: ::buffa::encoding::Tag,
3301        buf: &mut impl ::buffa::bytes::Buf,
3302        depth: u32,
3303    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3304        #[allow(unused_imports)]
3305        use ::buffa::bytes::Buf as _;
3306        #[allow(unused_imports)]
3307        use ::buffa::Enumeration as _;
3308        match tag.field_number() {
3309            1u32 => {
3310                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3311                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3312                        field_number: 1u32,
3313                        expected: 2u8,
3314                        actual: tag.wire_type() as u8,
3315                    });
3316                }
3317                ::buffa::types::merge_string(
3318                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
3319                    buf,
3320                )?;
3321            }
3322            2u32 => {
3323                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3324                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3325                        field_number: 2u32,
3326                        expected: 0u8,
3327                        actual: tag.wire_type() as u8,
3328                    });
3329                }
3330                self.number = ::core::option::Option::Some(
3331                    ::buffa::types::decode_int32(buf)?,
3332                );
3333            }
3334            3u32 => {
3335                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3336                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3337                        field_number: 3u32,
3338                        expected: 2u8,
3339                        actual: tag.wire_type() as u8,
3340                    });
3341                }
3342                ::buffa::Message::merge_length_delimited(
3343                    self.options.get_or_insert_default(),
3344                    buf,
3345                    depth,
3346                )?;
3347            }
3348            _ => {
3349                self.__buffa_unknown_fields
3350                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3351            }
3352        }
3353        ::core::result::Result::Ok(())
3354    }
3355    fn cached_size(&self) -> u32 {
3356        self.__buffa_cached_size.get()
3357    }
3358    fn clear(&mut self) {
3359        self.name = ::core::option::Option::None;
3360        self.number = ::core::option::Option::None;
3361        self.options = ::buffa::MessageField::none();
3362        self.__buffa_unknown_fields.clear();
3363        self.__buffa_cached_size.set(0);
3364    }
3365}
3366impl ::buffa::ExtensionSet for EnumValueDescriptorProto {
3367    const PROTO_FQN: &'static str = "google.protobuf.EnumValueDescriptorProto";
3368    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3369        &self.__buffa_unknown_fields
3370    }
3371    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3372        &mut self.__buffa_unknown_fields
3373    }
3374}
3375/// Describes a service.
3376#[derive(Clone, PartialEq, Default)]
3377pub struct ServiceDescriptorProto {
3378    /// Field 1: `name`
3379    pub name: Option<::buffa::alloc::string::String>,
3380    /// Field 2: `method`
3381    pub method: ::buffa::alloc::vec::Vec<MethodDescriptorProto>,
3382    /// Field 3: `options`
3383    pub options: ::buffa::MessageField<ServiceOptions>,
3384    #[doc(hidden)]
3385    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3386    #[doc(hidden)]
3387    pub __buffa_cached_size: ::buffa::__private::CachedSize,
3388}
3389impl ::core::fmt::Debug for ServiceDescriptorProto {
3390    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3391        f.debug_struct("ServiceDescriptorProto")
3392            .field("name", &self.name)
3393            .field("method", &self.method)
3394            .field("options", &self.options)
3395            .finish()
3396    }
3397}
3398impl ServiceDescriptorProto {
3399    /// Protobuf type URL for this message, for use with `Any::pack` and
3400    /// `Any::unpack_if`.
3401    ///
3402    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3403    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.ServiceDescriptorProto";
3404}
3405unsafe impl ::buffa::DefaultInstance for ServiceDescriptorProto {
3406    fn default_instance() -> &'static Self {
3407        static VALUE: ::buffa::__private::OnceBox<ServiceDescriptorProto> = ::buffa::__private::OnceBox::new();
3408        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3409    }
3410}
3411impl ::buffa::Message for ServiceDescriptorProto {
3412    /// Returns the total encoded size in bytes.
3413    ///
3414    /// The result is a `u32`; the protobuf specification requires all
3415    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3416    /// compliant message will never overflow this type.
3417    fn compute_size(&self) -> u32 {
3418        #[allow(unused_imports)]
3419        use ::buffa::Enumeration as _;
3420        let mut size = 0u32;
3421        if let Some(ref v) = self.name {
3422            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3423        }
3424        if self.options.is_set() {
3425            let inner_size = self.options.compute_size();
3426            size
3427                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3428                    + inner_size;
3429        }
3430        for v in &self.method {
3431            let inner_size = v.compute_size();
3432            size
3433                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3434                    + inner_size;
3435        }
3436        size += self.__buffa_unknown_fields.encoded_len() as u32;
3437        self.__buffa_cached_size.set(size);
3438        size
3439    }
3440    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
3441        #[allow(unused_imports)]
3442        use ::buffa::Enumeration as _;
3443        if let Some(ref v) = self.name {
3444            ::buffa::encoding::Tag::new(
3445                    1u32,
3446                    ::buffa::encoding::WireType::LengthDelimited,
3447                )
3448                .encode(buf);
3449            ::buffa::types::encode_string(v, buf);
3450        }
3451        if self.options.is_set() {
3452            ::buffa::encoding::Tag::new(
3453                    3u32,
3454                    ::buffa::encoding::WireType::LengthDelimited,
3455                )
3456                .encode(buf);
3457            ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
3458            self.options.write_to(buf);
3459        }
3460        for v in &self.method {
3461            ::buffa::encoding::Tag::new(
3462                    2u32,
3463                    ::buffa::encoding::WireType::LengthDelimited,
3464                )
3465                .encode(buf);
3466            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
3467            v.write_to(buf);
3468        }
3469        self.__buffa_unknown_fields.write_to(buf);
3470    }
3471    fn merge_field(
3472        &mut self,
3473        tag: ::buffa::encoding::Tag,
3474        buf: &mut impl ::buffa::bytes::Buf,
3475        depth: u32,
3476    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3477        #[allow(unused_imports)]
3478        use ::buffa::bytes::Buf as _;
3479        #[allow(unused_imports)]
3480        use ::buffa::Enumeration as _;
3481        match tag.field_number() {
3482            1u32 => {
3483                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3484                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3485                        field_number: 1u32,
3486                        expected: 2u8,
3487                        actual: tag.wire_type() as u8,
3488                    });
3489                }
3490                ::buffa::types::merge_string(
3491                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
3492                    buf,
3493                )?;
3494            }
3495            3u32 => {
3496                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3497                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3498                        field_number: 3u32,
3499                        expected: 2u8,
3500                        actual: tag.wire_type() as u8,
3501                    });
3502                }
3503                ::buffa::Message::merge_length_delimited(
3504                    self.options.get_or_insert_default(),
3505                    buf,
3506                    depth,
3507                )?;
3508            }
3509            2u32 => {
3510                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3511                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3512                        field_number: 2u32,
3513                        expected: 2u8,
3514                        actual: tag.wire_type() as u8,
3515                    });
3516                }
3517                let mut elem = ::core::default::Default::default();
3518                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3519                self.method.push(elem);
3520            }
3521            _ => {
3522                self.__buffa_unknown_fields
3523                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3524            }
3525        }
3526        ::core::result::Result::Ok(())
3527    }
3528    fn cached_size(&self) -> u32 {
3529        self.__buffa_cached_size.get()
3530    }
3531    fn clear(&mut self) {
3532        self.name = ::core::option::Option::None;
3533        self.options = ::buffa::MessageField::none();
3534        self.method.clear();
3535        self.__buffa_unknown_fields.clear();
3536        self.__buffa_cached_size.set(0);
3537    }
3538}
3539impl ::buffa::ExtensionSet for ServiceDescriptorProto {
3540    const PROTO_FQN: &'static str = "google.protobuf.ServiceDescriptorProto";
3541    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3542        &self.__buffa_unknown_fields
3543    }
3544    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3545        &mut self.__buffa_unknown_fields
3546    }
3547}
3548/// Describes a method of a service.
3549#[derive(Clone, PartialEq, Default)]
3550pub struct MethodDescriptorProto {
3551    /// Field 1: `name`
3552    pub name: Option<::buffa::alloc::string::String>,
3553    /// Input and output type names.  These are resolved in the same way as
3554    /// FieldDescriptorProto.type_name, but must refer to a message type.
3555    ///
3556    /// Field 2: `input_type`
3557    pub input_type: Option<::buffa::alloc::string::String>,
3558    /// Field 3: `output_type`
3559    pub output_type: Option<::buffa::alloc::string::String>,
3560    /// Field 4: `options`
3561    pub options: ::buffa::MessageField<MethodOptions>,
3562    /// Identifies if client streams multiple client messages
3563    ///
3564    /// Field 5: `client_streaming`
3565    pub client_streaming: Option<bool>,
3566    /// Identifies if server streams multiple server messages
3567    ///
3568    /// Field 6: `server_streaming`
3569    pub server_streaming: Option<bool>,
3570    #[doc(hidden)]
3571    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3572    #[doc(hidden)]
3573    pub __buffa_cached_size: ::buffa::__private::CachedSize,
3574}
3575impl ::core::fmt::Debug for MethodDescriptorProto {
3576    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3577        f.debug_struct("MethodDescriptorProto")
3578            .field("name", &self.name)
3579            .field("input_type", &self.input_type)
3580            .field("output_type", &self.output_type)
3581            .field("options", &self.options)
3582            .field("client_streaming", &self.client_streaming)
3583            .field("server_streaming", &self.server_streaming)
3584            .finish()
3585    }
3586}
3587impl MethodDescriptorProto {
3588    /// Protobuf type URL for this message, for use with `Any::pack` and
3589    /// `Any::unpack_if`.
3590    ///
3591    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3592    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.MethodDescriptorProto";
3593}
3594unsafe impl ::buffa::DefaultInstance for MethodDescriptorProto {
3595    fn default_instance() -> &'static Self {
3596        static VALUE: ::buffa::__private::OnceBox<MethodDescriptorProto> = ::buffa::__private::OnceBox::new();
3597        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3598    }
3599}
3600impl ::buffa::Message for MethodDescriptorProto {
3601    /// Returns the total encoded size in bytes.
3602    ///
3603    /// The result is a `u32`; the protobuf specification requires all
3604    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3605    /// compliant message will never overflow this type.
3606    fn compute_size(&self) -> u32 {
3607        #[allow(unused_imports)]
3608        use ::buffa::Enumeration as _;
3609        let mut size = 0u32;
3610        if let Some(ref v) = self.name {
3611            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3612        }
3613        if let Some(ref v) = self.input_type {
3614            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3615        }
3616        if let Some(ref v) = self.output_type {
3617            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3618        }
3619        if self.options.is_set() {
3620            let inner_size = self.options.compute_size();
3621            size
3622                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3623                    + inner_size;
3624        }
3625        if self.client_streaming.is_some() {
3626            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3627        }
3628        if self.server_streaming.is_some() {
3629            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3630        }
3631        size += self.__buffa_unknown_fields.encoded_len() as u32;
3632        self.__buffa_cached_size.set(size);
3633        size
3634    }
3635    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
3636        #[allow(unused_imports)]
3637        use ::buffa::Enumeration as _;
3638        if let Some(ref v) = self.name {
3639            ::buffa::encoding::Tag::new(
3640                    1u32,
3641                    ::buffa::encoding::WireType::LengthDelimited,
3642                )
3643                .encode(buf);
3644            ::buffa::types::encode_string(v, buf);
3645        }
3646        if let Some(ref v) = self.input_type {
3647            ::buffa::encoding::Tag::new(
3648                    2u32,
3649                    ::buffa::encoding::WireType::LengthDelimited,
3650                )
3651                .encode(buf);
3652            ::buffa::types::encode_string(v, buf);
3653        }
3654        if let Some(ref v) = self.output_type {
3655            ::buffa::encoding::Tag::new(
3656                    3u32,
3657                    ::buffa::encoding::WireType::LengthDelimited,
3658                )
3659                .encode(buf);
3660            ::buffa::types::encode_string(v, buf);
3661        }
3662        if self.options.is_set() {
3663            ::buffa::encoding::Tag::new(
3664                    4u32,
3665                    ::buffa::encoding::WireType::LengthDelimited,
3666                )
3667                .encode(buf);
3668            ::buffa::encoding::encode_varint(self.options.cached_size() as u64, buf);
3669            self.options.write_to(buf);
3670        }
3671        if let Some(v) = self.client_streaming {
3672            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
3673                .encode(buf);
3674            ::buffa::types::encode_bool(v, buf);
3675        }
3676        if let Some(v) = self.server_streaming {
3677            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
3678                .encode(buf);
3679            ::buffa::types::encode_bool(v, buf);
3680        }
3681        self.__buffa_unknown_fields.write_to(buf);
3682    }
3683    fn merge_field(
3684        &mut self,
3685        tag: ::buffa::encoding::Tag,
3686        buf: &mut impl ::buffa::bytes::Buf,
3687        depth: u32,
3688    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3689        #[allow(unused_imports)]
3690        use ::buffa::bytes::Buf as _;
3691        #[allow(unused_imports)]
3692        use ::buffa::Enumeration as _;
3693        match tag.field_number() {
3694            1u32 => {
3695                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3696                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3697                        field_number: 1u32,
3698                        expected: 2u8,
3699                        actual: tag.wire_type() as u8,
3700                    });
3701                }
3702                ::buffa::types::merge_string(
3703                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
3704                    buf,
3705                )?;
3706            }
3707            2u32 => {
3708                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3709                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3710                        field_number: 2u32,
3711                        expected: 2u8,
3712                        actual: tag.wire_type() as u8,
3713                    });
3714                }
3715                ::buffa::types::merge_string(
3716                    self
3717                        .input_type
3718                        .get_or_insert_with(::buffa::alloc::string::String::new),
3719                    buf,
3720                )?;
3721            }
3722            3u32 => {
3723                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3724                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3725                        field_number: 3u32,
3726                        expected: 2u8,
3727                        actual: tag.wire_type() as u8,
3728                    });
3729                }
3730                ::buffa::types::merge_string(
3731                    self
3732                        .output_type
3733                        .get_or_insert_with(::buffa::alloc::string::String::new),
3734                    buf,
3735                )?;
3736            }
3737            4u32 => {
3738                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3739                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3740                        field_number: 4u32,
3741                        expected: 2u8,
3742                        actual: tag.wire_type() as u8,
3743                    });
3744                }
3745                ::buffa::Message::merge_length_delimited(
3746                    self.options.get_or_insert_default(),
3747                    buf,
3748                    depth,
3749                )?;
3750            }
3751            5u32 => {
3752                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3753                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3754                        field_number: 5u32,
3755                        expected: 0u8,
3756                        actual: tag.wire_type() as u8,
3757                    });
3758                }
3759                self.client_streaming = ::core::option::Option::Some(
3760                    ::buffa::types::decode_bool(buf)?,
3761                );
3762            }
3763            6u32 => {
3764                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3765                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3766                        field_number: 6u32,
3767                        expected: 0u8,
3768                        actual: tag.wire_type() as u8,
3769                    });
3770                }
3771                self.server_streaming = ::core::option::Option::Some(
3772                    ::buffa::types::decode_bool(buf)?,
3773                );
3774            }
3775            _ => {
3776                self.__buffa_unknown_fields
3777                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3778            }
3779        }
3780        ::core::result::Result::Ok(())
3781    }
3782    fn cached_size(&self) -> u32 {
3783        self.__buffa_cached_size.get()
3784    }
3785    fn clear(&mut self) {
3786        self.name = ::core::option::Option::None;
3787        self.input_type = ::core::option::Option::None;
3788        self.output_type = ::core::option::Option::None;
3789        self.options = ::buffa::MessageField::none();
3790        self.client_streaming = ::core::option::Option::None;
3791        self.server_streaming = ::core::option::Option::None;
3792        self.__buffa_unknown_fields.clear();
3793        self.__buffa_cached_size.set(0);
3794    }
3795}
3796impl ::buffa::ExtensionSet for MethodDescriptorProto {
3797    const PROTO_FQN: &'static str = "google.protobuf.MethodDescriptorProto";
3798    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3799        &self.__buffa_unknown_fields
3800    }
3801    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3802        &mut self.__buffa_unknown_fields
3803    }
3804}
3805/// ===================================================================
3806/// Options
3807///
3808/// Each of the definitions above may have "options" attached.  These are
3809/// just annotations which may cause code to be generated slightly differently
3810/// or may contain hints for code that manipulates protocol messages.
3811///
3812/// Clients may define custom options as extensions of the *Options messages.
3813/// These extensions may not yet be known at parsing time, so the parser cannot
3814/// store the values in them.  Instead it stores them in a field in the *Options
3815/// message called uninterpreted_option. This field must have the same name
3816/// across all *Options messages. We then use this field to populate the
3817/// extensions when we build a descriptor, at which point all protos have been
3818/// parsed and so all extensions are known.
3819///
3820/// Extension numbers for custom options may be chosen as follows:
3821/// * For options which will only be used within a single application or
3822///   organization, or for experimental options, use field numbers 50000
3823///   through 99999.  It is up to you to ensure that you do not use the
3824///   same number for multiple options.
3825/// * For options which will be published and used publicly by multiple
3826///   independent entities, e-mail protobuf-global-extension-registry@google.com
3827///   to reserve extension numbers. Simply provide your project name (e.g.
3828///   Objective-C plugin) and your project website (if available) -- there's no
3829///   need to explain how you intend to use them. Usually you only need one
3830///   extension number. You can declare multiple options with only one extension
3831///   number by putting them in a sub-message. See the Custom Options section of
3832///   the docs for examples:
3833///   <https://developers.google.com/protocol-buffers/docs/proto#options>
3834///   If this turns out to be popular, a web service will be set up
3835///   to automatically assign option numbers.
3836#[derive(Clone, PartialEq, Default)]
3837pub struct FileOptions {
3838    /// Sets the Java package where classes generated from this .proto will be
3839    /// placed.  By default, the proto package is used, but this is often
3840    /// inappropriate because proto packages do not normally start with backwards
3841    /// domain names.
3842    ///
3843    /// Field 1: `java_package`
3844    pub java_package: Option<::buffa::alloc::string::String>,
3845    /// Controls the name of the wrapper Java class generated for the .proto file.
3846    /// That class will always contain the .proto file's getDescriptor() method as
3847    /// well as any top-level extensions defined in the .proto file.
3848    /// If java_multiple_files is disabled, then all the other classes from the
3849    /// .proto file will be nested inside the single wrapper outer class.
3850    ///
3851    /// Field 8: `java_outer_classname`
3852    pub java_outer_classname: Option<::buffa::alloc::string::String>,
3853    /// If enabled, then the Java code generator will generate a separate .java
3854    /// file for each top-level message, enum, and service defined in the .proto
3855    /// file.  Thus, these types will *not* be nested inside the wrapper class
3856    /// named by java_outer_classname.  However, the wrapper class will still be
3857    /// generated to contain the file's getDescriptor() method as well as any
3858    /// top-level extensions defined in the file.
3859    ///
3860    /// Field 10: `java_multiple_files`
3861    pub java_multiple_files: Option<bool>,
3862    /// This option does nothing.
3863    ///
3864    /// Field 20: `java_generate_equals_and_hash`
3865    pub java_generate_equals_and_hash: Option<bool>,
3866    /// A proto2 file can set this to true to opt in to UTF-8 checking for Java,
3867    /// which will throw an exception if invalid UTF-8 is parsed from the wire or
3868    /// assigned to a string field.
3869    ///
3870    /// TODO: clarify exactly what kinds of field types this option
3871    /// applies to, and update these docs accordingly.
3872    ///
3873    /// Proto3 files already perform these checks. Setting the option explicitly to
3874    /// false has no effect: it cannot be used to opt proto3 files out of UTF-8
3875    /// checks.
3876    ///
3877    /// Field 27: `java_string_check_utf8`
3878    pub java_string_check_utf8: Option<bool>,
3879    /// Field 9: `optimize_for`
3880    pub optimize_for: Option<file_options::OptimizeMode>,
3881    /// Sets the Go package where structs generated from this .proto will be
3882    /// placed. If omitted, the Go package will be derived from the following:
3883    ///   - The basename of the package import path, if provided.
3884    ///   - Otherwise, the package statement in the .proto file, if present.
3885    ///   - Otherwise, the basename of the .proto file, without extension.
3886    ///
3887    /// Field 11: `go_package`
3888    pub go_package: Option<::buffa::alloc::string::String>,
3889    /// Should generic services be generated in each language?  "Generic" services
3890    /// are not specific to any particular RPC system.  They are generated by the
3891    /// main code generators in each language (without additional plugins).
3892    /// Generic services were the only kind of service generation supported by
3893    /// early versions of google.protobuf.
3894    ///
3895    /// Generic services are now considered deprecated in favor of using plugins
3896    /// that generate code specific to your particular RPC system.  Therefore,
3897    /// these default to false.  Old code which depends on generic services should
3898    /// explicitly set them to true.
3899    ///
3900    /// Field 16: `cc_generic_services`
3901    pub cc_generic_services: Option<bool>,
3902    /// Field 17: `java_generic_services`
3903    pub java_generic_services: Option<bool>,
3904    /// Field 18: `py_generic_services`
3905    pub py_generic_services: Option<bool>,
3906    /// Is this file deprecated?
3907    /// Depending on the target platform, this can emit Deprecated annotations
3908    /// for everything in the file, or it will be completely ignored; in the very
3909    /// least, this is a formalization for deprecating files.
3910    ///
3911    /// Field 23: `deprecated`
3912    pub deprecated: Option<bool>,
3913    /// Enables the use of arenas for the proto messages in this file. This applies
3914    /// only to generated classes for C++.
3915    ///
3916    /// Field 31: `cc_enable_arenas`
3917    pub cc_enable_arenas: Option<bool>,
3918    /// Sets the objective c class prefix which is prepended to all objective c
3919    /// generated classes from this .proto. There is no default.
3920    ///
3921    /// Field 36: `objc_class_prefix`
3922    pub objc_class_prefix: Option<::buffa::alloc::string::String>,
3923    /// Namespace for generated classes; defaults to the package.
3924    ///
3925    /// Field 37: `csharp_namespace`
3926    pub csharp_namespace: Option<::buffa::alloc::string::String>,
3927    /// By default Swift generators will take the proto package and CamelCase it
3928    /// replacing '.' with underscore and use that to prefix the types/symbols
3929    /// defined. When this options is provided, they will use this value instead
3930    /// to prefix the types/symbols defined.
3931    ///
3932    /// Field 39: `swift_prefix`
3933    pub swift_prefix: Option<::buffa::alloc::string::String>,
3934    /// Sets the php class prefix which is prepended to all php generated classes
3935    /// from this .proto. Default is empty.
3936    ///
3937    /// Field 40: `php_class_prefix`
3938    pub php_class_prefix: Option<::buffa::alloc::string::String>,
3939    /// Use this option to change the namespace of php generated classes. Default
3940    /// is empty. When this option is empty, the package name will be used for
3941    /// determining the namespace.
3942    ///
3943    /// Field 41: `php_namespace`
3944    pub php_namespace: Option<::buffa::alloc::string::String>,
3945    /// Use this option to change the namespace of php generated metadata classes.
3946    /// Default is empty. When this option is empty, the proto file name will be
3947    /// used for determining the namespace.
3948    ///
3949    /// Field 44: `php_metadata_namespace`
3950    pub php_metadata_namespace: Option<::buffa::alloc::string::String>,
3951    /// Use this option to change the package of ruby generated classes. Default
3952    /// is empty. When this option is not set, the package name will be used for
3953    /// determining the ruby package.
3954    ///
3955    /// Field 45: `ruby_package`
3956    pub ruby_package: Option<::buffa::alloc::string::String>,
3957    /// Any features defined in the specific edition.
3958    /// WARNING: This field should only be used by protobuf plugins or special
3959    /// cases like the proto compiler. Other uses are discouraged and
3960    /// developers should rely on the protoreflect APIs for their client language.
3961    ///
3962    /// Field 50: `features`
3963    pub features: ::buffa::MessageField<FeatureSet>,
3964    /// The parser stores options it doesn't recognize here.
3965    /// See the documentation for the "Options" section above.
3966    ///
3967    /// Field 999: `uninterpreted_option`
3968    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
3969    #[doc(hidden)]
3970    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3971    #[doc(hidden)]
3972    pub __buffa_cached_size: ::buffa::__private::CachedSize,
3973}
3974impl ::core::fmt::Debug for FileOptions {
3975    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3976        f.debug_struct("FileOptions")
3977            .field("java_package", &self.java_package)
3978            .field("java_outer_classname", &self.java_outer_classname)
3979            .field("java_multiple_files", &self.java_multiple_files)
3980            .field("java_generate_equals_and_hash", &self.java_generate_equals_and_hash)
3981            .field("java_string_check_utf8", &self.java_string_check_utf8)
3982            .field("optimize_for", &self.optimize_for)
3983            .field("go_package", &self.go_package)
3984            .field("cc_generic_services", &self.cc_generic_services)
3985            .field("java_generic_services", &self.java_generic_services)
3986            .field("py_generic_services", &self.py_generic_services)
3987            .field("deprecated", &self.deprecated)
3988            .field("cc_enable_arenas", &self.cc_enable_arenas)
3989            .field("objc_class_prefix", &self.objc_class_prefix)
3990            .field("csharp_namespace", &self.csharp_namespace)
3991            .field("swift_prefix", &self.swift_prefix)
3992            .field("php_class_prefix", &self.php_class_prefix)
3993            .field("php_namespace", &self.php_namespace)
3994            .field("php_metadata_namespace", &self.php_metadata_namespace)
3995            .field("ruby_package", &self.ruby_package)
3996            .field("features", &self.features)
3997            .field("uninterpreted_option", &self.uninterpreted_option)
3998            .finish()
3999    }
4000}
4001impl FileOptions {
4002    /// Protobuf type URL for this message, for use with `Any::pack` and
4003    /// `Any::unpack_if`.
4004    ///
4005    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4006    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FileOptions";
4007}
4008unsafe impl ::buffa::DefaultInstance for FileOptions {
4009    fn default_instance() -> &'static Self {
4010        static VALUE: ::buffa::__private::OnceBox<FileOptions> = ::buffa::__private::OnceBox::new();
4011        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4012    }
4013}
4014impl ::buffa::Message for FileOptions {
4015    /// Returns the total encoded size in bytes.
4016    ///
4017    /// The result is a `u32`; the protobuf specification requires all
4018    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4019    /// compliant message will never overflow this type.
4020    fn compute_size(&self) -> u32 {
4021        #[allow(unused_imports)]
4022        use ::buffa::Enumeration as _;
4023        let mut size = 0u32;
4024        if let Some(ref v) = self.java_package {
4025            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4026        }
4027        if let Some(ref v) = self.java_outer_classname {
4028            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4029        }
4030        if self.java_multiple_files.is_some() {
4031            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4032        }
4033        if self.java_generate_equals_and_hash.is_some() {
4034            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4035        }
4036        if self.java_string_check_utf8.is_some() {
4037            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4038        }
4039        if let Some(ref v) = self.optimize_for {
4040            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
4041        }
4042        if let Some(ref v) = self.go_package {
4043            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4044        }
4045        if self.cc_generic_services.is_some() {
4046            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4047        }
4048        if self.java_generic_services.is_some() {
4049            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4050        }
4051        if self.py_generic_services.is_some() {
4052            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4053        }
4054        if self.deprecated.is_some() {
4055            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4056        }
4057        if self.cc_enable_arenas.is_some() {
4058            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4059        }
4060        if let Some(ref v) = self.objc_class_prefix {
4061            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4062        }
4063        if let Some(ref v) = self.csharp_namespace {
4064            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4065        }
4066        if let Some(ref v) = self.swift_prefix {
4067            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4068        }
4069        if let Some(ref v) = self.php_class_prefix {
4070            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4071        }
4072        if let Some(ref v) = self.php_namespace {
4073            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4074        }
4075        if let Some(ref v) = self.php_metadata_namespace {
4076            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4077        }
4078        if let Some(ref v) = self.ruby_package {
4079            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4080        }
4081        if self.features.is_set() {
4082            let inner_size = self.features.compute_size();
4083            size
4084                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4085                    + inner_size;
4086        }
4087        for v in &self.uninterpreted_option {
4088            let inner_size = v.compute_size();
4089            size
4090                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4091                    + inner_size;
4092        }
4093        size += self.__buffa_unknown_fields.encoded_len() as u32;
4094        self.__buffa_cached_size.set(size);
4095        size
4096    }
4097    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
4098        #[allow(unused_imports)]
4099        use ::buffa::Enumeration as _;
4100        if let Some(ref v) = self.java_package {
4101            ::buffa::encoding::Tag::new(
4102                    1u32,
4103                    ::buffa::encoding::WireType::LengthDelimited,
4104                )
4105                .encode(buf);
4106            ::buffa::types::encode_string(v, buf);
4107        }
4108        if let Some(ref v) = self.java_outer_classname {
4109            ::buffa::encoding::Tag::new(
4110                    8u32,
4111                    ::buffa::encoding::WireType::LengthDelimited,
4112                )
4113                .encode(buf);
4114            ::buffa::types::encode_string(v, buf);
4115        }
4116        if let Some(v) = self.java_multiple_files {
4117            ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
4118                .encode(buf);
4119            ::buffa::types::encode_bool(v, buf);
4120        }
4121        if let Some(v) = self.java_generate_equals_and_hash {
4122            ::buffa::encoding::Tag::new(20u32, ::buffa::encoding::WireType::Varint)
4123                .encode(buf);
4124            ::buffa::types::encode_bool(v, buf);
4125        }
4126        if let Some(v) = self.java_string_check_utf8 {
4127            ::buffa::encoding::Tag::new(27u32, ::buffa::encoding::WireType::Varint)
4128                .encode(buf);
4129            ::buffa::types::encode_bool(v, buf);
4130        }
4131        if let Some(ref v) = self.optimize_for {
4132            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
4133                .encode(buf);
4134            ::buffa::types::encode_int32(v.to_i32(), buf);
4135        }
4136        if let Some(ref v) = self.go_package {
4137            ::buffa::encoding::Tag::new(
4138                    11u32,
4139                    ::buffa::encoding::WireType::LengthDelimited,
4140                )
4141                .encode(buf);
4142            ::buffa::types::encode_string(v, buf);
4143        }
4144        if let Some(v) = self.cc_generic_services {
4145            ::buffa::encoding::Tag::new(16u32, ::buffa::encoding::WireType::Varint)
4146                .encode(buf);
4147            ::buffa::types::encode_bool(v, buf);
4148        }
4149        if let Some(v) = self.java_generic_services {
4150            ::buffa::encoding::Tag::new(17u32, ::buffa::encoding::WireType::Varint)
4151                .encode(buf);
4152            ::buffa::types::encode_bool(v, buf);
4153        }
4154        if let Some(v) = self.py_generic_services {
4155            ::buffa::encoding::Tag::new(18u32, ::buffa::encoding::WireType::Varint)
4156                .encode(buf);
4157            ::buffa::types::encode_bool(v, buf);
4158        }
4159        if let Some(v) = self.deprecated {
4160            ::buffa::encoding::Tag::new(23u32, ::buffa::encoding::WireType::Varint)
4161                .encode(buf);
4162            ::buffa::types::encode_bool(v, buf);
4163        }
4164        if let Some(v) = self.cc_enable_arenas {
4165            ::buffa::encoding::Tag::new(31u32, ::buffa::encoding::WireType::Varint)
4166                .encode(buf);
4167            ::buffa::types::encode_bool(v, buf);
4168        }
4169        if let Some(ref v) = self.objc_class_prefix {
4170            ::buffa::encoding::Tag::new(
4171                    36u32,
4172                    ::buffa::encoding::WireType::LengthDelimited,
4173                )
4174                .encode(buf);
4175            ::buffa::types::encode_string(v, buf);
4176        }
4177        if let Some(ref v) = self.csharp_namespace {
4178            ::buffa::encoding::Tag::new(
4179                    37u32,
4180                    ::buffa::encoding::WireType::LengthDelimited,
4181                )
4182                .encode(buf);
4183            ::buffa::types::encode_string(v, buf);
4184        }
4185        if let Some(ref v) = self.swift_prefix {
4186            ::buffa::encoding::Tag::new(
4187                    39u32,
4188                    ::buffa::encoding::WireType::LengthDelimited,
4189                )
4190                .encode(buf);
4191            ::buffa::types::encode_string(v, buf);
4192        }
4193        if let Some(ref v) = self.php_class_prefix {
4194            ::buffa::encoding::Tag::new(
4195                    40u32,
4196                    ::buffa::encoding::WireType::LengthDelimited,
4197                )
4198                .encode(buf);
4199            ::buffa::types::encode_string(v, buf);
4200        }
4201        if let Some(ref v) = self.php_namespace {
4202            ::buffa::encoding::Tag::new(
4203                    41u32,
4204                    ::buffa::encoding::WireType::LengthDelimited,
4205                )
4206                .encode(buf);
4207            ::buffa::types::encode_string(v, buf);
4208        }
4209        if let Some(ref v) = self.php_metadata_namespace {
4210            ::buffa::encoding::Tag::new(
4211                    44u32,
4212                    ::buffa::encoding::WireType::LengthDelimited,
4213                )
4214                .encode(buf);
4215            ::buffa::types::encode_string(v, buf);
4216        }
4217        if let Some(ref v) = self.ruby_package {
4218            ::buffa::encoding::Tag::new(
4219                    45u32,
4220                    ::buffa::encoding::WireType::LengthDelimited,
4221                )
4222                .encode(buf);
4223            ::buffa::types::encode_string(v, buf);
4224        }
4225        if self.features.is_set() {
4226            ::buffa::encoding::Tag::new(
4227                    50u32,
4228                    ::buffa::encoding::WireType::LengthDelimited,
4229                )
4230                .encode(buf);
4231            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
4232            self.features.write_to(buf);
4233        }
4234        for v in &self.uninterpreted_option {
4235            ::buffa::encoding::Tag::new(
4236                    999u32,
4237                    ::buffa::encoding::WireType::LengthDelimited,
4238                )
4239                .encode(buf);
4240            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
4241            v.write_to(buf);
4242        }
4243        self.__buffa_unknown_fields.write_to(buf);
4244    }
4245    fn merge_field(
4246        &mut self,
4247        tag: ::buffa::encoding::Tag,
4248        buf: &mut impl ::buffa::bytes::Buf,
4249        depth: u32,
4250    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4251        #[allow(unused_imports)]
4252        use ::buffa::bytes::Buf as _;
4253        #[allow(unused_imports)]
4254        use ::buffa::Enumeration as _;
4255        match tag.field_number() {
4256            1u32 => {
4257                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4258                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4259                        field_number: 1u32,
4260                        expected: 2u8,
4261                        actual: tag.wire_type() as u8,
4262                    });
4263                }
4264                ::buffa::types::merge_string(
4265                    self
4266                        .java_package
4267                        .get_or_insert_with(::buffa::alloc::string::String::new),
4268                    buf,
4269                )?;
4270            }
4271            8u32 => {
4272                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4273                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4274                        field_number: 8u32,
4275                        expected: 2u8,
4276                        actual: tag.wire_type() as u8,
4277                    });
4278                }
4279                ::buffa::types::merge_string(
4280                    self
4281                        .java_outer_classname
4282                        .get_or_insert_with(::buffa::alloc::string::String::new),
4283                    buf,
4284                )?;
4285            }
4286            10u32 => {
4287                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4288                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4289                        field_number: 10u32,
4290                        expected: 0u8,
4291                        actual: tag.wire_type() as u8,
4292                    });
4293                }
4294                self.java_multiple_files = ::core::option::Option::Some(
4295                    ::buffa::types::decode_bool(buf)?,
4296                );
4297            }
4298            20u32 => {
4299                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4300                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4301                        field_number: 20u32,
4302                        expected: 0u8,
4303                        actual: tag.wire_type() as u8,
4304                    });
4305                }
4306                self.java_generate_equals_and_hash = ::core::option::Option::Some(
4307                    ::buffa::types::decode_bool(buf)?,
4308                );
4309            }
4310            27u32 => {
4311                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4312                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4313                        field_number: 27u32,
4314                        expected: 0u8,
4315                        actual: tag.wire_type() as u8,
4316                    });
4317                }
4318                self.java_string_check_utf8 = ::core::option::Option::Some(
4319                    ::buffa::types::decode_bool(buf)?,
4320                );
4321            }
4322            9u32 => {
4323                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4324                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4325                        field_number: 9u32,
4326                        expected: 0u8,
4327                        actual: tag.wire_type() as u8,
4328                    });
4329                }
4330                let __raw = ::buffa::types::decode_int32(buf)?;
4331                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
4332                    __raw,
4333                ) {
4334                    self.optimize_for = ::core::option::Option::Some(__v);
4335                } else {
4336                    self.__buffa_unknown_fields
4337                        .push(::buffa::UnknownField {
4338                            number: 9u32,
4339                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
4340                        });
4341                }
4342            }
4343            11u32 => {
4344                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4345                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4346                        field_number: 11u32,
4347                        expected: 2u8,
4348                        actual: tag.wire_type() as u8,
4349                    });
4350                }
4351                ::buffa::types::merge_string(
4352                    self
4353                        .go_package
4354                        .get_or_insert_with(::buffa::alloc::string::String::new),
4355                    buf,
4356                )?;
4357            }
4358            16u32 => {
4359                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4360                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4361                        field_number: 16u32,
4362                        expected: 0u8,
4363                        actual: tag.wire_type() as u8,
4364                    });
4365                }
4366                self.cc_generic_services = ::core::option::Option::Some(
4367                    ::buffa::types::decode_bool(buf)?,
4368                );
4369            }
4370            17u32 => {
4371                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4372                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4373                        field_number: 17u32,
4374                        expected: 0u8,
4375                        actual: tag.wire_type() as u8,
4376                    });
4377                }
4378                self.java_generic_services = ::core::option::Option::Some(
4379                    ::buffa::types::decode_bool(buf)?,
4380                );
4381            }
4382            18u32 => {
4383                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4384                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4385                        field_number: 18u32,
4386                        expected: 0u8,
4387                        actual: tag.wire_type() as u8,
4388                    });
4389                }
4390                self.py_generic_services = ::core::option::Option::Some(
4391                    ::buffa::types::decode_bool(buf)?,
4392                );
4393            }
4394            23u32 => {
4395                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4396                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4397                        field_number: 23u32,
4398                        expected: 0u8,
4399                        actual: tag.wire_type() as u8,
4400                    });
4401                }
4402                self.deprecated = ::core::option::Option::Some(
4403                    ::buffa::types::decode_bool(buf)?,
4404                );
4405            }
4406            31u32 => {
4407                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4408                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4409                        field_number: 31u32,
4410                        expected: 0u8,
4411                        actual: tag.wire_type() as u8,
4412                    });
4413                }
4414                self.cc_enable_arenas = ::core::option::Option::Some(
4415                    ::buffa::types::decode_bool(buf)?,
4416                );
4417            }
4418            36u32 => {
4419                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4420                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4421                        field_number: 36u32,
4422                        expected: 2u8,
4423                        actual: tag.wire_type() as u8,
4424                    });
4425                }
4426                ::buffa::types::merge_string(
4427                    self
4428                        .objc_class_prefix
4429                        .get_or_insert_with(::buffa::alloc::string::String::new),
4430                    buf,
4431                )?;
4432            }
4433            37u32 => {
4434                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4435                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4436                        field_number: 37u32,
4437                        expected: 2u8,
4438                        actual: tag.wire_type() as u8,
4439                    });
4440                }
4441                ::buffa::types::merge_string(
4442                    self
4443                        .csharp_namespace
4444                        .get_or_insert_with(::buffa::alloc::string::String::new),
4445                    buf,
4446                )?;
4447            }
4448            39u32 => {
4449                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4450                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4451                        field_number: 39u32,
4452                        expected: 2u8,
4453                        actual: tag.wire_type() as u8,
4454                    });
4455                }
4456                ::buffa::types::merge_string(
4457                    self
4458                        .swift_prefix
4459                        .get_or_insert_with(::buffa::alloc::string::String::new),
4460                    buf,
4461                )?;
4462            }
4463            40u32 => {
4464                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4465                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4466                        field_number: 40u32,
4467                        expected: 2u8,
4468                        actual: tag.wire_type() as u8,
4469                    });
4470                }
4471                ::buffa::types::merge_string(
4472                    self
4473                        .php_class_prefix
4474                        .get_or_insert_with(::buffa::alloc::string::String::new),
4475                    buf,
4476                )?;
4477            }
4478            41u32 => {
4479                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4480                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4481                        field_number: 41u32,
4482                        expected: 2u8,
4483                        actual: tag.wire_type() as u8,
4484                    });
4485                }
4486                ::buffa::types::merge_string(
4487                    self
4488                        .php_namespace
4489                        .get_or_insert_with(::buffa::alloc::string::String::new),
4490                    buf,
4491                )?;
4492            }
4493            44u32 => {
4494                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4495                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4496                        field_number: 44u32,
4497                        expected: 2u8,
4498                        actual: tag.wire_type() as u8,
4499                    });
4500                }
4501                ::buffa::types::merge_string(
4502                    self
4503                        .php_metadata_namespace
4504                        .get_or_insert_with(::buffa::alloc::string::String::new),
4505                    buf,
4506                )?;
4507            }
4508            45u32 => {
4509                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4510                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4511                        field_number: 45u32,
4512                        expected: 2u8,
4513                        actual: tag.wire_type() as u8,
4514                    });
4515                }
4516                ::buffa::types::merge_string(
4517                    self
4518                        .ruby_package
4519                        .get_or_insert_with(::buffa::alloc::string::String::new),
4520                    buf,
4521                )?;
4522            }
4523            50u32 => {
4524                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4525                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4526                        field_number: 50u32,
4527                        expected: 2u8,
4528                        actual: tag.wire_type() as u8,
4529                    });
4530                }
4531                ::buffa::Message::merge_length_delimited(
4532                    self.features.get_or_insert_default(),
4533                    buf,
4534                    depth,
4535                )?;
4536            }
4537            999u32 => {
4538                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4539                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4540                        field_number: 999u32,
4541                        expected: 2u8,
4542                        actual: tag.wire_type() as u8,
4543                    });
4544                }
4545                let mut elem = ::core::default::Default::default();
4546                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4547                self.uninterpreted_option.push(elem);
4548            }
4549            _ => {
4550                self.__buffa_unknown_fields
4551                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4552            }
4553        }
4554        ::core::result::Result::Ok(())
4555    }
4556    fn cached_size(&self) -> u32 {
4557        self.__buffa_cached_size.get()
4558    }
4559    fn clear(&mut self) {
4560        self.java_package = ::core::option::Option::None;
4561        self.java_outer_classname = ::core::option::Option::None;
4562        self.java_multiple_files = ::core::option::Option::None;
4563        self.java_generate_equals_and_hash = ::core::option::Option::None;
4564        self.java_string_check_utf8 = ::core::option::Option::None;
4565        self.optimize_for = ::core::option::Option::None;
4566        self.go_package = ::core::option::Option::None;
4567        self.cc_generic_services = ::core::option::Option::None;
4568        self.java_generic_services = ::core::option::Option::None;
4569        self.py_generic_services = ::core::option::Option::None;
4570        self.deprecated = ::core::option::Option::None;
4571        self.cc_enable_arenas = ::core::option::Option::None;
4572        self.objc_class_prefix = ::core::option::Option::None;
4573        self.csharp_namespace = ::core::option::Option::None;
4574        self.swift_prefix = ::core::option::Option::None;
4575        self.php_class_prefix = ::core::option::Option::None;
4576        self.php_namespace = ::core::option::Option::None;
4577        self.php_metadata_namespace = ::core::option::Option::None;
4578        self.ruby_package = ::core::option::Option::None;
4579        self.features = ::buffa::MessageField::none();
4580        self.uninterpreted_option.clear();
4581        self.__buffa_unknown_fields.clear();
4582        self.__buffa_cached_size.set(0);
4583    }
4584}
4585impl ::buffa::ExtensionSet for FileOptions {
4586    const PROTO_FQN: &'static str = "google.protobuf.FileOptions";
4587    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4588        &self.__buffa_unknown_fields
4589    }
4590    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4591        &mut self.__buffa_unknown_fields
4592    }
4593}
4594pub mod file_options {
4595    #[allow(unused_imports)]
4596    use super::*;
4597    /// Generated classes can be optimized for speed or code size.
4598    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
4599    #[repr(i32)]
4600    pub enum OptimizeMode {
4601        /// Generate complete code for parsing, serialization,
4602        SPEED = 1i32,
4603        /// etc.
4604        ///
4605        /// Use ReflectionOps to implement these methods.
4606        CODE_SIZE = 2i32,
4607        /// Generate code using MessageLite and the lite runtime.
4608        LITE_RUNTIME = 3i32,
4609    }
4610    impl ::core::default::Default for OptimizeMode {
4611        fn default() -> Self {
4612            Self::SPEED
4613        }
4614    }
4615    impl ::buffa::Enumeration for OptimizeMode {
4616        fn from_i32(value: i32) -> ::core::option::Option<Self> {
4617            match value {
4618                1i32 => ::core::option::Option::Some(Self::SPEED),
4619                2i32 => ::core::option::Option::Some(Self::CODE_SIZE),
4620                3i32 => ::core::option::Option::Some(Self::LITE_RUNTIME),
4621                _ => ::core::option::Option::None,
4622            }
4623        }
4624        fn to_i32(&self) -> i32 {
4625            *self as i32
4626        }
4627        fn proto_name(&self) -> &'static str {
4628            match self {
4629                Self::SPEED => "SPEED",
4630                Self::CODE_SIZE => "CODE_SIZE",
4631                Self::LITE_RUNTIME => "LITE_RUNTIME",
4632            }
4633        }
4634        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
4635            match name {
4636                "SPEED" => ::core::option::Option::Some(Self::SPEED),
4637                "CODE_SIZE" => ::core::option::Option::Some(Self::CODE_SIZE),
4638                "LITE_RUNTIME" => ::core::option::Option::Some(Self::LITE_RUNTIME),
4639                _ => ::core::option::Option::None,
4640            }
4641        }
4642    }
4643}
4644#[derive(Clone, PartialEq, Default)]
4645pub struct MessageOptions {
4646    /// Set true to use the old proto1 MessageSet wire format for extensions.
4647    /// This is provided for backwards-compatibility with the MessageSet wire
4648    /// format.  You should not use this for any other reason:  It's less
4649    /// efficient, has fewer features, and is more complicated.
4650    ///
4651    /// The message must be defined exactly as follows:
4652    ///   message Foo {
4653    /// ```text
4654    /// option message_set_wire_format = true;
4655    /// extensions 4 to max;
4656    /// ```
4657    ///   }
4658    /// Note that the message cannot have any defined fields; MessageSets only
4659    /// have extensions.
4660    ///
4661    /// All extensions of your type must be singular messages; e.g. they cannot
4662    /// be int32s, enums, or repeated messages.
4663    ///
4664    /// Because this is an option, the above two restrictions are not enforced by
4665    /// the protocol compiler.
4666    ///
4667    /// Field 1: `message_set_wire_format`
4668    pub message_set_wire_format: Option<bool>,
4669    /// Disables the generation of the standard "descriptor()" accessor, which can
4670    /// conflict with a field of the same name.  This is meant to make migration
4671    /// from proto1 easier; new code should avoid fields named "descriptor".
4672    ///
4673    /// Field 2: `no_standard_descriptor_accessor`
4674    pub no_standard_descriptor_accessor: Option<bool>,
4675    /// Is this message deprecated?
4676    /// Depending on the target platform, this can emit Deprecated annotations
4677    /// for the message, or it will be completely ignored; in the very least,
4678    /// this is a formalization for deprecating messages.
4679    ///
4680    /// Field 3: `deprecated`
4681    pub deprecated: Option<bool>,
4682    /// Whether the message is an automatically generated map entry type for the
4683    /// maps field.
4684    ///
4685    /// For maps fields:
4686    /// ```text
4687    /// map<KeyType, ValueType> map_field = 1;
4688    /// ```
4689    /// The parsed descriptor looks like:
4690    /// ```text
4691    /// message MapFieldEntry {
4692    ///     option map_entry = true;
4693    ///     optional KeyType key = 1;
4694    ///     optional ValueType value = 2;
4695    /// }
4696    /// repeated MapFieldEntry map_field = 1;
4697    /// ```
4698    ///
4699    /// Implementations may choose not to generate the map_entry=true message, but
4700    /// use a native map in the target language to hold the keys and values.
4701    /// The reflection APIs in such implementations still need to work as
4702    /// if the field is a repeated message field.
4703    ///
4704    /// NOTE: Do not set the option in .proto files. Always use the maps syntax
4705    /// instead. The option should only be implicitly set by the proto compiler
4706    /// parser.
4707    ///
4708    /// Field 7: `map_entry`
4709    pub map_entry: Option<bool>,
4710    /// Enable the legacy handling of JSON field name conflicts.  This lowercases
4711    /// and strips underscored from the fields before comparison in proto3 only.
4712    /// The new behavior takes `json_name` into account and applies to proto2 as
4713    /// well.
4714    ///
4715    /// This should only be used as a temporary measure against broken builds due
4716    /// to the change in behavior for JSON field name conflicts.
4717    ///
4718    /// TODO This is legacy behavior we plan to remove once downstream
4719    /// teams have had time to migrate.
4720    ///
4721    /// Field 11: `deprecated_legacy_json_field_conflicts`
4722    pub deprecated_legacy_json_field_conflicts: Option<bool>,
4723    /// Any features defined in the specific edition.
4724    /// WARNING: This field should only be used by protobuf plugins or special
4725    /// cases like the proto compiler. Other uses are discouraged and
4726    /// developers should rely on the protoreflect APIs for their client language.
4727    ///
4728    /// Field 12: `features`
4729    pub features: ::buffa::MessageField<FeatureSet>,
4730    /// The parser stores options it doesn't recognize here. See above.
4731    ///
4732    /// Field 999: `uninterpreted_option`
4733    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
4734    #[doc(hidden)]
4735    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4736    #[doc(hidden)]
4737    pub __buffa_cached_size: ::buffa::__private::CachedSize,
4738}
4739impl ::core::fmt::Debug for MessageOptions {
4740    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4741        f.debug_struct("MessageOptions")
4742            .field("message_set_wire_format", &self.message_set_wire_format)
4743            .field(
4744                "no_standard_descriptor_accessor",
4745                &self.no_standard_descriptor_accessor,
4746            )
4747            .field("deprecated", &self.deprecated)
4748            .field("map_entry", &self.map_entry)
4749            .field(
4750                "deprecated_legacy_json_field_conflicts",
4751                &self.deprecated_legacy_json_field_conflicts,
4752            )
4753            .field("features", &self.features)
4754            .field("uninterpreted_option", &self.uninterpreted_option)
4755            .finish()
4756    }
4757}
4758impl MessageOptions {
4759    /// Protobuf type URL for this message, for use with `Any::pack` and
4760    /// `Any::unpack_if`.
4761    ///
4762    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4763    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.MessageOptions";
4764}
4765unsafe impl ::buffa::DefaultInstance for MessageOptions {
4766    fn default_instance() -> &'static Self {
4767        static VALUE: ::buffa::__private::OnceBox<MessageOptions> = ::buffa::__private::OnceBox::new();
4768        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4769    }
4770}
4771impl ::buffa::Message for MessageOptions {
4772    /// Returns the total encoded size in bytes.
4773    ///
4774    /// The result is a `u32`; the protobuf specification requires all
4775    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4776    /// compliant message will never overflow this type.
4777    fn compute_size(&self) -> u32 {
4778        #[allow(unused_imports)]
4779        use ::buffa::Enumeration as _;
4780        let mut size = 0u32;
4781        if self.message_set_wire_format.is_some() {
4782            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4783        }
4784        if self.no_standard_descriptor_accessor.is_some() {
4785            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4786        }
4787        if self.deprecated.is_some() {
4788            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4789        }
4790        if self.map_entry.is_some() {
4791            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4792        }
4793        if self.deprecated_legacy_json_field_conflicts.is_some() {
4794            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4795        }
4796        if self.features.is_set() {
4797            let inner_size = self.features.compute_size();
4798            size
4799                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4800                    + inner_size;
4801        }
4802        for v in &self.uninterpreted_option {
4803            let inner_size = v.compute_size();
4804            size
4805                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4806                    + inner_size;
4807        }
4808        size += self.__buffa_unknown_fields.encoded_len() as u32;
4809        self.__buffa_cached_size.set(size);
4810        size
4811    }
4812    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
4813        #[allow(unused_imports)]
4814        use ::buffa::Enumeration as _;
4815        if let Some(v) = self.message_set_wire_format {
4816            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
4817                .encode(buf);
4818            ::buffa::types::encode_bool(v, buf);
4819        }
4820        if let Some(v) = self.no_standard_descriptor_accessor {
4821            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
4822                .encode(buf);
4823            ::buffa::types::encode_bool(v, buf);
4824        }
4825        if let Some(v) = self.deprecated {
4826            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
4827                .encode(buf);
4828            ::buffa::types::encode_bool(v, buf);
4829        }
4830        if let Some(v) = self.map_entry {
4831            ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
4832                .encode(buf);
4833            ::buffa::types::encode_bool(v, buf);
4834        }
4835        if let Some(v) = self.deprecated_legacy_json_field_conflicts {
4836            ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
4837                .encode(buf);
4838            ::buffa::types::encode_bool(v, buf);
4839        }
4840        if self.features.is_set() {
4841            ::buffa::encoding::Tag::new(
4842                    12u32,
4843                    ::buffa::encoding::WireType::LengthDelimited,
4844                )
4845                .encode(buf);
4846            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
4847            self.features.write_to(buf);
4848        }
4849        for v in &self.uninterpreted_option {
4850            ::buffa::encoding::Tag::new(
4851                    999u32,
4852                    ::buffa::encoding::WireType::LengthDelimited,
4853                )
4854                .encode(buf);
4855            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
4856            v.write_to(buf);
4857        }
4858        self.__buffa_unknown_fields.write_to(buf);
4859    }
4860    fn merge_field(
4861        &mut self,
4862        tag: ::buffa::encoding::Tag,
4863        buf: &mut impl ::buffa::bytes::Buf,
4864        depth: u32,
4865    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4866        #[allow(unused_imports)]
4867        use ::buffa::bytes::Buf as _;
4868        #[allow(unused_imports)]
4869        use ::buffa::Enumeration as _;
4870        match tag.field_number() {
4871            1u32 => {
4872                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4873                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4874                        field_number: 1u32,
4875                        expected: 0u8,
4876                        actual: tag.wire_type() as u8,
4877                    });
4878                }
4879                self.message_set_wire_format = ::core::option::Option::Some(
4880                    ::buffa::types::decode_bool(buf)?,
4881                );
4882            }
4883            2u32 => {
4884                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4885                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4886                        field_number: 2u32,
4887                        expected: 0u8,
4888                        actual: tag.wire_type() as u8,
4889                    });
4890                }
4891                self.no_standard_descriptor_accessor = ::core::option::Option::Some(
4892                    ::buffa::types::decode_bool(buf)?,
4893                );
4894            }
4895            3u32 => {
4896                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4897                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4898                        field_number: 3u32,
4899                        expected: 0u8,
4900                        actual: tag.wire_type() as u8,
4901                    });
4902                }
4903                self.deprecated = ::core::option::Option::Some(
4904                    ::buffa::types::decode_bool(buf)?,
4905                );
4906            }
4907            7u32 => {
4908                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4909                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4910                        field_number: 7u32,
4911                        expected: 0u8,
4912                        actual: tag.wire_type() as u8,
4913                    });
4914                }
4915                self.map_entry = ::core::option::Option::Some(
4916                    ::buffa::types::decode_bool(buf)?,
4917                );
4918            }
4919            11u32 => {
4920                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4921                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4922                        field_number: 11u32,
4923                        expected: 0u8,
4924                        actual: tag.wire_type() as u8,
4925                    });
4926                }
4927                self.deprecated_legacy_json_field_conflicts = ::core::option::Option::Some(
4928                    ::buffa::types::decode_bool(buf)?,
4929                );
4930            }
4931            12u32 => {
4932                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4933                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4934                        field_number: 12u32,
4935                        expected: 2u8,
4936                        actual: tag.wire_type() as u8,
4937                    });
4938                }
4939                ::buffa::Message::merge_length_delimited(
4940                    self.features.get_or_insert_default(),
4941                    buf,
4942                    depth,
4943                )?;
4944            }
4945            999u32 => {
4946                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4947                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4948                        field_number: 999u32,
4949                        expected: 2u8,
4950                        actual: tag.wire_type() as u8,
4951                    });
4952                }
4953                let mut elem = ::core::default::Default::default();
4954                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4955                self.uninterpreted_option.push(elem);
4956            }
4957            _ => {
4958                self.__buffa_unknown_fields
4959                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4960            }
4961        }
4962        ::core::result::Result::Ok(())
4963    }
4964    fn cached_size(&self) -> u32 {
4965        self.__buffa_cached_size.get()
4966    }
4967    fn clear(&mut self) {
4968        self.message_set_wire_format = ::core::option::Option::None;
4969        self.no_standard_descriptor_accessor = ::core::option::Option::None;
4970        self.deprecated = ::core::option::Option::None;
4971        self.map_entry = ::core::option::Option::None;
4972        self.deprecated_legacy_json_field_conflicts = ::core::option::Option::None;
4973        self.features = ::buffa::MessageField::none();
4974        self.uninterpreted_option.clear();
4975        self.__buffa_unknown_fields.clear();
4976        self.__buffa_cached_size.set(0);
4977    }
4978}
4979impl ::buffa::ExtensionSet for MessageOptions {
4980    const PROTO_FQN: &'static str = "google.protobuf.MessageOptions";
4981    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4982        &self.__buffa_unknown_fields
4983    }
4984    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4985        &mut self.__buffa_unknown_fields
4986    }
4987}
4988#[derive(Clone, PartialEq, Default)]
4989pub struct FieldOptions {
4990    /// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
4991    /// The ctype option instructs the C++ code generator to use a different
4992    /// representation of the field than it normally would.  See the specific
4993    /// options below.  This option is only implemented to support use of
4994    /// \[ctype=CORD\] and \[ctype=STRING\] (the default) on non-repeated fields of
4995    /// type "bytes" in the open source release.
4996    /// TODO: make ctype actually deprecated.
4997    ///
4998    /// Field 1: `ctype`
4999    pub ctype: Option<field_options::CType>,
5000    /// The packed option can be enabled for repeated primitive fields to enable
5001    /// a more efficient representation on the wire. Rather than repeatedly
5002    /// writing the tag and type for each element, the entire array is encoded as
5003    /// a single length-delimited blob. In proto3, only explicit setting it to
5004    /// false will avoid using packed encoding.  This option is prohibited in
5005    /// Editions, but the `repeated_field_encoding` feature can be used to control
5006    /// the behavior.
5007    ///
5008    /// Field 2: `packed`
5009    pub packed: Option<bool>,
5010    /// The jstype option determines the JavaScript type used for values of the
5011    /// field.  The option is permitted only for 64 bit integral and fixed types
5012    /// (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING
5013    /// is represented as JavaScript string, which avoids loss of precision that
5014    /// can happen when a large value is converted to a floating point JavaScript.
5015    /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
5016    /// use the JavaScript "number" type.  The behavior of the default option
5017    /// JS_NORMAL is implementation dependent.
5018    ///
5019    /// This option is an enum to permit additional types to be added, e.g.
5020    /// goog.math.Integer.
5021    ///
5022    /// Field 6: `jstype`
5023    pub jstype: Option<field_options::JSType>,
5024    /// Should this field be parsed lazily?  Lazy applies only to message-type
5025    /// fields.  It means that when the outer message is initially parsed, the
5026    /// inner message's contents will not be parsed but instead stored in encoded
5027    /// form.  The inner message will actually be parsed when it is first accessed.
5028    ///
5029    /// This is only a hint.  Implementations are free to choose whether to use
5030    /// eager or lazy parsing regardless of the value of this option.  However,
5031    /// setting this option true suggests that the protocol author believes that
5032    /// using lazy parsing on this field is worth the additional bookkeeping
5033    /// overhead typically needed to implement it.
5034    ///
5035    /// This option does not affect the public interface of any generated code;
5036    /// all method signatures remain the same.  Furthermore, thread-safety of the
5037    /// interface is not affected by this option; const methods remain safe to
5038    /// call from multiple threads concurrently, while non-const methods continue
5039    /// to require exclusive access.
5040    ///
5041    /// Note that lazy message fields are still eagerly verified to check
5042    /// ill-formed wireformat or missing required fields. Calling IsInitialized()
5043    /// on the outer message would fail if the inner message has missing required
5044    /// fields. Failed verification would result in parsing failure (except when
5045    /// uninitialized messages are acceptable).
5046    ///
5047    /// Field 5: `lazy`
5048    pub lazy: Option<bool>,
5049    /// unverified_lazy does no correctness checks on the byte stream. This should
5050    /// only be used where lazy with verification is prohibitive for performance
5051    /// reasons.
5052    ///
5053    /// Field 15: `unverified_lazy`
5054    pub unverified_lazy: Option<bool>,
5055    /// Is this field deprecated?
5056    /// Depending on the target platform, this can emit Deprecated annotations
5057    /// for accessors, or it will be completely ignored; in the very least, this
5058    /// is a formalization for deprecating fields.
5059    ///
5060    /// Field 3: `deprecated`
5061    pub deprecated: Option<bool>,
5062    /// DEPRECATED. DO NOT USE!
5063    /// For Google-internal migration only. Do not use.
5064    ///
5065    /// Field 10: `weak`
5066    pub weak: Option<bool>,
5067    /// Indicate that the field value should not be printed out when using debug
5068    /// formats, e.g. when the field contains sensitive credentials.
5069    ///
5070    /// Field 16: `debug_redact`
5071    pub debug_redact: Option<bool>,
5072    /// Field 17: `retention`
5073    pub retention: Option<field_options::OptionRetention>,
5074    /// Field 19: `targets`
5075    pub targets: ::buffa::alloc::vec::Vec<field_options::OptionTargetType>,
5076    /// Field 20: `edition_defaults`
5077    pub edition_defaults: ::buffa::alloc::vec::Vec<field_options::EditionDefault>,
5078    /// Any features defined in the specific edition.
5079    /// WARNING: This field should only be used by protobuf plugins or special
5080    /// cases like the proto compiler. Other uses are discouraged and
5081    /// developers should rely on the protoreflect APIs for their client language.
5082    ///
5083    /// Field 21: `features`
5084    pub features: ::buffa::MessageField<FeatureSet>,
5085    /// Field 22: `feature_support`
5086    pub feature_support: ::buffa::MessageField<field_options::FeatureSupport>,
5087    /// The parser stores options it doesn't recognize here. See above.
5088    ///
5089    /// Field 999: `uninterpreted_option`
5090    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
5091    #[doc(hidden)]
5092    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5093    #[doc(hidden)]
5094    pub __buffa_cached_size: ::buffa::__private::CachedSize,
5095}
5096impl ::core::fmt::Debug for FieldOptions {
5097    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5098        f.debug_struct("FieldOptions")
5099            .field("ctype", &self.ctype)
5100            .field("packed", &self.packed)
5101            .field("jstype", &self.jstype)
5102            .field("lazy", &self.lazy)
5103            .field("unverified_lazy", &self.unverified_lazy)
5104            .field("deprecated", &self.deprecated)
5105            .field("weak", &self.weak)
5106            .field("debug_redact", &self.debug_redact)
5107            .field("retention", &self.retention)
5108            .field("targets", &self.targets)
5109            .field("edition_defaults", &self.edition_defaults)
5110            .field("features", &self.features)
5111            .field("feature_support", &self.feature_support)
5112            .field("uninterpreted_option", &self.uninterpreted_option)
5113            .finish()
5114    }
5115}
5116impl FieldOptions {
5117    /// Protobuf type URL for this message, for use with `Any::pack` and
5118    /// `Any::unpack_if`.
5119    ///
5120    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5121    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FieldOptions";
5122}
5123unsafe impl ::buffa::DefaultInstance for FieldOptions {
5124    fn default_instance() -> &'static Self {
5125        static VALUE: ::buffa::__private::OnceBox<FieldOptions> = ::buffa::__private::OnceBox::new();
5126        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5127    }
5128}
5129impl ::buffa::Message for FieldOptions {
5130    /// Returns the total encoded size in bytes.
5131    ///
5132    /// The result is a `u32`; the protobuf specification requires all
5133    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5134    /// compliant message will never overflow this type.
5135    fn compute_size(&self) -> u32 {
5136        #[allow(unused_imports)]
5137        use ::buffa::Enumeration as _;
5138        let mut size = 0u32;
5139        if let Some(ref v) = self.ctype {
5140            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5141        }
5142        if self.packed.is_some() {
5143            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5144        }
5145        if let Some(ref v) = self.jstype {
5146            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5147        }
5148        if self.lazy.is_some() {
5149            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5150        }
5151        if self.unverified_lazy.is_some() {
5152            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5153        }
5154        if self.deprecated.is_some() {
5155            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5156        }
5157        if self.weak.is_some() {
5158            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5159        }
5160        if self.debug_redact.is_some() {
5161            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5162        }
5163        if let Some(ref v) = self.retention {
5164            size += 2u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5165        }
5166        if self.features.is_set() {
5167            let inner_size = self.features.compute_size();
5168            size
5169                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5170                    + inner_size;
5171        }
5172        if self.feature_support.is_set() {
5173            let inner_size = self.feature_support.compute_size();
5174            size
5175                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5176                    + inner_size;
5177        }
5178        for v in &self.targets {
5179            size += 2u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5180        }
5181        for v in &self.edition_defaults {
5182            let inner_size = v.compute_size();
5183            size
5184                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5185                    + inner_size;
5186        }
5187        for v in &self.uninterpreted_option {
5188            let inner_size = v.compute_size();
5189            size
5190                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5191                    + inner_size;
5192        }
5193        size += self.__buffa_unknown_fields.encoded_len() as u32;
5194        self.__buffa_cached_size.set(size);
5195        size
5196    }
5197    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
5198        #[allow(unused_imports)]
5199        use ::buffa::Enumeration as _;
5200        if let Some(ref v) = self.ctype {
5201            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
5202                .encode(buf);
5203            ::buffa::types::encode_int32(v.to_i32(), buf);
5204        }
5205        if let Some(v) = self.packed {
5206            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
5207                .encode(buf);
5208            ::buffa::types::encode_bool(v, buf);
5209        }
5210        if let Some(ref v) = self.jstype {
5211            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
5212                .encode(buf);
5213            ::buffa::types::encode_int32(v.to_i32(), buf);
5214        }
5215        if let Some(v) = self.lazy {
5216            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
5217                .encode(buf);
5218            ::buffa::types::encode_bool(v, buf);
5219        }
5220        if let Some(v) = self.unverified_lazy {
5221            ::buffa::encoding::Tag::new(15u32, ::buffa::encoding::WireType::Varint)
5222                .encode(buf);
5223            ::buffa::types::encode_bool(v, buf);
5224        }
5225        if let Some(v) = self.deprecated {
5226            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
5227                .encode(buf);
5228            ::buffa::types::encode_bool(v, buf);
5229        }
5230        if let Some(v) = self.weak {
5231            ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
5232                .encode(buf);
5233            ::buffa::types::encode_bool(v, buf);
5234        }
5235        if let Some(v) = self.debug_redact {
5236            ::buffa::encoding::Tag::new(16u32, ::buffa::encoding::WireType::Varint)
5237                .encode(buf);
5238            ::buffa::types::encode_bool(v, buf);
5239        }
5240        if let Some(ref v) = self.retention {
5241            ::buffa::encoding::Tag::new(17u32, ::buffa::encoding::WireType::Varint)
5242                .encode(buf);
5243            ::buffa::types::encode_int32(v.to_i32(), buf);
5244        }
5245        if self.features.is_set() {
5246            ::buffa::encoding::Tag::new(
5247                    21u32,
5248                    ::buffa::encoding::WireType::LengthDelimited,
5249                )
5250                .encode(buf);
5251            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
5252            self.features.write_to(buf);
5253        }
5254        if self.feature_support.is_set() {
5255            ::buffa::encoding::Tag::new(
5256                    22u32,
5257                    ::buffa::encoding::WireType::LengthDelimited,
5258                )
5259                .encode(buf);
5260            ::buffa::encoding::encode_varint(
5261                self.feature_support.cached_size() as u64,
5262                buf,
5263            );
5264            self.feature_support.write_to(buf);
5265        }
5266        for v in &self.targets {
5267            ::buffa::encoding::Tag::new(19u32, ::buffa::encoding::WireType::Varint)
5268                .encode(buf);
5269            ::buffa::types::encode_int32(v.to_i32(), buf);
5270        }
5271        for v in &self.edition_defaults {
5272            ::buffa::encoding::Tag::new(
5273                    20u32,
5274                    ::buffa::encoding::WireType::LengthDelimited,
5275                )
5276                .encode(buf);
5277            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
5278            v.write_to(buf);
5279        }
5280        for v in &self.uninterpreted_option {
5281            ::buffa::encoding::Tag::new(
5282                    999u32,
5283                    ::buffa::encoding::WireType::LengthDelimited,
5284                )
5285                .encode(buf);
5286            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
5287            v.write_to(buf);
5288        }
5289        self.__buffa_unknown_fields.write_to(buf);
5290    }
5291    fn merge_field(
5292        &mut self,
5293        tag: ::buffa::encoding::Tag,
5294        buf: &mut impl ::buffa::bytes::Buf,
5295        depth: u32,
5296    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5297        #[allow(unused_imports)]
5298        use ::buffa::bytes::Buf as _;
5299        #[allow(unused_imports)]
5300        use ::buffa::Enumeration as _;
5301        match tag.field_number() {
5302            1u32 => {
5303                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5304                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5305                        field_number: 1u32,
5306                        expected: 0u8,
5307                        actual: tag.wire_type() as u8,
5308                    });
5309                }
5310                let __raw = ::buffa::types::decode_int32(buf)?;
5311                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5312                    __raw,
5313                ) {
5314                    self.ctype = ::core::option::Option::Some(__v);
5315                } else {
5316                    self.__buffa_unknown_fields
5317                        .push(::buffa::UnknownField {
5318                            number: 1u32,
5319                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5320                        });
5321                }
5322            }
5323            2u32 => {
5324                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5325                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5326                        field_number: 2u32,
5327                        expected: 0u8,
5328                        actual: tag.wire_type() as u8,
5329                    });
5330                }
5331                self.packed = ::core::option::Option::Some(
5332                    ::buffa::types::decode_bool(buf)?,
5333                );
5334            }
5335            6u32 => {
5336                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5337                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5338                        field_number: 6u32,
5339                        expected: 0u8,
5340                        actual: tag.wire_type() as u8,
5341                    });
5342                }
5343                let __raw = ::buffa::types::decode_int32(buf)?;
5344                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5345                    __raw,
5346                ) {
5347                    self.jstype = ::core::option::Option::Some(__v);
5348                } else {
5349                    self.__buffa_unknown_fields
5350                        .push(::buffa::UnknownField {
5351                            number: 6u32,
5352                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5353                        });
5354                }
5355            }
5356            5u32 => {
5357                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5358                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5359                        field_number: 5u32,
5360                        expected: 0u8,
5361                        actual: tag.wire_type() as u8,
5362                    });
5363                }
5364                self.lazy = ::core::option::Option::Some(
5365                    ::buffa::types::decode_bool(buf)?,
5366                );
5367            }
5368            15u32 => {
5369                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5370                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5371                        field_number: 15u32,
5372                        expected: 0u8,
5373                        actual: tag.wire_type() as u8,
5374                    });
5375                }
5376                self.unverified_lazy = ::core::option::Option::Some(
5377                    ::buffa::types::decode_bool(buf)?,
5378                );
5379            }
5380            3u32 => {
5381                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5382                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5383                        field_number: 3u32,
5384                        expected: 0u8,
5385                        actual: tag.wire_type() as u8,
5386                    });
5387                }
5388                self.deprecated = ::core::option::Option::Some(
5389                    ::buffa::types::decode_bool(buf)?,
5390                );
5391            }
5392            10u32 => {
5393                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5394                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5395                        field_number: 10u32,
5396                        expected: 0u8,
5397                        actual: tag.wire_type() as u8,
5398                    });
5399                }
5400                self.weak = ::core::option::Option::Some(
5401                    ::buffa::types::decode_bool(buf)?,
5402                );
5403            }
5404            16u32 => {
5405                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5406                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5407                        field_number: 16u32,
5408                        expected: 0u8,
5409                        actual: tag.wire_type() as u8,
5410                    });
5411                }
5412                self.debug_redact = ::core::option::Option::Some(
5413                    ::buffa::types::decode_bool(buf)?,
5414                );
5415            }
5416            17u32 => {
5417                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5418                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5419                        field_number: 17u32,
5420                        expected: 0u8,
5421                        actual: tag.wire_type() as u8,
5422                    });
5423                }
5424                let __raw = ::buffa::types::decode_int32(buf)?;
5425                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5426                    __raw,
5427                ) {
5428                    self.retention = ::core::option::Option::Some(__v);
5429                } else {
5430                    self.__buffa_unknown_fields
5431                        .push(::buffa::UnknownField {
5432                            number: 17u32,
5433                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5434                        });
5435                }
5436            }
5437            21u32 => {
5438                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5439                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5440                        field_number: 21u32,
5441                        expected: 2u8,
5442                        actual: tag.wire_type() as u8,
5443                    });
5444                }
5445                ::buffa::Message::merge_length_delimited(
5446                    self.features.get_or_insert_default(),
5447                    buf,
5448                    depth,
5449                )?;
5450            }
5451            22u32 => {
5452                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5453                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5454                        field_number: 22u32,
5455                        expected: 2u8,
5456                        actual: tag.wire_type() as u8,
5457                    });
5458                }
5459                ::buffa::Message::merge_length_delimited(
5460                    self.feature_support.get_or_insert_default(),
5461                    buf,
5462                    depth,
5463                )?;
5464            }
5465            19u32 => {
5466                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
5467                    let len = ::buffa::encoding::decode_varint(buf)?;
5468                    let len = usize::try_from(len)
5469                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
5470                    if buf.remaining() < len {
5471                        return ::core::result::Result::Err(
5472                            ::buffa::DecodeError::UnexpectedEof,
5473                        );
5474                    }
5475                    self.targets.reserve(len);
5476                    let mut limited = buf.take(len);
5477                    while limited.has_remaining() {
5478                        let __raw = ::buffa::types::decode_int32(&mut limited)?;
5479                        if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5480                            __raw,
5481                        ) {
5482                            self.targets.push(__v);
5483                        } else {
5484                            self.__buffa_unknown_fields
5485                                .push(::buffa::UnknownField {
5486                                    number: 19u32,
5487                                    data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5488                                });
5489                        }
5490                    }
5491                    let leftover = limited.remaining();
5492                    if leftover > 0 {
5493                        limited.advance(leftover);
5494                    }
5495                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
5496                    let __raw = ::buffa::types::decode_int32(buf)?;
5497                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5498                        __raw,
5499                    ) {
5500                        self.targets.push(__v);
5501                    } else {
5502                        self.__buffa_unknown_fields
5503                            .push(::buffa::UnknownField {
5504                                number: 19u32,
5505                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5506                            });
5507                    }
5508                } else {
5509                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5510                        field_number: 19u32,
5511                        expected: 2u8,
5512                        actual: tag.wire_type() as u8,
5513                    });
5514                }
5515            }
5516            20u32 => {
5517                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5518                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5519                        field_number: 20u32,
5520                        expected: 2u8,
5521                        actual: tag.wire_type() as u8,
5522                    });
5523                }
5524                let mut elem = ::core::default::Default::default();
5525                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
5526                self.edition_defaults.push(elem);
5527            }
5528            999u32 => {
5529                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5530                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5531                        field_number: 999u32,
5532                        expected: 2u8,
5533                        actual: tag.wire_type() as u8,
5534                    });
5535                }
5536                let mut elem = ::core::default::Default::default();
5537                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
5538                self.uninterpreted_option.push(elem);
5539            }
5540            _ => {
5541                self.__buffa_unknown_fields
5542                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5543            }
5544        }
5545        ::core::result::Result::Ok(())
5546    }
5547    fn cached_size(&self) -> u32 {
5548        self.__buffa_cached_size.get()
5549    }
5550    fn clear(&mut self) {
5551        self.ctype = ::core::option::Option::None;
5552        self.packed = ::core::option::Option::None;
5553        self.jstype = ::core::option::Option::None;
5554        self.lazy = ::core::option::Option::None;
5555        self.unverified_lazy = ::core::option::Option::None;
5556        self.deprecated = ::core::option::Option::None;
5557        self.weak = ::core::option::Option::None;
5558        self.debug_redact = ::core::option::Option::None;
5559        self.retention = ::core::option::Option::None;
5560        self.features = ::buffa::MessageField::none();
5561        self.feature_support = ::buffa::MessageField::none();
5562        self.targets.clear();
5563        self.edition_defaults.clear();
5564        self.uninterpreted_option.clear();
5565        self.__buffa_unknown_fields.clear();
5566        self.__buffa_cached_size.set(0);
5567    }
5568}
5569impl ::buffa::ExtensionSet for FieldOptions {
5570    const PROTO_FQN: &'static str = "google.protobuf.FieldOptions";
5571    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5572        &self.__buffa_unknown_fields
5573    }
5574    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5575        &mut self.__buffa_unknown_fields
5576    }
5577}
5578pub mod field_options {
5579    #[allow(unused_imports)]
5580    use super::*;
5581    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5582    #[repr(i32)]
5583    pub enum CType {
5584        /// Default mode.
5585        STRING = 0i32,
5586        /// The option \[ctype=CORD\] may be applied to a non-repeated field of type
5587        /// "bytes". It indicates that in C++, the data should be stored in a Cord
5588        /// instead of a string.  For very large strings, this may reduce memory
5589        /// fragmentation. It may also allow better performance when parsing from a
5590        /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then
5591        /// alias the original buffer.
5592        CORD = 1i32,
5593        STRING_PIECE = 2i32,
5594    }
5595    impl ::core::default::Default for CType {
5596        fn default() -> Self {
5597            Self::STRING
5598        }
5599    }
5600    impl ::buffa::Enumeration for CType {
5601        fn from_i32(value: i32) -> ::core::option::Option<Self> {
5602            match value {
5603                0i32 => ::core::option::Option::Some(Self::STRING),
5604                1i32 => ::core::option::Option::Some(Self::CORD),
5605                2i32 => ::core::option::Option::Some(Self::STRING_PIECE),
5606                _ => ::core::option::Option::None,
5607            }
5608        }
5609        fn to_i32(&self) -> i32 {
5610            *self as i32
5611        }
5612        fn proto_name(&self) -> &'static str {
5613            match self {
5614                Self::STRING => "STRING",
5615                Self::CORD => "CORD",
5616                Self::STRING_PIECE => "STRING_PIECE",
5617            }
5618        }
5619        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
5620            match name {
5621                "STRING" => ::core::option::Option::Some(Self::STRING),
5622                "CORD" => ::core::option::Option::Some(Self::CORD),
5623                "STRING_PIECE" => ::core::option::Option::Some(Self::STRING_PIECE),
5624                _ => ::core::option::Option::None,
5625            }
5626        }
5627    }
5628    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5629    #[repr(i32)]
5630    pub enum JSType {
5631        /// Use the default type.
5632        JS_NORMAL = 0i32,
5633        /// Use JavaScript strings.
5634        JS_STRING = 1i32,
5635        /// Use JavaScript numbers.
5636        JS_NUMBER = 2i32,
5637    }
5638    impl ::core::default::Default for JSType {
5639        fn default() -> Self {
5640            Self::JS_NORMAL
5641        }
5642    }
5643    impl ::buffa::Enumeration for JSType {
5644        fn from_i32(value: i32) -> ::core::option::Option<Self> {
5645            match value {
5646                0i32 => ::core::option::Option::Some(Self::JS_NORMAL),
5647                1i32 => ::core::option::Option::Some(Self::JS_STRING),
5648                2i32 => ::core::option::Option::Some(Self::JS_NUMBER),
5649                _ => ::core::option::Option::None,
5650            }
5651        }
5652        fn to_i32(&self) -> i32 {
5653            *self as i32
5654        }
5655        fn proto_name(&self) -> &'static str {
5656            match self {
5657                Self::JS_NORMAL => "JS_NORMAL",
5658                Self::JS_STRING => "JS_STRING",
5659                Self::JS_NUMBER => "JS_NUMBER",
5660            }
5661        }
5662        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
5663            match name {
5664                "JS_NORMAL" => ::core::option::Option::Some(Self::JS_NORMAL),
5665                "JS_STRING" => ::core::option::Option::Some(Self::JS_STRING),
5666                "JS_NUMBER" => ::core::option::Option::Some(Self::JS_NUMBER),
5667                _ => ::core::option::Option::None,
5668            }
5669        }
5670    }
5671    /// If set to RETENTION_SOURCE, the option will be omitted from the binary.
5672    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5673    #[repr(i32)]
5674    pub enum OptionRetention {
5675        RETENTION_UNKNOWN = 0i32,
5676        RETENTION_RUNTIME = 1i32,
5677        RETENTION_SOURCE = 2i32,
5678    }
5679    impl ::core::default::Default for OptionRetention {
5680        fn default() -> Self {
5681            Self::RETENTION_UNKNOWN
5682        }
5683    }
5684    impl ::buffa::Enumeration for OptionRetention {
5685        fn from_i32(value: i32) -> ::core::option::Option<Self> {
5686            match value {
5687                0i32 => ::core::option::Option::Some(Self::RETENTION_UNKNOWN),
5688                1i32 => ::core::option::Option::Some(Self::RETENTION_RUNTIME),
5689                2i32 => ::core::option::Option::Some(Self::RETENTION_SOURCE),
5690                _ => ::core::option::Option::None,
5691            }
5692        }
5693        fn to_i32(&self) -> i32 {
5694            *self as i32
5695        }
5696        fn proto_name(&self) -> &'static str {
5697            match self {
5698                Self::RETENTION_UNKNOWN => "RETENTION_UNKNOWN",
5699                Self::RETENTION_RUNTIME => "RETENTION_RUNTIME",
5700                Self::RETENTION_SOURCE => "RETENTION_SOURCE",
5701            }
5702        }
5703        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
5704            match name {
5705                "RETENTION_UNKNOWN" => {
5706                    ::core::option::Option::Some(Self::RETENTION_UNKNOWN)
5707                }
5708                "RETENTION_RUNTIME" => {
5709                    ::core::option::Option::Some(Self::RETENTION_RUNTIME)
5710                }
5711                "RETENTION_SOURCE" => {
5712                    ::core::option::Option::Some(Self::RETENTION_SOURCE)
5713                }
5714                _ => ::core::option::Option::None,
5715            }
5716        }
5717    }
5718    /// This indicates the types of entities that the field may apply to when used
5719    /// as an option. If it is unset, then the field may be freely used as an
5720    /// option on any kind of entity.
5721    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5722    #[repr(i32)]
5723    pub enum OptionTargetType {
5724        TARGET_TYPE_UNKNOWN = 0i32,
5725        TARGET_TYPE_FILE = 1i32,
5726        TARGET_TYPE_EXTENSION_RANGE = 2i32,
5727        TARGET_TYPE_MESSAGE = 3i32,
5728        TARGET_TYPE_FIELD = 4i32,
5729        TARGET_TYPE_ONEOF = 5i32,
5730        TARGET_TYPE_ENUM = 6i32,
5731        TARGET_TYPE_ENUM_ENTRY = 7i32,
5732        TARGET_TYPE_SERVICE = 8i32,
5733        TARGET_TYPE_METHOD = 9i32,
5734    }
5735    impl ::core::default::Default for OptionTargetType {
5736        fn default() -> Self {
5737            Self::TARGET_TYPE_UNKNOWN
5738        }
5739    }
5740    impl ::buffa::Enumeration for OptionTargetType {
5741        fn from_i32(value: i32) -> ::core::option::Option<Self> {
5742            match value {
5743                0i32 => ::core::option::Option::Some(Self::TARGET_TYPE_UNKNOWN),
5744                1i32 => ::core::option::Option::Some(Self::TARGET_TYPE_FILE),
5745                2i32 => ::core::option::Option::Some(Self::TARGET_TYPE_EXTENSION_RANGE),
5746                3i32 => ::core::option::Option::Some(Self::TARGET_TYPE_MESSAGE),
5747                4i32 => ::core::option::Option::Some(Self::TARGET_TYPE_FIELD),
5748                5i32 => ::core::option::Option::Some(Self::TARGET_TYPE_ONEOF),
5749                6i32 => ::core::option::Option::Some(Self::TARGET_TYPE_ENUM),
5750                7i32 => ::core::option::Option::Some(Self::TARGET_TYPE_ENUM_ENTRY),
5751                8i32 => ::core::option::Option::Some(Self::TARGET_TYPE_SERVICE),
5752                9i32 => ::core::option::Option::Some(Self::TARGET_TYPE_METHOD),
5753                _ => ::core::option::Option::None,
5754            }
5755        }
5756        fn to_i32(&self) -> i32 {
5757            *self as i32
5758        }
5759        fn proto_name(&self) -> &'static str {
5760            match self {
5761                Self::TARGET_TYPE_UNKNOWN => "TARGET_TYPE_UNKNOWN",
5762                Self::TARGET_TYPE_FILE => "TARGET_TYPE_FILE",
5763                Self::TARGET_TYPE_EXTENSION_RANGE => "TARGET_TYPE_EXTENSION_RANGE",
5764                Self::TARGET_TYPE_MESSAGE => "TARGET_TYPE_MESSAGE",
5765                Self::TARGET_TYPE_FIELD => "TARGET_TYPE_FIELD",
5766                Self::TARGET_TYPE_ONEOF => "TARGET_TYPE_ONEOF",
5767                Self::TARGET_TYPE_ENUM => "TARGET_TYPE_ENUM",
5768                Self::TARGET_TYPE_ENUM_ENTRY => "TARGET_TYPE_ENUM_ENTRY",
5769                Self::TARGET_TYPE_SERVICE => "TARGET_TYPE_SERVICE",
5770                Self::TARGET_TYPE_METHOD => "TARGET_TYPE_METHOD",
5771            }
5772        }
5773        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
5774            match name {
5775                "TARGET_TYPE_UNKNOWN" => {
5776                    ::core::option::Option::Some(Self::TARGET_TYPE_UNKNOWN)
5777                }
5778                "TARGET_TYPE_FILE" => {
5779                    ::core::option::Option::Some(Self::TARGET_TYPE_FILE)
5780                }
5781                "TARGET_TYPE_EXTENSION_RANGE" => {
5782                    ::core::option::Option::Some(Self::TARGET_TYPE_EXTENSION_RANGE)
5783                }
5784                "TARGET_TYPE_MESSAGE" => {
5785                    ::core::option::Option::Some(Self::TARGET_TYPE_MESSAGE)
5786                }
5787                "TARGET_TYPE_FIELD" => {
5788                    ::core::option::Option::Some(Self::TARGET_TYPE_FIELD)
5789                }
5790                "TARGET_TYPE_ONEOF" => {
5791                    ::core::option::Option::Some(Self::TARGET_TYPE_ONEOF)
5792                }
5793                "TARGET_TYPE_ENUM" => {
5794                    ::core::option::Option::Some(Self::TARGET_TYPE_ENUM)
5795                }
5796                "TARGET_TYPE_ENUM_ENTRY" => {
5797                    ::core::option::Option::Some(Self::TARGET_TYPE_ENUM_ENTRY)
5798                }
5799                "TARGET_TYPE_SERVICE" => {
5800                    ::core::option::Option::Some(Self::TARGET_TYPE_SERVICE)
5801                }
5802                "TARGET_TYPE_METHOD" => {
5803                    ::core::option::Option::Some(Self::TARGET_TYPE_METHOD)
5804                }
5805                _ => ::core::option::Option::None,
5806            }
5807        }
5808    }
5809    #[derive(Clone, PartialEq, Default)]
5810    pub struct EditionDefault {
5811        /// Field 3: `edition`
5812        pub edition: Option<Edition>,
5813        /// Textproto value.
5814        ///
5815        /// Field 2: `value`
5816        pub value: Option<::buffa::alloc::string::String>,
5817        #[doc(hidden)]
5818        pub __buffa_unknown_fields: ::buffa::UnknownFields,
5819        #[doc(hidden)]
5820        pub __buffa_cached_size: ::buffa::__private::CachedSize,
5821    }
5822    impl ::core::fmt::Debug for EditionDefault {
5823        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5824            f.debug_struct("EditionDefault")
5825                .field("edition", &self.edition)
5826                .field("value", &self.value)
5827                .finish()
5828        }
5829    }
5830    impl EditionDefault {
5831        /// Protobuf type URL for this message, for use with `Any::pack` and
5832        /// `Any::unpack_if`.
5833        ///
5834        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5835        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FieldOptions.EditionDefault";
5836    }
5837    unsafe impl ::buffa::DefaultInstance for EditionDefault {
5838        fn default_instance() -> &'static Self {
5839            static VALUE: ::buffa::__private::OnceBox<EditionDefault> = ::buffa::__private::OnceBox::new();
5840            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5841        }
5842    }
5843    impl ::buffa::Message for EditionDefault {
5844        /// Returns the total encoded size in bytes.
5845        ///
5846        /// The result is a `u32`; the protobuf specification requires all
5847        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5848        /// compliant message will never overflow this type.
5849        fn compute_size(&self) -> u32 {
5850            #[allow(unused_imports)]
5851            use ::buffa::Enumeration as _;
5852            let mut size = 0u32;
5853            if let Some(ref v) = self.edition {
5854                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5855            }
5856            if let Some(ref v) = self.value {
5857                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5858            }
5859            size += self.__buffa_unknown_fields.encoded_len() as u32;
5860            self.__buffa_cached_size.set(size);
5861            size
5862        }
5863        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
5864            #[allow(unused_imports)]
5865            use ::buffa::Enumeration as _;
5866            if let Some(ref v) = self.edition {
5867                ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
5868                    .encode(buf);
5869                ::buffa::types::encode_int32(v.to_i32(), buf);
5870            }
5871            if let Some(ref v) = self.value {
5872                ::buffa::encoding::Tag::new(
5873                        2u32,
5874                        ::buffa::encoding::WireType::LengthDelimited,
5875                    )
5876                    .encode(buf);
5877                ::buffa::types::encode_string(v, buf);
5878            }
5879            self.__buffa_unknown_fields.write_to(buf);
5880        }
5881        fn merge_field(
5882            &mut self,
5883            tag: ::buffa::encoding::Tag,
5884            buf: &mut impl ::buffa::bytes::Buf,
5885            depth: u32,
5886        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5887            #[allow(unused_imports)]
5888            use ::buffa::bytes::Buf as _;
5889            #[allow(unused_imports)]
5890            use ::buffa::Enumeration as _;
5891            match tag.field_number() {
5892                3u32 => {
5893                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5894                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5895                            field_number: 3u32,
5896                            expected: 0u8,
5897                            actual: tag.wire_type() as u8,
5898                        });
5899                    }
5900                    let __raw = ::buffa::types::decode_int32(buf)?;
5901                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5902                        __raw,
5903                    ) {
5904                        self.edition = ::core::option::Option::Some(__v);
5905                    } else {
5906                        self.__buffa_unknown_fields
5907                            .push(::buffa::UnknownField {
5908                                number: 3u32,
5909                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5910                            });
5911                    }
5912                }
5913                2u32 => {
5914                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5915                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5916                            field_number: 2u32,
5917                            expected: 2u8,
5918                            actual: tag.wire_type() as u8,
5919                        });
5920                    }
5921                    ::buffa::types::merge_string(
5922                        self
5923                            .value
5924                            .get_or_insert_with(::buffa::alloc::string::String::new),
5925                        buf,
5926                    )?;
5927                }
5928                _ => {
5929                    self.__buffa_unknown_fields
5930                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5931                }
5932            }
5933            ::core::result::Result::Ok(())
5934        }
5935        fn cached_size(&self) -> u32 {
5936            self.__buffa_cached_size.get()
5937        }
5938        fn clear(&mut self) {
5939            self.edition = ::core::option::Option::None;
5940            self.value = ::core::option::Option::None;
5941            self.__buffa_unknown_fields.clear();
5942            self.__buffa_cached_size.set(0);
5943        }
5944    }
5945    impl ::buffa::ExtensionSet for EditionDefault {
5946        const PROTO_FQN: &'static str = "google.protobuf.FieldOptions.EditionDefault";
5947        fn unknown_fields(&self) -> &::buffa::UnknownFields {
5948            &self.__buffa_unknown_fields
5949        }
5950        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5951            &mut self.__buffa_unknown_fields
5952        }
5953    }
5954    /// Information about the support window of a feature.
5955    #[derive(Clone, PartialEq, Default)]
5956    pub struct FeatureSupport {
5957        /// The edition that this feature was first available in.  In editions
5958        /// earlier than this one, the default assigned to EDITION_LEGACY will be
5959        /// used, and proto files will not be able to override it.
5960        ///
5961        /// Field 1: `edition_introduced`
5962        pub edition_introduced: Option<Edition>,
5963        /// The edition this feature becomes deprecated in.  Using this after this
5964        /// edition may trigger warnings.
5965        ///
5966        /// Field 2: `edition_deprecated`
5967        pub edition_deprecated: Option<Edition>,
5968        /// The deprecation warning text if this feature is used after the edition it
5969        /// was marked deprecated in.
5970        ///
5971        /// Field 3: `deprecation_warning`
5972        pub deprecation_warning: Option<::buffa::alloc::string::String>,
5973        /// The edition this feature is no longer available in.  In editions after
5974        /// this one, the last default assigned will be used, and proto files will
5975        /// not be able to override it.
5976        ///
5977        /// Field 4: `edition_removed`
5978        pub edition_removed: Option<Edition>,
5979        #[doc(hidden)]
5980        pub __buffa_unknown_fields: ::buffa::UnknownFields,
5981        #[doc(hidden)]
5982        pub __buffa_cached_size: ::buffa::__private::CachedSize,
5983    }
5984    impl ::core::fmt::Debug for FeatureSupport {
5985        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5986            f.debug_struct("FeatureSupport")
5987                .field("edition_introduced", &self.edition_introduced)
5988                .field("edition_deprecated", &self.edition_deprecated)
5989                .field("deprecation_warning", &self.deprecation_warning)
5990                .field("edition_removed", &self.edition_removed)
5991                .finish()
5992        }
5993    }
5994    impl FeatureSupport {
5995        /// Protobuf type URL for this message, for use with `Any::pack` and
5996        /// `Any::unpack_if`.
5997        ///
5998        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5999        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FieldOptions.FeatureSupport";
6000    }
6001    unsafe impl ::buffa::DefaultInstance for FeatureSupport {
6002        fn default_instance() -> &'static Self {
6003            static VALUE: ::buffa::__private::OnceBox<FeatureSupport> = ::buffa::__private::OnceBox::new();
6004            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6005        }
6006    }
6007    impl ::buffa::Message for FeatureSupport {
6008        /// Returns the total encoded size in bytes.
6009        ///
6010        /// The result is a `u32`; the protobuf specification requires all
6011        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6012        /// compliant message will never overflow this type.
6013        fn compute_size(&self) -> u32 {
6014            #[allow(unused_imports)]
6015            use ::buffa::Enumeration as _;
6016            let mut size = 0u32;
6017            if let Some(ref v) = self.edition_introduced {
6018                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
6019            }
6020            if let Some(ref v) = self.edition_deprecated {
6021                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
6022            }
6023            if let Some(ref v) = self.deprecation_warning {
6024                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6025            }
6026            if let Some(ref v) = self.edition_removed {
6027                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
6028            }
6029            size += self.__buffa_unknown_fields.encoded_len() as u32;
6030            self.__buffa_cached_size.set(size);
6031            size
6032        }
6033        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
6034            #[allow(unused_imports)]
6035            use ::buffa::Enumeration as _;
6036            if let Some(ref v) = self.edition_introduced {
6037                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
6038                    .encode(buf);
6039                ::buffa::types::encode_int32(v.to_i32(), buf);
6040            }
6041            if let Some(ref v) = self.edition_deprecated {
6042                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
6043                    .encode(buf);
6044                ::buffa::types::encode_int32(v.to_i32(), buf);
6045            }
6046            if let Some(ref v) = self.deprecation_warning {
6047                ::buffa::encoding::Tag::new(
6048                        3u32,
6049                        ::buffa::encoding::WireType::LengthDelimited,
6050                    )
6051                    .encode(buf);
6052                ::buffa::types::encode_string(v, buf);
6053            }
6054            if let Some(ref v) = self.edition_removed {
6055                ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
6056                    .encode(buf);
6057                ::buffa::types::encode_int32(v.to_i32(), buf);
6058            }
6059            self.__buffa_unknown_fields.write_to(buf);
6060        }
6061        fn merge_field(
6062            &mut self,
6063            tag: ::buffa::encoding::Tag,
6064            buf: &mut impl ::buffa::bytes::Buf,
6065            depth: u32,
6066        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6067            #[allow(unused_imports)]
6068            use ::buffa::bytes::Buf as _;
6069            #[allow(unused_imports)]
6070            use ::buffa::Enumeration as _;
6071            match tag.field_number() {
6072                1u32 => {
6073                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6074                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6075                            field_number: 1u32,
6076                            expected: 0u8,
6077                            actual: tag.wire_type() as u8,
6078                        });
6079                    }
6080                    let __raw = ::buffa::types::decode_int32(buf)?;
6081                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
6082                        __raw,
6083                    ) {
6084                        self.edition_introduced = ::core::option::Option::Some(__v);
6085                    } else {
6086                        self.__buffa_unknown_fields
6087                            .push(::buffa::UnknownField {
6088                                number: 1u32,
6089                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
6090                            });
6091                    }
6092                }
6093                2u32 => {
6094                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6095                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6096                            field_number: 2u32,
6097                            expected: 0u8,
6098                            actual: tag.wire_type() as u8,
6099                        });
6100                    }
6101                    let __raw = ::buffa::types::decode_int32(buf)?;
6102                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
6103                        __raw,
6104                    ) {
6105                        self.edition_deprecated = ::core::option::Option::Some(__v);
6106                    } else {
6107                        self.__buffa_unknown_fields
6108                            .push(::buffa::UnknownField {
6109                                number: 2u32,
6110                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
6111                            });
6112                    }
6113                }
6114                3u32 => {
6115                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6116                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6117                            field_number: 3u32,
6118                            expected: 2u8,
6119                            actual: tag.wire_type() as u8,
6120                        });
6121                    }
6122                    ::buffa::types::merge_string(
6123                        self
6124                            .deprecation_warning
6125                            .get_or_insert_with(::buffa::alloc::string::String::new),
6126                        buf,
6127                    )?;
6128                }
6129                4u32 => {
6130                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6131                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6132                            field_number: 4u32,
6133                            expected: 0u8,
6134                            actual: tag.wire_type() as u8,
6135                        });
6136                    }
6137                    let __raw = ::buffa::types::decode_int32(buf)?;
6138                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
6139                        __raw,
6140                    ) {
6141                        self.edition_removed = ::core::option::Option::Some(__v);
6142                    } else {
6143                        self.__buffa_unknown_fields
6144                            .push(::buffa::UnknownField {
6145                                number: 4u32,
6146                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
6147                            });
6148                    }
6149                }
6150                _ => {
6151                    self.__buffa_unknown_fields
6152                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6153                }
6154            }
6155            ::core::result::Result::Ok(())
6156        }
6157        fn cached_size(&self) -> u32 {
6158            self.__buffa_cached_size.get()
6159        }
6160        fn clear(&mut self) {
6161            self.edition_introduced = ::core::option::Option::None;
6162            self.edition_deprecated = ::core::option::Option::None;
6163            self.deprecation_warning = ::core::option::Option::None;
6164            self.edition_removed = ::core::option::Option::None;
6165            self.__buffa_unknown_fields.clear();
6166            self.__buffa_cached_size.set(0);
6167        }
6168    }
6169    impl ::buffa::ExtensionSet for FeatureSupport {
6170        const PROTO_FQN: &'static str = "google.protobuf.FieldOptions.FeatureSupport";
6171        fn unknown_fields(&self) -> &::buffa::UnknownFields {
6172            &self.__buffa_unknown_fields
6173        }
6174        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6175            &mut self.__buffa_unknown_fields
6176        }
6177    }
6178}
6179#[derive(Clone, PartialEq, Default)]
6180pub struct OneofOptions {
6181    /// Any features defined in the specific edition.
6182    /// WARNING: This field should only be used by protobuf plugins or special
6183    /// cases like the proto compiler. Other uses are discouraged and
6184    /// developers should rely on the protoreflect APIs for their client language.
6185    ///
6186    /// Field 1: `features`
6187    pub features: ::buffa::MessageField<FeatureSet>,
6188    /// The parser stores options it doesn't recognize here. See above.
6189    ///
6190    /// Field 999: `uninterpreted_option`
6191    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
6192    #[doc(hidden)]
6193    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6194    #[doc(hidden)]
6195    pub __buffa_cached_size: ::buffa::__private::CachedSize,
6196}
6197impl ::core::fmt::Debug for OneofOptions {
6198    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6199        f.debug_struct("OneofOptions")
6200            .field("features", &self.features)
6201            .field("uninterpreted_option", &self.uninterpreted_option)
6202            .finish()
6203    }
6204}
6205impl OneofOptions {
6206    /// Protobuf type URL for this message, for use with `Any::pack` and
6207    /// `Any::unpack_if`.
6208    ///
6209    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6210    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.OneofOptions";
6211}
6212unsafe impl ::buffa::DefaultInstance for OneofOptions {
6213    fn default_instance() -> &'static Self {
6214        static VALUE: ::buffa::__private::OnceBox<OneofOptions> = ::buffa::__private::OnceBox::new();
6215        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6216    }
6217}
6218impl ::buffa::Message for OneofOptions {
6219    /// Returns the total encoded size in bytes.
6220    ///
6221    /// The result is a `u32`; the protobuf specification requires all
6222    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6223    /// compliant message will never overflow this type.
6224    fn compute_size(&self) -> u32 {
6225        #[allow(unused_imports)]
6226        use ::buffa::Enumeration as _;
6227        let mut size = 0u32;
6228        if self.features.is_set() {
6229            let inner_size = self.features.compute_size();
6230            size
6231                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6232                    + inner_size;
6233        }
6234        for v in &self.uninterpreted_option {
6235            let inner_size = v.compute_size();
6236            size
6237                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6238                    + inner_size;
6239        }
6240        size += self.__buffa_unknown_fields.encoded_len() as u32;
6241        self.__buffa_cached_size.set(size);
6242        size
6243    }
6244    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
6245        #[allow(unused_imports)]
6246        use ::buffa::Enumeration as _;
6247        if self.features.is_set() {
6248            ::buffa::encoding::Tag::new(
6249                    1u32,
6250                    ::buffa::encoding::WireType::LengthDelimited,
6251                )
6252                .encode(buf);
6253            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
6254            self.features.write_to(buf);
6255        }
6256        for v in &self.uninterpreted_option {
6257            ::buffa::encoding::Tag::new(
6258                    999u32,
6259                    ::buffa::encoding::WireType::LengthDelimited,
6260                )
6261                .encode(buf);
6262            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
6263            v.write_to(buf);
6264        }
6265        self.__buffa_unknown_fields.write_to(buf);
6266    }
6267    fn merge_field(
6268        &mut self,
6269        tag: ::buffa::encoding::Tag,
6270        buf: &mut impl ::buffa::bytes::Buf,
6271        depth: u32,
6272    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6273        #[allow(unused_imports)]
6274        use ::buffa::bytes::Buf as _;
6275        #[allow(unused_imports)]
6276        use ::buffa::Enumeration as _;
6277        match tag.field_number() {
6278            1u32 => {
6279                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6280                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6281                        field_number: 1u32,
6282                        expected: 2u8,
6283                        actual: tag.wire_type() as u8,
6284                    });
6285                }
6286                ::buffa::Message::merge_length_delimited(
6287                    self.features.get_or_insert_default(),
6288                    buf,
6289                    depth,
6290                )?;
6291            }
6292            999u32 => {
6293                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6294                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6295                        field_number: 999u32,
6296                        expected: 2u8,
6297                        actual: tag.wire_type() as u8,
6298                    });
6299                }
6300                let mut elem = ::core::default::Default::default();
6301                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6302                self.uninterpreted_option.push(elem);
6303            }
6304            _ => {
6305                self.__buffa_unknown_fields
6306                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6307            }
6308        }
6309        ::core::result::Result::Ok(())
6310    }
6311    fn cached_size(&self) -> u32 {
6312        self.__buffa_cached_size.get()
6313    }
6314    fn clear(&mut self) {
6315        self.features = ::buffa::MessageField::none();
6316        self.uninterpreted_option.clear();
6317        self.__buffa_unknown_fields.clear();
6318        self.__buffa_cached_size.set(0);
6319    }
6320}
6321impl ::buffa::ExtensionSet for OneofOptions {
6322    const PROTO_FQN: &'static str = "google.protobuf.OneofOptions";
6323    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6324        &self.__buffa_unknown_fields
6325    }
6326    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6327        &mut self.__buffa_unknown_fields
6328    }
6329}
6330#[derive(Clone, PartialEq, Default)]
6331pub struct EnumOptions {
6332    /// Set this option to true to allow mapping different tag names to the same
6333    /// value.
6334    ///
6335    /// Field 2: `allow_alias`
6336    pub allow_alias: Option<bool>,
6337    /// Is this enum deprecated?
6338    /// Depending on the target platform, this can emit Deprecated annotations
6339    /// for the enum, or it will be completely ignored; in the very least, this
6340    /// is a formalization for deprecating enums.
6341    ///
6342    /// Field 3: `deprecated`
6343    pub deprecated: Option<bool>,
6344    /// Enable the legacy handling of JSON field name conflicts.  This lowercases
6345    /// and strips underscored from the fields before comparison in proto3 only.
6346    /// The new behavior takes `json_name` into account and applies to proto2 as
6347    /// well.
6348    /// TODO Remove this legacy behavior once downstream teams have
6349    /// had time to migrate.
6350    ///
6351    /// Field 6: `deprecated_legacy_json_field_conflicts`
6352    pub deprecated_legacy_json_field_conflicts: Option<bool>,
6353    /// Any features defined in the specific edition.
6354    /// WARNING: This field should only be used by protobuf plugins or special
6355    /// cases like the proto compiler. Other uses are discouraged and
6356    /// developers should rely on the protoreflect APIs for their client language.
6357    ///
6358    /// Field 7: `features`
6359    pub features: ::buffa::MessageField<FeatureSet>,
6360    /// The parser stores options it doesn't recognize here. See above.
6361    ///
6362    /// Field 999: `uninterpreted_option`
6363    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
6364    #[doc(hidden)]
6365    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6366    #[doc(hidden)]
6367    pub __buffa_cached_size: ::buffa::__private::CachedSize,
6368}
6369impl ::core::fmt::Debug for EnumOptions {
6370    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6371        f.debug_struct("EnumOptions")
6372            .field("allow_alias", &self.allow_alias)
6373            .field("deprecated", &self.deprecated)
6374            .field(
6375                "deprecated_legacy_json_field_conflicts",
6376                &self.deprecated_legacy_json_field_conflicts,
6377            )
6378            .field("features", &self.features)
6379            .field("uninterpreted_option", &self.uninterpreted_option)
6380            .finish()
6381    }
6382}
6383impl EnumOptions {
6384    /// Protobuf type URL for this message, for use with `Any::pack` and
6385    /// `Any::unpack_if`.
6386    ///
6387    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6388    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumOptions";
6389}
6390unsafe impl ::buffa::DefaultInstance for EnumOptions {
6391    fn default_instance() -> &'static Self {
6392        static VALUE: ::buffa::__private::OnceBox<EnumOptions> = ::buffa::__private::OnceBox::new();
6393        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6394    }
6395}
6396impl ::buffa::Message for EnumOptions {
6397    /// Returns the total encoded size in bytes.
6398    ///
6399    /// The result is a `u32`; the protobuf specification requires all
6400    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6401    /// compliant message will never overflow this type.
6402    fn compute_size(&self) -> u32 {
6403        #[allow(unused_imports)]
6404        use ::buffa::Enumeration as _;
6405        let mut size = 0u32;
6406        if self.allow_alias.is_some() {
6407            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6408        }
6409        if self.deprecated.is_some() {
6410            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6411        }
6412        if self.deprecated_legacy_json_field_conflicts.is_some() {
6413            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6414        }
6415        if self.features.is_set() {
6416            let inner_size = self.features.compute_size();
6417            size
6418                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6419                    + inner_size;
6420        }
6421        for v in &self.uninterpreted_option {
6422            let inner_size = v.compute_size();
6423            size
6424                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6425                    + inner_size;
6426        }
6427        size += self.__buffa_unknown_fields.encoded_len() as u32;
6428        self.__buffa_cached_size.set(size);
6429        size
6430    }
6431    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
6432        #[allow(unused_imports)]
6433        use ::buffa::Enumeration as _;
6434        if let Some(v) = self.allow_alias {
6435            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
6436                .encode(buf);
6437            ::buffa::types::encode_bool(v, buf);
6438        }
6439        if let Some(v) = self.deprecated {
6440            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
6441                .encode(buf);
6442            ::buffa::types::encode_bool(v, buf);
6443        }
6444        if let Some(v) = self.deprecated_legacy_json_field_conflicts {
6445            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
6446                .encode(buf);
6447            ::buffa::types::encode_bool(v, buf);
6448        }
6449        if self.features.is_set() {
6450            ::buffa::encoding::Tag::new(
6451                    7u32,
6452                    ::buffa::encoding::WireType::LengthDelimited,
6453                )
6454                .encode(buf);
6455            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
6456            self.features.write_to(buf);
6457        }
6458        for v in &self.uninterpreted_option {
6459            ::buffa::encoding::Tag::new(
6460                    999u32,
6461                    ::buffa::encoding::WireType::LengthDelimited,
6462                )
6463                .encode(buf);
6464            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
6465            v.write_to(buf);
6466        }
6467        self.__buffa_unknown_fields.write_to(buf);
6468    }
6469    fn merge_field(
6470        &mut self,
6471        tag: ::buffa::encoding::Tag,
6472        buf: &mut impl ::buffa::bytes::Buf,
6473        depth: u32,
6474    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6475        #[allow(unused_imports)]
6476        use ::buffa::bytes::Buf as _;
6477        #[allow(unused_imports)]
6478        use ::buffa::Enumeration as _;
6479        match tag.field_number() {
6480            2u32 => {
6481                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6482                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6483                        field_number: 2u32,
6484                        expected: 0u8,
6485                        actual: tag.wire_type() as u8,
6486                    });
6487                }
6488                self.allow_alias = ::core::option::Option::Some(
6489                    ::buffa::types::decode_bool(buf)?,
6490                );
6491            }
6492            3u32 => {
6493                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6494                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6495                        field_number: 3u32,
6496                        expected: 0u8,
6497                        actual: tag.wire_type() as u8,
6498                    });
6499                }
6500                self.deprecated = ::core::option::Option::Some(
6501                    ::buffa::types::decode_bool(buf)?,
6502                );
6503            }
6504            6u32 => {
6505                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6506                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6507                        field_number: 6u32,
6508                        expected: 0u8,
6509                        actual: tag.wire_type() as u8,
6510                    });
6511                }
6512                self.deprecated_legacy_json_field_conflicts = ::core::option::Option::Some(
6513                    ::buffa::types::decode_bool(buf)?,
6514                );
6515            }
6516            7u32 => {
6517                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6518                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6519                        field_number: 7u32,
6520                        expected: 2u8,
6521                        actual: tag.wire_type() as u8,
6522                    });
6523                }
6524                ::buffa::Message::merge_length_delimited(
6525                    self.features.get_or_insert_default(),
6526                    buf,
6527                    depth,
6528                )?;
6529            }
6530            999u32 => {
6531                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6532                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6533                        field_number: 999u32,
6534                        expected: 2u8,
6535                        actual: tag.wire_type() as u8,
6536                    });
6537                }
6538                let mut elem = ::core::default::Default::default();
6539                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6540                self.uninterpreted_option.push(elem);
6541            }
6542            _ => {
6543                self.__buffa_unknown_fields
6544                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6545            }
6546        }
6547        ::core::result::Result::Ok(())
6548    }
6549    fn cached_size(&self) -> u32 {
6550        self.__buffa_cached_size.get()
6551    }
6552    fn clear(&mut self) {
6553        self.allow_alias = ::core::option::Option::None;
6554        self.deprecated = ::core::option::Option::None;
6555        self.deprecated_legacy_json_field_conflicts = ::core::option::Option::None;
6556        self.features = ::buffa::MessageField::none();
6557        self.uninterpreted_option.clear();
6558        self.__buffa_unknown_fields.clear();
6559        self.__buffa_cached_size.set(0);
6560    }
6561}
6562impl ::buffa::ExtensionSet for EnumOptions {
6563    const PROTO_FQN: &'static str = "google.protobuf.EnumOptions";
6564    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6565        &self.__buffa_unknown_fields
6566    }
6567    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6568        &mut self.__buffa_unknown_fields
6569    }
6570}
6571#[derive(Clone, PartialEq, Default)]
6572pub struct EnumValueOptions {
6573    /// Is this enum value deprecated?
6574    /// Depending on the target platform, this can emit Deprecated annotations
6575    /// for the enum value, or it will be completely ignored; in the very least,
6576    /// this is a formalization for deprecating enum values.
6577    ///
6578    /// Field 1: `deprecated`
6579    pub deprecated: Option<bool>,
6580    /// Any features defined in the specific edition.
6581    /// WARNING: This field should only be used by protobuf plugins or special
6582    /// cases like the proto compiler. Other uses are discouraged and
6583    /// developers should rely on the protoreflect APIs for their client language.
6584    ///
6585    /// Field 2: `features`
6586    pub features: ::buffa::MessageField<FeatureSet>,
6587    /// Indicate that fields annotated with this enum value should not be printed
6588    /// out when using debug formats, e.g. when the field contains sensitive
6589    /// credentials.
6590    ///
6591    /// Field 3: `debug_redact`
6592    pub debug_redact: Option<bool>,
6593    /// Information about the support window of a feature value.
6594    ///
6595    /// Field 4: `feature_support`
6596    pub feature_support: ::buffa::MessageField<field_options::FeatureSupport>,
6597    /// The parser stores options it doesn't recognize here. See above.
6598    ///
6599    /// Field 999: `uninterpreted_option`
6600    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
6601    #[doc(hidden)]
6602    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6603    #[doc(hidden)]
6604    pub __buffa_cached_size: ::buffa::__private::CachedSize,
6605}
6606impl ::core::fmt::Debug for EnumValueOptions {
6607    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6608        f.debug_struct("EnumValueOptions")
6609            .field("deprecated", &self.deprecated)
6610            .field("features", &self.features)
6611            .field("debug_redact", &self.debug_redact)
6612            .field("feature_support", &self.feature_support)
6613            .field("uninterpreted_option", &self.uninterpreted_option)
6614            .finish()
6615    }
6616}
6617impl EnumValueOptions {
6618    /// Protobuf type URL for this message, for use with `Any::pack` and
6619    /// `Any::unpack_if`.
6620    ///
6621    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6622    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumValueOptions";
6623}
6624unsafe impl ::buffa::DefaultInstance for EnumValueOptions {
6625    fn default_instance() -> &'static Self {
6626        static VALUE: ::buffa::__private::OnceBox<EnumValueOptions> = ::buffa::__private::OnceBox::new();
6627        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6628    }
6629}
6630impl ::buffa::Message for EnumValueOptions {
6631    /// Returns the total encoded size in bytes.
6632    ///
6633    /// The result is a `u32`; the protobuf specification requires all
6634    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6635    /// compliant message will never overflow this type.
6636    fn compute_size(&self) -> u32 {
6637        #[allow(unused_imports)]
6638        use ::buffa::Enumeration as _;
6639        let mut size = 0u32;
6640        if self.deprecated.is_some() {
6641            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6642        }
6643        if self.features.is_set() {
6644            let inner_size = self.features.compute_size();
6645            size
6646                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6647                    + inner_size;
6648        }
6649        if self.debug_redact.is_some() {
6650            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6651        }
6652        if self.feature_support.is_set() {
6653            let inner_size = self.feature_support.compute_size();
6654            size
6655                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6656                    + inner_size;
6657        }
6658        for v in &self.uninterpreted_option {
6659            let inner_size = v.compute_size();
6660            size
6661                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6662                    + inner_size;
6663        }
6664        size += self.__buffa_unknown_fields.encoded_len() as u32;
6665        self.__buffa_cached_size.set(size);
6666        size
6667    }
6668    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
6669        #[allow(unused_imports)]
6670        use ::buffa::Enumeration as _;
6671        if let Some(v) = self.deprecated {
6672            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
6673                .encode(buf);
6674            ::buffa::types::encode_bool(v, buf);
6675        }
6676        if self.features.is_set() {
6677            ::buffa::encoding::Tag::new(
6678                    2u32,
6679                    ::buffa::encoding::WireType::LengthDelimited,
6680                )
6681                .encode(buf);
6682            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
6683            self.features.write_to(buf);
6684        }
6685        if let Some(v) = self.debug_redact {
6686            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
6687                .encode(buf);
6688            ::buffa::types::encode_bool(v, buf);
6689        }
6690        if self.feature_support.is_set() {
6691            ::buffa::encoding::Tag::new(
6692                    4u32,
6693                    ::buffa::encoding::WireType::LengthDelimited,
6694                )
6695                .encode(buf);
6696            ::buffa::encoding::encode_varint(
6697                self.feature_support.cached_size() as u64,
6698                buf,
6699            );
6700            self.feature_support.write_to(buf);
6701        }
6702        for v in &self.uninterpreted_option {
6703            ::buffa::encoding::Tag::new(
6704                    999u32,
6705                    ::buffa::encoding::WireType::LengthDelimited,
6706                )
6707                .encode(buf);
6708            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
6709            v.write_to(buf);
6710        }
6711        self.__buffa_unknown_fields.write_to(buf);
6712    }
6713    fn merge_field(
6714        &mut self,
6715        tag: ::buffa::encoding::Tag,
6716        buf: &mut impl ::buffa::bytes::Buf,
6717        depth: u32,
6718    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6719        #[allow(unused_imports)]
6720        use ::buffa::bytes::Buf as _;
6721        #[allow(unused_imports)]
6722        use ::buffa::Enumeration as _;
6723        match tag.field_number() {
6724            1u32 => {
6725                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6726                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6727                        field_number: 1u32,
6728                        expected: 0u8,
6729                        actual: tag.wire_type() as u8,
6730                    });
6731                }
6732                self.deprecated = ::core::option::Option::Some(
6733                    ::buffa::types::decode_bool(buf)?,
6734                );
6735            }
6736            2u32 => {
6737                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6738                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6739                        field_number: 2u32,
6740                        expected: 2u8,
6741                        actual: tag.wire_type() as u8,
6742                    });
6743                }
6744                ::buffa::Message::merge_length_delimited(
6745                    self.features.get_or_insert_default(),
6746                    buf,
6747                    depth,
6748                )?;
6749            }
6750            3u32 => {
6751                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6752                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6753                        field_number: 3u32,
6754                        expected: 0u8,
6755                        actual: tag.wire_type() as u8,
6756                    });
6757                }
6758                self.debug_redact = ::core::option::Option::Some(
6759                    ::buffa::types::decode_bool(buf)?,
6760                );
6761            }
6762            4u32 => {
6763                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6764                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6765                        field_number: 4u32,
6766                        expected: 2u8,
6767                        actual: tag.wire_type() as u8,
6768                    });
6769                }
6770                ::buffa::Message::merge_length_delimited(
6771                    self.feature_support.get_or_insert_default(),
6772                    buf,
6773                    depth,
6774                )?;
6775            }
6776            999u32 => {
6777                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6778                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6779                        field_number: 999u32,
6780                        expected: 2u8,
6781                        actual: tag.wire_type() as u8,
6782                    });
6783                }
6784                let mut elem = ::core::default::Default::default();
6785                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6786                self.uninterpreted_option.push(elem);
6787            }
6788            _ => {
6789                self.__buffa_unknown_fields
6790                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6791            }
6792        }
6793        ::core::result::Result::Ok(())
6794    }
6795    fn cached_size(&self) -> u32 {
6796        self.__buffa_cached_size.get()
6797    }
6798    fn clear(&mut self) {
6799        self.deprecated = ::core::option::Option::None;
6800        self.features = ::buffa::MessageField::none();
6801        self.debug_redact = ::core::option::Option::None;
6802        self.feature_support = ::buffa::MessageField::none();
6803        self.uninterpreted_option.clear();
6804        self.__buffa_unknown_fields.clear();
6805        self.__buffa_cached_size.set(0);
6806    }
6807}
6808impl ::buffa::ExtensionSet for EnumValueOptions {
6809    const PROTO_FQN: &'static str = "google.protobuf.EnumValueOptions";
6810    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6811        &self.__buffa_unknown_fields
6812    }
6813    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6814        &mut self.__buffa_unknown_fields
6815    }
6816}
6817#[derive(Clone, PartialEq, Default)]
6818pub struct ServiceOptions {
6819    /// Any features defined in the specific edition.
6820    /// WARNING: This field should only be used by protobuf plugins or special
6821    /// cases like the proto compiler. Other uses are discouraged and
6822    /// developers should rely on the protoreflect APIs for their client language.
6823    ///
6824    /// Field 34: `features`
6825    pub features: ::buffa::MessageField<FeatureSet>,
6826    /// Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
6827    ///   framework.  We apologize for hoarding these numbers to ourselves, but
6828    ///   we were already using them long before we decided to release Protocol
6829    ///   Buffers.
6830    ///
6831    /// Is this service deprecated?
6832    /// Depending on the target platform, this can emit Deprecated annotations
6833    /// for the service, or it will be completely ignored; in the very least,
6834    /// this is a formalization for deprecating services.
6835    ///
6836    /// Field 33: `deprecated`
6837    pub deprecated: Option<bool>,
6838    /// The parser stores options it doesn't recognize here. See above.
6839    ///
6840    /// Field 999: `uninterpreted_option`
6841    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
6842    #[doc(hidden)]
6843    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6844    #[doc(hidden)]
6845    pub __buffa_cached_size: ::buffa::__private::CachedSize,
6846}
6847impl ::core::fmt::Debug for ServiceOptions {
6848    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6849        f.debug_struct("ServiceOptions")
6850            .field("features", &self.features)
6851            .field("deprecated", &self.deprecated)
6852            .field("uninterpreted_option", &self.uninterpreted_option)
6853            .finish()
6854    }
6855}
6856impl ServiceOptions {
6857    /// Protobuf type URL for this message, for use with `Any::pack` and
6858    /// `Any::unpack_if`.
6859    ///
6860    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6861    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.ServiceOptions";
6862}
6863unsafe impl ::buffa::DefaultInstance for ServiceOptions {
6864    fn default_instance() -> &'static Self {
6865        static VALUE: ::buffa::__private::OnceBox<ServiceOptions> = ::buffa::__private::OnceBox::new();
6866        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6867    }
6868}
6869impl ::buffa::Message for ServiceOptions {
6870    /// Returns the total encoded size in bytes.
6871    ///
6872    /// The result is a `u32`; the protobuf specification requires all
6873    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6874    /// compliant message will never overflow this type.
6875    fn compute_size(&self) -> u32 {
6876        #[allow(unused_imports)]
6877        use ::buffa::Enumeration as _;
6878        let mut size = 0u32;
6879        if self.features.is_set() {
6880            let inner_size = self.features.compute_size();
6881            size
6882                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6883                    + inner_size;
6884        }
6885        if self.deprecated.is_some() {
6886            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6887        }
6888        for v in &self.uninterpreted_option {
6889            let inner_size = v.compute_size();
6890            size
6891                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6892                    + inner_size;
6893        }
6894        size += self.__buffa_unknown_fields.encoded_len() as u32;
6895        self.__buffa_cached_size.set(size);
6896        size
6897    }
6898    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
6899        #[allow(unused_imports)]
6900        use ::buffa::Enumeration as _;
6901        if self.features.is_set() {
6902            ::buffa::encoding::Tag::new(
6903                    34u32,
6904                    ::buffa::encoding::WireType::LengthDelimited,
6905                )
6906                .encode(buf);
6907            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
6908            self.features.write_to(buf);
6909        }
6910        if let Some(v) = self.deprecated {
6911            ::buffa::encoding::Tag::new(33u32, ::buffa::encoding::WireType::Varint)
6912                .encode(buf);
6913            ::buffa::types::encode_bool(v, buf);
6914        }
6915        for v in &self.uninterpreted_option {
6916            ::buffa::encoding::Tag::new(
6917                    999u32,
6918                    ::buffa::encoding::WireType::LengthDelimited,
6919                )
6920                .encode(buf);
6921            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
6922            v.write_to(buf);
6923        }
6924        self.__buffa_unknown_fields.write_to(buf);
6925    }
6926    fn merge_field(
6927        &mut self,
6928        tag: ::buffa::encoding::Tag,
6929        buf: &mut impl ::buffa::bytes::Buf,
6930        depth: u32,
6931    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6932        #[allow(unused_imports)]
6933        use ::buffa::bytes::Buf as _;
6934        #[allow(unused_imports)]
6935        use ::buffa::Enumeration as _;
6936        match tag.field_number() {
6937            34u32 => {
6938                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6939                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6940                        field_number: 34u32,
6941                        expected: 2u8,
6942                        actual: tag.wire_type() as u8,
6943                    });
6944                }
6945                ::buffa::Message::merge_length_delimited(
6946                    self.features.get_or_insert_default(),
6947                    buf,
6948                    depth,
6949                )?;
6950            }
6951            33u32 => {
6952                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6953                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6954                        field_number: 33u32,
6955                        expected: 0u8,
6956                        actual: tag.wire_type() as u8,
6957                    });
6958                }
6959                self.deprecated = ::core::option::Option::Some(
6960                    ::buffa::types::decode_bool(buf)?,
6961                );
6962            }
6963            999u32 => {
6964                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6965                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6966                        field_number: 999u32,
6967                        expected: 2u8,
6968                        actual: tag.wire_type() as u8,
6969                    });
6970                }
6971                let mut elem = ::core::default::Default::default();
6972                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6973                self.uninterpreted_option.push(elem);
6974            }
6975            _ => {
6976                self.__buffa_unknown_fields
6977                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6978            }
6979        }
6980        ::core::result::Result::Ok(())
6981    }
6982    fn cached_size(&self) -> u32 {
6983        self.__buffa_cached_size.get()
6984    }
6985    fn clear(&mut self) {
6986        self.features = ::buffa::MessageField::none();
6987        self.deprecated = ::core::option::Option::None;
6988        self.uninterpreted_option.clear();
6989        self.__buffa_unknown_fields.clear();
6990        self.__buffa_cached_size.set(0);
6991    }
6992}
6993impl ::buffa::ExtensionSet for ServiceOptions {
6994    const PROTO_FQN: &'static str = "google.protobuf.ServiceOptions";
6995    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6996        &self.__buffa_unknown_fields
6997    }
6998    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6999        &mut self.__buffa_unknown_fields
7000    }
7001}
7002#[derive(Clone, PartialEq, Default)]
7003pub struct MethodOptions {
7004    /// Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
7005    ///   framework.  We apologize for hoarding these numbers to ourselves, but
7006    ///   we were already using them long before we decided to release Protocol
7007    ///   Buffers.
7008    ///
7009    /// Is this method deprecated?
7010    /// Depending on the target platform, this can emit Deprecated annotations
7011    /// for the method, or it will be completely ignored; in the very least,
7012    /// this is a formalization for deprecating methods.
7013    ///
7014    /// Field 33: `deprecated`
7015    pub deprecated: Option<bool>,
7016    /// Field 34: `idempotency_level`
7017    pub idempotency_level: Option<method_options::IdempotencyLevel>,
7018    /// Any features defined in the specific edition.
7019    /// WARNING: This field should only be used by protobuf plugins or special
7020    /// cases like the proto compiler. Other uses are discouraged and
7021    /// developers should rely on the protoreflect APIs for their client language.
7022    ///
7023    /// Field 35: `features`
7024    pub features: ::buffa::MessageField<FeatureSet>,
7025    /// The parser stores options it doesn't recognize here. See above.
7026    ///
7027    /// Field 999: `uninterpreted_option`
7028    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
7029    #[doc(hidden)]
7030    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7031    #[doc(hidden)]
7032    pub __buffa_cached_size: ::buffa::__private::CachedSize,
7033}
7034impl ::core::fmt::Debug for MethodOptions {
7035    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7036        f.debug_struct("MethodOptions")
7037            .field("deprecated", &self.deprecated)
7038            .field("idempotency_level", &self.idempotency_level)
7039            .field("features", &self.features)
7040            .field("uninterpreted_option", &self.uninterpreted_option)
7041            .finish()
7042    }
7043}
7044impl MethodOptions {
7045    /// Protobuf type URL for this message, for use with `Any::pack` and
7046    /// `Any::unpack_if`.
7047    ///
7048    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7049    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.MethodOptions";
7050}
7051unsafe impl ::buffa::DefaultInstance for MethodOptions {
7052    fn default_instance() -> &'static Self {
7053        static VALUE: ::buffa::__private::OnceBox<MethodOptions> = ::buffa::__private::OnceBox::new();
7054        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7055    }
7056}
7057impl ::buffa::Message for MethodOptions {
7058    /// Returns the total encoded size in bytes.
7059    ///
7060    /// The result is a `u32`; the protobuf specification requires all
7061    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7062    /// compliant message will never overflow this type.
7063    fn compute_size(&self) -> u32 {
7064        #[allow(unused_imports)]
7065        use ::buffa::Enumeration as _;
7066        let mut size = 0u32;
7067        if self.deprecated.is_some() {
7068            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7069        }
7070        if let Some(ref v) = self.idempotency_level {
7071            size += 2u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7072        }
7073        if self.features.is_set() {
7074            let inner_size = self.features.compute_size();
7075            size
7076                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7077                    + inner_size;
7078        }
7079        for v in &self.uninterpreted_option {
7080            let inner_size = v.compute_size();
7081            size
7082                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7083                    + inner_size;
7084        }
7085        size += self.__buffa_unknown_fields.encoded_len() as u32;
7086        self.__buffa_cached_size.set(size);
7087        size
7088    }
7089    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
7090        #[allow(unused_imports)]
7091        use ::buffa::Enumeration as _;
7092        if let Some(v) = self.deprecated {
7093            ::buffa::encoding::Tag::new(33u32, ::buffa::encoding::WireType::Varint)
7094                .encode(buf);
7095            ::buffa::types::encode_bool(v, buf);
7096        }
7097        if let Some(ref v) = self.idempotency_level {
7098            ::buffa::encoding::Tag::new(34u32, ::buffa::encoding::WireType::Varint)
7099                .encode(buf);
7100            ::buffa::types::encode_int32(v.to_i32(), buf);
7101        }
7102        if self.features.is_set() {
7103            ::buffa::encoding::Tag::new(
7104                    35u32,
7105                    ::buffa::encoding::WireType::LengthDelimited,
7106                )
7107                .encode(buf);
7108            ::buffa::encoding::encode_varint(self.features.cached_size() as u64, buf);
7109            self.features.write_to(buf);
7110        }
7111        for v in &self.uninterpreted_option {
7112            ::buffa::encoding::Tag::new(
7113                    999u32,
7114                    ::buffa::encoding::WireType::LengthDelimited,
7115                )
7116                .encode(buf);
7117            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
7118            v.write_to(buf);
7119        }
7120        self.__buffa_unknown_fields.write_to(buf);
7121    }
7122    fn merge_field(
7123        &mut self,
7124        tag: ::buffa::encoding::Tag,
7125        buf: &mut impl ::buffa::bytes::Buf,
7126        depth: u32,
7127    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7128        #[allow(unused_imports)]
7129        use ::buffa::bytes::Buf as _;
7130        #[allow(unused_imports)]
7131        use ::buffa::Enumeration as _;
7132        match tag.field_number() {
7133            33u32 => {
7134                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7135                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7136                        field_number: 33u32,
7137                        expected: 0u8,
7138                        actual: tag.wire_type() as u8,
7139                    });
7140                }
7141                self.deprecated = ::core::option::Option::Some(
7142                    ::buffa::types::decode_bool(buf)?,
7143                );
7144            }
7145            34u32 => {
7146                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7147                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7148                        field_number: 34u32,
7149                        expected: 0u8,
7150                        actual: tag.wire_type() as u8,
7151                    });
7152                }
7153                let __raw = ::buffa::types::decode_int32(buf)?;
7154                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7155                    __raw,
7156                ) {
7157                    self.idempotency_level = ::core::option::Option::Some(__v);
7158                } else {
7159                    self.__buffa_unknown_fields
7160                        .push(::buffa::UnknownField {
7161                            number: 34u32,
7162                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7163                        });
7164                }
7165            }
7166            35u32 => {
7167                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7168                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7169                        field_number: 35u32,
7170                        expected: 2u8,
7171                        actual: tag.wire_type() as u8,
7172                    });
7173                }
7174                ::buffa::Message::merge_length_delimited(
7175                    self.features.get_or_insert_default(),
7176                    buf,
7177                    depth,
7178                )?;
7179            }
7180            999u32 => {
7181                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7182                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7183                        field_number: 999u32,
7184                        expected: 2u8,
7185                        actual: tag.wire_type() as u8,
7186                    });
7187                }
7188                let mut elem = ::core::default::Default::default();
7189                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
7190                self.uninterpreted_option.push(elem);
7191            }
7192            _ => {
7193                self.__buffa_unknown_fields
7194                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7195            }
7196        }
7197        ::core::result::Result::Ok(())
7198    }
7199    fn cached_size(&self) -> u32 {
7200        self.__buffa_cached_size.get()
7201    }
7202    fn clear(&mut self) {
7203        self.deprecated = ::core::option::Option::None;
7204        self.idempotency_level = ::core::option::Option::None;
7205        self.features = ::buffa::MessageField::none();
7206        self.uninterpreted_option.clear();
7207        self.__buffa_unknown_fields.clear();
7208        self.__buffa_cached_size.set(0);
7209    }
7210}
7211impl ::buffa::ExtensionSet for MethodOptions {
7212    const PROTO_FQN: &'static str = "google.protobuf.MethodOptions";
7213    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7214        &self.__buffa_unknown_fields
7215    }
7216    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7217        &mut self.__buffa_unknown_fields
7218    }
7219}
7220pub mod method_options {
7221    #[allow(unused_imports)]
7222    use super::*;
7223    /// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
7224    /// or neither? HTTP based RPC implementation may choose GET verb for safe
7225    /// methods, and PUT verb for idempotent methods instead of the default POST.
7226    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
7227    #[repr(i32)]
7228    pub enum IdempotencyLevel {
7229        IDEMPOTENCY_UNKNOWN = 0i32,
7230        /// implies idempotent
7231        NO_SIDE_EFFECTS = 1i32,
7232        /// idempotent, but may have side effects
7233        IDEMPOTENT = 2i32,
7234    }
7235    impl ::core::default::Default for IdempotencyLevel {
7236        fn default() -> Self {
7237            Self::IDEMPOTENCY_UNKNOWN
7238        }
7239    }
7240    impl ::buffa::Enumeration for IdempotencyLevel {
7241        fn from_i32(value: i32) -> ::core::option::Option<Self> {
7242            match value {
7243                0i32 => ::core::option::Option::Some(Self::IDEMPOTENCY_UNKNOWN),
7244                1i32 => ::core::option::Option::Some(Self::NO_SIDE_EFFECTS),
7245                2i32 => ::core::option::Option::Some(Self::IDEMPOTENT),
7246                _ => ::core::option::Option::None,
7247            }
7248        }
7249        fn to_i32(&self) -> i32 {
7250            *self as i32
7251        }
7252        fn proto_name(&self) -> &'static str {
7253            match self {
7254                Self::IDEMPOTENCY_UNKNOWN => "IDEMPOTENCY_UNKNOWN",
7255                Self::NO_SIDE_EFFECTS => "NO_SIDE_EFFECTS",
7256                Self::IDEMPOTENT => "IDEMPOTENT",
7257            }
7258        }
7259        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
7260            match name {
7261                "IDEMPOTENCY_UNKNOWN" => {
7262                    ::core::option::Option::Some(Self::IDEMPOTENCY_UNKNOWN)
7263                }
7264                "NO_SIDE_EFFECTS" => ::core::option::Option::Some(Self::NO_SIDE_EFFECTS),
7265                "IDEMPOTENT" => ::core::option::Option::Some(Self::IDEMPOTENT),
7266                _ => ::core::option::Option::None,
7267            }
7268        }
7269    }
7270}
7271/// A message representing a option the parser does not recognize. This only
7272/// appears in options protos created by the compiler::Parser class.
7273/// DescriptorPool resolves these when building Descriptor objects. Therefore,
7274/// options protos in descriptor objects (e.g. returned by Descriptor::options(),
7275/// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
7276/// in them.
7277#[derive(Clone, PartialEq, Default)]
7278pub struct UninterpretedOption {
7279    /// Field 2: `name`
7280    pub name: ::buffa::alloc::vec::Vec<uninterpreted_option::NamePart>,
7281    /// The value of the uninterpreted option, in whatever type the tokenizer
7282    /// identified it as during parsing. Exactly one of these should be set.
7283    ///
7284    /// Field 3: `identifier_value`
7285    pub identifier_value: Option<::buffa::alloc::string::String>,
7286    /// Field 4: `positive_int_value`
7287    pub positive_int_value: Option<u64>,
7288    /// Field 5: `negative_int_value`
7289    pub negative_int_value: Option<i64>,
7290    /// Field 6: `double_value`
7291    pub double_value: Option<f64>,
7292    /// Field 7: `string_value`
7293    pub string_value: Option<::buffa::alloc::vec::Vec<u8>>,
7294    /// Field 8: `aggregate_value`
7295    pub aggregate_value: Option<::buffa::alloc::string::String>,
7296    #[doc(hidden)]
7297    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7298    #[doc(hidden)]
7299    pub __buffa_cached_size: ::buffa::__private::CachedSize,
7300}
7301impl ::core::fmt::Debug for UninterpretedOption {
7302    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7303        f.debug_struct("UninterpretedOption")
7304            .field("name", &self.name)
7305            .field("identifier_value", &self.identifier_value)
7306            .field("positive_int_value", &self.positive_int_value)
7307            .field("negative_int_value", &self.negative_int_value)
7308            .field("double_value", &self.double_value)
7309            .field("string_value", &self.string_value)
7310            .field("aggregate_value", &self.aggregate_value)
7311            .finish()
7312    }
7313}
7314impl UninterpretedOption {
7315    /// Protobuf type URL for this message, for use with `Any::pack` and
7316    /// `Any::unpack_if`.
7317    ///
7318    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7319    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UninterpretedOption";
7320}
7321unsafe impl ::buffa::DefaultInstance for UninterpretedOption {
7322    fn default_instance() -> &'static Self {
7323        static VALUE: ::buffa::__private::OnceBox<UninterpretedOption> = ::buffa::__private::OnceBox::new();
7324        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7325    }
7326}
7327impl ::buffa::Message for UninterpretedOption {
7328    /// Returns the total encoded size in bytes.
7329    ///
7330    /// The result is a `u32`; the protobuf specification requires all
7331    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7332    /// compliant message will never overflow this type.
7333    fn compute_size(&self) -> u32 {
7334        #[allow(unused_imports)]
7335        use ::buffa::Enumeration as _;
7336        let mut size = 0u32;
7337        if let Some(ref v) = self.identifier_value {
7338            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7339        }
7340        if let Some(v) = self.positive_int_value {
7341            size += 1u32 + ::buffa::types::uint64_encoded_len(v) as u32;
7342        }
7343        if let Some(v) = self.negative_int_value {
7344            size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
7345        }
7346        if self.double_value.is_some() {
7347            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
7348        }
7349        if let Some(ref v) = self.string_value {
7350            size += 1u32 + ::buffa::types::bytes_encoded_len(v) as u32;
7351        }
7352        if let Some(ref v) = self.aggregate_value {
7353            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7354        }
7355        for v in &self.name {
7356            let inner_size = v.compute_size();
7357            size
7358                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7359                    + inner_size;
7360        }
7361        size += self.__buffa_unknown_fields.encoded_len() as u32;
7362        self.__buffa_cached_size.set(size);
7363        size
7364    }
7365    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
7366        #[allow(unused_imports)]
7367        use ::buffa::Enumeration as _;
7368        if let Some(ref v) = self.identifier_value {
7369            ::buffa::encoding::Tag::new(
7370                    3u32,
7371                    ::buffa::encoding::WireType::LengthDelimited,
7372                )
7373                .encode(buf);
7374            ::buffa::types::encode_string(v, buf);
7375        }
7376        if let Some(v) = self.positive_int_value {
7377            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
7378                .encode(buf);
7379            ::buffa::types::encode_uint64(v, buf);
7380        }
7381        if let Some(v) = self.negative_int_value {
7382            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
7383                .encode(buf);
7384            ::buffa::types::encode_int64(v, buf);
7385        }
7386        if let Some(v) = self.double_value {
7387            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Fixed64)
7388                .encode(buf);
7389            ::buffa::types::encode_double(v, buf);
7390        }
7391        if let Some(ref v) = self.string_value {
7392            ::buffa::encoding::Tag::new(
7393                    7u32,
7394                    ::buffa::encoding::WireType::LengthDelimited,
7395                )
7396                .encode(buf);
7397            ::buffa::types::encode_bytes(v, buf);
7398        }
7399        if let Some(ref v) = self.aggregate_value {
7400            ::buffa::encoding::Tag::new(
7401                    8u32,
7402                    ::buffa::encoding::WireType::LengthDelimited,
7403                )
7404                .encode(buf);
7405            ::buffa::types::encode_string(v, buf);
7406        }
7407        for v in &self.name {
7408            ::buffa::encoding::Tag::new(
7409                    2u32,
7410                    ::buffa::encoding::WireType::LengthDelimited,
7411                )
7412                .encode(buf);
7413            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
7414            v.write_to(buf);
7415        }
7416        self.__buffa_unknown_fields.write_to(buf);
7417    }
7418    fn merge_field(
7419        &mut self,
7420        tag: ::buffa::encoding::Tag,
7421        buf: &mut impl ::buffa::bytes::Buf,
7422        depth: u32,
7423    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7424        #[allow(unused_imports)]
7425        use ::buffa::bytes::Buf as _;
7426        #[allow(unused_imports)]
7427        use ::buffa::Enumeration as _;
7428        match tag.field_number() {
7429            3u32 => {
7430                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7431                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7432                        field_number: 3u32,
7433                        expected: 2u8,
7434                        actual: tag.wire_type() as u8,
7435                    });
7436                }
7437                ::buffa::types::merge_string(
7438                    self
7439                        .identifier_value
7440                        .get_or_insert_with(::buffa::alloc::string::String::new),
7441                    buf,
7442                )?;
7443            }
7444            4u32 => {
7445                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7446                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7447                        field_number: 4u32,
7448                        expected: 0u8,
7449                        actual: tag.wire_type() as u8,
7450                    });
7451                }
7452                self.positive_int_value = ::core::option::Option::Some(
7453                    ::buffa::types::decode_uint64(buf)?,
7454                );
7455            }
7456            5u32 => {
7457                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7458                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7459                        field_number: 5u32,
7460                        expected: 0u8,
7461                        actual: tag.wire_type() as u8,
7462                    });
7463                }
7464                self.negative_int_value = ::core::option::Option::Some(
7465                    ::buffa::types::decode_int64(buf)?,
7466                );
7467            }
7468            6u32 => {
7469                if tag.wire_type() != ::buffa::encoding::WireType::Fixed64 {
7470                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7471                        field_number: 6u32,
7472                        expected: 1u8,
7473                        actual: tag.wire_type() as u8,
7474                    });
7475                }
7476                self.double_value = ::core::option::Option::Some(
7477                    ::buffa::types::decode_double(buf)?,
7478                );
7479            }
7480            7u32 => {
7481                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7482                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7483                        field_number: 7u32,
7484                        expected: 2u8,
7485                        actual: tag.wire_type() as u8,
7486                    });
7487                }
7488                ::buffa::types::merge_bytes(
7489                    self.string_value.get_or_insert_with(::buffa::alloc::vec::Vec::new),
7490                    buf,
7491                )?;
7492            }
7493            8u32 => {
7494                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7495                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7496                        field_number: 8u32,
7497                        expected: 2u8,
7498                        actual: tag.wire_type() as u8,
7499                    });
7500                }
7501                ::buffa::types::merge_string(
7502                    self
7503                        .aggregate_value
7504                        .get_or_insert_with(::buffa::alloc::string::String::new),
7505                    buf,
7506                )?;
7507            }
7508            2u32 => {
7509                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7510                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7511                        field_number: 2u32,
7512                        expected: 2u8,
7513                        actual: tag.wire_type() as u8,
7514                    });
7515                }
7516                let mut elem = ::core::default::Default::default();
7517                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
7518                self.name.push(elem);
7519            }
7520            _ => {
7521                self.__buffa_unknown_fields
7522                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7523            }
7524        }
7525        ::core::result::Result::Ok(())
7526    }
7527    fn cached_size(&self) -> u32 {
7528        self.__buffa_cached_size.get()
7529    }
7530    fn clear(&mut self) {
7531        self.identifier_value = ::core::option::Option::None;
7532        self.positive_int_value = ::core::option::Option::None;
7533        self.negative_int_value = ::core::option::Option::None;
7534        self.double_value = ::core::option::Option::None;
7535        self.string_value = ::core::option::Option::None;
7536        self.aggregate_value = ::core::option::Option::None;
7537        self.name.clear();
7538        self.__buffa_unknown_fields.clear();
7539        self.__buffa_cached_size.set(0);
7540    }
7541}
7542impl ::buffa::ExtensionSet for UninterpretedOption {
7543    const PROTO_FQN: &'static str = "google.protobuf.UninterpretedOption";
7544    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7545        &self.__buffa_unknown_fields
7546    }
7547    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7548        &mut self.__buffa_unknown_fields
7549    }
7550}
7551pub mod uninterpreted_option {
7552    #[allow(unused_imports)]
7553    use super::*;
7554    /// The name of the uninterpreted option.  Each string represents a segment in
7555    /// a dot-separated name.  is_extension is true iff a segment represents an
7556    /// extension (denoted with parentheses in options specs in .proto files).
7557    /// E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents
7558    /// "foo.(bar.baz).moo".
7559    #[derive(Clone, PartialEq, Default)]
7560    pub struct NamePart {
7561        /// Field 1: `name_part`
7562        pub name_part: ::buffa::alloc::string::String,
7563        /// Field 2: `is_extension`
7564        pub is_extension: bool,
7565        #[doc(hidden)]
7566        pub __buffa_unknown_fields: ::buffa::UnknownFields,
7567        #[doc(hidden)]
7568        pub __buffa_cached_size: ::buffa::__private::CachedSize,
7569    }
7570    impl ::core::fmt::Debug for NamePart {
7571        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7572            f.debug_struct("NamePart")
7573                .field("name_part", &self.name_part)
7574                .field("is_extension", &self.is_extension)
7575                .finish()
7576        }
7577    }
7578    impl NamePart {
7579        /// Protobuf type URL for this message, for use with `Any::pack` and
7580        /// `Any::unpack_if`.
7581        ///
7582        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7583        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UninterpretedOption.NamePart";
7584    }
7585    unsafe impl ::buffa::DefaultInstance for NamePart {
7586        fn default_instance() -> &'static Self {
7587            static VALUE: ::buffa::__private::OnceBox<NamePart> = ::buffa::__private::OnceBox::new();
7588            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7589        }
7590    }
7591    impl ::buffa::Message for NamePart {
7592        /// Returns the total encoded size in bytes.
7593        ///
7594        /// The result is a `u32`; the protobuf specification requires all
7595        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7596        /// compliant message will never overflow this type.
7597        fn compute_size(&self) -> u32 {
7598            #[allow(unused_imports)]
7599            use ::buffa::Enumeration as _;
7600            let mut size = 0u32;
7601            size += 1u32 + ::buffa::types::string_encoded_len(&self.name_part) as u32;
7602            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7603            size += self.__buffa_unknown_fields.encoded_len() as u32;
7604            self.__buffa_cached_size.set(size);
7605            size
7606        }
7607        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
7608            #[allow(unused_imports)]
7609            use ::buffa::Enumeration as _;
7610            ::buffa::encoding::Tag::new(
7611                    1u32,
7612                    ::buffa::encoding::WireType::LengthDelimited,
7613                )
7614                .encode(buf);
7615            ::buffa::types::encode_string(&self.name_part, buf);
7616            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
7617                .encode(buf);
7618            ::buffa::types::encode_bool(self.is_extension, buf);
7619            self.__buffa_unknown_fields.write_to(buf);
7620        }
7621        fn merge_field(
7622            &mut self,
7623            tag: ::buffa::encoding::Tag,
7624            buf: &mut impl ::buffa::bytes::Buf,
7625            depth: u32,
7626        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7627            #[allow(unused_imports)]
7628            use ::buffa::bytes::Buf as _;
7629            #[allow(unused_imports)]
7630            use ::buffa::Enumeration as _;
7631            match tag.field_number() {
7632                1u32 => {
7633                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7634                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7635                            field_number: 1u32,
7636                            expected: 2u8,
7637                            actual: tag.wire_type() as u8,
7638                        });
7639                    }
7640                    ::buffa::types::merge_string(&mut self.name_part, buf)?;
7641                }
7642                2u32 => {
7643                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7644                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7645                            field_number: 2u32,
7646                            expected: 0u8,
7647                            actual: tag.wire_type() as u8,
7648                        });
7649                    }
7650                    self.is_extension = ::buffa::types::decode_bool(buf)?;
7651                }
7652                _ => {
7653                    self.__buffa_unknown_fields
7654                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7655                }
7656            }
7657            ::core::result::Result::Ok(())
7658        }
7659        fn cached_size(&self) -> u32 {
7660            self.__buffa_cached_size.get()
7661        }
7662        fn clear(&mut self) {
7663            self.name_part.clear();
7664            self.is_extension = false;
7665            self.__buffa_unknown_fields.clear();
7666            self.__buffa_cached_size.set(0);
7667        }
7668    }
7669    impl ::buffa::ExtensionSet for NamePart {
7670        const PROTO_FQN: &'static str = "google.protobuf.UninterpretedOption.NamePart";
7671        fn unknown_fields(&self) -> &::buffa::UnknownFields {
7672            &self.__buffa_unknown_fields
7673        }
7674        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7675            &mut self.__buffa_unknown_fields
7676        }
7677    }
7678}
7679/// ===================================================================
7680/// Features
7681///
7682/// TODO Enums in C++ gencode (and potentially other languages) are
7683/// not well scoped.  This means that each of the feature enums below can clash
7684/// with each other.  The short names we've chosen maximize call-site
7685/// readability, but leave us very open to this scenario.  A future feature will
7686/// be designed and implemented to handle this, hopefully before we ever hit a
7687/// conflict here.
7688#[derive(Clone, PartialEq, Default)]
7689pub struct FeatureSet {
7690    /// Field 1: `field_presence`
7691    pub field_presence: Option<feature_set::FieldPresence>,
7692    /// Field 2: `enum_type`
7693    pub enum_type: Option<feature_set::EnumType>,
7694    /// Field 3: `repeated_field_encoding`
7695    pub repeated_field_encoding: Option<feature_set::RepeatedFieldEncoding>,
7696    /// Field 4: `utf8_validation`
7697    pub utf8_validation: Option<feature_set::Utf8Validation>,
7698    /// Field 5: `message_encoding`
7699    pub message_encoding: Option<feature_set::MessageEncoding>,
7700    /// Field 6: `json_format`
7701    pub json_format: Option<feature_set::JsonFormat>,
7702    /// Field 7: `enforce_naming_style`
7703    pub enforce_naming_style: Option<feature_set::EnforceNamingStyle>,
7704    /// Field 8: `default_symbol_visibility`
7705    pub default_symbol_visibility: Option<
7706        feature_set::visibility_feature::DefaultSymbolVisibility,
7707    >,
7708    #[doc(hidden)]
7709    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7710    #[doc(hidden)]
7711    pub __buffa_cached_size: ::buffa::__private::CachedSize,
7712}
7713impl ::core::fmt::Debug for FeatureSet {
7714    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7715        f.debug_struct("FeatureSet")
7716            .field("field_presence", &self.field_presence)
7717            .field("enum_type", &self.enum_type)
7718            .field("repeated_field_encoding", &self.repeated_field_encoding)
7719            .field("utf8_validation", &self.utf8_validation)
7720            .field("message_encoding", &self.message_encoding)
7721            .field("json_format", &self.json_format)
7722            .field("enforce_naming_style", &self.enforce_naming_style)
7723            .field("default_symbol_visibility", &self.default_symbol_visibility)
7724            .finish()
7725    }
7726}
7727impl FeatureSet {
7728    /// Protobuf type URL for this message, for use with `Any::pack` and
7729    /// `Any::unpack_if`.
7730    ///
7731    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7732    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FeatureSet";
7733}
7734unsafe impl ::buffa::DefaultInstance for FeatureSet {
7735    fn default_instance() -> &'static Self {
7736        static VALUE: ::buffa::__private::OnceBox<FeatureSet> = ::buffa::__private::OnceBox::new();
7737        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7738    }
7739}
7740impl ::buffa::Message for FeatureSet {
7741    /// Returns the total encoded size in bytes.
7742    ///
7743    /// The result is a `u32`; the protobuf specification requires all
7744    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7745    /// compliant message will never overflow this type.
7746    fn compute_size(&self) -> u32 {
7747        #[allow(unused_imports)]
7748        use ::buffa::Enumeration as _;
7749        let mut size = 0u32;
7750        if let Some(ref v) = self.field_presence {
7751            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7752        }
7753        if let Some(ref v) = self.enum_type {
7754            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7755        }
7756        if let Some(ref v) = self.repeated_field_encoding {
7757            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7758        }
7759        if let Some(ref v) = self.utf8_validation {
7760            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7761        }
7762        if let Some(ref v) = self.message_encoding {
7763            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7764        }
7765        if let Some(ref v) = self.json_format {
7766            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7767        }
7768        if let Some(ref v) = self.enforce_naming_style {
7769            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7770        }
7771        if let Some(ref v) = self.default_symbol_visibility {
7772            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7773        }
7774        size += self.__buffa_unknown_fields.encoded_len() as u32;
7775        self.__buffa_cached_size.set(size);
7776        size
7777    }
7778    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
7779        #[allow(unused_imports)]
7780        use ::buffa::Enumeration as _;
7781        if let Some(ref v) = self.field_presence {
7782            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
7783                .encode(buf);
7784            ::buffa::types::encode_int32(v.to_i32(), buf);
7785        }
7786        if let Some(ref v) = self.enum_type {
7787            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
7788                .encode(buf);
7789            ::buffa::types::encode_int32(v.to_i32(), buf);
7790        }
7791        if let Some(ref v) = self.repeated_field_encoding {
7792            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
7793                .encode(buf);
7794            ::buffa::types::encode_int32(v.to_i32(), buf);
7795        }
7796        if let Some(ref v) = self.utf8_validation {
7797            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
7798                .encode(buf);
7799            ::buffa::types::encode_int32(v.to_i32(), buf);
7800        }
7801        if let Some(ref v) = self.message_encoding {
7802            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
7803                .encode(buf);
7804            ::buffa::types::encode_int32(v.to_i32(), buf);
7805        }
7806        if let Some(ref v) = self.json_format {
7807            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
7808                .encode(buf);
7809            ::buffa::types::encode_int32(v.to_i32(), buf);
7810        }
7811        if let Some(ref v) = self.enforce_naming_style {
7812            ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
7813                .encode(buf);
7814            ::buffa::types::encode_int32(v.to_i32(), buf);
7815        }
7816        if let Some(ref v) = self.default_symbol_visibility {
7817            ::buffa::encoding::Tag::new(8u32, ::buffa::encoding::WireType::Varint)
7818                .encode(buf);
7819            ::buffa::types::encode_int32(v.to_i32(), buf);
7820        }
7821        self.__buffa_unknown_fields.write_to(buf);
7822    }
7823    fn merge_field(
7824        &mut self,
7825        tag: ::buffa::encoding::Tag,
7826        buf: &mut impl ::buffa::bytes::Buf,
7827        depth: u32,
7828    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7829        #[allow(unused_imports)]
7830        use ::buffa::bytes::Buf as _;
7831        #[allow(unused_imports)]
7832        use ::buffa::Enumeration as _;
7833        match tag.field_number() {
7834            1u32 => {
7835                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7836                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7837                        field_number: 1u32,
7838                        expected: 0u8,
7839                        actual: tag.wire_type() as u8,
7840                    });
7841                }
7842                let __raw = ::buffa::types::decode_int32(buf)?;
7843                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7844                    __raw,
7845                ) {
7846                    self.field_presence = ::core::option::Option::Some(__v);
7847                } else {
7848                    self.__buffa_unknown_fields
7849                        .push(::buffa::UnknownField {
7850                            number: 1u32,
7851                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7852                        });
7853                }
7854            }
7855            2u32 => {
7856                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7857                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7858                        field_number: 2u32,
7859                        expected: 0u8,
7860                        actual: tag.wire_type() as u8,
7861                    });
7862                }
7863                let __raw = ::buffa::types::decode_int32(buf)?;
7864                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7865                    __raw,
7866                ) {
7867                    self.enum_type = ::core::option::Option::Some(__v);
7868                } else {
7869                    self.__buffa_unknown_fields
7870                        .push(::buffa::UnknownField {
7871                            number: 2u32,
7872                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7873                        });
7874                }
7875            }
7876            3u32 => {
7877                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7878                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7879                        field_number: 3u32,
7880                        expected: 0u8,
7881                        actual: tag.wire_type() as u8,
7882                    });
7883                }
7884                let __raw = ::buffa::types::decode_int32(buf)?;
7885                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7886                    __raw,
7887                ) {
7888                    self.repeated_field_encoding = ::core::option::Option::Some(__v);
7889                } else {
7890                    self.__buffa_unknown_fields
7891                        .push(::buffa::UnknownField {
7892                            number: 3u32,
7893                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7894                        });
7895                }
7896            }
7897            4u32 => {
7898                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7899                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7900                        field_number: 4u32,
7901                        expected: 0u8,
7902                        actual: tag.wire_type() as u8,
7903                    });
7904                }
7905                let __raw = ::buffa::types::decode_int32(buf)?;
7906                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7907                    __raw,
7908                ) {
7909                    self.utf8_validation = ::core::option::Option::Some(__v);
7910                } else {
7911                    self.__buffa_unknown_fields
7912                        .push(::buffa::UnknownField {
7913                            number: 4u32,
7914                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7915                        });
7916                }
7917            }
7918            5u32 => {
7919                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7920                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7921                        field_number: 5u32,
7922                        expected: 0u8,
7923                        actual: tag.wire_type() as u8,
7924                    });
7925                }
7926                let __raw = ::buffa::types::decode_int32(buf)?;
7927                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7928                    __raw,
7929                ) {
7930                    self.message_encoding = ::core::option::Option::Some(__v);
7931                } else {
7932                    self.__buffa_unknown_fields
7933                        .push(::buffa::UnknownField {
7934                            number: 5u32,
7935                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7936                        });
7937                }
7938            }
7939            6u32 => {
7940                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7941                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7942                        field_number: 6u32,
7943                        expected: 0u8,
7944                        actual: tag.wire_type() as u8,
7945                    });
7946                }
7947                let __raw = ::buffa::types::decode_int32(buf)?;
7948                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7949                    __raw,
7950                ) {
7951                    self.json_format = ::core::option::Option::Some(__v);
7952                } else {
7953                    self.__buffa_unknown_fields
7954                        .push(::buffa::UnknownField {
7955                            number: 6u32,
7956                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7957                        });
7958                }
7959            }
7960            7u32 => {
7961                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7962                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7963                        field_number: 7u32,
7964                        expected: 0u8,
7965                        actual: tag.wire_type() as u8,
7966                    });
7967                }
7968                let __raw = ::buffa::types::decode_int32(buf)?;
7969                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7970                    __raw,
7971                ) {
7972                    self.enforce_naming_style = ::core::option::Option::Some(__v);
7973                } else {
7974                    self.__buffa_unknown_fields
7975                        .push(::buffa::UnknownField {
7976                            number: 7u32,
7977                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7978                        });
7979                }
7980            }
7981            8u32 => {
7982                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7983                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7984                        field_number: 8u32,
7985                        expected: 0u8,
7986                        actual: tag.wire_type() as u8,
7987                    });
7988                }
7989                let __raw = ::buffa::types::decode_int32(buf)?;
7990                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7991                    __raw,
7992                ) {
7993                    self.default_symbol_visibility = ::core::option::Option::Some(__v);
7994                } else {
7995                    self.__buffa_unknown_fields
7996                        .push(::buffa::UnknownField {
7997                            number: 8u32,
7998                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7999                        });
8000                }
8001            }
8002            _ => {
8003                self.__buffa_unknown_fields
8004                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8005            }
8006        }
8007        ::core::result::Result::Ok(())
8008    }
8009    fn cached_size(&self) -> u32 {
8010        self.__buffa_cached_size.get()
8011    }
8012    fn clear(&mut self) {
8013        self.field_presence = ::core::option::Option::None;
8014        self.enum_type = ::core::option::Option::None;
8015        self.repeated_field_encoding = ::core::option::Option::None;
8016        self.utf8_validation = ::core::option::Option::None;
8017        self.message_encoding = ::core::option::Option::None;
8018        self.json_format = ::core::option::Option::None;
8019        self.enforce_naming_style = ::core::option::Option::None;
8020        self.default_symbol_visibility = ::core::option::Option::None;
8021        self.__buffa_unknown_fields.clear();
8022        self.__buffa_cached_size.set(0);
8023    }
8024}
8025impl ::buffa::ExtensionSet for FeatureSet {
8026    const PROTO_FQN: &'static str = "google.protobuf.FeatureSet";
8027    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8028        &self.__buffa_unknown_fields
8029    }
8030    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8031        &mut self.__buffa_unknown_fields
8032    }
8033}
8034pub mod feature_set {
8035    #[allow(unused_imports)]
8036    use super::*;
8037    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8038    #[repr(i32)]
8039    pub enum FieldPresence {
8040        FIELD_PRESENCE_UNKNOWN = 0i32,
8041        EXPLICIT = 1i32,
8042        IMPLICIT = 2i32,
8043        LEGACY_REQUIRED = 3i32,
8044    }
8045    impl ::core::default::Default for FieldPresence {
8046        fn default() -> Self {
8047            Self::FIELD_PRESENCE_UNKNOWN
8048        }
8049    }
8050    impl ::buffa::Enumeration for FieldPresence {
8051        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8052            match value {
8053                0i32 => ::core::option::Option::Some(Self::FIELD_PRESENCE_UNKNOWN),
8054                1i32 => ::core::option::Option::Some(Self::EXPLICIT),
8055                2i32 => ::core::option::Option::Some(Self::IMPLICIT),
8056                3i32 => ::core::option::Option::Some(Self::LEGACY_REQUIRED),
8057                _ => ::core::option::Option::None,
8058            }
8059        }
8060        fn to_i32(&self) -> i32 {
8061            *self as i32
8062        }
8063        fn proto_name(&self) -> &'static str {
8064            match self {
8065                Self::FIELD_PRESENCE_UNKNOWN => "FIELD_PRESENCE_UNKNOWN",
8066                Self::EXPLICIT => "EXPLICIT",
8067                Self::IMPLICIT => "IMPLICIT",
8068                Self::LEGACY_REQUIRED => "LEGACY_REQUIRED",
8069            }
8070        }
8071        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8072            match name {
8073                "FIELD_PRESENCE_UNKNOWN" => {
8074                    ::core::option::Option::Some(Self::FIELD_PRESENCE_UNKNOWN)
8075                }
8076                "EXPLICIT" => ::core::option::Option::Some(Self::EXPLICIT),
8077                "IMPLICIT" => ::core::option::Option::Some(Self::IMPLICIT),
8078                "LEGACY_REQUIRED" => ::core::option::Option::Some(Self::LEGACY_REQUIRED),
8079                _ => ::core::option::Option::None,
8080            }
8081        }
8082    }
8083    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8084    #[repr(i32)]
8085    pub enum EnumType {
8086        ENUM_TYPE_UNKNOWN = 0i32,
8087        OPEN = 1i32,
8088        CLOSED = 2i32,
8089    }
8090    impl ::core::default::Default for EnumType {
8091        fn default() -> Self {
8092            Self::ENUM_TYPE_UNKNOWN
8093        }
8094    }
8095    impl ::buffa::Enumeration for EnumType {
8096        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8097            match value {
8098                0i32 => ::core::option::Option::Some(Self::ENUM_TYPE_UNKNOWN),
8099                1i32 => ::core::option::Option::Some(Self::OPEN),
8100                2i32 => ::core::option::Option::Some(Self::CLOSED),
8101                _ => ::core::option::Option::None,
8102            }
8103        }
8104        fn to_i32(&self) -> i32 {
8105            *self as i32
8106        }
8107        fn proto_name(&self) -> &'static str {
8108            match self {
8109                Self::ENUM_TYPE_UNKNOWN => "ENUM_TYPE_UNKNOWN",
8110                Self::OPEN => "OPEN",
8111                Self::CLOSED => "CLOSED",
8112            }
8113        }
8114        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8115            match name {
8116                "ENUM_TYPE_UNKNOWN" => {
8117                    ::core::option::Option::Some(Self::ENUM_TYPE_UNKNOWN)
8118                }
8119                "OPEN" => ::core::option::Option::Some(Self::OPEN),
8120                "CLOSED" => ::core::option::Option::Some(Self::CLOSED),
8121                _ => ::core::option::Option::None,
8122            }
8123        }
8124    }
8125    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8126    #[repr(i32)]
8127    pub enum RepeatedFieldEncoding {
8128        REPEATED_FIELD_ENCODING_UNKNOWN = 0i32,
8129        PACKED = 1i32,
8130        EXPANDED = 2i32,
8131    }
8132    impl ::core::default::Default for RepeatedFieldEncoding {
8133        fn default() -> Self {
8134            Self::REPEATED_FIELD_ENCODING_UNKNOWN
8135        }
8136    }
8137    impl ::buffa::Enumeration for RepeatedFieldEncoding {
8138        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8139            match value {
8140                0i32 => {
8141                    ::core::option::Option::Some(Self::REPEATED_FIELD_ENCODING_UNKNOWN)
8142                }
8143                1i32 => ::core::option::Option::Some(Self::PACKED),
8144                2i32 => ::core::option::Option::Some(Self::EXPANDED),
8145                _ => ::core::option::Option::None,
8146            }
8147        }
8148        fn to_i32(&self) -> i32 {
8149            *self as i32
8150        }
8151        fn proto_name(&self) -> &'static str {
8152            match self {
8153                Self::REPEATED_FIELD_ENCODING_UNKNOWN => {
8154                    "REPEATED_FIELD_ENCODING_UNKNOWN"
8155                }
8156                Self::PACKED => "PACKED",
8157                Self::EXPANDED => "EXPANDED",
8158            }
8159        }
8160        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8161            match name {
8162                "REPEATED_FIELD_ENCODING_UNKNOWN" => {
8163                    ::core::option::Option::Some(Self::REPEATED_FIELD_ENCODING_UNKNOWN)
8164                }
8165                "PACKED" => ::core::option::Option::Some(Self::PACKED),
8166                "EXPANDED" => ::core::option::Option::Some(Self::EXPANDED),
8167                _ => ::core::option::Option::None,
8168            }
8169        }
8170    }
8171    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8172    #[repr(i32)]
8173    pub enum Utf8Validation {
8174        UTF8_VALIDATION_UNKNOWN = 0i32,
8175        VERIFY = 2i32,
8176        NONE = 3i32,
8177    }
8178    impl ::core::default::Default for Utf8Validation {
8179        fn default() -> Self {
8180            Self::UTF8_VALIDATION_UNKNOWN
8181        }
8182    }
8183    impl ::buffa::Enumeration for Utf8Validation {
8184        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8185            match value {
8186                0i32 => ::core::option::Option::Some(Self::UTF8_VALIDATION_UNKNOWN),
8187                2i32 => ::core::option::Option::Some(Self::VERIFY),
8188                3i32 => ::core::option::Option::Some(Self::NONE),
8189                _ => ::core::option::Option::None,
8190            }
8191        }
8192        fn to_i32(&self) -> i32 {
8193            *self as i32
8194        }
8195        fn proto_name(&self) -> &'static str {
8196            match self {
8197                Self::UTF8_VALIDATION_UNKNOWN => "UTF8_VALIDATION_UNKNOWN",
8198                Self::VERIFY => "VERIFY",
8199                Self::NONE => "NONE",
8200            }
8201        }
8202        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8203            match name {
8204                "UTF8_VALIDATION_UNKNOWN" => {
8205                    ::core::option::Option::Some(Self::UTF8_VALIDATION_UNKNOWN)
8206                }
8207                "VERIFY" => ::core::option::Option::Some(Self::VERIFY),
8208                "NONE" => ::core::option::Option::Some(Self::NONE),
8209                _ => ::core::option::Option::None,
8210            }
8211        }
8212    }
8213    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8214    #[repr(i32)]
8215    pub enum MessageEncoding {
8216        MESSAGE_ENCODING_UNKNOWN = 0i32,
8217        LENGTH_PREFIXED = 1i32,
8218        DELIMITED = 2i32,
8219    }
8220    impl ::core::default::Default for MessageEncoding {
8221        fn default() -> Self {
8222            Self::MESSAGE_ENCODING_UNKNOWN
8223        }
8224    }
8225    impl ::buffa::Enumeration for MessageEncoding {
8226        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8227            match value {
8228                0i32 => ::core::option::Option::Some(Self::MESSAGE_ENCODING_UNKNOWN),
8229                1i32 => ::core::option::Option::Some(Self::LENGTH_PREFIXED),
8230                2i32 => ::core::option::Option::Some(Self::DELIMITED),
8231                _ => ::core::option::Option::None,
8232            }
8233        }
8234        fn to_i32(&self) -> i32 {
8235            *self as i32
8236        }
8237        fn proto_name(&self) -> &'static str {
8238            match self {
8239                Self::MESSAGE_ENCODING_UNKNOWN => "MESSAGE_ENCODING_UNKNOWN",
8240                Self::LENGTH_PREFIXED => "LENGTH_PREFIXED",
8241                Self::DELIMITED => "DELIMITED",
8242            }
8243        }
8244        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8245            match name {
8246                "MESSAGE_ENCODING_UNKNOWN" => {
8247                    ::core::option::Option::Some(Self::MESSAGE_ENCODING_UNKNOWN)
8248                }
8249                "LENGTH_PREFIXED" => ::core::option::Option::Some(Self::LENGTH_PREFIXED),
8250                "DELIMITED" => ::core::option::Option::Some(Self::DELIMITED),
8251                _ => ::core::option::Option::None,
8252            }
8253        }
8254    }
8255    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8256    #[repr(i32)]
8257    pub enum JsonFormat {
8258        JSON_FORMAT_UNKNOWN = 0i32,
8259        ALLOW = 1i32,
8260        LEGACY_BEST_EFFORT = 2i32,
8261    }
8262    impl ::core::default::Default for JsonFormat {
8263        fn default() -> Self {
8264            Self::JSON_FORMAT_UNKNOWN
8265        }
8266    }
8267    impl ::buffa::Enumeration for JsonFormat {
8268        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8269            match value {
8270                0i32 => ::core::option::Option::Some(Self::JSON_FORMAT_UNKNOWN),
8271                1i32 => ::core::option::Option::Some(Self::ALLOW),
8272                2i32 => ::core::option::Option::Some(Self::LEGACY_BEST_EFFORT),
8273                _ => ::core::option::Option::None,
8274            }
8275        }
8276        fn to_i32(&self) -> i32 {
8277            *self as i32
8278        }
8279        fn proto_name(&self) -> &'static str {
8280            match self {
8281                Self::JSON_FORMAT_UNKNOWN => "JSON_FORMAT_UNKNOWN",
8282                Self::ALLOW => "ALLOW",
8283                Self::LEGACY_BEST_EFFORT => "LEGACY_BEST_EFFORT",
8284            }
8285        }
8286        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8287            match name {
8288                "JSON_FORMAT_UNKNOWN" => {
8289                    ::core::option::Option::Some(Self::JSON_FORMAT_UNKNOWN)
8290                }
8291                "ALLOW" => ::core::option::Option::Some(Self::ALLOW),
8292                "LEGACY_BEST_EFFORT" => {
8293                    ::core::option::Option::Some(Self::LEGACY_BEST_EFFORT)
8294                }
8295                _ => ::core::option::Option::None,
8296            }
8297        }
8298    }
8299    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8300    #[repr(i32)]
8301    pub enum EnforceNamingStyle {
8302        ENFORCE_NAMING_STYLE_UNKNOWN = 0i32,
8303        STYLE2024 = 1i32,
8304        STYLE_LEGACY = 2i32,
8305    }
8306    impl ::core::default::Default for EnforceNamingStyle {
8307        fn default() -> Self {
8308            Self::ENFORCE_NAMING_STYLE_UNKNOWN
8309        }
8310    }
8311    impl ::buffa::Enumeration for EnforceNamingStyle {
8312        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8313            match value {
8314                0i32 => ::core::option::Option::Some(Self::ENFORCE_NAMING_STYLE_UNKNOWN),
8315                1i32 => ::core::option::Option::Some(Self::STYLE2024),
8316                2i32 => ::core::option::Option::Some(Self::STYLE_LEGACY),
8317                _ => ::core::option::Option::None,
8318            }
8319        }
8320        fn to_i32(&self) -> i32 {
8321            *self as i32
8322        }
8323        fn proto_name(&self) -> &'static str {
8324            match self {
8325                Self::ENFORCE_NAMING_STYLE_UNKNOWN => "ENFORCE_NAMING_STYLE_UNKNOWN",
8326                Self::STYLE2024 => "STYLE2024",
8327                Self::STYLE_LEGACY => "STYLE_LEGACY",
8328            }
8329        }
8330        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8331            match name {
8332                "ENFORCE_NAMING_STYLE_UNKNOWN" => {
8333                    ::core::option::Option::Some(Self::ENFORCE_NAMING_STYLE_UNKNOWN)
8334                }
8335                "STYLE2024" => ::core::option::Option::Some(Self::STYLE2024),
8336                "STYLE_LEGACY" => ::core::option::Option::Some(Self::STYLE_LEGACY),
8337                _ => ::core::option::Option::None,
8338            }
8339        }
8340    }
8341    #[derive(Clone, PartialEq, Default)]
8342    pub struct VisibilityFeature {
8343        #[doc(hidden)]
8344        pub __buffa_unknown_fields: ::buffa::UnknownFields,
8345        #[doc(hidden)]
8346        pub __buffa_cached_size: ::buffa::__private::CachedSize,
8347    }
8348    impl ::core::fmt::Debug for VisibilityFeature {
8349        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8350            f.debug_struct("VisibilityFeature").finish()
8351        }
8352    }
8353    impl VisibilityFeature {
8354        /// Protobuf type URL for this message, for use with `Any::pack` and
8355        /// `Any::unpack_if`.
8356        ///
8357        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8358        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FeatureSet.VisibilityFeature";
8359    }
8360    unsafe impl ::buffa::DefaultInstance for VisibilityFeature {
8361        fn default_instance() -> &'static Self {
8362            static VALUE: ::buffa::__private::OnceBox<VisibilityFeature> = ::buffa::__private::OnceBox::new();
8363            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8364        }
8365    }
8366    impl ::buffa::Message for VisibilityFeature {
8367        /// Returns the total encoded size in bytes.
8368        ///
8369        /// The result is a `u32`; the protobuf specification requires all
8370        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8371        /// compliant message will never overflow this type.
8372        fn compute_size(&self) -> u32 {
8373            #[allow(unused_imports)]
8374            use ::buffa::Enumeration as _;
8375            let mut size = 0u32;
8376            size += self.__buffa_unknown_fields.encoded_len() as u32;
8377            self.__buffa_cached_size.set(size);
8378            size
8379        }
8380        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
8381            #[allow(unused_imports)]
8382            use ::buffa::Enumeration as _;
8383            self.__buffa_unknown_fields.write_to(buf);
8384        }
8385        fn merge_field(
8386            &mut self,
8387            tag: ::buffa::encoding::Tag,
8388            buf: &mut impl ::buffa::bytes::Buf,
8389            depth: u32,
8390        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8391            #[allow(unused_imports)]
8392            use ::buffa::bytes::Buf as _;
8393            #[allow(unused_imports)]
8394            use ::buffa::Enumeration as _;
8395            match tag.field_number() {
8396                _ => {
8397                    self.__buffa_unknown_fields
8398                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8399                }
8400            }
8401            ::core::result::Result::Ok(())
8402        }
8403        fn cached_size(&self) -> u32 {
8404            self.__buffa_cached_size.get()
8405        }
8406        fn clear(&mut self) {
8407            self.__buffa_unknown_fields.clear();
8408            self.__buffa_cached_size.set(0);
8409        }
8410    }
8411    impl ::buffa::ExtensionSet for VisibilityFeature {
8412        const PROTO_FQN: &'static str = "google.protobuf.FeatureSet.VisibilityFeature";
8413        fn unknown_fields(&self) -> &::buffa::UnknownFields {
8414            &self.__buffa_unknown_fields
8415        }
8416        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8417            &mut self.__buffa_unknown_fields
8418        }
8419    }
8420    pub mod visibility_feature {
8421        #[allow(unused_imports)]
8422        use super::*;
8423        #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8424        #[repr(i32)]
8425        pub enum DefaultSymbolVisibility {
8426            DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0i32,
8427            /// Default pre-EDITION_2024, all UNSET visibility are export.
8428            EXPORT_ALL = 1i32,
8429            /// All top-level symbols default to export, nested default to local.
8430            EXPORT_TOP_LEVEL = 2i32,
8431            /// All symbols default to local.
8432            LOCAL_ALL = 3i32,
8433            /// All symbols local by default. Nested types cannot be exported.
8434            /// With special case caveat for message { enum {} reserved 1 to max; }
8435            /// This is the recommended setting for new protos.
8436            STRICT = 4i32,
8437        }
8438        impl ::core::default::Default for DefaultSymbolVisibility {
8439            fn default() -> Self {
8440                Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN
8441            }
8442        }
8443        impl ::buffa::Enumeration for DefaultSymbolVisibility {
8444            fn from_i32(value: i32) -> ::core::option::Option<Self> {
8445                match value {
8446                    0i32 => {
8447                        ::core::option::Option::Some(
8448                            Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN,
8449                        )
8450                    }
8451                    1i32 => ::core::option::Option::Some(Self::EXPORT_ALL),
8452                    2i32 => ::core::option::Option::Some(Self::EXPORT_TOP_LEVEL),
8453                    3i32 => ::core::option::Option::Some(Self::LOCAL_ALL),
8454                    4i32 => ::core::option::Option::Some(Self::STRICT),
8455                    _ => ::core::option::Option::None,
8456                }
8457            }
8458            fn to_i32(&self) -> i32 {
8459                *self as i32
8460            }
8461            fn proto_name(&self) -> &'static str {
8462                match self {
8463                    Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN => {
8464                        "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"
8465                    }
8466                    Self::EXPORT_ALL => "EXPORT_ALL",
8467                    Self::EXPORT_TOP_LEVEL => "EXPORT_TOP_LEVEL",
8468                    Self::LOCAL_ALL => "LOCAL_ALL",
8469                    Self::STRICT => "STRICT",
8470                }
8471            }
8472            fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8473                match name {
8474                    "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" => {
8475                        ::core::option::Option::Some(
8476                            Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN,
8477                        )
8478                    }
8479                    "EXPORT_ALL" => ::core::option::Option::Some(Self::EXPORT_ALL),
8480                    "EXPORT_TOP_LEVEL" => {
8481                        ::core::option::Option::Some(Self::EXPORT_TOP_LEVEL)
8482                    }
8483                    "LOCAL_ALL" => ::core::option::Option::Some(Self::LOCAL_ALL),
8484                    "STRICT" => ::core::option::Option::Some(Self::STRICT),
8485                    _ => ::core::option::Option::None,
8486                }
8487            }
8488        }
8489    }
8490}
8491/// A compiled specification for the defaults of a set of features.  These
8492/// messages are generated from FeatureSet extensions and can be used to seed
8493/// feature resolution. The resolution with this object becomes a simple search
8494/// for the closest matching edition, followed by proto merges.
8495#[derive(Clone, PartialEq, Default)]
8496pub struct FeatureSetDefaults {
8497    /// Field 1: `defaults`
8498    pub defaults: ::buffa::alloc::vec::Vec<
8499        feature_set_defaults::FeatureSetEditionDefault,
8500    >,
8501    /// The minimum supported edition (inclusive) when this was constructed.
8502    /// Editions before this will not have defaults.
8503    ///
8504    /// Field 4: `minimum_edition`
8505    pub minimum_edition: Option<Edition>,
8506    /// The maximum known edition (inclusive) when this was constructed. Editions
8507    /// after this will not have reliable defaults.
8508    ///
8509    /// Field 5: `maximum_edition`
8510    pub maximum_edition: Option<Edition>,
8511    #[doc(hidden)]
8512    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8513    #[doc(hidden)]
8514    pub __buffa_cached_size: ::buffa::__private::CachedSize,
8515}
8516impl ::core::fmt::Debug for FeatureSetDefaults {
8517    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8518        f.debug_struct("FeatureSetDefaults")
8519            .field("defaults", &self.defaults)
8520            .field("minimum_edition", &self.minimum_edition)
8521            .field("maximum_edition", &self.maximum_edition)
8522            .finish()
8523    }
8524}
8525impl FeatureSetDefaults {
8526    /// Protobuf type URL for this message, for use with `Any::pack` and
8527    /// `Any::unpack_if`.
8528    ///
8529    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8530    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FeatureSetDefaults";
8531}
8532unsafe impl ::buffa::DefaultInstance for FeatureSetDefaults {
8533    fn default_instance() -> &'static Self {
8534        static VALUE: ::buffa::__private::OnceBox<FeatureSetDefaults> = ::buffa::__private::OnceBox::new();
8535        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8536    }
8537}
8538impl ::buffa::Message for FeatureSetDefaults {
8539    /// Returns the total encoded size in bytes.
8540    ///
8541    /// The result is a `u32`; the protobuf specification requires all
8542    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8543    /// compliant message will never overflow this type.
8544    fn compute_size(&self) -> u32 {
8545        #[allow(unused_imports)]
8546        use ::buffa::Enumeration as _;
8547        let mut size = 0u32;
8548        if let Some(ref v) = self.minimum_edition {
8549            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
8550        }
8551        if let Some(ref v) = self.maximum_edition {
8552            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
8553        }
8554        for v in &self.defaults {
8555            let inner_size = v.compute_size();
8556            size
8557                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8558                    + inner_size;
8559        }
8560        size += self.__buffa_unknown_fields.encoded_len() as u32;
8561        self.__buffa_cached_size.set(size);
8562        size
8563    }
8564    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
8565        #[allow(unused_imports)]
8566        use ::buffa::Enumeration as _;
8567        if let Some(ref v) = self.minimum_edition {
8568            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
8569                .encode(buf);
8570            ::buffa::types::encode_int32(v.to_i32(), buf);
8571        }
8572        if let Some(ref v) = self.maximum_edition {
8573            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
8574                .encode(buf);
8575            ::buffa::types::encode_int32(v.to_i32(), buf);
8576        }
8577        for v in &self.defaults {
8578            ::buffa::encoding::Tag::new(
8579                    1u32,
8580                    ::buffa::encoding::WireType::LengthDelimited,
8581                )
8582                .encode(buf);
8583            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
8584            v.write_to(buf);
8585        }
8586        self.__buffa_unknown_fields.write_to(buf);
8587    }
8588    fn merge_field(
8589        &mut self,
8590        tag: ::buffa::encoding::Tag,
8591        buf: &mut impl ::buffa::bytes::Buf,
8592        depth: u32,
8593    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8594        #[allow(unused_imports)]
8595        use ::buffa::bytes::Buf as _;
8596        #[allow(unused_imports)]
8597        use ::buffa::Enumeration as _;
8598        match tag.field_number() {
8599            4u32 => {
8600                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8601                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8602                        field_number: 4u32,
8603                        expected: 0u8,
8604                        actual: tag.wire_type() as u8,
8605                    });
8606                }
8607                let __raw = ::buffa::types::decode_int32(buf)?;
8608                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8609                    __raw,
8610                ) {
8611                    self.minimum_edition = ::core::option::Option::Some(__v);
8612                } else {
8613                    self.__buffa_unknown_fields
8614                        .push(::buffa::UnknownField {
8615                            number: 4u32,
8616                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8617                        });
8618                }
8619            }
8620            5u32 => {
8621                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8622                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8623                        field_number: 5u32,
8624                        expected: 0u8,
8625                        actual: tag.wire_type() as u8,
8626                    });
8627                }
8628                let __raw = ::buffa::types::decode_int32(buf)?;
8629                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8630                    __raw,
8631                ) {
8632                    self.maximum_edition = ::core::option::Option::Some(__v);
8633                } else {
8634                    self.__buffa_unknown_fields
8635                        .push(::buffa::UnknownField {
8636                            number: 5u32,
8637                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8638                        });
8639                }
8640            }
8641            1u32 => {
8642                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8643                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8644                        field_number: 1u32,
8645                        expected: 2u8,
8646                        actual: tag.wire_type() as u8,
8647                    });
8648                }
8649                let mut elem = ::core::default::Default::default();
8650                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
8651                self.defaults.push(elem);
8652            }
8653            _ => {
8654                self.__buffa_unknown_fields
8655                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8656            }
8657        }
8658        ::core::result::Result::Ok(())
8659    }
8660    fn cached_size(&self) -> u32 {
8661        self.__buffa_cached_size.get()
8662    }
8663    fn clear(&mut self) {
8664        self.minimum_edition = ::core::option::Option::None;
8665        self.maximum_edition = ::core::option::Option::None;
8666        self.defaults.clear();
8667        self.__buffa_unknown_fields.clear();
8668        self.__buffa_cached_size.set(0);
8669    }
8670}
8671impl ::buffa::ExtensionSet for FeatureSetDefaults {
8672    const PROTO_FQN: &'static str = "google.protobuf.FeatureSetDefaults";
8673    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8674        &self.__buffa_unknown_fields
8675    }
8676    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8677        &mut self.__buffa_unknown_fields
8678    }
8679}
8680pub mod feature_set_defaults {
8681    #[allow(unused_imports)]
8682    use super::*;
8683    /// A map from every known edition with a unique set of defaults to its
8684    /// defaults. Not all editions may be contained here.  For a given edition,
8685    /// the defaults at the closest matching edition ordered at or before it should
8686    /// be used.  This field must be in strict ascending order by edition.
8687    #[derive(Clone, PartialEq, Default)]
8688    pub struct FeatureSetEditionDefault {
8689        /// Field 3: `edition`
8690        pub edition: Option<Edition>,
8691        /// Defaults of features that can be overridden in this edition.
8692        ///
8693        /// Field 4: `overridable_features`
8694        pub overridable_features: ::buffa::MessageField<FeatureSet>,
8695        /// Defaults of features that can't be overridden in this edition.
8696        ///
8697        /// Field 5: `fixed_features`
8698        pub fixed_features: ::buffa::MessageField<FeatureSet>,
8699        #[doc(hidden)]
8700        pub __buffa_unknown_fields: ::buffa::UnknownFields,
8701        #[doc(hidden)]
8702        pub __buffa_cached_size: ::buffa::__private::CachedSize,
8703    }
8704    impl ::core::fmt::Debug for FeatureSetEditionDefault {
8705        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8706            f.debug_struct("FeatureSetEditionDefault")
8707                .field("edition", &self.edition)
8708                .field("overridable_features", &self.overridable_features)
8709                .field("fixed_features", &self.fixed_features)
8710                .finish()
8711        }
8712    }
8713    impl FeatureSetEditionDefault {
8714        /// Protobuf type URL for this message, for use with `Any::pack` and
8715        /// `Any::unpack_if`.
8716        ///
8717        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8718        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault";
8719    }
8720    unsafe impl ::buffa::DefaultInstance for FeatureSetEditionDefault {
8721        fn default_instance() -> &'static Self {
8722            static VALUE: ::buffa::__private::OnceBox<FeatureSetEditionDefault> = ::buffa::__private::OnceBox::new();
8723            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8724        }
8725    }
8726    impl ::buffa::Message for FeatureSetEditionDefault {
8727        /// Returns the total encoded size in bytes.
8728        ///
8729        /// The result is a `u32`; the protobuf specification requires all
8730        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8731        /// compliant message will never overflow this type.
8732        fn compute_size(&self) -> u32 {
8733            #[allow(unused_imports)]
8734            use ::buffa::Enumeration as _;
8735            let mut size = 0u32;
8736            if let Some(ref v) = self.edition {
8737                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
8738            }
8739            if self.overridable_features.is_set() {
8740                let inner_size = self.overridable_features.compute_size();
8741                size
8742                    += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8743                        + inner_size;
8744            }
8745            if self.fixed_features.is_set() {
8746                let inner_size = self.fixed_features.compute_size();
8747                size
8748                    += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8749                        + inner_size;
8750            }
8751            size += self.__buffa_unknown_fields.encoded_len() as u32;
8752            self.__buffa_cached_size.set(size);
8753            size
8754        }
8755        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
8756            #[allow(unused_imports)]
8757            use ::buffa::Enumeration as _;
8758            if let Some(ref v) = self.edition {
8759                ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
8760                    .encode(buf);
8761                ::buffa::types::encode_int32(v.to_i32(), buf);
8762            }
8763            if self.overridable_features.is_set() {
8764                ::buffa::encoding::Tag::new(
8765                        4u32,
8766                        ::buffa::encoding::WireType::LengthDelimited,
8767                    )
8768                    .encode(buf);
8769                ::buffa::encoding::encode_varint(
8770                    self.overridable_features.cached_size() as u64,
8771                    buf,
8772                );
8773                self.overridable_features.write_to(buf);
8774            }
8775            if self.fixed_features.is_set() {
8776                ::buffa::encoding::Tag::new(
8777                        5u32,
8778                        ::buffa::encoding::WireType::LengthDelimited,
8779                    )
8780                    .encode(buf);
8781                ::buffa::encoding::encode_varint(
8782                    self.fixed_features.cached_size() as u64,
8783                    buf,
8784                );
8785                self.fixed_features.write_to(buf);
8786            }
8787            self.__buffa_unknown_fields.write_to(buf);
8788        }
8789        fn merge_field(
8790            &mut self,
8791            tag: ::buffa::encoding::Tag,
8792            buf: &mut impl ::buffa::bytes::Buf,
8793            depth: u32,
8794        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8795            #[allow(unused_imports)]
8796            use ::buffa::bytes::Buf as _;
8797            #[allow(unused_imports)]
8798            use ::buffa::Enumeration as _;
8799            match tag.field_number() {
8800                3u32 => {
8801                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8802                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8803                            field_number: 3u32,
8804                            expected: 0u8,
8805                            actual: tag.wire_type() as u8,
8806                        });
8807                    }
8808                    let __raw = ::buffa::types::decode_int32(buf)?;
8809                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8810                        __raw,
8811                    ) {
8812                        self.edition = ::core::option::Option::Some(__v);
8813                    } else {
8814                        self.__buffa_unknown_fields
8815                            .push(::buffa::UnknownField {
8816                                number: 3u32,
8817                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8818                            });
8819                    }
8820                }
8821                4u32 => {
8822                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8823                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8824                            field_number: 4u32,
8825                            expected: 2u8,
8826                            actual: tag.wire_type() as u8,
8827                        });
8828                    }
8829                    ::buffa::Message::merge_length_delimited(
8830                        self.overridable_features.get_or_insert_default(),
8831                        buf,
8832                        depth,
8833                    )?;
8834                }
8835                5u32 => {
8836                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8837                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8838                            field_number: 5u32,
8839                            expected: 2u8,
8840                            actual: tag.wire_type() as u8,
8841                        });
8842                    }
8843                    ::buffa::Message::merge_length_delimited(
8844                        self.fixed_features.get_or_insert_default(),
8845                        buf,
8846                        depth,
8847                    )?;
8848                }
8849                _ => {
8850                    self.__buffa_unknown_fields
8851                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8852                }
8853            }
8854            ::core::result::Result::Ok(())
8855        }
8856        fn cached_size(&self) -> u32 {
8857            self.__buffa_cached_size.get()
8858        }
8859        fn clear(&mut self) {
8860            self.edition = ::core::option::Option::None;
8861            self.overridable_features = ::buffa::MessageField::none();
8862            self.fixed_features = ::buffa::MessageField::none();
8863            self.__buffa_unknown_fields.clear();
8864            self.__buffa_cached_size.set(0);
8865        }
8866    }
8867    impl ::buffa::ExtensionSet for FeatureSetEditionDefault {
8868        const PROTO_FQN: &'static str = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault";
8869        fn unknown_fields(&self) -> &::buffa::UnknownFields {
8870            &self.__buffa_unknown_fields
8871        }
8872        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8873            &mut self.__buffa_unknown_fields
8874        }
8875    }
8876}
8877/// ===================================================================
8878/// Optional source code info
8879///
8880/// Encapsulates information about the original source file from which a
8881/// FileDescriptorProto was generated.
8882#[derive(Clone, PartialEq, Default)]
8883pub struct SourceCodeInfo {
8884    /// A Location identifies a piece of source code in a .proto file which
8885    /// corresponds to a particular definition.  This information is intended
8886    /// to be useful to IDEs, code indexers, documentation generators, and similar
8887    /// tools.
8888    ///
8889    /// For example, say we have a file like:
8890    ///   message Foo {
8891    /// ```text
8892    /// optional string foo = 1;
8893    /// ```
8894    ///   }
8895    /// Let's look at just the field definition:
8896    ///   optional string foo = 1;
8897    ///   ^       ^^     ^^  ^  ^^^
8898    ///   a       bc     de  f  ghi
8899    /// We have the following locations:
8900    ///   span   path               represents
8901    ///   \[a,i)  \[ 4, 0, 2, 0 \]     The whole field definition.
8902    ///   \[a,b)  \[ 4, 0, 2, 0, 4 \]  The label (optional).
8903    ///   \[c,d)  \[ 4, 0, 2, 0, 5 \]  The type (string).
8904    ///   \[e,f)  \[ 4, 0, 2, 0, 1 \]  The name (foo).
8905    ///   \[g,h)  \[ 4, 0, 2, 0, 3 \]  The number (1).
8906    ///
8907    /// Notes:
8908    /// - A location may refer to a repeated field itself (i.e. not to any
8909    ///   particular index within it).  This is used whenever a set of elements are
8910    ///   logically enclosed in a single code segment.  For example, an entire
8911    ///   extend block (possibly containing multiple extension definitions) will
8912    ///   have an outer location whose path refers to the "extensions" repeated
8913    ///   field without an index.
8914    /// - Multiple locations may have the same path.  This happens when a single
8915    ///   logical declaration is spread out across multiple places.  The most
8916    ///   obvious example is the "extend" block again -- there may be multiple
8917    ///   extend blocks in the same scope, each of which will have the same path.
8918    /// - A location's span is not always a subset of its parent's span.  For
8919    ///   example, the "extendee" of an extension declaration appears at the
8920    ///   beginning of the "extend" block and is shared by all extensions within
8921    ///   the block.
8922    /// - Just because a location's span is a subset of some other location's span
8923    ///   does not mean that it is a descendant.  For example, a "group" defines
8924    ///   both a type and a field in a single declaration.  Thus, the locations
8925    ///   corresponding to the type and field and their components will overlap.
8926    /// - Code which tries to interpret locations should probably be designed to
8927    ///   ignore those that it doesn't understand, as more types of locations could
8928    ///   be recorded in the future.
8929    ///
8930    /// Field 1: `location`
8931    pub location: ::buffa::alloc::vec::Vec<source_code_info::Location>,
8932    #[doc(hidden)]
8933    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8934    #[doc(hidden)]
8935    pub __buffa_cached_size: ::buffa::__private::CachedSize,
8936}
8937impl ::core::fmt::Debug for SourceCodeInfo {
8938    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8939        f.debug_struct("SourceCodeInfo").field("location", &self.location).finish()
8940    }
8941}
8942impl SourceCodeInfo {
8943    /// Protobuf type URL for this message, for use with `Any::pack` and
8944    /// `Any::unpack_if`.
8945    ///
8946    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8947    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.SourceCodeInfo";
8948}
8949unsafe impl ::buffa::DefaultInstance for SourceCodeInfo {
8950    fn default_instance() -> &'static Self {
8951        static VALUE: ::buffa::__private::OnceBox<SourceCodeInfo> = ::buffa::__private::OnceBox::new();
8952        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8953    }
8954}
8955impl ::buffa::Message for SourceCodeInfo {
8956    /// Returns the total encoded size in bytes.
8957    ///
8958    /// The result is a `u32`; the protobuf specification requires all
8959    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8960    /// compliant message will never overflow this type.
8961    fn compute_size(&self) -> u32 {
8962        #[allow(unused_imports)]
8963        use ::buffa::Enumeration as _;
8964        let mut size = 0u32;
8965        for v in &self.location {
8966            let inner_size = v.compute_size();
8967            size
8968                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8969                    + inner_size;
8970        }
8971        size += self.__buffa_unknown_fields.encoded_len() as u32;
8972        self.__buffa_cached_size.set(size);
8973        size
8974    }
8975    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
8976        #[allow(unused_imports)]
8977        use ::buffa::Enumeration as _;
8978        for v in &self.location {
8979            ::buffa::encoding::Tag::new(
8980                    1u32,
8981                    ::buffa::encoding::WireType::LengthDelimited,
8982                )
8983                .encode(buf);
8984            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
8985            v.write_to(buf);
8986        }
8987        self.__buffa_unknown_fields.write_to(buf);
8988    }
8989    fn merge_field(
8990        &mut self,
8991        tag: ::buffa::encoding::Tag,
8992        buf: &mut impl ::buffa::bytes::Buf,
8993        depth: u32,
8994    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8995        #[allow(unused_imports)]
8996        use ::buffa::bytes::Buf as _;
8997        #[allow(unused_imports)]
8998        use ::buffa::Enumeration as _;
8999        match tag.field_number() {
9000            1u32 => {
9001                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9002                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9003                        field_number: 1u32,
9004                        expected: 2u8,
9005                        actual: tag.wire_type() as u8,
9006                    });
9007                }
9008                let mut elem = ::core::default::Default::default();
9009                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
9010                self.location.push(elem);
9011            }
9012            _ => {
9013                self.__buffa_unknown_fields
9014                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9015            }
9016        }
9017        ::core::result::Result::Ok(())
9018    }
9019    fn cached_size(&self) -> u32 {
9020        self.__buffa_cached_size.get()
9021    }
9022    fn clear(&mut self) {
9023        self.location.clear();
9024        self.__buffa_unknown_fields.clear();
9025        self.__buffa_cached_size.set(0);
9026    }
9027}
9028impl ::buffa::ExtensionSet for SourceCodeInfo {
9029    const PROTO_FQN: &'static str = "google.protobuf.SourceCodeInfo";
9030    fn unknown_fields(&self) -> &::buffa::UnknownFields {
9031        &self.__buffa_unknown_fields
9032    }
9033    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9034        &mut self.__buffa_unknown_fields
9035    }
9036}
9037pub mod source_code_info {
9038    #[allow(unused_imports)]
9039    use super::*;
9040    #[derive(Clone, PartialEq, Default)]
9041    pub struct Location {
9042        /// Identifies which part of the FileDescriptorProto was defined at this
9043        /// location.
9044        ///
9045        /// Each element is a field number or an index.  They form a path from
9046        /// the root FileDescriptorProto to the place where the definition appears.
9047        /// For example, this path:
9048        ///   \[ 4, 3, 2, 7, 1 \]
9049        /// refers to:
9050        ///   file.message_type(3)  // 4, 3
9051        /// ```text
9052        ///   .field(7)         // 2, 7
9053        ///   .name()           // 1
9054        /// ```
9055        /// This is because FileDescriptorProto.message_type has field number 4:
9056        ///   repeated DescriptorProto message_type = 4;
9057        /// and DescriptorProto.field has field number 2:
9058        ///   repeated FieldDescriptorProto field = 2;
9059        /// and FieldDescriptorProto.name has field number 1:
9060        ///   optional string name = 1;
9061        ///
9062        /// Thus, the above path gives the location of a field name.  If we removed
9063        /// the last element:
9064        ///   \[ 4, 3, 2, 7 \]
9065        /// this path refers to the whole field declaration (from the beginning
9066        /// of the label to the terminating semicolon).
9067        ///
9068        /// Field 1: `path`
9069        pub path: ::buffa::alloc::vec::Vec<i32>,
9070        /// Always has exactly three or four elements: start line, start column,
9071        /// end line (optional, otherwise assumed same as start line), end column.
9072        /// These are packed into a single field for efficiency.  Note that line
9073        /// and column numbers are zero-based -- typically you will want to add
9074        /// 1 to each before displaying to a user.
9075        ///
9076        /// Field 2: `span`
9077        pub span: ::buffa::alloc::vec::Vec<i32>,
9078        /// If this SourceCodeInfo represents a complete declaration, these are any
9079        /// comments appearing before and after the declaration which appear to be
9080        /// attached to the declaration.
9081        ///
9082        /// A series of line comments appearing on consecutive lines, with no other
9083        /// tokens appearing on those lines, will be treated as a single comment.
9084        ///
9085        /// leading_detached_comments will keep paragraphs of comments that appear
9086        /// before (but not connected to) the current element. Each paragraph,
9087        /// separated by empty lines, will be one comment element in the repeated
9088        /// field.
9089        ///
9090        /// Only the comment content is provided; comment markers (e.g. //) are
9091        /// stripped out.  For block comments, leading whitespace and an asterisk
9092        /// will be stripped from the beginning of each line other than the first.
9093        /// Newlines are included in the output.
9094        ///
9095        /// Examples:
9096        ///
9097        ///   optional int32 foo = 1;  // Comment attached to foo.
9098        ///   // Comment attached to bar.
9099        ///   optional int32 bar = 2;
9100        ///
9101        ///   optional string baz = 3;
9102        ///   // Comment attached to baz.
9103        ///   // Another line attached to baz.
9104        ///
9105        ///   // Comment attached to moo.
9106        ///   //
9107        ///   // Another line attached to moo.
9108        ///   optional double moo = 4;
9109        ///
9110        ///   // Detached comment for corge. This is not leading or trailing comments
9111        ///   // to moo or corge because there are blank lines separating it from
9112        ///   // both.
9113        ///
9114        ///   // Detached comment for corge paragraph 2.
9115        ///
9116        ///   optional string corge = 5;
9117        ///   /* Block comment attached
9118        /// ```text
9119        /// * to corge.  Leading asterisks
9120        /// * will be removed. */
9121        /// ```
9122        ///   /* Block comment attached to
9123        /// ```text
9124        /// * grault. */
9125        /// ```
9126        ///   optional int32 grault = 6;
9127        ///
9128        ///   // ignored detached comments.
9129        ///
9130        /// Field 3: `leading_comments`
9131        pub leading_comments: Option<::buffa::alloc::string::String>,
9132        /// Field 4: `trailing_comments`
9133        pub trailing_comments: Option<::buffa::alloc::string::String>,
9134        /// Field 6: `leading_detached_comments`
9135        pub leading_detached_comments: ::buffa::alloc::vec::Vec<
9136            ::buffa::alloc::string::String,
9137        >,
9138        #[doc(hidden)]
9139        pub __buffa_unknown_fields: ::buffa::UnknownFields,
9140        #[doc(hidden)]
9141        pub __buffa_cached_size: ::buffa::__private::CachedSize,
9142    }
9143    impl ::core::fmt::Debug for Location {
9144        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9145            f.debug_struct("Location")
9146                .field("path", &self.path)
9147                .field("span", &self.span)
9148                .field("leading_comments", &self.leading_comments)
9149                .field("trailing_comments", &self.trailing_comments)
9150                .field("leading_detached_comments", &self.leading_detached_comments)
9151                .finish()
9152        }
9153    }
9154    impl Location {
9155        /// Protobuf type URL for this message, for use with `Any::pack` and
9156        /// `Any::unpack_if`.
9157        ///
9158        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9159        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.SourceCodeInfo.Location";
9160    }
9161    unsafe impl ::buffa::DefaultInstance for Location {
9162        fn default_instance() -> &'static Self {
9163            static VALUE: ::buffa::__private::OnceBox<Location> = ::buffa::__private::OnceBox::new();
9164            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9165        }
9166    }
9167    impl ::buffa::Message for Location {
9168        /// Returns the total encoded size in bytes.
9169        ///
9170        /// The result is a `u32`; the protobuf specification requires all
9171        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9172        /// compliant message will never overflow this type.
9173        fn compute_size(&self) -> u32 {
9174            #[allow(unused_imports)]
9175            use ::buffa::Enumeration as _;
9176            let mut size = 0u32;
9177            if let Some(ref v) = self.leading_comments {
9178                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9179            }
9180            if let Some(ref v) = self.trailing_comments {
9181                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9182            }
9183            if !self.path.is_empty() {
9184                let payload: u32 = self
9185                    .path
9186                    .iter()
9187                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9188                    .sum::<u32>();
9189                size
9190                    += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
9191                        + payload;
9192            }
9193            if !self.span.is_empty() {
9194                let payload: u32 = self
9195                    .span
9196                    .iter()
9197                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9198                    .sum::<u32>();
9199                size
9200                    += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
9201                        + payload;
9202            }
9203            for v in &self.leading_detached_comments {
9204                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9205            }
9206            size += self.__buffa_unknown_fields.encoded_len() as u32;
9207            self.__buffa_cached_size.set(size);
9208            size
9209        }
9210        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
9211            #[allow(unused_imports)]
9212            use ::buffa::Enumeration as _;
9213            if let Some(ref v) = self.leading_comments {
9214                ::buffa::encoding::Tag::new(
9215                        3u32,
9216                        ::buffa::encoding::WireType::LengthDelimited,
9217                    )
9218                    .encode(buf);
9219                ::buffa::types::encode_string(v, buf);
9220            }
9221            if let Some(ref v) = self.trailing_comments {
9222                ::buffa::encoding::Tag::new(
9223                        4u32,
9224                        ::buffa::encoding::WireType::LengthDelimited,
9225                    )
9226                    .encode(buf);
9227                ::buffa::types::encode_string(v, buf);
9228            }
9229            if !self.path.is_empty() {
9230                let payload: u32 = self
9231                    .path
9232                    .iter()
9233                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9234                    .sum::<u32>();
9235                ::buffa::encoding::Tag::new(
9236                        1u32,
9237                        ::buffa::encoding::WireType::LengthDelimited,
9238                    )
9239                    .encode(buf);
9240                ::buffa::encoding::encode_varint(payload as u64, buf);
9241                for &v in &self.path {
9242                    ::buffa::types::encode_int32(v, buf);
9243                }
9244            }
9245            if !self.span.is_empty() {
9246                let payload: u32 = self
9247                    .span
9248                    .iter()
9249                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9250                    .sum::<u32>();
9251                ::buffa::encoding::Tag::new(
9252                        2u32,
9253                        ::buffa::encoding::WireType::LengthDelimited,
9254                    )
9255                    .encode(buf);
9256                ::buffa::encoding::encode_varint(payload as u64, buf);
9257                for &v in &self.span {
9258                    ::buffa::types::encode_int32(v, buf);
9259                }
9260            }
9261            for v in &self.leading_detached_comments {
9262                ::buffa::encoding::Tag::new(
9263                        6u32,
9264                        ::buffa::encoding::WireType::LengthDelimited,
9265                    )
9266                    .encode(buf);
9267                ::buffa::types::encode_string(v, buf);
9268            }
9269            self.__buffa_unknown_fields.write_to(buf);
9270        }
9271        fn merge_field(
9272            &mut self,
9273            tag: ::buffa::encoding::Tag,
9274            buf: &mut impl ::buffa::bytes::Buf,
9275            depth: u32,
9276        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9277            #[allow(unused_imports)]
9278            use ::buffa::bytes::Buf as _;
9279            #[allow(unused_imports)]
9280            use ::buffa::Enumeration as _;
9281            match tag.field_number() {
9282                3u32 => {
9283                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9284                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9285                            field_number: 3u32,
9286                            expected: 2u8,
9287                            actual: tag.wire_type() as u8,
9288                        });
9289                    }
9290                    ::buffa::types::merge_string(
9291                        self
9292                            .leading_comments
9293                            .get_or_insert_with(::buffa::alloc::string::String::new),
9294                        buf,
9295                    )?;
9296                }
9297                4u32 => {
9298                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9299                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9300                            field_number: 4u32,
9301                            expected: 2u8,
9302                            actual: tag.wire_type() as u8,
9303                        });
9304                    }
9305                    ::buffa::types::merge_string(
9306                        self
9307                            .trailing_comments
9308                            .get_or_insert_with(::buffa::alloc::string::String::new),
9309                        buf,
9310                    )?;
9311                }
9312                1u32 => {
9313                    if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
9314                        let len = ::buffa::encoding::decode_varint(buf)?;
9315                        let len = usize::try_from(len)
9316                            .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
9317                        if buf.remaining() < len {
9318                            return ::core::result::Result::Err(
9319                                ::buffa::DecodeError::UnexpectedEof,
9320                            );
9321                        }
9322                        self.path.reserve(len);
9323                        let mut limited = buf.take(len);
9324                        while limited.has_remaining() {
9325                            self.path.push(::buffa::types::decode_int32(&mut limited)?);
9326                        }
9327                        let leftover = limited.remaining();
9328                        if leftover > 0 {
9329                            limited.advance(leftover);
9330                        }
9331                    } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
9332                        self.path.push(::buffa::types::decode_int32(buf)?);
9333                    } else {
9334                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9335                            field_number: 1u32,
9336                            expected: 2u8,
9337                            actual: tag.wire_type() as u8,
9338                        });
9339                    }
9340                }
9341                2u32 => {
9342                    if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
9343                        let len = ::buffa::encoding::decode_varint(buf)?;
9344                        let len = usize::try_from(len)
9345                            .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
9346                        if buf.remaining() < len {
9347                            return ::core::result::Result::Err(
9348                                ::buffa::DecodeError::UnexpectedEof,
9349                            );
9350                        }
9351                        self.span.reserve(len);
9352                        let mut limited = buf.take(len);
9353                        while limited.has_remaining() {
9354                            self.span.push(::buffa::types::decode_int32(&mut limited)?);
9355                        }
9356                        let leftover = limited.remaining();
9357                        if leftover > 0 {
9358                            limited.advance(leftover);
9359                        }
9360                    } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
9361                        self.span.push(::buffa::types::decode_int32(buf)?);
9362                    } else {
9363                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9364                            field_number: 2u32,
9365                            expected: 2u8,
9366                            actual: tag.wire_type() as u8,
9367                        });
9368                    }
9369                }
9370                6u32 => {
9371                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9372                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9373                            field_number: 6u32,
9374                            expected: 2u8,
9375                            actual: tag.wire_type() as u8,
9376                        });
9377                    }
9378                    self.leading_detached_comments
9379                        .push(::buffa::types::decode_string(buf)?);
9380                }
9381                _ => {
9382                    self.__buffa_unknown_fields
9383                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9384                }
9385            }
9386            ::core::result::Result::Ok(())
9387        }
9388        fn cached_size(&self) -> u32 {
9389            self.__buffa_cached_size.get()
9390        }
9391        fn clear(&mut self) {
9392            self.leading_comments = ::core::option::Option::None;
9393            self.trailing_comments = ::core::option::Option::None;
9394            self.path.clear();
9395            self.span.clear();
9396            self.leading_detached_comments.clear();
9397            self.__buffa_unknown_fields.clear();
9398            self.__buffa_cached_size.set(0);
9399        }
9400    }
9401    impl ::buffa::ExtensionSet for Location {
9402        const PROTO_FQN: &'static str = "google.protobuf.SourceCodeInfo.Location";
9403        fn unknown_fields(&self) -> &::buffa::UnknownFields {
9404            &self.__buffa_unknown_fields
9405        }
9406        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9407            &mut self.__buffa_unknown_fields
9408        }
9409    }
9410}
9411/// Describes the relationship between generated code and its original source
9412/// file. A GeneratedCodeInfo message is associated with only one generated
9413/// source file, but may contain references to different source .proto files.
9414#[derive(Clone, PartialEq, Default)]
9415pub struct GeneratedCodeInfo {
9416    /// An Annotation connects some span of text in generated code to an element
9417    /// of its generating .proto file.
9418    ///
9419    /// Field 1: `annotation`
9420    pub annotation: ::buffa::alloc::vec::Vec<generated_code_info::Annotation>,
9421    #[doc(hidden)]
9422    pub __buffa_unknown_fields: ::buffa::UnknownFields,
9423    #[doc(hidden)]
9424    pub __buffa_cached_size: ::buffa::__private::CachedSize,
9425}
9426impl ::core::fmt::Debug for GeneratedCodeInfo {
9427    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9428        f.debug_struct("GeneratedCodeInfo")
9429            .field("annotation", &self.annotation)
9430            .finish()
9431    }
9432}
9433impl GeneratedCodeInfo {
9434    /// Protobuf type URL for this message, for use with `Any::pack` and
9435    /// `Any::unpack_if`.
9436    ///
9437    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9438    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.GeneratedCodeInfo";
9439}
9440unsafe impl ::buffa::DefaultInstance for GeneratedCodeInfo {
9441    fn default_instance() -> &'static Self {
9442        static VALUE: ::buffa::__private::OnceBox<GeneratedCodeInfo> = ::buffa::__private::OnceBox::new();
9443        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9444    }
9445}
9446impl ::buffa::Message for GeneratedCodeInfo {
9447    /// Returns the total encoded size in bytes.
9448    ///
9449    /// The result is a `u32`; the protobuf specification requires all
9450    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9451    /// compliant message will never overflow this type.
9452    fn compute_size(&self) -> u32 {
9453        #[allow(unused_imports)]
9454        use ::buffa::Enumeration as _;
9455        let mut size = 0u32;
9456        for v in &self.annotation {
9457            let inner_size = v.compute_size();
9458            size
9459                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9460                    + inner_size;
9461        }
9462        size += self.__buffa_unknown_fields.encoded_len() as u32;
9463        self.__buffa_cached_size.set(size);
9464        size
9465    }
9466    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
9467        #[allow(unused_imports)]
9468        use ::buffa::Enumeration as _;
9469        for v in &self.annotation {
9470            ::buffa::encoding::Tag::new(
9471                    1u32,
9472                    ::buffa::encoding::WireType::LengthDelimited,
9473                )
9474                .encode(buf);
9475            ::buffa::encoding::encode_varint(v.cached_size() as u64, buf);
9476            v.write_to(buf);
9477        }
9478        self.__buffa_unknown_fields.write_to(buf);
9479    }
9480    fn merge_field(
9481        &mut self,
9482        tag: ::buffa::encoding::Tag,
9483        buf: &mut impl ::buffa::bytes::Buf,
9484        depth: u32,
9485    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9486        #[allow(unused_imports)]
9487        use ::buffa::bytes::Buf as _;
9488        #[allow(unused_imports)]
9489        use ::buffa::Enumeration as _;
9490        match tag.field_number() {
9491            1u32 => {
9492                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9493                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9494                        field_number: 1u32,
9495                        expected: 2u8,
9496                        actual: tag.wire_type() as u8,
9497                    });
9498                }
9499                let mut elem = ::core::default::Default::default();
9500                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
9501                self.annotation.push(elem);
9502            }
9503            _ => {
9504                self.__buffa_unknown_fields
9505                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9506            }
9507        }
9508        ::core::result::Result::Ok(())
9509    }
9510    fn cached_size(&self) -> u32 {
9511        self.__buffa_cached_size.get()
9512    }
9513    fn clear(&mut self) {
9514        self.annotation.clear();
9515        self.__buffa_unknown_fields.clear();
9516        self.__buffa_cached_size.set(0);
9517    }
9518}
9519impl ::buffa::ExtensionSet for GeneratedCodeInfo {
9520    const PROTO_FQN: &'static str = "google.protobuf.GeneratedCodeInfo";
9521    fn unknown_fields(&self) -> &::buffa::UnknownFields {
9522        &self.__buffa_unknown_fields
9523    }
9524    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9525        &mut self.__buffa_unknown_fields
9526    }
9527}
9528pub mod generated_code_info {
9529    #[allow(unused_imports)]
9530    use super::*;
9531    #[derive(Clone, PartialEq, Default)]
9532    pub struct Annotation {
9533        /// Identifies the element in the original source .proto file. This field
9534        /// is formatted the same as SourceCodeInfo.Location.path.
9535        ///
9536        /// Field 1: `path`
9537        pub path: ::buffa::alloc::vec::Vec<i32>,
9538        /// Identifies the filesystem path to the original source .proto.
9539        ///
9540        /// Field 2: `source_file`
9541        pub source_file: Option<::buffa::alloc::string::String>,
9542        /// Identifies the starting offset in bytes in the generated code
9543        /// that relates to the identified object.
9544        ///
9545        /// Field 3: `begin`
9546        pub begin: Option<i32>,
9547        /// Identifies the ending offset in bytes in the generated code that
9548        /// relates to the identified object. The end offset should be one past
9549        /// the last relevant byte (so the length of the text = end - begin).
9550        ///
9551        /// Field 4: `end`
9552        pub end: Option<i32>,
9553        /// Field 5: `semantic`
9554        pub semantic: Option<generated_code_info::annotation::Semantic>,
9555        #[doc(hidden)]
9556        pub __buffa_unknown_fields: ::buffa::UnknownFields,
9557        #[doc(hidden)]
9558        pub __buffa_cached_size: ::buffa::__private::CachedSize,
9559    }
9560    impl ::core::fmt::Debug for Annotation {
9561        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9562            f.debug_struct("Annotation")
9563                .field("path", &self.path)
9564                .field("source_file", &self.source_file)
9565                .field("begin", &self.begin)
9566                .field("end", &self.end)
9567                .field("semantic", &self.semantic)
9568                .finish()
9569        }
9570    }
9571    impl Annotation {
9572        /// Protobuf type URL for this message, for use with `Any::pack` and
9573        /// `Any::unpack_if`.
9574        ///
9575        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9576        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.GeneratedCodeInfo.Annotation";
9577    }
9578    unsafe impl ::buffa::DefaultInstance for Annotation {
9579        fn default_instance() -> &'static Self {
9580            static VALUE: ::buffa::__private::OnceBox<Annotation> = ::buffa::__private::OnceBox::new();
9581            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9582        }
9583    }
9584    impl ::buffa::Message for Annotation {
9585        /// Returns the total encoded size in bytes.
9586        ///
9587        /// The result is a `u32`; the protobuf specification requires all
9588        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9589        /// compliant message will never overflow this type.
9590        fn compute_size(&self) -> u32 {
9591            #[allow(unused_imports)]
9592            use ::buffa::Enumeration as _;
9593            let mut size = 0u32;
9594            if let Some(ref v) = self.source_file {
9595                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9596            }
9597            if let Some(v) = self.begin {
9598                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
9599            }
9600            if let Some(v) = self.end {
9601                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
9602            }
9603            if let Some(ref v) = self.semantic {
9604                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
9605            }
9606            if !self.path.is_empty() {
9607                let payload: u32 = self
9608                    .path
9609                    .iter()
9610                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9611                    .sum::<u32>();
9612                size
9613                    += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
9614                        + payload;
9615            }
9616            size += self.__buffa_unknown_fields.encoded_len() as u32;
9617            self.__buffa_cached_size.set(size);
9618            size
9619        }
9620        fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
9621            #[allow(unused_imports)]
9622            use ::buffa::Enumeration as _;
9623            if let Some(ref v) = self.source_file {
9624                ::buffa::encoding::Tag::new(
9625                        2u32,
9626                        ::buffa::encoding::WireType::LengthDelimited,
9627                    )
9628                    .encode(buf);
9629                ::buffa::types::encode_string(v, buf);
9630            }
9631            if let Some(v) = self.begin {
9632                ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
9633                    .encode(buf);
9634                ::buffa::types::encode_int32(v, buf);
9635            }
9636            if let Some(v) = self.end {
9637                ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
9638                    .encode(buf);
9639                ::buffa::types::encode_int32(v, buf);
9640            }
9641            if let Some(ref v) = self.semantic {
9642                ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
9643                    .encode(buf);
9644                ::buffa::types::encode_int32(v.to_i32(), buf);
9645            }
9646            if !self.path.is_empty() {
9647                let payload: u32 = self
9648                    .path
9649                    .iter()
9650                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9651                    .sum::<u32>();
9652                ::buffa::encoding::Tag::new(
9653                        1u32,
9654                        ::buffa::encoding::WireType::LengthDelimited,
9655                    )
9656                    .encode(buf);
9657                ::buffa::encoding::encode_varint(payload as u64, buf);
9658                for &v in &self.path {
9659                    ::buffa::types::encode_int32(v, buf);
9660                }
9661            }
9662            self.__buffa_unknown_fields.write_to(buf);
9663        }
9664        fn merge_field(
9665            &mut self,
9666            tag: ::buffa::encoding::Tag,
9667            buf: &mut impl ::buffa::bytes::Buf,
9668            depth: u32,
9669        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9670            #[allow(unused_imports)]
9671            use ::buffa::bytes::Buf as _;
9672            #[allow(unused_imports)]
9673            use ::buffa::Enumeration as _;
9674            match tag.field_number() {
9675                2u32 => {
9676                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9677                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9678                            field_number: 2u32,
9679                            expected: 2u8,
9680                            actual: tag.wire_type() as u8,
9681                        });
9682                    }
9683                    ::buffa::types::merge_string(
9684                        self
9685                            .source_file
9686                            .get_or_insert_with(::buffa::alloc::string::String::new),
9687                        buf,
9688                    )?;
9689                }
9690                3u32 => {
9691                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9692                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9693                            field_number: 3u32,
9694                            expected: 0u8,
9695                            actual: tag.wire_type() as u8,
9696                        });
9697                    }
9698                    self.begin = ::core::option::Option::Some(
9699                        ::buffa::types::decode_int32(buf)?,
9700                    );
9701                }
9702                4u32 => {
9703                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9704                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9705                            field_number: 4u32,
9706                            expected: 0u8,
9707                            actual: tag.wire_type() as u8,
9708                        });
9709                    }
9710                    self.end = ::core::option::Option::Some(
9711                        ::buffa::types::decode_int32(buf)?,
9712                    );
9713                }
9714                5u32 => {
9715                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9716                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9717                            field_number: 5u32,
9718                            expected: 0u8,
9719                            actual: tag.wire_type() as u8,
9720                        });
9721                    }
9722                    let __raw = ::buffa::types::decode_int32(buf)?;
9723                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
9724                        __raw,
9725                    ) {
9726                        self.semantic = ::core::option::Option::Some(__v);
9727                    } else {
9728                        self.__buffa_unknown_fields
9729                            .push(::buffa::UnknownField {
9730                                number: 5u32,
9731                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
9732                            });
9733                    }
9734                }
9735                1u32 => {
9736                    if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
9737                        let len = ::buffa::encoding::decode_varint(buf)?;
9738                        let len = usize::try_from(len)
9739                            .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
9740                        if buf.remaining() < len {
9741                            return ::core::result::Result::Err(
9742                                ::buffa::DecodeError::UnexpectedEof,
9743                            );
9744                        }
9745                        self.path.reserve(len);
9746                        let mut limited = buf.take(len);
9747                        while limited.has_remaining() {
9748                            self.path.push(::buffa::types::decode_int32(&mut limited)?);
9749                        }
9750                        let leftover = limited.remaining();
9751                        if leftover > 0 {
9752                            limited.advance(leftover);
9753                        }
9754                    } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
9755                        self.path.push(::buffa::types::decode_int32(buf)?);
9756                    } else {
9757                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9758                            field_number: 1u32,
9759                            expected: 2u8,
9760                            actual: tag.wire_type() as u8,
9761                        });
9762                    }
9763                }
9764                _ => {
9765                    self.__buffa_unknown_fields
9766                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9767                }
9768            }
9769            ::core::result::Result::Ok(())
9770        }
9771        fn cached_size(&self) -> u32 {
9772            self.__buffa_cached_size.get()
9773        }
9774        fn clear(&mut self) {
9775            self.source_file = ::core::option::Option::None;
9776            self.begin = ::core::option::Option::None;
9777            self.end = ::core::option::Option::None;
9778            self.semantic = ::core::option::Option::None;
9779            self.path.clear();
9780            self.__buffa_unknown_fields.clear();
9781            self.__buffa_cached_size.set(0);
9782        }
9783    }
9784    impl ::buffa::ExtensionSet for Annotation {
9785        const PROTO_FQN: &'static str = "google.protobuf.GeneratedCodeInfo.Annotation";
9786        fn unknown_fields(&self) -> &::buffa::UnknownFields {
9787            &self.__buffa_unknown_fields
9788        }
9789        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9790            &mut self.__buffa_unknown_fields
9791        }
9792    }
9793    pub mod annotation {
9794        #[allow(unused_imports)]
9795        use super::*;
9796        /// Represents the identified object's effect on the element in the original
9797        /// .proto file.
9798        #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
9799        #[repr(i32)]
9800        pub enum Semantic {
9801            /// There is no effect or the effect is indescribable.
9802            NONE = 0i32,
9803            /// The element is set or otherwise mutated.
9804            SET = 1i32,
9805            /// An alias to the element is returned.
9806            ALIAS = 2i32,
9807        }
9808        impl ::core::default::Default for Semantic {
9809            fn default() -> Self {
9810                Self::NONE
9811            }
9812        }
9813        impl ::buffa::Enumeration for Semantic {
9814            fn from_i32(value: i32) -> ::core::option::Option<Self> {
9815                match value {
9816                    0i32 => ::core::option::Option::Some(Self::NONE),
9817                    1i32 => ::core::option::Option::Some(Self::SET),
9818                    2i32 => ::core::option::Option::Some(Self::ALIAS),
9819                    _ => ::core::option::Option::None,
9820                }
9821            }
9822            fn to_i32(&self) -> i32 {
9823                *self as i32
9824            }
9825            fn proto_name(&self) -> &'static str {
9826                match self {
9827                    Self::NONE => "NONE",
9828                    Self::SET => "SET",
9829                    Self::ALIAS => "ALIAS",
9830                }
9831            }
9832            fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
9833                match name {
9834                    "NONE" => ::core::option::Option::Some(Self::NONE),
9835                    "SET" => ::core::option::Option::Some(Self::SET),
9836                    "ALIAS" => ::core::option::Option::Some(Self::ALIAS),
9837                    _ => ::core::option::Option::None,
9838                }
9839            }
9840        }
9841    }
9842}