Skip to main content

buffa_types/generated/
google.protobuf.wrappers.rs

1// @generated by buffa-codegen. 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}
17impl ::core::fmt::Debug for DoubleValue {
18    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
19        f.debug_struct("DoubleValue").field("value", &self.value).finish()
20    }
21}
22impl DoubleValue {
23    /// Protobuf type URL for this message, for use with `Any::pack` and
24    /// `Any::unpack_if`.
25    ///
26    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
27    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DoubleValue";
28}
29impl ::buffa::DefaultInstance for DoubleValue {
30    fn default_instance() -> &'static Self {
31        static VALUE: ::buffa::__private::OnceBox<DoubleValue> = ::buffa::__private::OnceBox::new();
32        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
33    }
34}
35impl ::buffa::MessageName for DoubleValue {
36    const PACKAGE: &'static str = "google.protobuf";
37    const NAME: &'static str = "DoubleValue";
38    const FULL_NAME: &'static str = "google.protobuf.DoubleValue";
39    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DoubleValue";
40}
41impl ::buffa::Message for DoubleValue {
42    /// Returns the total encoded size in bytes.
43    ///
44    /// The result is a `u32`; the protobuf specification requires all
45    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
46    /// compliant message will never overflow this type.
47    #[allow(clippy::let_and_return)]
48    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
49        #[allow(unused_imports)]
50        use ::buffa::Enumeration as _;
51        let mut size = 0u32;
52        if self.value.to_bits() != 0u64 {
53            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
54        }
55        size += self.__buffa_unknown_fields.encoded_len() as u32;
56        size
57    }
58    fn write_to(
59        &self,
60        _cache: &mut ::buffa::SizeCache,
61        buf: &mut impl ::buffa::bytes::BufMut,
62    ) {
63        #[allow(unused_imports)]
64        use ::buffa::Enumeration as _;
65        if self.value.to_bits() != 0u64 {
66            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Fixed64)
67                .encode(buf);
68            ::buffa::types::encode_double(self.value, buf);
69        }
70        self.__buffa_unknown_fields.write_to(buf);
71    }
72    fn merge_field(
73        &mut self,
74        tag: ::buffa::encoding::Tag,
75        buf: &mut impl ::buffa::bytes::Buf,
76        depth: u32,
77    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
78        #[allow(unused_imports)]
79        use ::buffa::bytes::Buf as _;
80        #[allow(unused_imports)]
81        use ::buffa::Enumeration as _;
82        match tag.field_number() {
83            1u32 => {
84                if tag.wire_type() != ::buffa::encoding::WireType::Fixed64 {
85                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
86                        field_number: 1u32,
87                        expected: 1u8,
88                        actual: tag.wire_type() as u8,
89                    });
90                }
91                self.value = ::buffa::types::decode_double(buf)?;
92            }
93            _ => {
94                self.__buffa_unknown_fields
95                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
96            }
97        }
98        ::core::result::Result::Ok(())
99    }
100    fn clear(&mut self) {
101        self.value = 0f64;
102        self.__buffa_unknown_fields.clear();
103    }
104}
105impl ::buffa::ExtensionSet for DoubleValue {
106    const PROTO_FQN: &'static str = "google.protobuf.DoubleValue";
107    fn unknown_fields(&self) -> &::buffa::UnknownFields {
108        &self.__buffa_unknown_fields
109    }
110    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
111        &mut self.__buffa_unknown_fields
112    }
113}
114impl ::buffa::text::TextFormat for DoubleValue {
115    fn encode_text(
116        &self,
117        enc: &mut ::buffa::text::TextEncoder<'_>,
118    ) -> ::core::fmt::Result {
119        #[allow(unused_imports)]
120        use ::buffa::Enumeration as _;
121        if self.value.to_bits() != 0u64 {
122            enc.write_field_name("value")?;
123            enc.write_f64(self.value)?;
124        }
125        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
126        ::core::result::Result::Ok(())
127    }
128    fn merge_text(
129        &mut self,
130        dec: &mut ::buffa::text::TextDecoder<'_>,
131    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
132        #[allow(unused_imports)]
133        use ::buffa::Enumeration as _;
134        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
135            match __name {
136                "value" => self.value = dec.read_f64()?,
137                _ => dec.skip_value()?,
138            }
139        }
140        ::core::result::Result::Ok(())
141    }
142}
143#[doc(hidden)]
144pub const __DOUBLE_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
145    type_url: "type.googleapis.com/google.protobuf.DoubleValue",
146    text_encode: ::buffa::type_registry::any_encode_text::<DoubleValue>,
147    text_merge: ::buffa::type_registry::any_merge_text::<DoubleValue>,
148};
149/// Wrapper message for `float`.
150///
151/// The JSON representation for `FloatValue` is JSON number.
152#[derive(Clone, PartialEq, Default)]
153#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
154pub struct FloatValue {
155    /// The float value.
156    ///
157    /// Field 1: `value`
158    pub value: f32,
159    #[doc(hidden)]
160    pub __buffa_unknown_fields: ::buffa::UnknownFields,
161}
162impl ::core::fmt::Debug for FloatValue {
163    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
164        f.debug_struct("FloatValue").field("value", &self.value).finish()
165    }
166}
167impl FloatValue {
168    /// Protobuf type URL for this message, for use with `Any::pack` and
169    /// `Any::unpack_if`.
170    ///
171    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
172    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FloatValue";
173}
174impl ::buffa::DefaultInstance for FloatValue {
175    fn default_instance() -> &'static Self {
176        static VALUE: ::buffa::__private::OnceBox<FloatValue> = ::buffa::__private::OnceBox::new();
177        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
178    }
179}
180impl ::buffa::MessageName for FloatValue {
181    const PACKAGE: &'static str = "google.protobuf";
182    const NAME: &'static str = "FloatValue";
183    const FULL_NAME: &'static str = "google.protobuf.FloatValue";
184    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FloatValue";
185}
186impl ::buffa::Message for FloatValue {
187    /// Returns the total encoded size in bytes.
188    ///
189    /// The result is a `u32`; the protobuf specification requires all
190    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
191    /// compliant message will never overflow this type.
192    #[allow(clippy::let_and_return)]
193    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
194        #[allow(unused_imports)]
195        use ::buffa::Enumeration as _;
196        let mut size = 0u32;
197        if self.value.to_bits() != 0u32 {
198            size += 1u32 + ::buffa::types::FIXED32_ENCODED_LEN as u32;
199        }
200        size += self.__buffa_unknown_fields.encoded_len() as u32;
201        size
202    }
203    fn write_to(
204        &self,
205        _cache: &mut ::buffa::SizeCache,
206        buf: &mut impl ::buffa::bytes::BufMut,
207    ) {
208        #[allow(unused_imports)]
209        use ::buffa::Enumeration as _;
210        if self.value.to_bits() != 0u32 {
211            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Fixed32)
212                .encode(buf);
213            ::buffa::types::encode_float(self.value, buf);
214        }
215        self.__buffa_unknown_fields.write_to(buf);
216    }
217    fn merge_field(
218        &mut self,
219        tag: ::buffa::encoding::Tag,
220        buf: &mut impl ::buffa::bytes::Buf,
221        depth: u32,
222    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
223        #[allow(unused_imports)]
224        use ::buffa::bytes::Buf as _;
225        #[allow(unused_imports)]
226        use ::buffa::Enumeration as _;
227        match tag.field_number() {
228            1u32 => {
229                if tag.wire_type() != ::buffa::encoding::WireType::Fixed32 {
230                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
231                        field_number: 1u32,
232                        expected: 5u8,
233                        actual: tag.wire_type() as u8,
234                    });
235                }
236                self.value = ::buffa::types::decode_float(buf)?;
237            }
238            _ => {
239                self.__buffa_unknown_fields
240                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
241            }
242        }
243        ::core::result::Result::Ok(())
244    }
245    fn clear(&mut self) {
246        self.value = 0f32;
247        self.__buffa_unknown_fields.clear();
248    }
249}
250impl ::buffa::ExtensionSet for FloatValue {
251    const PROTO_FQN: &'static str = "google.protobuf.FloatValue";
252    fn unknown_fields(&self) -> &::buffa::UnknownFields {
253        &self.__buffa_unknown_fields
254    }
255    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
256        &mut self.__buffa_unknown_fields
257    }
258}
259impl ::buffa::text::TextFormat for FloatValue {
260    fn encode_text(
261        &self,
262        enc: &mut ::buffa::text::TextEncoder<'_>,
263    ) -> ::core::fmt::Result {
264        #[allow(unused_imports)]
265        use ::buffa::Enumeration as _;
266        if self.value.to_bits() != 0u32 {
267            enc.write_field_name("value")?;
268            enc.write_f32(self.value)?;
269        }
270        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
271        ::core::result::Result::Ok(())
272    }
273    fn merge_text(
274        &mut self,
275        dec: &mut ::buffa::text::TextDecoder<'_>,
276    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
277        #[allow(unused_imports)]
278        use ::buffa::Enumeration as _;
279        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
280            match __name {
281                "value" => self.value = dec.read_f32()?,
282                _ => dec.skip_value()?,
283            }
284        }
285        ::core::result::Result::Ok(())
286    }
287}
288#[doc(hidden)]
289pub const __FLOAT_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
290    type_url: "type.googleapis.com/google.protobuf.FloatValue",
291    text_encode: ::buffa::type_registry::any_encode_text::<FloatValue>,
292    text_merge: ::buffa::type_registry::any_merge_text::<FloatValue>,
293};
294/// Wrapper message for `int64`.
295///
296/// The JSON representation for `Int64Value` is JSON string.
297#[derive(Clone, PartialEq, Default)]
298#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
299pub struct Int64Value {
300    /// The int64 value.
301    ///
302    /// Field 1: `value`
303    pub value: i64,
304    #[doc(hidden)]
305    pub __buffa_unknown_fields: ::buffa::UnknownFields,
306}
307impl ::core::fmt::Debug for Int64Value {
308    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
309        f.debug_struct("Int64Value").field("value", &self.value).finish()
310    }
311}
312impl Int64Value {
313    /// Protobuf type URL for this message, for use with `Any::pack` and
314    /// `Any::unpack_if`.
315    ///
316    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
317    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int64Value";
318}
319impl ::buffa::DefaultInstance for Int64Value {
320    fn default_instance() -> &'static Self {
321        static VALUE: ::buffa::__private::OnceBox<Int64Value> = ::buffa::__private::OnceBox::new();
322        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
323    }
324}
325impl ::buffa::MessageName for Int64Value {
326    const PACKAGE: &'static str = "google.protobuf";
327    const NAME: &'static str = "Int64Value";
328    const FULL_NAME: &'static str = "google.protobuf.Int64Value";
329    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int64Value";
330}
331impl ::buffa::Message for Int64Value {
332    /// Returns the total encoded size in bytes.
333    ///
334    /// The result is a `u32`; the protobuf specification requires all
335    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
336    /// compliant message will never overflow this type.
337    #[allow(clippy::let_and_return)]
338    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
339        #[allow(unused_imports)]
340        use ::buffa::Enumeration as _;
341        let mut size = 0u32;
342        if self.value != 0i64 {
343            size += 1u32 + ::buffa::types::int64_encoded_len(self.value) as u32;
344        }
345        size += self.__buffa_unknown_fields.encoded_len() as u32;
346        size
347    }
348    fn write_to(
349        &self,
350        _cache: &mut ::buffa::SizeCache,
351        buf: &mut impl ::buffa::bytes::BufMut,
352    ) {
353        #[allow(unused_imports)]
354        use ::buffa::Enumeration as _;
355        if self.value != 0i64 {
356            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
357                .encode(buf);
358            ::buffa::types::encode_int64(self.value, buf);
359        }
360        self.__buffa_unknown_fields.write_to(buf);
361    }
362    fn merge_field(
363        &mut self,
364        tag: ::buffa::encoding::Tag,
365        buf: &mut impl ::buffa::bytes::Buf,
366        depth: u32,
367    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
368        #[allow(unused_imports)]
369        use ::buffa::bytes::Buf as _;
370        #[allow(unused_imports)]
371        use ::buffa::Enumeration as _;
372        match tag.field_number() {
373            1u32 => {
374                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
375                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
376                        field_number: 1u32,
377                        expected: 0u8,
378                        actual: tag.wire_type() as u8,
379                    });
380                }
381                self.value = ::buffa::types::decode_int64(buf)?;
382            }
383            _ => {
384                self.__buffa_unknown_fields
385                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
386            }
387        }
388        ::core::result::Result::Ok(())
389    }
390    fn clear(&mut self) {
391        self.value = 0i64;
392        self.__buffa_unknown_fields.clear();
393    }
394}
395impl ::buffa::ExtensionSet for Int64Value {
396    const PROTO_FQN: &'static str = "google.protobuf.Int64Value";
397    fn unknown_fields(&self) -> &::buffa::UnknownFields {
398        &self.__buffa_unknown_fields
399    }
400    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
401        &mut self.__buffa_unknown_fields
402    }
403}
404impl ::buffa::text::TextFormat for Int64Value {
405    fn encode_text(
406        &self,
407        enc: &mut ::buffa::text::TextEncoder<'_>,
408    ) -> ::core::fmt::Result {
409        #[allow(unused_imports)]
410        use ::buffa::Enumeration as _;
411        if self.value != 0i64 {
412            enc.write_field_name("value")?;
413            enc.write_i64(self.value)?;
414        }
415        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
416        ::core::result::Result::Ok(())
417    }
418    fn merge_text(
419        &mut self,
420        dec: &mut ::buffa::text::TextDecoder<'_>,
421    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
422        #[allow(unused_imports)]
423        use ::buffa::Enumeration as _;
424        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
425            match __name {
426                "value" => self.value = dec.read_i64()?,
427                _ => dec.skip_value()?,
428            }
429        }
430        ::core::result::Result::Ok(())
431    }
432}
433#[doc(hidden)]
434pub const __INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
435    type_url: "type.googleapis.com/google.protobuf.Int64Value",
436    text_encode: ::buffa::type_registry::any_encode_text::<Int64Value>,
437    text_merge: ::buffa::type_registry::any_merge_text::<Int64Value>,
438};
439/// Wrapper message for `uint64`.
440///
441/// The JSON representation for `UInt64Value` is JSON string.
442#[derive(Clone, PartialEq, Default)]
443#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
444pub struct UInt64Value {
445    /// The uint64 value.
446    ///
447    /// Field 1: `value`
448    pub value: u64,
449    #[doc(hidden)]
450    pub __buffa_unknown_fields: ::buffa::UnknownFields,
451}
452impl ::core::fmt::Debug for UInt64Value {
453    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
454        f.debug_struct("UInt64Value").field("value", &self.value).finish()
455    }
456}
457impl UInt64Value {
458    /// Protobuf type URL for this message, for use with `Any::pack` and
459    /// `Any::unpack_if`.
460    ///
461    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
462    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt64Value";
463}
464impl ::buffa::DefaultInstance for UInt64Value {
465    fn default_instance() -> &'static Self {
466        static VALUE: ::buffa::__private::OnceBox<UInt64Value> = ::buffa::__private::OnceBox::new();
467        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
468    }
469}
470impl ::buffa::MessageName for UInt64Value {
471    const PACKAGE: &'static str = "google.protobuf";
472    const NAME: &'static str = "UInt64Value";
473    const FULL_NAME: &'static str = "google.protobuf.UInt64Value";
474    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt64Value";
475}
476impl ::buffa::Message for UInt64Value {
477    /// Returns the total encoded size in bytes.
478    ///
479    /// The result is a `u32`; the protobuf specification requires all
480    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
481    /// compliant message will never overflow this type.
482    #[allow(clippy::let_and_return)]
483    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
484        #[allow(unused_imports)]
485        use ::buffa::Enumeration as _;
486        let mut size = 0u32;
487        if self.value != 0u64 {
488            size += 1u32 + ::buffa::types::uint64_encoded_len(self.value) as u32;
489        }
490        size += self.__buffa_unknown_fields.encoded_len() as u32;
491        size
492    }
493    fn write_to(
494        &self,
495        _cache: &mut ::buffa::SizeCache,
496        buf: &mut impl ::buffa::bytes::BufMut,
497    ) {
498        #[allow(unused_imports)]
499        use ::buffa::Enumeration as _;
500        if self.value != 0u64 {
501            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
502                .encode(buf);
503            ::buffa::types::encode_uint64(self.value, buf);
504        }
505        self.__buffa_unknown_fields.write_to(buf);
506    }
507    fn merge_field(
508        &mut self,
509        tag: ::buffa::encoding::Tag,
510        buf: &mut impl ::buffa::bytes::Buf,
511        depth: u32,
512    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
513        #[allow(unused_imports)]
514        use ::buffa::bytes::Buf as _;
515        #[allow(unused_imports)]
516        use ::buffa::Enumeration as _;
517        match tag.field_number() {
518            1u32 => {
519                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
520                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
521                        field_number: 1u32,
522                        expected: 0u8,
523                        actual: tag.wire_type() as u8,
524                    });
525                }
526                self.value = ::buffa::types::decode_uint64(buf)?;
527            }
528            _ => {
529                self.__buffa_unknown_fields
530                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
531            }
532        }
533        ::core::result::Result::Ok(())
534    }
535    fn clear(&mut self) {
536        self.value = 0u64;
537        self.__buffa_unknown_fields.clear();
538    }
539}
540impl ::buffa::ExtensionSet for UInt64Value {
541    const PROTO_FQN: &'static str = "google.protobuf.UInt64Value";
542    fn unknown_fields(&self) -> &::buffa::UnknownFields {
543        &self.__buffa_unknown_fields
544    }
545    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
546        &mut self.__buffa_unknown_fields
547    }
548}
549impl ::buffa::text::TextFormat for UInt64Value {
550    fn encode_text(
551        &self,
552        enc: &mut ::buffa::text::TextEncoder<'_>,
553    ) -> ::core::fmt::Result {
554        #[allow(unused_imports)]
555        use ::buffa::Enumeration as _;
556        if self.value != 0u64 {
557            enc.write_field_name("value")?;
558            enc.write_u64(self.value)?;
559        }
560        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
561        ::core::result::Result::Ok(())
562    }
563    fn merge_text(
564        &mut self,
565        dec: &mut ::buffa::text::TextDecoder<'_>,
566    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
567        #[allow(unused_imports)]
568        use ::buffa::Enumeration as _;
569        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
570            match __name {
571                "value" => self.value = dec.read_u64()?,
572                _ => dec.skip_value()?,
573            }
574        }
575        ::core::result::Result::Ok(())
576    }
577}
578#[doc(hidden)]
579pub const __U_INT64VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
580    type_url: "type.googleapis.com/google.protobuf.UInt64Value",
581    text_encode: ::buffa::type_registry::any_encode_text::<UInt64Value>,
582    text_merge: ::buffa::type_registry::any_merge_text::<UInt64Value>,
583};
584/// Wrapper message for `int32`.
585///
586/// The JSON representation for `Int32Value` is JSON number.
587#[derive(Clone, PartialEq, Default)]
588#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
589pub struct Int32Value {
590    /// The int32 value.
591    ///
592    /// Field 1: `value`
593    pub value: i32,
594    #[doc(hidden)]
595    pub __buffa_unknown_fields: ::buffa::UnknownFields,
596}
597impl ::core::fmt::Debug for Int32Value {
598    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
599        f.debug_struct("Int32Value").field("value", &self.value).finish()
600    }
601}
602impl Int32Value {
603    /// Protobuf type URL for this message, for use with `Any::pack` and
604    /// `Any::unpack_if`.
605    ///
606    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
607    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int32Value";
608}
609impl ::buffa::DefaultInstance for Int32Value {
610    fn default_instance() -> &'static Self {
611        static VALUE: ::buffa::__private::OnceBox<Int32Value> = ::buffa::__private::OnceBox::new();
612        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
613    }
614}
615impl ::buffa::MessageName for Int32Value {
616    const PACKAGE: &'static str = "google.protobuf";
617    const NAME: &'static str = "Int32Value";
618    const FULL_NAME: &'static str = "google.protobuf.Int32Value";
619    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int32Value";
620}
621impl ::buffa::Message for Int32Value {
622    /// Returns the total encoded size in bytes.
623    ///
624    /// The result is a `u32`; the protobuf specification requires all
625    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
626    /// compliant message will never overflow this type.
627    #[allow(clippy::let_and_return)]
628    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
629        #[allow(unused_imports)]
630        use ::buffa::Enumeration as _;
631        let mut size = 0u32;
632        if self.value != 0i32 {
633            size += 1u32 + ::buffa::types::int32_encoded_len(self.value) as u32;
634        }
635        size += self.__buffa_unknown_fields.encoded_len() as u32;
636        size
637    }
638    fn write_to(
639        &self,
640        _cache: &mut ::buffa::SizeCache,
641        buf: &mut impl ::buffa::bytes::BufMut,
642    ) {
643        #[allow(unused_imports)]
644        use ::buffa::Enumeration as _;
645        if self.value != 0i32 {
646            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
647                .encode(buf);
648            ::buffa::types::encode_int32(self.value, buf);
649        }
650        self.__buffa_unknown_fields.write_to(buf);
651    }
652    fn merge_field(
653        &mut self,
654        tag: ::buffa::encoding::Tag,
655        buf: &mut impl ::buffa::bytes::Buf,
656        depth: u32,
657    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
658        #[allow(unused_imports)]
659        use ::buffa::bytes::Buf as _;
660        #[allow(unused_imports)]
661        use ::buffa::Enumeration as _;
662        match tag.field_number() {
663            1u32 => {
664                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
665                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
666                        field_number: 1u32,
667                        expected: 0u8,
668                        actual: tag.wire_type() as u8,
669                    });
670                }
671                self.value = ::buffa::types::decode_int32(buf)?;
672            }
673            _ => {
674                self.__buffa_unknown_fields
675                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
676            }
677        }
678        ::core::result::Result::Ok(())
679    }
680    fn clear(&mut self) {
681        self.value = 0i32;
682        self.__buffa_unknown_fields.clear();
683    }
684}
685impl ::buffa::ExtensionSet for Int32Value {
686    const PROTO_FQN: &'static str = "google.protobuf.Int32Value";
687    fn unknown_fields(&self) -> &::buffa::UnknownFields {
688        &self.__buffa_unknown_fields
689    }
690    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
691        &mut self.__buffa_unknown_fields
692    }
693}
694impl ::buffa::text::TextFormat for Int32Value {
695    fn encode_text(
696        &self,
697        enc: &mut ::buffa::text::TextEncoder<'_>,
698    ) -> ::core::fmt::Result {
699        #[allow(unused_imports)]
700        use ::buffa::Enumeration as _;
701        if self.value != 0i32 {
702            enc.write_field_name("value")?;
703            enc.write_i32(self.value)?;
704        }
705        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
706        ::core::result::Result::Ok(())
707    }
708    fn merge_text(
709        &mut self,
710        dec: &mut ::buffa::text::TextDecoder<'_>,
711    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
712        #[allow(unused_imports)]
713        use ::buffa::Enumeration as _;
714        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
715            match __name {
716                "value" => self.value = dec.read_i32()?,
717                _ => dec.skip_value()?,
718            }
719        }
720        ::core::result::Result::Ok(())
721    }
722}
723#[doc(hidden)]
724pub const __INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
725    type_url: "type.googleapis.com/google.protobuf.Int32Value",
726    text_encode: ::buffa::type_registry::any_encode_text::<Int32Value>,
727    text_merge: ::buffa::type_registry::any_merge_text::<Int32Value>,
728};
729/// Wrapper message for `uint32`.
730///
731/// The JSON representation for `UInt32Value` is JSON number.
732#[derive(Clone, PartialEq, Default)]
733#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
734pub struct UInt32Value {
735    /// The uint32 value.
736    ///
737    /// Field 1: `value`
738    pub value: u32,
739    #[doc(hidden)]
740    pub __buffa_unknown_fields: ::buffa::UnknownFields,
741}
742impl ::core::fmt::Debug for UInt32Value {
743    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
744        f.debug_struct("UInt32Value").field("value", &self.value).finish()
745    }
746}
747impl UInt32Value {
748    /// Protobuf type URL for this message, for use with `Any::pack` and
749    /// `Any::unpack_if`.
750    ///
751    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
752    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt32Value";
753}
754impl ::buffa::DefaultInstance for UInt32Value {
755    fn default_instance() -> &'static Self {
756        static VALUE: ::buffa::__private::OnceBox<UInt32Value> = ::buffa::__private::OnceBox::new();
757        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
758    }
759}
760impl ::buffa::MessageName for UInt32Value {
761    const PACKAGE: &'static str = "google.protobuf";
762    const NAME: &'static str = "UInt32Value";
763    const FULL_NAME: &'static str = "google.protobuf.UInt32Value";
764    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt32Value";
765}
766impl ::buffa::Message for UInt32Value {
767    /// Returns the total encoded size in bytes.
768    ///
769    /// The result is a `u32`; the protobuf specification requires all
770    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
771    /// compliant message will never overflow this type.
772    #[allow(clippy::let_and_return)]
773    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
774        #[allow(unused_imports)]
775        use ::buffa::Enumeration as _;
776        let mut size = 0u32;
777        if self.value != 0u32 {
778            size += 1u32 + ::buffa::types::uint32_encoded_len(self.value) as u32;
779        }
780        size += self.__buffa_unknown_fields.encoded_len() as u32;
781        size
782    }
783    fn write_to(
784        &self,
785        _cache: &mut ::buffa::SizeCache,
786        buf: &mut impl ::buffa::bytes::BufMut,
787    ) {
788        #[allow(unused_imports)]
789        use ::buffa::Enumeration as _;
790        if self.value != 0u32 {
791            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
792                .encode(buf);
793            ::buffa::types::encode_uint32(self.value, buf);
794        }
795        self.__buffa_unknown_fields.write_to(buf);
796    }
797    fn merge_field(
798        &mut self,
799        tag: ::buffa::encoding::Tag,
800        buf: &mut impl ::buffa::bytes::Buf,
801        depth: u32,
802    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
803        #[allow(unused_imports)]
804        use ::buffa::bytes::Buf as _;
805        #[allow(unused_imports)]
806        use ::buffa::Enumeration as _;
807        match tag.field_number() {
808            1u32 => {
809                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
810                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
811                        field_number: 1u32,
812                        expected: 0u8,
813                        actual: tag.wire_type() as u8,
814                    });
815                }
816                self.value = ::buffa::types::decode_uint32(buf)?;
817            }
818            _ => {
819                self.__buffa_unknown_fields
820                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
821            }
822        }
823        ::core::result::Result::Ok(())
824    }
825    fn clear(&mut self) {
826        self.value = 0u32;
827        self.__buffa_unknown_fields.clear();
828    }
829}
830impl ::buffa::ExtensionSet for UInt32Value {
831    const PROTO_FQN: &'static str = "google.protobuf.UInt32Value";
832    fn unknown_fields(&self) -> &::buffa::UnknownFields {
833        &self.__buffa_unknown_fields
834    }
835    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
836        &mut self.__buffa_unknown_fields
837    }
838}
839impl ::buffa::text::TextFormat for UInt32Value {
840    fn encode_text(
841        &self,
842        enc: &mut ::buffa::text::TextEncoder<'_>,
843    ) -> ::core::fmt::Result {
844        #[allow(unused_imports)]
845        use ::buffa::Enumeration as _;
846        if self.value != 0u32 {
847            enc.write_field_name("value")?;
848            enc.write_u32(self.value)?;
849        }
850        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
851        ::core::result::Result::Ok(())
852    }
853    fn merge_text(
854        &mut self,
855        dec: &mut ::buffa::text::TextDecoder<'_>,
856    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
857        #[allow(unused_imports)]
858        use ::buffa::Enumeration as _;
859        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
860            match __name {
861                "value" => self.value = dec.read_u32()?,
862                _ => dec.skip_value()?,
863            }
864        }
865        ::core::result::Result::Ok(())
866    }
867}
868#[doc(hidden)]
869pub const __U_INT32VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
870    type_url: "type.googleapis.com/google.protobuf.UInt32Value",
871    text_encode: ::buffa::type_registry::any_encode_text::<UInt32Value>,
872    text_merge: ::buffa::type_registry::any_merge_text::<UInt32Value>,
873};
874/// Wrapper message for `bool`.
875///
876/// The JSON representation for `BoolValue` is JSON `true` and `false`.
877#[derive(Clone, PartialEq, Default)]
878#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
879pub struct BoolValue {
880    /// The bool value.
881    ///
882    /// Field 1: `value`
883    pub value: bool,
884    #[doc(hidden)]
885    pub __buffa_unknown_fields: ::buffa::UnknownFields,
886}
887impl ::core::fmt::Debug for BoolValue {
888    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
889        f.debug_struct("BoolValue").field("value", &self.value).finish()
890    }
891}
892impl BoolValue {
893    /// Protobuf type URL for this message, for use with `Any::pack` and
894    /// `Any::unpack_if`.
895    ///
896    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
897    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BoolValue";
898}
899impl ::buffa::DefaultInstance for BoolValue {
900    fn default_instance() -> &'static Self {
901        static VALUE: ::buffa::__private::OnceBox<BoolValue> = ::buffa::__private::OnceBox::new();
902        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
903    }
904}
905impl ::buffa::MessageName for BoolValue {
906    const PACKAGE: &'static str = "google.protobuf";
907    const NAME: &'static str = "BoolValue";
908    const FULL_NAME: &'static str = "google.protobuf.BoolValue";
909    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BoolValue";
910}
911impl ::buffa::Message for BoolValue {
912    /// Returns the total encoded size in bytes.
913    ///
914    /// The result is a `u32`; the protobuf specification requires all
915    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
916    /// compliant message will never overflow this type.
917    #[allow(clippy::let_and_return)]
918    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
919        #[allow(unused_imports)]
920        use ::buffa::Enumeration as _;
921        let mut size = 0u32;
922        if self.value {
923            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
924        }
925        size += self.__buffa_unknown_fields.encoded_len() as u32;
926        size
927    }
928    fn write_to(
929        &self,
930        _cache: &mut ::buffa::SizeCache,
931        buf: &mut impl ::buffa::bytes::BufMut,
932    ) {
933        #[allow(unused_imports)]
934        use ::buffa::Enumeration as _;
935        if self.value {
936            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
937                .encode(buf);
938            ::buffa::types::encode_bool(self.value, buf);
939        }
940        self.__buffa_unknown_fields.write_to(buf);
941    }
942    fn merge_field(
943        &mut self,
944        tag: ::buffa::encoding::Tag,
945        buf: &mut impl ::buffa::bytes::Buf,
946        depth: u32,
947    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
948        #[allow(unused_imports)]
949        use ::buffa::bytes::Buf as _;
950        #[allow(unused_imports)]
951        use ::buffa::Enumeration as _;
952        match tag.field_number() {
953            1u32 => {
954                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
955                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
956                        field_number: 1u32,
957                        expected: 0u8,
958                        actual: tag.wire_type() as u8,
959                    });
960                }
961                self.value = ::buffa::types::decode_bool(buf)?;
962            }
963            _ => {
964                self.__buffa_unknown_fields
965                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
966            }
967        }
968        ::core::result::Result::Ok(())
969    }
970    fn clear(&mut self) {
971        self.value = false;
972        self.__buffa_unknown_fields.clear();
973    }
974}
975impl ::buffa::ExtensionSet for BoolValue {
976    const PROTO_FQN: &'static str = "google.protobuf.BoolValue";
977    fn unknown_fields(&self) -> &::buffa::UnknownFields {
978        &self.__buffa_unknown_fields
979    }
980    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
981        &mut self.__buffa_unknown_fields
982    }
983}
984impl ::buffa::text::TextFormat for BoolValue {
985    fn encode_text(
986        &self,
987        enc: &mut ::buffa::text::TextEncoder<'_>,
988    ) -> ::core::fmt::Result {
989        #[allow(unused_imports)]
990        use ::buffa::Enumeration as _;
991        if self.value {
992            enc.write_field_name("value")?;
993            enc.write_bool(self.value)?;
994        }
995        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
996        ::core::result::Result::Ok(())
997    }
998    fn merge_text(
999        &mut self,
1000        dec: &mut ::buffa::text::TextDecoder<'_>,
1001    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1002        #[allow(unused_imports)]
1003        use ::buffa::Enumeration as _;
1004        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1005            match __name {
1006                "value" => self.value = dec.read_bool()?,
1007                _ => dec.skip_value()?,
1008            }
1009        }
1010        ::core::result::Result::Ok(())
1011    }
1012}
1013#[doc(hidden)]
1014pub const __BOOL_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1015    type_url: "type.googleapis.com/google.protobuf.BoolValue",
1016    text_encode: ::buffa::type_registry::any_encode_text::<BoolValue>,
1017    text_merge: ::buffa::type_registry::any_merge_text::<BoolValue>,
1018};
1019/// Wrapper message for `string`.
1020///
1021/// The JSON representation for `StringValue` is JSON string.
1022#[derive(Clone, PartialEq, Default)]
1023#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1024pub struct StringValue {
1025    /// The string value.
1026    ///
1027    /// Field 1: `value`
1028    pub value: ::buffa::alloc::string::String,
1029    #[doc(hidden)]
1030    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1031}
1032impl ::core::fmt::Debug for StringValue {
1033    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1034        f.debug_struct("StringValue").field("value", &self.value).finish()
1035    }
1036}
1037impl StringValue {
1038    /// Protobuf type URL for this message, for use with `Any::pack` and
1039    /// `Any::unpack_if`.
1040    ///
1041    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1042    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.StringValue";
1043}
1044impl ::buffa::DefaultInstance for StringValue {
1045    fn default_instance() -> &'static Self {
1046        static VALUE: ::buffa::__private::OnceBox<StringValue> = ::buffa::__private::OnceBox::new();
1047        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1048    }
1049}
1050impl ::buffa::MessageName for StringValue {
1051    const PACKAGE: &'static str = "google.protobuf";
1052    const NAME: &'static str = "StringValue";
1053    const FULL_NAME: &'static str = "google.protobuf.StringValue";
1054    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.StringValue";
1055}
1056impl ::buffa::Message for StringValue {
1057    /// Returns the total encoded size in bytes.
1058    ///
1059    /// The result is a `u32`; the protobuf specification requires all
1060    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1061    /// compliant message will never overflow this type.
1062    #[allow(clippy::let_and_return)]
1063    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1064        #[allow(unused_imports)]
1065        use ::buffa::Enumeration as _;
1066        let mut size = 0u32;
1067        if !self.value.is_empty() {
1068            size += 1u32 + ::buffa::types::string_encoded_len(&self.value) as u32;
1069        }
1070        size += self.__buffa_unknown_fields.encoded_len() as u32;
1071        size
1072    }
1073    fn write_to(
1074        &self,
1075        _cache: &mut ::buffa::SizeCache,
1076        buf: &mut impl ::buffa::bytes::BufMut,
1077    ) {
1078        #[allow(unused_imports)]
1079        use ::buffa::Enumeration as _;
1080        if !self.value.is_empty() {
1081            ::buffa::encoding::Tag::new(
1082                    1u32,
1083                    ::buffa::encoding::WireType::LengthDelimited,
1084                )
1085                .encode(buf);
1086            ::buffa::types::encode_string(&self.value, buf);
1087        }
1088        self.__buffa_unknown_fields.write_to(buf);
1089    }
1090    fn merge_field(
1091        &mut self,
1092        tag: ::buffa::encoding::Tag,
1093        buf: &mut impl ::buffa::bytes::Buf,
1094        depth: u32,
1095    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1096        #[allow(unused_imports)]
1097        use ::buffa::bytes::Buf as _;
1098        #[allow(unused_imports)]
1099        use ::buffa::Enumeration as _;
1100        match tag.field_number() {
1101            1u32 => {
1102                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1103                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1104                        field_number: 1u32,
1105                        expected: 2u8,
1106                        actual: tag.wire_type() as u8,
1107                    });
1108                }
1109                ::buffa::types::merge_string(&mut self.value, buf)?;
1110            }
1111            _ => {
1112                self.__buffa_unknown_fields
1113                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1114            }
1115        }
1116        ::core::result::Result::Ok(())
1117    }
1118    fn clear(&mut self) {
1119        self.value.clear();
1120        self.__buffa_unknown_fields.clear();
1121    }
1122}
1123impl ::buffa::ExtensionSet for StringValue {
1124    const PROTO_FQN: &'static str = "google.protobuf.StringValue";
1125    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1126        &self.__buffa_unknown_fields
1127    }
1128    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1129        &mut self.__buffa_unknown_fields
1130    }
1131}
1132impl ::buffa::text::TextFormat for StringValue {
1133    fn encode_text(
1134        &self,
1135        enc: &mut ::buffa::text::TextEncoder<'_>,
1136    ) -> ::core::fmt::Result {
1137        #[allow(unused_imports)]
1138        use ::buffa::Enumeration as _;
1139        if !self.value.is_empty() {
1140            enc.write_field_name("value")?;
1141            enc.write_string(&self.value)?;
1142        }
1143        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1144        ::core::result::Result::Ok(())
1145    }
1146    fn merge_text(
1147        &mut self,
1148        dec: &mut ::buffa::text::TextDecoder<'_>,
1149    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1150        #[allow(unused_imports)]
1151        use ::buffa::Enumeration as _;
1152        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1153            match __name {
1154                "value" => self.value = dec.read_string()?.into_owned(),
1155                _ => dec.skip_value()?,
1156            }
1157        }
1158        ::core::result::Result::Ok(())
1159    }
1160}
1161#[doc(hidden)]
1162pub const __STRING_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1163    type_url: "type.googleapis.com/google.protobuf.StringValue",
1164    text_encode: ::buffa::type_registry::any_encode_text::<StringValue>,
1165    text_merge: ::buffa::type_registry::any_merge_text::<StringValue>,
1166};
1167/// Wrapper message for `bytes`.
1168///
1169/// The JSON representation for `BytesValue` is JSON string.
1170#[derive(Clone, PartialEq, Default)]
1171#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
1172pub struct BytesValue {
1173    /// The bytes value.
1174    ///
1175    /// Field 1: `value`
1176    pub value: ::buffa::alloc::vec::Vec<u8>,
1177    #[doc(hidden)]
1178    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1179}
1180impl ::core::fmt::Debug for BytesValue {
1181    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1182        f.debug_struct("BytesValue").field("value", &self.value).finish()
1183    }
1184}
1185impl BytesValue {
1186    /// Protobuf type URL for this message, for use with `Any::pack` and
1187    /// `Any::unpack_if`.
1188    ///
1189    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1190    pub const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BytesValue";
1191}
1192impl ::buffa::DefaultInstance for BytesValue {
1193    fn default_instance() -> &'static Self {
1194        static VALUE: ::buffa::__private::OnceBox<BytesValue> = ::buffa::__private::OnceBox::new();
1195        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1196    }
1197}
1198impl ::buffa::MessageName for BytesValue {
1199    const PACKAGE: &'static str = "google.protobuf";
1200    const NAME: &'static str = "BytesValue";
1201    const FULL_NAME: &'static str = "google.protobuf.BytesValue";
1202    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BytesValue";
1203}
1204impl ::buffa::Message for BytesValue {
1205    /// Returns the total encoded size in bytes.
1206    ///
1207    /// The result is a `u32`; the protobuf specification requires all
1208    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1209    /// compliant message will never overflow this type.
1210    #[allow(clippy::let_and_return)]
1211    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1212        #[allow(unused_imports)]
1213        use ::buffa::Enumeration as _;
1214        let mut size = 0u32;
1215        if !self.value.is_empty() {
1216            size += 1u32 + ::buffa::types::bytes_encoded_len(&self.value) as u32;
1217        }
1218        size += self.__buffa_unknown_fields.encoded_len() as u32;
1219        size
1220    }
1221    fn write_to(
1222        &self,
1223        _cache: &mut ::buffa::SizeCache,
1224        buf: &mut impl ::buffa::bytes::BufMut,
1225    ) {
1226        #[allow(unused_imports)]
1227        use ::buffa::Enumeration as _;
1228        if !self.value.is_empty() {
1229            ::buffa::encoding::Tag::new(
1230                    1u32,
1231                    ::buffa::encoding::WireType::LengthDelimited,
1232                )
1233                .encode(buf);
1234            ::buffa::types::encode_bytes(&self.value, buf);
1235        }
1236        self.__buffa_unknown_fields.write_to(buf);
1237    }
1238    fn merge_field(
1239        &mut self,
1240        tag: ::buffa::encoding::Tag,
1241        buf: &mut impl ::buffa::bytes::Buf,
1242        depth: u32,
1243    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1244        #[allow(unused_imports)]
1245        use ::buffa::bytes::Buf as _;
1246        #[allow(unused_imports)]
1247        use ::buffa::Enumeration as _;
1248        match tag.field_number() {
1249            1u32 => {
1250                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1251                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1252                        field_number: 1u32,
1253                        expected: 2u8,
1254                        actual: tag.wire_type() as u8,
1255                    });
1256                }
1257                ::buffa::types::merge_bytes(&mut self.value, buf)?;
1258            }
1259            _ => {
1260                self.__buffa_unknown_fields
1261                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1262            }
1263        }
1264        ::core::result::Result::Ok(())
1265    }
1266    fn clear(&mut self) {
1267        self.value.clear();
1268        self.__buffa_unknown_fields.clear();
1269    }
1270}
1271impl ::buffa::ExtensionSet for BytesValue {
1272    const PROTO_FQN: &'static str = "google.protobuf.BytesValue";
1273    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1274        &self.__buffa_unknown_fields
1275    }
1276    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1277        &mut self.__buffa_unknown_fields
1278    }
1279}
1280impl ::buffa::text::TextFormat for BytesValue {
1281    fn encode_text(
1282        &self,
1283        enc: &mut ::buffa::text::TextEncoder<'_>,
1284    ) -> ::core::fmt::Result {
1285        #[allow(unused_imports)]
1286        use ::buffa::Enumeration as _;
1287        if !self.value.is_empty() {
1288            enc.write_field_name("value")?;
1289            enc.write_bytes(&self.value)?;
1290        }
1291        enc.write_unknown_fields(&self.__buffa_unknown_fields)?;
1292        ::core::result::Result::Ok(())
1293    }
1294    fn merge_text(
1295        &mut self,
1296        dec: &mut ::buffa::text::TextDecoder<'_>,
1297    ) -> ::core::result::Result<(), ::buffa::text::ParseError> {
1298        #[allow(unused_imports)]
1299        use ::buffa::Enumeration as _;
1300        while let ::core::option::Option::Some(__name) = dec.read_field_name()? {
1301            match __name {
1302                "value" => self.value = dec.read_bytes()?,
1303                _ => dec.skip_value()?,
1304            }
1305        }
1306        ::core::result::Result::Ok(())
1307    }
1308}
1309#[doc(hidden)]
1310pub const __BYTES_VALUE_TEXT_ANY: ::buffa::type_registry::TextAnyEntry = ::buffa::type_registry::TextAnyEntry {
1311    type_url: "type.googleapis.com/google.protobuf.BytesValue",
1312    text_encode: ::buffa::type_registry::any_encode_text::<BytesValue>,
1313    text_merge: ::buffa::type_registry::any_merge_text::<BytesValue>,
1314};