Skip to main content

buffa_types/generated/
google.protobuf.wrappers.rs

1// @generated by protoc-gen-buffa. DO NOT EDIT.
2// source: google/protobuf/wrappers.proto
3
4/// Wrapper message for `double`.
5///
6/// The JSON representation for `DoubleValue` is JSON number.
7#[derive(Clone, PartialEq, Default)]
8#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
9pub struct DoubleValue {
10    /// The double value.
11    ///
12    /// Field 1: `value`
13    pub value: f64,
14    #[doc(hidden)]
15    pub __buffa_unknown_fields: ::buffa::UnknownFields,
16    #[doc(hidden)]
17    pub __buffa_cached_size: ::buffa::__private::CachedSize,
18}
19impl ::core::fmt::Debug for DoubleValue {
20    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
21        f.debug_struct("DoubleValue").field("value", &self.value).finish()
22    }
23}
24impl DoubleValue {
25    /// Protobuf type URL for this message, for use with `Any::pack` and
26    /// `Any::unpack_if`.
27    ///
28    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
29    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DoubleValue";
30}
31unsafe impl ::buffa::DefaultInstance for DoubleValue {
32    fn default_instance() -> &'static Self {
33        static VALUE: ::buffa::__private::OnceBox<DoubleValue> = ::buffa::__private::OnceBox::new();
34        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
35    }
36}
37impl ::buffa::Message for DoubleValue {
38    /// Returns the total encoded size in bytes.
39    ///
40    /// The result is a `u32`; the protobuf specification requires all
41    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
42    /// compliant message will never overflow this type.
43    fn compute_size(&self) -> u32 {
44        #[allow(unused_imports)]
45        use ::buffa::Enumeration as _;
46        let mut size = 0u32;
47        if self.value.to_bits() != 0u64 {
48            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
49        }
50        size += self.__buffa_unknown_fields.encoded_len() as u32;
51        self.__buffa_cached_size.set(size);
52        size
53    }
54    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
55        #[allow(unused_imports)]
56        use ::buffa::Enumeration as _;
57        if self.value.to_bits() != 0u64 {
58            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Fixed64)
59                .encode(buf);
60            ::buffa::types::encode_double(self.value, buf);
61        }
62        self.__buffa_unknown_fields.write_to(buf);
63    }
64    fn merge_field(
65        &mut self,
66        tag: ::buffa::encoding::Tag,
67        buf: &mut impl ::buffa::bytes::Buf,
68        depth: u32,
69    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
70        #[allow(unused_imports)]
71        use ::buffa::bytes::Buf as _;
72        #[allow(unused_imports)]
73        use ::buffa::Enumeration as _;
74        match tag.field_number() {
75            1u32 => {
76                if tag.wire_type() != ::buffa::encoding::WireType::Fixed64 {
77                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
78                        field_number: 1u32,
79                        expected: 1u8,
80                        actual: tag.wire_type() as u8,
81                    });
82                }
83                self.value = ::buffa::types::decode_double(buf)?;
84            }
85            _ => {
86                self.__buffa_unknown_fields
87                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
88            }
89        }
90        ::core::result::Result::Ok(())
91    }
92    fn cached_size(&self) -> u32 {
93        self.__buffa_cached_size.get()
94    }
95    fn clear(&mut self) {
96        self.value = 0f64;
97        self.__buffa_unknown_fields.clear();
98        self.__buffa_cached_size.set(0);
99    }
100}
101impl ::buffa::ExtensionSet for DoubleValue {
102    const PROTO_FQN: &'static str = "google.protobuf.DoubleValue";
103    fn unknown_fields(&self) -> &::buffa::UnknownFields {
104        &self.__buffa_unknown_fields
105    }
106    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
107        &mut self.__buffa_unknown_fields
108    }
109}
110impl ::buffa::text::TextFormat for DoubleValue {
111    fn encode_text(
112        &self,
113        enc: &mut ::buffa::text::TextEncoder<'_>,
114    ) -> ::core::fmt::Result {
115        #[allow(unused_imports)]
116        use ::buffa::Enumeration as _;
117        if self.value.to_bits() != 0u64 {
118            enc.write_field_name("value")?;
119            enc.write_f64(self.value)?;
120        }
121        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
122        ::core::result::Result::Ok(())
123    }
124    fn merge_text(
125        &mut self,
126        dec: &mut ::buffa::text::TextDecoder<'_>,
127    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
128        #[allow(unused_imports)]
129        use ::buffa::Enumeration as _;
130        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
131            match __name {
132                "value" => self.value = dec.read_f64()?,
133                _ => dec.skip_value()?,
134            }
135        }
136        ::core::result::Result::Ok(())
137    }
138}
139#[doc(hidden)]
140pub const __DOUBLE_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
141    type_url: "type.googleapis.com/google.protobuf.DoubleValue",
142    text_encode: ::buffa::type_registry::any_encode_text::<DoubleValue>,
143    text_merge: ::buffa::type_registry::any_merge_text::<DoubleValue>,
144};
145/// Wrapper message for `double`.
146///
147/// The JSON representation for `DoubleValue` is JSON number.
148#[derive(Clone, Debug, Default)]
149pub struct DoubleValueView<'a> {
150    /// The double value.
151    ///
152    /// Field 1: `value`
153    pub value: f64,
154    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
155}
156impl<'a> DoubleValueView<'a> {
157    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
158    ///
159    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
160    /// and by generated sub-message decode arms with `depth - 1`.
161    ///
162    /// **Not part of the public API.** Named with a leading underscore to
163    /// signal that it is for generated-code use only.
164    #[doc(hidden)]
165    pub fn _decode_depth(
166        buf: &'a [u8],
167        depth: u32,
168    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
169        let mut view = Self::default();
170        view._merge_into_view(buf, depth)?;
171        ::core::result::Result::Ok(view)
172    }
173    /// Merge fields from `buf` into this view (proto merge semantics).
174    ///
175    /// Repeated fields append; singular fields last-wins; singular
176    /// MESSAGE fields merge recursively. Used by sub-message decode
177    /// arms when the same field appears multiple times on the wire.
178    ///
179    /// **Not part of the public API.**
180    #[doc(hidden)]
181    pub fn _merge_into_view(
182        &mut self,
183        buf: &'a [u8],
184        depth: u32,
185    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
186        let _ = depth;
187        #[allow(unused_variables)]
188        let view = self;
189        let mut cur: &'a [u8] = buf;
190        while !cur.is_empty() {
191            let before_tag = cur;
192            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
193            match tag.field_number() {
194                1u32 => {
195                    if tag.wire_type() != ::buffa::encoding::WireType::Fixed64 {
196                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
197                            field_number: 1u32,
198                            expected: 1u8,
199                            actual: tag.wire_type() as u8,
200                        });
201                    }
202                    view.value = ::buffa::types::decode_double(&mut cur)?;
203                }
204                _ => {
205                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
206                    let span_len = before_tag.len() - cur.len();
207                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
208                }
209            }
210        }
211        ::core::result::Result::Ok(())
212    }
213}
214impl<'a> ::buffa::MessageView<'a> for DoubleValueView<'a> {
215    type Owned = DoubleValue;
216    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
217        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
218    }
219    fn decode_view_with_limit(
220        buf: &'a [u8],
221        depth: u32,
222    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
223        Self::_decode_depth(buf, depth)
224    }
225    /// Convert this view to the owned message type.
226    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
227    fn to_owned_message(&self) -> DoubleValue {
228        #[allow(unused_imports)]
229        use ::buffa::alloc::string::ToString as _;
230        DoubleValue {
231            value: self.value,
232            __buffa_unknown_fields: self
233                .__buffa_unknown_fields
234                .to_owned()
235                .unwrap_or_default()
236                .into(),
237            ..::core::default::Default::default()
238        }
239    }
240}
241unsafe impl ::buffa::DefaultViewInstance for DoubleValueView<'static> {
242    fn default_view_instance() -> &'static Self {
243        static VALUE: ::buffa::__private::OnceBox<DoubleValueView<'static>> = ::buffa::__private::OnceBox::new();
244        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
245    }
246}
247unsafe impl<'a> ::buffa::HasDefaultViewInstance for DoubleValueView<'a> {
248    type Static = DoubleValueView<'static>;
249}
250/// Wrapper message for `float`.
251///
252/// The JSON representation for `FloatValue` is JSON number.
253#[derive(Clone, PartialEq, Default)]
254#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
255pub struct FloatValue {
256    /// The float value.
257    ///
258    /// Field 1: `value`
259    pub value: f32,
260    #[doc(hidden)]
261    pub __buffa_unknown_fields: ::buffa::UnknownFields,
262    #[doc(hidden)]
263    pub __buffa_cached_size: ::buffa::__private::CachedSize,
264}
265impl ::core::fmt::Debug for FloatValue {
266    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
267        f.debug_struct("FloatValue").field("value", &self.value).finish()
268    }
269}
270impl FloatValue {
271    /// Protobuf type URL for this message, for use with `Any::pack` and
272    /// `Any::unpack_if`.
273    ///
274    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
275    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FloatValue";
276}
277unsafe impl ::buffa::DefaultInstance for FloatValue {
278    fn default_instance() -> &'static Self {
279        static VALUE: ::buffa::__private::OnceBox<FloatValue> = ::buffa::__private::OnceBox::new();
280        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
281    }
282}
283impl ::buffa::Message for FloatValue {
284    /// Returns the total encoded size in bytes.
285    ///
286    /// The result is a `u32`; the protobuf specification requires all
287    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
288    /// compliant message will never overflow this type.
289    fn compute_size(&self) -> u32 {
290        #[allow(unused_imports)]
291        use ::buffa::Enumeration as _;
292        let mut size = 0u32;
293        if self.value.to_bits() != 0u32 {
294            size += 1u32 + ::buffa::types::FIXED32_ENCODED_LEN as u32;
295        }
296        size += self.__buffa_unknown_fields.encoded_len() as u32;
297        self.__buffa_cached_size.set(size);
298        size
299    }
300    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
301        #[allow(unused_imports)]
302        use ::buffa::Enumeration as _;
303        if self.value.to_bits() != 0u32 {
304            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Fixed32)
305                .encode(buf);
306            ::buffa::types::encode_float(self.value, buf);
307        }
308        self.__buffa_unknown_fields.write_to(buf);
309    }
310    fn merge_field(
311        &mut self,
312        tag: ::buffa::encoding::Tag,
313        buf: &mut impl ::buffa::bytes::Buf,
314        depth: u32,
315    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
316        #[allow(unused_imports)]
317        use ::buffa::bytes::Buf as _;
318        #[allow(unused_imports)]
319        use ::buffa::Enumeration as _;
320        match tag.field_number() {
321            1u32 => {
322                if tag.wire_type() != ::buffa::encoding::WireType::Fixed32 {
323                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
324                        field_number: 1u32,
325                        expected: 5u8,
326                        actual: tag.wire_type() as u8,
327                    });
328                }
329                self.value = ::buffa::types::decode_float(buf)?;
330            }
331            _ => {
332                self.__buffa_unknown_fields
333                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
334            }
335        }
336        ::core::result::Result::Ok(())
337    }
338    fn cached_size(&self) -> u32 {
339        self.__buffa_cached_size.get()
340    }
341    fn clear(&mut self) {
342        self.value = 0f32;
343        self.__buffa_unknown_fields.clear();
344        self.__buffa_cached_size.set(0);
345    }
346}
347impl ::buffa::ExtensionSet for FloatValue {
348    const PROTO_FQN: &'static str = "google.protobuf.FloatValue";
349    fn unknown_fields(&self) -> &::buffa::UnknownFields {
350        &self.__buffa_unknown_fields
351    }
352    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
353        &mut self.__buffa_unknown_fields
354    }
355}
356impl ::buffa::text::TextFormat for FloatValue {
357    fn encode_text(
358        &self,
359        enc: &mut ::buffa::text::TextEncoder<'_>,
360    ) -> ::core::fmt::Result {
361        #[allow(unused_imports)]
362        use ::buffa::Enumeration as _;
363        if self.value.to_bits() != 0u32 {
364            enc.write_field_name("value")?;
365            enc.write_f32(self.value)?;
366        }
367        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
368        ::core::result::Result::Ok(())
369    }
370    fn merge_text(
371        &mut self,
372        dec: &mut ::buffa::text::TextDecoder<'_>,
373    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
374        #[allow(unused_imports)]
375        use ::buffa::Enumeration as _;
376        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
377            match __name {
378                "value" => self.value = dec.read_f32()?,
379                _ => dec.skip_value()?,
380            }
381        }
382        ::core::result::Result::Ok(())
383    }
384}
385#[doc(hidden)]
386pub const __FLOAT_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
387    type_url: "type.googleapis.com/google.protobuf.FloatValue",
388    text_encode: ::buffa::type_registry::any_encode_text::<FloatValue>,
389    text_merge: ::buffa::type_registry::any_merge_text::<FloatValue>,
390};
391/// Wrapper message for `float`.
392///
393/// The JSON representation for `FloatValue` is JSON number.
394#[derive(Clone, Debug, Default)]
395pub struct FloatValueView<'a> {
396    /// The float value.
397    ///
398    /// Field 1: `value`
399    pub value: f32,
400    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
401}
402impl<'a> FloatValueView<'a> {
403    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
404    ///
405    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
406    /// and by generated sub-message decode arms with `depth - 1`.
407    ///
408    /// **Not part of the public API.** Named with a leading underscore to
409    /// signal that it is for generated-code use only.
410    #[doc(hidden)]
411    pub fn _decode_depth(
412        buf: &'a [u8],
413        depth: u32,
414    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
415        let mut view = Self::default();
416        view._merge_into_view(buf, depth)?;
417        ::core::result::Result::Ok(view)
418    }
419    /// Merge fields from `buf` into this view (proto merge semantics).
420    ///
421    /// Repeated fields append; singular fields last-wins; singular
422    /// MESSAGE fields merge recursively. Used by sub-message decode
423    /// arms when the same field appears multiple times on the wire.
424    ///
425    /// **Not part of the public API.**
426    #[doc(hidden)]
427    pub fn _merge_into_view(
428        &mut self,
429        buf: &'a [u8],
430        depth: u32,
431    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
432        let _ = depth;
433        #[allow(unused_variables)]
434        let view = self;
435        let mut cur: &'a [u8] = buf;
436        while !cur.is_empty() {
437            let before_tag = cur;
438            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
439            match tag.field_number() {
440                1u32 => {
441                    if tag.wire_type() != ::buffa::encoding::WireType::Fixed32 {
442                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
443                            field_number: 1u32,
444                            expected: 5u8,
445                            actual: tag.wire_type() as u8,
446                        });
447                    }
448                    view.value = ::buffa::types::decode_float(&mut cur)?;
449                }
450                _ => {
451                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
452                    let span_len = before_tag.len() - cur.len();
453                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
454                }
455            }
456        }
457        ::core::result::Result::Ok(())
458    }
459}
460impl<'a> ::buffa::MessageView<'a> for FloatValueView<'a> {
461    type Owned = FloatValue;
462    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
463        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
464    }
465    fn decode_view_with_limit(
466        buf: &'a [u8],
467        depth: u32,
468    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
469        Self::_decode_depth(buf, depth)
470    }
471    /// Convert this view to the owned message type.
472    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
473    fn to_owned_message(&self) -> FloatValue {
474        #[allow(unused_imports)]
475        use ::buffa::alloc::string::ToString as _;
476        FloatValue {
477            value: self.value,
478            __buffa_unknown_fields: self
479                .__buffa_unknown_fields
480                .to_owned()
481                .unwrap_or_default()
482                .into(),
483            ..::core::default::Default::default()
484        }
485    }
486}
487unsafe impl ::buffa::DefaultViewInstance for FloatValueView<'static> {
488    fn default_view_instance() -> &'static Self {
489        static VALUE: ::buffa::__private::OnceBox<FloatValueView<'static>> = ::buffa::__private::OnceBox::new();
490        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
491    }
492}
493unsafe impl<'a> ::buffa::HasDefaultViewInstance for FloatValueView<'a> {
494    type Static = FloatValueView<'static>;
495}
496/// Wrapper message for `int64`.
497///
498/// The JSON representation for `Int64Value` is JSON string.
499#[derive(Clone, PartialEq, Default)]
500#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
501pub struct Int64Value {
502    /// The int64 value.
503    ///
504    /// Field 1: `value`
505    pub value: i64,
506    #[doc(hidden)]
507    pub __buffa_unknown_fields: ::buffa::UnknownFields,
508    #[doc(hidden)]
509    pub __buffa_cached_size: ::buffa::__private::CachedSize,
510}
511impl ::core::fmt::Debug for Int64Value {
512    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
513        f.debug_struct("Int64Value").field("value", &self.value).finish()
514    }
515}
516impl Int64Value {
517    /// Protobuf type URL for this message, for use with `Any::pack` and
518    /// `Any::unpack_if`.
519    ///
520    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
521    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int64Value";
522}
523unsafe impl ::buffa::DefaultInstance for Int64Value {
524    fn default_instance() -> &'static Self {
525        static VALUE: ::buffa::__private::OnceBox<Int64Value> = ::buffa::__private::OnceBox::new();
526        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
527    }
528}
529impl ::buffa::Message for Int64Value {
530    /// Returns the total encoded size in bytes.
531    ///
532    /// The result is a `u32`; the protobuf specification requires all
533    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
534    /// compliant message will never overflow this type.
535    fn compute_size(&self) -> u32 {
536        #[allow(unused_imports)]
537        use ::buffa::Enumeration as _;
538        let mut size = 0u32;
539        if self.value != 0i64 {
540            size += 1u32 + ::buffa::types::int64_encoded_len(self.value) as u32;
541        }
542        size += self.__buffa_unknown_fields.encoded_len() as u32;
543        self.__buffa_cached_size.set(size);
544        size
545    }
546    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
547        #[allow(unused_imports)]
548        use ::buffa::Enumeration as _;
549        if self.value != 0i64 {
550            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
551                .encode(buf);
552            ::buffa::types::encode_int64(self.value, buf);
553        }
554        self.__buffa_unknown_fields.write_to(buf);
555    }
556    fn merge_field(
557        &mut self,
558        tag: ::buffa::encoding::Tag,
559        buf: &mut impl ::buffa::bytes::Buf,
560        depth: u32,
561    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
562        #[allow(unused_imports)]
563        use ::buffa::bytes::Buf as _;
564        #[allow(unused_imports)]
565        use ::buffa::Enumeration as _;
566        match tag.field_number() {
567            1u32 => {
568                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
569                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
570                        field_number: 1u32,
571                        expected: 0u8,
572                        actual: tag.wire_type() as u8,
573                    });
574                }
575                self.value = ::buffa::types::decode_int64(buf)?;
576            }
577            _ => {
578                self.__buffa_unknown_fields
579                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
580            }
581        }
582        ::core::result::Result::Ok(())
583    }
584    fn cached_size(&self) -> u32 {
585        self.__buffa_cached_size.get()
586    }
587    fn clear(&mut self) {
588        self.value = 0i64;
589        self.__buffa_unknown_fields.clear();
590        self.__buffa_cached_size.set(0);
591    }
592}
593impl ::buffa::ExtensionSet for Int64Value {
594    const PROTO_FQN: &'static str = "google.protobuf.Int64Value";
595    fn unknown_fields(&self) -> &::buffa::UnknownFields {
596        &self.__buffa_unknown_fields
597    }
598    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
599        &mut self.__buffa_unknown_fields
600    }
601}
602impl ::buffa::text::TextFormat for Int64Value {
603    fn encode_text(
604        &self,
605        enc: &mut ::buffa::text::TextEncoder<'_>,
606    ) -> ::core::fmt::Result {
607        #[allow(unused_imports)]
608        use ::buffa::Enumeration as _;
609        if self.value != 0i64 {
610            enc.write_field_name("value")?;
611            enc.write_i64(self.value)?;
612        }
613        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
614        ::core::result::Result::Ok(())
615    }
616    fn merge_text(
617        &mut self,
618        dec: &mut ::buffa::text::TextDecoder<'_>,
619    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
620        #[allow(unused_imports)]
621        use ::buffa::Enumeration as _;
622        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
623            match __name {
624                "value" => self.value = dec.read_i64()?,
625                _ => dec.skip_value()?,
626            }
627        }
628        ::core::result::Result::Ok(())
629    }
630}
631#[doc(hidden)]
632pub const __INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
633    type_url: "type.googleapis.com/google.protobuf.Int64Value",
634    text_encode: ::buffa::type_registry::any_encode_text::<Int64Value>,
635    text_merge: ::buffa::type_registry::any_merge_text::<Int64Value>,
636};
637/// Wrapper message for `int64`.
638///
639/// The JSON representation for `Int64Value` is JSON string.
640#[derive(Clone, Debug, Default)]
641pub struct Int64ValueView<'a> {
642    /// The int64 value.
643    ///
644    /// Field 1: `value`
645    pub value: i64,
646    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
647}
648impl<'a> Int64ValueView<'a> {
649    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
650    ///
651    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
652    /// and by generated sub-message decode arms with `depth - 1`.
653    ///
654    /// **Not part of the public API.** Named with a leading underscore to
655    /// signal that it is for generated-code use only.
656    #[doc(hidden)]
657    pub fn _decode_depth(
658        buf: &'a [u8],
659        depth: u32,
660    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
661        let mut view = Self::default();
662        view._merge_into_view(buf, depth)?;
663        ::core::result::Result::Ok(view)
664    }
665    /// Merge fields from `buf` into this view (proto merge semantics).
666    ///
667    /// Repeated fields append; singular fields last-wins; singular
668    /// MESSAGE fields merge recursively. Used by sub-message decode
669    /// arms when the same field appears multiple times on the wire.
670    ///
671    /// **Not part of the public API.**
672    #[doc(hidden)]
673    pub fn _merge_into_view(
674        &mut self,
675        buf: &'a [u8],
676        depth: u32,
677    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
678        let _ = depth;
679        #[allow(unused_variables)]
680        let view = self;
681        let mut cur: &'a [u8] = buf;
682        while !cur.is_empty() {
683            let before_tag = cur;
684            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
685            match tag.field_number() {
686                1u32 => {
687                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
688                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
689                            field_number: 1u32,
690                            expected: 0u8,
691                            actual: tag.wire_type() as u8,
692                        });
693                    }
694                    view.value = ::buffa::types::decode_int64(&mut cur)?;
695                }
696                _ => {
697                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
698                    let span_len = before_tag.len() - cur.len();
699                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
700                }
701            }
702        }
703        ::core::result::Result::Ok(())
704    }
705}
706impl<'a> ::buffa::MessageView<'a> for Int64ValueView<'a> {
707    type Owned = Int64Value;
708    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
709        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
710    }
711    fn decode_view_with_limit(
712        buf: &'a [u8],
713        depth: u32,
714    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
715        Self::_decode_depth(buf, depth)
716    }
717    /// Convert this view to the owned message type.
718    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
719    fn to_owned_message(&self) -> Int64Value {
720        #[allow(unused_imports)]
721        use ::buffa::alloc::string::ToString as _;
722        Int64Value {
723            value: self.value,
724            __buffa_unknown_fields: self
725                .__buffa_unknown_fields
726                .to_owned()
727                .unwrap_or_default()
728                .into(),
729            ..::core::default::Default::default()
730        }
731    }
732}
733unsafe impl ::buffa::DefaultViewInstance for Int64ValueView<'static> {
734    fn default_view_instance() -> &'static Self {
735        static VALUE: ::buffa::__private::OnceBox<Int64ValueView<'static>> = ::buffa::__private::OnceBox::new();
736        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
737    }
738}
739unsafe impl<'a> ::buffa::HasDefaultViewInstance for Int64ValueView<'a> {
740    type Static = Int64ValueView<'static>;
741}
742/// Wrapper message for `uint64`.
743///
744/// The JSON representation for `UInt64Value` is JSON string.
745#[derive(Clone, PartialEq, Default)]
746#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
747pub struct UInt64Value {
748    /// The uint64 value.
749    ///
750    /// Field 1: `value`
751    pub value: u64,
752    #[doc(hidden)]
753    pub __buffa_unknown_fields: ::buffa::UnknownFields,
754    #[doc(hidden)]
755    pub __buffa_cached_size: ::buffa::__private::CachedSize,
756}
757impl ::core::fmt::Debug for UInt64Value {
758    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
759        f.debug_struct("UInt64Value").field("value", &self.value).finish()
760    }
761}
762impl UInt64Value {
763    /// Protobuf type URL for this message, for use with `Any::pack` and
764    /// `Any::unpack_if`.
765    ///
766    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
767    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt64Value";
768}
769unsafe impl ::buffa::DefaultInstance for UInt64Value {
770    fn default_instance() -> &'static Self {
771        static VALUE: ::buffa::__private::OnceBox<UInt64Value> = ::buffa::__private::OnceBox::new();
772        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
773    }
774}
775impl ::buffa::Message for UInt64Value {
776    /// Returns the total encoded size in bytes.
777    ///
778    /// The result is a `u32`; the protobuf specification requires all
779    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
780    /// compliant message will never overflow this type.
781    fn compute_size(&self) -> u32 {
782        #[allow(unused_imports)]
783        use ::buffa::Enumeration as _;
784        let mut size = 0u32;
785        if self.value != 0u64 {
786            size += 1u32 + ::buffa::types::uint64_encoded_len(self.value) as u32;
787        }
788        size += self.__buffa_unknown_fields.encoded_len() as u32;
789        self.__buffa_cached_size.set(size);
790        size
791    }
792    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
793        #[allow(unused_imports)]
794        use ::buffa::Enumeration as _;
795        if self.value != 0u64 {
796            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
797                .encode(buf);
798            ::buffa::types::encode_uint64(self.value, buf);
799        }
800        self.__buffa_unknown_fields.write_to(buf);
801    }
802    fn merge_field(
803        &mut self,
804        tag: ::buffa::encoding::Tag,
805        buf: &mut impl ::buffa::bytes::Buf,
806        depth: u32,
807    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
808        #[allow(unused_imports)]
809        use ::buffa::bytes::Buf as _;
810        #[allow(unused_imports)]
811        use ::buffa::Enumeration as _;
812        match tag.field_number() {
813            1u32 => {
814                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
815                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
816                        field_number: 1u32,
817                        expected: 0u8,
818                        actual: tag.wire_type() as u8,
819                    });
820                }
821                self.value = ::buffa::types::decode_uint64(buf)?;
822            }
823            _ => {
824                self.__buffa_unknown_fields
825                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
826            }
827        }
828        ::core::result::Result::Ok(())
829    }
830    fn cached_size(&self) -> u32 {
831        self.__buffa_cached_size.get()
832    }
833    fn clear(&mut self) {
834        self.value = 0u64;
835        self.__buffa_unknown_fields.clear();
836        self.__buffa_cached_size.set(0);
837    }
838}
839impl ::buffa::ExtensionSet for UInt64Value {
840    const PROTO_FQN: &'static str = "google.protobuf.UInt64Value";
841    fn unknown_fields(&self) -> &::buffa::UnknownFields {
842        &self.__buffa_unknown_fields
843    }
844    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
845        &mut self.__buffa_unknown_fields
846    }
847}
848impl ::buffa::text::TextFormat for UInt64Value {
849    fn encode_text(
850        &self,
851        enc: &mut ::buffa::text::TextEncoder<'_>,
852    ) -> ::core::fmt::Result {
853        #[allow(unused_imports)]
854        use ::buffa::Enumeration as _;
855        if self.value != 0u64 {
856            enc.write_field_name("value")?;
857            enc.write_u64(self.value)?;
858        }
859        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
860        ::core::result::Result::Ok(())
861    }
862    fn merge_text(
863        &mut self,
864        dec: &mut ::buffa::text::TextDecoder<'_>,
865    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
866        #[allow(unused_imports)]
867        use ::buffa::Enumeration as _;
868        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
869            match __name {
870                "value" => self.value = dec.read_u64()?,
871                _ => dec.skip_value()?,
872            }
873        }
874        ::core::result::Result::Ok(())
875    }
876}
877#[doc(hidden)]
878pub const __U_INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
879    type_url: "type.googleapis.com/google.protobuf.UInt64Value",
880    text_encode: ::buffa::type_registry::any_encode_text::<UInt64Value>,
881    text_merge: ::buffa::type_registry::any_merge_text::<UInt64Value>,
882};
883/// Wrapper message for `uint64`.
884///
885/// The JSON representation for `UInt64Value` is JSON string.
886#[derive(Clone, Debug, Default)]
887pub struct UInt64ValueView<'a> {
888    /// The uint64 value.
889    ///
890    /// Field 1: `value`
891    pub value: u64,
892    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
893}
894impl<'a> UInt64ValueView<'a> {
895    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
896    ///
897    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
898    /// and by generated sub-message decode arms with `depth - 1`.
899    ///
900    /// **Not part of the public API.** Named with a leading underscore to
901    /// signal that it is for generated-code use only.
902    #[doc(hidden)]
903    pub fn _decode_depth(
904        buf: &'a [u8],
905        depth: u32,
906    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
907        let mut view = Self::default();
908        view._merge_into_view(buf, depth)?;
909        ::core::result::Result::Ok(view)
910    }
911    /// Merge fields from `buf` into this view (proto merge semantics).
912    ///
913    /// Repeated fields append; singular fields last-wins; singular
914    /// MESSAGE fields merge recursively. Used by sub-message decode
915    /// arms when the same field appears multiple times on the wire.
916    ///
917    /// **Not part of the public API.**
918    #[doc(hidden)]
919    pub fn _merge_into_view(
920        &mut self,
921        buf: &'a [u8],
922        depth: u32,
923    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
924        let _ = depth;
925        #[allow(unused_variables)]
926        let view = self;
927        let mut cur: &'a [u8] = buf;
928        while !cur.is_empty() {
929            let before_tag = cur;
930            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
931            match tag.field_number() {
932                1u32 => {
933                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
934                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
935                            field_number: 1u32,
936                            expected: 0u8,
937                            actual: tag.wire_type() as u8,
938                        });
939                    }
940                    view.value = ::buffa::types::decode_uint64(&mut cur)?;
941                }
942                _ => {
943                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
944                    let span_len = before_tag.len() - cur.len();
945                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
946                }
947            }
948        }
949        ::core::result::Result::Ok(())
950    }
951}
952impl<'a> ::buffa::MessageView<'a> for UInt64ValueView<'a> {
953    type Owned = UInt64Value;
954    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
955        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
956    }
957    fn decode_view_with_limit(
958        buf: &'a [u8],
959        depth: u32,
960    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
961        Self::_decode_depth(buf, depth)
962    }
963    /// Convert this view to the owned message type.
964    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
965    fn to_owned_message(&self) -> UInt64Value {
966        #[allow(unused_imports)]
967        use ::buffa::alloc::string::ToString as _;
968        UInt64Value {
969            value: self.value,
970            __buffa_unknown_fields: self
971                .__buffa_unknown_fields
972                .to_owned()
973                .unwrap_or_default()
974                .into(),
975            ..::core::default::Default::default()
976        }
977    }
978}
979unsafe impl ::buffa::DefaultViewInstance for UInt64ValueView<'static> {
980    fn default_view_instance() -> &'static Self {
981        static VALUE: ::buffa::__private::OnceBox<UInt64ValueView<'static>> = ::buffa::__private::OnceBox::new();
982        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
983    }
984}
985unsafe impl<'a> ::buffa::HasDefaultViewInstance for UInt64ValueView<'a> {
986    type Static = UInt64ValueView<'static>;
987}
988/// Wrapper message for `int32`.
989///
990/// The JSON representation for `Int32Value` is JSON number.
991#[derive(Clone, PartialEq, Default)]
992#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
993pub struct Int32Value {
994    /// The int32 value.
995    ///
996    /// Field 1: `value`
997    pub value: i32,
998    #[doc(hidden)]
999    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1000    #[doc(hidden)]
1001    pub __buffa_cached_size: ::buffa::__private::CachedSize,
1002}
1003impl ::core::fmt::Debug for Int32Value {
1004    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1005        f.debug_struct("Int32Value").field("value", &self.value).finish()
1006    }
1007}
1008impl Int32Value {
1009    /// Protobuf type URL for this message, for use with `Any::pack` and
1010    /// `Any::unpack_if`.
1011    ///
1012    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1013    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int32Value";
1014}
1015unsafe impl ::buffa::DefaultInstance for Int32Value {
1016    fn default_instance() -> &'static Self {
1017        static VALUE: ::buffa::__private::OnceBox<Int32Value> = ::buffa::__private::OnceBox::new();
1018        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1019    }
1020}
1021impl ::buffa::Message for Int32Value {
1022    /// Returns the total encoded size in bytes.
1023    ///
1024    /// The result is a `u32`; the protobuf specification requires all
1025    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1026    /// compliant message will never overflow this type.
1027    fn compute_size(&self) -> u32 {
1028        #[allow(unused_imports)]
1029        use ::buffa::Enumeration as _;
1030        let mut size = 0u32;
1031        if self.value != 0i32 {
1032            size += 1u32 + ::buffa::types::int32_encoded_len(self.value) as u32;
1033        }
1034        size += self.__buffa_unknown_fields.encoded_len() as u32;
1035        self.__buffa_cached_size.set(size);
1036        size
1037    }
1038    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
1039        #[allow(unused_imports)]
1040        use ::buffa::Enumeration as _;
1041        if self.value != 0i32 {
1042            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1043                .encode(buf);
1044            ::buffa::types::encode_int32(self.value, buf);
1045        }
1046        self.__buffa_unknown_fields.write_to(buf);
1047    }
1048    fn merge_field(
1049        &mut self,
1050        tag: ::buffa::encoding::Tag,
1051        buf: &mut impl ::buffa::bytes::Buf,
1052        depth: u32,
1053    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1054        #[allow(unused_imports)]
1055        use ::buffa::bytes::Buf as _;
1056        #[allow(unused_imports)]
1057        use ::buffa::Enumeration as _;
1058        match tag.field_number() {
1059            1u32 => {
1060                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1061                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1062                        field_number: 1u32,
1063                        expected: 0u8,
1064                        actual: tag.wire_type() as u8,
1065                    });
1066                }
1067                self.value = ::buffa::types::decode_int32(buf)?;
1068            }
1069            _ => {
1070                self.__buffa_unknown_fields
1071                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1072            }
1073        }
1074        ::core::result::Result::Ok(())
1075    }
1076    fn cached_size(&self) -> u32 {
1077        self.__buffa_cached_size.get()
1078    }
1079    fn clear(&mut self) {
1080        self.value = 0i32;
1081        self.__buffa_unknown_fields.clear();
1082        self.__buffa_cached_size.set(0);
1083    }
1084}
1085impl ::buffa::ExtensionSet for Int32Value {
1086    const PROTO_FQN: &'static str = "google.protobuf.Int32Value";
1087    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1088        &self.__buffa_unknown_fields
1089    }
1090    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1091        &mut self.__buffa_unknown_fields
1092    }
1093}
1094impl ::buffa::text::TextFormat for Int32Value {
1095    fn encode_text(
1096        &self,
1097        enc: &mut ::buffa::text::TextEncoder<'_>,
1098    ) -> ::core::fmt::Result {
1099        #[allow(unused_imports)]
1100        use ::buffa::Enumeration as _;
1101        if self.value != 0i32 {
1102            enc.write_field_name("value")?;
1103            enc.write_i32(self.value)?;
1104        }
1105        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1106        ::core::result::Result::Ok(())
1107    }
1108    fn merge_text(
1109        &mut self,
1110        dec: &mut ::buffa::text::TextDecoder<'_>,
1111    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1112        #[allow(unused_imports)]
1113        use ::buffa::Enumeration as _;
1114        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1115            match __name {
1116                "value" => self.value = dec.read_i32()?,
1117                _ => dec.skip_value()?,
1118            }
1119        }
1120        ::core::result::Result::Ok(())
1121    }
1122}
1123#[doc(hidden)]
1124pub const __INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1125    type_url: "type.googleapis.com/google.protobuf.Int32Value",
1126    text_encode: ::buffa::type_registry::any_encode_text::<Int32Value>,
1127    text_merge: ::buffa::type_registry::any_merge_text::<Int32Value>,
1128};
1129/// Wrapper message for `int32`.
1130///
1131/// The JSON representation for `Int32Value` is JSON number.
1132#[derive(Clone, Debug, Default)]
1133pub struct Int32ValueView<'a> {
1134    /// The int32 value.
1135    ///
1136    /// Field 1: `value`
1137    pub value: i32,
1138    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1139}
1140impl<'a> Int32ValueView<'a> {
1141    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
1142    ///
1143    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
1144    /// and by generated sub-message decode arms with `depth - 1`.
1145    ///
1146    /// **Not part of the public API.** Named with a leading underscore to
1147    /// signal that it is for generated-code use only.
1148    #[doc(hidden)]
1149    pub fn _decode_depth(
1150        buf: &'a [u8],
1151        depth: u32,
1152    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1153        let mut view = Self::default();
1154        view._merge_into_view(buf, depth)?;
1155        ::core::result::Result::Ok(view)
1156    }
1157    /// Merge fields from `buf` into this view (proto merge semantics).
1158    ///
1159    /// Repeated fields append; singular fields last-wins; singular
1160    /// MESSAGE fields merge recursively. Used by sub-message decode
1161    /// arms when the same field appears multiple times on the wire.
1162    ///
1163    /// **Not part of the public API.**
1164    #[doc(hidden)]
1165    pub fn _merge_into_view(
1166        &mut self,
1167        buf: &'a [u8],
1168        depth: u32,
1169    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1170        let _ = depth;
1171        #[allow(unused_variables)]
1172        let view = self;
1173        let mut cur: &'a [u8] = buf;
1174        while !cur.is_empty() {
1175            let before_tag = cur;
1176            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
1177            match tag.field_number() {
1178                1u32 => {
1179                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1180                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1181                            field_number: 1u32,
1182                            expected: 0u8,
1183                            actual: tag.wire_type() as u8,
1184                        });
1185                    }
1186                    view.value = ::buffa::types::decode_int32(&mut cur)?;
1187                }
1188                _ => {
1189                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
1190                    let span_len = before_tag.len() - cur.len();
1191                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
1192                }
1193            }
1194        }
1195        ::core::result::Result::Ok(())
1196    }
1197}
1198impl<'a> ::buffa::MessageView<'a> for Int32ValueView<'a> {
1199    type Owned = Int32Value;
1200    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1201        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
1202    }
1203    fn decode_view_with_limit(
1204        buf: &'a [u8],
1205        depth: u32,
1206    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1207        Self::_decode_depth(buf, depth)
1208    }
1209    /// Convert this view to the owned message type.
1210    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
1211    fn to_owned_message(&self) -> Int32Value {
1212        #[allow(unused_imports)]
1213        use ::buffa::alloc::string::ToString as _;
1214        Int32Value {
1215            value: self.value,
1216            __buffa_unknown_fields: self
1217                .__buffa_unknown_fields
1218                .to_owned()
1219                .unwrap_or_default()
1220                .into(),
1221            ..::core::default::Default::default()
1222        }
1223    }
1224}
1225unsafe impl ::buffa::DefaultViewInstance for Int32ValueView<'static> {
1226    fn default_view_instance() -> &'static Self {
1227        static VALUE: ::buffa::__private::OnceBox<Int32ValueView<'static>> = ::buffa::__private::OnceBox::new();
1228        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1229    }
1230}
1231unsafe impl<'a> ::buffa::HasDefaultViewInstance for Int32ValueView<'a> {
1232    type Static = Int32ValueView<'static>;
1233}
1234/// Wrapper message for `uint32`.
1235///
1236/// The JSON representation for `UInt32Value` is JSON number.
1237#[derive(Clone, PartialEq, Default)]
1238#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1239pub struct UInt32Value {
1240    /// The uint32 value.
1241    ///
1242    /// Field 1: `value`
1243    pub value: u32,
1244    #[doc(hidden)]
1245    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1246    #[doc(hidden)]
1247    pub __buffa_cached_size: ::buffa::__private::CachedSize,
1248}
1249impl ::core::fmt::Debug for UInt32Value {
1250    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1251        f.debug_struct("UInt32Value").field("value", &self.value).finish()
1252    }
1253}
1254impl UInt32Value {
1255    /// Protobuf type URL for this message, for use with `Any::pack` and
1256    /// `Any::unpack_if`.
1257    ///
1258    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1259    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt32Value";
1260}
1261unsafe impl ::buffa::DefaultInstance for UInt32Value {
1262    fn default_instance() -> &'static Self {
1263        static VALUE: ::buffa::__private::OnceBox<UInt32Value> = ::buffa::__private::OnceBox::new();
1264        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1265    }
1266}
1267impl ::buffa::Message for UInt32Value {
1268    /// Returns the total encoded size in bytes.
1269    ///
1270    /// The result is a `u32`; the protobuf specification requires all
1271    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1272    /// compliant message will never overflow this type.
1273    fn compute_size(&self) -> u32 {
1274        #[allow(unused_imports)]
1275        use ::buffa::Enumeration as _;
1276        let mut size = 0u32;
1277        if self.value != 0u32 {
1278            size += 1u32 + ::buffa::types::uint32_encoded_len(self.value) as u32;
1279        }
1280        size += self.__buffa_unknown_fields.encoded_len() as u32;
1281        self.__buffa_cached_size.set(size);
1282        size
1283    }
1284    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
1285        #[allow(unused_imports)]
1286        use ::buffa::Enumeration as _;
1287        if self.value != 0u32 {
1288            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1289                .encode(buf);
1290            ::buffa::types::encode_uint32(self.value, buf);
1291        }
1292        self.__buffa_unknown_fields.write_to(buf);
1293    }
1294    fn merge_field(
1295        &mut self,
1296        tag: ::buffa::encoding::Tag,
1297        buf: &mut impl ::buffa::bytes::Buf,
1298        depth: u32,
1299    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1300        #[allow(unused_imports)]
1301        use ::buffa::bytes::Buf as _;
1302        #[allow(unused_imports)]
1303        use ::buffa::Enumeration as _;
1304        match tag.field_number() {
1305            1u32 => {
1306                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1307                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1308                        field_number: 1u32,
1309                        expected: 0u8,
1310                        actual: tag.wire_type() as u8,
1311                    });
1312                }
1313                self.value = ::buffa::types::decode_uint32(buf)?;
1314            }
1315            _ => {
1316                self.__buffa_unknown_fields
1317                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1318            }
1319        }
1320        ::core::result::Result::Ok(())
1321    }
1322    fn cached_size(&self) -> u32 {
1323        self.__buffa_cached_size.get()
1324    }
1325    fn clear(&mut self) {
1326        self.value = 0u32;
1327        self.__buffa_unknown_fields.clear();
1328        self.__buffa_cached_size.set(0);
1329    }
1330}
1331impl ::buffa::ExtensionSet for UInt32Value {
1332    const PROTO_FQN: &'static str = "google.protobuf.UInt32Value";
1333    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1334        &self.__buffa_unknown_fields
1335    }
1336    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1337        &mut self.__buffa_unknown_fields
1338    }
1339}
1340impl ::buffa::text::TextFormat for UInt32Value {
1341    fn encode_text(
1342        &self,
1343        enc: &mut ::buffa::text::TextEncoder<'_>,
1344    ) -> ::core::fmt::Result {
1345        #[allow(unused_imports)]
1346        use ::buffa::Enumeration as _;
1347        if self.value != 0u32 {
1348            enc.write_field_name("value")?;
1349            enc.write_u32(self.value)?;
1350        }
1351        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1352        ::core::result::Result::Ok(())
1353    }
1354    fn merge_text(
1355        &mut self,
1356        dec: &mut ::buffa::text::TextDecoder<'_>,
1357    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1358        #[allow(unused_imports)]
1359        use ::buffa::Enumeration as _;
1360        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1361            match __name {
1362                "value" => self.value = dec.read_u32()?,
1363                _ => dec.skip_value()?,
1364            }
1365        }
1366        ::core::result::Result::Ok(())
1367    }
1368}
1369#[doc(hidden)]
1370pub const __U_INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1371    type_url: "type.googleapis.com/google.protobuf.UInt32Value",
1372    text_encode: ::buffa::type_registry::any_encode_text::<UInt32Value>,
1373    text_merge: ::buffa::type_registry::any_merge_text::<UInt32Value>,
1374};
1375/// Wrapper message for `uint32`.
1376///
1377/// The JSON representation for `UInt32Value` is JSON number.
1378#[derive(Clone, Debug, Default)]
1379pub struct UInt32ValueView<'a> {
1380    /// The uint32 value.
1381    ///
1382    /// Field 1: `value`
1383    pub value: u32,
1384    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1385}
1386impl<'a> UInt32ValueView<'a> {
1387    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
1388    ///
1389    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
1390    /// and by generated sub-message decode arms with `depth - 1`.
1391    ///
1392    /// **Not part of the public API.** Named with a leading underscore to
1393    /// signal that it is for generated-code use only.
1394    #[doc(hidden)]
1395    pub fn _decode_depth(
1396        buf: &'a [u8],
1397        depth: u32,
1398    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1399        let mut view = Self::default();
1400        view._merge_into_view(buf, depth)?;
1401        ::core::result::Result::Ok(view)
1402    }
1403    /// Merge fields from `buf` into this view (proto merge semantics).
1404    ///
1405    /// Repeated fields append; singular fields last-wins; singular
1406    /// MESSAGE fields merge recursively. Used by sub-message decode
1407    /// arms when the same field appears multiple times on the wire.
1408    ///
1409    /// **Not part of the public API.**
1410    #[doc(hidden)]
1411    pub fn _merge_into_view(
1412        &mut self,
1413        buf: &'a [u8],
1414        depth: u32,
1415    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1416        let _ = depth;
1417        #[allow(unused_variables)]
1418        let view = self;
1419        let mut cur: &'a [u8] = buf;
1420        while !cur.is_empty() {
1421            let before_tag = cur;
1422            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
1423            match tag.field_number() {
1424                1u32 => {
1425                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1426                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1427                            field_number: 1u32,
1428                            expected: 0u8,
1429                            actual: tag.wire_type() as u8,
1430                        });
1431                    }
1432                    view.value = ::buffa::types::decode_uint32(&mut cur)?;
1433                }
1434                _ => {
1435                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
1436                    let span_len = before_tag.len() - cur.len();
1437                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
1438                }
1439            }
1440        }
1441        ::core::result::Result::Ok(())
1442    }
1443}
1444impl<'a> ::buffa::MessageView<'a> for UInt32ValueView<'a> {
1445    type Owned = UInt32Value;
1446    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1447        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
1448    }
1449    fn decode_view_with_limit(
1450        buf: &'a [u8],
1451        depth: u32,
1452    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1453        Self::_decode_depth(buf, depth)
1454    }
1455    /// Convert this view to the owned message type.
1456    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
1457    fn to_owned_message(&self) -> UInt32Value {
1458        #[allow(unused_imports)]
1459        use ::buffa::alloc::string::ToString as _;
1460        UInt32Value {
1461            value: self.value,
1462            __buffa_unknown_fields: self
1463                .__buffa_unknown_fields
1464                .to_owned()
1465                .unwrap_or_default()
1466                .into(),
1467            ..::core::default::Default::default()
1468        }
1469    }
1470}
1471unsafe impl ::buffa::DefaultViewInstance for UInt32ValueView<'static> {
1472    fn default_view_instance() -> &'static Self {
1473        static VALUE: ::buffa::__private::OnceBox<UInt32ValueView<'static>> = ::buffa::__private::OnceBox::new();
1474        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1475    }
1476}
1477unsafe impl<'a> ::buffa::HasDefaultViewInstance for UInt32ValueView<'a> {
1478    type Static = UInt32ValueView<'static>;
1479}
1480/// Wrapper message for `bool`.
1481///
1482/// The JSON representation for `BoolValue` is JSON `true` and `false`.
1483#[derive(Clone, PartialEq, Default)]
1484#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1485pub struct BoolValue {
1486    /// The bool value.
1487    ///
1488    /// Field 1: `value`
1489    pub value: bool,
1490    #[doc(hidden)]
1491    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1492    #[doc(hidden)]
1493    pub __buffa_cached_size: ::buffa::__private::CachedSize,
1494}
1495impl ::core::fmt::Debug for BoolValue {
1496    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1497        f.debug_struct("BoolValue").field("value", &self.value).finish()
1498    }
1499}
1500impl BoolValue {
1501    /// Protobuf type URL for this message, for use with `Any::pack` and
1502    /// `Any::unpack_if`.
1503    ///
1504    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1505    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BoolValue";
1506}
1507unsafe impl ::buffa::DefaultInstance for BoolValue {
1508    fn default_instance() -> &'static Self {
1509        static VALUE: ::buffa::__private::OnceBox<BoolValue> = ::buffa::__private::OnceBox::new();
1510        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1511    }
1512}
1513impl ::buffa::Message for BoolValue {
1514    /// Returns the total encoded size in bytes.
1515    ///
1516    /// The result is a `u32`; the protobuf specification requires all
1517    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1518    /// compliant message will never overflow this type.
1519    fn compute_size(&self) -> u32 {
1520        #[allow(unused_imports)]
1521        use ::buffa::Enumeration as _;
1522        let mut size = 0u32;
1523        if self.value {
1524            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1525        }
1526        size += self.__buffa_unknown_fields.encoded_len() as u32;
1527        self.__buffa_cached_size.set(size);
1528        size
1529    }
1530    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
1531        #[allow(unused_imports)]
1532        use ::buffa::Enumeration as _;
1533        if self.value {
1534            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1535                .encode(buf);
1536            ::buffa::types::encode_bool(self.value, buf);
1537        }
1538        self.__buffa_unknown_fields.write_to(buf);
1539    }
1540    fn merge_field(
1541        &mut self,
1542        tag: ::buffa::encoding::Tag,
1543        buf: &mut impl ::buffa::bytes::Buf,
1544        depth: u32,
1545    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1546        #[allow(unused_imports)]
1547        use ::buffa::bytes::Buf as _;
1548        #[allow(unused_imports)]
1549        use ::buffa::Enumeration as _;
1550        match tag.field_number() {
1551            1u32 => {
1552                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1553                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1554                        field_number: 1u32,
1555                        expected: 0u8,
1556                        actual: tag.wire_type() as u8,
1557                    });
1558                }
1559                self.value = ::buffa::types::decode_bool(buf)?;
1560            }
1561            _ => {
1562                self.__buffa_unknown_fields
1563                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1564            }
1565        }
1566        ::core::result::Result::Ok(())
1567    }
1568    fn cached_size(&self) -> u32 {
1569        self.__buffa_cached_size.get()
1570    }
1571    fn clear(&mut self) {
1572        self.value = false;
1573        self.__buffa_unknown_fields.clear();
1574        self.__buffa_cached_size.set(0);
1575    }
1576}
1577impl ::buffa::ExtensionSet for BoolValue {
1578    const PROTO_FQN: &'static str = "google.protobuf.BoolValue";
1579    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1580        &self.__buffa_unknown_fields
1581    }
1582    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1583        &mut self.__buffa_unknown_fields
1584    }
1585}
1586impl ::buffa::text::TextFormat for BoolValue {
1587    fn encode_text(
1588        &self,
1589        enc: &mut ::buffa::text::TextEncoder<'_>,
1590    ) -> ::core::fmt::Result {
1591        #[allow(unused_imports)]
1592        use ::buffa::Enumeration as _;
1593        if self.value {
1594            enc.write_field_name("value")?;
1595            enc.write_bool(self.value)?;
1596        }
1597        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1598        ::core::result::Result::Ok(())
1599    }
1600    fn merge_text(
1601        &mut self,
1602        dec: &mut ::buffa::text::TextDecoder<'_>,
1603    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1604        #[allow(unused_imports)]
1605        use ::buffa::Enumeration as _;
1606        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1607            match __name {
1608                "value" => self.value = dec.read_bool()?,
1609                _ => dec.skip_value()?,
1610            }
1611        }
1612        ::core::result::Result::Ok(())
1613    }
1614}
1615#[doc(hidden)]
1616pub const __BOOL_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1617    type_url: "type.googleapis.com/google.protobuf.BoolValue",
1618    text_encode: ::buffa::type_registry::any_encode_text::<BoolValue>,
1619    text_merge: ::buffa::type_registry::any_merge_text::<BoolValue>,
1620};
1621/// Wrapper message for `bool`.
1622///
1623/// The JSON representation for `BoolValue` is JSON `true` and `false`.
1624#[derive(Clone, Debug, Default)]
1625pub struct BoolValueView<'a> {
1626    /// The bool value.
1627    ///
1628    /// Field 1: `value`
1629    pub value: bool,
1630    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1631}
1632impl<'a> BoolValueView<'a> {
1633    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
1634    ///
1635    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
1636    /// and by generated sub-message decode arms with `depth - 1`.
1637    ///
1638    /// **Not part of the public API.** Named with a leading underscore to
1639    /// signal that it is for generated-code use only.
1640    #[doc(hidden)]
1641    pub fn _decode_depth(
1642        buf: &'a [u8],
1643        depth: u32,
1644    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1645        let mut view = Self::default();
1646        view._merge_into_view(buf, depth)?;
1647        ::core::result::Result::Ok(view)
1648    }
1649    /// Merge fields from `buf` into this view (proto merge semantics).
1650    ///
1651    /// Repeated fields append; singular fields last-wins; singular
1652    /// MESSAGE fields merge recursively. Used by sub-message decode
1653    /// arms when the same field appears multiple times on the wire.
1654    ///
1655    /// **Not part of the public API.**
1656    #[doc(hidden)]
1657    pub fn _merge_into_view(
1658        &mut self,
1659        buf: &'a [u8],
1660        depth: u32,
1661    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1662        let _ = depth;
1663        #[allow(unused_variables)]
1664        let view = self;
1665        let mut cur: &'a [u8] = buf;
1666        while !cur.is_empty() {
1667            let before_tag = cur;
1668            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
1669            match tag.field_number() {
1670                1u32 => {
1671                    if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1672                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1673                            field_number: 1u32,
1674                            expected: 0u8,
1675                            actual: tag.wire_type() as u8,
1676                        });
1677                    }
1678                    view.value = ::buffa::types::decode_bool(&mut cur)?;
1679                }
1680                _ => {
1681                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
1682                    let span_len = before_tag.len() - cur.len();
1683                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
1684                }
1685            }
1686        }
1687        ::core::result::Result::Ok(())
1688    }
1689}
1690impl<'a> ::buffa::MessageView<'a> for BoolValueView<'a> {
1691    type Owned = BoolValue;
1692    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1693        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
1694    }
1695    fn decode_view_with_limit(
1696        buf: &'a [u8],
1697        depth: u32,
1698    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1699        Self::_decode_depth(buf, depth)
1700    }
1701    /// Convert this view to the owned message type.
1702    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
1703    fn to_owned_message(&self) -> BoolValue {
1704        #[allow(unused_imports)]
1705        use ::buffa::alloc::string::ToString as _;
1706        BoolValue {
1707            value: self.value,
1708            __buffa_unknown_fields: self
1709                .__buffa_unknown_fields
1710                .to_owned()
1711                .unwrap_or_default()
1712                .into(),
1713            ..::core::default::Default::default()
1714        }
1715    }
1716}
1717unsafe impl ::buffa::DefaultViewInstance for BoolValueView<'static> {
1718    fn default_view_instance() -> &'static Self {
1719        static VALUE: ::buffa::__private::OnceBox<BoolValueView<'static>> = ::buffa::__private::OnceBox::new();
1720        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1721    }
1722}
1723unsafe impl<'a> ::buffa::HasDefaultViewInstance for BoolValueView<'a> {
1724    type Static = BoolValueView<'static>;
1725}
1726/// Wrapper message for `string`.
1727///
1728/// The JSON representation for `StringValue` is JSON string.
1729#[derive(Clone, PartialEq, Default)]
1730#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1731pub struct StringValue {
1732    /// The string value.
1733    ///
1734    /// Field 1: `value`
1735    pub value: ::buffa::alloc::string::String,
1736    #[doc(hidden)]
1737    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1738    #[doc(hidden)]
1739    pub __buffa_cached_size: ::buffa::__private::CachedSize,
1740}
1741impl ::core::fmt::Debug for StringValue {
1742    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1743        f.debug_struct("StringValue").field("value", &self.value).finish()
1744    }
1745}
1746impl StringValue {
1747    /// Protobuf type URL for this message, for use with `Any::pack` and
1748    /// `Any::unpack_if`.
1749    ///
1750    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1751    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.StringValue";
1752}
1753unsafe impl ::buffa::DefaultInstance for StringValue {
1754    fn default_instance() -> &'static Self {
1755        static VALUE: ::buffa::__private::OnceBox<StringValue> = ::buffa::__private::OnceBox::new();
1756        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1757    }
1758}
1759impl ::buffa::Message for StringValue {
1760    /// Returns the total encoded size in bytes.
1761    ///
1762    /// The result is a `u32`; the protobuf specification requires all
1763    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1764    /// compliant message will never overflow this type.
1765    fn compute_size(&self) -> u32 {
1766        #[allow(unused_imports)]
1767        use ::buffa::Enumeration as _;
1768        let mut size = 0u32;
1769        if !self.value.is_empty() {
1770            size += 1u32 + ::buffa::types::string_encoded_len(&self.value) as u32;
1771        }
1772        size += self.__buffa_unknown_fields.encoded_len() as u32;
1773        self.__buffa_cached_size.set(size);
1774        size
1775    }
1776    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
1777        #[allow(unused_imports)]
1778        use ::buffa::Enumeration as _;
1779        if !self.value.is_empty() {
1780            ::buffa::encoding::Tag::new(
1781                    1u32,
1782                    ::buffa::encoding::WireType::LengthDelimited,
1783                )
1784                .encode(buf);
1785            ::buffa::types::encode_string(&self.value, buf);
1786        }
1787        self.__buffa_unknown_fields.write_to(buf);
1788    }
1789    fn merge_field(
1790        &mut self,
1791        tag: ::buffa::encoding::Tag,
1792        buf: &mut impl ::buffa::bytes::Buf,
1793        depth: u32,
1794    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1795        #[allow(unused_imports)]
1796        use ::buffa::bytes::Buf as _;
1797        #[allow(unused_imports)]
1798        use ::buffa::Enumeration as _;
1799        match tag.field_number() {
1800            1u32 => {
1801                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1802                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1803                        field_number: 1u32,
1804                        expected: 2u8,
1805                        actual: tag.wire_type() as u8,
1806                    });
1807                }
1808                ::buffa::types::merge_string(&mut self.value, buf)?;
1809            }
1810            _ => {
1811                self.__buffa_unknown_fields
1812                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1813            }
1814        }
1815        ::core::result::Result::Ok(())
1816    }
1817    fn cached_size(&self) -> u32 {
1818        self.__buffa_cached_size.get()
1819    }
1820    fn clear(&mut self) {
1821        self.value.clear();
1822        self.__buffa_unknown_fields.clear();
1823        self.__buffa_cached_size.set(0);
1824    }
1825}
1826impl ::buffa::ExtensionSet for StringValue {
1827    const PROTO_FQN: &'static str = "google.protobuf.StringValue";
1828    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1829        &self.__buffa_unknown_fields
1830    }
1831    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1832        &mut self.__buffa_unknown_fields
1833    }
1834}
1835impl ::buffa::text::TextFormat for StringValue {
1836    fn encode_text(
1837        &self,
1838        enc: &mut ::buffa::text::TextEncoder<'_>,
1839    ) -> ::core::fmt::Result {
1840        #[allow(unused_imports)]
1841        use ::buffa::Enumeration as _;
1842        if !self.value.is_empty() {
1843            enc.write_field_name("value")?;
1844            enc.write_string(&self.value)?;
1845        }
1846        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1847        ::core::result::Result::Ok(())
1848    }
1849    fn merge_text(
1850        &mut self,
1851        dec: &mut ::buffa::text::TextDecoder<'_>,
1852    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1853        #[allow(unused_imports)]
1854        use ::buffa::Enumeration as _;
1855        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1856            match __name {
1857                "value" => self.value = dec.read_string()?.into_owned(),
1858                _ => dec.skip_value()?,
1859            }
1860        }
1861        ::core::result::Result::Ok(())
1862    }
1863}
1864#[doc(hidden)]
1865pub const __STRING_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1866    type_url: "type.googleapis.com/google.protobuf.StringValue",
1867    text_encode: ::buffa::type_registry::any_encode_text::<StringValue>,
1868    text_merge: ::buffa::type_registry::any_merge_text::<StringValue>,
1869};
1870/// Wrapper message for `string`.
1871///
1872/// The JSON representation for `StringValue` is JSON string.
1873#[derive(Clone, Debug, Default)]
1874pub struct StringValueView<'a> {
1875    /// The string value.
1876    ///
1877    /// Field 1: `value`
1878    pub value: &'a str,
1879    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1880}
1881impl<'a> StringValueView<'a> {
1882    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
1883    ///
1884    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
1885    /// and by generated sub-message decode arms with `depth - 1`.
1886    ///
1887    /// **Not part of the public API.** Named with a leading underscore to
1888    /// signal that it is for generated-code use only.
1889    #[doc(hidden)]
1890    pub fn _decode_depth(
1891        buf: &'a [u8],
1892        depth: u32,
1893    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1894        let mut view = Self::default();
1895        view._merge_into_view(buf, depth)?;
1896        ::core::result::Result::Ok(view)
1897    }
1898    /// Merge fields from `buf` into this view (proto merge semantics).
1899    ///
1900    /// Repeated fields append; singular fields last-wins; singular
1901    /// MESSAGE fields merge recursively. Used by sub-message decode
1902    /// arms when the same field appears multiple times on the wire.
1903    ///
1904    /// **Not part of the public API.**
1905    #[doc(hidden)]
1906    pub fn _merge_into_view(
1907        &mut self,
1908        buf: &'a [u8],
1909        depth: u32,
1910    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1911        let _ = depth;
1912        #[allow(unused_variables)]
1913        let view = self;
1914        let mut cur: &'a [u8] = buf;
1915        while !cur.is_empty() {
1916            let before_tag = cur;
1917            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
1918            match tag.field_number() {
1919                1u32 => {
1920                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1921                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1922                            field_number: 1u32,
1923                            expected: 2u8,
1924                            actual: tag.wire_type() as u8,
1925                        });
1926                    }
1927                    view.value = ::buffa::types::borrow_str(&mut cur)?;
1928                }
1929                _ => {
1930                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
1931                    let span_len = before_tag.len() - cur.len();
1932                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
1933                }
1934            }
1935        }
1936        ::core::result::Result::Ok(())
1937    }
1938}
1939impl<'a> ::buffa::MessageView<'a> for StringValueView<'a> {
1940    type Owned = StringValue;
1941    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1942        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
1943    }
1944    fn decode_view_with_limit(
1945        buf: &'a [u8],
1946        depth: u32,
1947    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1948        Self::_decode_depth(buf, depth)
1949    }
1950    /// Convert this view to the owned message type.
1951    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
1952    fn to_owned_message(&self) -> StringValue {
1953        #[allow(unused_imports)]
1954        use ::buffa::alloc::string::ToString as _;
1955        StringValue {
1956            value: self.value.to_string(),
1957            __buffa_unknown_fields: self
1958                .__buffa_unknown_fields
1959                .to_owned()
1960                .unwrap_or_default()
1961                .into(),
1962            ..::core::default::Default::default()
1963        }
1964    }
1965}
1966unsafe impl ::buffa::DefaultViewInstance for StringValueView<'static> {
1967    fn default_view_instance() -> &'static Self {
1968        static VALUE: ::buffa::__private::OnceBox<StringValueView<'static>> = ::buffa::__private::OnceBox::new();
1969        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1970    }
1971}
1972unsafe impl<'a> ::buffa::HasDefaultViewInstance for StringValueView<'a> {
1973    type Static = StringValueView<'static>;
1974}
1975/// Wrapper message for `bytes`.
1976///
1977/// The JSON representation for `BytesValue` is JSON string.
1978#[derive(Clone, PartialEq, Default)]
1979#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1980pub struct BytesValue {
1981    /// The bytes value.
1982    ///
1983    /// Field 1: `value`
1984    pub value: ::buffa::alloc::vec::Vec<u8>,
1985    #[doc(hidden)]
1986    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1987    #[doc(hidden)]
1988    pub __buffa_cached_size: ::buffa::__private::CachedSize,
1989}
1990impl ::core::fmt::Debug for BytesValue {
1991    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1992        f.debug_struct("BytesValue").field("value", &self.value).finish()
1993    }
1994}
1995impl BytesValue {
1996    /// Protobuf type URL for this message, for use with `Any::pack` and
1997    /// `Any::unpack_if`.
1998    ///
1999    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2000    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BytesValue";
2001}
2002unsafe impl ::buffa::DefaultInstance for BytesValue {
2003    fn default_instance() -> &'static Self {
2004        static VALUE: ::buffa::__private::OnceBox<BytesValue> = ::buffa::__private::OnceBox::new();
2005        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2006    }
2007}
2008impl ::buffa::Message for BytesValue {
2009    /// Returns the total encoded size in bytes.
2010    ///
2011    /// The result is a `u32`; the protobuf specification requires all
2012    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2013    /// compliant message will never overflow this type.
2014    fn compute_size(&self) -> u32 {
2015        #[allow(unused_imports)]
2016        use ::buffa::Enumeration as _;
2017        let mut size = 0u32;
2018        if !self.value.is_empty() {
2019            size += 1u32 + ::buffa::types::bytes_encoded_len(&self.value) as u32;
2020        }
2021        size += self.__buffa_unknown_fields.encoded_len() as u32;
2022        self.__buffa_cached_size.set(size);
2023        size
2024    }
2025    fn write_to(&self, buf: &mut impl ::buffa::bytes::BufMut) {
2026        #[allow(unused_imports)]
2027        use ::buffa::Enumeration as _;
2028        if !self.value.is_empty() {
2029            ::buffa::encoding::Tag::new(
2030                    1u32,
2031                    ::buffa::encoding::WireType::LengthDelimited,
2032                )
2033                .encode(buf);
2034            ::buffa::types::encode_bytes(&self.value, buf);
2035        }
2036        self.__buffa_unknown_fields.write_to(buf);
2037    }
2038    fn merge_field(
2039        &mut self,
2040        tag: ::buffa::encoding::Tag,
2041        buf: &mut impl ::buffa::bytes::Buf,
2042        depth: u32,
2043    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2044        #[allow(unused_imports)]
2045        use ::buffa::bytes::Buf as _;
2046        #[allow(unused_imports)]
2047        use ::buffa::Enumeration as _;
2048        match tag.field_number() {
2049            1u32 => {
2050                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2051                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2052                        field_number: 1u32,
2053                        expected: 2u8,
2054                        actual: tag.wire_type() as u8,
2055                    });
2056                }
2057                ::buffa::types::merge_bytes(&mut self.value, buf)?;
2058            }
2059            _ => {
2060                self.__buffa_unknown_fields
2061                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2062            }
2063        }
2064        ::core::result::Result::Ok(())
2065    }
2066    fn cached_size(&self) -> u32 {
2067        self.__buffa_cached_size.get()
2068    }
2069    fn clear(&mut self) {
2070        self.value.clear();
2071        self.__buffa_unknown_fields.clear();
2072        self.__buffa_cached_size.set(0);
2073    }
2074}
2075impl ::buffa::ExtensionSet for BytesValue {
2076    const PROTO_FQN: &'static str = "google.protobuf.BytesValue";
2077    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2078        &self.__buffa_unknown_fields
2079    }
2080    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2081        &mut self.__buffa_unknown_fields
2082    }
2083}
2084impl ::buffa::text::TextFormat for BytesValue {
2085    fn encode_text(
2086        &self,
2087        enc: &mut ::buffa::text::TextEncoder<'_>,
2088    ) -> ::core::fmt::Result {
2089        #[allow(unused_imports)]
2090        use ::buffa::Enumeration as _;
2091        if !self.value.is_empty() {
2092            enc.write_field_name("value")?;
2093            enc.write_bytes(&self.value)?;
2094        }
2095        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
2096        ::core::result::Result::Ok(())
2097    }
2098    fn merge_text(
2099        &mut self,
2100        dec: &mut ::buffa::text::TextDecoder<'_>,
2101    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
2102        #[allow(unused_imports)]
2103        use ::buffa::Enumeration as _;
2104        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
2105            match __name {
2106                "value" => self.value = dec.read_bytes()?,
2107                _ => dec.skip_value()?,
2108            }
2109        }
2110        ::core::result::Result::Ok(())
2111    }
2112}
2113#[doc(hidden)]
2114pub const __BYTES_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
2115    type_url: "type.googleapis.com/google.protobuf.BytesValue",
2116    text_encode: ::buffa::type_registry::any_encode_text::<BytesValue>,
2117    text_merge: ::buffa::type_registry::any_merge_text::<BytesValue>,
2118};
2119/// Wrapper message for `bytes`.
2120///
2121/// The JSON representation for `BytesValue` is JSON string.
2122#[derive(Clone, Debug, Default)]
2123pub struct BytesValueView<'a> {
2124    /// The bytes value.
2125    ///
2126    /// Field 1: `value`
2127    pub value: &'a [u8],
2128    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2129}
2130impl<'a> BytesValueView<'a> {
2131    /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
2132    ///
2133    /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
2134    /// and by generated sub-message decode arms with `depth - 1`.
2135    ///
2136    /// **Not part of the public API.** Named with a leading underscore to
2137    /// signal that it is for generated-code use only.
2138    #[doc(hidden)]
2139    pub fn _decode_depth(
2140        buf: &'a [u8],
2141        depth: u32,
2142    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2143        let mut view = Self::default();
2144        view._merge_into_view(buf, depth)?;
2145        ::core::result::Result::Ok(view)
2146    }
2147    /// Merge fields from `buf` into this view (proto merge semantics).
2148    ///
2149    /// Repeated fields append; singular fields last-wins; singular
2150    /// MESSAGE fields merge recursively. Used by sub-message decode
2151    /// arms when the same field appears multiple times on the wire.
2152    ///
2153    /// **Not part of the public API.**
2154    #[doc(hidden)]
2155    pub fn _merge_into_view(
2156        &mut self,
2157        buf: &'a [u8],
2158        depth: u32,
2159    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2160        let _ = depth;
2161        #[allow(unused_variables)]
2162        let view = self;
2163        let mut cur: &'a [u8] = buf;
2164        while !cur.is_empty() {
2165            let before_tag = cur;
2166            let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
2167            match tag.field_number() {
2168                1u32 => {
2169                    if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2170                        return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2171                            field_number: 1u32,
2172                            expected: 2u8,
2173                            actual: tag.wire_type() as u8,
2174                        });
2175                    }
2176                    view.value = ::buffa::types::borrow_bytes(&mut cur)?;
2177                }
2178                _ => {
2179                    ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
2180                    let span_len = before_tag.len() - cur.len();
2181                    view.__buffa_unknown_fields.push_raw(&before_tag[..span_len]);
2182                }
2183            }
2184        }
2185        ::core::result::Result::Ok(())
2186    }
2187}
2188impl<'a> ::buffa::MessageView<'a> for BytesValueView<'a> {
2189    type Owned = BytesValue;
2190    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2191        Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
2192    }
2193    fn decode_view_with_limit(
2194        buf: &'a [u8],
2195        depth: u32,
2196    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2197        Self::_decode_depth(buf, depth)
2198    }
2199    /// Convert this view to the owned message type.
2200    #[allow(clippy::redundant_closure, clippy::useless_conversion)]
2201    fn to_owned_message(&self) -> BytesValue {
2202        #[allow(unused_imports)]
2203        use ::buffa::alloc::string::ToString as _;
2204        BytesValue {
2205            value: (self.value).to_vec(),
2206            __buffa_unknown_fields: self
2207                .__buffa_unknown_fields
2208                .to_owned()
2209                .unwrap_or_default()
2210                .into(),
2211            ..::core::default::Default::default()
2212        }
2213    }
2214}
2215unsafe impl ::buffa::DefaultViewInstance for BytesValueView<'static> {
2216    fn default_view_instance() -> &'static Self {
2217        static VALUE: ::buffa::__private::OnceBox<BytesValueView<'static>> = ::buffa::__private::OnceBox::new();
2218        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2219    }
2220}
2221unsafe impl<'a> ::buffa::HasDefaultViewInstance for BytesValueView<'a> {
2222    type Static = BytesValueView<'static>;
2223}