Skip to main content

buffa_descriptor/generated/
google.protobuf.descriptor.rs

1// @generated by buffa-codegen. 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    fn values() -> &'static [Self] {
111        &[
112            Self::EDITION_UNKNOWN,
113            Self::EDITION_LEGACY,
114            Self::EDITION_PROTO2,
115            Self::EDITION_PROTO3,
116            Self::EDITION_2023,
117            Self::EDITION_2024,
118            Self::EDITION_UNSTABLE,
119            Self::EDITION_1_TEST_ONLY,
120            Self::EDITION_2_TEST_ONLY,
121            Self::EDITION_99997_TEST_ONLY,
122            Self::EDITION_99998_TEST_ONLY,
123            Self::EDITION_99999_TEST_ONLY,
124            Self::EDITION_MAX,
125        ]
126    }
127}
128/// Describes the 'visibility' of a symbol with respect to the proto import
129/// system. Symbols can only be imported when the visibility rules do not prevent
130/// it (ex: local symbols cannot be imported).  Visibility modifiers can only set
131/// on `message` and `enum` as they are the only types available to be referenced
132/// from other files.
133#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
134#[repr(i32)]
135pub enum SymbolVisibility {
136    VISIBILITY_UNSET = 0i32,
137    VISIBILITY_LOCAL = 1i32,
138    VISIBILITY_EXPORT = 2i32,
139}
140impl ::core::default::Default for SymbolVisibility {
141    fn default() -> Self {
142        Self::VISIBILITY_UNSET
143    }
144}
145impl ::buffa::Enumeration for SymbolVisibility {
146    fn from_i32(value: i32) -> ::core::option::Option<Self> {
147        match value {
148            0i32 => ::core::option::Option::Some(Self::VISIBILITY_UNSET),
149            1i32 => ::core::option::Option::Some(Self::VISIBILITY_LOCAL),
150            2i32 => ::core::option::Option::Some(Self::VISIBILITY_EXPORT),
151            _ => ::core::option::Option::None,
152        }
153    }
154    fn to_i32(&self) -> i32 {
155        *self as i32
156    }
157    fn proto_name(&self) -> &'static str {
158        match self {
159            Self::VISIBILITY_UNSET => "VISIBILITY_UNSET",
160            Self::VISIBILITY_LOCAL => "VISIBILITY_LOCAL",
161            Self::VISIBILITY_EXPORT => "VISIBILITY_EXPORT",
162        }
163    }
164    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
165        match name {
166            "VISIBILITY_UNSET" => ::core::option::Option::Some(Self::VISIBILITY_UNSET),
167            "VISIBILITY_LOCAL" => ::core::option::Option::Some(Self::VISIBILITY_LOCAL),
168            "VISIBILITY_EXPORT" => ::core::option::Option::Some(Self::VISIBILITY_EXPORT),
169            _ => ::core::option::Option::None,
170        }
171    }
172    fn values() -> &'static [Self] {
173        &[Self::VISIBILITY_UNSET, Self::VISIBILITY_LOCAL, Self::VISIBILITY_EXPORT]
174    }
175}
176/// The protocol compiler can output a FileDescriptorSet containing the .proto
177/// files it parses.
178#[derive(Clone, PartialEq, Default)]
179pub struct FileDescriptorSet {
180    /// Field 1: `file`
181    pub file: ::buffa::alloc::vec::Vec<FileDescriptorProto>,
182    #[doc(hidden)]
183    pub __buffa_unknown_fields: ::buffa::UnknownFields,
184}
185impl ::core::fmt::Debug for FileDescriptorSet {
186    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
187        f.debug_struct("FileDescriptorSet").field("file", &self.file).finish()
188    }
189}
190impl FileDescriptorSet {
191    /// Protobuf type URL for this message, for use with `Any::pack` and
192    /// `Any::unpack_if`.
193    ///
194    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
195    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FileDescriptorSet";
196}
197impl ::buffa::DefaultInstance for FileDescriptorSet {
198    fn default_instance() -> &'static Self {
199        static VALUE: ::buffa::__private::OnceBox<FileDescriptorSet> = ::buffa::__private::OnceBox::new();
200        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
201    }
202}
203impl ::buffa::Message for FileDescriptorSet {
204    /// Returns the total encoded size in bytes.
205    ///
206    /// The result is a `u32`; the protobuf specification requires all
207    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
208    /// compliant message will never overflow this type.
209    #[allow(clippy::let_and_return)]
210    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
211        #[allow(unused_imports)]
212        use ::buffa::Enumeration as _;
213        let mut size = 0u32;
214        for v in &self.file {
215            let __slot = __cache.reserve();
216            let inner_size = v.compute_size(__cache);
217            __cache.set(__slot, inner_size);
218            size
219                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
220                    + inner_size;
221        }
222        size += self.__buffa_unknown_fields.encoded_len() as u32;
223        size
224    }
225    fn write_to(
226        &self,
227        __cache: &mut ::buffa::SizeCache,
228        buf: &mut impl ::buffa::bytes::BufMut,
229    ) {
230        #[allow(unused_imports)]
231        use ::buffa::Enumeration as _;
232        for v in &self.file {
233            ::buffa::encoding::Tag::new(
234                    1u32,
235                    ::buffa::encoding::WireType::LengthDelimited,
236                )
237                .encode(buf);
238            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
239            v.write_to(__cache, buf);
240        }
241        self.__buffa_unknown_fields.write_to(buf);
242    }
243    fn merge_field(
244        &mut self,
245        tag: ::buffa::encoding::Tag,
246        buf: &mut impl ::buffa::bytes::Buf,
247        depth: u32,
248    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
249        #[allow(unused_imports)]
250        use ::buffa::bytes::Buf as _;
251        #[allow(unused_imports)]
252        use ::buffa::Enumeration as _;
253        match tag.field_number() {
254            1u32 => {
255                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
256                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
257                        field_number: 1u32,
258                        expected: 2u8,
259                        actual: tag.wire_type() as u8,
260                    });
261                }
262                let mut elem = ::core::default::Default::default();
263                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
264                self.file.push(elem);
265            }
266            _ => {
267                self.__buffa_unknown_fields
268                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
269            }
270        }
271        ::core::result::Result::Ok(())
272    }
273    fn clear(&mut self) {
274        self.file.clear();
275        self.__buffa_unknown_fields.clear();
276    }
277}
278impl ::buffa::ExtensionSet for FileDescriptorSet {
279    const PROTO_FQN: &'static str = "google.protobuf.FileDescriptorSet";
280    fn unknown_fields(&self) -> &::buffa::UnknownFields {
281        &self.__buffa_unknown_fields
282    }
283    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
284        &mut self.__buffa_unknown_fields
285    }
286}
287/// Describes a complete .proto file.
288#[derive(Clone, PartialEq, Default)]
289pub struct FileDescriptorProto {
290    /// file name, relative to root of source tree
291    ///
292    /// Field 1: `name`
293    pub name: ::core::option::Option<::buffa::alloc::string::String>,
294    /// e.g. "foo", "foo.bar", etc.
295    ///
296    /// Field 2: `package`
297    pub package: ::core::option::Option<::buffa::alloc::string::String>,
298    /// Names of files imported by this file.
299    ///
300    /// Field 3: `dependency`
301    pub dependency: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
302    /// Indexes of the public imported files in the dependency list above.
303    ///
304    /// Field 10: `public_dependency`
305    pub public_dependency: ::buffa::alloc::vec::Vec<i32>,
306    /// Indexes of the weak imported files in the dependency list.
307    /// For Google-internal migration only. Do not use.
308    ///
309    /// Field 11: `weak_dependency`
310    pub weak_dependency: ::buffa::alloc::vec::Vec<i32>,
311    /// Names of files imported by this file purely for the purpose of providing
312    /// option extensions. These are excluded from the dependency list above.
313    ///
314    /// Field 15: `option_dependency`
315    pub option_dependency: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
316    /// All top-level definitions in this file.
317    ///
318    /// Field 4: `message_type`
319    pub message_type: ::buffa::alloc::vec::Vec<DescriptorProto>,
320    /// Field 5: `enum_type`
321    pub enum_type: ::buffa::alloc::vec::Vec<EnumDescriptorProto>,
322    /// Field 6: `service`
323    pub service: ::buffa::alloc::vec::Vec<ServiceDescriptorProto>,
324    /// Field 7: `extension`
325    pub extension: ::buffa::alloc::vec::Vec<FieldDescriptorProto>,
326    /// Field 8: `options`
327    pub options: ::buffa::MessageField<FileOptions>,
328    /// This field contains optional information about the original source code.
329    /// You may safely remove this entire field without harming runtime
330    /// functionality of the descriptors -- the information is needed only by
331    /// development tools.
332    ///
333    /// Field 9: `source_code_info`
334    pub source_code_info: ::buffa::MessageField<SourceCodeInfo>,
335    /// The syntax of the proto file.
336    /// The supported values are "proto2", "proto3", and "editions".
337    ///
338    /// If `edition` is present, this value must be "editions".
339    /// WARNING: This field should only be used by protobuf plugins or special
340    /// cases like the proto compiler. Other uses are discouraged and
341    /// developers should rely on the protoreflect APIs for their client language.
342    ///
343    /// Field 12: `syntax`
344    pub syntax: ::core::option::Option<::buffa::alloc::string::String>,
345    /// The edition of the proto file.
346    /// WARNING: This field should only be used by protobuf plugins or special
347    /// cases like the proto compiler. Other uses are discouraged and
348    /// developers should rely on the protoreflect APIs for their client language.
349    ///
350    /// Field 14: `edition`
351    pub edition: ::core::option::Option<Edition>,
352    #[doc(hidden)]
353    pub __buffa_unknown_fields: ::buffa::UnknownFields,
354}
355impl ::core::fmt::Debug for FileDescriptorProto {
356    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
357        f.debug_struct("FileDescriptorProto")
358            .field("name", &self.name)
359            .field("package", &self.package)
360            .field("dependency", &self.dependency)
361            .field("public_dependency", &self.public_dependency)
362            .field("weak_dependency", &self.weak_dependency)
363            .field("option_dependency", &self.option_dependency)
364            .field("message_type", &self.message_type)
365            .field("enum_type", &self.enum_type)
366            .field("service", &self.service)
367            .field("extension", &self.extension)
368            .field("options", &self.options)
369            .field("source_code_info", &self.source_code_info)
370            .field("syntax", &self.syntax)
371            .field("edition", &self.edition)
372            .finish()
373    }
374}
375impl FileDescriptorProto {
376    /// Protobuf type URL for this message, for use with `Any::pack` and
377    /// `Any::unpack_if`.
378    ///
379    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
380    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FileDescriptorProto";
381}
382impl ::buffa::DefaultInstance for FileDescriptorProto {
383    fn default_instance() -> &'static Self {
384        static VALUE: ::buffa::__private::OnceBox<FileDescriptorProto> = ::buffa::__private::OnceBox::new();
385        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
386    }
387}
388impl ::buffa::Message for FileDescriptorProto {
389    /// Returns the total encoded size in bytes.
390    ///
391    /// The result is a `u32`; the protobuf specification requires all
392    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
393    /// compliant message will never overflow this type.
394    #[allow(clippy::let_and_return)]
395    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
396        #[allow(unused_imports)]
397        use ::buffa::Enumeration as _;
398        let mut size = 0u32;
399        if let Some(ref v) = self.name {
400            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
401        }
402        if let Some(ref v) = self.package {
403            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
404        }
405        for v in &self.dependency {
406            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
407        }
408        for v in &self.message_type {
409            let __slot = __cache.reserve();
410            let inner_size = v.compute_size(__cache);
411            __cache.set(__slot, inner_size);
412            size
413                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
414                    + inner_size;
415        }
416        for v in &self.enum_type {
417            let __slot = __cache.reserve();
418            let inner_size = v.compute_size(__cache);
419            __cache.set(__slot, inner_size);
420            size
421                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
422                    + inner_size;
423        }
424        for v in &self.service {
425            let __slot = __cache.reserve();
426            let inner_size = v.compute_size(__cache);
427            __cache.set(__slot, inner_size);
428            size
429                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
430                    + inner_size;
431        }
432        for v in &self.extension {
433            let __slot = __cache.reserve();
434            let inner_size = v.compute_size(__cache);
435            __cache.set(__slot, inner_size);
436            size
437                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
438                    + inner_size;
439        }
440        if self.options.is_set() {
441            let __slot = __cache.reserve();
442            let inner_size = self.options.compute_size(__cache);
443            __cache.set(__slot, inner_size);
444            size
445                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
446                    + inner_size;
447        }
448        if self.source_code_info.is_set() {
449            let __slot = __cache.reserve();
450            let inner_size = self.source_code_info.compute_size(__cache);
451            __cache.set(__slot, inner_size);
452            size
453                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
454                    + inner_size;
455        }
456        for v in &self.public_dependency {
457            size += 1u32 + ::buffa::types::int32_encoded_len(*v) as u32;
458        }
459        for v in &self.weak_dependency {
460            size += 1u32 + ::buffa::types::int32_encoded_len(*v) as u32;
461        }
462        if let Some(ref v) = self.syntax {
463            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
464        }
465        if let Some(ref v) = self.edition {
466            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
467        }
468        for v in &self.option_dependency {
469            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
470        }
471        size += self.__buffa_unknown_fields.encoded_len() as u32;
472        size
473    }
474    fn write_to(
475        &self,
476        __cache: &mut ::buffa::SizeCache,
477        buf: &mut impl ::buffa::bytes::BufMut,
478    ) {
479        #[allow(unused_imports)]
480        use ::buffa::Enumeration as _;
481        if let Some(ref v) = self.name {
482            ::buffa::encoding::Tag::new(
483                    1u32,
484                    ::buffa::encoding::WireType::LengthDelimited,
485                )
486                .encode(buf);
487            ::buffa::types::encode_string(v, buf);
488        }
489        if let Some(ref v) = self.package {
490            ::buffa::encoding::Tag::new(
491                    2u32,
492                    ::buffa::encoding::WireType::LengthDelimited,
493                )
494                .encode(buf);
495            ::buffa::types::encode_string(v, 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.message_type {
506            ::buffa::encoding::Tag::new(
507                    4u32,
508                    ::buffa::encoding::WireType::LengthDelimited,
509                )
510                .encode(buf);
511            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
512            v.write_to(__cache, buf);
513        }
514        for v in &self.enum_type {
515            ::buffa::encoding::Tag::new(
516                    5u32,
517                    ::buffa::encoding::WireType::LengthDelimited,
518                )
519                .encode(buf);
520            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
521            v.write_to(__cache, buf);
522        }
523        for v in &self.service {
524            ::buffa::encoding::Tag::new(
525                    6u32,
526                    ::buffa::encoding::WireType::LengthDelimited,
527                )
528                .encode(buf);
529            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
530            v.write_to(__cache, buf);
531        }
532        for v in &self.extension {
533            ::buffa::encoding::Tag::new(
534                    7u32,
535                    ::buffa::encoding::WireType::LengthDelimited,
536                )
537                .encode(buf);
538            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
539            v.write_to(__cache, buf);
540        }
541        if self.options.is_set() {
542            ::buffa::encoding::Tag::new(
543                    8u32,
544                    ::buffa::encoding::WireType::LengthDelimited,
545                )
546                .encode(buf);
547            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
548            self.options.write_to(__cache, buf);
549        }
550        if self.source_code_info.is_set() {
551            ::buffa::encoding::Tag::new(
552                    9u32,
553                    ::buffa::encoding::WireType::LengthDelimited,
554                )
555                .encode(buf);
556            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
557            self.source_code_info.write_to(__cache, buf);
558        }
559        for v in &self.public_dependency {
560            ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
561                .encode(buf);
562            ::buffa::types::encode_int32(*v, buf);
563        }
564        for v in &self.weak_dependency {
565            ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
566                .encode(buf);
567            ::buffa::types::encode_int32(*v, buf);
568        }
569        if let Some(ref v) = self.syntax {
570            ::buffa::encoding::Tag::new(
571                    12u32,
572                    ::buffa::encoding::WireType::LengthDelimited,
573                )
574                .encode(buf);
575            ::buffa::types::encode_string(v, buf);
576        }
577        if let Some(ref v) = self.edition {
578            ::buffa::encoding::Tag::new(14u32, ::buffa::encoding::WireType::Varint)
579                .encode(buf);
580            ::buffa::types::encode_int32(v.to_i32(), buf);
581        }
582        for v in &self.option_dependency {
583            ::buffa::encoding::Tag::new(
584                    15u32,
585                    ::buffa::encoding::WireType::LengthDelimited,
586                )
587                .encode(buf);
588            ::buffa::types::encode_string(v, buf);
589        }
590        self.__buffa_unknown_fields.write_to(buf);
591    }
592    fn merge_field(
593        &mut self,
594        tag: ::buffa::encoding::Tag,
595        buf: &mut impl ::buffa::bytes::Buf,
596        depth: u32,
597    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
598        #[allow(unused_imports)]
599        use ::buffa::bytes::Buf as _;
600        #[allow(unused_imports)]
601        use ::buffa::Enumeration as _;
602        match tag.field_number() {
603            1u32 => {
604                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
605                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
606                        field_number: 1u32,
607                        expected: 2u8,
608                        actual: tag.wire_type() as u8,
609                    });
610                }
611                ::buffa::types::merge_string(
612                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
613                    buf,
614                )?;
615            }
616            2u32 => {
617                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
618                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
619                        field_number: 2u32,
620                        expected: 2u8,
621                        actual: tag.wire_type() as u8,
622                    });
623                }
624                ::buffa::types::merge_string(
625                    self.package.get_or_insert_with(::buffa::alloc::string::String::new),
626                    buf,
627                )?;
628            }
629            3u32 => {
630                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
631                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
632                        field_number: 3u32,
633                        expected: 2u8,
634                        actual: tag.wire_type() as u8,
635                    });
636                }
637                self.dependency.push(::buffa::types::decode_string(buf)?);
638            }
639            4u32 => {
640                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
641                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
642                        field_number: 4u32,
643                        expected: 2u8,
644                        actual: tag.wire_type() as u8,
645                    });
646                }
647                let mut elem = ::core::default::Default::default();
648                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
649                self.message_type.push(elem);
650            }
651            5u32 => {
652                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
653                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
654                        field_number: 5u32,
655                        expected: 2u8,
656                        actual: tag.wire_type() as u8,
657                    });
658                }
659                let mut elem = ::core::default::Default::default();
660                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
661                self.enum_type.push(elem);
662            }
663            6u32 => {
664                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
665                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
666                        field_number: 6u32,
667                        expected: 2u8,
668                        actual: tag.wire_type() as u8,
669                    });
670                }
671                let mut elem = ::core::default::Default::default();
672                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
673                self.service.push(elem);
674            }
675            7u32 => {
676                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
677                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
678                        field_number: 7u32,
679                        expected: 2u8,
680                        actual: tag.wire_type() as u8,
681                    });
682                }
683                let mut elem = ::core::default::Default::default();
684                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
685                self.extension.push(elem);
686            }
687            8u32 => {
688                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
689                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
690                        field_number: 8u32,
691                        expected: 2u8,
692                        actual: tag.wire_type() as u8,
693                    });
694                }
695                ::buffa::Message::merge_length_delimited(
696                    self.options.get_or_insert_default(),
697                    buf,
698                    depth,
699                )?;
700            }
701            9u32 => {
702                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
703                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
704                        field_number: 9u32,
705                        expected: 2u8,
706                        actual: tag.wire_type() as u8,
707                    });
708                }
709                ::buffa::Message::merge_length_delimited(
710                    self.source_code_info.get_or_insert_default(),
711                    buf,
712                    depth,
713                )?;
714            }
715            10u32 => {
716                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
717                    let len = ::buffa::encoding::decode_varint(buf)?;
718                    let len = usize::try_from(len)
719                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
720                    if buf.remaining() < len {
721                        return ::core::result::Result::Err(
722                            ::buffa::DecodeError::UnexpectedEof,
723                        );
724                    }
725                    self.public_dependency.reserve(len);
726                    let mut limited = buf.take(len);
727                    while limited.has_remaining() {
728                        self.public_dependency
729                            .push(::buffa::types::decode_int32(&mut limited)?);
730                    }
731                    let leftover = limited.remaining();
732                    if leftover > 0 {
733                        limited.advance(leftover);
734                    }
735                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
736                    self.public_dependency.push(::buffa::types::decode_int32(buf)?);
737                } else {
738                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
739                        field_number: 10u32,
740                        expected: 2u8,
741                        actual: tag.wire_type() as u8,
742                    });
743                }
744            }
745            11u32 => {
746                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
747                    let len = ::buffa::encoding::decode_varint(buf)?;
748                    let len = usize::try_from(len)
749                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
750                    if buf.remaining() < len {
751                        return ::core::result::Result::Err(
752                            ::buffa::DecodeError::UnexpectedEof,
753                        );
754                    }
755                    self.weak_dependency.reserve(len);
756                    let mut limited = buf.take(len);
757                    while limited.has_remaining() {
758                        self.weak_dependency
759                            .push(::buffa::types::decode_int32(&mut limited)?);
760                    }
761                    let leftover = limited.remaining();
762                    if leftover > 0 {
763                        limited.advance(leftover);
764                    }
765                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
766                    self.weak_dependency.push(::buffa::types::decode_int32(buf)?);
767                } else {
768                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
769                        field_number: 11u32,
770                        expected: 2u8,
771                        actual: tag.wire_type() as u8,
772                    });
773                }
774            }
775            12u32 => {
776                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
777                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
778                        field_number: 12u32,
779                        expected: 2u8,
780                        actual: tag.wire_type() as u8,
781                    });
782                }
783                ::buffa::types::merge_string(
784                    self.syntax.get_or_insert_with(::buffa::alloc::string::String::new),
785                    buf,
786                )?;
787            }
788            14u32 => {
789                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
790                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
791                        field_number: 14u32,
792                        expected: 0u8,
793                        actual: tag.wire_type() as u8,
794                    });
795                }
796                let __raw = ::buffa::types::decode_int32(buf)?;
797                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
798                    __raw,
799                ) {
800                    self.edition = ::core::option::Option::Some(__v);
801                } else {
802                    self.__buffa_unknown_fields
803                        .push(::buffa::UnknownField {
804                            number: 14u32,
805                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
806                        });
807                }
808            }
809            15u32 => {
810                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
811                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
812                        field_number: 15u32,
813                        expected: 2u8,
814                        actual: tag.wire_type() as u8,
815                    });
816                }
817                self.option_dependency.push(::buffa::types::decode_string(buf)?);
818            }
819            _ => {
820                self.__buffa_unknown_fields
821                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
822            }
823        }
824        ::core::result::Result::Ok(())
825    }
826    fn clear(&mut self) {
827        self.name = ::core::option::Option::None;
828        self.package = ::core::option::Option::None;
829        self.dependency.clear();
830        self.message_type.clear();
831        self.enum_type.clear();
832        self.service.clear();
833        self.extension.clear();
834        self.options = ::buffa::MessageField::none();
835        self.source_code_info = ::buffa::MessageField::none();
836        self.public_dependency.clear();
837        self.weak_dependency.clear();
838        self.syntax = ::core::option::Option::None;
839        self.edition = ::core::option::Option::None;
840        self.option_dependency.clear();
841        self.__buffa_unknown_fields.clear();
842    }
843}
844impl ::buffa::ExtensionSet for FileDescriptorProto {
845    const PROTO_FQN: &'static str = "google.protobuf.FileDescriptorProto";
846    fn unknown_fields(&self) -> &::buffa::UnknownFields {
847        &self.__buffa_unknown_fields
848    }
849    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
850        &mut self.__buffa_unknown_fields
851    }
852}
853/// Describes a message type.
854#[derive(Clone, PartialEq, Default)]
855pub struct DescriptorProto {
856    /// Field 1: `name`
857    pub name: ::core::option::Option<::buffa::alloc::string::String>,
858    /// Field 2: `field`
859    pub field: ::buffa::alloc::vec::Vec<FieldDescriptorProto>,
860    /// Field 6: `extension`
861    pub extension: ::buffa::alloc::vec::Vec<FieldDescriptorProto>,
862    /// Field 3: `nested_type`
863    pub nested_type: ::buffa::alloc::vec::Vec<Self>,
864    /// Field 4: `enum_type`
865    pub enum_type: ::buffa::alloc::vec::Vec<EnumDescriptorProto>,
866    /// Field 5: `extension_range`
867    pub extension_range: ::buffa::alloc::vec::Vec<descriptor_proto::ExtensionRange>,
868    /// Field 8: `oneof_decl`
869    pub oneof_decl: ::buffa::alloc::vec::Vec<OneofDescriptorProto>,
870    /// Field 7: `options`
871    pub options: ::buffa::MessageField<MessageOptions>,
872    /// Field 9: `reserved_range`
873    pub reserved_range: ::buffa::alloc::vec::Vec<descriptor_proto::ReservedRange>,
874    /// Reserved field names, which may not be used by fields in the same message.
875    /// A given name may only be reserved once.
876    ///
877    /// Field 10: `reserved_name`
878    pub reserved_name: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
879    /// Support for `export` and `local` keywords on enums.
880    ///
881    /// Field 11: `visibility`
882    pub visibility: ::core::option::Option<SymbolVisibility>,
883    #[doc(hidden)]
884    pub __buffa_unknown_fields: ::buffa::UnknownFields,
885}
886impl ::core::fmt::Debug for DescriptorProto {
887    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
888        f.debug_struct("DescriptorProto")
889            .field("name", &self.name)
890            .field("field", &self.field)
891            .field("extension", &self.extension)
892            .field("nested_type", &self.nested_type)
893            .field("enum_type", &self.enum_type)
894            .field("extension_range", &self.extension_range)
895            .field("oneof_decl", &self.oneof_decl)
896            .field("options", &self.options)
897            .field("reserved_range", &self.reserved_range)
898            .field("reserved_name", &self.reserved_name)
899            .field("visibility", &self.visibility)
900            .finish()
901    }
902}
903impl DescriptorProto {
904    /// Protobuf type URL for this message, for use with `Any::pack` and
905    /// `Any::unpack_if`.
906    ///
907    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
908    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DescriptorProto";
909}
910impl ::buffa::DefaultInstance for DescriptorProto {
911    fn default_instance() -> &'static Self {
912        static VALUE: ::buffa::__private::OnceBox<DescriptorProto> = ::buffa::__private::OnceBox::new();
913        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
914    }
915}
916impl ::buffa::Message for DescriptorProto {
917    /// Returns the total encoded size in bytes.
918    ///
919    /// The result is a `u32`; the protobuf specification requires all
920    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
921    /// compliant message will never overflow this type.
922    #[allow(clippy::let_and_return)]
923    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
924        #[allow(unused_imports)]
925        use ::buffa::Enumeration as _;
926        let mut size = 0u32;
927        if let Some(ref v) = self.name {
928            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
929        }
930        for v in &self.field {
931            let __slot = __cache.reserve();
932            let inner_size = v.compute_size(__cache);
933            __cache.set(__slot, inner_size);
934            size
935                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
936                    + inner_size;
937        }
938        for v in &self.nested_type {
939            let __slot = __cache.reserve();
940            let inner_size = v.compute_size(__cache);
941            __cache.set(__slot, inner_size);
942            size
943                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
944                    + inner_size;
945        }
946        for v in &self.enum_type {
947            let __slot = __cache.reserve();
948            let inner_size = v.compute_size(__cache);
949            __cache.set(__slot, inner_size);
950            size
951                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
952                    + inner_size;
953        }
954        for v in &self.extension_range {
955            let __slot = __cache.reserve();
956            let inner_size = v.compute_size(__cache);
957            __cache.set(__slot, inner_size);
958            size
959                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
960                    + inner_size;
961        }
962        for v in &self.extension {
963            let __slot = __cache.reserve();
964            let inner_size = v.compute_size(__cache);
965            __cache.set(__slot, inner_size);
966            size
967                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
968                    + inner_size;
969        }
970        if self.options.is_set() {
971            let __slot = __cache.reserve();
972            let inner_size = self.options.compute_size(__cache);
973            __cache.set(__slot, inner_size);
974            size
975                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
976                    + inner_size;
977        }
978        for v in &self.oneof_decl {
979            let __slot = __cache.reserve();
980            let inner_size = v.compute_size(__cache);
981            __cache.set(__slot, inner_size);
982            size
983                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
984                    + inner_size;
985        }
986        for v in &self.reserved_range {
987            let __slot = __cache.reserve();
988            let inner_size = v.compute_size(__cache);
989            __cache.set(__slot, inner_size);
990            size
991                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
992                    + inner_size;
993        }
994        for v in &self.reserved_name {
995            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
996        }
997        if let Some(ref v) = self.visibility {
998            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
999        }
1000        size += self.__buffa_unknown_fields.encoded_len() as u32;
1001        size
1002    }
1003    fn write_to(
1004        &self,
1005        __cache: &mut ::buffa::SizeCache,
1006        buf: &mut impl ::buffa::bytes::BufMut,
1007    ) {
1008        #[allow(unused_imports)]
1009        use ::buffa::Enumeration as _;
1010        if let Some(ref v) = self.name {
1011            ::buffa::encoding::Tag::new(
1012                    1u32,
1013                    ::buffa::encoding::WireType::LengthDelimited,
1014                )
1015                .encode(buf);
1016            ::buffa::types::encode_string(v, buf);
1017        }
1018        for v in &self.field {
1019            ::buffa::encoding::Tag::new(
1020                    2u32,
1021                    ::buffa::encoding::WireType::LengthDelimited,
1022                )
1023                .encode(buf);
1024            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1025            v.write_to(__cache, buf);
1026        }
1027        for v in &self.nested_type {
1028            ::buffa::encoding::Tag::new(
1029                    3u32,
1030                    ::buffa::encoding::WireType::LengthDelimited,
1031                )
1032                .encode(buf);
1033            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1034            v.write_to(__cache, buf);
1035        }
1036        for v in &self.enum_type {
1037            ::buffa::encoding::Tag::new(
1038                    4u32,
1039                    ::buffa::encoding::WireType::LengthDelimited,
1040                )
1041                .encode(buf);
1042            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1043            v.write_to(__cache, buf);
1044        }
1045        for v in &self.extension_range {
1046            ::buffa::encoding::Tag::new(
1047                    5u32,
1048                    ::buffa::encoding::WireType::LengthDelimited,
1049                )
1050                .encode(buf);
1051            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1052            v.write_to(__cache, buf);
1053        }
1054        for v in &self.extension {
1055            ::buffa::encoding::Tag::new(
1056                    6u32,
1057                    ::buffa::encoding::WireType::LengthDelimited,
1058                )
1059                .encode(buf);
1060            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1061            v.write_to(__cache, buf);
1062        }
1063        if self.options.is_set() {
1064            ::buffa::encoding::Tag::new(
1065                    7u32,
1066                    ::buffa::encoding::WireType::LengthDelimited,
1067                )
1068                .encode(buf);
1069            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1070            self.options.write_to(__cache, buf);
1071        }
1072        for v in &self.oneof_decl {
1073            ::buffa::encoding::Tag::new(
1074                    8u32,
1075                    ::buffa::encoding::WireType::LengthDelimited,
1076                )
1077                .encode(buf);
1078            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1079            v.write_to(__cache, buf);
1080        }
1081        for v in &self.reserved_range {
1082            ::buffa::encoding::Tag::new(
1083                    9u32,
1084                    ::buffa::encoding::WireType::LengthDelimited,
1085                )
1086                .encode(buf);
1087            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1088            v.write_to(__cache, buf);
1089        }
1090        for v in &self.reserved_name {
1091            ::buffa::encoding::Tag::new(
1092                    10u32,
1093                    ::buffa::encoding::WireType::LengthDelimited,
1094                )
1095                .encode(buf);
1096            ::buffa::types::encode_string(v, buf);
1097        }
1098        if let Some(ref v) = self.visibility {
1099            ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
1100                .encode(buf);
1101            ::buffa::types::encode_int32(v.to_i32(), buf);
1102        }
1103        self.__buffa_unknown_fields.write_to(buf);
1104    }
1105    fn merge_field(
1106        &mut self,
1107        tag: ::buffa::encoding::Tag,
1108        buf: &mut impl ::buffa::bytes::Buf,
1109        depth: u32,
1110    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1111        #[allow(unused_imports)]
1112        use ::buffa::bytes::Buf as _;
1113        #[allow(unused_imports)]
1114        use ::buffa::Enumeration as _;
1115        match tag.field_number() {
1116            1u32 => {
1117                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1118                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1119                        field_number: 1u32,
1120                        expected: 2u8,
1121                        actual: tag.wire_type() as u8,
1122                    });
1123                }
1124                ::buffa::types::merge_string(
1125                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
1126                    buf,
1127                )?;
1128            }
1129            2u32 => {
1130                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1131                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1132                        field_number: 2u32,
1133                        expected: 2u8,
1134                        actual: tag.wire_type() as u8,
1135                    });
1136                }
1137                let mut elem = ::core::default::Default::default();
1138                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1139                self.field.push(elem);
1140            }
1141            3u32 => {
1142                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1143                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1144                        field_number: 3u32,
1145                        expected: 2u8,
1146                        actual: tag.wire_type() as u8,
1147                    });
1148                }
1149                let mut elem = ::core::default::Default::default();
1150                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1151                self.nested_type.push(elem);
1152            }
1153            4u32 => {
1154                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1155                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1156                        field_number: 4u32,
1157                        expected: 2u8,
1158                        actual: tag.wire_type() as u8,
1159                    });
1160                }
1161                let mut elem = ::core::default::Default::default();
1162                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1163                self.enum_type.push(elem);
1164            }
1165            5u32 => {
1166                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1167                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1168                        field_number: 5u32,
1169                        expected: 2u8,
1170                        actual: tag.wire_type() as u8,
1171                    });
1172                }
1173                let mut elem = ::core::default::Default::default();
1174                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1175                self.extension_range.push(elem);
1176            }
1177            6u32 => {
1178                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1179                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1180                        field_number: 6u32,
1181                        expected: 2u8,
1182                        actual: tag.wire_type() as u8,
1183                    });
1184                }
1185                let mut elem = ::core::default::Default::default();
1186                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1187                self.extension.push(elem);
1188            }
1189            7u32 => {
1190                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1191                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1192                        field_number: 7u32,
1193                        expected: 2u8,
1194                        actual: tag.wire_type() as u8,
1195                    });
1196                }
1197                ::buffa::Message::merge_length_delimited(
1198                    self.options.get_or_insert_default(),
1199                    buf,
1200                    depth,
1201                )?;
1202            }
1203            8u32 => {
1204                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1205                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1206                        field_number: 8u32,
1207                        expected: 2u8,
1208                        actual: tag.wire_type() as u8,
1209                    });
1210                }
1211                let mut elem = ::core::default::Default::default();
1212                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1213                self.oneof_decl.push(elem);
1214            }
1215            9u32 => {
1216                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1217                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1218                        field_number: 9u32,
1219                        expected: 2u8,
1220                        actual: tag.wire_type() as u8,
1221                    });
1222                }
1223                let mut elem = ::core::default::Default::default();
1224                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1225                self.reserved_range.push(elem);
1226            }
1227            10u32 => {
1228                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1229                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1230                        field_number: 10u32,
1231                        expected: 2u8,
1232                        actual: tag.wire_type() as u8,
1233                    });
1234                }
1235                self.reserved_name.push(::buffa::types::decode_string(buf)?);
1236            }
1237            11u32 => {
1238                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1239                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1240                        field_number: 11u32,
1241                        expected: 0u8,
1242                        actual: tag.wire_type() as u8,
1243                    });
1244                }
1245                let __raw = ::buffa::types::decode_int32(buf)?;
1246                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
1247                    __raw,
1248                ) {
1249                    self.visibility = ::core::option::Option::Some(__v);
1250                } else {
1251                    self.__buffa_unknown_fields
1252                        .push(::buffa::UnknownField {
1253                            number: 11u32,
1254                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
1255                        });
1256                }
1257            }
1258            _ => {
1259                self.__buffa_unknown_fields
1260                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1261            }
1262        }
1263        ::core::result::Result::Ok(())
1264    }
1265    fn clear(&mut self) {
1266        self.name = ::core::option::Option::None;
1267        self.field.clear();
1268        self.nested_type.clear();
1269        self.enum_type.clear();
1270        self.extension_range.clear();
1271        self.extension.clear();
1272        self.options = ::buffa::MessageField::none();
1273        self.oneof_decl.clear();
1274        self.reserved_range.clear();
1275        self.reserved_name.clear();
1276        self.visibility = ::core::option::Option::None;
1277        self.__buffa_unknown_fields.clear();
1278    }
1279}
1280impl ::buffa::ExtensionSet for DescriptorProto {
1281    const PROTO_FQN: &'static str = "google.protobuf.DescriptorProto";
1282    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1283        &self.__buffa_unknown_fields
1284    }
1285    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1286        &mut self.__buffa_unknown_fields
1287    }
1288}
1289pub mod descriptor_proto {
1290    #[allow(unused_imports)]
1291    use super::*;
1292    #[derive(Clone, PartialEq, Default)]
1293    pub struct ExtensionRange {
1294        /// Inclusive.
1295        ///
1296        /// Field 1: `start`
1297        pub start: ::core::option::Option<i32>,
1298        /// Exclusive.
1299        ///
1300        /// Field 2: `end`
1301        pub end: ::core::option::Option<i32>,
1302        /// Field 3: `options`
1303        pub options: ::buffa::MessageField<super::ExtensionRangeOptions>,
1304        #[doc(hidden)]
1305        pub __buffa_unknown_fields: ::buffa::UnknownFields,
1306    }
1307    impl ::core::fmt::Debug for ExtensionRange {
1308        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1309            f.debug_struct("ExtensionRange")
1310                .field("start", &self.start)
1311                .field("end", &self.end)
1312                .field("options", &self.options)
1313                .finish()
1314        }
1315    }
1316    impl ExtensionRange {
1317        /// Protobuf type URL for this message, for use with `Any::pack` and
1318        /// `Any::unpack_if`.
1319        ///
1320        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1321        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DescriptorProto.ExtensionRange";
1322    }
1323    impl ::buffa::DefaultInstance for ExtensionRange {
1324        fn default_instance() -> &'static Self {
1325            static VALUE: ::buffa::__private::OnceBox<ExtensionRange> = ::buffa::__private::OnceBox::new();
1326            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1327        }
1328    }
1329    impl ::buffa::Message for ExtensionRange {
1330        /// Returns the total encoded size in bytes.
1331        ///
1332        /// The result is a `u32`; the protobuf specification requires all
1333        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1334        /// compliant message will never overflow this type.
1335        #[allow(clippy::let_and_return)]
1336        fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1337            #[allow(unused_imports)]
1338            use ::buffa::Enumeration as _;
1339            let mut size = 0u32;
1340            if let Some(v) = self.start {
1341                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1342            }
1343            if let Some(v) = self.end {
1344                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1345            }
1346            if self.options.is_set() {
1347                let __slot = __cache.reserve();
1348                let inner_size = self.options.compute_size(__cache);
1349                __cache.set(__slot, inner_size);
1350                size
1351                    += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1352                        + inner_size;
1353            }
1354            size += self.__buffa_unknown_fields.encoded_len() as u32;
1355            size
1356        }
1357        fn write_to(
1358            &self,
1359            __cache: &mut ::buffa::SizeCache,
1360            buf: &mut impl ::buffa::bytes::BufMut,
1361        ) {
1362            #[allow(unused_imports)]
1363            use ::buffa::Enumeration as _;
1364            if let Some(v) = self.start {
1365                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1366                    .encode(buf);
1367                ::buffa::types::encode_int32(v, buf);
1368            }
1369            if let Some(v) = self.end {
1370                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1371                    .encode(buf);
1372                ::buffa::types::encode_int32(v, buf);
1373            }
1374            if self.options.is_set() {
1375                ::buffa::encoding::Tag::new(
1376                        3u32,
1377                        ::buffa::encoding::WireType::LengthDelimited,
1378                    )
1379                    .encode(buf);
1380                ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1381                self.options.write_to(__cache, buf);
1382            }
1383            self.__buffa_unknown_fields.write_to(buf);
1384        }
1385        fn merge_field(
1386            &mut self,
1387            tag: ::buffa::encoding::Tag,
1388            buf: &mut impl ::buffa::bytes::Buf,
1389            depth: u32,
1390        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1391            #[allow(unused_imports)]
1392            use ::buffa::bytes::Buf as _;
1393            #[allow(unused_imports)]
1394            use ::buffa::Enumeration as _;
1395            match tag.field_number() {
1396                1u32 => {
1397                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1398                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1399                            field_number: 1u32,
1400                            expected: 0u8,
1401                            actual: tag.wire_type() as u8,
1402                        });
1403                    }
1404                    self.start = ::core::option::Option::Some(
1405                        ::buffa::types::decode_int32(buf)?,
1406                    );
1407                }
1408                2u32 => {
1409                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1410                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1411                            field_number: 2u32,
1412                            expected: 0u8,
1413                            actual: tag.wire_type() as u8,
1414                        });
1415                    }
1416                    self.end = ::core::option::Option::Some(
1417                        ::buffa::types::decode_int32(buf)?,
1418                    );
1419                }
1420                3u32 => {
1421                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1422                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1423                            field_number: 3u32,
1424                            expected: 2u8,
1425                            actual: tag.wire_type() as u8,
1426                        });
1427                    }
1428                    ::buffa::Message::merge_length_delimited(
1429                        self.options.get_or_insert_default(),
1430                        buf,
1431                        depth,
1432                    )?;
1433                }
1434                _ => {
1435                    self.__buffa_unknown_fields
1436                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1437                }
1438            }
1439            ::core::result::Result::Ok(())
1440        }
1441        fn clear(&mut self) {
1442            self.start = ::core::option::Option::None;
1443            self.end = ::core::option::Option::None;
1444            self.options = ::buffa::MessageField::none();
1445            self.__buffa_unknown_fields.clear();
1446        }
1447    }
1448    impl ::buffa::ExtensionSet for ExtensionRange {
1449        const PROTO_FQN: &'static str = "google.protobuf.DescriptorProto.ExtensionRange";
1450        fn unknown_fields(&self) -> &::buffa::UnknownFields {
1451            &self.__buffa_unknown_fields
1452        }
1453        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1454            &mut self.__buffa_unknown_fields
1455        }
1456    }
1457    /// Range of reserved tag numbers. Reserved tag numbers may not be used by
1458    /// fields or extension ranges in the same message. Reserved ranges may
1459    /// not overlap.
1460    #[derive(Clone, PartialEq, Default)]
1461    pub struct ReservedRange {
1462        /// Inclusive.
1463        ///
1464        /// Field 1: `start`
1465        pub start: ::core::option::Option<i32>,
1466        /// Exclusive.
1467        ///
1468        /// Field 2: `end`
1469        pub end: ::core::option::Option<i32>,
1470        #[doc(hidden)]
1471        pub __buffa_unknown_fields: ::buffa::UnknownFields,
1472    }
1473    impl ::core::fmt::Debug for ReservedRange {
1474        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1475            f.debug_struct("ReservedRange")
1476                .field("start", &self.start)
1477                .field("end", &self.end)
1478                .finish()
1479        }
1480    }
1481    impl ReservedRange {
1482        /// Protobuf type URL for this message, for use with `Any::pack` and
1483        /// `Any::unpack_if`.
1484        ///
1485        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1486        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DescriptorProto.ReservedRange";
1487    }
1488    impl ::buffa::DefaultInstance for ReservedRange {
1489        fn default_instance() -> &'static Self {
1490            static VALUE: ::buffa::__private::OnceBox<ReservedRange> = ::buffa::__private::OnceBox::new();
1491            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1492        }
1493    }
1494    impl ::buffa::Message for ReservedRange {
1495        /// Returns the total encoded size in bytes.
1496        ///
1497        /// The result is a `u32`; the protobuf specification requires all
1498        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1499        /// compliant message will never overflow this type.
1500        #[allow(clippy::let_and_return)]
1501        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1502            #[allow(unused_imports)]
1503            use ::buffa::Enumeration as _;
1504            let mut size = 0u32;
1505            if let Some(v) = self.start {
1506                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1507            }
1508            if let Some(v) = self.end {
1509                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1510            }
1511            size += self.__buffa_unknown_fields.encoded_len() as u32;
1512            size
1513        }
1514        fn write_to(
1515            &self,
1516            _cache: &mut ::buffa::SizeCache,
1517            buf: &mut impl ::buffa::bytes::BufMut,
1518        ) {
1519            #[allow(unused_imports)]
1520            use ::buffa::Enumeration as _;
1521            if let Some(v) = self.start {
1522                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1523                    .encode(buf);
1524                ::buffa::types::encode_int32(v, buf);
1525            }
1526            if let Some(v) = self.end {
1527                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1528                    .encode(buf);
1529                ::buffa::types::encode_int32(v, buf);
1530            }
1531            self.__buffa_unknown_fields.write_to(buf);
1532        }
1533        fn merge_field(
1534            &mut self,
1535            tag: ::buffa::encoding::Tag,
1536            buf: &mut impl ::buffa::bytes::Buf,
1537            depth: u32,
1538        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1539            #[allow(unused_imports)]
1540            use ::buffa::bytes::Buf as _;
1541            #[allow(unused_imports)]
1542            use ::buffa::Enumeration as _;
1543            match tag.field_number() {
1544                1u32 => {
1545                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1546                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1547                            field_number: 1u32,
1548                            expected: 0u8,
1549                            actual: tag.wire_type() as u8,
1550                        });
1551                    }
1552                    self.start = ::core::option::Option::Some(
1553                        ::buffa::types::decode_int32(buf)?,
1554                    );
1555                }
1556                2u32 => {
1557                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1558                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1559                            field_number: 2u32,
1560                            expected: 0u8,
1561                            actual: tag.wire_type() as u8,
1562                        });
1563                    }
1564                    self.end = ::core::option::Option::Some(
1565                        ::buffa::types::decode_int32(buf)?,
1566                    );
1567                }
1568                _ => {
1569                    self.__buffa_unknown_fields
1570                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1571                }
1572            }
1573            ::core::result::Result::Ok(())
1574        }
1575        fn clear(&mut self) {
1576            self.start = ::core::option::Option::None;
1577            self.end = ::core::option::Option::None;
1578            self.__buffa_unknown_fields.clear();
1579        }
1580    }
1581    impl ::buffa::ExtensionSet for ReservedRange {
1582        const PROTO_FQN: &'static str = "google.protobuf.DescriptorProto.ReservedRange";
1583        fn unknown_fields(&self) -> &::buffa::UnknownFields {
1584            &self.__buffa_unknown_fields
1585        }
1586        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1587            &mut self.__buffa_unknown_fields
1588        }
1589    }
1590}
1591#[derive(Clone, PartialEq, Default)]
1592pub struct ExtensionRangeOptions {
1593    /// The parser stores options it doesn't recognize here. See above.
1594    ///
1595    /// Field 999: `uninterpreted_option`
1596    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
1597    /// For external users: DO NOT USE. We are in the process of open sourcing
1598    /// extension declaration and executing internal cleanups before it can be
1599    /// used externally.
1600    ///
1601    /// Field 2: `declaration`
1602    pub declaration: ::buffa::alloc::vec::Vec<extension_range_options::Declaration>,
1603    /// Any features defined in the specific edition.
1604    ///
1605    /// Field 50: `features`
1606    pub features: ::buffa::MessageField<FeatureSet>,
1607    /// The verification state of the range.
1608    /// TODO: flip the default to DECLARATION once all empty ranges
1609    /// are marked as UNVERIFIED.
1610    ///
1611    /// Field 3: `verification`
1612    pub verification: ::core::option::Option<extension_range_options::VerificationState>,
1613    #[doc(hidden)]
1614    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1615}
1616impl ::core::fmt::Debug for ExtensionRangeOptions {
1617    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1618        f.debug_struct("ExtensionRangeOptions")
1619            .field("uninterpreted_option", &self.uninterpreted_option)
1620            .field("declaration", &self.declaration)
1621            .field("features", &self.features)
1622            .field("verification", &self.verification)
1623            .finish()
1624    }
1625}
1626impl ExtensionRangeOptions {
1627    /// Protobuf type URL for this message, for use with `Any::pack` and
1628    /// `Any::unpack_if`.
1629    ///
1630    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1631    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.ExtensionRangeOptions";
1632}
1633impl ::buffa::DefaultInstance for ExtensionRangeOptions {
1634    fn default_instance() -> &'static Self {
1635        static VALUE: ::buffa::__private::OnceBox<ExtensionRangeOptions> = ::buffa::__private::OnceBox::new();
1636        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1637    }
1638}
1639impl ::buffa::Message for ExtensionRangeOptions {
1640    /// Returns the total encoded size in bytes.
1641    ///
1642    /// The result is a `u32`; the protobuf specification requires all
1643    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1644    /// compliant message will never overflow this type.
1645    #[allow(clippy::let_and_return)]
1646    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1647        #[allow(unused_imports)]
1648        use ::buffa::Enumeration as _;
1649        let mut size = 0u32;
1650        for v in &self.declaration {
1651            let __slot = __cache.reserve();
1652            let inner_size = v.compute_size(__cache);
1653            __cache.set(__slot, inner_size);
1654            size
1655                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1656                    + inner_size;
1657        }
1658        if let Some(ref v) = self.verification {
1659            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
1660        }
1661        if self.features.is_set() {
1662            let __slot = __cache.reserve();
1663            let inner_size = self.features.compute_size(__cache);
1664            __cache.set(__slot, inner_size);
1665            size
1666                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1667                    + inner_size;
1668        }
1669        for v in &self.uninterpreted_option {
1670            let __slot = __cache.reserve();
1671            let inner_size = v.compute_size(__cache);
1672            __cache.set(__slot, inner_size);
1673            size
1674                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1675                    + inner_size;
1676        }
1677        size += self.__buffa_unknown_fields.encoded_len() as u32;
1678        size
1679    }
1680    fn write_to(
1681        &self,
1682        __cache: &mut ::buffa::SizeCache,
1683        buf: &mut impl ::buffa::bytes::BufMut,
1684    ) {
1685        #[allow(unused_imports)]
1686        use ::buffa::Enumeration as _;
1687        for v in &self.declaration {
1688            ::buffa::encoding::Tag::new(
1689                    2u32,
1690                    ::buffa::encoding::WireType::LengthDelimited,
1691                )
1692                .encode(buf);
1693            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1694            v.write_to(__cache, buf);
1695        }
1696        if let Some(ref v) = self.verification {
1697            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
1698                .encode(buf);
1699            ::buffa::types::encode_int32(v.to_i32(), buf);
1700        }
1701        if self.features.is_set() {
1702            ::buffa::encoding::Tag::new(
1703                    50u32,
1704                    ::buffa::encoding::WireType::LengthDelimited,
1705                )
1706                .encode(buf);
1707            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1708            self.features.write_to(__cache, buf);
1709        }
1710        for v in &self.uninterpreted_option {
1711            ::buffa::encoding::Tag::new(
1712                    999u32,
1713                    ::buffa::encoding::WireType::LengthDelimited,
1714                )
1715                .encode(buf);
1716            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1717            v.write_to(__cache, buf);
1718        }
1719        self.__buffa_unknown_fields.write_to(buf);
1720    }
1721    fn merge_field(
1722        &mut self,
1723        tag: ::buffa::encoding::Tag,
1724        buf: &mut impl ::buffa::bytes::Buf,
1725        depth: u32,
1726    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1727        #[allow(unused_imports)]
1728        use ::buffa::bytes::Buf as _;
1729        #[allow(unused_imports)]
1730        use ::buffa::Enumeration as _;
1731        match tag.field_number() {
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            3u32 => {
1745                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1746                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1747                        field_number: 3u32,
1748                        expected: 0u8,
1749                        actual: tag.wire_type() as u8,
1750                    });
1751                }
1752                let __raw = ::buffa::types::decode_int32(buf)?;
1753                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
1754                    __raw,
1755                ) {
1756                    self.verification = ::core::option::Option::Some(__v);
1757                } else {
1758                    self.__buffa_unknown_fields
1759                        .push(::buffa::UnknownField {
1760                            number: 3u32,
1761                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
1762                        });
1763                }
1764            }
1765            50u32 => {
1766                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1767                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1768                        field_number: 50u32,
1769                        expected: 2u8,
1770                        actual: tag.wire_type() as u8,
1771                    });
1772                }
1773                ::buffa::Message::merge_length_delimited(
1774                    self.features.get_or_insert_default(),
1775                    buf,
1776                    depth,
1777                )?;
1778            }
1779            999u32 => {
1780                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1781                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1782                        field_number: 999u32,
1783                        expected: 2u8,
1784                        actual: tag.wire_type() as u8,
1785                    });
1786                }
1787                let mut elem = ::core::default::Default::default();
1788                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1789                self.uninterpreted_option.push(elem);
1790            }
1791            _ => {
1792                self.__buffa_unknown_fields
1793                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1794            }
1795        }
1796        ::core::result::Result::Ok(())
1797    }
1798    fn clear(&mut self) {
1799        self.declaration.clear();
1800        self.verification = ::core::option::Option::None;
1801        self.features = ::buffa::MessageField::none();
1802        self.uninterpreted_option.clear();
1803        self.__buffa_unknown_fields.clear();
1804    }
1805}
1806impl ::buffa::ExtensionSet for ExtensionRangeOptions {
1807    const PROTO_FQN: &'static str = "google.protobuf.ExtensionRangeOptions";
1808    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1809        &self.__buffa_unknown_fields
1810    }
1811    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1812        &mut self.__buffa_unknown_fields
1813    }
1814}
1815pub mod extension_range_options {
1816    #[allow(unused_imports)]
1817    use super::*;
1818    /// The verification state of the extension range.
1819    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1820    #[repr(i32)]
1821    pub enum VerificationState {
1822        /// All the extensions of the range must be declared.
1823        DECLARATION = 0i32,
1824        UNVERIFIED = 1i32,
1825    }
1826    impl ::core::default::Default for VerificationState {
1827        fn default() -> Self {
1828            Self::DECLARATION
1829        }
1830    }
1831    impl ::buffa::Enumeration for VerificationState {
1832        fn from_i32(value: i32) -> ::core::option::Option<Self> {
1833            match value {
1834                0i32 => ::core::option::Option::Some(Self::DECLARATION),
1835                1i32 => ::core::option::Option::Some(Self::UNVERIFIED),
1836                _ => ::core::option::Option::None,
1837            }
1838        }
1839        fn to_i32(&self) -> i32 {
1840            *self as i32
1841        }
1842        fn proto_name(&self) -> &'static str {
1843            match self {
1844                Self::DECLARATION => "DECLARATION",
1845                Self::UNVERIFIED => "UNVERIFIED",
1846            }
1847        }
1848        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1849            match name {
1850                "DECLARATION" => ::core::option::Option::Some(Self::DECLARATION),
1851                "UNVERIFIED" => ::core::option::Option::Some(Self::UNVERIFIED),
1852                _ => ::core::option::Option::None,
1853            }
1854        }
1855        fn values() -> &'static [Self] {
1856            &[Self::DECLARATION, Self::UNVERIFIED]
1857        }
1858    }
1859    #[derive(Clone, PartialEq, Default)]
1860    pub struct Declaration {
1861        /// The extension number declared within the extension range.
1862        ///
1863        /// Field 1: `number`
1864        pub number: ::core::option::Option<i32>,
1865        /// The fully-qualified name of the extension field. There must be a leading
1866        /// dot in front of the full name.
1867        ///
1868        /// Field 2: `full_name`
1869        pub full_name: ::core::option::Option<::buffa::alloc::string::String>,
1870        /// The fully-qualified type name of the extension field. Unlike
1871        /// Metadata.type, Declaration.type must have a leading dot for messages
1872        /// and enums.
1873        ///
1874        /// Field 3: `type`
1875        pub r#type: ::core::option::Option<::buffa::alloc::string::String>,
1876        /// If true, indicates that the number is reserved in the extension range,
1877        /// and any extension field with the number will fail to compile. Set this
1878        /// when a declared extension field is deleted.
1879        ///
1880        /// Field 5: `reserved`
1881        pub reserved: ::core::option::Option<bool>,
1882        /// If true, indicates that the extension must be defined as repeated.
1883        /// Otherwise the extension must be defined as optional.
1884        ///
1885        /// Field 6: `repeated`
1886        pub repeated: ::core::option::Option<bool>,
1887        #[doc(hidden)]
1888        pub __buffa_unknown_fields: ::buffa::UnknownFields,
1889    }
1890    impl ::core::fmt::Debug for Declaration {
1891        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1892            f.debug_struct("Declaration")
1893                .field("number", &self.number)
1894                .field("full_name", &self.full_name)
1895                .field("r#type", &self.r#type)
1896                .field("reserved", &self.reserved)
1897                .field("repeated", &self.repeated)
1898                .finish()
1899        }
1900    }
1901    impl Declaration {
1902        /// Protobuf type URL for this message, for use with `Any::pack` and
1903        /// `Any::unpack_if`.
1904        ///
1905        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1906        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.ExtensionRangeOptions.Declaration";
1907    }
1908    impl ::buffa::DefaultInstance for Declaration {
1909        fn default_instance() -> &'static Self {
1910            static VALUE: ::buffa::__private::OnceBox<Declaration> = ::buffa::__private::OnceBox::new();
1911            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1912        }
1913    }
1914    impl ::buffa::Message for Declaration {
1915        /// Returns the total encoded size in bytes.
1916        ///
1917        /// The result is a `u32`; the protobuf specification requires all
1918        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1919        /// compliant message will never overflow this type.
1920        #[allow(clippy::let_and_return)]
1921        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1922            #[allow(unused_imports)]
1923            use ::buffa::Enumeration as _;
1924            let mut size = 0u32;
1925            if let Some(v) = self.number {
1926                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1927            }
1928            if let Some(ref v) = self.full_name {
1929                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1930            }
1931            if let Some(ref v) = self.r#type {
1932                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1933            }
1934            if self.reserved.is_some() {
1935                size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1936            }
1937            if self.repeated.is_some() {
1938                size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1939            }
1940            size += self.__buffa_unknown_fields.encoded_len() as u32;
1941            size
1942        }
1943        fn write_to(
1944            &self,
1945            _cache: &mut ::buffa::SizeCache,
1946            buf: &mut impl ::buffa::bytes::BufMut,
1947        ) {
1948            #[allow(unused_imports)]
1949            use ::buffa::Enumeration as _;
1950            if let Some(v) = self.number {
1951                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1952                    .encode(buf);
1953                ::buffa::types::encode_int32(v, buf);
1954            }
1955            if let Some(ref v) = self.full_name {
1956                ::buffa::encoding::Tag::new(
1957                        2u32,
1958                        ::buffa::encoding::WireType::LengthDelimited,
1959                    )
1960                    .encode(buf);
1961                ::buffa::types::encode_string(v, buf);
1962            }
1963            if let Some(ref v) = self.r#type {
1964                ::buffa::encoding::Tag::new(
1965                        3u32,
1966                        ::buffa::encoding::WireType::LengthDelimited,
1967                    )
1968                    .encode(buf);
1969                ::buffa::types::encode_string(v, buf);
1970            }
1971            if let Some(v) = self.reserved {
1972                ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
1973                    .encode(buf);
1974                ::buffa::types::encode_bool(v, buf);
1975            }
1976            if let Some(v) = self.repeated {
1977                ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
1978                    .encode(buf);
1979                ::buffa::types::encode_bool(v, buf);
1980            }
1981            self.__buffa_unknown_fields.write_to(buf);
1982        }
1983        fn merge_field(
1984            &mut self,
1985            tag: ::buffa::encoding::Tag,
1986            buf: &mut impl ::buffa::bytes::Buf,
1987            depth: u32,
1988        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1989            #[allow(unused_imports)]
1990            use ::buffa::bytes::Buf as _;
1991            #[allow(unused_imports)]
1992            use ::buffa::Enumeration as _;
1993            match tag.field_number() {
1994                1u32 => {
1995                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1996                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1997                            field_number: 1u32,
1998                            expected: 0u8,
1999                            actual: tag.wire_type() as u8,
2000                        });
2001                    }
2002                    self.number = ::core::option::Option::Some(
2003                        ::buffa::types::decode_int32(buf)?,
2004                    );
2005                }
2006                2u32 => {
2007                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2008                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2009                            field_number: 2u32,
2010                            expected: 2u8,
2011                            actual: tag.wire_type() as u8,
2012                        });
2013                    }
2014                    ::buffa::types::merge_string(
2015                        self
2016                            .full_name
2017                            .get_or_insert_with(::buffa::alloc::string::String::new),
2018                        buf,
2019                    )?;
2020                }
2021                3u32 => {
2022                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2023                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2024                            field_number: 3u32,
2025                            expected: 2u8,
2026                            actual: tag.wire_type() as u8,
2027                        });
2028                    }
2029                    ::buffa::types::merge_string(
2030                        self
2031                            .r#type
2032                            .get_or_insert_with(::buffa::alloc::string::String::new),
2033                        buf,
2034                    )?;
2035                }
2036                5u32 => {
2037                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2038                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2039                            field_number: 5u32,
2040                            expected: 0u8,
2041                            actual: tag.wire_type() as u8,
2042                        });
2043                    }
2044                    self.reserved = ::core::option::Option::Some(
2045                        ::buffa::types::decode_bool(buf)?,
2046                    );
2047                }
2048                6u32 => {
2049                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2050                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2051                            field_number: 6u32,
2052                            expected: 0u8,
2053                            actual: tag.wire_type() as u8,
2054                        });
2055                    }
2056                    self.repeated = ::core::option::Option::Some(
2057                        ::buffa::types::decode_bool(buf)?,
2058                    );
2059                }
2060                _ => {
2061                    self.__buffa_unknown_fields
2062                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2063                }
2064            }
2065            ::core::result::Result::Ok(())
2066        }
2067        fn clear(&mut self) {
2068            self.number = ::core::option::Option::None;
2069            self.full_name = ::core::option::Option::None;
2070            self.r#type = ::core::option::Option::None;
2071            self.reserved = ::core::option::Option::None;
2072            self.repeated = ::core::option::Option::None;
2073            self.__buffa_unknown_fields.clear();
2074        }
2075    }
2076    impl ::buffa::ExtensionSet for Declaration {
2077        const PROTO_FQN: &'static str = "google.protobuf.ExtensionRangeOptions.Declaration";
2078        fn unknown_fields(&self) -> &::buffa::UnknownFields {
2079            &self.__buffa_unknown_fields
2080        }
2081        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2082            &mut self.__buffa_unknown_fields
2083        }
2084    }
2085}
2086/// Describes a field within a message.
2087#[derive(Clone, PartialEq, Default)]
2088pub struct FieldDescriptorProto {
2089    /// Field 1: `name`
2090    pub name: ::core::option::Option<::buffa::alloc::string::String>,
2091    /// Field 3: `number`
2092    pub number: ::core::option::Option<i32>,
2093    /// Field 4: `label`
2094    pub label: ::core::option::Option<field_descriptor_proto::Label>,
2095    /// If type_name is set, this need not be set.  If both this and type_name
2096    /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
2097    ///
2098    /// Field 5: `type`
2099    pub r#type: ::core::option::Option<field_descriptor_proto::Type>,
2100    /// For message and enum types, this is the name of the type.  If the name
2101    /// starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
2102    /// rules are used to find the type (i.e. first the nested types within this
2103    /// message are searched, then within the parent, on up to the root
2104    /// namespace).
2105    ///
2106    /// Field 6: `type_name`
2107    pub type_name: ::core::option::Option<::buffa::alloc::string::String>,
2108    /// For extensions, this is the name of the type being extended.  It is
2109    /// resolved in the same manner as type_name.
2110    ///
2111    /// Field 2: `extendee`
2112    pub extendee: ::core::option::Option<::buffa::alloc::string::String>,
2113    /// For numeric types, contains the original text representation of the value.
2114    /// For booleans, "true" or "false".
2115    /// For strings, contains the default text contents (not escaped in any way).
2116    /// For bytes, contains the C escaped value.  All bytes \>= 128 are escaped.
2117    ///
2118    /// Field 7: `default_value`
2119    pub default_value: ::core::option::Option<::buffa::alloc::string::String>,
2120    /// If set, gives the index of a oneof in the containing type's oneof_decl
2121    /// list.  This field is a member of that oneof.
2122    ///
2123    /// Field 9: `oneof_index`
2124    pub oneof_index: ::core::option::Option<i32>,
2125    /// JSON name of this field. The value is set by protocol compiler. If the
2126    /// user has set a "json_name" option on this field, that option's value
2127    /// will be used. Otherwise, it's deduced from the field's name by converting
2128    /// it to camelCase.
2129    ///
2130    /// Field 10: `json_name`
2131    pub json_name: ::core::option::Option<::buffa::alloc::string::String>,
2132    /// Field 8: `options`
2133    pub options: ::buffa::MessageField<FieldOptions>,
2134    /// If true, this is a proto3 "optional". When a proto3 field is optional, it
2135    /// tracks presence regardless of field type.
2136    ///
2137    /// When proto3_optional is true, this field must belong to a oneof to signal
2138    /// to old proto3 clients that presence is tracked for this field. This oneof
2139    /// is known as a "synthetic" oneof, and this field must be its sole member
2140    /// (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
2141    /// exist in the descriptor only, and do not generate any API. Synthetic oneofs
2142    /// must be ordered after all "real" oneofs.
2143    ///
2144    /// For message fields, proto3_optional doesn't create any semantic change,
2145    /// since non-repeated message fields always track presence. However it still
2146    /// indicates the semantic detail of whether the user wrote "optional" or not.
2147    /// This can be useful for round-tripping the .proto file. For consistency we
2148    /// give message fields a synthetic oneof also, even though it is not required
2149    /// to track presence. This is especially important because the parser can't
2150    /// tell if a field is a message or an enum, so it must always create a
2151    /// synthetic oneof.
2152    ///
2153    /// Proto2 optional fields do not set this flag, because they already indicate
2154    /// optional with `LABEL_OPTIONAL`.
2155    ///
2156    /// Field 17: `proto3_optional`
2157    pub proto3_optional: ::core::option::Option<bool>,
2158    #[doc(hidden)]
2159    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2160}
2161impl ::core::fmt::Debug for FieldDescriptorProto {
2162    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2163        f.debug_struct("FieldDescriptorProto")
2164            .field("name", &self.name)
2165            .field("number", &self.number)
2166            .field("label", &self.label)
2167            .field("r#type", &self.r#type)
2168            .field("type_name", &self.type_name)
2169            .field("extendee", &self.extendee)
2170            .field("default_value", &self.default_value)
2171            .field("oneof_index", &self.oneof_index)
2172            .field("json_name", &self.json_name)
2173            .field("options", &self.options)
2174            .field("proto3_optional", &self.proto3_optional)
2175            .finish()
2176    }
2177}
2178impl FieldDescriptorProto {
2179    /// Protobuf type URL for this message, for use with `Any::pack` and
2180    /// `Any::unpack_if`.
2181    ///
2182    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2183    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FieldDescriptorProto";
2184}
2185impl ::buffa::DefaultInstance for FieldDescriptorProto {
2186    fn default_instance() -> &'static Self {
2187        static VALUE: ::buffa::__private::OnceBox<FieldDescriptorProto> = ::buffa::__private::OnceBox::new();
2188        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2189    }
2190}
2191impl ::buffa::Message for FieldDescriptorProto {
2192    /// Returns the total encoded size in bytes.
2193    ///
2194    /// The result is a `u32`; the protobuf specification requires all
2195    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2196    /// compliant message will never overflow this type.
2197    #[allow(clippy::let_and_return)]
2198    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2199        #[allow(unused_imports)]
2200        use ::buffa::Enumeration as _;
2201        let mut size = 0u32;
2202        if let Some(ref v) = self.name {
2203            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2204        }
2205        if let Some(ref v) = self.extendee {
2206            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2207        }
2208        if let Some(v) = self.number {
2209            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
2210        }
2211        if let Some(ref v) = self.label {
2212            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2213        }
2214        if let Some(ref v) = self.r#type {
2215            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2216        }
2217        if let Some(ref v) = self.type_name {
2218            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2219        }
2220        if let Some(ref v) = self.default_value {
2221            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2222        }
2223        if self.options.is_set() {
2224            let __slot = __cache.reserve();
2225            let inner_size = self.options.compute_size(__cache);
2226            __cache.set(__slot, inner_size);
2227            size
2228                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2229                    + inner_size;
2230        }
2231        if let Some(v) = self.oneof_index {
2232            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
2233        }
2234        if let Some(ref v) = self.json_name {
2235            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2236        }
2237        if self.proto3_optional.is_some() {
2238            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2239        }
2240        size += self.__buffa_unknown_fields.encoded_len() as u32;
2241        size
2242    }
2243    fn write_to(
2244        &self,
2245        __cache: &mut ::buffa::SizeCache,
2246        buf: &mut impl ::buffa::bytes::BufMut,
2247    ) {
2248        #[allow(unused_imports)]
2249        use ::buffa::Enumeration as _;
2250        if let Some(ref v) = self.name {
2251            ::buffa::encoding::Tag::new(
2252                    1u32,
2253                    ::buffa::encoding::WireType::LengthDelimited,
2254                )
2255                .encode(buf);
2256            ::buffa::types::encode_string(v, buf);
2257        }
2258        if let Some(ref v) = self.extendee {
2259            ::buffa::encoding::Tag::new(
2260                    2u32,
2261                    ::buffa::encoding::WireType::LengthDelimited,
2262                )
2263                .encode(buf);
2264            ::buffa::types::encode_string(v, buf);
2265        }
2266        if let Some(v) = self.number {
2267            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
2268                .encode(buf);
2269            ::buffa::types::encode_int32(v, buf);
2270        }
2271        if let Some(ref v) = self.label {
2272            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
2273                .encode(buf);
2274            ::buffa::types::encode_int32(v.to_i32(), buf);
2275        }
2276        if let Some(ref v) = self.r#type {
2277            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
2278                .encode(buf);
2279            ::buffa::types::encode_int32(v.to_i32(), buf);
2280        }
2281        if let Some(ref v) = self.type_name {
2282            ::buffa::encoding::Tag::new(
2283                    6u32,
2284                    ::buffa::encoding::WireType::LengthDelimited,
2285                )
2286                .encode(buf);
2287            ::buffa::types::encode_string(v, buf);
2288        }
2289        if let Some(ref v) = self.default_value {
2290            ::buffa::encoding::Tag::new(
2291                    7u32,
2292                    ::buffa::encoding::WireType::LengthDelimited,
2293                )
2294                .encode(buf);
2295            ::buffa::types::encode_string(v, buf);
2296        }
2297        if self.options.is_set() {
2298            ::buffa::encoding::Tag::new(
2299                    8u32,
2300                    ::buffa::encoding::WireType::LengthDelimited,
2301                )
2302                .encode(buf);
2303            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2304            self.options.write_to(__cache, buf);
2305        }
2306        if let Some(v) = self.oneof_index {
2307            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
2308                .encode(buf);
2309            ::buffa::types::encode_int32(v, buf);
2310        }
2311        if let Some(ref v) = self.json_name {
2312            ::buffa::encoding::Tag::new(
2313                    10u32,
2314                    ::buffa::encoding::WireType::LengthDelimited,
2315                )
2316                .encode(buf);
2317            ::buffa::types::encode_string(v, buf);
2318        }
2319        if let Some(v) = self.proto3_optional {
2320            ::buffa::encoding::Tag::new(17u32, ::buffa::encoding::WireType::Varint)
2321                .encode(buf);
2322            ::buffa::types::encode_bool(v, buf);
2323        }
2324        self.__buffa_unknown_fields.write_to(buf);
2325    }
2326    fn merge_field(
2327        &mut self,
2328        tag: ::buffa::encoding::Tag,
2329        buf: &mut impl ::buffa::bytes::Buf,
2330        depth: u32,
2331    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2332        #[allow(unused_imports)]
2333        use ::buffa::bytes::Buf as _;
2334        #[allow(unused_imports)]
2335        use ::buffa::Enumeration as _;
2336        match tag.field_number() {
2337            1u32 => {
2338                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2339                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2340                        field_number: 1u32,
2341                        expected: 2u8,
2342                        actual: tag.wire_type() as u8,
2343                    });
2344                }
2345                ::buffa::types::merge_string(
2346                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
2347                    buf,
2348                )?;
2349            }
2350            2u32 => {
2351                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2352                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2353                        field_number: 2u32,
2354                        expected: 2u8,
2355                        actual: tag.wire_type() as u8,
2356                    });
2357                }
2358                ::buffa::types::merge_string(
2359                    self
2360                        .extendee
2361                        .get_or_insert_with(::buffa::alloc::string::String::new),
2362                    buf,
2363                )?;
2364            }
2365            3u32 => {
2366                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2367                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2368                        field_number: 3u32,
2369                        expected: 0u8,
2370                        actual: tag.wire_type() as u8,
2371                    });
2372                }
2373                self.number = ::core::option::Option::Some(
2374                    ::buffa::types::decode_int32(buf)?,
2375                );
2376            }
2377            4u32 => {
2378                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2379                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2380                        field_number: 4u32,
2381                        expected: 0u8,
2382                        actual: tag.wire_type() as u8,
2383                    });
2384                }
2385                let __raw = ::buffa::types::decode_int32(buf)?;
2386                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
2387                    __raw,
2388                ) {
2389                    self.label = ::core::option::Option::Some(__v);
2390                } else {
2391                    self.__buffa_unknown_fields
2392                        .push(::buffa::UnknownField {
2393                            number: 4u32,
2394                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
2395                        });
2396                }
2397            }
2398            5u32 => {
2399                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2400                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2401                        field_number: 5u32,
2402                        expected: 0u8,
2403                        actual: tag.wire_type() as u8,
2404                    });
2405                }
2406                let __raw = ::buffa::types::decode_int32(buf)?;
2407                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
2408                    __raw,
2409                ) {
2410                    self.r#type = ::core::option::Option::Some(__v);
2411                } else {
2412                    self.__buffa_unknown_fields
2413                        .push(::buffa::UnknownField {
2414                            number: 5u32,
2415                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
2416                        });
2417                }
2418            }
2419            6u32 => {
2420                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2421                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2422                        field_number: 6u32,
2423                        expected: 2u8,
2424                        actual: tag.wire_type() as u8,
2425                    });
2426                }
2427                ::buffa::types::merge_string(
2428                    self
2429                        .type_name
2430                        .get_or_insert_with(::buffa::alloc::string::String::new),
2431                    buf,
2432                )?;
2433            }
2434            7u32 => {
2435                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2436                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2437                        field_number: 7u32,
2438                        expected: 2u8,
2439                        actual: tag.wire_type() as u8,
2440                    });
2441                }
2442                ::buffa::types::merge_string(
2443                    self
2444                        .default_value
2445                        .get_or_insert_with(::buffa::alloc::string::String::new),
2446                    buf,
2447                )?;
2448            }
2449            8u32 => {
2450                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2451                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2452                        field_number: 8u32,
2453                        expected: 2u8,
2454                        actual: tag.wire_type() as u8,
2455                    });
2456                }
2457                ::buffa::Message::merge_length_delimited(
2458                    self.options.get_or_insert_default(),
2459                    buf,
2460                    depth,
2461                )?;
2462            }
2463            9u32 => {
2464                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2465                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2466                        field_number: 9u32,
2467                        expected: 0u8,
2468                        actual: tag.wire_type() as u8,
2469                    });
2470                }
2471                self.oneof_index = ::core::option::Option::Some(
2472                    ::buffa::types::decode_int32(buf)?,
2473                );
2474            }
2475            10u32 => {
2476                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2477                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2478                        field_number: 10u32,
2479                        expected: 2u8,
2480                        actual: tag.wire_type() as u8,
2481                    });
2482                }
2483                ::buffa::types::merge_string(
2484                    self
2485                        .json_name
2486                        .get_or_insert_with(::buffa::alloc::string::String::new),
2487                    buf,
2488                )?;
2489            }
2490            17u32 => {
2491                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2492                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2493                        field_number: 17u32,
2494                        expected: 0u8,
2495                        actual: tag.wire_type() as u8,
2496                    });
2497                }
2498                self.proto3_optional = ::core::option::Option::Some(
2499                    ::buffa::types::decode_bool(buf)?,
2500                );
2501            }
2502            _ => {
2503                self.__buffa_unknown_fields
2504                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2505            }
2506        }
2507        ::core::result::Result::Ok(())
2508    }
2509    fn clear(&mut self) {
2510        self.name = ::core::option::Option::None;
2511        self.extendee = ::core::option::Option::None;
2512        self.number = ::core::option::Option::None;
2513        self.label = ::core::option::Option::None;
2514        self.r#type = ::core::option::Option::None;
2515        self.type_name = ::core::option::Option::None;
2516        self.default_value = ::core::option::Option::None;
2517        self.options = ::buffa::MessageField::none();
2518        self.oneof_index = ::core::option::Option::None;
2519        self.json_name = ::core::option::Option::None;
2520        self.proto3_optional = ::core::option::Option::None;
2521        self.__buffa_unknown_fields.clear();
2522    }
2523}
2524impl ::buffa::ExtensionSet for FieldDescriptorProto {
2525    const PROTO_FQN: &'static str = "google.protobuf.FieldDescriptorProto";
2526    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2527        &self.__buffa_unknown_fields
2528    }
2529    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2530        &mut self.__buffa_unknown_fields
2531    }
2532}
2533pub mod field_descriptor_proto {
2534    #[allow(unused_imports)]
2535    use super::*;
2536    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2537    #[repr(i32)]
2538    pub enum Type {
2539        /// 0 is reserved for errors.
2540        /// Order is weird for historical reasons.
2541        TYPE_DOUBLE = 1i32,
2542        TYPE_FLOAT = 2i32,
2543        /// Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if
2544        /// negative values are likely.
2545        TYPE_INT64 = 3i32,
2546        TYPE_UINT64 = 4i32,
2547        /// Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if
2548        /// negative values are likely.
2549        TYPE_INT32 = 5i32,
2550        TYPE_FIXED64 = 6i32,
2551        TYPE_FIXED32 = 7i32,
2552        TYPE_BOOL = 8i32,
2553        TYPE_STRING = 9i32,
2554        /// Tag-delimited aggregate.
2555        /// Group type is deprecated and not supported after google.protobuf. However, Proto3
2556        /// implementations should still be able to parse the group wire format and
2557        /// treat group fields as unknown fields.  In Editions, the group wire format
2558        /// can be enabled via the `message_encoding` feature.
2559        TYPE_GROUP = 10i32,
2560        /// Length-delimited aggregate.
2561        TYPE_MESSAGE = 11i32,
2562        /// New in version 2.
2563        TYPE_BYTES = 12i32,
2564        TYPE_UINT32 = 13i32,
2565        TYPE_ENUM = 14i32,
2566        TYPE_SFIXED32 = 15i32,
2567        TYPE_SFIXED64 = 16i32,
2568        /// Uses ZigZag encoding.
2569        TYPE_SINT32 = 17i32,
2570        /// Uses ZigZag encoding.
2571        TYPE_SINT64 = 18i32,
2572    }
2573    impl ::core::default::Default for Type {
2574        fn default() -> Self {
2575            Self::TYPE_DOUBLE
2576        }
2577    }
2578    impl ::buffa::Enumeration for Type {
2579        fn from_i32(value: i32) -> ::core::option::Option<Self> {
2580            match value {
2581                1i32 => ::core::option::Option::Some(Self::TYPE_DOUBLE),
2582                2i32 => ::core::option::Option::Some(Self::TYPE_FLOAT),
2583                3i32 => ::core::option::Option::Some(Self::TYPE_INT64),
2584                4i32 => ::core::option::Option::Some(Self::TYPE_UINT64),
2585                5i32 => ::core::option::Option::Some(Self::TYPE_INT32),
2586                6i32 => ::core::option::Option::Some(Self::TYPE_FIXED64),
2587                7i32 => ::core::option::Option::Some(Self::TYPE_FIXED32),
2588                8i32 => ::core::option::Option::Some(Self::TYPE_BOOL),
2589                9i32 => ::core::option::Option::Some(Self::TYPE_STRING),
2590                10i32 => ::core::option::Option::Some(Self::TYPE_GROUP),
2591                11i32 => ::core::option::Option::Some(Self::TYPE_MESSAGE),
2592                12i32 => ::core::option::Option::Some(Self::TYPE_BYTES),
2593                13i32 => ::core::option::Option::Some(Self::TYPE_UINT32),
2594                14i32 => ::core::option::Option::Some(Self::TYPE_ENUM),
2595                15i32 => ::core::option::Option::Some(Self::TYPE_SFIXED32),
2596                16i32 => ::core::option::Option::Some(Self::TYPE_SFIXED64),
2597                17i32 => ::core::option::Option::Some(Self::TYPE_SINT32),
2598                18i32 => ::core::option::Option::Some(Self::TYPE_SINT64),
2599                _ => ::core::option::Option::None,
2600            }
2601        }
2602        fn to_i32(&self) -> i32 {
2603            *self as i32
2604        }
2605        fn proto_name(&self) -> &'static str {
2606            match self {
2607                Self::TYPE_DOUBLE => "TYPE_DOUBLE",
2608                Self::TYPE_FLOAT => "TYPE_FLOAT",
2609                Self::TYPE_INT64 => "TYPE_INT64",
2610                Self::TYPE_UINT64 => "TYPE_UINT64",
2611                Self::TYPE_INT32 => "TYPE_INT32",
2612                Self::TYPE_FIXED64 => "TYPE_FIXED64",
2613                Self::TYPE_FIXED32 => "TYPE_FIXED32",
2614                Self::TYPE_BOOL => "TYPE_BOOL",
2615                Self::TYPE_STRING => "TYPE_STRING",
2616                Self::TYPE_GROUP => "TYPE_GROUP",
2617                Self::TYPE_MESSAGE => "TYPE_MESSAGE",
2618                Self::TYPE_BYTES => "TYPE_BYTES",
2619                Self::TYPE_UINT32 => "TYPE_UINT32",
2620                Self::TYPE_ENUM => "TYPE_ENUM",
2621                Self::TYPE_SFIXED32 => "TYPE_SFIXED32",
2622                Self::TYPE_SFIXED64 => "TYPE_SFIXED64",
2623                Self::TYPE_SINT32 => "TYPE_SINT32",
2624                Self::TYPE_SINT64 => "TYPE_SINT64",
2625            }
2626        }
2627        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2628            match name {
2629                "TYPE_DOUBLE" => ::core::option::Option::Some(Self::TYPE_DOUBLE),
2630                "TYPE_FLOAT" => ::core::option::Option::Some(Self::TYPE_FLOAT),
2631                "TYPE_INT64" => ::core::option::Option::Some(Self::TYPE_INT64),
2632                "TYPE_UINT64" => ::core::option::Option::Some(Self::TYPE_UINT64),
2633                "TYPE_INT32" => ::core::option::Option::Some(Self::TYPE_INT32),
2634                "TYPE_FIXED64" => ::core::option::Option::Some(Self::TYPE_FIXED64),
2635                "TYPE_FIXED32" => ::core::option::Option::Some(Self::TYPE_FIXED32),
2636                "TYPE_BOOL" => ::core::option::Option::Some(Self::TYPE_BOOL),
2637                "TYPE_STRING" => ::core::option::Option::Some(Self::TYPE_STRING),
2638                "TYPE_GROUP" => ::core::option::Option::Some(Self::TYPE_GROUP),
2639                "TYPE_MESSAGE" => ::core::option::Option::Some(Self::TYPE_MESSAGE),
2640                "TYPE_BYTES" => ::core::option::Option::Some(Self::TYPE_BYTES),
2641                "TYPE_UINT32" => ::core::option::Option::Some(Self::TYPE_UINT32),
2642                "TYPE_ENUM" => ::core::option::Option::Some(Self::TYPE_ENUM),
2643                "TYPE_SFIXED32" => ::core::option::Option::Some(Self::TYPE_SFIXED32),
2644                "TYPE_SFIXED64" => ::core::option::Option::Some(Self::TYPE_SFIXED64),
2645                "TYPE_SINT32" => ::core::option::Option::Some(Self::TYPE_SINT32),
2646                "TYPE_SINT64" => ::core::option::Option::Some(Self::TYPE_SINT64),
2647                _ => ::core::option::Option::None,
2648            }
2649        }
2650        fn values() -> &'static [Self] {
2651            &[
2652                Self::TYPE_DOUBLE,
2653                Self::TYPE_FLOAT,
2654                Self::TYPE_INT64,
2655                Self::TYPE_UINT64,
2656                Self::TYPE_INT32,
2657                Self::TYPE_FIXED64,
2658                Self::TYPE_FIXED32,
2659                Self::TYPE_BOOL,
2660                Self::TYPE_STRING,
2661                Self::TYPE_GROUP,
2662                Self::TYPE_MESSAGE,
2663                Self::TYPE_BYTES,
2664                Self::TYPE_UINT32,
2665                Self::TYPE_ENUM,
2666                Self::TYPE_SFIXED32,
2667                Self::TYPE_SFIXED64,
2668                Self::TYPE_SINT32,
2669                Self::TYPE_SINT64,
2670            ]
2671        }
2672    }
2673    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2674    #[repr(i32)]
2675    pub enum Label {
2676        /// 0 is reserved for errors
2677        LABEL_OPTIONAL = 1i32,
2678        LABEL_REPEATED = 3i32,
2679        /// The required label is only allowed in google.protobuf.  In proto3 and Editions
2680        /// it's explicitly prohibited.  In Editions, the `field_presence` feature
2681        /// can be used to get this behavior.
2682        LABEL_REQUIRED = 2i32,
2683    }
2684    impl ::core::default::Default for Label {
2685        fn default() -> Self {
2686            Self::LABEL_OPTIONAL
2687        }
2688    }
2689    impl ::buffa::Enumeration for Label {
2690        fn from_i32(value: i32) -> ::core::option::Option<Self> {
2691            match value {
2692                1i32 => ::core::option::Option::Some(Self::LABEL_OPTIONAL),
2693                3i32 => ::core::option::Option::Some(Self::LABEL_REPEATED),
2694                2i32 => ::core::option::Option::Some(Self::LABEL_REQUIRED),
2695                _ => ::core::option::Option::None,
2696            }
2697        }
2698        fn to_i32(&self) -> i32 {
2699            *self as i32
2700        }
2701        fn proto_name(&self) -> &'static str {
2702            match self {
2703                Self::LABEL_OPTIONAL => "LABEL_OPTIONAL",
2704                Self::LABEL_REPEATED => "LABEL_REPEATED",
2705                Self::LABEL_REQUIRED => "LABEL_REQUIRED",
2706            }
2707        }
2708        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2709            match name {
2710                "LABEL_OPTIONAL" => ::core::option::Option::Some(Self::LABEL_OPTIONAL),
2711                "LABEL_REPEATED" => ::core::option::Option::Some(Self::LABEL_REPEATED),
2712                "LABEL_REQUIRED" => ::core::option::Option::Some(Self::LABEL_REQUIRED),
2713                _ => ::core::option::Option::None,
2714            }
2715        }
2716        fn values() -> &'static [Self] {
2717            &[Self::LABEL_OPTIONAL, Self::LABEL_REPEATED, Self::LABEL_REQUIRED]
2718        }
2719    }
2720}
2721/// Describes a oneof.
2722#[derive(Clone, PartialEq, Default)]
2723pub struct OneofDescriptorProto {
2724    /// Field 1: `name`
2725    pub name: ::core::option::Option<::buffa::alloc::string::String>,
2726    /// Field 2: `options`
2727    pub options: ::buffa::MessageField<OneofOptions>,
2728    #[doc(hidden)]
2729    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2730}
2731impl ::core::fmt::Debug for OneofDescriptorProto {
2732    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2733        f.debug_struct("OneofDescriptorProto")
2734            .field("name", &self.name)
2735            .field("options", &self.options)
2736            .finish()
2737    }
2738}
2739impl OneofDescriptorProto {
2740    /// Protobuf type URL for this message, for use with `Any::pack` and
2741    /// `Any::unpack_if`.
2742    ///
2743    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2744    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.OneofDescriptorProto";
2745}
2746impl ::buffa::DefaultInstance for OneofDescriptorProto {
2747    fn default_instance() -> &'static Self {
2748        static VALUE: ::buffa::__private::OnceBox<OneofDescriptorProto> = ::buffa::__private::OnceBox::new();
2749        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2750    }
2751}
2752impl ::buffa::Message for OneofDescriptorProto {
2753    /// Returns the total encoded size in bytes.
2754    ///
2755    /// The result is a `u32`; the protobuf specification requires all
2756    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2757    /// compliant message will never overflow this type.
2758    #[allow(clippy::let_and_return)]
2759    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2760        #[allow(unused_imports)]
2761        use ::buffa::Enumeration as _;
2762        let mut size = 0u32;
2763        if let Some(ref v) = self.name {
2764            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2765        }
2766        if self.options.is_set() {
2767            let __slot = __cache.reserve();
2768            let inner_size = self.options.compute_size(__cache);
2769            __cache.set(__slot, inner_size);
2770            size
2771                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2772                    + inner_size;
2773        }
2774        size += self.__buffa_unknown_fields.encoded_len() as u32;
2775        size
2776    }
2777    fn write_to(
2778        &self,
2779        __cache: &mut ::buffa::SizeCache,
2780        buf: &mut impl ::buffa::bytes::BufMut,
2781    ) {
2782        #[allow(unused_imports)]
2783        use ::buffa::Enumeration as _;
2784        if let Some(ref v) = self.name {
2785            ::buffa::encoding::Tag::new(
2786                    1u32,
2787                    ::buffa::encoding::WireType::LengthDelimited,
2788                )
2789                .encode(buf);
2790            ::buffa::types::encode_string(v, buf);
2791        }
2792        if self.options.is_set() {
2793            ::buffa::encoding::Tag::new(
2794                    2u32,
2795                    ::buffa::encoding::WireType::LengthDelimited,
2796                )
2797                .encode(buf);
2798            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2799            self.options.write_to(__cache, buf);
2800        }
2801        self.__buffa_unknown_fields.write_to(buf);
2802    }
2803    fn merge_field(
2804        &mut self,
2805        tag: ::buffa::encoding::Tag,
2806        buf: &mut impl ::buffa::bytes::Buf,
2807        depth: u32,
2808    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2809        #[allow(unused_imports)]
2810        use ::buffa::bytes::Buf as _;
2811        #[allow(unused_imports)]
2812        use ::buffa::Enumeration as _;
2813        match tag.field_number() {
2814            1u32 => {
2815                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2816                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2817                        field_number: 1u32,
2818                        expected: 2u8,
2819                        actual: tag.wire_type() as u8,
2820                    });
2821                }
2822                ::buffa::types::merge_string(
2823                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
2824                    buf,
2825                )?;
2826            }
2827            2u32 => {
2828                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2829                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2830                        field_number: 2u32,
2831                        expected: 2u8,
2832                        actual: tag.wire_type() as u8,
2833                    });
2834                }
2835                ::buffa::Message::merge_length_delimited(
2836                    self.options.get_or_insert_default(),
2837                    buf,
2838                    depth,
2839                )?;
2840            }
2841            _ => {
2842                self.__buffa_unknown_fields
2843                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2844            }
2845        }
2846        ::core::result::Result::Ok(())
2847    }
2848    fn clear(&mut self) {
2849        self.name = ::core::option::Option::None;
2850        self.options = ::buffa::MessageField::none();
2851        self.__buffa_unknown_fields.clear();
2852    }
2853}
2854impl ::buffa::ExtensionSet for OneofDescriptorProto {
2855    const PROTO_FQN: &'static str = "google.protobuf.OneofDescriptorProto";
2856    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2857        &self.__buffa_unknown_fields
2858    }
2859    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2860        &mut self.__buffa_unknown_fields
2861    }
2862}
2863/// Describes an enum type.
2864#[derive(Clone, PartialEq, Default)]
2865pub struct EnumDescriptorProto {
2866    /// Field 1: `name`
2867    pub name: ::core::option::Option<::buffa::alloc::string::String>,
2868    /// Field 2: `value`
2869    pub value: ::buffa::alloc::vec::Vec<EnumValueDescriptorProto>,
2870    /// Field 3: `options`
2871    pub options: ::buffa::MessageField<EnumOptions>,
2872    /// Range of reserved numeric values. Reserved numeric values may not be used
2873    /// by enum values in the same enum declaration. Reserved ranges may not
2874    /// overlap.
2875    ///
2876    /// Field 4: `reserved_range`
2877    pub reserved_range: ::buffa::alloc::vec::Vec<
2878        enum_descriptor_proto::EnumReservedRange,
2879    >,
2880    /// Reserved enum value names, which may not be reused. A given name may only
2881    /// be reserved once.
2882    ///
2883    /// Field 5: `reserved_name`
2884    pub reserved_name: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
2885    /// Support for `export` and `local` keywords on enums.
2886    ///
2887    /// Field 6: `visibility`
2888    pub visibility: ::core::option::Option<SymbolVisibility>,
2889    #[doc(hidden)]
2890    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2891}
2892impl ::core::fmt::Debug for EnumDescriptorProto {
2893    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2894        f.debug_struct("EnumDescriptorProto")
2895            .field("name", &self.name)
2896            .field("value", &self.value)
2897            .field("options", &self.options)
2898            .field("reserved_range", &self.reserved_range)
2899            .field("reserved_name", &self.reserved_name)
2900            .field("visibility", &self.visibility)
2901            .finish()
2902    }
2903}
2904impl EnumDescriptorProto {
2905    /// Protobuf type URL for this message, for use with `Any::pack` and
2906    /// `Any::unpack_if`.
2907    ///
2908    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2909    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumDescriptorProto";
2910}
2911impl ::buffa::DefaultInstance for EnumDescriptorProto {
2912    fn default_instance() -> &'static Self {
2913        static VALUE: ::buffa::__private::OnceBox<EnumDescriptorProto> = ::buffa::__private::OnceBox::new();
2914        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2915    }
2916}
2917impl ::buffa::Message for EnumDescriptorProto {
2918    /// Returns the total encoded size in bytes.
2919    ///
2920    /// The result is a `u32`; the protobuf specification requires all
2921    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2922    /// compliant message will never overflow this type.
2923    #[allow(clippy::let_and_return)]
2924    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2925        #[allow(unused_imports)]
2926        use ::buffa::Enumeration as _;
2927        let mut size = 0u32;
2928        if let Some(ref v) = self.name {
2929            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2930        }
2931        for v in &self.value {
2932            let __slot = __cache.reserve();
2933            let inner_size = v.compute_size(__cache);
2934            __cache.set(__slot, inner_size);
2935            size
2936                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2937                    + inner_size;
2938        }
2939        if self.options.is_set() {
2940            let __slot = __cache.reserve();
2941            let inner_size = self.options.compute_size(__cache);
2942            __cache.set(__slot, inner_size);
2943            size
2944                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2945                    + inner_size;
2946        }
2947        for v in &self.reserved_range {
2948            let __slot = __cache.reserve();
2949            let inner_size = v.compute_size(__cache);
2950            __cache.set(__slot, inner_size);
2951            size
2952                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2953                    + inner_size;
2954        }
2955        for v in &self.reserved_name {
2956            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2957        }
2958        if let Some(ref v) = self.visibility {
2959            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2960        }
2961        size += self.__buffa_unknown_fields.encoded_len() as u32;
2962        size
2963    }
2964    fn write_to(
2965        &self,
2966        __cache: &mut ::buffa::SizeCache,
2967        buf: &mut impl ::buffa::bytes::BufMut,
2968    ) {
2969        #[allow(unused_imports)]
2970        use ::buffa::Enumeration as _;
2971        if let Some(ref v) = self.name {
2972            ::buffa::encoding::Tag::new(
2973                    1u32,
2974                    ::buffa::encoding::WireType::LengthDelimited,
2975                )
2976                .encode(buf);
2977            ::buffa::types::encode_string(v, buf);
2978        }
2979        for v in &self.value {
2980            ::buffa::encoding::Tag::new(
2981                    2u32,
2982                    ::buffa::encoding::WireType::LengthDelimited,
2983                )
2984                .encode(buf);
2985            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2986            v.write_to(__cache, buf);
2987        }
2988        if self.options.is_set() {
2989            ::buffa::encoding::Tag::new(
2990                    3u32,
2991                    ::buffa::encoding::WireType::LengthDelimited,
2992                )
2993                .encode(buf);
2994            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2995            self.options.write_to(__cache, buf);
2996        }
2997        for v in &self.reserved_range {
2998            ::buffa::encoding::Tag::new(
2999                    4u32,
3000                    ::buffa::encoding::WireType::LengthDelimited,
3001                )
3002                .encode(buf);
3003            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3004            v.write_to(__cache, buf);
3005        }
3006        for v in &self.reserved_name {
3007            ::buffa::encoding::Tag::new(
3008                    5u32,
3009                    ::buffa::encoding::WireType::LengthDelimited,
3010                )
3011                .encode(buf);
3012            ::buffa::types::encode_string(v, buf);
3013        }
3014        if let Some(ref v) = self.visibility {
3015            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
3016                .encode(buf);
3017            ::buffa::types::encode_int32(v.to_i32(), buf);
3018        }
3019        self.__buffa_unknown_fields.write_to(buf);
3020    }
3021    fn merge_field(
3022        &mut self,
3023        tag: ::buffa::encoding::Tag,
3024        buf: &mut impl ::buffa::bytes::Buf,
3025        depth: u32,
3026    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3027        #[allow(unused_imports)]
3028        use ::buffa::bytes::Buf as _;
3029        #[allow(unused_imports)]
3030        use ::buffa::Enumeration as _;
3031        match tag.field_number() {
3032            1u32 => {
3033                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3034                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3035                        field_number: 1u32,
3036                        expected: 2u8,
3037                        actual: tag.wire_type() as u8,
3038                    });
3039                }
3040                ::buffa::types::merge_string(
3041                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
3042                    buf,
3043                )?;
3044            }
3045            2u32 => {
3046                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3047                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3048                        field_number: 2u32,
3049                        expected: 2u8,
3050                        actual: tag.wire_type() as u8,
3051                    });
3052                }
3053                let mut elem = ::core::default::Default::default();
3054                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3055                self.value.push(elem);
3056            }
3057            3u32 => {
3058                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3059                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3060                        field_number: 3u32,
3061                        expected: 2u8,
3062                        actual: tag.wire_type() as u8,
3063                    });
3064                }
3065                ::buffa::Message::merge_length_delimited(
3066                    self.options.get_or_insert_default(),
3067                    buf,
3068                    depth,
3069                )?;
3070            }
3071            4u32 => {
3072                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3073                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3074                        field_number: 4u32,
3075                        expected: 2u8,
3076                        actual: tag.wire_type() as u8,
3077                    });
3078                }
3079                let mut elem = ::core::default::Default::default();
3080                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3081                self.reserved_range.push(elem);
3082            }
3083            5u32 => {
3084                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3085                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3086                        field_number: 5u32,
3087                        expected: 2u8,
3088                        actual: tag.wire_type() as u8,
3089                    });
3090                }
3091                self.reserved_name.push(::buffa::types::decode_string(buf)?);
3092            }
3093            6u32 => {
3094                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3095                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3096                        field_number: 6u32,
3097                        expected: 0u8,
3098                        actual: tag.wire_type() as u8,
3099                    });
3100                }
3101                let __raw = ::buffa::types::decode_int32(buf)?;
3102                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
3103                    __raw,
3104                ) {
3105                    self.visibility = ::core::option::Option::Some(__v);
3106                } else {
3107                    self.__buffa_unknown_fields
3108                        .push(::buffa::UnknownField {
3109                            number: 6u32,
3110                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
3111                        });
3112                }
3113            }
3114            _ => {
3115                self.__buffa_unknown_fields
3116                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3117            }
3118        }
3119        ::core::result::Result::Ok(())
3120    }
3121    fn clear(&mut self) {
3122        self.name = ::core::option::Option::None;
3123        self.value.clear();
3124        self.options = ::buffa::MessageField::none();
3125        self.reserved_range.clear();
3126        self.reserved_name.clear();
3127        self.visibility = ::core::option::Option::None;
3128        self.__buffa_unknown_fields.clear();
3129    }
3130}
3131impl ::buffa::ExtensionSet for EnumDescriptorProto {
3132    const PROTO_FQN: &'static str = "google.protobuf.EnumDescriptorProto";
3133    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3134        &self.__buffa_unknown_fields
3135    }
3136    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3137        &mut self.__buffa_unknown_fields
3138    }
3139}
3140pub mod enum_descriptor_proto {
3141    #[allow(unused_imports)]
3142    use super::*;
3143    /// Range of reserved numeric values. Reserved values may not be used by
3144    /// entries in the same enum. Reserved ranges may not overlap.
3145    ///
3146    /// Note that this is distinct from DescriptorProto.ReservedRange in that it
3147    /// is inclusive such that it can appropriately represent the entire int32
3148    /// domain.
3149    #[derive(Clone, PartialEq, Default)]
3150    pub struct EnumReservedRange {
3151        /// Inclusive.
3152        ///
3153        /// Field 1: `start`
3154        pub start: ::core::option::Option<i32>,
3155        /// Inclusive.
3156        ///
3157        /// Field 2: `end`
3158        pub end: ::core::option::Option<i32>,
3159        #[doc(hidden)]
3160        pub __buffa_unknown_fields: ::buffa::UnknownFields,
3161    }
3162    impl ::core::fmt::Debug for EnumReservedRange {
3163        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3164            f.debug_struct("EnumReservedRange")
3165                .field("start", &self.start)
3166                .field("end", &self.end)
3167                .finish()
3168        }
3169    }
3170    impl EnumReservedRange {
3171        /// Protobuf type URL for this message, for use with `Any::pack` and
3172        /// `Any::unpack_if`.
3173        ///
3174        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3175        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumDescriptorProto.EnumReservedRange";
3176    }
3177    impl ::buffa::DefaultInstance for EnumReservedRange {
3178        fn default_instance() -> &'static Self {
3179            static VALUE: ::buffa::__private::OnceBox<EnumReservedRange> = ::buffa::__private::OnceBox::new();
3180            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3181        }
3182    }
3183    impl ::buffa::Message for EnumReservedRange {
3184        /// Returns the total encoded size in bytes.
3185        ///
3186        /// The result is a `u32`; the protobuf specification requires all
3187        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3188        /// compliant message will never overflow this type.
3189        #[allow(clippy::let_and_return)]
3190        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3191            #[allow(unused_imports)]
3192            use ::buffa::Enumeration as _;
3193            let mut size = 0u32;
3194            if let Some(v) = self.start {
3195                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3196            }
3197            if let Some(v) = self.end {
3198                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3199            }
3200            size += self.__buffa_unknown_fields.encoded_len() as u32;
3201            size
3202        }
3203        fn write_to(
3204            &self,
3205            _cache: &mut ::buffa::SizeCache,
3206            buf: &mut impl ::buffa::bytes::BufMut,
3207        ) {
3208            #[allow(unused_imports)]
3209            use ::buffa::Enumeration as _;
3210            if let Some(v) = self.start {
3211                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
3212                    .encode(buf);
3213                ::buffa::types::encode_int32(v, buf);
3214            }
3215            if let Some(v) = self.end {
3216                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
3217                    .encode(buf);
3218                ::buffa::types::encode_int32(v, buf);
3219            }
3220            self.__buffa_unknown_fields.write_to(buf);
3221        }
3222        fn merge_field(
3223            &mut self,
3224            tag: ::buffa::encoding::Tag,
3225            buf: &mut impl ::buffa::bytes::Buf,
3226            depth: u32,
3227        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3228            #[allow(unused_imports)]
3229            use ::buffa::bytes::Buf as _;
3230            #[allow(unused_imports)]
3231            use ::buffa::Enumeration as _;
3232            match tag.field_number() {
3233                1u32 => {
3234                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3235                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3236                            field_number: 1u32,
3237                            expected: 0u8,
3238                            actual: tag.wire_type() as u8,
3239                        });
3240                    }
3241                    self.start = ::core::option::Option::Some(
3242                        ::buffa::types::decode_int32(buf)?,
3243                    );
3244                }
3245                2u32 => {
3246                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3247                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3248                            field_number: 2u32,
3249                            expected: 0u8,
3250                            actual: tag.wire_type() as u8,
3251                        });
3252                    }
3253                    self.end = ::core::option::Option::Some(
3254                        ::buffa::types::decode_int32(buf)?,
3255                    );
3256                }
3257                _ => {
3258                    self.__buffa_unknown_fields
3259                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3260                }
3261            }
3262            ::core::result::Result::Ok(())
3263        }
3264        fn clear(&mut self) {
3265            self.start = ::core::option::Option::None;
3266            self.end = ::core::option::Option::None;
3267            self.__buffa_unknown_fields.clear();
3268        }
3269    }
3270    impl ::buffa::ExtensionSet for EnumReservedRange {
3271        const PROTO_FQN: &'static str = "google.protobuf.EnumDescriptorProto.EnumReservedRange";
3272        fn unknown_fields(&self) -> &::buffa::UnknownFields {
3273            &self.__buffa_unknown_fields
3274        }
3275        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3276            &mut self.__buffa_unknown_fields
3277        }
3278    }
3279}
3280/// Describes a value within an enum.
3281#[derive(Clone, PartialEq, Default)]
3282pub struct EnumValueDescriptorProto {
3283    /// Field 1: `name`
3284    pub name: ::core::option::Option<::buffa::alloc::string::String>,
3285    /// Field 2: `number`
3286    pub number: ::core::option::Option<i32>,
3287    /// Field 3: `options`
3288    pub options: ::buffa::MessageField<EnumValueOptions>,
3289    #[doc(hidden)]
3290    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3291}
3292impl ::core::fmt::Debug for EnumValueDescriptorProto {
3293    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3294        f.debug_struct("EnumValueDescriptorProto")
3295            .field("name", &self.name)
3296            .field("number", &self.number)
3297            .field("options", &self.options)
3298            .finish()
3299    }
3300}
3301impl EnumValueDescriptorProto {
3302    /// Protobuf type URL for this message, for use with `Any::pack` and
3303    /// `Any::unpack_if`.
3304    ///
3305    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3306    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumValueDescriptorProto";
3307}
3308impl ::buffa::DefaultInstance for EnumValueDescriptorProto {
3309    fn default_instance() -> &'static Self {
3310        static VALUE: ::buffa::__private::OnceBox<EnumValueDescriptorProto> = ::buffa::__private::OnceBox::new();
3311        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3312    }
3313}
3314impl ::buffa::Message for EnumValueDescriptorProto {
3315    /// Returns the total encoded size in bytes.
3316    ///
3317    /// The result is a `u32`; the protobuf specification requires all
3318    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3319    /// compliant message will never overflow this type.
3320    #[allow(clippy::let_and_return)]
3321    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3322        #[allow(unused_imports)]
3323        use ::buffa::Enumeration as _;
3324        let mut size = 0u32;
3325        if let Some(ref v) = self.name {
3326            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3327        }
3328        if let Some(v) = self.number {
3329            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3330        }
3331        if self.options.is_set() {
3332            let __slot = __cache.reserve();
3333            let inner_size = self.options.compute_size(__cache);
3334            __cache.set(__slot, inner_size);
3335            size
3336                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3337                    + inner_size;
3338        }
3339        size += self.__buffa_unknown_fields.encoded_len() as u32;
3340        size
3341    }
3342    fn write_to(
3343        &self,
3344        __cache: &mut ::buffa::SizeCache,
3345        buf: &mut impl ::buffa::bytes::BufMut,
3346    ) {
3347        #[allow(unused_imports)]
3348        use ::buffa::Enumeration as _;
3349        if let Some(ref v) = self.name {
3350            ::buffa::encoding::Tag::new(
3351                    1u32,
3352                    ::buffa::encoding::WireType::LengthDelimited,
3353                )
3354                .encode(buf);
3355            ::buffa::types::encode_string(v, buf);
3356        }
3357        if let Some(v) = self.number {
3358            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
3359                .encode(buf);
3360            ::buffa::types::encode_int32(v, buf);
3361        }
3362        if self.options.is_set() {
3363            ::buffa::encoding::Tag::new(
3364                    3u32,
3365                    ::buffa::encoding::WireType::LengthDelimited,
3366                )
3367                .encode(buf);
3368            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3369            self.options.write_to(__cache, buf);
3370        }
3371        self.__buffa_unknown_fields.write_to(buf);
3372    }
3373    fn merge_field(
3374        &mut self,
3375        tag: ::buffa::encoding::Tag,
3376        buf: &mut impl ::buffa::bytes::Buf,
3377        depth: u32,
3378    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3379        #[allow(unused_imports)]
3380        use ::buffa::bytes::Buf as _;
3381        #[allow(unused_imports)]
3382        use ::buffa::Enumeration as _;
3383        match tag.field_number() {
3384            1u32 => {
3385                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3386                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3387                        field_number: 1u32,
3388                        expected: 2u8,
3389                        actual: tag.wire_type() as u8,
3390                    });
3391                }
3392                ::buffa::types::merge_string(
3393                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
3394                    buf,
3395                )?;
3396            }
3397            2u32 => {
3398                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3399                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3400                        field_number: 2u32,
3401                        expected: 0u8,
3402                        actual: tag.wire_type() as u8,
3403                    });
3404                }
3405                self.number = ::core::option::Option::Some(
3406                    ::buffa::types::decode_int32(buf)?,
3407                );
3408            }
3409            3u32 => {
3410                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3411                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3412                        field_number: 3u32,
3413                        expected: 2u8,
3414                        actual: tag.wire_type() as u8,
3415                    });
3416                }
3417                ::buffa::Message::merge_length_delimited(
3418                    self.options.get_or_insert_default(),
3419                    buf,
3420                    depth,
3421                )?;
3422            }
3423            _ => {
3424                self.__buffa_unknown_fields
3425                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3426            }
3427        }
3428        ::core::result::Result::Ok(())
3429    }
3430    fn clear(&mut self) {
3431        self.name = ::core::option::Option::None;
3432        self.number = ::core::option::Option::None;
3433        self.options = ::buffa::MessageField::none();
3434        self.__buffa_unknown_fields.clear();
3435    }
3436}
3437impl ::buffa::ExtensionSet for EnumValueDescriptorProto {
3438    const PROTO_FQN: &'static str = "google.protobuf.EnumValueDescriptorProto";
3439    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3440        &self.__buffa_unknown_fields
3441    }
3442    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3443        &mut self.__buffa_unknown_fields
3444    }
3445}
3446/// Describes a service.
3447#[derive(Clone, PartialEq, Default)]
3448pub struct ServiceDescriptorProto {
3449    /// Field 1: `name`
3450    pub name: ::core::option::Option<::buffa::alloc::string::String>,
3451    /// Field 2: `method`
3452    pub method: ::buffa::alloc::vec::Vec<MethodDescriptorProto>,
3453    /// Field 3: `options`
3454    pub options: ::buffa::MessageField<ServiceOptions>,
3455    #[doc(hidden)]
3456    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3457}
3458impl ::core::fmt::Debug for ServiceDescriptorProto {
3459    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3460        f.debug_struct("ServiceDescriptorProto")
3461            .field("name", &self.name)
3462            .field("method", &self.method)
3463            .field("options", &self.options)
3464            .finish()
3465    }
3466}
3467impl ServiceDescriptorProto {
3468    /// Protobuf type URL for this message, for use with `Any::pack` and
3469    /// `Any::unpack_if`.
3470    ///
3471    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3472    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.ServiceDescriptorProto";
3473}
3474impl ::buffa::DefaultInstance for ServiceDescriptorProto {
3475    fn default_instance() -> &'static Self {
3476        static VALUE: ::buffa::__private::OnceBox<ServiceDescriptorProto> = ::buffa::__private::OnceBox::new();
3477        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3478    }
3479}
3480impl ::buffa::Message for ServiceDescriptorProto {
3481    /// Returns the total encoded size in bytes.
3482    ///
3483    /// The result is a `u32`; the protobuf specification requires all
3484    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3485    /// compliant message will never overflow this type.
3486    #[allow(clippy::let_and_return)]
3487    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3488        #[allow(unused_imports)]
3489        use ::buffa::Enumeration as _;
3490        let mut size = 0u32;
3491        if let Some(ref v) = self.name {
3492            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3493        }
3494        for v in &self.method {
3495            let __slot = __cache.reserve();
3496            let inner_size = v.compute_size(__cache);
3497            __cache.set(__slot, inner_size);
3498            size
3499                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3500                    + inner_size;
3501        }
3502        if self.options.is_set() {
3503            let __slot = __cache.reserve();
3504            let inner_size = self.options.compute_size(__cache);
3505            __cache.set(__slot, inner_size);
3506            size
3507                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3508                    + inner_size;
3509        }
3510        size += self.__buffa_unknown_fields.encoded_len() as u32;
3511        size
3512    }
3513    fn write_to(
3514        &self,
3515        __cache: &mut ::buffa::SizeCache,
3516        buf: &mut impl ::buffa::bytes::BufMut,
3517    ) {
3518        #[allow(unused_imports)]
3519        use ::buffa::Enumeration as _;
3520        if let Some(ref v) = self.name {
3521            ::buffa::encoding::Tag::new(
3522                    1u32,
3523                    ::buffa::encoding::WireType::LengthDelimited,
3524                )
3525                .encode(buf);
3526            ::buffa::types::encode_string(v, buf);
3527        }
3528        for v in &self.method {
3529            ::buffa::encoding::Tag::new(
3530                    2u32,
3531                    ::buffa::encoding::WireType::LengthDelimited,
3532                )
3533                .encode(buf);
3534            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3535            v.write_to(__cache, buf);
3536        }
3537        if self.options.is_set() {
3538            ::buffa::encoding::Tag::new(
3539                    3u32,
3540                    ::buffa::encoding::WireType::LengthDelimited,
3541                )
3542                .encode(buf);
3543            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3544            self.options.write_to(__cache, buf);
3545        }
3546        self.__buffa_unknown_fields.write_to(buf);
3547    }
3548    fn merge_field(
3549        &mut self,
3550        tag: ::buffa::encoding::Tag,
3551        buf: &mut impl ::buffa::bytes::Buf,
3552        depth: u32,
3553    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3554        #[allow(unused_imports)]
3555        use ::buffa::bytes::Buf as _;
3556        #[allow(unused_imports)]
3557        use ::buffa::Enumeration as _;
3558        match tag.field_number() {
3559            1u32 => {
3560                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3561                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3562                        field_number: 1u32,
3563                        expected: 2u8,
3564                        actual: tag.wire_type() as u8,
3565                    });
3566                }
3567                ::buffa::types::merge_string(
3568                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
3569                    buf,
3570                )?;
3571            }
3572            2u32 => {
3573                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3574                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3575                        field_number: 2u32,
3576                        expected: 2u8,
3577                        actual: tag.wire_type() as u8,
3578                    });
3579                }
3580                let mut elem = ::core::default::Default::default();
3581                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3582                self.method.push(elem);
3583            }
3584            3u32 => {
3585                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3586                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3587                        field_number: 3u32,
3588                        expected: 2u8,
3589                        actual: tag.wire_type() as u8,
3590                    });
3591                }
3592                ::buffa::Message::merge_length_delimited(
3593                    self.options.get_or_insert_default(),
3594                    buf,
3595                    depth,
3596                )?;
3597            }
3598            _ => {
3599                self.__buffa_unknown_fields
3600                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3601            }
3602        }
3603        ::core::result::Result::Ok(())
3604    }
3605    fn clear(&mut self) {
3606        self.name = ::core::option::Option::None;
3607        self.method.clear();
3608        self.options = ::buffa::MessageField::none();
3609        self.__buffa_unknown_fields.clear();
3610    }
3611}
3612impl ::buffa::ExtensionSet for ServiceDescriptorProto {
3613    const PROTO_FQN: &'static str = "google.protobuf.ServiceDescriptorProto";
3614    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3615        &self.__buffa_unknown_fields
3616    }
3617    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3618        &mut self.__buffa_unknown_fields
3619    }
3620}
3621/// Describes a method of a service.
3622#[derive(Clone, PartialEq, Default)]
3623pub struct MethodDescriptorProto {
3624    /// Field 1: `name`
3625    pub name: ::core::option::Option<::buffa::alloc::string::String>,
3626    /// Input and output type names.  These are resolved in the same way as
3627    /// FieldDescriptorProto.type_name, but must refer to a message type.
3628    ///
3629    /// Field 2: `input_type`
3630    pub input_type: ::core::option::Option<::buffa::alloc::string::String>,
3631    /// Field 3: `output_type`
3632    pub output_type: ::core::option::Option<::buffa::alloc::string::String>,
3633    /// Field 4: `options`
3634    pub options: ::buffa::MessageField<MethodOptions>,
3635    /// Identifies if client streams multiple client messages
3636    ///
3637    /// Field 5: `client_streaming`
3638    pub client_streaming: ::core::option::Option<bool>,
3639    /// Identifies if server streams multiple server messages
3640    ///
3641    /// Field 6: `server_streaming`
3642    pub server_streaming: ::core::option::Option<bool>,
3643    #[doc(hidden)]
3644    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3645}
3646impl ::core::fmt::Debug for MethodDescriptorProto {
3647    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3648        f.debug_struct("MethodDescriptorProto")
3649            .field("name", &self.name)
3650            .field("input_type", &self.input_type)
3651            .field("output_type", &self.output_type)
3652            .field("options", &self.options)
3653            .field("client_streaming", &self.client_streaming)
3654            .field("server_streaming", &self.server_streaming)
3655            .finish()
3656    }
3657}
3658impl MethodDescriptorProto {
3659    /// Protobuf type URL for this message, for use with `Any::pack` and
3660    /// `Any::unpack_if`.
3661    ///
3662    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3663    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.MethodDescriptorProto";
3664}
3665impl ::buffa::DefaultInstance for MethodDescriptorProto {
3666    fn default_instance() -> &'static Self {
3667        static VALUE: ::buffa::__private::OnceBox<MethodDescriptorProto> = ::buffa::__private::OnceBox::new();
3668        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3669    }
3670}
3671impl ::buffa::Message for MethodDescriptorProto {
3672    /// Returns the total encoded size in bytes.
3673    ///
3674    /// The result is a `u32`; the protobuf specification requires all
3675    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3676    /// compliant message will never overflow this type.
3677    #[allow(clippy::let_and_return)]
3678    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3679        #[allow(unused_imports)]
3680        use ::buffa::Enumeration as _;
3681        let mut size = 0u32;
3682        if let Some(ref v) = self.name {
3683            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3684        }
3685        if let Some(ref v) = self.input_type {
3686            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3687        }
3688        if let Some(ref v) = self.output_type {
3689            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3690        }
3691        if self.options.is_set() {
3692            let __slot = __cache.reserve();
3693            let inner_size = self.options.compute_size(__cache);
3694            __cache.set(__slot, inner_size);
3695            size
3696                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3697                    + inner_size;
3698        }
3699        if self.client_streaming.is_some() {
3700            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3701        }
3702        if self.server_streaming.is_some() {
3703            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3704        }
3705        size += self.__buffa_unknown_fields.encoded_len() as u32;
3706        size
3707    }
3708    fn write_to(
3709        &self,
3710        __cache: &mut ::buffa::SizeCache,
3711        buf: &mut impl ::buffa::bytes::BufMut,
3712    ) {
3713        #[allow(unused_imports)]
3714        use ::buffa::Enumeration as _;
3715        if let Some(ref v) = self.name {
3716            ::buffa::encoding::Tag::new(
3717                    1u32,
3718                    ::buffa::encoding::WireType::LengthDelimited,
3719                )
3720                .encode(buf);
3721            ::buffa::types::encode_string(v, buf);
3722        }
3723        if let Some(ref v) = self.input_type {
3724            ::buffa::encoding::Tag::new(
3725                    2u32,
3726                    ::buffa::encoding::WireType::LengthDelimited,
3727                )
3728                .encode(buf);
3729            ::buffa::types::encode_string(v, buf);
3730        }
3731        if let Some(ref v) = self.output_type {
3732            ::buffa::encoding::Tag::new(
3733                    3u32,
3734                    ::buffa::encoding::WireType::LengthDelimited,
3735                )
3736                .encode(buf);
3737            ::buffa::types::encode_string(v, buf);
3738        }
3739        if self.options.is_set() {
3740            ::buffa::encoding::Tag::new(
3741                    4u32,
3742                    ::buffa::encoding::WireType::LengthDelimited,
3743                )
3744                .encode(buf);
3745            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3746            self.options.write_to(__cache, buf);
3747        }
3748        if let Some(v) = self.client_streaming {
3749            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
3750                .encode(buf);
3751            ::buffa::types::encode_bool(v, buf);
3752        }
3753        if let Some(v) = self.server_streaming {
3754            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
3755                .encode(buf);
3756            ::buffa::types::encode_bool(v, buf);
3757        }
3758        self.__buffa_unknown_fields.write_to(buf);
3759    }
3760    fn merge_field(
3761        &mut self,
3762        tag: ::buffa::encoding::Tag,
3763        buf: &mut impl ::buffa::bytes::Buf,
3764        depth: u32,
3765    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3766        #[allow(unused_imports)]
3767        use ::buffa::bytes::Buf as _;
3768        #[allow(unused_imports)]
3769        use ::buffa::Enumeration as _;
3770        match tag.field_number() {
3771            1u32 => {
3772                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3773                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3774                        field_number: 1u32,
3775                        expected: 2u8,
3776                        actual: tag.wire_type() as u8,
3777                    });
3778                }
3779                ::buffa::types::merge_string(
3780                    self.name.get_or_insert_with(::buffa::alloc::string::String::new),
3781                    buf,
3782                )?;
3783            }
3784            2u32 => {
3785                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3786                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3787                        field_number: 2u32,
3788                        expected: 2u8,
3789                        actual: tag.wire_type() as u8,
3790                    });
3791                }
3792                ::buffa::types::merge_string(
3793                    self
3794                        .input_type
3795                        .get_or_insert_with(::buffa::alloc::string::String::new),
3796                    buf,
3797                )?;
3798            }
3799            3u32 => {
3800                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3801                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3802                        field_number: 3u32,
3803                        expected: 2u8,
3804                        actual: tag.wire_type() as u8,
3805                    });
3806                }
3807                ::buffa::types::merge_string(
3808                    self
3809                        .output_type
3810                        .get_or_insert_with(::buffa::alloc::string::String::new),
3811                    buf,
3812                )?;
3813            }
3814            4u32 => {
3815                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3816                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3817                        field_number: 4u32,
3818                        expected: 2u8,
3819                        actual: tag.wire_type() as u8,
3820                    });
3821                }
3822                ::buffa::Message::merge_length_delimited(
3823                    self.options.get_or_insert_default(),
3824                    buf,
3825                    depth,
3826                )?;
3827            }
3828            5u32 => {
3829                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3830                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3831                        field_number: 5u32,
3832                        expected: 0u8,
3833                        actual: tag.wire_type() as u8,
3834                    });
3835                }
3836                self.client_streaming = ::core::option::Option::Some(
3837                    ::buffa::types::decode_bool(buf)?,
3838                );
3839            }
3840            6u32 => {
3841                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3842                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3843                        field_number: 6u32,
3844                        expected: 0u8,
3845                        actual: tag.wire_type() as u8,
3846                    });
3847                }
3848                self.server_streaming = ::core::option::Option::Some(
3849                    ::buffa::types::decode_bool(buf)?,
3850                );
3851            }
3852            _ => {
3853                self.__buffa_unknown_fields
3854                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3855            }
3856        }
3857        ::core::result::Result::Ok(())
3858    }
3859    fn clear(&mut self) {
3860        self.name = ::core::option::Option::None;
3861        self.input_type = ::core::option::Option::None;
3862        self.output_type = ::core::option::Option::None;
3863        self.options = ::buffa::MessageField::none();
3864        self.client_streaming = ::core::option::Option::None;
3865        self.server_streaming = ::core::option::Option::None;
3866        self.__buffa_unknown_fields.clear();
3867    }
3868}
3869impl ::buffa::ExtensionSet for MethodDescriptorProto {
3870    const PROTO_FQN: &'static str = "google.protobuf.MethodDescriptorProto";
3871    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3872        &self.__buffa_unknown_fields
3873    }
3874    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3875        &mut self.__buffa_unknown_fields
3876    }
3877}
3878/// ===================================================================
3879/// Options
3880///
3881/// Each of the definitions above may have "options" attached.  These are
3882/// just annotations which may cause code to be generated slightly differently
3883/// or may contain hints for code that manipulates protocol messages.
3884///
3885/// Clients may define custom options as extensions of the *Options messages.
3886/// These extensions may not yet be known at parsing time, so the parser cannot
3887/// store the values in them.  Instead it stores them in a field in the *Options
3888/// message called uninterpreted_option. This field must have the same name
3889/// across all *Options messages. We then use this field to populate the
3890/// extensions when we build a descriptor, at which point all protos have been
3891/// parsed and so all extensions are known.
3892///
3893/// Extension numbers for custom options may be chosen as follows:
3894/// * For options which will only be used within a single application or
3895///   organization, or for experimental options, use field numbers 50000
3896///   through 99999.  It is up to you to ensure that you do not use the
3897///   same number for multiple options.
3898/// * For options which will be published and used publicly by multiple
3899///   independent entities, e-mail protobuf-global-extension-registry@google.com
3900///   to reserve extension numbers. Simply provide your project name (e.g.
3901///   Objective-C plugin) and your project website (if available) -- there's no
3902///   need to explain how you intend to use them. Usually you only need one
3903///   extension number. You can declare multiple options with only one extension
3904///   number by putting them in a sub-message. See the Custom Options section of
3905///   the docs for examples:
3906///   <https://developers.google.com/protocol-buffers/docs/proto#options>
3907///   If this turns out to be popular, a web service will be set up
3908///   to automatically assign option numbers.
3909#[derive(Clone, PartialEq, Default)]
3910pub struct FileOptions {
3911    /// Sets the Java package where classes generated from this .proto will be
3912    /// placed.  By default, the proto package is used, but this is often
3913    /// inappropriate because proto packages do not normally start with backwards
3914    /// domain names.
3915    ///
3916    /// Field 1: `java_package`
3917    pub java_package: ::core::option::Option<::buffa::alloc::string::String>,
3918    /// Controls the name of the wrapper Java class generated for the .proto file.
3919    /// That class will always contain the .proto file's getDescriptor() method as
3920    /// well as any top-level extensions defined in the .proto file.
3921    /// If java_multiple_files is disabled, then all the other classes from the
3922    /// .proto file will be nested inside the single wrapper outer class.
3923    ///
3924    /// Field 8: `java_outer_classname`
3925    pub java_outer_classname: ::core::option::Option<::buffa::alloc::string::String>,
3926    /// If enabled, then the Java code generator will generate a separate .java
3927    /// file for each top-level message, enum, and service defined in the .proto
3928    /// file.  Thus, these types will *not* be nested inside the wrapper class
3929    /// named by java_outer_classname.  However, the wrapper class will still be
3930    /// generated to contain the file's getDescriptor() method as well as any
3931    /// top-level extensions defined in the file.
3932    ///
3933    /// Field 10: `java_multiple_files`
3934    pub java_multiple_files: ::core::option::Option<bool>,
3935    /// This option does nothing.
3936    ///
3937    /// Field 20: `java_generate_equals_and_hash`
3938    pub java_generate_equals_and_hash: ::core::option::Option<bool>,
3939    /// A proto2 file can set this to true to opt in to UTF-8 checking for Java,
3940    /// which will throw an exception if invalid UTF-8 is parsed from the wire or
3941    /// assigned to a string field.
3942    ///
3943    /// TODO: clarify exactly what kinds of field types this option
3944    /// applies to, and update these docs accordingly.
3945    ///
3946    /// Proto3 files already perform these checks. Setting the option explicitly to
3947    /// false has no effect: it cannot be used to opt proto3 files out of UTF-8
3948    /// checks.
3949    ///
3950    /// Field 27: `java_string_check_utf8`
3951    pub java_string_check_utf8: ::core::option::Option<bool>,
3952    /// Field 9: `optimize_for`
3953    pub optimize_for: ::core::option::Option<file_options::OptimizeMode>,
3954    /// Sets the Go package where structs generated from this .proto will be
3955    /// placed. If omitted, the Go package will be derived from the following:
3956    ///   - The basename of the package import path, if provided.
3957    ///   - Otherwise, the package statement in the .proto file, if present.
3958    ///   - Otherwise, the basename of the .proto file, without extension.
3959    ///
3960    /// Field 11: `go_package`
3961    pub go_package: ::core::option::Option<::buffa::alloc::string::String>,
3962    /// Should generic services be generated in each language?  "Generic" services
3963    /// are not specific to any particular RPC system.  They are generated by the
3964    /// main code generators in each language (without additional plugins).
3965    /// Generic services were the only kind of service generation supported by
3966    /// early versions of google.protobuf.
3967    ///
3968    /// Generic services are now considered deprecated in favor of using plugins
3969    /// that generate code specific to your particular RPC system.  Therefore,
3970    /// these default to false.  Old code which depends on generic services should
3971    /// explicitly set them to true.
3972    ///
3973    /// Field 16: `cc_generic_services`
3974    pub cc_generic_services: ::core::option::Option<bool>,
3975    /// Field 17: `java_generic_services`
3976    pub java_generic_services: ::core::option::Option<bool>,
3977    /// Field 18: `py_generic_services`
3978    pub py_generic_services: ::core::option::Option<bool>,
3979    /// Is this file deprecated?
3980    /// Depending on the target platform, this can emit Deprecated annotations
3981    /// for everything in the file, or it will be completely ignored; in the very
3982    /// least, this is a formalization for deprecating files.
3983    ///
3984    /// Field 23: `deprecated`
3985    pub deprecated: ::core::option::Option<bool>,
3986    /// Enables the use of arenas for the proto messages in this file. This applies
3987    /// only to generated classes for C++.
3988    ///
3989    /// Field 31: `cc_enable_arenas`
3990    pub cc_enable_arenas: ::core::option::Option<bool>,
3991    /// Sets the objective c class prefix which is prepended to all objective c
3992    /// generated classes from this .proto. There is no default.
3993    ///
3994    /// Field 36: `objc_class_prefix`
3995    pub objc_class_prefix: ::core::option::Option<::buffa::alloc::string::String>,
3996    /// Namespace for generated classes; defaults to the package.
3997    ///
3998    /// Field 37: `csharp_namespace`
3999    pub csharp_namespace: ::core::option::Option<::buffa::alloc::string::String>,
4000    /// By default Swift generators will take the proto package and CamelCase it
4001    /// replacing '.' with underscore and use that to prefix the types/symbols
4002    /// defined. When this options is provided, they will use this value instead
4003    /// to prefix the types/symbols defined.
4004    ///
4005    /// Field 39: `swift_prefix`
4006    pub swift_prefix: ::core::option::Option<::buffa::alloc::string::String>,
4007    /// Sets the php class prefix which is prepended to all php generated classes
4008    /// from this .proto. Default is empty.
4009    ///
4010    /// Field 40: `php_class_prefix`
4011    pub php_class_prefix: ::core::option::Option<::buffa::alloc::string::String>,
4012    /// Use this option to change the namespace of php generated classes. Default
4013    /// is empty. When this option is empty, the package name will be used for
4014    /// determining the namespace.
4015    ///
4016    /// Field 41: `php_namespace`
4017    pub php_namespace: ::core::option::Option<::buffa::alloc::string::String>,
4018    /// Use this option to change the namespace of php generated metadata classes.
4019    /// Default is empty. When this option is empty, the proto file name will be
4020    /// used for determining the namespace.
4021    ///
4022    /// Field 44: `php_metadata_namespace`
4023    pub php_metadata_namespace: ::core::option::Option<::buffa::alloc::string::String>,
4024    /// Use this option to change the package of ruby generated classes. Default
4025    /// is empty. When this option is not set, the package name will be used for
4026    /// determining the ruby package.
4027    ///
4028    /// Field 45: `ruby_package`
4029    pub ruby_package: ::core::option::Option<::buffa::alloc::string::String>,
4030    /// Any features defined in the specific edition.
4031    /// WARNING: This field should only be used by protobuf plugins or special
4032    /// cases like the proto compiler. Other uses are discouraged and
4033    /// developers should rely on the protoreflect APIs for their client language.
4034    ///
4035    /// Field 50: `features`
4036    pub features: ::buffa::MessageField<FeatureSet>,
4037    /// The parser stores options it doesn't recognize here.
4038    /// See the documentation for the "Options" section above.
4039    ///
4040    /// Field 999: `uninterpreted_option`
4041    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
4042    #[doc(hidden)]
4043    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4044}
4045impl ::core::fmt::Debug for FileOptions {
4046    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4047        f.debug_struct("FileOptions")
4048            .field("java_package", &self.java_package)
4049            .field("java_outer_classname", &self.java_outer_classname)
4050            .field("java_multiple_files", &self.java_multiple_files)
4051            .field("java_generate_equals_and_hash", &self.java_generate_equals_and_hash)
4052            .field("java_string_check_utf8", &self.java_string_check_utf8)
4053            .field("optimize_for", &self.optimize_for)
4054            .field("go_package", &self.go_package)
4055            .field("cc_generic_services", &self.cc_generic_services)
4056            .field("java_generic_services", &self.java_generic_services)
4057            .field("py_generic_services", &self.py_generic_services)
4058            .field("deprecated", &self.deprecated)
4059            .field("cc_enable_arenas", &self.cc_enable_arenas)
4060            .field("objc_class_prefix", &self.objc_class_prefix)
4061            .field("csharp_namespace", &self.csharp_namespace)
4062            .field("swift_prefix", &self.swift_prefix)
4063            .field("php_class_prefix", &self.php_class_prefix)
4064            .field("php_namespace", &self.php_namespace)
4065            .field("php_metadata_namespace", &self.php_metadata_namespace)
4066            .field("ruby_package", &self.ruby_package)
4067            .field("features", &self.features)
4068            .field("uninterpreted_option", &self.uninterpreted_option)
4069            .finish()
4070    }
4071}
4072impl FileOptions {
4073    /// Protobuf type URL for this message, for use with `Any::pack` and
4074    /// `Any::unpack_if`.
4075    ///
4076    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4077    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FileOptions";
4078}
4079impl ::buffa::DefaultInstance for FileOptions {
4080    fn default_instance() -> &'static Self {
4081        static VALUE: ::buffa::__private::OnceBox<FileOptions> = ::buffa::__private::OnceBox::new();
4082        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4083    }
4084}
4085impl ::buffa::Message for FileOptions {
4086    /// Returns the total encoded size in bytes.
4087    ///
4088    /// The result is a `u32`; the protobuf specification requires all
4089    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4090    /// compliant message will never overflow this type.
4091    #[allow(clippy::let_and_return)]
4092    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4093        #[allow(unused_imports)]
4094        use ::buffa::Enumeration as _;
4095        let mut size = 0u32;
4096        if let Some(ref v) = self.java_package {
4097            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4098        }
4099        if let Some(ref v) = self.java_outer_classname {
4100            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4101        }
4102        if let Some(ref v) = self.optimize_for {
4103            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
4104        }
4105        if self.java_multiple_files.is_some() {
4106            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4107        }
4108        if let Some(ref v) = self.go_package {
4109            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4110        }
4111        if self.cc_generic_services.is_some() {
4112            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4113        }
4114        if self.java_generic_services.is_some() {
4115            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4116        }
4117        if self.py_generic_services.is_some() {
4118            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4119        }
4120        if self.java_generate_equals_and_hash.is_some() {
4121            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4122        }
4123        if self.deprecated.is_some() {
4124            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4125        }
4126        if self.java_string_check_utf8.is_some() {
4127            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4128        }
4129        if self.cc_enable_arenas.is_some() {
4130            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4131        }
4132        if let Some(ref v) = self.objc_class_prefix {
4133            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4134        }
4135        if let Some(ref v) = self.csharp_namespace {
4136            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4137        }
4138        if let Some(ref v) = self.swift_prefix {
4139            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4140        }
4141        if let Some(ref v) = self.php_class_prefix {
4142            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4143        }
4144        if let Some(ref v) = self.php_namespace {
4145            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4146        }
4147        if let Some(ref v) = self.php_metadata_namespace {
4148            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4149        }
4150        if let Some(ref v) = self.ruby_package {
4151            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
4152        }
4153        if self.features.is_set() {
4154            let __slot = __cache.reserve();
4155            let inner_size = self.features.compute_size(__cache);
4156            __cache.set(__slot, inner_size);
4157            size
4158                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4159                    + inner_size;
4160        }
4161        for v in &self.uninterpreted_option {
4162            let __slot = __cache.reserve();
4163            let inner_size = v.compute_size(__cache);
4164            __cache.set(__slot, inner_size);
4165            size
4166                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4167                    + inner_size;
4168        }
4169        size += self.__buffa_unknown_fields.encoded_len() as u32;
4170        size
4171    }
4172    fn write_to(
4173        &self,
4174        __cache: &mut ::buffa::SizeCache,
4175        buf: &mut impl ::buffa::bytes::BufMut,
4176    ) {
4177        #[allow(unused_imports)]
4178        use ::buffa::Enumeration as _;
4179        if let Some(ref v) = self.java_package {
4180            ::buffa::encoding::Tag::new(
4181                    1u32,
4182                    ::buffa::encoding::WireType::LengthDelimited,
4183                )
4184                .encode(buf);
4185            ::buffa::types::encode_string(v, buf);
4186        }
4187        if let Some(ref v) = self.java_outer_classname {
4188            ::buffa::encoding::Tag::new(
4189                    8u32,
4190                    ::buffa::encoding::WireType::LengthDelimited,
4191                )
4192                .encode(buf);
4193            ::buffa::types::encode_string(v, buf);
4194        }
4195        if let Some(ref v) = self.optimize_for {
4196            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
4197                .encode(buf);
4198            ::buffa::types::encode_int32(v.to_i32(), buf);
4199        }
4200        if let Some(v) = self.java_multiple_files {
4201            ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
4202                .encode(buf);
4203            ::buffa::types::encode_bool(v, buf);
4204        }
4205        if let Some(ref v) = self.go_package {
4206            ::buffa::encoding::Tag::new(
4207                    11u32,
4208                    ::buffa::encoding::WireType::LengthDelimited,
4209                )
4210                .encode(buf);
4211            ::buffa::types::encode_string(v, buf);
4212        }
4213        if let Some(v) = self.cc_generic_services {
4214            ::buffa::encoding::Tag::new(16u32, ::buffa::encoding::WireType::Varint)
4215                .encode(buf);
4216            ::buffa::types::encode_bool(v, buf);
4217        }
4218        if let Some(v) = self.java_generic_services {
4219            ::buffa::encoding::Tag::new(17u32, ::buffa::encoding::WireType::Varint)
4220                .encode(buf);
4221            ::buffa::types::encode_bool(v, buf);
4222        }
4223        if let Some(v) = self.py_generic_services {
4224            ::buffa::encoding::Tag::new(18u32, ::buffa::encoding::WireType::Varint)
4225                .encode(buf);
4226            ::buffa::types::encode_bool(v, buf);
4227        }
4228        if let Some(v) = self.java_generate_equals_and_hash {
4229            ::buffa::encoding::Tag::new(20u32, ::buffa::encoding::WireType::Varint)
4230                .encode(buf);
4231            ::buffa::types::encode_bool(v, buf);
4232        }
4233        if let Some(v) = self.deprecated {
4234            ::buffa::encoding::Tag::new(23u32, ::buffa::encoding::WireType::Varint)
4235                .encode(buf);
4236            ::buffa::types::encode_bool(v, buf);
4237        }
4238        if let Some(v) = self.java_string_check_utf8 {
4239            ::buffa::encoding::Tag::new(27u32, ::buffa::encoding::WireType::Varint)
4240                .encode(buf);
4241            ::buffa::types::encode_bool(v, buf);
4242        }
4243        if let Some(v) = self.cc_enable_arenas {
4244            ::buffa::encoding::Tag::new(31u32, ::buffa::encoding::WireType::Varint)
4245                .encode(buf);
4246            ::buffa::types::encode_bool(v, buf);
4247        }
4248        if let Some(ref v) = self.objc_class_prefix {
4249            ::buffa::encoding::Tag::new(
4250                    36u32,
4251                    ::buffa::encoding::WireType::LengthDelimited,
4252                )
4253                .encode(buf);
4254            ::buffa::types::encode_string(v, buf);
4255        }
4256        if let Some(ref v) = self.csharp_namespace {
4257            ::buffa::encoding::Tag::new(
4258                    37u32,
4259                    ::buffa::encoding::WireType::LengthDelimited,
4260                )
4261                .encode(buf);
4262            ::buffa::types::encode_string(v, buf);
4263        }
4264        if let Some(ref v) = self.swift_prefix {
4265            ::buffa::encoding::Tag::new(
4266                    39u32,
4267                    ::buffa::encoding::WireType::LengthDelimited,
4268                )
4269                .encode(buf);
4270            ::buffa::types::encode_string(v, buf);
4271        }
4272        if let Some(ref v) = self.php_class_prefix {
4273            ::buffa::encoding::Tag::new(
4274                    40u32,
4275                    ::buffa::encoding::WireType::LengthDelimited,
4276                )
4277                .encode(buf);
4278            ::buffa::types::encode_string(v, buf);
4279        }
4280        if let Some(ref v) = self.php_namespace {
4281            ::buffa::encoding::Tag::new(
4282                    41u32,
4283                    ::buffa::encoding::WireType::LengthDelimited,
4284                )
4285                .encode(buf);
4286            ::buffa::types::encode_string(v, buf);
4287        }
4288        if let Some(ref v) = self.php_metadata_namespace {
4289            ::buffa::encoding::Tag::new(
4290                    44u32,
4291                    ::buffa::encoding::WireType::LengthDelimited,
4292                )
4293                .encode(buf);
4294            ::buffa::types::encode_string(v, buf);
4295        }
4296        if let Some(ref v) = self.ruby_package {
4297            ::buffa::encoding::Tag::new(
4298                    45u32,
4299                    ::buffa::encoding::WireType::LengthDelimited,
4300                )
4301                .encode(buf);
4302            ::buffa::types::encode_string(v, buf);
4303        }
4304        if self.features.is_set() {
4305            ::buffa::encoding::Tag::new(
4306                    50u32,
4307                    ::buffa::encoding::WireType::LengthDelimited,
4308                )
4309                .encode(buf);
4310            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4311            self.features.write_to(__cache, buf);
4312        }
4313        for v in &self.uninterpreted_option {
4314            ::buffa::encoding::Tag::new(
4315                    999u32,
4316                    ::buffa::encoding::WireType::LengthDelimited,
4317                )
4318                .encode(buf);
4319            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4320            v.write_to(__cache, buf);
4321        }
4322        self.__buffa_unknown_fields.write_to(buf);
4323    }
4324    fn merge_field(
4325        &mut self,
4326        tag: ::buffa::encoding::Tag,
4327        buf: &mut impl ::buffa::bytes::Buf,
4328        depth: u32,
4329    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4330        #[allow(unused_imports)]
4331        use ::buffa::bytes::Buf as _;
4332        #[allow(unused_imports)]
4333        use ::buffa::Enumeration as _;
4334        match tag.field_number() {
4335            1u32 => {
4336                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4337                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4338                        field_number: 1u32,
4339                        expected: 2u8,
4340                        actual: tag.wire_type() as u8,
4341                    });
4342                }
4343                ::buffa::types::merge_string(
4344                    self
4345                        .java_package
4346                        .get_or_insert_with(::buffa::alloc::string::String::new),
4347                    buf,
4348                )?;
4349            }
4350            8u32 => {
4351                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4352                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4353                        field_number: 8u32,
4354                        expected: 2u8,
4355                        actual: tag.wire_type() as u8,
4356                    });
4357                }
4358                ::buffa::types::merge_string(
4359                    self
4360                        .java_outer_classname
4361                        .get_or_insert_with(::buffa::alloc::string::String::new),
4362                    buf,
4363                )?;
4364            }
4365            9u32 => {
4366                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4367                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4368                        field_number: 9u32,
4369                        expected: 0u8,
4370                        actual: tag.wire_type() as u8,
4371                    });
4372                }
4373                let __raw = ::buffa::types::decode_int32(buf)?;
4374                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
4375                    __raw,
4376                ) {
4377                    self.optimize_for = ::core::option::Option::Some(__v);
4378                } else {
4379                    self.__buffa_unknown_fields
4380                        .push(::buffa::UnknownField {
4381                            number: 9u32,
4382                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
4383                        });
4384                }
4385            }
4386            10u32 => {
4387                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4388                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4389                        field_number: 10u32,
4390                        expected: 0u8,
4391                        actual: tag.wire_type() as u8,
4392                    });
4393                }
4394                self.java_multiple_files = ::core::option::Option::Some(
4395                    ::buffa::types::decode_bool(buf)?,
4396                );
4397            }
4398            11u32 => {
4399                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4400                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4401                        field_number: 11u32,
4402                        expected: 2u8,
4403                        actual: tag.wire_type() as u8,
4404                    });
4405                }
4406                ::buffa::types::merge_string(
4407                    self
4408                        .go_package
4409                        .get_or_insert_with(::buffa::alloc::string::String::new),
4410                    buf,
4411                )?;
4412            }
4413            16u32 => {
4414                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4415                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4416                        field_number: 16u32,
4417                        expected: 0u8,
4418                        actual: tag.wire_type() as u8,
4419                    });
4420                }
4421                self.cc_generic_services = ::core::option::Option::Some(
4422                    ::buffa::types::decode_bool(buf)?,
4423                );
4424            }
4425            17u32 => {
4426                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4427                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4428                        field_number: 17u32,
4429                        expected: 0u8,
4430                        actual: tag.wire_type() as u8,
4431                    });
4432                }
4433                self.java_generic_services = ::core::option::Option::Some(
4434                    ::buffa::types::decode_bool(buf)?,
4435                );
4436            }
4437            18u32 => {
4438                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4439                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4440                        field_number: 18u32,
4441                        expected: 0u8,
4442                        actual: tag.wire_type() as u8,
4443                    });
4444                }
4445                self.py_generic_services = ::core::option::Option::Some(
4446                    ::buffa::types::decode_bool(buf)?,
4447                );
4448            }
4449            20u32 => {
4450                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4451                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4452                        field_number: 20u32,
4453                        expected: 0u8,
4454                        actual: tag.wire_type() as u8,
4455                    });
4456                }
4457                self.java_generate_equals_and_hash = ::core::option::Option::Some(
4458                    ::buffa::types::decode_bool(buf)?,
4459                );
4460            }
4461            23u32 => {
4462                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4463                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4464                        field_number: 23u32,
4465                        expected: 0u8,
4466                        actual: tag.wire_type() as u8,
4467                    });
4468                }
4469                self.deprecated = ::core::option::Option::Some(
4470                    ::buffa::types::decode_bool(buf)?,
4471                );
4472            }
4473            27u32 => {
4474                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4475                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4476                        field_number: 27u32,
4477                        expected: 0u8,
4478                        actual: tag.wire_type() as u8,
4479                    });
4480                }
4481                self.java_string_check_utf8 = ::core::option::Option::Some(
4482                    ::buffa::types::decode_bool(buf)?,
4483                );
4484            }
4485            31u32 => {
4486                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4487                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4488                        field_number: 31u32,
4489                        expected: 0u8,
4490                        actual: tag.wire_type() as u8,
4491                    });
4492                }
4493                self.cc_enable_arenas = ::core::option::Option::Some(
4494                    ::buffa::types::decode_bool(buf)?,
4495                );
4496            }
4497            36u32 => {
4498                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4499                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4500                        field_number: 36u32,
4501                        expected: 2u8,
4502                        actual: tag.wire_type() as u8,
4503                    });
4504                }
4505                ::buffa::types::merge_string(
4506                    self
4507                        .objc_class_prefix
4508                        .get_or_insert_with(::buffa::alloc::string::String::new),
4509                    buf,
4510                )?;
4511            }
4512            37u32 => {
4513                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4514                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4515                        field_number: 37u32,
4516                        expected: 2u8,
4517                        actual: tag.wire_type() as u8,
4518                    });
4519                }
4520                ::buffa::types::merge_string(
4521                    self
4522                        .csharp_namespace
4523                        .get_or_insert_with(::buffa::alloc::string::String::new),
4524                    buf,
4525                )?;
4526            }
4527            39u32 => {
4528                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4529                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4530                        field_number: 39u32,
4531                        expected: 2u8,
4532                        actual: tag.wire_type() as u8,
4533                    });
4534                }
4535                ::buffa::types::merge_string(
4536                    self
4537                        .swift_prefix
4538                        .get_or_insert_with(::buffa::alloc::string::String::new),
4539                    buf,
4540                )?;
4541            }
4542            40u32 => {
4543                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4544                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4545                        field_number: 40u32,
4546                        expected: 2u8,
4547                        actual: tag.wire_type() as u8,
4548                    });
4549                }
4550                ::buffa::types::merge_string(
4551                    self
4552                        .php_class_prefix
4553                        .get_or_insert_with(::buffa::alloc::string::String::new),
4554                    buf,
4555                )?;
4556            }
4557            41u32 => {
4558                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4559                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4560                        field_number: 41u32,
4561                        expected: 2u8,
4562                        actual: tag.wire_type() as u8,
4563                    });
4564                }
4565                ::buffa::types::merge_string(
4566                    self
4567                        .php_namespace
4568                        .get_or_insert_with(::buffa::alloc::string::String::new),
4569                    buf,
4570                )?;
4571            }
4572            44u32 => {
4573                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4574                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4575                        field_number: 44u32,
4576                        expected: 2u8,
4577                        actual: tag.wire_type() as u8,
4578                    });
4579                }
4580                ::buffa::types::merge_string(
4581                    self
4582                        .php_metadata_namespace
4583                        .get_or_insert_with(::buffa::alloc::string::String::new),
4584                    buf,
4585                )?;
4586            }
4587            45u32 => {
4588                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4589                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4590                        field_number: 45u32,
4591                        expected: 2u8,
4592                        actual: tag.wire_type() as u8,
4593                    });
4594                }
4595                ::buffa::types::merge_string(
4596                    self
4597                        .ruby_package
4598                        .get_or_insert_with(::buffa::alloc::string::String::new),
4599                    buf,
4600                )?;
4601            }
4602            50u32 => {
4603                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4604                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4605                        field_number: 50u32,
4606                        expected: 2u8,
4607                        actual: tag.wire_type() as u8,
4608                    });
4609                }
4610                ::buffa::Message::merge_length_delimited(
4611                    self.features.get_or_insert_default(),
4612                    buf,
4613                    depth,
4614                )?;
4615            }
4616            999u32 => {
4617                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4618                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4619                        field_number: 999u32,
4620                        expected: 2u8,
4621                        actual: tag.wire_type() as u8,
4622                    });
4623                }
4624                let mut elem = ::core::default::Default::default();
4625                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4626                self.uninterpreted_option.push(elem);
4627            }
4628            _ => {
4629                self.__buffa_unknown_fields
4630                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4631            }
4632        }
4633        ::core::result::Result::Ok(())
4634    }
4635    fn clear(&mut self) {
4636        self.java_package = ::core::option::Option::None;
4637        self.java_outer_classname = ::core::option::Option::None;
4638        self.optimize_for = ::core::option::Option::None;
4639        self.java_multiple_files = ::core::option::Option::None;
4640        self.go_package = ::core::option::Option::None;
4641        self.cc_generic_services = ::core::option::Option::None;
4642        self.java_generic_services = ::core::option::Option::None;
4643        self.py_generic_services = ::core::option::Option::None;
4644        self.java_generate_equals_and_hash = ::core::option::Option::None;
4645        self.deprecated = ::core::option::Option::None;
4646        self.java_string_check_utf8 = ::core::option::Option::None;
4647        self.cc_enable_arenas = ::core::option::Option::None;
4648        self.objc_class_prefix = ::core::option::Option::None;
4649        self.csharp_namespace = ::core::option::Option::None;
4650        self.swift_prefix = ::core::option::Option::None;
4651        self.php_class_prefix = ::core::option::Option::None;
4652        self.php_namespace = ::core::option::Option::None;
4653        self.php_metadata_namespace = ::core::option::Option::None;
4654        self.ruby_package = ::core::option::Option::None;
4655        self.features = ::buffa::MessageField::none();
4656        self.uninterpreted_option.clear();
4657        self.__buffa_unknown_fields.clear();
4658    }
4659}
4660impl ::buffa::ExtensionSet for FileOptions {
4661    const PROTO_FQN: &'static str = "google.protobuf.FileOptions";
4662    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4663        &self.__buffa_unknown_fields
4664    }
4665    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4666        &mut self.__buffa_unknown_fields
4667    }
4668}
4669pub mod file_options {
4670    #[allow(unused_imports)]
4671    use super::*;
4672    /// Generated classes can be optimized for speed or code size.
4673    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
4674    #[repr(i32)]
4675    pub enum OptimizeMode {
4676        /// Generate complete code for parsing, serialization,
4677        SPEED = 1i32,
4678        /// etc.
4679        ///
4680        /// Use ReflectionOps to implement these methods.
4681        CODE_SIZE = 2i32,
4682        /// Generate code using MessageLite and the lite runtime.
4683        LITE_RUNTIME = 3i32,
4684    }
4685    impl ::core::default::Default for OptimizeMode {
4686        fn default() -> Self {
4687            Self::SPEED
4688        }
4689    }
4690    impl ::buffa::Enumeration for OptimizeMode {
4691        fn from_i32(value: i32) -> ::core::option::Option<Self> {
4692            match value {
4693                1i32 => ::core::option::Option::Some(Self::SPEED),
4694                2i32 => ::core::option::Option::Some(Self::CODE_SIZE),
4695                3i32 => ::core::option::Option::Some(Self::LITE_RUNTIME),
4696                _ => ::core::option::Option::None,
4697            }
4698        }
4699        fn to_i32(&self) -> i32 {
4700            *self as i32
4701        }
4702        fn proto_name(&self) -> &'static str {
4703            match self {
4704                Self::SPEED => "SPEED",
4705                Self::CODE_SIZE => "CODE_SIZE",
4706                Self::LITE_RUNTIME => "LITE_RUNTIME",
4707            }
4708        }
4709        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
4710            match name {
4711                "SPEED" => ::core::option::Option::Some(Self::SPEED),
4712                "CODE_SIZE" => ::core::option::Option::Some(Self::CODE_SIZE),
4713                "LITE_RUNTIME" => ::core::option::Option::Some(Self::LITE_RUNTIME),
4714                _ => ::core::option::Option::None,
4715            }
4716        }
4717        fn values() -> &'static [Self] {
4718            &[Self::SPEED, Self::CODE_SIZE, Self::LITE_RUNTIME]
4719        }
4720    }
4721}
4722#[derive(Clone, PartialEq, Default)]
4723pub struct MessageOptions {
4724    /// Set true to use the old proto1 MessageSet wire format for extensions.
4725    /// This is provided for backwards-compatibility with the MessageSet wire
4726    /// format.  You should not use this for any other reason:  It's less
4727    /// efficient, has fewer features, and is more complicated.
4728    ///
4729    /// The message must be defined exactly as follows:
4730    ///   message Foo {
4731    /// ```text
4732    /// option message_set_wire_format = true;
4733    /// extensions 4 to max;
4734    /// ```
4735    ///   }
4736    /// Note that the message cannot have any defined fields; MessageSets only
4737    /// have extensions.
4738    ///
4739    /// All extensions of your type must be singular messages; e.g. they cannot
4740    /// be int32s, enums, or repeated messages.
4741    ///
4742    /// Because this is an option, the above two restrictions are not enforced by
4743    /// the protocol compiler.
4744    ///
4745    /// Field 1: `message_set_wire_format`
4746    pub message_set_wire_format: ::core::option::Option<bool>,
4747    /// Disables the generation of the standard "descriptor()" accessor, which can
4748    /// conflict with a field of the same name.  This is meant to make migration
4749    /// from proto1 easier; new code should avoid fields named "descriptor".
4750    ///
4751    /// Field 2: `no_standard_descriptor_accessor`
4752    pub no_standard_descriptor_accessor: ::core::option::Option<bool>,
4753    /// Is this message deprecated?
4754    /// Depending on the target platform, this can emit Deprecated annotations
4755    /// for the message, or it will be completely ignored; in the very least,
4756    /// this is a formalization for deprecating messages.
4757    ///
4758    /// Field 3: `deprecated`
4759    pub deprecated: ::core::option::Option<bool>,
4760    /// Whether the message is an automatically generated map entry type for the
4761    /// maps field.
4762    ///
4763    /// For maps fields:
4764    /// ```text
4765    /// map<KeyType, ValueType> map_field = 1;
4766    /// ```
4767    /// The parsed descriptor looks like:
4768    /// ```text
4769    /// message MapFieldEntry {
4770    ///     option map_entry = true;
4771    ///     optional KeyType key = 1;
4772    ///     optional ValueType value = 2;
4773    /// }
4774    /// repeated MapFieldEntry map_field = 1;
4775    /// ```
4776    ///
4777    /// Implementations may choose not to generate the map_entry=true message, but
4778    /// use a native map in the target language to hold the keys and values.
4779    /// The reflection APIs in such implementations still need to work as
4780    /// if the field is a repeated message field.
4781    ///
4782    /// NOTE: Do not set the option in .proto files. Always use the maps syntax
4783    /// instead. The option should only be implicitly set by the proto compiler
4784    /// parser.
4785    ///
4786    /// Field 7: `map_entry`
4787    pub map_entry: ::core::option::Option<bool>,
4788    /// Enable the legacy handling of JSON field name conflicts.  This lowercases
4789    /// and strips underscored from the fields before comparison in proto3 only.
4790    /// The new behavior takes `json_name` into account and applies to proto2 as
4791    /// well.
4792    ///
4793    /// This should only be used as a temporary measure against broken builds due
4794    /// to the change in behavior for JSON field name conflicts.
4795    ///
4796    /// TODO This is legacy behavior we plan to remove once downstream
4797    /// teams have had time to migrate.
4798    ///
4799    /// Field 11: `deprecated_legacy_json_field_conflicts`
4800    pub deprecated_legacy_json_field_conflicts: ::core::option::Option<bool>,
4801    /// Any features defined in the specific edition.
4802    /// WARNING: This field should only be used by protobuf plugins or special
4803    /// cases like the proto compiler. Other uses are discouraged and
4804    /// developers should rely on the protoreflect APIs for their client language.
4805    ///
4806    /// Field 12: `features`
4807    pub features: ::buffa::MessageField<FeatureSet>,
4808    /// The parser stores options it doesn't recognize here. See above.
4809    ///
4810    /// Field 999: `uninterpreted_option`
4811    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
4812    #[doc(hidden)]
4813    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4814}
4815impl ::core::fmt::Debug for MessageOptions {
4816    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4817        f.debug_struct("MessageOptions")
4818            .field("message_set_wire_format", &self.message_set_wire_format)
4819            .field(
4820                "no_standard_descriptor_accessor",
4821                &self.no_standard_descriptor_accessor,
4822            )
4823            .field("deprecated", &self.deprecated)
4824            .field("map_entry", &self.map_entry)
4825            .field(
4826                "deprecated_legacy_json_field_conflicts",
4827                &self.deprecated_legacy_json_field_conflicts,
4828            )
4829            .field("features", &self.features)
4830            .field("uninterpreted_option", &self.uninterpreted_option)
4831            .finish()
4832    }
4833}
4834impl MessageOptions {
4835    /// Protobuf type URL for this message, for use with `Any::pack` and
4836    /// `Any::unpack_if`.
4837    ///
4838    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4839    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.MessageOptions";
4840}
4841impl ::buffa::DefaultInstance for MessageOptions {
4842    fn default_instance() -> &'static Self {
4843        static VALUE: ::buffa::__private::OnceBox<MessageOptions> = ::buffa::__private::OnceBox::new();
4844        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4845    }
4846}
4847impl ::buffa::Message for MessageOptions {
4848    /// Returns the total encoded size in bytes.
4849    ///
4850    /// The result is a `u32`; the protobuf specification requires all
4851    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4852    /// compliant message will never overflow this type.
4853    #[allow(clippy::let_and_return)]
4854    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4855        #[allow(unused_imports)]
4856        use ::buffa::Enumeration as _;
4857        let mut size = 0u32;
4858        if self.message_set_wire_format.is_some() {
4859            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4860        }
4861        if self.no_standard_descriptor_accessor.is_some() {
4862            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4863        }
4864        if self.deprecated.is_some() {
4865            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4866        }
4867        if self.map_entry.is_some() {
4868            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4869        }
4870        if self.deprecated_legacy_json_field_conflicts.is_some() {
4871            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4872        }
4873        if self.features.is_set() {
4874            let __slot = __cache.reserve();
4875            let inner_size = self.features.compute_size(__cache);
4876            __cache.set(__slot, inner_size);
4877            size
4878                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4879                    + inner_size;
4880        }
4881        for v in &self.uninterpreted_option {
4882            let __slot = __cache.reserve();
4883            let inner_size = v.compute_size(__cache);
4884            __cache.set(__slot, inner_size);
4885            size
4886                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4887                    + inner_size;
4888        }
4889        size += self.__buffa_unknown_fields.encoded_len() as u32;
4890        size
4891    }
4892    fn write_to(
4893        &self,
4894        __cache: &mut ::buffa::SizeCache,
4895        buf: &mut impl ::buffa::bytes::BufMut,
4896    ) {
4897        #[allow(unused_imports)]
4898        use ::buffa::Enumeration as _;
4899        if let Some(v) = self.message_set_wire_format {
4900            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
4901                .encode(buf);
4902            ::buffa::types::encode_bool(v, buf);
4903        }
4904        if let Some(v) = self.no_standard_descriptor_accessor {
4905            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
4906                .encode(buf);
4907            ::buffa::types::encode_bool(v, buf);
4908        }
4909        if let Some(v) = self.deprecated {
4910            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
4911                .encode(buf);
4912            ::buffa::types::encode_bool(v, buf);
4913        }
4914        if let Some(v) = self.map_entry {
4915            ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
4916                .encode(buf);
4917            ::buffa::types::encode_bool(v, buf);
4918        }
4919        if let Some(v) = self.deprecated_legacy_json_field_conflicts {
4920            ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
4921                .encode(buf);
4922            ::buffa::types::encode_bool(v, buf);
4923        }
4924        if self.features.is_set() {
4925            ::buffa::encoding::Tag::new(
4926                    12u32,
4927                    ::buffa::encoding::WireType::LengthDelimited,
4928                )
4929                .encode(buf);
4930            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4931            self.features.write_to(__cache, buf);
4932        }
4933        for v in &self.uninterpreted_option {
4934            ::buffa::encoding::Tag::new(
4935                    999u32,
4936                    ::buffa::encoding::WireType::LengthDelimited,
4937                )
4938                .encode(buf);
4939            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4940            v.write_to(__cache, buf);
4941        }
4942        self.__buffa_unknown_fields.write_to(buf);
4943    }
4944    fn merge_field(
4945        &mut self,
4946        tag: ::buffa::encoding::Tag,
4947        buf: &mut impl ::buffa::bytes::Buf,
4948        depth: u32,
4949    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4950        #[allow(unused_imports)]
4951        use ::buffa::bytes::Buf as _;
4952        #[allow(unused_imports)]
4953        use ::buffa::Enumeration as _;
4954        match tag.field_number() {
4955            1u32 => {
4956                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4957                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4958                        field_number: 1u32,
4959                        expected: 0u8,
4960                        actual: tag.wire_type() as u8,
4961                    });
4962                }
4963                self.message_set_wire_format = ::core::option::Option::Some(
4964                    ::buffa::types::decode_bool(buf)?,
4965                );
4966            }
4967            2u32 => {
4968                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4969                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4970                        field_number: 2u32,
4971                        expected: 0u8,
4972                        actual: tag.wire_type() as u8,
4973                    });
4974                }
4975                self.no_standard_descriptor_accessor = ::core::option::Option::Some(
4976                    ::buffa::types::decode_bool(buf)?,
4977                );
4978            }
4979            3u32 => {
4980                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4981                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4982                        field_number: 3u32,
4983                        expected: 0u8,
4984                        actual: tag.wire_type() as u8,
4985                    });
4986                }
4987                self.deprecated = ::core::option::Option::Some(
4988                    ::buffa::types::decode_bool(buf)?,
4989                );
4990            }
4991            7u32 => {
4992                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4993                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4994                        field_number: 7u32,
4995                        expected: 0u8,
4996                        actual: tag.wire_type() as u8,
4997                    });
4998                }
4999                self.map_entry = ::core::option::Option::Some(
5000                    ::buffa::types::decode_bool(buf)?,
5001                );
5002            }
5003            11u32 => {
5004                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5005                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5006                        field_number: 11u32,
5007                        expected: 0u8,
5008                        actual: tag.wire_type() as u8,
5009                    });
5010                }
5011                self.deprecated_legacy_json_field_conflicts = ::core::option::Option::Some(
5012                    ::buffa::types::decode_bool(buf)?,
5013                );
5014            }
5015            12u32 => {
5016                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5017                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5018                        field_number: 12u32,
5019                        expected: 2u8,
5020                        actual: tag.wire_type() as u8,
5021                    });
5022                }
5023                ::buffa::Message::merge_length_delimited(
5024                    self.features.get_or_insert_default(),
5025                    buf,
5026                    depth,
5027                )?;
5028            }
5029            999u32 => {
5030                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5031                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5032                        field_number: 999u32,
5033                        expected: 2u8,
5034                        actual: tag.wire_type() as u8,
5035                    });
5036                }
5037                let mut elem = ::core::default::Default::default();
5038                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
5039                self.uninterpreted_option.push(elem);
5040            }
5041            _ => {
5042                self.__buffa_unknown_fields
5043                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5044            }
5045        }
5046        ::core::result::Result::Ok(())
5047    }
5048    fn clear(&mut self) {
5049        self.message_set_wire_format = ::core::option::Option::None;
5050        self.no_standard_descriptor_accessor = ::core::option::Option::None;
5051        self.deprecated = ::core::option::Option::None;
5052        self.map_entry = ::core::option::Option::None;
5053        self.deprecated_legacy_json_field_conflicts = ::core::option::Option::None;
5054        self.features = ::buffa::MessageField::none();
5055        self.uninterpreted_option.clear();
5056        self.__buffa_unknown_fields.clear();
5057    }
5058}
5059impl ::buffa::ExtensionSet for MessageOptions {
5060    const PROTO_FQN: &'static str = "google.protobuf.MessageOptions";
5061    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5062        &self.__buffa_unknown_fields
5063    }
5064    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5065        &mut self.__buffa_unknown_fields
5066    }
5067}
5068#[derive(Clone, PartialEq, Default)]
5069pub struct FieldOptions {
5070    /// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
5071    /// The ctype option instructs the C++ code generator to use a different
5072    /// representation of the field than it normally would.  See the specific
5073    /// options below.  This option is only implemented to support use of
5074    /// \[ctype=CORD\] and \[ctype=STRING\] (the default) on non-repeated fields of
5075    /// type "bytes" in the open source release.
5076    /// TODO: make ctype actually deprecated.
5077    ///
5078    /// Field 1: `ctype`
5079    pub ctype: ::core::option::Option<field_options::CType>,
5080    /// The packed option can be enabled for repeated primitive fields to enable
5081    /// a more efficient representation on the wire. Rather than repeatedly
5082    /// writing the tag and type for each element, the entire array is encoded as
5083    /// a single length-delimited blob. In proto3, only explicit setting it to
5084    /// false will avoid using packed encoding.  This option is prohibited in
5085    /// Editions, but the `repeated_field_encoding` feature can be used to control
5086    /// the behavior.
5087    ///
5088    /// Field 2: `packed`
5089    pub packed: ::core::option::Option<bool>,
5090    /// The jstype option determines the JavaScript type used for values of the
5091    /// field.  The option is permitted only for 64 bit integral and fixed types
5092    /// (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING
5093    /// is represented as JavaScript string, which avoids loss of precision that
5094    /// can happen when a large value is converted to a floating point JavaScript.
5095    /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
5096    /// use the JavaScript "number" type.  The behavior of the default option
5097    /// JS_NORMAL is implementation dependent.
5098    ///
5099    /// This option is an enum to permit additional types to be added, e.g.
5100    /// goog.math.Integer.
5101    ///
5102    /// Field 6: `jstype`
5103    pub jstype: ::core::option::Option<field_options::JSType>,
5104    /// Should this field be parsed lazily?  Lazy applies only to message-type
5105    /// fields.  It means that when the outer message is initially parsed, the
5106    /// inner message's contents will not be parsed but instead stored in encoded
5107    /// form.  The inner message will actually be parsed when it is first accessed.
5108    ///
5109    /// This is only a hint.  Implementations are free to choose whether to use
5110    /// eager or lazy parsing regardless of the value of this option.  However,
5111    /// setting this option true suggests that the protocol author believes that
5112    /// using lazy parsing on this field is worth the additional bookkeeping
5113    /// overhead typically needed to implement it.
5114    ///
5115    /// This option does not affect the public interface of any generated code;
5116    /// all method signatures remain the same.  Furthermore, thread-safety of the
5117    /// interface is not affected by this option; const methods remain safe to
5118    /// call from multiple threads concurrently, while non-const methods continue
5119    /// to require exclusive access.
5120    ///
5121    /// Note that lazy message fields are still eagerly verified to check
5122    /// ill-formed wireformat or missing required fields. Calling IsInitialized()
5123    /// on the outer message would fail if the inner message has missing required
5124    /// fields. Failed verification would result in parsing failure (except when
5125    /// uninitialized messages are acceptable).
5126    ///
5127    /// Field 5: `lazy`
5128    pub lazy: ::core::option::Option<bool>,
5129    /// unverified_lazy does no correctness checks on the byte stream. This should
5130    /// only be used where lazy with verification is prohibitive for performance
5131    /// reasons.
5132    ///
5133    /// Field 15: `unverified_lazy`
5134    pub unverified_lazy: ::core::option::Option<bool>,
5135    /// Is this field deprecated?
5136    /// Depending on the target platform, this can emit Deprecated annotations
5137    /// for accessors, or it will be completely ignored; in the very least, this
5138    /// is a formalization for deprecating fields.
5139    ///
5140    /// Field 3: `deprecated`
5141    pub deprecated: ::core::option::Option<bool>,
5142    /// DEPRECATED. DO NOT USE!
5143    /// For Google-internal migration only. Do not use.
5144    ///
5145    /// Field 10: `weak`
5146    pub weak: ::core::option::Option<bool>,
5147    /// Indicate that the field value should not be printed out when using debug
5148    /// formats, e.g. when the field contains sensitive credentials.
5149    ///
5150    /// Field 16: `debug_redact`
5151    pub debug_redact: ::core::option::Option<bool>,
5152    /// Field 17: `retention`
5153    pub retention: ::core::option::Option<field_options::OptionRetention>,
5154    /// Field 19: `targets`
5155    pub targets: ::buffa::alloc::vec::Vec<field_options::OptionTargetType>,
5156    /// Field 20: `edition_defaults`
5157    pub edition_defaults: ::buffa::alloc::vec::Vec<field_options::EditionDefault>,
5158    /// Any features defined in the specific edition.
5159    /// WARNING: This field should only be used by protobuf plugins or special
5160    /// cases like the proto compiler. Other uses are discouraged and
5161    /// developers should rely on the protoreflect APIs for their client language.
5162    ///
5163    /// Field 21: `features`
5164    pub features: ::buffa::MessageField<FeatureSet>,
5165    /// Field 22: `feature_support`
5166    pub feature_support: ::buffa::MessageField<field_options::FeatureSupport>,
5167    /// The parser stores options it doesn't recognize here. See above.
5168    ///
5169    /// Field 999: `uninterpreted_option`
5170    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
5171    #[doc(hidden)]
5172    pub __buffa_unknown_fields: ::buffa::UnknownFields,
5173}
5174impl ::core::fmt::Debug for FieldOptions {
5175    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5176        f.debug_struct("FieldOptions")
5177            .field("ctype", &self.ctype)
5178            .field("packed", &self.packed)
5179            .field("jstype", &self.jstype)
5180            .field("lazy", &self.lazy)
5181            .field("unverified_lazy", &self.unverified_lazy)
5182            .field("deprecated", &self.deprecated)
5183            .field("weak", &self.weak)
5184            .field("debug_redact", &self.debug_redact)
5185            .field("retention", &self.retention)
5186            .field("targets", &self.targets)
5187            .field("edition_defaults", &self.edition_defaults)
5188            .field("features", &self.features)
5189            .field("feature_support", &self.feature_support)
5190            .field("uninterpreted_option", &self.uninterpreted_option)
5191            .finish()
5192    }
5193}
5194impl FieldOptions {
5195    /// Protobuf type URL for this message, for use with `Any::pack` and
5196    /// `Any::unpack_if`.
5197    ///
5198    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5199    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FieldOptions";
5200}
5201impl ::buffa::DefaultInstance for FieldOptions {
5202    fn default_instance() -> &'static Self {
5203        static VALUE: ::buffa::__private::OnceBox<FieldOptions> = ::buffa::__private::OnceBox::new();
5204        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5205    }
5206}
5207impl ::buffa::Message for FieldOptions {
5208    /// Returns the total encoded size in bytes.
5209    ///
5210    /// The result is a `u32`; the protobuf specification requires all
5211    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5212    /// compliant message will never overflow this type.
5213    #[allow(clippy::let_and_return)]
5214    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5215        #[allow(unused_imports)]
5216        use ::buffa::Enumeration as _;
5217        let mut size = 0u32;
5218        if let Some(ref v) = self.ctype {
5219            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5220        }
5221        if self.packed.is_some() {
5222            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5223        }
5224        if self.deprecated.is_some() {
5225            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5226        }
5227        if self.lazy.is_some() {
5228            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5229        }
5230        if let Some(ref v) = self.jstype {
5231            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5232        }
5233        if self.weak.is_some() {
5234            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5235        }
5236        if self.unverified_lazy.is_some() {
5237            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5238        }
5239        if self.debug_redact.is_some() {
5240            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5241        }
5242        if let Some(ref v) = self.retention {
5243            size += 2u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5244        }
5245        for v in &self.targets {
5246            size += 2u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5247        }
5248        for v in &self.edition_defaults {
5249            let __slot = __cache.reserve();
5250            let inner_size = v.compute_size(__cache);
5251            __cache.set(__slot, inner_size);
5252            size
5253                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5254                    + inner_size;
5255        }
5256        if self.features.is_set() {
5257            let __slot = __cache.reserve();
5258            let inner_size = self.features.compute_size(__cache);
5259            __cache.set(__slot, inner_size);
5260            size
5261                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5262                    + inner_size;
5263        }
5264        if self.feature_support.is_set() {
5265            let __slot = __cache.reserve();
5266            let inner_size = self.feature_support.compute_size(__cache);
5267            __cache.set(__slot, inner_size);
5268            size
5269                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5270                    + inner_size;
5271        }
5272        for v in &self.uninterpreted_option {
5273            let __slot = __cache.reserve();
5274            let inner_size = v.compute_size(__cache);
5275            __cache.set(__slot, inner_size);
5276            size
5277                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5278                    + inner_size;
5279        }
5280        size += self.__buffa_unknown_fields.encoded_len() as u32;
5281        size
5282    }
5283    fn write_to(
5284        &self,
5285        __cache: &mut ::buffa::SizeCache,
5286        buf: &mut impl ::buffa::bytes::BufMut,
5287    ) {
5288        #[allow(unused_imports)]
5289        use ::buffa::Enumeration as _;
5290        if let Some(ref v) = self.ctype {
5291            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
5292                .encode(buf);
5293            ::buffa::types::encode_int32(v.to_i32(), buf);
5294        }
5295        if let Some(v) = self.packed {
5296            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
5297                .encode(buf);
5298            ::buffa::types::encode_bool(v, buf);
5299        }
5300        if let Some(v) = self.deprecated {
5301            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
5302                .encode(buf);
5303            ::buffa::types::encode_bool(v, buf);
5304        }
5305        if let Some(v) = self.lazy {
5306            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
5307                .encode(buf);
5308            ::buffa::types::encode_bool(v, buf);
5309        }
5310        if let Some(ref v) = self.jstype {
5311            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
5312                .encode(buf);
5313            ::buffa::types::encode_int32(v.to_i32(), buf);
5314        }
5315        if let Some(v) = self.weak {
5316            ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
5317                .encode(buf);
5318            ::buffa::types::encode_bool(v, buf);
5319        }
5320        if let Some(v) = self.unverified_lazy {
5321            ::buffa::encoding::Tag::new(15u32, ::buffa::encoding::WireType::Varint)
5322                .encode(buf);
5323            ::buffa::types::encode_bool(v, buf);
5324        }
5325        if let Some(v) = self.debug_redact {
5326            ::buffa::encoding::Tag::new(16u32, ::buffa::encoding::WireType::Varint)
5327                .encode(buf);
5328            ::buffa::types::encode_bool(v, buf);
5329        }
5330        if let Some(ref v) = self.retention {
5331            ::buffa::encoding::Tag::new(17u32, ::buffa::encoding::WireType::Varint)
5332                .encode(buf);
5333            ::buffa::types::encode_int32(v.to_i32(), buf);
5334        }
5335        for v in &self.targets {
5336            ::buffa::encoding::Tag::new(19u32, ::buffa::encoding::WireType::Varint)
5337                .encode(buf);
5338            ::buffa::types::encode_int32(v.to_i32(), buf);
5339        }
5340        for v in &self.edition_defaults {
5341            ::buffa::encoding::Tag::new(
5342                    20u32,
5343                    ::buffa::encoding::WireType::LengthDelimited,
5344                )
5345                .encode(buf);
5346            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5347            v.write_to(__cache, buf);
5348        }
5349        if self.features.is_set() {
5350            ::buffa::encoding::Tag::new(
5351                    21u32,
5352                    ::buffa::encoding::WireType::LengthDelimited,
5353                )
5354                .encode(buf);
5355            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5356            self.features.write_to(__cache, buf);
5357        }
5358        if self.feature_support.is_set() {
5359            ::buffa::encoding::Tag::new(
5360                    22u32,
5361                    ::buffa::encoding::WireType::LengthDelimited,
5362                )
5363                .encode(buf);
5364            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5365            self.feature_support.write_to(__cache, buf);
5366        }
5367        for v in &self.uninterpreted_option {
5368            ::buffa::encoding::Tag::new(
5369                    999u32,
5370                    ::buffa::encoding::WireType::LengthDelimited,
5371                )
5372                .encode(buf);
5373            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5374            v.write_to(__cache, buf);
5375        }
5376        self.__buffa_unknown_fields.write_to(buf);
5377    }
5378    fn merge_field(
5379        &mut self,
5380        tag: ::buffa::encoding::Tag,
5381        buf: &mut impl ::buffa::bytes::Buf,
5382        depth: u32,
5383    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5384        #[allow(unused_imports)]
5385        use ::buffa::bytes::Buf as _;
5386        #[allow(unused_imports)]
5387        use ::buffa::Enumeration as _;
5388        match tag.field_number() {
5389            1u32 => {
5390                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5391                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5392                        field_number: 1u32,
5393                        expected: 0u8,
5394                        actual: tag.wire_type() as u8,
5395                    });
5396                }
5397                let __raw = ::buffa::types::decode_int32(buf)?;
5398                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5399                    __raw,
5400                ) {
5401                    self.ctype = ::core::option::Option::Some(__v);
5402                } else {
5403                    self.__buffa_unknown_fields
5404                        .push(::buffa::UnknownField {
5405                            number: 1u32,
5406                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5407                        });
5408                }
5409            }
5410            2u32 => {
5411                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5412                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5413                        field_number: 2u32,
5414                        expected: 0u8,
5415                        actual: tag.wire_type() as u8,
5416                    });
5417                }
5418                self.packed = ::core::option::Option::Some(
5419                    ::buffa::types::decode_bool(buf)?,
5420                );
5421            }
5422            3u32 => {
5423                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5424                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5425                        field_number: 3u32,
5426                        expected: 0u8,
5427                        actual: tag.wire_type() as u8,
5428                    });
5429                }
5430                self.deprecated = ::core::option::Option::Some(
5431                    ::buffa::types::decode_bool(buf)?,
5432                );
5433            }
5434            5u32 => {
5435                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5436                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5437                        field_number: 5u32,
5438                        expected: 0u8,
5439                        actual: tag.wire_type() as u8,
5440                    });
5441                }
5442                self.lazy = ::core::option::Option::Some(
5443                    ::buffa::types::decode_bool(buf)?,
5444                );
5445            }
5446            6u32 => {
5447                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5448                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5449                        field_number: 6u32,
5450                        expected: 0u8,
5451                        actual: tag.wire_type() as u8,
5452                    });
5453                }
5454                let __raw = ::buffa::types::decode_int32(buf)?;
5455                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5456                    __raw,
5457                ) {
5458                    self.jstype = ::core::option::Option::Some(__v);
5459                } else {
5460                    self.__buffa_unknown_fields
5461                        .push(::buffa::UnknownField {
5462                            number: 6u32,
5463                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5464                        });
5465                }
5466            }
5467            10u32 => {
5468                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5469                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5470                        field_number: 10u32,
5471                        expected: 0u8,
5472                        actual: tag.wire_type() as u8,
5473                    });
5474                }
5475                self.weak = ::core::option::Option::Some(
5476                    ::buffa::types::decode_bool(buf)?,
5477                );
5478            }
5479            15u32 => {
5480                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5481                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5482                        field_number: 15u32,
5483                        expected: 0u8,
5484                        actual: tag.wire_type() as u8,
5485                    });
5486                }
5487                self.unverified_lazy = ::core::option::Option::Some(
5488                    ::buffa::types::decode_bool(buf)?,
5489                );
5490            }
5491            16u32 => {
5492                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5493                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5494                        field_number: 16u32,
5495                        expected: 0u8,
5496                        actual: tag.wire_type() as u8,
5497                    });
5498                }
5499                self.debug_redact = ::core::option::Option::Some(
5500                    ::buffa::types::decode_bool(buf)?,
5501                );
5502            }
5503            17u32 => {
5504                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5505                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5506                        field_number: 17u32,
5507                        expected: 0u8,
5508                        actual: tag.wire_type() as u8,
5509                    });
5510                }
5511                let __raw = ::buffa::types::decode_int32(buf)?;
5512                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5513                    __raw,
5514                ) {
5515                    self.retention = ::core::option::Option::Some(__v);
5516                } else {
5517                    self.__buffa_unknown_fields
5518                        .push(::buffa::UnknownField {
5519                            number: 17u32,
5520                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5521                        });
5522                }
5523            }
5524            19u32 => {
5525                if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
5526                    let len = ::buffa::encoding::decode_varint(buf)?;
5527                    let len = usize::try_from(len)
5528                        .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
5529                    if buf.remaining() < len {
5530                        return ::core::result::Result::Err(
5531                            ::buffa::DecodeError::UnexpectedEof,
5532                        );
5533                    }
5534                    self.targets.reserve(len);
5535                    let mut limited = buf.take(len);
5536                    while limited.has_remaining() {
5537                        let __raw = ::buffa::types::decode_int32(&mut limited)?;
5538                        if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5539                            __raw,
5540                        ) {
5541                            self.targets.push(__v);
5542                        } else {
5543                            self.__buffa_unknown_fields
5544                                .push(::buffa::UnknownField {
5545                                    number: 19u32,
5546                                    data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5547                                });
5548                        }
5549                    }
5550                    let leftover = limited.remaining();
5551                    if leftover > 0 {
5552                        limited.advance(leftover);
5553                    }
5554                } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
5555                    let __raw = ::buffa::types::decode_int32(buf)?;
5556                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
5557                        __raw,
5558                    ) {
5559                        self.targets.push(__v);
5560                    } else {
5561                        self.__buffa_unknown_fields
5562                            .push(::buffa::UnknownField {
5563                                number: 19u32,
5564                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
5565                            });
5566                    }
5567                } else {
5568                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5569                        field_number: 19u32,
5570                        expected: 2u8,
5571                        actual: tag.wire_type() as u8,
5572                    });
5573                }
5574            }
5575            20u32 => {
5576                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5577                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5578                        field_number: 20u32,
5579                        expected: 2u8,
5580                        actual: tag.wire_type() as u8,
5581                    });
5582                }
5583                let mut elem = ::core::default::Default::default();
5584                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
5585                self.edition_defaults.push(elem);
5586            }
5587            21u32 => {
5588                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5589                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5590                        field_number: 21u32,
5591                        expected: 2u8,
5592                        actual: tag.wire_type() as u8,
5593                    });
5594                }
5595                ::buffa::Message::merge_length_delimited(
5596                    self.features.get_or_insert_default(),
5597                    buf,
5598                    depth,
5599                )?;
5600            }
5601            22u32 => {
5602                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5603                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5604                        field_number: 22u32,
5605                        expected: 2u8,
5606                        actual: tag.wire_type() as u8,
5607                    });
5608                }
5609                ::buffa::Message::merge_length_delimited(
5610                    self.feature_support.get_or_insert_default(),
5611                    buf,
5612                    depth,
5613                )?;
5614            }
5615            999u32 => {
5616                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
5617                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5618                        field_number: 999u32,
5619                        expected: 2u8,
5620                        actual: tag.wire_type() as u8,
5621                    });
5622                }
5623                let mut elem = ::core::default::Default::default();
5624                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
5625                self.uninterpreted_option.push(elem);
5626            }
5627            _ => {
5628                self.__buffa_unknown_fields
5629                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
5630            }
5631        }
5632        ::core::result::Result::Ok(())
5633    }
5634    fn clear(&mut self) {
5635        self.ctype = ::core::option::Option::None;
5636        self.packed = ::core::option::Option::None;
5637        self.deprecated = ::core::option::Option::None;
5638        self.lazy = ::core::option::Option::None;
5639        self.jstype = ::core::option::Option::None;
5640        self.weak = ::core::option::Option::None;
5641        self.unverified_lazy = ::core::option::Option::None;
5642        self.debug_redact = ::core::option::Option::None;
5643        self.retention = ::core::option::Option::None;
5644        self.targets.clear();
5645        self.edition_defaults.clear();
5646        self.features = ::buffa::MessageField::none();
5647        self.feature_support = ::buffa::MessageField::none();
5648        self.uninterpreted_option.clear();
5649        self.__buffa_unknown_fields.clear();
5650    }
5651}
5652impl ::buffa::ExtensionSet for FieldOptions {
5653    const PROTO_FQN: &'static str = "google.protobuf.FieldOptions";
5654    fn unknown_fields(&self) -> &::buffa::UnknownFields {
5655        &self.__buffa_unknown_fields
5656    }
5657    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5658        &mut self.__buffa_unknown_fields
5659    }
5660}
5661pub mod field_options {
5662    #[allow(unused_imports)]
5663    use super::*;
5664    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5665    #[repr(i32)]
5666    pub enum CType {
5667        /// Default mode.
5668        STRING = 0i32,
5669        /// The option \[ctype=CORD\] may be applied to a non-repeated field of type
5670        /// "bytes". It indicates that in C++, the data should be stored in a Cord
5671        /// instead of a string.  For very large strings, this may reduce memory
5672        /// fragmentation. It may also allow better performance when parsing from a
5673        /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then
5674        /// alias the original buffer.
5675        CORD = 1i32,
5676        STRING_PIECE = 2i32,
5677    }
5678    impl ::core::default::Default for CType {
5679        fn default() -> Self {
5680            Self::STRING
5681        }
5682    }
5683    impl ::buffa::Enumeration for CType {
5684        fn from_i32(value: i32) -> ::core::option::Option<Self> {
5685            match value {
5686                0i32 => ::core::option::Option::Some(Self::STRING),
5687                1i32 => ::core::option::Option::Some(Self::CORD),
5688                2i32 => ::core::option::Option::Some(Self::STRING_PIECE),
5689                _ => ::core::option::Option::None,
5690            }
5691        }
5692        fn to_i32(&self) -> i32 {
5693            *self as i32
5694        }
5695        fn proto_name(&self) -> &'static str {
5696            match self {
5697                Self::STRING => "STRING",
5698                Self::CORD => "CORD",
5699                Self::STRING_PIECE => "STRING_PIECE",
5700            }
5701        }
5702        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
5703            match name {
5704                "STRING" => ::core::option::Option::Some(Self::STRING),
5705                "CORD" => ::core::option::Option::Some(Self::CORD),
5706                "STRING_PIECE" => ::core::option::Option::Some(Self::STRING_PIECE),
5707                _ => ::core::option::Option::None,
5708            }
5709        }
5710        fn values() -> &'static [Self] {
5711            &[Self::STRING, Self::CORD, Self::STRING_PIECE]
5712        }
5713    }
5714    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5715    #[repr(i32)]
5716    pub enum JSType {
5717        /// Use the default type.
5718        JS_NORMAL = 0i32,
5719        /// Use JavaScript strings.
5720        JS_STRING = 1i32,
5721        /// Use JavaScript numbers.
5722        JS_NUMBER = 2i32,
5723    }
5724    impl ::core::default::Default for JSType {
5725        fn default() -> Self {
5726            Self::JS_NORMAL
5727        }
5728    }
5729    impl ::buffa::Enumeration for JSType {
5730        fn from_i32(value: i32) -> ::core::option::Option<Self> {
5731            match value {
5732                0i32 => ::core::option::Option::Some(Self::JS_NORMAL),
5733                1i32 => ::core::option::Option::Some(Self::JS_STRING),
5734                2i32 => ::core::option::Option::Some(Self::JS_NUMBER),
5735                _ => ::core::option::Option::None,
5736            }
5737        }
5738        fn to_i32(&self) -> i32 {
5739            *self as i32
5740        }
5741        fn proto_name(&self) -> &'static str {
5742            match self {
5743                Self::JS_NORMAL => "JS_NORMAL",
5744                Self::JS_STRING => "JS_STRING",
5745                Self::JS_NUMBER => "JS_NUMBER",
5746            }
5747        }
5748        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
5749            match name {
5750                "JS_NORMAL" => ::core::option::Option::Some(Self::JS_NORMAL),
5751                "JS_STRING" => ::core::option::Option::Some(Self::JS_STRING),
5752                "JS_NUMBER" => ::core::option::Option::Some(Self::JS_NUMBER),
5753                _ => ::core::option::Option::None,
5754            }
5755        }
5756        fn values() -> &'static [Self] {
5757            &[Self::JS_NORMAL, Self::JS_STRING, Self::JS_NUMBER]
5758        }
5759    }
5760    /// If set to RETENTION_SOURCE, the option will be omitted from the binary.
5761    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5762    #[repr(i32)]
5763    pub enum OptionRetention {
5764        RETENTION_UNKNOWN = 0i32,
5765        RETENTION_RUNTIME = 1i32,
5766        RETENTION_SOURCE = 2i32,
5767    }
5768    impl ::core::default::Default for OptionRetention {
5769        fn default() -> Self {
5770            Self::RETENTION_UNKNOWN
5771        }
5772    }
5773    impl ::buffa::Enumeration for OptionRetention {
5774        fn from_i32(value: i32) -> ::core::option::Option<Self> {
5775            match value {
5776                0i32 => ::core::option::Option::Some(Self::RETENTION_UNKNOWN),
5777                1i32 => ::core::option::Option::Some(Self::RETENTION_RUNTIME),
5778                2i32 => ::core::option::Option::Some(Self::RETENTION_SOURCE),
5779                _ => ::core::option::Option::None,
5780            }
5781        }
5782        fn to_i32(&self) -> i32 {
5783            *self as i32
5784        }
5785        fn proto_name(&self) -> &'static str {
5786            match self {
5787                Self::RETENTION_UNKNOWN => "RETENTION_UNKNOWN",
5788                Self::RETENTION_RUNTIME => "RETENTION_RUNTIME",
5789                Self::RETENTION_SOURCE => "RETENTION_SOURCE",
5790            }
5791        }
5792        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
5793            match name {
5794                "RETENTION_UNKNOWN" => {
5795                    ::core::option::Option::Some(Self::RETENTION_UNKNOWN)
5796                }
5797                "RETENTION_RUNTIME" => {
5798                    ::core::option::Option::Some(Self::RETENTION_RUNTIME)
5799                }
5800                "RETENTION_SOURCE" => {
5801                    ::core::option::Option::Some(Self::RETENTION_SOURCE)
5802                }
5803                _ => ::core::option::Option::None,
5804            }
5805        }
5806        fn values() -> &'static [Self] {
5807            &[Self::RETENTION_UNKNOWN, Self::RETENTION_RUNTIME, Self::RETENTION_SOURCE]
5808        }
5809    }
5810    /// This indicates the types of entities that the field may apply to when used
5811    /// as an option. If it is unset, then the field may be freely used as an
5812    /// option on any kind of entity.
5813    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5814    #[repr(i32)]
5815    pub enum OptionTargetType {
5816        TARGET_TYPE_UNKNOWN = 0i32,
5817        TARGET_TYPE_FILE = 1i32,
5818        TARGET_TYPE_EXTENSION_RANGE = 2i32,
5819        TARGET_TYPE_MESSAGE = 3i32,
5820        TARGET_TYPE_FIELD = 4i32,
5821        TARGET_TYPE_ONEOF = 5i32,
5822        TARGET_TYPE_ENUM = 6i32,
5823        TARGET_TYPE_ENUM_ENTRY = 7i32,
5824        TARGET_TYPE_SERVICE = 8i32,
5825        TARGET_TYPE_METHOD = 9i32,
5826    }
5827    impl ::core::default::Default for OptionTargetType {
5828        fn default() -> Self {
5829            Self::TARGET_TYPE_UNKNOWN
5830        }
5831    }
5832    impl ::buffa::Enumeration for OptionTargetType {
5833        fn from_i32(value: i32) -> ::core::option::Option<Self> {
5834            match value {
5835                0i32 => ::core::option::Option::Some(Self::TARGET_TYPE_UNKNOWN),
5836                1i32 => ::core::option::Option::Some(Self::TARGET_TYPE_FILE),
5837                2i32 => ::core::option::Option::Some(Self::TARGET_TYPE_EXTENSION_RANGE),
5838                3i32 => ::core::option::Option::Some(Self::TARGET_TYPE_MESSAGE),
5839                4i32 => ::core::option::Option::Some(Self::TARGET_TYPE_FIELD),
5840                5i32 => ::core::option::Option::Some(Self::TARGET_TYPE_ONEOF),
5841                6i32 => ::core::option::Option::Some(Self::TARGET_TYPE_ENUM),
5842                7i32 => ::core::option::Option::Some(Self::TARGET_TYPE_ENUM_ENTRY),
5843                8i32 => ::core::option::Option::Some(Self::TARGET_TYPE_SERVICE),
5844                9i32 => ::core::option::Option::Some(Self::TARGET_TYPE_METHOD),
5845                _ => ::core::option::Option::None,
5846            }
5847        }
5848        fn to_i32(&self) -> i32 {
5849            *self as i32
5850        }
5851        fn proto_name(&self) -> &'static str {
5852            match self {
5853                Self::TARGET_TYPE_UNKNOWN => "TARGET_TYPE_UNKNOWN",
5854                Self::TARGET_TYPE_FILE => "TARGET_TYPE_FILE",
5855                Self::TARGET_TYPE_EXTENSION_RANGE => "TARGET_TYPE_EXTENSION_RANGE",
5856                Self::TARGET_TYPE_MESSAGE => "TARGET_TYPE_MESSAGE",
5857                Self::TARGET_TYPE_FIELD => "TARGET_TYPE_FIELD",
5858                Self::TARGET_TYPE_ONEOF => "TARGET_TYPE_ONEOF",
5859                Self::TARGET_TYPE_ENUM => "TARGET_TYPE_ENUM",
5860                Self::TARGET_TYPE_ENUM_ENTRY => "TARGET_TYPE_ENUM_ENTRY",
5861                Self::TARGET_TYPE_SERVICE => "TARGET_TYPE_SERVICE",
5862                Self::TARGET_TYPE_METHOD => "TARGET_TYPE_METHOD",
5863            }
5864        }
5865        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
5866            match name {
5867                "TARGET_TYPE_UNKNOWN" => {
5868                    ::core::option::Option::Some(Self::TARGET_TYPE_UNKNOWN)
5869                }
5870                "TARGET_TYPE_FILE" => {
5871                    ::core::option::Option::Some(Self::TARGET_TYPE_FILE)
5872                }
5873                "TARGET_TYPE_EXTENSION_RANGE" => {
5874                    ::core::option::Option::Some(Self::TARGET_TYPE_EXTENSION_RANGE)
5875                }
5876                "TARGET_TYPE_MESSAGE" => {
5877                    ::core::option::Option::Some(Self::TARGET_TYPE_MESSAGE)
5878                }
5879                "TARGET_TYPE_FIELD" => {
5880                    ::core::option::Option::Some(Self::TARGET_TYPE_FIELD)
5881                }
5882                "TARGET_TYPE_ONEOF" => {
5883                    ::core::option::Option::Some(Self::TARGET_TYPE_ONEOF)
5884                }
5885                "TARGET_TYPE_ENUM" => {
5886                    ::core::option::Option::Some(Self::TARGET_TYPE_ENUM)
5887                }
5888                "TARGET_TYPE_ENUM_ENTRY" => {
5889                    ::core::option::Option::Some(Self::TARGET_TYPE_ENUM_ENTRY)
5890                }
5891                "TARGET_TYPE_SERVICE" => {
5892                    ::core::option::Option::Some(Self::TARGET_TYPE_SERVICE)
5893                }
5894                "TARGET_TYPE_METHOD" => {
5895                    ::core::option::Option::Some(Self::TARGET_TYPE_METHOD)
5896                }
5897                _ => ::core::option::Option::None,
5898            }
5899        }
5900        fn values() -> &'static [Self] {
5901            &[
5902                Self::TARGET_TYPE_UNKNOWN,
5903                Self::TARGET_TYPE_FILE,
5904                Self::TARGET_TYPE_EXTENSION_RANGE,
5905                Self::TARGET_TYPE_MESSAGE,
5906                Self::TARGET_TYPE_FIELD,
5907                Self::TARGET_TYPE_ONEOF,
5908                Self::TARGET_TYPE_ENUM,
5909                Self::TARGET_TYPE_ENUM_ENTRY,
5910                Self::TARGET_TYPE_SERVICE,
5911                Self::TARGET_TYPE_METHOD,
5912            ]
5913        }
5914    }
5915    #[derive(Clone, PartialEq, Default)]
5916    pub struct EditionDefault {
5917        /// Field 3: `edition`
5918        pub edition: ::core::option::Option<super::Edition>,
5919        /// Textproto value.
5920        ///
5921        /// Field 2: `value`
5922        pub value: ::core::option::Option<::buffa::alloc::string::String>,
5923        #[doc(hidden)]
5924        pub __buffa_unknown_fields: ::buffa::UnknownFields,
5925    }
5926    impl ::core::fmt::Debug for EditionDefault {
5927        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5928            f.debug_struct("EditionDefault")
5929                .field("edition", &self.edition)
5930                .field("value", &self.value)
5931                .finish()
5932        }
5933    }
5934    impl EditionDefault {
5935        /// Protobuf type URL for this message, for use with `Any::pack` and
5936        /// `Any::unpack_if`.
5937        ///
5938        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
5939        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FieldOptions.EditionDefault";
5940    }
5941    impl ::buffa::DefaultInstance for EditionDefault {
5942        fn default_instance() -> &'static Self {
5943            static VALUE: ::buffa::__private::OnceBox<EditionDefault> = ::buffa::__private::OnceBox::new();
5944            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
5945        }
5946    }
5947    impl ::buffa::Message for EditionDefault {
5948        /// Returns the total encoded size in bytes.
5949        ///
5950        /// The result is a `u32`; the protobuf specification requires all
5951        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
5952        /// compliant message will never overflow this type.
5953        #[allow(clippy::let_and_return)]
5954        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5955            #[allow(unused_imports)]
5956            use ::buffa::Enumeration as _;
5957            let mut size = 0u32;
5958            if let Some(ref v) = self.value {
5959                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5960            }
5961            if let Some(ref v) = self.edition {
5962                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
5963            }
5964            size += self.__buffa_unknown_fields.encoded_len() as u32;
5965            size
5966        }
5967        fn write_to(
5968            &self,
5969            _cache: &mut ::buffa::SizeCache,
5970            buf: &mut impl ::buffa::bytes::BufMut,
5971        ) {
5972            #[allow(unused_imports)]
5973            use ::buffa::Enumeration as _;
5974            if let Some(ref v) = self.value {
5975                ::buffa::encoding::Tag::new(
5976                        2u32,
5977                        ::buffa::encoding::WireType::LengthDelimited,
5978                    )
5979                    .encode(buf);
5980                ::buffa::types::encode_string(v, buf);
5981            }
5982            if let Some(ref v) = self.edition {
5983                ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
5984                    .encode(buf);
5985                ::buffa::types::encode_int32(v.to_i32(), buf);
5986            }
5987            self.__buffa_unknown_fields.write_to(buf);
5988        }
5989        fn merge_field(
5990            &mut self,
5991            tag: ::buffa::encoding::Tag,
5992            buf: &mut impl ::buffa::bytes::Buf,
5993            depth: u32,
5994        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5995            #[allow(unused_imports)]
5996            use ::buffa::bytes::Buf as _;
5997            #[allow(unused_imports)]
5998            use ::buffa::Enumeration as _;
5999            match tag.field_number() {
6000                2u32 => {
6001                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6002                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6003                            field_number: 2u32,
6004                            expected: 2u8,
6005                            actual: tag.wire_type() as u8,
6006                        });
6007                    }
6008                    ::buffa::types::merge_string(
6009                        self
6010                            .value
6011                            .get_or_insert_with(::buffa::alloc::string::String::new),
6012                        buf,
6013                    )?;
6014                }
6015                3u32 => {
6016                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6017                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6018                            field_number: 3u32,
6019                            expected: 0u8,
6020                            actual: tag.wire_type() as u8,
6021                        });
6022                    }
6023                    let __raw = ::buffa::types::decode_int32(buf)?;
6024                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
6025                        __raw,
6026                    ) {
6027                        self.edition = ::core::option::Option::Some(__v);
6028                    } else {
6029                        self.__buffa_unknown_fields
6030                            .push(::buffa::UnknownField {
6031                                number: 3u32,
6032                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
6033                            });
6034                    }
6035                }
6036                _ => {
6037                    self.__buffa_unknown_fields
6038                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6039                }
6040            }
6041            ::core::result::Result::Ok(())
6042        }
6043        fn clear(&mut self) {
6044            self.value = ::core::option::Option::None;
6045            self.edition = ::core::option::Option::None;
6046            self.__buffa_unknown_fields.clear();
6047        }
6048    }
6049    impl ::buffa::ExtensionSet for EditionDefault {
6050        const PROTO_FQN: &'static str = "google.protobuf.FieldOptions.EditionDefault";
6051        fn unknown_fields(&self) -> &::buffa::UnknownFields {
6052            &self.__buffa_unknown_fields
6053        }
6054        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6055            &mut self.__buffa_unknown_fields
6056        }
6057    }
6058    /// Information about the support window of a feature.
6059    #[derive(Clone, PartialEq, Default)]
6060    pub struct FeatureSupport {
6061        /// The edition that this feature was first available in.  In editions
6062        /// earlier than this one, the default assigned to EDITION_LEGACY will be
6063        /// used, and proto files will not be able to override it.
6064        ///
6065        /// Field 1: `edition_introduced`
6066        pub edition_introduced: ::core::option::Option<super::Edition>,
6067        /// The edition this feature becomes deprecated in.  Using this after this
6068        /// edition may trigger warnings.
6069        ///
6070        /// Field 2: `edition_deprecated`
6071        pub edition_deprecated: ::core::option::Option<super::Edition>,
6072        /// The deprecation warning text if this feature is used after the edition it
6073        /// was marked deprecated in.
6074        ///
6075        /// Field 3: `deprecation_warning`
6076        pub deprecation_warning: ::core::option::Option<::buffa::alloc::string::String>,
6077        /// The edition this feature is no longer available in.  In editions after
6078        /// this one, the last default assigned will be used, and proto files will
6079        /// not be able to override it.
6080        ///
6081        /// Field 4: `edition_removed`
6082        pub edition_removed: ::core::option::Option<super::Edition>,
6083        #[doc(hidden)]
6084        pub __buffa_unknown_fields: ::buffa::UnknownFields,
6085    }
6086    impl ::core::fmt::Debug for FeatureSupport {
6087        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6088            f.debug_struct("FeatureSupport")
6089                .field("edition_introduced", &self.edition_introduced)
6090                .field("edition_deprecated", &self.edition_deprecated)
6091                .field("deprecation_warning", &self.deprecation_warning)
6092                .field("edition_removed", &self.edition_removed)
6093                .finish()
6094        }
6095    }
6096    impl FeatureSupport {
6097        /// Protobuf type URL for this message, for use with `Any::pack` and
6098        /// `Any::unpack_if`.
6099        ///
6100        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6101        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FieldOptions.FeatureSupport";
6102    }
6103    impl ::buffa::DefaultInstance for FeatureSupport {
6104        fn default_instance() -> &'static Self {
6105            static VALUE: ::buffa::__private::OnceBox<FeatureSupport> = ::buffa::__private::OnceBox::new();
6106            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6107        }
6108    }
6109    impl ::buffa::Message for FeatureSupport {
6110        /// Returns the total encoded size in bytes.
6111        ///
6112        /// The result is a `u32`; the protobuf specification requires all
6113        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6114        /// compliant message will never overflow this type.
6115        #[allow(clippy::let_and_return)]
6116        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6117            #[allow(unused_imports)]
6118            use ::buffa::Enumeration as _;
6119            let mut size = 0u32;
6120            if let Some(ref v) = self.edition_introduced {
6121                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
6122            }
6123            if let Some(ref v) = self.edition_deprecated {
6124                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
6125            }
6126            if let Some(ref v) = self.deprecation_warning {
6127                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6128            }
6129            if let Some(ref v) = self.edition_removed {
6130                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
6131            }
6132            size += self.__buffa_unknown_fields.encoded_len() as u32;
6133            size
6134        }
6135        fn write_to(
6136            &self,
6137            _cache: &mut ::buffa::SizeCache,
6138            buf: &mut impl ::buffa::bytes::BufMut,
6139        ) {
6140            #[allow(unused_imports)]
6141            use ::buffa::Enumeration as _;
6142            if let Some(ref v) = self.edition_introduced {
6143                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
6144                    .encode(buf);
6145                ::buffa::types::encode_int32(v.to_i32(), buf);
6146            }
6147            if let Some(ref v) = self.edition_deprecated {
6148                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
6149                    .encode(buf);
6150                ::buffa::types::encode_int32(v.to_i32(), buf);
6151            }
6152            if let Some(ref v) = self.deprecation_warning {
6153                ::buffa::encoding::Tag::new(
6154                        3u32,
6155                        ::buffa::encoding::WireType::LengthDelimited,
6156                    )
6157                    .encode(buf);
6158                ::buffa::types::encode_string(v, buf);
6159            }
6160            if let Some(ref v) = self.edition_removed {
6161                ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
6162                    .encode(buf);
6163                ::buffa::types::encode_int32(v.to_i32(), buf);
6164            }
6165            self.__buffa_unknown_fields.write_to(buf);
6166        }
6167        fn merge_field(
6168            &mut self,
6169            tag: ::buffa::encoding::Tag,
6170            buf: &mut impl ::buffa::bytes::Buf,
6171            depth: u32,
6172        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6173            #[allow(unused_imports)]
6174            use ::buffa::bytes::Buf as _;
6175            #[allow(unused_imports)]
6176            use ::buffa::Enumeration as _;
6177            match tag.field_number() {
6178                1u32 => {
6179                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6180                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6181                            field_number: 1u32,
6182                            expected: 0u8,
6183                            actual: tag.wire_type() as u8,
6184                        });
6185                    }
6186                    let __raw = ::buffa::types::decode_int32(buf)?;
6187                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
6188                        __raw,
6189                    ) {
6190                        self.edition_introduced = ::core::option::Option::Some(__v);
6191                    } else {
6192                        self.__buffa_unknown_fields
6193                            .push(::buffa::UnknownField {
6194                                number: 1u32,
6195                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
6196                            });
6197                    }
6198                }
6199                2u32 => {
6200                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6201                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6202                            field_number: 2u32,
6203                            expected: 0u8,
6204                            actual: tag.wire_type() as u8,
6205                        });
6206                    }
6207                    let __raw = ::buffa::types::decode_int32(buf)?;
6208                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
6209                        __raw,
6210                    ) {
6211                        self.edition_deprecated = ::core::option::Option::Some(__v);
6212                    } else {
6213                        self.__buffa_unknown_fields
6214                            .push(::buffa::UnknownField {
6215                                number: 2u32,
6216                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
6217                            });
6218                    }
6219                }
6220                3u32 => {
6221                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6222                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6223                            field_number: 3u32,
6224                            expected: 2u8,
6225                            actual: tag.wire_type() as u8,
6226                        });
6227                    }
6228                    ::buffa::types::merge_string(
6229                        self
6230                            .deprecation_warning
6231                            .get_or_insert_with(::buffa::alloc::string::String::new),
6232                        buf,
6233                    )?;
6234                }
6235                4u32 => {
6236                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6237                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6238                            field_number: 4u32,
6239                            expected: 0u8,
6240                            actual: tag.wire_type() as u8,
6241                        });
6242                    }
6243                    let __raw = ::buffa::types::decode_int32(buf)?;
6244                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
6245                        __raw,
6246                    ) {
6247                        self.edition_removed = ::core::option::Option::Some(__v);
6248                    } else {
6249                        self.__buffa_unknown_fields
6250                            .push(::buffa::UnknownField {
6251                                number: 4u32,
6252                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
6253                            });
6254                    }
6255                }
6256                _ => {
6257                    self.__buffa_unknown_fields
6258                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6259                }
6260            }
6261            ::core::result::Result::Ok(())
6262        }
6263        fn clear(&mut self) {
6264            self.edition_introduced = ::core::option::Option::None;
6265            self.edition_deprecated = ::core::option::Option::None;
6266            self.deprecation_warning = ::core::option::Option::None;
6267            self.edition_removed = ::core::option::Option::None;
6268            self.__buffa_unknown_fields.clear();
6269        }
6270    }
6271    impl ::buffa::ExtensionSet for FeatureSupport {
6272        const PROTO_FQN: &'static str = "google.protobuf.FieldOptions.FeatureSupport";
6273        fn unknown_fields(&self) -> &::buffa::UnknownFields {
6274            &self.__buffa_unknown_fields
6275        }
6276        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6277            &mut self.__buffa_unknown_fields
6278        }
6279    }
6280}
6281#[derive(Clone, PartialEq, Default)]
6282pub struct OneofOptions {
6283    /// Any features defined in the specific edition.
6284    /// WARNING: This field should only be used by protobuf plugins or special
6285    /// cases like the proto compiler. Other uses are discouraged and
6286    /// developers should rely on the protoreflect APIs for their client language.
6287    ///
6288    /// Field 1: `features`
6289    pub features: ::buffa::MessageField<FeatureSet>,
6290    /// The parser stores options it doesn't recognize here. See above.
6291    ///
6292    /// Field 999: `uninterpreted_option`
6293    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
6294    #[doc(hidden)]
6295    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6296}
6297impl ::core::fmt::Debug for OneofOptions {
6298    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6299        f.debug_struct("OneofOptions")
6300            .field("features", &self.features)
6301            .field("uninterpreted_option", &self.uninterpreted_option)
6302            .finish()
6303    }
6304}
6305impl OneofOptions {
6306    /// Protobuf type URL for this message, for use with `Any::pack` and
6307    /// `Any::unpack_if`.
6308    ///
6309    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6310    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.OneofOptions";
6311}
6312impl ::buffa::DefaultInstance for OneofOptions {
6313    fn default_instance() -> &'static Self {
6314        static VALUE: ::buffa::__private::OnceBox<OneofOptions> = ::buffa::__private::OnceBox::new();
6315        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6316    }
6317}
6318impl ::buffa::Message for OneofOptions {
6319    /// Returns the total encoded size in bytes.
6320    ///
6321    /// The result is a `u32`; the protobuf specification requires all
6322    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6323    /// compliant message will never overflow this type.
6324    #[allow(clippy::let_and_return)]
6325    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6326        #[allow(unused_imports)]
6327        use ::buffa::Enumeration as _;
6328        let mut size = 0u32;
6329        if self.features.is_set() {
6330            let __slot = __cache.reserve();
6331            let inner_size = self.features.compute_size(__cache);
6332            __cache.set(__slot, inner_size);
6333            size
6334                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6335                    + inner_size;
6336        }
6337        for v in &self.uninterpreted_option {
6338            let __slot = __cache.reserve();
6339            let inner_size = v.compute_size(__cache);
6340            __cache.set(__slot, inner_size);
6341            size
6342                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6343                    + inner_size;
6344        }
6345        size += self.__buffa_unknown_fields.encoded_len() as u32;
6346        size
6347    }
6348    fn write_to(
6349        &self,
6350        __cache: &mut ::buffa::SizeCache,
6351        buf: &mut impl ::buffa::bytes::BufMut,
6352    ) {
6353        #[allow(unused_imports)]
6354        use ::buffa::Enumeration as _;
6355        if self.features.is_set() {
6356            ::buffa::encoding::Tag::new(
6357                    1u32,
6358                    ::buffa::encoding::WireType::LengthDelimited,
6359                )
6360                .encode(buf);
6361            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6362            self.features.write_to(__cache, buf);
6363        }
6364        for v in &self.uninterpreted_option {
6365            ::buffa::encoding::Tag::new(
6366                    999u32,
6367                    ::buffa::encoding::WireType::LengthDelimited,
6368                )
6369                .encode(buf);
6370            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6371            v.write_to(__cache, buf);
6372        }
6373        self.__buffa_unknown_fields.write_to(buf);
6374    }
6375    fn merge_field(
6376        &mut self,
6377        tag: ::buffa::encoding::Tag,
6378        buf: &mut impl ::buffa::bytes::Buf,
6379        depth: u32,
6380    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6381        #[allow(unused_imports)]
6382        use ::buffa::bytes::Buf as _;
6383        #[allow(unused_imports)]
6384        use ::buffa::Enumeration as _;
6385        match tag.field_number() {
6386            1u32 => {
6387                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6388                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6389                        field_number: 1u32,
6390                        expected: 2u8,
6391                        actual: tag.wire_type() as u8,
6392                    });
6393                }
6394                ::buffa::Message::merge_length_delimited(
6395                    self.features.get_or_insert_default(),
6396                    buf,
6397                    depth,
6398                )?;
6399            }
6400            999u32 => {
6401                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6402                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6403                        field_number: 999u32,
6404                        expected: 2u8,
6405                        actual: tag.wire_type() as u8,
6406                    });
6407                }
6408                let mut elem = ::core::default::Default::default();
6409                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6410                self.uninterpreted_option.push(elem);
6411            }
6412            _ => {
6413                self.__buffa_unknown_fields
6414                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6415            }
6416        }
6417        ::core::result::Result::Ok(())
6418    }
6419    fn clear(&mut self) {
6420        self.features = ::buffa::MessageField::none();
6421        self.uninterpreted_option.clear();
6422        self.__buffa_unknown_fields.clear();
6423    }
6424}
6425impl ::buffa::ExtensionSet for OneofOptions {
6426    const PROTO_FQN: &'static str = "google.protobuf.OneofOptions";
6427    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6428        &self.__buffa_unknown_fields
6429    }
6430    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6431        &mut self.__buffa_unknown_fields
6432    }
6433}
6434#[derive(Clone, PartialEq, Default)]
6435pub struct EnumOptions {
6436    /// Set this option to true to allow mapping different tag names to the same
6437    /// value.
6438    ///
6439    /// Field 2: `allow_alias`
6440    pub allow_alias: ::core::option::Option<bool>,
6441    /// Is this enum deprecated?
6442    /// Depending on the target platform, this can emit Deprecated annotations
6443    /// for the enum, or it will be completely ignored; in the very least, this
6444    /// is a formalization for deprecating enums.
6445    ///
6446    /// Field 3: `deprecated`
6447    pub deprecated: ::core::option::Option<bool>,
6448    /// Enable the legacy handling of JSON field name conflicts.  This lowercases
6449    /// and strips underscored from the fields before comparison in proto3 only.
6450    /// The new behavior takes `json_name` into account and applies to proto2 as
6451    /// well.
6452    /// TODO Remove this legacy behavior once downstream teams have
6453    /// had time to migrate.
6454    ///
6455    /// Field 6: `deprecated_legacy_json_field_conflicts`
6456    pub deprecated_legacy_json_field_conflicts: ::core::option::Option<bool>,
6457    /// Any features defined in the specific edition.
6458    /// WARNING: This field should only be used by protobuf plugins or special
6459    /// cases like the proto compiler. Other uses are discouraged and
6460    /// developers should rely on the protoreflect APIs for their client language.
6461    ///
6462    /// Field 7: `features`
6463    pub features: ::buffa::MessageField<FeatureSet>,
6464    /// The parser stores options it doesn't recognize here. See above.
6465    ///
6466    /// Field 999: `uninterpreted_option`
6467    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
6468    #[doc(hidden)]
6469    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6470}
6471impl ::core::fmt::Debug for EnumOptions {
6472    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6473        f.debug_struct("EnumOptions")
6474            .field("allow_alias", &self.allow_alias)
6475            .field("deprecated", &self.deprecated)
6476            .field(
6477                "deprecated_legacy_json_field_conflicts",
6478                &self.deprecated_legacy_json_field_conflicts,
6479            )
6480            .field("features", &self.features)
6481            .field("uninterpreted_option", &self.uninterpreted_option)
6482            .finish()
6483    }
6484}
6485impl EnumOptions {
6486    /// Protobuf type URL for this message, for use with `Any::pack` and
6487    /// `Any::unpack_if`.
6488    ///
6489    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6490    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumOptions";
6491}
6492impl ::buffa::DefaultInstance for EnumOptions {
6493    fn default_instance() -> &'static Self {
6494        static VALUE: ::buffa::__private::OnceBox<EnumOptions> = ::buffa::__private::OnceBox::new();
6495        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6496    }
6497}
6498impl ::buffa::Message for EnumOptions {
6499    /// Returns the total encoded size in bytes.
6500    ///
6501    /// The result is a `u32`; the protobuf specification requires all
6502    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6503    /// compliant message will never overflow this type.
6504    #[allow(clippy::let_and_return)]
6505    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6506        #[allow(unused_imports)]
6507        use ::buffa::Enumeration as _;
6508        let mut size = 0u32;
6509        if self.allow_alias.is_some() {
6510            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6511        }
6512        if self.deprecated.is_some() {
6513            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6514        }
6515        if self.deprecated_legacy_json_field_conflicts.is_some() {
6516            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6517        }
6518        if self.features.is_set() {
6519            let __slot = __cache.reserve();
6520            let inner_size = self.features.compute_size(__cache);
6521            __cache.set(__slot, inner_size);
6522            size
6523                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6524                    + inner_size;
6525        }
6526        for v in &self.uninterpreted_option {
6527            let __slot = __cache.reserve();
6528            let inner_size = v.compute_size(__cache);
6529            __cache.set(__slot, inner_size);
6530            size
6531                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6532                    + inner_size;
6533        }
6534        size += self.__buffa_unknown_fields.encoded_len() as u32;
6535        size
6536    }
6537    fn write_to(
6538        &self,
6539        __cache: &mut ::buffa::SizeCache,
6540        buf: &mut impl ::buffa::bytes::BufMut,
6541    ) {
6542        #[allow(unused_imports)]
6543        use ::buffa::Enumeration as _;
6544        if let Some(v) = self.allow_alias {
6545            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
6546                .encode(buf);
6547            ::buffa::types::encode_bool(v, buf);
6548        }
6549        if let Some(v) = self.deprecated {
6550            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
6551                .encode(buf);
6552            ::buffa::types::encode_bool(v, buf);
6553        }
6554        if let Some(v) = self.deprecated_legacy_json_field_conflicts {
6555            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
6556                .encode(buf);
6557            ::buffa::types::encode_bool(v, buf);
6558        }
6559        if self.features.is_set() {
6560            ::buffa::encoding::Tag::new(
6561                    7u32,
6562                    ::buffa::encoding::WireType::LengthDelimited,
6563                )
6564                .encode(buf);
6565            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6566            self.features.write_to(__cache, buf);
6567        }
6568        for v in &self.uninterpreted_option {
6569            ::buffa::encoding::Tag::new(
6570                    999u32,
6571                    ::buffa::encoding::WireType::LengthDelimited,
6572                )
6573                .encode(buf);
6574            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6575            v.write_to(__cache, buf);
6576        }
6577        self.__buffa_unknown_fields.write_to(buf);
6578    }
6579    fn merge_field(
6580        &mut self,
6581        tag: ::buffa::encoding::Tag,
6582        buf: &mut impl ::buffa::bytes::Buf,
6583        depth: u32,
6584    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6585        #[allow(unused_imports)]
6586        use ::buffa::bytes::Buf as _;
6587        #[allow(unused_imports)]
6588        use ::buffa::Enumeration as _;
6589        match tag.field_number() {
6590            2u32 => {
6591                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6592                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6593                        field_number: 2u32,
6594                        expected: 0u8,
6595                        actual: tag.wire_type() as u8,
6596                    });
6597                }
6598                self.allow_alias = ::core::option::Option::Some(
6599                    ::buffa::types::decode_bool(buf)?,
6600                );
6601            }
6602            3u32 => {
6603                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6604                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6605                        field_number: 3u32,
6606                        expected: 0u8,
6607                        actual: tag.wire_type() as u8,
6608                    });
6609                }
6610                self.deprecated = ::core::option::Option::Some(
6611                    ::buffa::types::decode_bool(buf)?,
6612                );
6613            }
6614            6u32 => {
6615                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6616                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6617                        field_number: 6u32,
6618                        expected: 0u8,
6619                        actual: tag.wire_type() as u8,
6620                    });
6621                }
6622                self.deprecated_legacy_json_field_conflicts = ::core::option::Option::Some(
6623                    ::buffa::types::decode_bool(buf)?,
6624                );
6625            }
6626            7u32 => {
6627                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6628                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6629                        field_number: 7u32,
6630                        expected: 2u8,
6631                        actual: tag.wire_type() as u8,
6632                    });
6633                }
6634                ::buffa::Message::merge_length_delimited(
6635                    self.features.get_or_insert_default(),
6636                    buf,
6637                    depth,
6638                )?;
6639            }
6640            999u32 => {
6641                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6642                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6643                        field_number: 999u32,
6644                        expected: 2u8,
6645                        actual: tag.wire_type() as u8,
6646                    });
6647                }
6648                let mut elem = ::core::default::Default::default();
6649                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6650                self.uninterpreted_option.push(elem);
6651            }
6652            _ => {
6653                self.__buffa_unknown_fields
6654                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6655            }
6656        }
6657        ::core::result::Result::Ok(())
6658    }
6659    fn clear(&mut self) {
6660        self.allow_alias = ::core::option::Option::None;
6661        self.deprecated = ::core::option::Option::None;
6662        self.deprecated_legacy_json_field_conflicts = ::core::option::Option::None;
6663        self.features = ::buffa::MessageField::none();
6664        self.uninterpreted_option.clear();
6665        self.__buffa_unknown_fields.clear();
6666    }
6667}
6668impl ::buffa::ExtensionSet for EnumOptions {
6669    const PROTO_FQN: &'static str = "google.protobuf.EnumOptions";
6670    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6671        &self.__buffa_unknown_fields
6672    }
6673    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6674        &mut self.__buffa_unknown_fields
6675    }
6676}
6677#[derive(Clone, PartialEq, Default)]
6678pub struct EnumValueOptions {
6679    /// Is this enum value deprecated?
6680    /// Depending on the target platform, this can emit Deprecated annotations
6681    /// for the enum value, or it will be completely ignored; in the very least,
6682    /// this is a formalization for deprecating enum values.
6683    ///
6684    /// Field 1: `deprecated`
6685    pub deprecated: ::core::option::Option<bool>,
6686    /// Any features defined in the specific edition.
6687    /// WARNING: This field should only be used by protobuf plugins or special
6688    /// cases like the proto compiler. Other uses are discouraged and
6689    /// developers should rely on the protoreflect APIs for their client language.
6690    ///
6691    /// Field 2: `features`
6692    pub features: ::buffa::MessageField<FeatureSet>,
6693    /// Indicate that fields annotated with this enum value should not be printed
6694    /// out when using debug formats, e.g. when the field contains sensitive
6695    /// credentials.
6696    ///
6697    /// Field 3: `debug_redact`
6698    pub debug_redact: ::core::option::Option<bool>,
6699    /// Information about the support window of a feature value.
6700    ///
6701    /// Field 4: `feature_support`
6702    pub feature_support: ::buffa::MessageField<field_options::FeatureSupport>,
6703    /// The parser stores options it doesn't recognize here. See above.
6704    ///
6705    /// Field 999: `uninterpreted_option`
6706    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
6707    #[doc(hidden)]
6708    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6709}
6710impl ::core::fmt::Debug for EnumValueOptions {
6711    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6712        f.debug_struct("EnumValueOptions")
6713            .field("deprecated", &self.deprecated)
6714            .field("features", &self.features)
6715            .field("debug_redact", &self.debug_redact)
6716            .field("feature_support", &self.feature_support)
6717            .field("uninterpreted_option", &self.uninterpreted_option)
6718            .finish()
6719    }
6720}
6721impl EnumValueOptions {
6722    /// Protobuf type URL for this message, for use with `Any::pack` and
6723    /// `Any::unpack_if`.
6724    ///
6725    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6726    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.EnumValueOptions";
6727}
6728impl ::buffa::DefaultInstance for EnumValueOptions {
6729    fn default_instance() -> &'static Self {
6730        static VALUE: ::buffa::__private::OnceBox<EnumValueOptions> = ::buffa::__private::OnceBox::new();
6731        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6732    }
6733}
6734impl ::buffa::Message for EnumValueOptions {
6735    /// Returns the total encoded size in bytes.
6736    ///
6737    /// The result is a `u32`; the protobuf specification requires all
6738    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6739    /// compliant message will never overflow this type.
6740    #[allow(clippy::let_and_return)]
6741    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6742        #[allow(unused_imports)]
6743        use ::buffa::Enumeration as _;
6744        let mut size = 0u32;
6745        if self.deprecated.is_some() {
6746            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6747        }
6748        if self.features.is_set() {
6749            let __slot = __cache.reserve();
6750            let inner_size = self.features.compute_size(__cache);
6751            __cache.set(__slot, inner_size);
6752            size
6753                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6754                    + inner_size;
6755        }
6756        if self.debug_redact.is_some() {
6757            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6758        }
6759        if self.feature_support.is_set() {
6760            let __slot = __cache.reserve();
6761            let inner_size = self.feature_support.compute_size(__cache);
6762            __cache.set(__slot, inner_size);
6763            size
6764                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6765                    + inner_size;
6766        }
6767        for v in &self.uninterpreted_option {
6768            let __slot = __cache.reserve();
6769            let inner_size = v.compute_size(__cache);
6770            __cache.set(__slot, inner_size);
6771            size
6772                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6773                    + inner_size;
6774        }
6775        size += self.__buffa_unknown_fields.encoded_len() as u32;
6776        size
6777    }
6778    fn write_to(
6779        &self,
6780        __cache: &mut ::buffa::SizeCache,
6781        buf: &mut impl ::buffa::bytes::BufMut,
6782    ) {
6783        #[allow(unused_imports)]
6784        use ::buffa::Enumeration as _;
6785        if let Some(v) = self.deprecated {
6786            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
6787                .encode(buf);
6788            ::buffa::types::encode_bool(v, buf);
6789        }
6790        if self.features.is_set() {
6791            ::buffa::encoding::Tag::new(
6792                    2u32,
6793                    ::buffa::encoding::WireType::LengthDelimited,
6794                )
6795                .encode(buf);
6796            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6797            self.features.write_to(__cache, buf);
6798        }
6799        if let Some(v) = self.debug_redact {
6800            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
6801                .encode(buf);
6802            ::buffa::types::encode_bool(v, buf);
6803        }
6804        if self.feature_support.is_set() {
6805            ::buffa::encoding::Tag::new(
6806                    4u32,
6807                    ::buffa::encoding::WireType::LengthDelimited,
6808                )
6809                .encode(buf);
6810            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6811            self.feature_support.write_to(__cache, buf);
6812        }
6813        for v in &self.uninterpreted_option {
6814            ::buffa::encoding::Tag::new(
6815                    999u32,
6816                    ::buffa::encoding::WireType::LengthDelimited,
6817                )
6818                .encode(buf);
6819            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6820            v.write_to(__cache, buf);
6821        }
6822        self.__buffa_unknown_fields.write_to(buf);
6823    }
6824    fn merge_field(
6825        &mut self,
6826        tag: ::buffa::encoding::Tag,
6827        buf: &mut impl ::buffa::bytes::Buf,
6828        depth: u32,
6829    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6830        #[allow(unused_imports)]
6831        use ::buffa::bytes::Buf as _;
6832        #[allow(unused_imports)]
6833        use ::buffa::Enumeration as _;
6834        match tag.field_number() {
6835            1u32 => {
6836                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6837                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6838                        field_number: 1u32,
6839                        expected: 0u8,
6840                        actual: tag.wire_type() as u8,
6841                    });
6842                }
6843                self.deprecated = ::core::option::Option::Some(
6844                    ::buffa::types::decode_bool(buf)?,
6845                );
6846            }
6847            2u32 => {
6848                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6849                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6850                        field_number: 2u32,
6851                        expected: 2u8,
6852                        actual: tag.wire_type() as u8,
6853                    });
6854                }
6855                ::buffa::Message::merge_length_delimited(
6856                    self.features.get_or_insert_default(),
6857                    buf,
6858                    depth,
6859                )?;
6860            }
6861            3u32 => {
6862                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6863                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6864                        field_number: 3u32,
6865                        expected: 0u8,
6866                        actual: tag.wire_type() as u8,
6867                    });
6868                }
6869                self.debug_redact = ::core::option::Option::Some(
6870                    ::buffa::types::decode_bool(buf)?,
6871                );
6872            }
6873            4u32 => {
6874                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6875                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6876                        field_number: 4u32,
6877                        expected: 2u8,
6878                        actual: tag.wire_type() as u8,
6879                    });
6880                }
6881                ::buffa::Message::merge_length_delimited(
6882                    self.feature_support.get_or_insert_default(),
6883                    buf,
6884                    depth,
6885                )?;
6886            }
6887            999u32 => {
6888                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
6889                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6890                        field_number: 999u32,
6891                        expected: 2u8,
6892                        actual: tag.wire_type() as u8,
6893                    });
6894                }
6895                let mut elem = ::core::default::Default::default();
6896                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
6897                self.uninterpreted_option.push(elem);
6898            }
6899            _ => {
6900                self.__buffa_unknown_fields
6901                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
6902            }
6903        }
6904        ::core::result::Result::Ok(())
6905    }
6906    fn clear(&mut self) {
6907        self.deprecated = ::core::option::Option::None;
6908        self.features = ::buffa::MessageField::none();
6909        self.debug_redact = ::core::option::Option::None;
6910        self.feature_support = ::buffa::MessageField::none();
6911        self.uninterpreted_option.clear();
6912        self.__buffa_unknown_fields.clear();
6913    }
6914}
6915impl ::buffa::ExtensionSet for EnumValueOptions {
6916    const PROTO_FQN: &'static str = "google.protobuf.EnumValueOptions";
6917    fn unknown_fields(&self) -> &::buffa::UnknownFields {
6918        &self.__buffa_unknown_fields
6919    }
6920    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6921        &mut self.__buffa_unknown_fields
6922    }
6923}
6924#[derive(Clone, PartialEq, Default)]
6925pub struct ServiceOptions {
6926    /// Any features defined in the specific edition.
6927    /// WARNING: This field should only be used by protobuf plugins or special
6928    /// cases like the proto compiler. Other uses are discouraged and
6929    /// developers should rely on the protoreflect APIs for their client language.
6930    ///
6931    /// Field 34: `features`
6932    pub features: ::buffa::MessageField<FeatureSet>,
6933    /// Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
6934    ///   framework.  We apologize for hoarding these numbers to ourselves, but
6935    ///   we were already using them long before we decided to release Protocol
6936    ///   Buffers.
6937    ///
6938    /// Is this service deprecated?
6939    /// Depending on the target platform, this can emit Deprecated annotations
6940    /// for the service, or it will be completely ignored; in the very least,
6941    /// this is a formalization for deprecating services.
6942    ///
6943    /// Field 33: `deprecated`
6944    pub deprecated: ::core::option::Option<bool>,
6945    /// The parser stores options it doesn't recognize here. See above.
6946    ///
6947    /// Field 999: `uninterpreted_option`
6948    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
6949    #[doc(hidden)]
6950    pub __buffa_unknown_fields: ::buffa::UnknownFields,
6951}
6952impl ::core::fmt::Debug for ServiceOptions {
6953    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6954        f.debug_struct("ServiceOptions")
6955            .field("features", &self.features)
6956            .field("deprecated", &self.deprecated)
6957            .field("uninterpreted_option", &self.uninterpreted_option)
6958            .finish()
6959    }
6960}
6961impl ServiceOptions {
6962    /// Protobuf type URL for this message, for use with `Any::pack` and
6963    /// `Any::unpack_if`.
6964    ///
6965    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
6966    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.ServiceOptions";
6967}
6968impl ::buffa::DefaultInstance for ServiceOptions {
6969    fn default_instance() -> &'static Self {
6970        static VALUE: ::buffa::__private::OnceBox<ServiceOptions> = ::buffa::__private::OnceBox::new();
6971        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
6972    }
6973}
6974impl ::buffa::Message for ServiceOptions {
6975    /// Returns the total encoded size in bytes.
6976    ///
6977    /// The result is a `u32`; the protobuf specification requires all
6978    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
6979    /// compliant message will never overflow this type.
6980    #[allow(clippy::let_and_return)]
6981    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6982        #[allow(unused_imports)]
6983        use ::buffa::Enumeration as _;
6984        let mut size = 0u32;
6985        if self.deprecated.is_some() {
6986            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6987        }
6988        if self.features.is_set() {
6989            let __slot = __cache.reserve();
6990            let inner_size = self.features.compute_size(__cache);
6991            __cache.set(__slot, inner_size);
6992            size
6993                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6994                    + inner_size;
6995        }
6996        for v in &self.uninterpreted_option {
6997            let __slot = __cache.reserve();
6998            let inner_size = v.compute_size(__cache);
6999            __cache.set(__slot, inner_size);
7000            size
7001                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7002                    + inner_size;
7003        }
7004        size += self.__buffa_unknown_fields.encoded_len() as u32;
7005        size
7006    }
7007    fn write_to(
7008        &self,
7009        __cache: &mut ::buffa::SizeCache,
7010        buf: &mut impl ::buffa::bytes::BufMut,
7011    ) {
7012        #[allow(unused_imports)]
7013        use ::buffa::Enumeration as _;
7014        if let Some(v) = self.deprecated {
7015            ::buffa::encoding::Tag::new(33u32, ::buffa::encoding::WireType::Varint)
7016                .encode(buf);
7017            ::buffa::types::encode_bool(v, buf);
7018        }
7019        if self.features.is_set() {
7020            ::buffa::encoding::Tag::new(
7021                    34u32,
7022                    ::buffa::encoding::WireType::LengthDelimited,
7023                )
7024                .encode(buf);
7025            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7026            self.features.write_to(__cache, buf);
7027        }
7028        for v in &self.uninterpreted_option {
7029            ::buffa::encoding::Tag::new(
7030                    999u32,
7031                    ::buffa::encoding::WireType::LengthDelimited,
7032                )
7033                .encode(buf);
7034            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7035            v.write_to(__cache, buf);
7036        }
7037        self.__buffa_unknown_fields.write_to(buf);
7038    }
7039    fn merge_field(
7040        &mut self,
7041        tag: ::buffa::encoding::Tag,
7042        buf: &mut impl ::buffa::bytes::Buf,
7043        depth: u32,
7044    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7045        #[allow(unused_imports)]
7046        use ::buffa::bytes::Buf as _;
7047        #[allow(unused_imports)]
7048        use ::buffa::Enumeration as _;
7049        match tag.field_number() {
7050            33u32 => {
7051                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7052                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7053                        field_number: 33u32,
7054                        expected: 0u8,
7055                        actual: tag.wire_type() as u8,
7056                    });
7057                }
7058                self.deprecated = ::core::option::Option::Some(
7059                    ::buffa::types::decode_bool(buf)?,
7060                );
7061            }
7062            34u32 => {
7063                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7064                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7065                        field_number: 34u32,
7066                        expected: 2u8,
7067                        actual: tag.wire_type() as u8,
7068                    });
7069                }
7070                ::buffa::Message::merge_length_delimited(
7071                    self.features.get_or_insert_default(),
7072                    buf,
7073                    depth,
7074                )?;
7075            }
7076            999u32 => {
7077                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7078                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7079                        field_number: 999u32,
7080                        expected: 2u8,
7081                        actual: tag.wire_type() as u8,
7082                    });
7083                }
7084                let mut elem = ::core::default::Default::default();
7085                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
7086                self.uninterpreted_option.push(elem);
7087            }
7088            _ => {
7089                self.__buffa_unknown_fields
7090                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7091            }
7092        }
7093        ::core::result::Result::Ok(())
7094    }
7095    fn clear(&mut self) {
7096        self.deprecated = ::core::option::Option::None;
7097        self.features = ::buffa::MessageField::none();
7098        self.uninterpreted_option.clear();
7099        self.__buffa_unknown_fields.clear();
7100    }
7101}
7102impl ::buffa::ExtensionSet for ServiceOptions {
7103    const PROTO_FQN: &'static str = "google.protobuf.ServiceOptions";
7104    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7105        &self.__buffa_unknown_fields
7106    }
7107    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7108        &mut self.__buffa_unknown_fields
7109    }
7110}
7111#[derive(Clone, PartialEq, Default)]
7112pub struct MethodOptions {
7113    /// Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
7114    ///   framework.  We apologize for hoarding these numbers to ourselves, but
7115    ///   we were already using them long before we decided to release Protocol
7116    ///   Buffers.
7117    ///
7118    /// Is this method deprecated?
7119    /// Depending on the target platform, this can emit Deprecated annotations
7120    /// for the method, or it will be completely ignored; in the very least,
7121    /// this is a formalization for deprecating methods.
7122    ///
7123    /// Field 33: `deprecated`
7124    pub deprecated: ::core::option::Option<bool>,
7125    /// Field 34: `idempotency_level`
7126    pub idempotency_level: ::core::option::Option<method_options::IdempotencyLevel>,
7127    /// Any features defined in the specific edition.
7128    /// WARNING: This field should only be used by protobuf plugins or special
7129    /// cases like the proto compiler. Other uses are discouraged and
7130    /// developers should rely on the protoreflect APIs for their client language.
7131    ///
7132    /// Field 35: `features`
7133    pub features: ::buffa::MessageField<FeatureSet>,
7134    /// The parser stores options it doesn't recognize here. See above.
7135    ///
7136    /// Field 999: `uninterpreted_option`
7137    pub uninterpreted_option: ::buffa::alloc::vec::Vec<UninterpretedOption>,
7138    #[doc(hidden)]
7139    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7140}
7141impl ::core::fmt::Debug for MethodOptions {
7142    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7143        f.debug_struct("MethodOptions")
7144            .field("deprecated", &self.deprecated)
7145            .field("idempotency_level", &self.idempotency_level)
7146            .field("features", &self.features)
7147            .field("uninterpreted_option", &self.uninterpreted_option)
7148            .finish()
7149    }
7150}
7151impl MethodOptions {
7152    /// Protobuf type URL for this message, for use with `Any::pack` and
7153    /// `Any::unpack_if`.
7154    ///
7155    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7156    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.MethodOptions";
7157}
7158impl ::buffa::DefaultInstance for MethodOptions {
7159    fn default_instance() -> &'static Self {
7160        static VALUE: ::buffa::__private::OnceBox<MethodOptions> = ::buffa::__private::OnceBox::new();
7161        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7162    }
7163}
7164impl ::buffa::Message for MethodOptions {
7165    /// Returns the total encoded size in bytes.
7166    ///
7167    /// The result is a `u32`; the protobuf specification requires all
7168    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7169    /// compliant message will never overflow this type.
7170    #[allow(clippy::let_and_return)]
7171    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7172        #[allow(unused_imports)]
7173        use ::buffa::Enumeration as _;
7174        let mut size = 0u32;
7175        if self.deprecated.is_some() {
7176            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7177        }
7178        if let Some(ref v) = self.idempotency_level {
7179            size += 2u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7180        }
7181        if self.features.is_set() {
7182            let __slot = __cache.reserve();
7183            let inner_size = self.features.compute_size(__cache);
7184            __cache.set(__slot, inner_size);
7185            size
7186                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7187                    + inner_size;
7188        }
7189        for v in &self.uninterpreted_option {
7190            let __slot = __cache.reserve();
7191            let inner_size = v.compute_size(__cache);
7192            __cache.set(__slot, inner_size);
7193            size
7194                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7195                    + inner_size;
7196        }
7197        size += self.__buffa_unknown_fields.encoded_len() as u32;
7198        size
7199    }
7200    fn write_to(
7201        &self,
7202        __cache: &mut ::buffa::SizeCache,
7203        buf: &mut impl ::buffa::bytes::BufMut,
7204    ) {
7205        #[allow(unused_imports)]
7206        use ::buffa::Enumeration as _;
7207        if let Some(v) = self.deprecated {
7208            ::buffa::encoding::Tag::new(33u32, ::buffa::encoding::WireType::Varint)
7209                .encode(buf);
7210            ::buffa::types::encode_bool(v, buf);
7211        }
7212        if let Some(ref v) = self.idempotency_level {
7213            ::buffa::encoding::Tag::new(34u32, ::buffa::encoding::WireType::Varint)
7214                .encode(buf);
7215            ::buffa::types::encode_int32(v.to_i32(), buf);
7216        }
7217        if self.features.is_set() {
7218            ::buffa::encoding::Tag::new(
7219                    35u32,
7220                    ::buffa::encoding::WireType::LengthDelimited,
7221                )
7222                .encode(buf);
7223            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7224            self.features.write_to(__cache, buf);
7225        }
7226        for v in &self.uninterpreted_option {
7227            ::buffa::encoding::Tag::new(
7228                    999u32,
7229                    ::buffa::encoding::WireType::LengthDelimited,
7230                )
7231                .encode(buf);
7232            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7233            v.write_to(__cache, buf);
7234        }
7235        self.__buffa_unknown_fields.write_to(buf);
7236    }
7237    fn merge_field(
7238        &mut self,
7239        tag: ::buffa::encoding::Tag,
7240        buf: &mut impl ::buffa::bytes::Buf,
7241        depth: u32,
7242    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7243        #[allow(unused_imports)]
7244        use ::buffa::bytes::Buf as _;
7245        #[allow(unused_imports)]
7246        use ::buffa::Enumeration as _;
7247        match tag.field_number() {
7248            33u32 => {
7249                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7250                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7251                        field_number: 33u32,
7252                        expected: 0u8,
7253                        actual: tag.wire_type() as u8,
7254                    });
7255                }
7256                self.deprecated = ::core::option::Option::Some(
7257                    ::buffa::types::decode_bool(buf)?,
7258                );
7259            }
7260            34u32 => {
7261                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7262                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7263                        field_number: 34u32,
7264                        expected: 0u8,
7265                        actual: tag.wire_type() as u8,
7266                    });
7267                }
7268                let __raw = ::buffa::types::decode_int32(buf)?;
7269                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7270                    __raw,
7271                ) {
7272                    self.idempotency_level = ::core::option::Option::Some(__v);
7273                } else {
7274                    self.__buffa_unknown_fields
7275                        .push(::buffa::UnknownField {
7276                            number: 34u32,
7277                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7278                        });
7279                }
7280            }
7281            35u32 => {
7282                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7283                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7284                        field_number: 35u32,
7285                        expected: 2u8,
7286                        actual: tag.wire_type() as u8,
7287                    });
7288                }
7289                ::buffa::Message::merge_length_delimited(
7290                    self.features.get_or_insert_default(),
7291                    buf,
7292                    depth,
7293                )?;
7294            }
7295            999u32 => {
7296                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7297                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7298                        field_number: 999u32,
7299                        expected: 2u8,
7300                        actual: tag.wire_type() as u8,
7301                    });
7302                }
7303                let mut elem = ::core::default::Default::default();
7304                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
7305                self.uninterpreted_option.push(elem);
7306            }
7307            _ => {
7308                self.__buffa_unknown_fields
7309                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7310            }
7311        }
7312        ::core::result::Result::Ok(())
7313    }
7314    fn clear(&mut self) {
7315        self.deprecated = ::core::option::Option::None;
7316        self.idempotency_level = ::core::option::Option::None;
7317        self.features = ::buffa::MessageField::none();
7318        self.uninterpreted_option.clear();
7319        self.__buffa_unknown_fields.clear();
7320    }
7321}
7322impl ::buffa::ExtensionSet for MethodOptions {
7323    const PROTO_FQN: &'static str = "google.protobuf.MethodOptions";
7324    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7325        &self.__buffa_unknown_fields
7326    }
7327    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7328        &mut self.__buffa_unknown_fields
7329    }
7330}
7331pub mod method_options {
7332    #[allow(unused_imports)]
7333    use super::*;
7334    /// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
7335    /// or neither? HTTP based RPC implementation may choose GET verb for safe
7336    /// methods, and PUT verb for idempotent methods instead of the default POST.
7337    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
7338    #[repr(i32)]
7339    pub enum IdempotencyLevel {
7340        IDEMPOTENCY_UNKNOWN = 0i32,
7341        /// implies idempotent
7342        NO_SIDE_EFFECTS = 1i32,
7343        /// idempotent, but may have side effects
7344        IDEMPOTENT = 2i32,
7345    }
7346    impl ::core::default::Default for IdempotencyLevel {
7347        fn default() -> Self {
7348            Self::IDEMPOTENCY_UNKNOWN
7349        }
7350    }
7351    impl ::buffa::Enumeration for IdempotencyLevel {
7352        fn from_i32(value: i32) -> ::core::option::Option<Self> {
7353            match value {
7354                0i32 => ::core::option::Option::Some(Self::IDEMPOTENCY_UNKNOWN),
7355                1i32 => ::core::option::Option::Some(Self::NO_SIDE_EFFECTS),
7356                2i32 => ::core::option::Option::Some(Self::IDEMPOTENT),
7357                _ => ::core::option::Option::None,
7358            }
7359        }
7360        fn to_i32(&self) -> i32 {
7361            *self as i32
7362        }
7363        fn proto_name(&self) -> &'static str {
7364            match self {
7365                Self::IDEMPOTENCY_UNKNOWN => "IDEMPOTENCY_UNKNOWN",
7366                Self::NO_SIDE_EFFECTS => "NO_SIDE_EFFECTS",
7367                Self::IDEMPOTENT => "IDEMPOTENT",
7368            }
7369        }
7370        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
7371            match name {
7372                "IDEMPOTENCY_UNKNOWN" => {
7373                    ::core::option::Option::Some(Self::IDEMPOTENCY_UNKNOWN)
7374                }
7375                "NO_SIDE_EFFECTS" => ::core::option::Option::Some(Self::NO_SIDE_EFFECTS),
7376                "IDEMPOTENT" => ::core::option::Option::Some(Self::IDEMPOTENT),
7377                _ => ::core::option::Option::None,
7378            }
7379        }
7380        fn values() -> &'static [Self] {
7381            &[Self::IDEMPOTENCY_UNKNOWN, Self::NO_SIDE_EFFECTS, Self::IDEMPOTENT]
7382        }
7383    }
7384}
7385/// A message representing a option the parser does not recognize. This only
7386/// appears in options protos created by the compiler::Parser class.
7387/// DescriptorPool resolves these when building Descriptor objects. Therefore,
7388/// options protos in descriptor objects (e.g. returned by Descriptor::options(),
7389/// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
7390/// in them.
7391#[derive(Clone, PartialEq, Default)]
7392pub struct UninterpretedOption {
7393    /// Field 2: `name`
7394    pub name: ::buffa::alloc::vec::Vec<uninterpreted_option::NamePart>,
7395    /// The value of the uninterpreted option, in whatever type the tokenizer
7396    /// identified it as during parsing. Exactly one of these should be set.
7397    ///
7398    /// Field 3: `identifier_value`
7399    pub identifier_value: ::core::option::Option<::buffa::alloc::string::String>,
7400    /// Field 4: `positive_int_value`
7401    pub positive_int_value: ::core::option::Option<u64>,
7402    /// Field 5: `negative_int_value`
7403    pub negative_int_value: ::core::option::Option<i64>,
7404    /// Field 6: `double_value`
7405    pub double_value: ::core::option::Option<f64>,
7406    /// Field 7: `string_value`
7407    pub string_value: ::core::option::Option<::buffa::alloc::vec::Vec<u8>>,
7408    /// Field 8: `aggregate_value`
7409    pub aggregate_value: ::core::option::Option<::buffa::alloc::string::String>,
7410    #[doc(hidden)]
7411    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7412}
7413impl ::core::fmt::Debug for UninterpretedOption {
7414    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7415        f.debug_struct("UninterpretedOption")
7416            .field("name", &self.name)
7417            .field("identifier_value", &self.identifier_value)
7418            .field("positive_int_value", &self.positive_int_value)
7419            .field("negative_int_value", &self.negative_int_value)
7420            .field("double_value", &self.double_value)
7421            .field("string_value", &self.string_value)
7422            .field("aggregate_value", &self.aggregate_value)
7423            .finish()
7424    }
7425}
7426impl UninterpretedOption {
7427    /// Protobuf type URL for this message, for use with `Any::pack` and
7428    /// `Any::unpack_if`.
7429    ///
7430    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7431    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UninterpretedOption";
7432}
7433impl ::buffa::DefaultInstance for UninterpretedOption {
7434    fn default_instance() -> &'static Self {
7435        static VALUE: ::buffa::__private::OnceBox<UninterpretedOption> = ::buffa::__private::OnceBox::new();
7436        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7437    }
7438}
7439impl ::buffa::Message for UninterpretedOption {
7440    /// Returns the total encoded size in bytes.
7441    ///
7442    /// The result is a `u32`; the protobuf specification requires all
7443    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7444    /// compliant message will never overflow this type.
7445    #[allow(clippy::let_and_return)]
7446    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7447        #[allow(unused_imports)]
7448        use ::buffa::Enumeration as _;
7449        let mut size = 0u32;
7450        for v in &self.name {
7451            let __slot = __cache.reserve();
7452            let inner_size = v.compute_size(__cache);
7453            __cache.set(__slot, inner_size);
7454            size
7455                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7456                    + inner_size;
7457        }
7458        if let Some(ref v) = self.identifier_value {
7459            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7460        }
7461        if let Some(v) = self.positive_int_value {
7462            size += 1u32 + ::buffa::types::uint64_encoded_len(v) as u32;
7463        }
7464        if let Some(v) = self.negative_int_value {
7465            size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
7466        }
7467        if self.double_value.is_some() {
7468            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
7469        }
7470        if let Some(ref v) = self.string_value {
7471            size += 1u32 + ::buffa::types::bytes_encoded_len(v) as u32;
7472        }
7473        if let Some(ref v) = self.aggregate_value {
7474            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7475        }
7476        size += self.__buffa_unknown_fields.encoded_len() as u32;
7477        size
7478    }
7479    fn write_to(
7480        &self,
7481        __cache: &mut ::buffa::SizeCache,
7482        buf: &mut impl ::buffa::bytes::BufMut,
7483    ) {
7484        #[allow(unused_imports)]
7485        use ::buffa::Enumeration as _;
7486        for v in &self.name {
7487            ::buffa::encoding::Tag::new(
7488                    2u32,
7489                    ::buffa::encoding::WireType::LengthDelimited,
7490                )
7491                .encode(buf);
7492            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7493            v.write_to(__cache, buf);
7494        }
7495        if let Some(ref v) = self.identifier_value {
7496            ::buffa::encoding::Tag::new(
7497                    3u32,
7498                    ::buffa::encoding::WireType::LengthDelimited,
7499                )
7500                .encode(buf);
7501            ::buffa::types::encode_string(v, buf);
7502        }
7503        if let Some(v) = self.positive_int_value {
7504            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
7505                .encode(buf);
7506            ::buffa::types::encode_uint64(v, buf);
7507        }
7508        if let Some(v) = self.negative_int_value {
7509            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
7510                .encode(buf);
7511            ::buffa::types::encode_int64(v, buf);
7512        }
7513        if let Some(v) = self.double_value {
7514            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Fixed64)
7515                .encode(buf);
7516            ::buffa::types::encode_double(v, buf);
7517        }
7518        if let Some(ref v) = self.string_value {
7519            ::buffa::encoding::Tag::new(
7520                    7u32,
7521                    ::buffa::encoding::WireType::LengthDelimited,
7522                )
7523                .encode(buf);
7524            ::buffa::types::encode_bytes(v, buf);
7525        }
7526        if let Some(ref v) = self.aggregate_value {
7527            ::buffa::encoding::Tag::new(
7528                    8u32,
7529                    ::buffa::encoding::WireType::LengthDelimited,
7530                )
7531                .encode(buf);
7532            ::buffa::types::encode_string(v, buf);
7533        }
7534        self.__buffa_unknown_fields.write_to(buf);
7535    }
7536    fn merge_field(
7537        &mut self,
7538        tag: ::buffa::encoding::Tag,
7539        buf: &mut impl ::buffa::bytes::Buf,
7540        depth: u32,
7541    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7542        #[allow(unused_imports)]
7543        use ::buffa::bytes::Buf as _;
7544        #[allow(unused_imports)]
7545        use ::buffa::Enumeration as _;
7546        match tag.field_number() {
7547            2u32 => {
7548                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7549                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7550                        field_number: 2u32,
7551                        expected: 2u8,
7552                        actual: tag.wire_type() as u8,
7553                    });
7554                }
7555                let mut elem = ::core::default::Default::default();
7556                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
7557                self.name.push(elem);
7558            }
7559            3u32 => {
7560                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7561                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7562                        field_number: 3u32,
7563                        expected: 2u8,
7564                        actual: tag.wire_type() as u8,
7565                    });
7566                }
7567                ::buffa::types::merge_string(
7568                    self
7569                        .identifier_value
7570                        .get_or_insert_with(::buffa::alloc::string::String::new),
7571                    buf,
7572                )?;
7573            }
7574            4u32 => {
7575                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7576                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7577                        field_number: 4u32,
7578                        expected: 0u8,
7579                        actual: tag.wire_type() as u8,
7580                    });
7581                }
7582                self.positive_int_value = ::core::option::Option::Some(
7583                    ::buffa::types::decode_uint64(buf)?,
7584                );
7585            }
7586            5u32 => {
7587                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7588                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7589                        field_number: 5u32,
7590                        expected: 0u8,
7591                        actual: tag.wire_type() as u8,
7592                    });
7593                }
7594                self.negative_int_value = ::core::option::Option::Some(
7595                    ::buffa::types::decode_int64(buf)?,
7596                );
7597            }
7598            6u32 => {
7599                if tag.wire_type() != ::buffa::encoding::WireType::Fixed64 {
7600                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7601                        field_number: 6u32,
7602                        expected: 1u8,
7603                        actual: tag.wire_type() as u8,
7604                    });
7605                }
7606                self.double_value = ::core::option::Option::Some(
7607                    ::buffa::types::decode_double(buf)?,
7608                );
7609            }
7610            7u32 => {
7611                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7612                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7613                        field_number: 7u32,
7614                        expected: 2u8,
7615                        actual: tag.wire_type() as u8,
7616                    });
7617                }
7618                ::buffa::types::merge_bytes(
7619                    self.string_value.get_or_insert_with(::buffa::alloc::vec::Vec::new),
7620                    buf,
7621                )?;
7622            }
7623            8u32 => {
7624                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7625                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7626                        field_number: 8u32,
7627                        expected: 2u8,
7628                        actual: tag.wire_type() as u8,
7629                    });
7630                }
7631                ::buffa::types::merge_string(
7632                    self
7633                        .aggregate_value
7634                        .get_or_insert_with(::buffa::alloc::string::String::new),
7635                    buf,
7636                )?;
7637            }
7638            _ => {
7639                self.__buffa_unknown_fields
7640                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7641            }
7642        }
7643        ::core::result::Result::Ok(())
7644    }
7645    fn clear(&mut self) {
7646        self.name.clear();
7647        self.identifier_value = ::core::option::Option::None;
7648        self.positive_int_value = ::core::option::Option::None;
7649        self.negative_int_value = ::core::option::Option::None;
7650        self.double_value = ::core::option::Option::None;
7651        self.string_value = ::core::option::Option::None;
7652        self.aggregate_value = ::core::option::Option::None;
7653        self.__buffa_unknown_fields.clear();
7654    }
7655}
7656impl ::buffa::ExtensionSet for UninterpretedOption {
7657    const PROTO_FQN: &'static str = "google.protobuf.UninterpretedOption";
7658    fn unknown_fields(&self) -> &::buffa::UnknownFields {
7659        &self.__buffa_unknown_fields
7660    }
7661    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7662        &mut self.__buffa_unknown_fields
7663    }
7664}
7665pub mod uninterpreted_option {
7666    #[allow(unused_imports)]
7667    use super::*;
7668    /// The name of the uninterpreted option.  Each string represents a segment in
7669    /// a dot-separated name.  is_extension is true iff a segment represents an
7670    /// extension (denoted with parentheses in options specs in .proto files).
7671    /// E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents
7672    /// "foo.(bar.baz).moo".
7673    #[derive(Clone, PartialEq, Default)]
7674    pub struct NamePart {
7675        /// Field 1: `name_part`
7676        pub name_part: ::buffa::alloc::string::String,
7677        /// Field 2: `is_extension`
7678        pub is_extension: bool,
7679        #[doc(hidden)]
7680        pub __buffa_unknown_fields: ::buffa::UnknownFields,
7681    }
7682    impl ::core::fmt::Debug for NamePart {
7683        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7684            f.debug_struct("NamePart")
7685                .field("name_part", &self.name_part)
7686                .field("is_extension", &self.is_extension)
7687                .finish()
7688        }
7689    }
7690    impl NamePart {
7691        /// Protobuf type URL for this message, for use with `Any::pack` and
7692        /// `Any::unpack_if`.
7693        ///
7694        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7695        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UninterpretedOption.NamePart";
7696    }
7697    impl ::buffa::DefaultInstance for NamePart {
7698        fn default_instance() -> &'static Self {
7699            static VALUE: ::buffa::__private::OnceBox<NamePart> = ::buffa::__private::OnceBox::new();
7700            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7701        }
7702    }
7703    impl ::buffa::Message for NamePart {
7704        /// Returns the total encoded size in bytes.
7705        ///
7706        /// The result is a `u32`; the protobuf specification requires all
7707        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7708        /// compliant message will never overflow this type.
7709        #[allow(clippy::let_and_return)]
7710        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7711            #[allow(unused_imports)]
7712            use ::buffa::Enumeration as _;
7713            let mut size = 0u32;
7714            size += 1u32 + ::buffa::types::string_encoded_len(&self.name_part) as u32;
7715            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7716            size += self.__buffa_unknown_fields.encoded_len() as u32;
7717            size
7718        }
7719        fn write_to(
7720            &self,
7721            _cache: &mut ::buffa::SizeCache,
7722            buf: &mut impl ::buffa::bytes::BufMut,
7723        ) {
7724            #[allow(unused_imports)]
7725            use ::buffa::Enumeration as _;
7726            ::buffa::encoding::Tag::new(
7727                    1u32,
7728                    ::buffa::encoding::WireType::LengthDelimited,
7729                )
7730                .encode(buf);
7731            ::buffa::types::encode_string(&self.name_part, buf);
7732            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
7733                .encode(buf);
7734            ::buffa::types::encode_bool(self.is_extension, buf);
7735            self.__buffa_unknown_fields.write_to(buf);
7736        }
7737        fn merge_field(
7738            &mut self,
7739            tag: ::buffa::encoding::Tag,
7740            buf: &mut impl ::buffa::bytes::Buf,
7741            depth: u32,
7742        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7743            #[allow(unused_imports)]
7744            use ::buffa::bytes::Buf as _;
7745            #[allow(unused_imports)]
7746            use ::buffa::Enumeration as _;
7747            match tag.field_number() {
7748                1u32 => {
7749                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
7750                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7751                            field_number: 1u32,
7752                            expected: 2u8,
7753                            actual: tag.wire_type() as u8,
7754                        });
7755                    }
7756                    ::buffa::types::merge_string(&mut self.name_part, buf)?;
7757                }
7758                2u32 => {
7759                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7760                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7761                            field_number: 2u32,
7762                            expected: 0u8,
7763                            actual: tag.wire_type() as u8,
7764                        });
7765                    }
7766                    self.is_extension = ::buffa::types::decode_bool(buf)?;
7767                }
7768                _ => {
7769                    self.__buffa_unknown_fields
7770                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
7771                }
7772            }
7773            ::core::result::Result::Ok(())
7774        }
7775        fn clear(&mut self) {
7776            self.name_part.clear();
7777            self.is_extension = false;
7778            self.__buffa_unknown_fields.clear();
7779        }
7780    }
7781    impl ::buffa::ExtensionSet for NamePart {
7782        const PROTO_FQN: &'static str = "google.protobuf.UninterpretedOption.NamePart";
7783        fn unknown_fields(&self) -> &::buffa::UnknownFields {
7784            &self.__buffa_unknown_fields
7785        }
7786        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7787            &mut self.__buffa_unknown_fields
7788        }
7789    }
7790}
7791/// ===================================================================
7792/// Features
7793///
7794/// TODO Enums in C++ gencode (and potentially other languages) are
7795/// not well scoped.  This means that each of the feature enums below can clash
7796/// with each other.  The short names we've chosen maximize call-site
7797/// readability, but leave us very open to this scenario.  A future feature will
7798/// be designed and implemented to handle this, hopefully before we ever hit a
7799/// conflict here.
7800#[derive(Clone, PartialEq, Default)]
7801pub struct FeatureSet {
7802    /// Field 1: `field_presence`
7803    pub field_presence: ::core::option::Option<feature_set::FieldPresence>,
7804    /// Field 2: `enum_type`
7805    pub enum_type: ::core::option::Option<feature_set::EnumType>,
7806    /// Field 3: `repeated_field_encoding`
7807    pub repeated_field_encoding: ::core::option::Option<
7808        feature_set::RepeatedFieldEncoding,
7809    >,
7810    /// Field 4: `utf8_validation`
7811    pub utf8_validation: ::core::option::Option<feature_set::Utf8Validation>,
7812    /// Field 5: `message_encoding`
7813    pub message_encoding: ::core::option::Option<feature_set::MessageEncoding>,
7814    /// Field 6: `json_format`
7815    pub json_format: ::core::option::Option<feature_set::JsonFormat>,
7816    /// Field 7: `enforce_naming_style`
7817    pub enforce_naming_style: ::core::option::Option<feature_set::EnforceNamingStyle>,
7818    /// Field 8: `default_symbol_visibility`
7819    pub default_symbol_visibility: ::core::option::Option<
7820        feature_set::visibility_feature::DefaultSymbolVisibility,
7821    >,
7822    #[doc(hidden)]
7823    pub __buffa_unknown_fields: ::buffa::UnknownFields,
7824}
7825impl ::core::fmt::Debug for FeatureSet {
7826    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7827        f.debug_struct("FeatureSet")
7828            .field("field_presence", &self.field_presence)
7829            .field("enum_type", &self.enum_type)
7830            .field("repeated_field_encoding", &self.repeated_field_encoding)
7831            .field("utf8_validation", &self.utf8_validation)
7832            .field("message_encoding", &self.message_encoding)
7833            .field("json_format", &self.json_format)
7834            .field("enforce_naming_style", &self.enforce_naming_style)
7835            .field("default_symbol_visibility", &self.default_symbol_visibility)
7836            .finish()
7837    }
7838}
7839impl FeatureSet {
7840    /// Protobuf type URL for this message, for use with `Any::pack` and
7841    /// `Any::unpack_if`.
7842    ///
7843    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
7844    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FeatureSet";
7845}
7846impl ::buffa::DefaultInstance for FeatureSet {
7847    fn default_instance() -> &'static Self {
7848        static VALUE: ::buffa::__private::OnceBox<FeatureSet> = ::buffa::__private::OnceBox::new();
7849        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
7850    }
7851}
7852impl ::buffa::Message for FeatureSet {
7853    /// Returns the total encoded size in bytes.
7854    ///
7855    /// The result is a `u32`; the protobuf specification requires all
7856    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
7857    /// compliant message will never overflow this type.
7858    #[allow(clippy::let_and_return)]
7859    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7860        #[allow(unused_imports)]
7861        use ::buffa::Enumeration as _;
7862        let mut size = 0u32;
7863        if let Some(ref v) = self.field_presence {
7864            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7865        }
7866        if let Some(ref v) = self.enum_type {
7867            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7868        }
7869        if let Some(ref v) = self.repeated_field_encoding {
7870            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7871        }
7872        if let Some(ref v) = self.utf8_validation {
7873            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7874        }
7875        if let Some(ref v) = self.message_encoding {
7876            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7877        }
7878        if let Some(ref v) = self.json_format {
7879            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7880        }
7881        if let Some(ref v) = self.enforce_naming_style {
7882            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7883        }
7884        if let Some(ref v) = self.default_symbol_visibility {
7885            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
7886        }
7887        size += self.__buffa_unknown_fields.encoded_len() as u32;
7888        size
7889    }
7890    fn write_to(
7891        &self,
7892        _cache: &mut ::buffa::SizeCache,
7893        buf: &mut impl ::buffa::bytes::BufMut,
7894    ) {
7895        #[allow(unused_imports)]
7896        use ::buffa::Enumeration as _;
7897        if let Some(ref v) = self.field_presence {
7898            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
7899                .encode(buf);
7900            ::buffa::types::encode_int32(v.to_i32(), buf);
7901        }
7902        if let Some(ref v) = self.enum_type {
7903            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
7904                .encode(buf);
7905            ::buffa::types::encode_int32(v.to_i32(), buf);
7906        }
7907        if let Some(ref v) = self.repeated_field_encoding {
7908            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
7909                .encode(buf);
7910            ::buffa::types::encode_int32(v.to_i32(), buf);
7911        }
7912        if let Some(ref v) = self.utf8_validation {
7913            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
7914                .encode(buf);
7915            ::buffa::types::encode_int32(v.to_i32(), buf);
7916        }
7917        if let Some(ref v) = self.message_encoding {
7918            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
7919                .encode(buf);
7920            ::buffa::types::encode_int32(v.to_i32(), buf);
7921        }
7922        if let Some(ref v) = self.json_format {
7923            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
7924                .encode(buf);
7925            ::buffa::types::encode_int32(v.to_i32(), buf);
7926        }
7927        if let Some(ref v) = self.enforce_naming_style {
7928            ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
7929                .encode(buf);
7930            ::buffa::types::encode_int32(v.to_i32(), buf);
7931        }
7932        if let Some(ref v) = self.default_symbol_visibility {
7933            ::buffa::encoding::Tag::new(8u32, ::buffa::encoding::WireType::Varint)
7934                .encode(buf);
7935            ::buffa::types::encode_int32(v.to_i32(), buf);
7936        }
7937        self.__buffa_unknown_fields.write_to(buf);
7938    }
7939    fn merge_field(
7940        &mut self,
7941        tag: ::buffa::encoding::Tag,
7942        buf: &mut impl ::buffa::bytes::Buf,
7943        depth: u32,
7944    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7945        #[allow(unused_imports)]
7946        use ::buffa::bytes::Buf as _;
7947        #[allow(unused_imports)]
7948        use ::buffa::Enumeration as _;
7949        match tag.field_number() {
7950            1u32 => {
7951                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7952                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7953                        field_number: 1u32,
7954                        expected: 0u8,
7955                        actual: tag.wire_type() as u8,
7956                    });
7957                }
7958                let __raw = ::buffa::types::decode_int32(buf)?;
7959                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7960                    __raw,
7961                ) {
7962                    self.field_presence = ::core::option::Option::Some(__v);
7963                } else {
7964                    self.__buffa_unknown_fields
7965                        .push(::buffa::UnknownField {
7966                            number: 1u32,
7967                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7968                        });
7969                }
7970            }
7971            2u32 => {
7972                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7973                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7974                        field_number: 2u32,
7975                        expected: 0u8,
7976                        actual: tag.wire_type() as u8,
7977                    });
7978                }
7979                let __raw = ::buffa::types::decode_int32(buf)?;
7980                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
7981                    __raw,
7982                ) {
7983                    self.enum_type = ::core::option::Option::Some(__v);
7984                } else {
7985                    self.__buffa_unknown_fields
7986                        .push(::buffa::UnknownField {
7987                            number: 2u32,
7988                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
7989                        });
7990                }
7991            }
7992            3u32 => {
7993                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7994                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7995                        field_number: 3u32,
7996                        expected: 0u8,
7997                        actual: tag.wire_type() as u8,
7998                    });
7999                }
8000                let __raw = ::buffa::types::decode_int32(buf)?;
8001                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8002                    __raw,
8003                ) {
8004                    self.repeated_field_encoding = ::core::option::Option::Some(__v);
8005                } else {
8006                    self.__buffa_unknown_fields
8007                        .push(::buffa::UnknownField {
8008                            number: 3u32,
8009                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8010                        });
8011                }
8012            }
8013            4u32 => {
8014                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8015                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8016                        field_number: 4u32,
8017                        expected: 0u8,
8018                        actual: tag.wire_type() as u8,
8019                    });
8020                }
8021                let __raw = ::buffa::types::decode_int32(buf)?;
8022                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8023                    __raw,
8024                ) {
8025                    self.utf8_validation = ::core::option::Option::Some(__v);
8026                } else {
8027                    self.__buffa_unknown_fields
8028                        .push(::buffa::UnknownField {
8029                            number: 4u32,
8030                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8031                        });
8032                }
8033            }
8034            5u32 => {
8035                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8036                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8037                        field_number: 5u32,
8038                        expected: 0u8,
8039                        actual: tag.wire_type() as u8,
8040                    });
8041                }
8042                let __raw = ::buffa::types::decode_int32(buf)?;
8043                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8044                    __raw,
8045                ) {
8046                    self.message_encoding = ::core::option::Option::Some(__v);
8047                } else {
8048                    self.__buffa_unknown_fields
8049                        .push(::buffa::UnknownField {
8050                            number: 5u32,
8051                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8052                        });
8053                }
8054            }
8055            6u32 => {
8056                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8057                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8058                        field_number: 6u32,
8059                        expected: 0u8,
8060                        actual: tag.wire_type() as u8,
8061                    });
8062                }
8063                let __raw = ::buffa::types::decode_int32(buf)?;
8064                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8065                    __raw,
8066                ) {
8067                    self.json_format = ::core::option::Option::Some(__v);
8068                } else {
8069                    self.__buffa_unknown_fields
8070                        .push(::buffa::UnknownField {
8071                            number: 6u32,
8072                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8073                        });
8074                }
8075            }
8076            7u32 => {
8077                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8078                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8079                        field_number: 7u32,
8080                        expected: 0u8,
8081                        actual: tag.wire_type() as u8,
8082                    });
8083                }
8084                let __raw = ::buffa::types::decode_int32(buf)?;
8085                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8086                    __raw,
8087                ) {
8088                    self.enforce_naming_style = ::core::option::Option::Some(__v);
8089                } else {
8090                    self.__buffa_unknown_fields
8091                        .push(::buffa::UnknownField {
8092                            number: 7u32,
8093                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8094                        });
8095                }
8096            }
8097            8u32 => {
8098                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8099                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8100                        field_number: 8u32,
8101                        expected: 0u8,
8102                        actual: tag.wire_type() as u8,
8103                    });
8104                }
8105                let __raw = ::buffa::types::decode_int32(buf)?;
8106                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8107                    __raw,
8108                ) {
8109                    self.default_symbol_visibility = ::core::option::Option::Some(__v);
8110                } else {
8111                    self.__buffa_unknown_fields
8112                        .push(::buffa::UnknownField {
8113                            number: 8u32,
8114                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8115                        });
8116                }
8117            }
8118            _ => {
8119                self.__buffa_unknown_fields
8120                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8121            }
8122        }
8123        ::core::result::Result::Ok(())
8124    }
8125    fn clear(&mut self) {
8126        self.field_presence = ::core::option::Option::None;
8127        self.enum_type = ::core::option::Option::None;
8128        self.repeated_field_encoding = ::core::option::Option::None;
8129        self.utf8_validation = ::core::option::Option::None;
8130        self.message_encoding = ::core::option::Option::None;
8131        self.json_format = ::core::option::Option::None;
8132        self.enforce_naming_style = ::core::option::Option::None;
8133        self.default_symbol_visibility = ::core::option::Option::None;
8134        self.__buffa_unknown_fields.clear();
8135    }
8136}
8137impl ::buffa::ExtensionSet for FeatureSet {
8138    const PROTO_FQN: &'static str = "google.protobuf.FeatureSet";
8139    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8140        &self.__buffa_unknown_fields
8141    }
8142    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8143        &mut self.__buffa_unknown_fields
8144    }
8145}
8146pub mod feature_set {
8147    #[allow(unused_imports)]
8148    use super::*;
8149    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8150    #[repr(i32)]
8151    pub enum FieldPresence {
8152        FIELD_PRESENCE_UNKNOWN = 0i32,
8153        EXPLICIT = 1i32,
8154        IMPLICIT = 2i32,
8155        LEGACY_REQUIRED = 3i32,
8156    }
8157    impl ::core::default::Default for FieldPresence {
8158        fn default() -> Self {
8159            Self::FIELD_PRESENCE_UNKNOWN
8160        }
8161    }
8162    impl ::buffa::Enumeration for FieldPresence {
8163        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8164            match value {
8165                0i32 => ::core::option::Option::Some(Self::FIELD_PRESENCE_UNKNOWN),
8166                1i32 => ::core::option::Option::Some(Self::EXPLICIT),
8167                2i32 => ::core::option::Option::Some(Self::IMPLICIT),
8168                3i32 => ::core::option::Option::Some(Self::LEGACY_REQUIRED),
8169                _ => ::core::option::Option::None,
8170            }
8171        }
8172        fn to_i32(&self) -> i32 {
8173            *self as i32
8174        }
8175        fn proto_name(&self) -> &'static str {
8176            match self {
8177                Self::FIELD_PRESENCE_UNKNOWN => "FIELD_PRESENCE_UNKNOWN",
8178                Self::EXPLICIT => "EXPLICIT",
8179                Self::IMPLICIT => "IMPLICIT",
8180                Self::LEGACY_REQUIRED => "LEGACY_REQUIRED",
8181            }
8182        }
8183        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8184            match name {
8185                "FIELD_PRESENCE_UNKNOWN" => {
8186                    ::core::option::Option::Some(Self::FIELD_PRESENCE_UNKNOWN)
8187                }
8188                "EXPLICIT" => ::core::option::Option::Some(Self::EXPLICIT),
8189                "IMPLICIT" => ::core::option::Option::Some(Self::IMPLICIT),
8190                "LEGACY_REQUIRED" => ::core::option::Option::Some(Self::LEGACY_REQUIRED),
8191                _ => ::core::option::Option::None,
8192            }
8193        }
8194        fn values() -> &'static [Self] {
8195            &[
8196                Self::FIELD_PRESENCE_UNKNOWN,
8197                Self::EXPLICIT,
8198                Self::IMPLICIT,
8199                Self::LEGACY_REQUIRED,
8200            ]
8201        }
8202    }
8203    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8204    #[repr(i32)]
8205    pub enum EnumType {
8206        ENUM_TYPE_UNKNOWN = 0i32,
8207        OPEN = 1i32,
8208        CLOSED = 2i32,
8209    }
8210    impl ::core::default::Default for EnumType {
8211        fn default() -> Self {
8212            Self::ENUM_TYPE_UNKNOWN
8213        }
8214    }
8215    impl ::buffa::Enumeration for EnumType {
8216        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8217            match value {
8218                0i32 => ::core::option::Option::Some(Self::ENUM_TYPE_UNKNOWN),
8219                1i32 => ::core::option::Option::Some(Self::OPEN),
8220                2i32 => ::core::option::Option::Some(Self::CLOSED),
8221                _ => ::core::option::Option::None,
8222            }
8223        }
8224        fn to_i32(&self) -> i32 {
8225            *self as i32
8226        }
8227        fn proto_name(&self) -> &'static str {
8228            match self {
8229                Self::ENUM_TYPE_UNKNOWN => "ENUM_TYPE_UNKNOWN",
8230                Self::OPEN => "OPEN",
8231                Self::CLOSED => "CLOSED",
8232            }
8233        }
8234        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8235            match name {
8236                "ENUM_TYPE_UNKNOWN" => {
8237                    ::core::option::Option::Some(Self::ENUM_TYPE_UNKNOWN)
8238                }
8239                "OPEN" => ::core::option::Option::Some(Self::OPEN),
8240                "CLOSED" => ::core::option::Option::Some(Self::CLOSED),
8241                _ => ::core::option::Option::None,
8242            }
8243        }
8244        fn values() -> &'static [Self] {
8245            &[Self::ENUM_TYPE_UNKNOWN, Self::OPEN, Self::CLOSED]
8246        }
8247    }
8248    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8249    #[repr(i32)]
8250    pub enum RepeatedFieldEncoding {
8251        REPEATED_FIELD_ENCODING_UNKNOWN = 0i32,
8252        PACKED = 1i32,
8253        EXPANDED = 2i32,
8254    }
8255    impl ::core::default::Default for RepeatedFieldEncoding {
8256        fn default() -> Self {
8257            Self::REPEATED_FIELD_ENCODING_UNKNOWN
8258        }
8259    }
8260    impl ::buffa::Enumeration for RepeatedFieldEncoding {
8261        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8262            match value {
8263                0i32 => {
8264                    ::core::option::Option::Some(Self::REPEATED_FIELD_ENCODING_UNKNOWN)
8265                }
8266                1i32 => ::core::option::Option::Some(Self::PACKED),
8267                2i32 => ::core::option::Option::Some(Self::EXPANDED),
8268                _ => ::core::option::Option::None,
8269            }
8270        }
8271        fn to_i32(&self) -> i32 {
8272            *self as i32
8273        }
8274        fn proto_name(&self) -> &'static str {
8275            match self {
8276                Self::REPEATED_FIELD_ENCODING_UNKNOWN => {
8277                    "REPEATED_FIELD_ENCODING_UNKNOWN"
8278                }
8279                Self::PACKED => "PACKED",
8280                Self::EXPANDED => "EXPANDED",
8281            }
8282        }
8283        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8284            match name {
8285                "REPEATED_FIELD_ENCODING_UNKNOWN" => {
8286                    ::core::option::Option::Some(Self::REPEATED_FIELD_ENCODING_UNKNOWN)
8287                }
8288                "PACKED" => ::core::option::Option::Some(Self::PACKED),
8289                "EXPANDED" => ::core::option::Option::Some(Self::EXPANDED),
8290                _ => ::core::option::Option::None,
8291            }
8292        }
8293        fn values() -> &'static [Self] {
8294            &[Self::REPEATED_FIELD_ENCODING_UNKNOWN, Self::PACKED, Self::EXPANDED]
8295        }
8296    }
8297    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8298    #[repr(i32)]
8299    pub enum Utf8Validation {
8300        UTF8_VALIDATION_UNKNOWN = 0i32,
8301        VERIFY = 2i32,
8302        NONE = 3i32,
8303    }
8304    impl ::core::default::Default for Utf8Validation {
8305        fn default() -> Self {
8306            Self::UTF8_VALIDATION_UNKNOWN
8307        }
8308    }
8309    impl ::buffa::Enumeration for Utf8Validation {
8310        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8311            match value {
8312                0i32 => ::core::option::Option::Some(Self::UTF8_VALIDATION_UNKNOWN),
8313                2i32 => ::core::option::Option::Some(Self::VERIFY),
8314                3i32 => ::core::option::Option::Some(Self::NONE),
8315                _ => ::core::option::Option::None,
8316            }
8317        }
8318        fn to_i32(&self) -> i32 {
8319            *self as i32
8320        }
8321        fn proto_name(&self) -> &'static str {
8322            match self {
8323                Self::UTF8_VALIDATION_UNKNOWN => "UTF8_VALIDATION_UNKNOWN",
8324                Self::VERIFY => "VERIFY",
8325                Self::NONE => "NONE",
8326            }
8327        }
8328        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8329            match name {
8330                "UTF8_VALIDATION_UNKNOWN" => {
8331                    ::core::option::Option::Some(Self::UTF8_VALIDATION_UNKNOWN)
8332                }
8333                "VERIFY" => ::core::option::Option::Some(Self::VERIFY),
8334                "NONE" => ::core::option::Option::Some(Self::NONE),
8335                _ => ::core::option::Option::None,
8336            }
8337        }
8338        fn values() -> &'static [Self] {
8339            &[Self::UTF8_VALIDATION_UNKNOWN, Self::VERIFY, Self::NONE]
8340        }
8341    }
8342    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8343    #[repr(i32)]
8344    pub enum MessageEncoding {
8345        MESSAGE_ENCODING_UNKNOWN = 0i32,
8346        LENGTH_PREFIXED = 1i32,
8347        DELIMITED = 2i32,
8348    }
8349    impl ::core::default::Default for MessageEncoding {
8350        fn default() -> Self {
8351            Self::MESSAGE_ENCODING_UNKNOWN
8352        }
8353    }
8354    impl ::buffa::Enumeration for MessageEncoding {
8355        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8356            match value {
8357                0i32 => ::core::option::Option::Some(Self::MESSAGE_ENCODING_UNKNOWN),
8358                1i32 => ::core::option::Option::Some(Self::LENGTH_PREFIXED),
8359                2i32 => ::core::option::Option::Some(Self::DELIMITED),
8360                _ => ::core::option::Option::None,
8361            }
8362        }
8363        fn to_i32(&self) -> i32 {
8364            *self as i32
8365        }
8366        fn proto_name(&self) -> &'static str {
8367            match self {
8368                Self::MESSAGE_ENCODING_UNKNOWN => "MESSAGE_ENCODING_UNKNOWN",
8369                Self::LENGTH_PREFIXED => "LENGTH_PREFIXED",
8370                Self::DELIMITED => "DELIMITED",
8371            }
8372        }
8373        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8374            match name {
8375                "MESSAGE_ENCODING_UNKNOWN" => {
8376                    ::core::option::Option::Some(Self::MESSAGE_ENCODING_UNKNOWN)
8377                }
8378                "LENGTH_PREFIXED" => ::core::option::Option::Some(Self::LENGTH_PREFIXED),
8379                "DELIMITED" => ::core::option::Option::Some(Self::DELIMITED),
8380                _ => ::core::option::Option::None,
8381            }
8382        }
8383        fn values() -> &'static [Self] {
8384            &[Self::MESSAGE_ENCODING_UNKNOWN, Self::LENGTH_PREFIXED, Self::DELIMITED]
8385        }
8386    }
8387    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8388    #[repr(i32)]
8389    pub enum JsonFormat {
8390        JSON_FORMAT_UNKNOWN = 0i32,
8391        ALLOW = 1i32,
8392        LEGACY_BEST_EFFORT = 2i32,
8393    }
8394    impl ::core::default::Default for JsonFormat {
8395        fn default() -> Self {
8396            Self::JSON_FORMAT_UNKNOWN
8397        }
8398    }
8399    impl ::buffa::Enumeration for JsonFormat {
8400        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8401            match value {
8402                0i32 => ::core::option::Option::Some(Self::JSON_FORMAT_UNKNOWN),
8403                1i32 => ::core::option::Option::Some(Self::ALLOW),
8404                2i32 => ::core::option::Option::Some(Self::LEGACY_BEST_EFFORT),
8405                _ => ::core::option::Option::None,
8406            }
8407        }
8408        fn to_i32(&self) -> i32 {
8409            *self as i32
8410        }
8411        fn proto_name(&self) -> &'static str {
8412            match self {
8413                Self::JSON_FORMAT_UNKNOWN => "JSON_FORMAT_UNKNOWN",
8414                Self::ALLOW => "ALLOW",
8415                Self::LEGACY_BEST_EFFORT => "LEGACY_BEST_EFFORT",
8416            }
8417        }
8418        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8419            match name {
8420                "JSON_FORMAT_UNKNOWN" => {
8421                    ::core::option::Option::Some(Self::JSON_FORMAT_UNKNOWN)
8422                }
8423                "ALLOW" => ::core::option::Option::Some(Self::ALLOW),
8424                "LEGACY_BEST_EFFORT" => {
8425                    ::core::option::Option::Some(Self::LEGACY_BEST_EFFORT)
8426                }
8427                _ => ::core::option::Option::None,
8428            }
8429        }
8430        fn values() -> &'static [Self] {
8431            &[Self::JSON_FORMAT_UNKNOWN, Self::ALLOW, Self::LEGACY_BEST_EFFORT]
8432        }
8433    }
8434    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8435    #[repr(i32)]
8436    pub enum EnforceNamingStyle {
8437        ENFORCE_NAMING_STYLE_UNKNOWN = 0i32,
8438        STYLE2024 = 1i32,
8439        STYLE_LEGACY = 2i32,
8440    }
8441    impl ::core::default::Default for EnforceNamingStyle {
8442        fn default() -> Self {
8443            Self::ENFORCE_NAMING_STYLE_UNKNOWN
8444        }
8445    }
8446    impl ::buffa::Enumeration for EnforceNamingStyle {
8447        fn from_i32(value: i32) -> ::core::option::Option<Self> {
8448            match value {
8449                0i32 => ::core::option::Option::Some(Self::ENFORCE_NAMING_STYLE_UNKNOWN),
8450                1i32 => ::core::option::Option::Some(Self::STYLE2024),
8451                2i32 => ::core::option::Option::Some(Self::STYLE_LEGACY),
8452                _ => ::core::option::Option::None,
8453            }
8454        }
8455        fn to_i32(&self) -> i32 {
8456            *self as i32
8457        }
8458        fn proto_name(&self) -> &'static str {
8459            match self {
8460                Self::ENFORCE_NAMING_STYLE_UNKNOWN => "ENFORCE_NAMING_STYLE_UNKNOWN",
8461                Self::STYLE2024 => "STYLE2024",
8462                Self::STYLE_LEGACY => "STYLE_LEGACY",
8463            }
8464        }
8465        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8466            match name {
8467                "ENFORCE_NAMING_STYLE_UNKNOWN" => {
8468                    ::core::option::Option::Some(Self::ENFORCE_NAMING_STYLE_UNKNOWN)
8469                }
8470                "STYLE2024" => ::core::option::Option::Some(Self::STYLE2024),
8471                "STYLE_LEGACY" => ::core::option::Option::Some(Self::STYLE_LEGACY),
8472                _ => ::core::option::Option::None,
8473            }
8474        }
8475        fn values() -> &'static [Self] {
8476            &[Self::ENFORCE_NAMING_STYLE_UNKNOWN, Self::STYLE2024, Self::STYLE_LEGACY]
8477        }
8478    }
8479    #[derive(Clone, PartialEq, Default)]
8480    pub struct VisibilityFeature {
8481        #[doc(hidden)]
8482        pub __buffa_unknown_fields: ::buffa::UnknownFields,
8483    }
8484    impl ::core::fmt::Debug for VisibilityFeature {
8485        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8486            f.debug_struct("VisibilityFeature").finish()
8487        }
8488    }
8489    impl VisibilityFeature {
8490        /// Protobuf type URL for this message, for use with `Any::pack` and
8491        /// `Any::unpack_if`.
8492        ///
8493        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8494        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FeatureSet.VisibilityFeature";
8495    }
8496    impl ::buffa::DefaultInstance for VisibilityFeature {
8497        fn default_instance() -> &'static Self {
8498            static VALUE: ::buffa::__private::OnceBox<VisibilityFeature> = ::buffa::__private::OnceBox::new();
8499            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8500        }
8501    }
8502    impl ::buffa::Message for VisibilityFeature {
8503        /// Returns the total encoded size in bytes.
8504        ///
8505        /// The result is a `u32`; the protobuf specification requires all
8506        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8507        /// compliant message will never overflow this type.
8508        #[allow(clippy::let_and_return)]
8509        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8510            #[allow(unused_imports)]
8511            use ::buffa::Enumeration as _;
8512            let mut size = 0u32;
8513            size += self.__buffa_unknown_fields.encoded_len() as u32;
8514            size
8515        }
8516        fn write_to(
8517            &self,
8518            _cache: &mut ::buffa::SizeCache,
8519            buf: &mut impl ::buffa::bytes::BufMut,
8520        ) {
8521            #[allow(unused_imports)]
8522            use ::buffa::Enumeration as _;
8523            self.__buffa_unknown_fields.write_to(buf);
8524        }
8525        fn merge_field(
8526            &mut self,
8527            tag: ::buffa::encoding::Tag,
8528            buf: &mut impl ::buffa::bytes::Buf,
8529            depth: u32,
8530        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8531            #[allow(unused_imports)]
8532            use ::buffa::bytes::Buf as _;
8533            #[allow(unused_imports)]
8534            use ::buffa::Enumeration as _;
8535            match tag.field_number() {
8536                _ => {
8537                    self.__buffa_unknown_fields
8538                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8539                }
8540            }
8541            ::core::result::Result::Ok(())
8542        }
8543        fn clear(&mut self) {
8544            self.__buffa_unknown_fields.clear();
8545        }
8546    }
8547    impl ::buffa::ExtensionSet for VisibilityFeature {
8548        const PROTO_FQN: &'static str = "google.protobuf.FeatureSet.VisibilityFeature";
8549        fn unknown_fields(&self) -> &::buffa::UnknownFields {
8550            &self.__buffa_unknown_fields
8551        }
8552        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8553            &mut self.__buffa_unknown_fields
8554        }
8555    }
8556    pub mod visibility_feature {
8557        #[allow(unused_imports)]
8558        use super::*;
8559        #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
8560        #[repr(i32)]
8561        pub enum DefaultSymbolVisibility {
8562            DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0i32,
8563            /// Default pre-EDITION_2024, all UNSET visibility are export.
8564            EXPORT_ALL = 1i32,
8565            /// All top-level symbols default to export, nested default to local.
8566            EXPORT_TOP_LEVEL = 2i32,
8567            /// All symbols default to local.
8568            LOCAL_ALL = 3i32,
8569            /// All symbols local by default. Nested types cannot be exported.
8570            /// With special case caveat for message { enum {} reserved 1 to max; }
8571            /// This is the recommended setting for new protos.
8572            STRICT = 4i32,
8573        }
8574        impl ::core::default::Default for DefaultSymbolVisibility {
8575            fn default() -> Self {
8576                Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN
8577            }
8578        }
8579        impl ::buffa::Enumeration for DefaultSymbolVisibility {
8580            fn from_i32(value: i32) -> ::core::option::Option<Self> {
8581                match value {
8582                    0i32 => {
8583                        ::core::option::Option::Some(
8584                            Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN,
8585                        )
8586                    }
8587                    1i32 => ::core::option::Option::Some(Self::EXPORT_ALL),
8588                    2i32 => ::core::option::Option::Some(Self::EXPORT_TOP_LEVEL),
8589                    3i32 => ::core::option::Option::Some(Self::LOCAL_ALL),
8590                    4i32 => ::core::option::Option::Some(Self::STRICT),
8591                    _ => ::core::option::Option::None,
8592                }
8593            }
8594            fn to_i32(&self) -> i32 {
8595                *self as i32
8596            }
8597            fn proto_name(&self) -> &'static str {
8598                match self {
8599                    Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN => {
8600                        "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"
8601                    }
8602                    Self::EXPORT_ALL => "EXPORT_ALL",
8603                    Self::EXPORT_TOP_LEVEL => "EXPORT_TOP_LEVEL",
8604                    Self::LOCAL_ALL => "LOCAL_ALL",
8605                    Self::STRICT => "STRICT",
8606                }
8607            }
8608            fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
8609                match name {
8610                    "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" => {
8611                        ::core::option::Option::Some(
8612                            Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN,
8613                        )
8614                    }
8615                    "EXPORT_ALL" => ::core::option::Option::Some(Self::EXPORT_ALL),
8616                    "EXPORT_TOP_LEVEL" => {
8617                        ::core::option::Option::Some(Self::EXPORT_TOP_LEVEL)
8618                    }
8619                    "LOCAL_ALL" => ::core::option::Option::Some(Self::LOCAL_ALL),
8620                    "STRICT" => ::core::option::Option::Some(Self::STRICT),
8621                    _ => ::core::option::Option::None,
8622                }
8623            }
8624            fn values() -> &'static [Self] {
8625                &[
8626                    Self::DEFAULT_SYMBOL_VISIBILITY_UNKNOWN,
8627                    Self::EXPORT_ALL,
8628                    Self::EXPORT_TOP_LEVEL,
8629                    Self::LOCAL_ALL,
8630                    Self::STRICT,
8631                ]
8632            }
8633        }
8634    }
8635}
8636/// A compiled specification for the defaults of a set of features.  These
8637/// messages are generated from FeatureSet extensions and can be used to seed
8638/// feature resolution. The resolution with this object becomes a simple search
8639/// for the closest matching edition, followed by proto merges.
8640#[derive(Clone, PartialEq, Default)]
8641pub struct FeatureSetDefaults {
8642    /// Field 1: `defaults`
8643    pub defaults: ::buffa::alloc::vec::Vec<
8644        feature_set_defaults::FeatureSetEditionDefault,
8645    >,
8646    /// The minimum supported edition (inclusive) when this was constructed.
8647    /// Editions before this will not have defaults.
8648    ///
8649    /// Field 4: `minimum_edition`
8650    pub minimum_edition: ::core::option::Option<Edition>,
8651    /// The maximum known edition (inclusive) when this was constructed. Editions
8652    /// after this will not have reliable defaults.
8653    ///
8654    /// Field 5: `maximum_edition`
8655    pub maximum_edition: ::core::option::Option<Edition>,
8656    #[doc(hidden)]
8657    pub __buffa_unknown_fields: ::buffa::UnknownFields,
8658}
8659impl ::core::fmt::Debug for FeatureSetDefaults {
8660    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8661        f.debug_struct("FeatureSetDefaults")
8662            .field("defaults", &self.defaults)
8663            .field("minimum_edition", &self.minimum_edition)
8664            .field("maximum_edition", &self.maximum_edition)
8665            .finish()
8666    }
8667}
8668impl FeatureSetDefaults {
8669    /// Protobuf type URL for this message, for use with `Any::pack` and
8670    /// `Any::unpack_if`.
8671    ///
8672    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8673    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FeatureSetDefaults";
8674}
8675impl ::buffa::DefaultInstance for FeatureSetDefaults {
8676    fn default_instance() -> &'static Self {
8677        static VALUE: ::buffa::__private::OnceBox<FeatureSetDefaults> = ::buffa::__private::OnceBox::new();
8678        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8679    }
8680}
8681impl ::buffa::Message for FeatureSetDefaults {
8682    /// Returns the total encoded size in bytes.
8683    ///
8684    /// The result is a `u32`; the protobuf specification requires all
8685    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8686    /// compliant message will never overflow this type.
8687    #[allow(clippy::let_and_return)]
8688    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8689        #[allow(unused_imports)]
8690        use ::buffa::Enumeration as _;
8691        let mut size = 0u32;
8692        for v in &self.defaults {
8693            let __slot = __cache.reserve();
8694            let inner_size = v.compute_size(__cache);
8695            __cache.set(__slot, inner_size);
8696            size
8697                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8698                    + inner_size;
8699        }
8700        if let Some(ref v) = self.minimum_edition {
8701            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
8702        }
8703        if let Some(ref v) = self.maximum_edition {
8704            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
8705        }
8706        size += self.__buffa_unknown_fields.encoded_len() as u32;
8707        size
8708    }
8709    fn write_to(
8710        &self,
8711        __cache: &mut ::buffa::SizeCache,
8712        buf: &mut impl ::buffa::bytes::BufMut,
8713    ) {
8714        #[allow(unused_imports)]
8715        use ::buffa::Enumeration as _;
8716        for v in &self.defaults {
8717            ::buffa::encoding::Tag::new(
8718                    1u32,
8719                    ::buffa::encoding::WireType::LengthDelimited,
8720                )
8721                .encode(buf);
8722            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
8723            v.write_to(__cache, buf);
8724        }
8725        if let Some(ref v) = self.minimum_edition {
8726            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
8727                .encode(buf);
8728            ::buffa::types::encode_int32(v.to_i32(), buf);
8729        }
8730        if let Some(ref v) = self.maximum_edition {
8731            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
8732                .encode(buf);
8733            ::buffa::types::encode_int32(v.to_i32(), buf);
8734        }
8735        self.__buffa_unknown_fields.write_to(buf);
8736    }
8737    fn merge_field(
8738        &mut self,
8739        tag: ::buffa::encoding::Tag,
8740        buf: &mut impl ::buffa::bytes::Buf,
8741        depth: u32,
8742    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8743        #[allow(unused_imports)]
8744        use ::buffa::bytes::Buf as _;
8745        #[allow(unused_imports)]
8746        use ::buffa::Enumeration as _;
8747        match tag.field_number() {
8748            1u32 => {
8749                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8750                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8751                        field_number: 1u32,
8752                        expected: 2u8,
8753                        actual: tag.wire_type() as u8,
8754                    });
8755                }
8756                let mut elem = ::core::default::Default::default();
8757                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
8758                self.defaults.push(elem);
8759            }
8760            4u32 => {
8761                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8762                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8763                        field_number: 4u32,
8764                        expected: 0u8,
8765                        actual: tag.wire_type() as u8,
8766                    });
8767                }
8768                let __raw = ::buffa::types::decode_int32(buf)?;
8769                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8770                    __raw,
8771                ) {
8772                    self.minimum_edition = ::core::option::Option::Some(__v);
8773                } else {
8774                    self.__buffa_unknown_fields
8775                        .push(::buffa::UnknownField {
8776                            number: 4u32,
8777                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8778                        });
8779                }
8780            }
8781            5u32 => {
8782                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8783                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8784                        field_number: 5u32,
8785                        expected: 0u8,
8786                        actual: tag.wire_type() as u8,
8787                    });
8788                }
8789                let __raw = ::buffa::types::decode_int32(buf)?;
8790                if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8791                    __raw,
8792                ) {
8793                    self.maximum_edition = ::core::option::Option::Some(__v);
8794                } else {
8795                    self.__buffa_unknown_fields
8796                        .push(::buffa::UnknownField {
8797                            number: 5u32,
8798                            data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8799                        });
8800                }
8801            }
8802            _ => {
8803                self.__buffa_unknown_fields
8804                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8805            }
8806        }
8807        ::core::result::Result::Ok(())
8808    }
8809    fn clear(&mut self) {
8810        self.defaults.clear();
8811        self.minimum_edition = ::core::option::Option::None;
8812        self.maximum_edition = ::core::option::Option::None;
8813        self.__buffa_unknown_fields.clear();
8814    }
8815}
8816impl ::buffa::ExtensionSet for FeatureSetDefaults {
8817    const PROTO_FQN: &'static str = "google.protobuf.FeatureSetDefaults";
8818    fn unknown_fields(&self) -> &::buffa::UnknownFields {
8819        &self.__buffa_unknown_fields
8820    }
8821    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8822        &mut self.__buffa_unknown_fields
8823    }
8824}
8825pub mod feature_set_defaults {
8826    #[allow(unused_imports)]
8827    use super::*;
8828    /// A map from every known edition with a unique set of defaults to its
8829    /// defaults. Not all editions may be contained here.  For a given edition,
8830    /// the defaults at the closest matching edition ordered at or before it should
8831    /// be used.  This field must be in strict ascending order by edition.
8832    #[derive(Clone, PartialEq, Default)]
8833    pub struct FeatureSetEditionDefault {
8834        /// Field 3: `edition`
8835        pub edition: ::core::option::Option<super::Edition>,
8836        /// Defaults of features that can be overridden in this edition.
8837        ///
8838        /// Field 4: `overridable_features`
8839        pub overridable_features: ::buffa::MessageField<super::FeatureSet>,
8840        /// Defaults of features that can't be overridden in this edition.
8841        ///
8842        /// Field 5: `fixed_features`
8843        pub fixed_features: ::buffa::MessageField<super::FeatureSet>,
8844        #[doc(hidden)]
8845        pub __buffa_unknown_fields: ::buffa::UnknownFields,
8846    }
8847    impl ::core::fmt::Debug for FeatureSetEditionDefault {
8848        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8849            f.debug_struct("FeatureSetEditionDefault")
8850                .field("edition", &self.edition)
8851                .field("overridable_features", &self.overridable_features)
8852                .field("fixed_features", &self.fixed_features)
8853                .finish()
8854        }
8855    }
8856    impl FeatureSetEditionDefault {
8857        /// Protobuf type URL for this message, for use with `Any::pack` and
8858        /// `Any::unpack_if`.
8859        ///
8860        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
8861        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault";
8862    }
8863    impl ::buffa::DefaultInstance for FeatureSetEditionDefault {
8864        fn default_instance() -> &'static Self {
8865            static VALUE: ::buffa::__private::OnceBox<FeatureSetEditionDefault> = ::buffa::__private::OnceBox::new();
8866            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
8867        }
8868    }
8869    impl ::buffa::Message for FeatureSetEditionDefault {
8870        /// Returns the total encoded size in bytes.
8871        ///
8872        /// The result is a `u32`; the protobuf specification requires all
8873        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
8874        /// compliant message will never overflow this type.
8875        #[allow(clippy::let_and_return)]
8876        fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8877            #[allow(unused_imports)]
8878            use ::buffa::Enumeration as _;
8879            let mut size = 0u32;
8880            if let Some(ref v) = self.edition {
8881                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
8882            }
8883            if self.overridable_features.is_set() {
8884                let __slot = __cache.reserve();
8885                let inner_size = self.overridable_features.compute_size(__cache);
8886                __cache.set(__slot, inner_size);
8887                size
8888                    += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8889                        + inner_size;
8890            }
8891            if self.fixed_features.is_set() {
8892                let __slot = __cache.reserve();
8893                let inner_size = self.fixed_features.compute_size(__cache);
8894                __cache.set(__slot, inner_size);
8895                size
8896                    += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8897                        + inner_size;
8898            }
8899            size += self.__buffa_unknown_fields.encoded_len() as u32;
8900            size
8901        }
8902        fn write_to(
8903            &self,
8904            __cache: &mut ::buffa::SizeCache,
8905            buf: &mut impl ::buffa::bytes::BufMut,
8906        ) {
8907            #[allow(unused_imports)]
8908            use ::buffa::Enumeration as _;
8909            if let Some(ref v) = self.edition {
8910                ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
8911                    .encode(buf);
8912                ::buffa::types::encode_int32(v.to_i32(), buf);
8913            }
8914            if self.overridable_features.is_set() {
8915                ::buffa::encoding::Tag::new(
8916                        4u32,
8917                        ::buffa::encoding::WireType::LengthDelimited,
8918                    )
8919                    .encode(buf);
8920                ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
8921                self.overridable_features.write_to(__cache, buf);
8922            }
8923            if self.fixed_features.is_set() {
8924                ::buffa::encoding::Tag::new(
8925                        5u32,
8926                        ::buffa::encoding::WireType::LengthDelimited,
8927                    )
8928                    .encode(buf);
8929                ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
8930                self.fixed_features.write_to(__cache, buf);
8931            }
8932            self.__buffa_unknown_fields.write_to(buf);
8933        }
8934        fn merge_field(
8935            &mut self,
8936            tag: ::buffa::encoding::Tag,
8937            buf: &mut impl ::buffa::bytes::Buf,
8938            depth: u32,
8939        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8940            #[allow(unused_imports)]
8941            use ::buffa::bytes::Buf as _;
8942            #[allow(unused_imports)]
8943            use ::buffa::Enumeration as _;
8944            match tag.field_number() {
8945                3u32 => {
8946                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8947                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8948                            field_number: 3u32,
8949                            expected: 0u8,
8950                            actual: tag.wire_type() as u8,
8951                        });
8952                    }
8953                    let __raw = ::buffa::types::decode_int32(buf)?;
8954                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
8955                        __raw,
8956                    ) {
8957                        self.edition = ::core::option::Option::Some(__v);
8958                    } else {
8959                        self.__buffa_unknown_fields
8960                            .push(::buffa::UnknownField {
8961                                number: 3u32,
8962                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
8963                            });
8964                    }
8965                }
8966                4u32 => {
8967                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8968                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8969                            field_number: 4u32,
8970                            expected: 2u8,
8971                            actual: tag.wire_type() as u8,
8972                        });
8973                    }
8974                    ::buffa::Message::merge_length_delimited(
8975                        self.overridable_features.get_or_insert_default(),
8976                        buf,
8977                        depth,
8978                    )?;
8979                }
8980                5u32 => {
8981                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
8982                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8983                            field_number: 5u32,
8984                            expected: 2u8,
8985                            actual: tag.wire_type() as u8,
8986                        });
8987                    }
8988                    ::buffa::Message::merge_length_delimited(
8989                        self.fixed_features.get_or_insert_default(),
8990                        buf,
8991                        depth,
8992                    )?;
8993                }
8994                _ => {
8995                    self.__buffa_unknown_fields
8996                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
8997                }
8998            }
8999            ::core::result::Result::Ok(())
9000        }
9001        fn clear(&mut self) {
9002            self.edition = ::core::option::Option::None;
9003            self.overridable_features = ::buffa::MessageField::none();
9004            self.fixed_features = ::buffa::MessageField::none();
9005            self.__buffa_unknown_fields.clear();
9006        }
9007    }
9008    impl ::buffa::ExtensionSet for FeatureSetEditionDefault {
9009        const PROTO_FQN: &'static str = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault";
9010        fn unknown_fields(&self) -> &::buffa::UnknownFields {
9011            &self.__buffa_unknown_fields
9012        }
9013        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9014            &mut self.__buffa_unknown_fields
9015        }
9016    }
9017}
9018/// ===================================================================
9019/// Optional source code info
9020///
9021/// Encapsulates information about the original source file from which a
9022/// FileDescriptorProto was generated.
9023#[derive(Clone, PartialEq, Default)]
9024pub struct SourceCodeInfo {
9025    /// A Location identifies a piece of source code in a .proto file which
9026    /// corresponds to a particular definition.  This information is intended
9027    /// to be useful to IDEs, code indexers, documentation generators, and similar
9028    /// tools.
9029    ///
9030    /// For example, say we have a file like:
9031    ///   message Foo {
9032    /// ```text
9033    /// optional string foo = 1;
9034    /// ```
9035    ///   }
9036    /// Let's look at just the field definition:
9037    ///   optional string foo = 1;
9038    ///   ^       ^^     ^^  ^  ^^^
9039    ///   a       bc     de  f  ghi
9040    /// We have the following locations:
9041    ///   span   path               represents
9042    ///   \[a,i)  \[ 4, 0, 2, 0 \]     The whole field definition.
9043    ///   \[a,b)  \[ 4, 0, 2, 0, 4 \]  The label (optional).
9044    ///   \[c,d)  \[ 4, 0, 2, 0, 5 \]  The type (string).
9045    ///   \[e,f)  \[ 4, 0, 2, 0, 1 \]  The name (foo).
9046    ///   \[g,h)  \[ 4, 0, 2, 0, 3 \]  The number (1).
9047    ///
9048    /// Notes:
9049    /// - A location may refer to a repeated field itself (i.e. not to any
9050    ///   particular index within it).  This is used whenever a set of elements are
9051    ///   logically enclosed in a single code segment.  For example, an entire
9052    ///   extend block (possibly containing multiple extension definitions) will
9053    ///   have an outer location whose path refers to the "extensions" repeated
9054    ///   field without an index.
9055    /// - Multiple locations may have the same path.  This happens when a single
9056    ///   logical declaration is spread out across multiple places.  The most
9057    ///   obvious example is the "extend" block again -- there may be multiple
9058    ///   extend blocks in the same scope, each of which will have the same path.
9059    /// - A location's span is not always a subset of its parent's span.  For
9060    ///   example, the "extendee" of an extension declaration appears at the
9061    ///   beginning of the "extend" block and is shared by all extensions within
9062    ///   the block.
9063    /// - Just because a location's span is a subset of some other location's span
9064    ///   does not mean that it is a descendant.  For example, a "group" defines
9065    ///   both a type and a field in a single declaration.  Thus, the locations
9066    ///   corresponding to the type and field and their components will overlap.
9067    /// - Code which tries to interpret locations should probably be designed to
9068    ///   ignore those that it doesn't understand, as more types of locations could
9069    ///   be recorded in the future.
9070    ///
9071    /// Field 1: `location`
9072    pub location: ::buffa::alloc::vec::Vec<source_code_info::Location>,
9073    #[doc(hidden)]
9074    pub __buffa_unknown_fields: ::buffa::UnknownFields,
9075}
9076impl ::core::fmt::Debug for SourceCodeInfo {
9077    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9078        f.debug_struct("SourceCodeInfo").field("location", &self.location).finish()
9079    }
9080}
9081impl SourceCodeInfo {
9082    /// Protobuf type URL for this message, for use with `Any::pack` and
9083    /// `Any::unpack_if`.
9084    ///
9085    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9086    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.SourceCodeInfo";
9087}
9088impl ::buffa::DefaultInstance for SourceCodeInfo {
9089    fn default_instance() -> &'static Self {
9090        static VALUE: ::buffa::__private::OnceBox<SourceCodeInfo> = ::buffa::__private::OnceBox::new();
9091        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9092    }
9093}
9094impl ::buffa::Message for SourceCodeInfo {
9095    /// Returns the total encoded size in bytes.
9096    ///
9097    /// The result is a `u32`; the protobuf specification requires all
9098    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9099    /// compliant message will never overflow this type.
9100    #[allow(clippy::let_and_return)]
9101    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9102        #[allow(unused_imports)]
9103        use ::buffa::Enumeration as _;
9104        let mut size = 0u32;
9105        for v in &self.location {
9106            let __slot = __cache.reserve();
9107            let inner_size = v.compute_size(__cache);
9108            __cache.set(__slot, inner_size);
9109            size
9110                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9111                    + inner_size;
9112        }
9113        size += self.__buffa_unknown_fields.encoded_len() as u32;
9114        size
9115    }
9116    fn write_to(
9117        &self,
9118        __cache: &mut ::buffa::SizeCache,
9119        buf: &mut impl ::buffa::bytes::BufMut,
9120    ) {
9121        #[allow(unused_imports)]
9122        use ::buffa::Enumeration as _;
9123        for v in &self.location {
9124            ::buffa::encoding::Tag::new(
9125                    1u32,
9126                    ::buffa::encoding::WireType::LengthDelimited,
9127                )
9128                .encode(buf);
9129            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9130            v.write_to(__cache, buf);
9131        }
9132        self.__buffa_unknown_fields.write_to(buf);
9133    }
9134    fn merge_field(
9135        &mut self,
9136        tag: ::buffa::encoding::Tag,
9137        buf: &mut impl ::buffa::bytes::Buf,
9138        depth: u32,
9139    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9140        #[allow(unused_imports)]
9141        use ::buffa::bytes::Buf as _;
9142        #[allow(unused_imports)]
9143        use ::buffa::Enumeration as _;
9144        match tag.field_number() {
9145            1u32 => {
9146                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9147                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9148                        field_number: 1u32,
9149                        expected: 2u8,
9150                        actual: tag.wire_type() as u8,
9151                    });
9152                }
9153                let mut elem = ::core::default::Default::default();
9154                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
9155                self.location.push(elem);
9156            }
9157            _ => {
9158                self.__buffa_unknown_fields
9159                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9160            }
9161        }
9162        ::core::result::Result::Ok(())
9163    }
9164    fn clear(&mut self) {
9165        self.location.clear();
9166        self.__buffa_unknown_fields.clear();
9167    }
9168}
9169impl ::buffa::ExtensionSet for SourceCodeInfo {
9170    const PROTO_FQN: &'static str = "google.protobuf.SourceCodeInfo";
9171    fn unknown_fields(&self) -> &::buffa::UnknownFields {
9172        &self.__buffa_unknown_fields
9173    }
9174    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9175        &mut self.__buffa_unknown_fields
9176    }
9177}
9178pub mod source_code_info {
9179    #[allow(unused_imports)]
9180    use super::*;
9181    #[derive(Clone, PartialEq, Default)]
9182    pub struct Location {
9183        /// Identifies which part of the FileDescriptorProto was defined at this
9184        /// location.
9185        ///
9186        /// Each element is a field number or an index.  They form a path from
9187        /// the root FileDescriptorProto to the place where the definition appears.
9188        /// For example, this path:
9189        ///   \[ 4, 3, 2, 7, 1 \]
9190        /// refers to:
9191        ///   file.message_type(3)  // 4, 3
9192        /// ```text
9193        ///   .field(7)         // 2, 7
9194        ///   .name()           // 1
9195        /// ```
9196        /// This is because FileDescriptorProto.message_type has field number 4:
9197        ///   repeated DescriptorProto message_type = 4;
9198        /// and DescriptorProto.field has field number 2:
9199        ///   repeated FieldDescriptorProto field = 2;
9200        /// and FieldDescriptorProto.name has field number 1:
9201        ///   optional string name = 1;
9202        ///
9203        /// Thus, the above path gives the location of a field name.  If we removed
9204        /// the last element:
9205        ///   \[ 4, 3, 2, 7 \]
9206        /// this path refers to the whole field declaration (from the beginning
9207        /// of the label to the terminating semicolon).
9208        ///
9209        /// Field 1: `path`
9210        pub path: ::buffa::alloc::vec::Vec<i32>,
9211        /// Always has exactly three or four elements: start line, start column,
9212        /// end line (optional, otherwise assumed same as start line), end column.
9213        /// These are packed into a single field for efficiency.  Note that line
9214        /// and column numbers are zero-based -- typically you will want to add
9215        /// 1 to each before displaying to a user.
9216        ///
9217        /// Field 2: `span`
9218        pub span: ::buffa::alloc::vec::Vec<i32>,
9219        /// If this SourceCodeInfo represents a complete declaration, these are any
9220        /// comments appearing before and after the declaration which appear to be
9221        /// attached to the declaration.
9222        ///
9223        /// A series of line comments appearing on consecutive lines, with no other
9224        /// tokens appearing on those lines, will be treated as a single comment.
9225        ///
9226        /// leading_detached_comments will keep paragraphs of comments that appear
9227        /// before (but not connected to) the current element. Each paragraph,
9228        /// separated by empty lines, will be one comment element in the repeated
9229        /// field.
9230        ///
9231        /// Only the comment content is provided; comment markers (e.g. //) are
9232        /// stripped out.  For block comments, leading whitespace and an asterisk
9233        /// will be stripped from the beginning of each line other than the first.
9234        /// Newlines are included in the output.
9235        ///
9236        /// Examples:
9237        ///
9238        ///   optional int32 foo = 1;  // Comment attached to foo.
9239        ///   // Comment attached to bar.
9240        ///   optional int32 bar = 2;
9241        ///
9242        ///   optional string baz = 3;
9243        ///   // Comment attached to baz.
9244        ///   // Another line attached to baz.
9245        ///
9246        ///   // Comment attached to moo.
9247        ///   //
9248        ///   // Another line attached to moo.
9249        ///   optional double moo = 4;
9250        ///
9251        ///   // Detached comment for corge. This is not leading or trailing comments
9252        ///   // to moo or corge because there are blank lines separating it from
9253        ///   // both.
9254        ///
9255        ///   // Detached comment for corge paragraph 2.
9256        ///
9257        ///   optional string corge = 5;
9258        ///   /* Block comment attached
9259        /// ```text
9260        /// * to corge.  Leading asterisks
9261        /// * will be removed. */
9262        /// ```
9263        ///   /* Block comment attached to
9264        /// ```text
9265        /// * grault. */
9266        /// ```
9267        ///   optional int32 grault = 6;
9268        ///
9269        ///   // ignored detached comments.
9270        ///
9271        /// Field 3: `leading_comments`
9272        pub leading_comments: ::core::option::Option<::buffa::alloc::string::String>,
9273        /// Field 4: `trailing_comments`
9274        pub trailing_comments: ::core::option::Option<::buffa::alloc::string::String>,
9275        /// Field 6: `leading_detached_comments`
9276        pub leading_detached_comments: ::buffa::alloc::vec::Vec<
9277            ::buffa::alloc::string::String,
9278        >,
9279        #[doc(hidden)]
9280        pub __buffa_unknown_fields: ::buffa::UnknownFields,
9281    }
9282    impl ::core::fmt::Debug for Location {
9283        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9284            f.debug_struct("Location")
9285                .field("path", &self.path)
9286                .field("span", &self.span)
9287                .field("leading_comments", &self.leading_comments)
9288                .field("trailing_comments", &self.trailing_comments)
9289                .field("leading_detached_comments", &self.leading_detached_comments)
9290                .finish()
9291        }
9292    }
9293    impl Location {
9294        /// Protobuf type URL for this message, for use with `Any::pack` and
9295        /// `Any::unpack_if`.
9296        ///
9297        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9298        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.SourceCodeInfo.Location";
9299    }
9300    impl ::buffa::DefaultInstance for Location {
9301        fn default_instance() -> &'static Self {
9302            static VALUE: ::buffa::__private::OnceBox<Location> = ::buffa::__private::OnceBox::new();
9303            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9304        }
9305    }
9306    impl ::buffa::Message for Location {
9307        /// Returns the total encoded size in bytes.
9308        ///
9309        /// The result is a `u32`; the protobuf specification requires all
9310        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9311        /// compliant message will never overflow this type.
9312        #[allow(clippy::let_and_return)]
9313        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9314            #[allow(unused_imports)]
9315            use ::buffa::Enumeration as _;
9316            let mut size = 0u32;
9317            if !self.path.is_empty() {
9318                let payload: u32 = self
9319                    .path
9320                    .iter()
9321                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9322                    .sum::<u32>();
9323                size
9324                    += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
9325                        + payload;
9326            }
9327            if !self.span.is_empty() {
9328                let payload: u32 = self
9329                    .span
9330                    .iter()
9331                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9332                    .sum::<u32>();
9333                size
9334                    += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
9335                        + payload;
9336            }
9337            if let Some(ref v) = self.leading_comments {
9338                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9339            }
9340            if let Some(ref v) = self.trailing_comments {
9341                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9342            }
9343            for v in &self.leading_detached_comments {
9344                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9345            }
9346            size += self.__buffa_unknown_fields.encoded_len() as u32;
9347            size
9348        }
9349        fn write_to(
9350            &self,
9351            _cache: &mut ::buffa::SizeCache,
9352            buf: &mut impl ::buffa::bytes::BufMut,
9353        ) {
9354            #[allow(unused_imports)]
9355            use ::buffa::Enumeration as _;
9356            if !self.path.is_empty() {
9357                let payload: u32 = self
9358                    .path
9359                    .iter()
9360                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9361                    .sum::<u32>();
9362                ::buffa::encoding::Tag::new(
9363                        1u32,
9364                        ::buffa::encoding::WireType::LengthDelimited,
9365                    )
9366                    .encode(buf);
9367                ::buffa::encoding::encode_varint(payload as u64, buf);
9368                for &v in &self.path {
9369                    ::buffa::types::encode_int32(v, buf);
9370                }
9371            }
9372            if !self.span.is_empty() {
9373                let payload: u32 = self
9374                    .span
9375                    .iter()
9376                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9377                    .sum::<u32>();
9378                ::buffa::encoding::Tag::new(
9379                        2u32,
9380                        ::buffa::encoding::WireType::LengthDelimited,
9381                    )
9382                    .encode(buf);
9383                ::buffa::encoding::encode_varint(payload as u64, buf);
9384                for &v in &self.span {
9385                    ::buffa::types::encode_int32(v, buf);
9386                }
9387            }
9388            if let Some(ref v) = self.leading_comments {
9389                ::buffa::encoding::Tag::new(
9390                        3u32,
9391                        ::buffa::encoding::WireType::LengthDelimited,
9392                    )
9393                    .encode(buf);
9394                ::buffa::types::encode_string(v, buf);
9395            }
9396            if let Some(ref v) = self.trailing_comments {
9397                ::buffa::encoding::Tag::new(
9398                        4u32,
9399                        ::buffa::encoding::WireType::LengthDelimited,
9400                    )
9401                    .encode(buf);
9402                ::buffa::types::encode_string(v, buf);
9403            }
9404            for v in &self.leading_detached_comments {
9405                ::buffa::encoding::Tag::new(
9406                        6u32,
9407                        ::buffa::encoding::WireType::LengthDelimited,
9408                    )
9409                    .encode(buf);
9410                ::buffa::types::encode_string(v, buf);
9411            }
9412            self.__buffa_unknown_fields.write_to(buf);
9413        }
9414        fn merge_field(
9415            &mut self,
9416            tag: ::buffa::encoding::Tag,
9417            buf: &mut impl ::buffa::bytes::Buf,
9418            depth: u32,
9419        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9420            #[allow(unused_imports)]
9421            use ::buffa::bytes::Buf as _;
9422            #[allow(unused_imports)]
9423            use ::buffa::Enumeration as _;
9424            match tag.field_number() {
9425                1u32 => {
9426                    if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
9427                        let len = ::buffa::encoding::decode_varint(buf)?;
9428                        let len = usize::try_from(len)
9429                            .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
9430                        if buf.remaining() < len {
9431                            return ::core::result::Result::Err(
9432                                ::buffa::DecodeError::UnexpectedEof,
9433                            );
9434                        }
9435                        self.path.reserve(len);
9436                        let mut limited = buf.take(len);
9437                        while limited.has_remaining() {
9438                            self.path.push(::buffa::types::decode_int32(&mut limited)?);
9439                        }
9440                        let leftover = limited.remaining();
9441                        if leftover > 0 {
9442                            limited.advance(leftover);
9443                        }
9444                    } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
9445                        self.path.push(::buffa::types::decode_int32(buf)?);
9446                    } else {
9447                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9448                            field_number: 1u32,
9449                            expected: 2u8,
9450                            actual: tag.wire_type() as u8,
9451                        });
9452                    }
9453                }
9454                2u32 => {
9455                    if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
9456                        let len = ::buffa::encoding::decode_varint(buf)?;
9457                        let len = usize::try_from(len)
9458                            .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
9459                        if buf.remaining() < len {
9460                            return ::core::result::Result::Err(
9461                                ::buffa::DecodeError::UnexpectedEof,
9462                            );
9463                        }
9464                        self.span.reserve(len);
9465                        let mut limited = buf.take(len);
9466                        while limited.has_remaining() {
9467                            self.span.push(::buffa::types::decode_int32(&mut limited)?);
9468                        }
9469                        let leftover = limited.remaining();
9470                        if leftover > 0 {
9471                            limited.advance(leftover);
9472                        }
9473                    } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
9474                        self.span.push(::buffa::types::decode_int32(buf)?);
9475                    } else {
9476                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9477                            field_number: 2u32,
9478                            expected: 2u8,
9479                            actual: tag.wire_type() as u8,
9480                        });
9481                    }
9482                }
9483                3u32 => {
9484                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9485                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9486                            field_number: 3u32,
9487                            expected: 2u8,
9488                            actual: tag.wire_type() as u8,
9489                        });
9490                    }
9491                    ::buffa::types::merge_string(
9492                        self
9493                            .leading_comments
9494                            .get_or_insert_with(::buffa::alloc::string::String::new),
9495                        buf,
9496                    )?;
9497                }
9498                4u32 => {
9499                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9500                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9501                            field_number: 4u32,
9502                            expected: 2u8,
9503                            actual: tag.wire_type() as u8,
9504                        });
9505                    }
9506                    ::buffa::types::merge_string(
9507                        self
9508                            .trailing_comments
9509                            .get_or_insert_with(::buffa::alloc::string::String::new),
9510                        buf,
9511                    )?;
9512                }
9513                6u32 => {
9514                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9515                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9516                            field_number: 6u32,
9517                            expected: 2u8,
9518                            actual: tag.wire_type() as u8,
9519                        });
9520                    }
9521                    self.leading_detached_comments
9522                        .push(::buffa::types::decode_string(buf)?);
9523                }
9524                _ => {
9525                    self.__buffa_unknown_fields
9526                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9527                }
9528            }
9529            ::core::result::Result::Ok(())
9530        }
9531        fn clear(&mut self) {
9532            self.path.clear();
9533            self.span.clear();
9534            self.leading_comments = ::core::option::Option::None;
9535            self.trailing_comments = ::core::option::Option::None;
9536            self.leading_detached_comments.clear();
9537            self.__buffa_unknown_fields.clear();
9538        }
9539    }
9540    impl ::buffa::ExtensionSet for Location {
9541        const PROTO_FQN: &'static str = "google.protobuf.SourceCodeInfo.Location";
9542        fn unknown_fields(&self) -> &::buffa::UnknownFields {
9543            &self.__buffa_unknown_fields
9544        }
9545        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9546            &mut self.__buffa_unknown_fields
9547        }
9548    }
9549}
9550/// Describes the relationship between generated code and its original source
9551/// file. A GeneratedCodeInfo message is associated with only one generated
9552/// source file, but may contain references to different source .proto files.
9553#[derive(Clone, PartialEq, Default)]
9554pub struct GeneratedCodeInfo {
9555    /// An Annotation connects some span of text in generated code to an element
9556    /// of its generating .proto file.
9557    ///
9558    /// Field 1: `annotation`
9559    pub annotation: ::buffa::alloc::vec::Vec<generated_code_info::Annotation>,
9560    #[doc(hidden)]
9561    pub __buffa_unknown_fields: ::buffa::UnknownFields,
9562}
9563impl ::core::fmt::Debug for GeneratedCodeInfo {
9564    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9565        f.debug_struct("GeneratedCodeInfo")
9566            .field("annotation", &self.annotation)
9567            .finish()
9568    }
9569}
9570impl GeneratedCodeInfo {
9571    /// Protobuf type URL for this message, for use with `Any::pack` and
9572    /// `Any::unpack_if`.
9573    ///
9574    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9575    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.GeneratedCodeInfo";
9576}
9577impl ::buffa::DefaultInstance for GeneratedCodeInfo {
9578    fn default_instance() -> &'static Self {
9579        static VALUE: ::buffa::__private::OnceBox<GeneratedCodeInfo> = ::buffa::__private::OnceBox::new();
9580        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9581    }
9582}
9583impl ::buffa::Message for GeneratedCodeInfo {
9584    /// Returns the total encoded size in bytes.
9585    ///
9586    /// The result is a `u32`; the protobuf specification requires all
9587    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9588    /// compliant message will never overflow this type.
9589    #[allow(clippy::let_and_return)]
9590    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9591        #[allow(unused_imports)]
9592        use ::buffa::Enumeration as _;
9593        let mut size = 0u32;
9594        for v in &self.annotation {
9595            let __slot = __cache.reserve();
9596            let inner_size = v.compute_size(__cache);
9597            __cache.set(__slot, inner_size);
9598            size
9599                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9600                    + inner_size;
9601        }
9602        size += self.__buffa_unknown_fields.encoded_len() as u32;
9603        size
9604    }
9605    fn write_to(
9606        &self,
9607        __cache: &mut ::buffa::SizeCache,
9608        buf: &mut impl ::buffa::bytes::BufMut,
9609    ) {
9610        #[allow(unused_imports)]
9611        use ::buffa::Enumeration as _;
9612        for v in &self.annotation {
9613            ::buffa::encoding::Tag::new(
9614                    1u32,
9615                    ::buffa::encoding::WireType::LengthDelimited,
9616                )
9617                .encode(buf);
9618            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9619            v.write_to(__cache, buf);
9620        }
9621        self.__buffa_unknown_fields.write_to(buf);
9622    }
9623    fn merge_field(
9624        &mut self,
9625        tag: ::buffa::encoding::Tag,
9626        buf: &mut impl ::buffa::bytes::Buf,
9627        depth: u32,
9628    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9629        #[allow(unused_imports)]
9630        use ::buffa::bytes::Buf as _;
9631        #[allow(unused_imports)]
9632        use ::buffa::Enumeration as _;
9633        match tag.field_number() {
9634            1u32 => {
9635                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9636                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9637                        field_number: 1u32,
9638                        expected: 2u8,
9639                        actual: tag.wire_type() as u8,
9640                    });
9641                }
9642                let mut elem = ::core::default::Default::default();
9643                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
9644                self.annotation.push(elem);
9645            }
9646            _ => {
9647                self.__buffa_unknown_fields
9648                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9649            }
9650        }
9651        ::core::result::Result::Ok(())
9652    }
9653    fn clear(&mut self) {
9654        self.annotation.clear();
9655        self.__buffa_unknown_fields.clear();
9656    }
9657}
9658impl ::buffa::ExtensionSet for GeneratedCodeInfo {
9659    const PROTO_FQN: &'static str = "google.protobuf.GeneratedCodeInfo";
9660    fn unknown_fields(&self) -> &::buffa::UnknownFields {
9661        &self.__buffa_unknown_fields
9662    }
9663    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9664        &mut self.__buffa_unknown_fields
9665    }
9666}
9667pub mod generated_code_info {
9668    #[allow(unused_imports)]
9669    use super::*;
9670    #[derive(Clone, PartialEq, Default)]
9671    pub struct Annotation {
9672        /// Identifies the element in the original source .proto file. This field
9673        /// is formatted the same as SourceCodeInfo.Location.path.
9674        ///
9675        /// Field 1: `path`
9676        pub path: ::buffa::alloc::vec::Vec<i32>,
9677        /// Identifies the filesystem path to the original source .proto.
9678        ///
9679        /// Field 2: `source_file`
9680        pub source_file: ::core::option::Option<::buffa::alloc::string::String>,
9681        /// Identifies the starting offset in bytes in the generated code
9682        /// that relates to the identified object.
9683        ///
9684        /// Field 3: `begin`
9685        pub begin: ::core::option::Option<i32>,
9686        /// Identifies the ending offset in bytes in the generated code that
9687        /// relates to the identified object. The end offset should be one past
9688        /// the last relevant byte (so the length of the text = end - begin).
9689        ///
9690        /// Field 4: `end`
9691        pub end: ::core::option::Option<i32>,
9692        /// Field 5: `semantic`
9693        pub semantic: ::core::option::Option<
9694            super::generated_code_info::annotation::Semantic,
9695        >,
9696        #[doc(hidden)]
9697        pub __buffa_unknown_fields: ::buffa::UnknownFields,
9698    }
9699    impl ::core::fmt::Debug for Annotation {
9700        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9701            f.debug_struct("Annotation")
9702                .field("path", &self.path)
9703                .field("source_file", &self.source_file)
9704                .field("begin", &self.begin)
9705                .field("end", &self.end)
9706                .field("semantic", &self.semantic)
9707                .finish()
9708        }
9709    }
9710    impl Annotation {
9711        /// Protobuf type URL for this message, for use with `Any::pack` and
9712        /// `Any::unpack_if`.
9713        ///
9714        /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
9715        pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.GeneratedCodeInfo.Annotation";
9716    }
9717    impl ::buffa::DefaultInstance for Annotation {
9718        fn default_instance() -> &'static Self {
9719            static VALUE: ::buffa::__private::OnceBox<Annotation> = ::buffa::__private::OnceBox::new();
9720            VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
9721        }
9722    }
9723    impl ::buffa::Message for Annotation {
9724        /// Returns the total encoded size in bytes.
9725        ///
9726        /// The result is a `u32`; the protobuf specification requires all
9727        /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
9728        /// compliant message will never overflow this type.
9729        #[allow(clippy::let_and_return)]
9730        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9731            #[allow(unused_imports)]
9732            use ::buffa::Enumeration as _;
9733            let mut size = 0u32;
9734            if !self.path.is_empty() {
9735                let payload: u32 = self
9736                    .path
9737                    .iter()
9738                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9739                    .sum::<u32>();
9740                size
9741                    += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
9742                        + payload;
9743            }
9744            if let Some(ref v) = self.source_file {
9745                size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9746            }
9747            if let Some(v) = self.begin {
9748                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
9749            }
9750            if let Some(v) = self.end {
9751                size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
9752            }
9753            if let Some(ref v) = self.semantic {
9754                size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
9755            }
9756            size += self.__buffa_unknown_fields.encoded_len() as u32;
9757            size
9758        }
9759        fn write_to(
9760            &self,
9761            _cache: &mut ::buffa::SizeCache,
9762            buf: &mut impl ::buffa::bytes::BufMut,
9763        ) {
9764            #[allow(unused_imports)]
9765            use ::buffa::Enumeration as _;
9766            if !self.path.is_empty() {
9767                let payload: u32 = self
9768                    .path
9769                    .iter()
9770                    .map(|&v| ::buffa::types::int32_encoded_len(v) as u32)
9771                    .sum::<u32>();
9772                ::buffa::encoding::Tag::new(
9773                        1u32,
9774                        ::buffa::encoding::WireType::LengthDelimited,
9775                    )
9776                    .encode(buf);
9777                ::buffa::encoding::encode_varint(payload as u64, buf);
9778                for &v in &self.path {
9779                    ::buffa::types::encode_int32(v, buf);
9780                }
9781            }
9782            if let Some(ref v) = self.source_file {
9783                ::buffa::encoding::Tag::new(
9784                        2u32,
9785                        ::buffa::encoding::WireType::LengthDelimited,
9786                    )
9787                    .encode(buf);
9788                ::buffa::types::encode_string(v, buf);
9789            }
9790            if let Some(v) = self.begin {
9791                ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
9792                    .encode(buf);
9793                ::buffa::types::encode_int32(v, buf);
9794            }
9795            if let Some(v) = self.end {
9796                ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
9797                    .encode(buf);
9798                ::buffa::types::encode_int32(v, buf);
9799            }
9800            if let Some(ref v) = self.semantic {
9801                ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
9802                    .encode(buf);
9803                ::buffa::types::encode_int32(v.to_i32(), buf);
9804            }
9805            self.__buffa_unknown_fields.write_to(buf);
9806        }
9807        fn merge_field(
9808            &mut self,
9809            tag: ::buffa::encoding::Tag,
9810            buf: &mut impl ::buffa::bytes::Buf,
9811            depth: u32,
9812        ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9813            #[allow(unused_imports)]
9814            use ::buffa::bytes::Buf as _;
9815            #[allow(unused_imports)]
9816            use ::buffa::Enumeration as _;
9817            match tag.field_number() {
9818                1u32 => {
9819                    if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
9820                        let len = ::buffa::encoding::decode_varint(buf)?;
9821                        let len = usize::try_from(len)
9822                            .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
9823                        if buf.remaining() < len {
9824                            return ::core::result::Result::Err(
9825                                ::buffa::DecodeError::UnexpectedEof,
9826                            );
9827                        }
9828                        self.path.reserve(len);
9829                        let mut limited = buf.take(len);
9830                        while limited.has_remaining() {
9831                            self.path.push(::buffa::types::decode_int32(&mut limited)?);
9832                        }
9833                        let leftover = limited.remaining();
9834                        if leftover > 0 {
9835                            limited.advance(leftover);
9836                        }
9837                    } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
9838                        self.path.push(::buffa::types::decode_int32(buf)?);
9839                    } else {
9840                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9841                            field_number: 1u32,
9842                            expected: 2u8,
9843                            actual: tag.wire_type() as u8,
9844                        });
9845                    }
9846                }
9847                2u32 => {
9848                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
9849                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9850                            field_number: 2u32,
9851                            expected: 2u8,
9852                            actual: tag.wire_type() as u8,
9853                        });
9854                    }
9855                    ::buffa::types::merge_string(
9856                        self
9857                            .source_file
9858                            .get_or_insert_with(::buffa::alloc::string::String::new),
9859                        buf,
9860                    )?;
9861                }
9862                3u32 => {
9863                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9864                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9865                            field_number: 3u32,
9866                            expected: 0u8,
9867                            actual: tag.wire_type() as u8,
9868                        });
9869                    }
9870                    self.begin = ::core::option::Option::Some(
9871                        ::buffa::types::decode_int32(buf)?,
9872                    );
9873                }
9874                4u32 => {
9875                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9876                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9877                            field_number: 4u32,
9878                            expected: 0u8,
9879                            actual: tag.wire_type() as u8,
9880                        });
9881                    }
9882                    self.end = ::core::option::Option::Some(
9883                        ::buffa::types::decode_int32(buf)?,
9884                    );
9885                }
9886                5u32 => {
9887                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9888                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9889                            field_number: 5u32,
9890                            expected: 0u8,
9891                            actual: tag.wire_type() as u8,
9892                        });
9893                    }
9894                    let __raw = ::buffa::types::decode_int32(buf)?;
9895                    if let ::core::option::Option::Some(__v) = ::buffa::Enumeration::from_i32(
9896                        __raw,
9897                    ) {
9898                        self.semantic = ::core::option::Option::Some(__v);
9899                    } else {
9900                        self.__buffa_unknown_fields
9901                            .push(::buffa::UnknownField {
9902                                number: 5u32,
9903                                data: ::buffa::UnknownFieldData::Varint(__raw as u64),
9904                            });
9905                    }
9906                }
9907                _ => {
9908                    self.__buffa_unknown_fields
9909                        .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
9910                }
9911            }
9912            ::core::result::Result::Ok(())
9913        }
9914        fn clear(&mut self) {
9915            self.path.clear();
9916            self.source_file = ::core::option::Option::None;
9917            self.begin = ::core::option::Option::None;
9918            self.end = ::core::option::Option::None;
9919            self.semantic = ::core::option::Option::None;
9920            self.__buffa_unknown_fields.clear();
9921        }
9922    }
9923    impl ::buffa::ExtensionSet for Annotation {
9924        const PROTO_FQN: &'static str = "google.protobuf.GeneratedCodeInfo.Annotation";
9925        fn unknown_fields(&self) -> &::buffa::UnknownFields {
9926            &self.__buffa_unknown_fields
9927        }
9928        fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
9929            &mut self.__buffa_unknown_fields
9930        }
9931    }
9932    pub mod annotation {
9933        #[allow(unused_imports)]
9934        use super::*;
9935        /// Represents the identified object's effect on the element in the original
9936        /// .proto file.
9937        #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
9938        #[repr(i32)]
9939        pub enum Semantic {
9940            /// There is no effect or the effect is indescribable.
9941            NONE = 0i32,
9942            /// The element is set or otherwise mutated.
9943            SET = 1i32,
9944            /// An alias to the element is returned.
9945            ALIAS = 2i32,
9946        }
9947        impl ::core::default::Default for Semantic {
9948            fn default() -> Self {
9949                Self::NONE
9950            }
9951        }
9952        impl ::buffa::Enumeration for Semantic {
9953            fn from_i32(value: i32) -> ::core::option::Option<Self> {
9954                match value {
9955                    0i32 => ::core::option::Option::Some(Self::NONE),
9956                    1i32 => ::core::option::Option::Some(Self::SET),
9957                    2i32 => ::core::option::Option::Some(Self::ALIAS),
9958                    _ => ::core::option::Option::None,
9959                }
9960            }
9961            fn to_i32(&self) -> i32 {
9962                *self as i32
9963            }
9964            fn proto_name(&self) -> &'static str {
9965                match self {
9966                    Self::NONE => "NONE",
9967                    Self::SET => "SET",
9968                    Self::ALIAS => "ALIAS",
9969                }
9970            }
9971            fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
9972                match name {
9973                    "NONE" => ::core::option::Option::Some(Self::NONE),
9974                    "SET" => ::core::option::Option::Some(Self::SET),
9975                    "ALIAS" => ::core::option::Option::Some(Self::ALIAS),
9976                    _ => ::core::option::Option::None,
9977                }
9978            }
9979            fn values() -> &'static [Self] {
9980                &[Self::NONE, Self::SET, Self::ALIAS]
9981            }
9982        }
9983    }
9984}