Skip to main content

buffa_types/generated/
google.protobuf.wrappers.__view.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, Debug, Default)]
8pub struct DoubleValueView<'a> {
9    /// The double value.
10    ///
11    /// Field 1: `value`
12    pub value: f64,
13    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
14}
15impl<'a> ::buffa::MessageView<'a> for DoubleValueView<'a> {
16    type Owned = super::super::DoubleValue;
17    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
18        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
19        <Self as ::buffa::MessageView>::decode_view_ctx(
20            buf,
21            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
22        )
23    }
24    fn decode_view_with_ctx(
25        buf: &'a [u8],
26        ctx: ::buffa::DecodeContext<'_>,
27    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
28        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
29    }
30    #[inline]
31    fn merge_view_field(
32        &mut self,
33        tag: ::buffa::encoding::Tag,
34        cur: &'a [u8],
35        before_tag: &'a [u8],
36        ctx: ::buffa::DecodeContext<'_>,
37    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
38        let _ = ctx;
39        #[allow(unused_variables)]
40        let view = self;
41        let mut cur = cur;
42        match tag.field_number() {
43            1u32 => {
44                ::buffa::encoding::check_wire_type(
45                    tag,
46                    ::buffa::encoding::WireType::Fixed64,
47                )?;
48                view.value = ::buffa::types::decode_double(&mut cur)?;
49            }
50            _ => {
51                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
52                let span_len = before_tag.len() - cur.len();
53                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
54            }
55        }
56        ::core::result::Result::Ok(cur)
57    }
58    fn to_owned_message(
59        &self,
60    ) -> ::core::result::Result<super::super::DoubleValue, ::buffa::DecodeError> {
61        self.to_owned_from_source(None)
62    }
63    #[allow(clippy::useless_conversion, clippy::needless_update)]
64    fn to_owned_from_source(
65        &self,
66        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
67    ) -> ::core::result::Result<super::super::DoubleValue, ::buffa::DecodeError> {
68        #[allow(unused_imports)]
69        use ::buffa::alloc::string::ToString as _;
70        let _ = __buffa_src;
71        ::core::result::Result::Ok(super::super::DoubleValue {
72            value: self.value,
73            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
74            ..::core::default::Default::default()
75        })
76    }
77}
78impl<'a> ::buffa::ViewEncode<'a> for DoubleValueView<'a> {
79    #[allow(clippy::needless_borrow, clippy::let_and_return)]
80    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
81        #[allow(unused_imports)]
82        use ::buffa::Enumeration as _;
83        let mut size = 0u64;
84        if self.value.to_bits() != 0u64 {
85            size += 1u64 + ::buffa::types::FIXED64_ENCODED_LEN as u64;
86        }
87        size += self.__buffa_unknown_fields.encoded_len() as u64;
88        ::buffa::saturate_size(size)
89    }
90    #[allow(clippy::needless_borrow)]
91    fn write_to(
92        &self,
93        _cache: &mut ::buffa::SizeCache,
94        buf: &mut impl ::buffa::EncodeSink,
95    ) {
96        #[allow(unused_imports)]
97        use ::buffa::Enumeration as _;
98        if self.value.to_bits() != 0u64 {
99            ::buffa::types::put_double_field(1u32, self.value, buf);
100        }
101        self.__buffa_unknown_fields.write_to(buf);
102    }
103}
104impl<'a> ::buffa::MessageName for DoubleValueView<'a> {
105    const PACKAGE: &'static str = "google.protobuf";
106    const NAME: &'static str = "DoubleValue";
107    const FULL_NAME: &'static str = "google.protobuf.DoubleValue";
108    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.DoubleValue";
109}
110::buffa::impl_default_view_instance!(DoubleValueView);
111::buffa::impl_view_reborrow!(DoubleValueView);
112/** Self-contained, `'static` owned view of a `DoubleValue` message.
113
114 Wraps [`::buffa::OwnedView`]`<`[`DoubleValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
115
116 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DoubleValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
117#[derive(Clone, Debug)]
118pub struct DoubleValueOwnedView(::buffa::OwnedView<DoubleValueView<'static>>);
119impl DoubleValueOwnedView {
120    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
121    ///
122    /// The view borrows directly from the buffer's data; the buffer is
123    /// retained inside the returned handle.
124    ///
125    /// # Errors
126    ///
127    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
128    /// protobuf data.
129    pub fn decode(
130        bytes: ::buffa::bytes::Bytes,
131    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
132        ::core::result::Result::Ok(
133            DoubleValueOwnedView(::buffa::OwnedView::decode(bytes)?),
134        )
135    }
136    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
137    /// max message size).
138    ///
139    /// # Errors
140    ///
141    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
142    /// exceeds the configured limits.
143    pub fn decode_with_options(
144        bytes: ::buffa::bytes::Bytes,
145        opts: &::buffa::DecodeOptions,
146    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
147        ::core::result::Result::Ok(
148            DoubleValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
149        )
150    }
151    /// Build from an owned message via an encode → decode round-trip.
152    ///
153    /// # Errors
154    ///
155    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
156    /// message's encoded size exceeds the 2 GiB protobuf limit, or
157    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
158    /// somehow invalid (should not happen for well-formed messages).
159    pub fn from_owned(
160        msg: &super::super::DoubleValue,
161    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
162        ::core::result::Result::Ok(
163            DoubleValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
164        )
165    }
166    /// Borrow the full [`DoubleValueView`] with its lifetime tied to `&self`.
167    #[must_use]
168    pub fn view(&self) -> &DoubleValueView<'_> {
169        self.0.reborrow()
170    }
171    /// Convert to the owned message type.
172    ///
173    /// Infallible: this type's constructors wire-decode their
174    /// buffer, and a view produced by wire decoding always
175    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
176    /// whose contract also governs handles converted from a raw
177    /// [`::buffa::OwnedView`].
178    #[must_use]
179    pub fn to_owned_message(&self) -> super::super::DoubleValue {
180        self.0.to_owned_message()
181    }
182    /// The underlying bytes buffer.
183    #[must_use]
184    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
185        self.0.bytes()
186    }
187    /// Consume the handle, returning the underlying bytes buffer.
188    #[must_use]
189    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
190        self.0.into_bytes()
191    }
192    /// The double value.
193    ///
194    /// Field 1: `value`
195    #[must_use]
196    pub fn value(&self) -> f64 {
197        self.0.reborrow().value
198    }
199}
200impl ::core::convert::From<::buffa::OwnedView<DoubleValueView<'static>>>
201for DoubleValueOwnedView {
202    fn from(inner: ::buffa::OwnedView<DoubleValueView<'static>>) -> Self {
203        DoubleValueOwnedView(inner)
204    }
205}
206impl ::core::convert::From<DoubleValueOwnedView>
207for ::buffa::OwnedView<DoubleValueView<'static>> {
208    fn from(wrapper: DoubleValueOwnedView) -> Self {
209        wrapper.0
210    }
211}
212impl ::core::convert::AsRef<::buffa::OwnedView<DoubleValueView<'static>>>
213for DoubleValueOwnedView {
214    fn as_ref(&self) -> &::buffa::OwnedView<DoubleValueView<'static>> {
215        &self.0
216    }
217}
218impl ::buffa::HasMessageView for super::super::DoubleValue {
219    type View<'a> = DoubleValueView<'a>;
220    type ViewHandle = DoubleValueOwnedView;
221}
222#[cfg(feature = "reflect")]
223const _: () = {
224    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for DoubleValueView<'a> {
225        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
226            super::super::__buffa::reflect::descriptor_pool()
227                .message(Self::__buffa_reflect_message_index())
228        }
229        fn pool(
230            &self,
231        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
232            super::super::__buffa::reflect::descriptor_pool()
233        }
234        fn get(
235            &self,
236            field: &::buffa_descriptor::FieldDescriptor,
237        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
238            #[allow(unused_imports)]
239            use ::buffa::Enumeration as _;
240            match field.number() {
241                1u32 => ::buffa_descriptor::reflect::ValueRef::F64(self.value),
242                _ => {
243                    ::core::debug_assert!(
244                        false,
245                        "field number {} is not a member of this view's reflect get()",
246                        field.number(),
247                    );
248                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
249                }
250            }
251        }
252        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
253            match field.number() {
254                1u32 => self.value != 0.0,
255                _ => false,
256            }
257        }
258        fn for_each_set(
259            &self,
260            f: &mut dyn ::core::ops::FnMut(
261                &::buffa_descriptor::FieldDescriptor,
262                ::buffa_descriptor::reflect::ValueRef<'_>,
263            ),
264        ) {
265            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
266                self,
267            );
268            for fd in md.fields() {
269                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
270                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
271                }
272            }
273        }
274        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
275            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
276            ::buffa_descriptor::reflect::DynamicMessage::decode(
277                    ::buffa::alloc::sync::Arc::clone(
278                        super::super::__buffa::reflect::descriptor_pool(),
279                    ),
280                    Self::__buffa_reflect_message_index(),
281                    &bytes,
282                )
283                .expect("view re-encodes to bytes decodable against its own descriptor")
284        }
285    }
286    impl<'a> ::buffa_descriptor::reflect::ReflectElement for DoubleValueView<'a> {
287        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
288            ::buffa_descriptor::reflect::ValueRef::Message(
289                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
290            )
291        }
292    }
293    impl<'a> DoubleValueView<'a> {
294        /// Memoized `MessageIndex` for this view's message type, resolved
295        /// once against the package's embedded descriptor pool. An inherent
296        /// associated fn (not a free fn) so sibling views in the same module
297        /// do not collide.
298        #[doc(hidden)]
299        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
300            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
301            *IDX
302                .get_or_init(|| {
303                    super::super::__buffa::reflect::descriptor_pool()
304                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
305                        .expect(
306                            "generated view type is registered in the embedded descriptor pool",
307                        )
308                })
309        }
310    }
311};
312/// Wrapper message for `float`.
313///
314/// The JSON representation for `FloatValue` is JSON number.
315#[derive(Clone, Debug, Default)]
316pub struct FloatValueView<'a> {
317    /// The float value.
318    ///
319    /// Field 1: `value`
320    pub value: f32,
321    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
322}
323impl<'a> ::buffa::MessageView<'a> for FloatValueView<'a> {
324    type Owned = super::super::FloatValue;
325    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
326        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
327        <Self as ::buffa::MessageView>::decode_view_ctx(
328            buf,
329            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
330        )
331    }
332    fn decode_view_with_ctx(
333        buf: &'a [u8],
334        ctx: ::buffa::DecodeContext<'_>,
335    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
336        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
337    }
338    #[inline]
339    fn merge_view_field(
340        &mut self,
341        tag: ::buffa::encoding::Tag,
342        cur: &'a [u8],
343        before_tag: &'a [u8],
344        ctx: ::buffa::DecodeContext<'_>,
345    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
346        let _ = ctx;
347        #[allow(unused_variables)]
348        let view = self;
349        let mut cur = cur;
350        match tag.field_number() {
351            1u32 => {
352                ::buffa::encoding::check_wire_type(
353                    tag,
354                    ::buffa::encoding::WireType::Fixed32,
355                )?;
356                view.value = ::buffa::types::decode_float(&mut cur)?;
357            }
358            _ => {
359                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
360                let span_len = before_tag.len() - cur.len();
361                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
362            }
363        }
364        ::core::result::Result::Ok(cur)
365    }
366    fn to_owned_message(
367        &self,
368    ) -> ::core::result::Result<super::super::FloatValue, ::buffa::DecodeError> {
369        self.to_owned_from_source(None)
370    }
371    #[allow(clippy::useless_conversion, clippy::needless_update)]
372    fn to_owned_from_source(
373        &self,
374        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
375    ) -> ::core::result::Result<super::super::FloatValue, ::buffa::DecodeError> {
376        #[allow(unused_imports)]
377        use ::buffa::alloc::string::ToString as _;
378        let _ = __buffa_src;
379        ::core::result::Result::Ok(super::super::FloatValue {
380            value: self.value,
381            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
382            ..::core::default::Default::default()
383        })
384    }
385}
386impl<'a> ::buffa::ViewEncode<'a> for FloatValueView<'a> {
387    #[allow(clippy::needless_borrow, clippy::let_and_return)]
388    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
389        #[allow(unused_imports)]
390        use ::buffa::Enumeration as _;
391        let mut size = 0u64;
392        if self.value.to_bits() != 0u32 {
393            size += 1u64 + ::buffa::types::FIXED32_ENCODED_LEN as u64;
394        }
395        size += self.__buffa_unknown_fields.encoded_len() as u64;
396        ::buffa::saturate_size(size)
397    }
398    #[allow(clippy::needless_borrow)]
399    fn write_to(
400        &self,
401        _cache: &mut ::buffa::SizeCache,
402        buf: &mut impl ::buffa::EncodeSink,
403    ) {
404        #[allow(unused_imports)]
405        use ::buffa::Enumeration as _;
406        if self.value.to_bits() != 0u32 {
407            ::buffa::types::put_float_field(1u32, self.value, buf);
408        }
409        self.__buffa_unknown_fields.write_to(buf);
410    }
411}
412impl<'a> ::buffa::MessageName for FloatValueView<'a> {
413    const PACKAGE: &'static str = "google.protobuf";
414    const NAME: &'static str = "FloatValue";
415    const FULL_NAME: &'static str = "google.protobuf.FloatValue";
416    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.FloatValue";
417}
418::buffa::impl_default_view_instance!(FloatValueView);
419::buffa::impl_view_reborrow!(FloatValueView);
420/** Self-contained, `'static` owned view of a `FloatValue` message.
421
422 Wraps [`::buffa::OwnedView`]`<`[`FloatValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
423
424 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FloatValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
425#[derive(Clone, Debug)]
426pub struct FloatValueOwnedView(::buffa::OwnedView<FloatValueView<'static>>);
427impl FloatValueOwnedView {
428    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
429    ///
430    /// The view borrows directly from the buffer's data; the buffer is
431    /// retained inside the returned handle.
432    ///
433    /// # Errors
434    ///
435    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
436    /// protobuf data.
437    pub fn decode(
438        bytes: ::buffa::bytes::Bytes,
439    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
440        ::core::result::Result::Ok(
441            FloatValueOwnedView(::buffa::OwnedView::decode(bytes)?),
442        )
443    }
444    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
445    /// max message size).
446    ///
447    /// # Errors
448    ///
449    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
450    /// exceeds the configured limits.
451    pub fn decode_with_options(
452        bytes: ::buffa::bytes::Bytes,
453        opts: &::buffa::DecodeOptions,
454    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
455        ::core::result::Result::Ok(
456            FloatValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
457        )
458    }
459    /// Build from an owned message via an encode → decode round-trip.
460    ///
461    /// # Errors
462    ///
463    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
464    /// message's encoded size exceeds the 2 GiB protobuf limit, or
465    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
466    /// somehow invalid (should not happen for well-formed messages).
467    pub fn from_owned(
468        msg: &super::super::FloatValue,
469    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
470        ::core::result::Result::Ok(
471            FloatValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
472        )
473    }
474    /// Borrow the full [`FloatValueView`] with its lifetime tied to `&self`.
475    #[must_use]
476    pub fn view(&self) -> &FloatValueView<'_> {
477        self.0.reborrow()
478    }
479    /// Convert to the owned message type.
480    ///
481    /// Infallible: this type's constructors wire-decode their
482    /// buffer, and a view produced by wire decoding always
483    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
484    /// whose contract also governs handles converted from a raw
485    /// [`::buffa::OwnedView`].
486    #[must_use]
487    pub fn to_owned_message(&self) -> super::super::FloatValue {
488        self.0.to_owned_message()
489    }
490    /// The underlying bytes buffer.
491    #[must_use]
492    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
493        self.0.bytes()
494    }
495    /// Consume the handle, returning the underlying bytes buffer.
496    #[must_use]
497    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
498        self.0.into_bytes()
499    }
500    /// The float value.
501    ///
502    /// Field 1: `value`
503    #[must_use]
504    pub fn value(&self) -> f32 {
505        self.0.reborrow().value
506    }
507}
508impl ::core::convert::From<::buffa::OwnedView<FloatValueView<'static>>>
509for FloatValueOwnedView {
510    fn from(inner: ::buffa::OwnedView<FloatValueView<'static>>) -> Self {
511        FloatValueOwnedView(inner)
512    }
513}
514impl ::core::convert::From<FloatValueOwnedView>
515for ::buffa::OwnedView<FloatValueView<'static>> {
516    fn from(wrapper: FloatValueOwnedView) -> Self {
517        wrapper.0
518    }
519}
520impl ::core::convert::AsRef<::buffa::OwnedView<FloatValueView<'static>>>
521for FloatValueOwnedView {
522    fn as_ref(&self) -> &::buffa::OwnedView<FloatValueView<'static>> {
523        &self.0
524    }
525}
526impl ::buffa::HasMessageView for super::super::FloatValue {
527    type View<'a> = FloatValueView<'a>;
528    type ViewHandle = FloatValueOwnedView;
529}
530#[cfg(feature = "reflect")]
531const _: () = {
532    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for FloatValueView<'a> {
533        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
534            super::super::__buffa::reflect::descriptor_pool()
535                .message(Self::__buffa_reflect_message_index())
536        }
537        fn pool(
538            &self,
539        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
540            super::super::__buffa::reflect::descriptor_pool()
541        }
542        fn get(
543            &self,
544            field: &::buffa_descriptor::FieldDescriptor,
545        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
546            #[allow(unused_imports)]
547            use ::buffa::Enumeration as _;
548            match field.number() {
549                1u32 => ::buffa_descriptor::reflect::ValueRef::F32(self.value),
550                _ => {
551                    ::core::debug_assert!(
552                        false,
553                        "field number {} is not a member of this view's reflect get()",
554                        field.number(),
555                    );
556                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
557                }
558            }
559        }
560        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
561            match field.number() {
562                1u32 => self.value != 0.0,
563                _ => false,
564            }
565        }
566        fn for_each_set(
567            &self,
568            f: &mut dyn ::core::ops::FnMut(
569                &::buffa_descriptor::FieldDescriptor,
570                ::buffa_descriptor::reflect::ValueRef<'_>,
571            ),
572        ) {
573            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
574                self,
575            );
576            for fd in md.fields() {
577                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
578                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
579                }
580            }
581        }
582        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
583            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
584            ::buffa_descriptor::reflect::DynamicMessage::decode(
585                    ::buffa::alloc::sync::Arc::clone(
586                        super::super::__buffa::reflect::descriptor_pool(),
587                    ),
588                    Self::__buffa_reflect_message_index(),
589                    &bytes,
590                )
591                .expect("view re-encodes to bytes decodable against its own descriptor")
592        }
593    }
594    impl<'a> ::buffa_descriptor::reflect::ReflectElement for FloatValueView<'a> {
595        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
596            ::buffa_descriptor::reflect::ValueRef::Message(
597                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
598            )
599        }
600    }
601    impl<'a> FloatValueView<'a> {
602        /// Memoized `MessageIndex` for this view's message type, resolved
603        /// once against the package's embedded descriptor pool. An inherent
604        /// associated fn (not a free fn) so sibling views in the same module
605        /// do not collide.
606        #[doc(hidden)]
607        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
608            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
609            *IDX
610                .get_or_init(|| {
611                    super::super::__buffa::reflect::descriptor_pool()
612                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
613                        .expect(
614                            "generated view type is registered in the embedded descriptor pool",
615                        )
616                })
617        }
618    }
619};
620/// Wrapper message for `int64`.
621///
622/// The JSON representation for `Int64Value` is JSON string.
623#[derive(Clone, Debug, Default)]
624pub struct Int64ValueView<'a> {
625    /// The int64 value.
626    ///
627    /// Field 1: `value`
628    pub value: i64,
629    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
630}
631impl<'a> ::buffa::MessageView<'a> for Int64ValueView<'a> {
632    type Owned = super::super::Int64Value;
633    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
634        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
635        <Self as ::buffa::MessageView>::decode_view_ctx(
636            buf,
637            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
638        )
639    }
640    fn decode_view_with_ctx(
641        buf: &'a [u8],
642        ctx: ::buffa::DecodeContext<'_>,
643    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
644        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
645    }
646    #[inline]
647    fn merge_view_field(
648        &mut self,
649        tag: ::buffa::encoding::Tag,
650        cur: &'a [u8],
651        before_tag: &'a [u8],
652        ctx: ::buffa::DecodeContext<'_>,
653    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
654        let _ = ctx;
655        #[allow(unused_variables)]
656        let view = self;
657        let mut cur = cur;
658        match tag.field_number() {
659            1u32 => {
660                ::buffa::encoding::check_wire_type(
661                    tag,
662                    ::buffa::encoding::WireType::Varint,
663                )?;
664                view.value = ::buffa::types::decode_int64(&mut cur)?;
665            }
666            _ => {
667                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
668                let span_len = before_tag.len() - cur.len();
669                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
670            }
671        }
672        ::core::result::Result::Ok(cur)
673    }
674    fn to_owned_message(
675        &self,
676    ) -> ::core::result::Result<super::super::Int64Value, ::buffa::DecodeError> {
677        self.to_owned_from_source(None)
678    }
679    #[allow(clippy::useless_conversion, clippy::needless_update)]
680    fn to_owned_from_source(
681        &self,
682        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
683    ) -> ::core::result::Result<super::super::Int64Value, ::buffa::DecodeError> {
684        #[allow(unused_imports)]
685        use ::buffa::alloc::string::ToString as _;
686        let _ = __buffa_src;
687        ::core::result::Result::Ok(super::super::Int64Value {
688            value: self.value,
689            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
690            ..::core::default::Default::default()
691        })
692    }
693}
694impl<'a> ::buffa::ViewEncode<'a> for Int64ValueView<'a> {
695    #[allow(clippy::needless_borrow, clippy::let_and_return)]
696    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
697        #[allow(unused_imports)]
698        use ::buffa::Enumeration as _;
699        let mut size = 0u64;
700        if self.value != 0i64 {
701            size += 1u64 + ::buffa::types::int64_encoded_len(self.value) as u64;
702        }
703        size += self.__buffa_unknown_fields.encoded_len() as u64;
704        ::buffa::saturate_size(size)
705    }
706    #[allow(clippy::needless_borrow)]
707    fn write_to(
708        &self,
709        _cache: &mut ::buffa::SizeCache,
710        buf: &mut impl ::buffa::EncodeSink,
711    ) {
712        #[allow(unused_imports)]
713        use ::buffa::Enumeration as _;
714        if self.value != 0i64 {
715            ::buffa::types::put_int64_field(1u32, self.value, buf);
716        }
717        self.__buffa_unknown_fields.write_to(buf);
718    }
719}
720impl<'a> ::buffa::MessageName for Int64ValueView<'a> {
721    const PACKAGE: &'static str = "google.protobuf";
722    const NAME: &'static str = "Int64Value";
723    const FULL_NAME: &'static str = "google.protobuf.Int64Value";
724    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int64Value";
725}
726::buffa::impl_default_view_instance!(Int64ValueView);
727::buffa::impl_view_reborrow!(Int64ValueView);
728/** Self-contained, `'static` owned view of a `Int64Value` message.
729
730 Wraps [`::buffa::OwnedView`]`<`[`Int64ValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
731
732 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`Int64ValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
733#[derive(Clone, Debug)]
734pub struct Int64ValueOwnedView(::buffa::OwnedView<Int64ValueView<'static>>);
735impl Int64ValueOwnedView {
736    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
737    ///
738    /// The view borrows directly from the buffer's data; the buffer is
739    /// retained inside the returned handle.
740    ///
741    /// # Errors
742    ///
743    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
744    /// protobuf data.
745    pub fn decode(
746        bytes: ::buffa::bytes::Bytes,
747    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
748        ::core::result::Result::Ok(
749            Int64ValueOwnedView(::buffa::OwnedView::decode(bytes)?),
750        )
751    }
752    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
753    /// max message size).
754    ///
755    /// # Errors
756    ///
757    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
758    /// exceeds the configured limits.
759    pub fn decode_with_options(
760        bytes: ::buffa::bytes::Bytes,
761        opts: &::buffa::DecodeOptions,
762    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
763        ::core::result::Result::Ok(
764            Int64ValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
765        )
766    }
767    /// Build from an owned message via an encode → decode round-trip.
768    ///
769    /// # Errors
770    ///
771    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
772    /// message's encoded size exceeds the 2 GiB protobuf limit, or
773    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
774    /// somehow invalid (should not happen for well-formed messages).
775    pub fn from_owned(
776        msg: &super::super::Int64Value,
777    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
778        ::core::result::Result::Ok(
779            Int64ValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
780        )
781    }
782    /// Borrow the full [`Int64ValueView`] with its lifetime tied to `&self`.
783    #[must_use]
784    pub fn view(&self) -> &Int64ValueView<'_> {
785        self.0.reborrow()
786    }
787    /// Convert to the owned message type.
788    ///
789    /// Infallible: this type's constructors wire-decode their
790    /// buffer, and a view produced by wire decoding always
791    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
792    /// whose contract also governs handles converted from a raw
793    /// [`::buffa::OwnedView`].
794    #[must_use]
795    pub fn to_owned_message(&self) -> super::super::Int64Value {
796        self.0.to_owned_message()
797    }
798    /// The underlying bytes buffer.
799    #[must_use]
800    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
801        self.0.bytes()
802    }
803    /// Consume the handle, returning the underlying bytes buffer.
804    #[must_use]
805    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
806        self.0.into_bytes()
807    }
808    /// The int64 value.
809    ///
810    /// Field 1: `value`
811    #[must_use]
812    pub fn value(&self) -> i64 {
813        self.0.reborrow().value
814    }
815}
816impl ::core::convert::From<::buffa::OwnedView<Int64ValueView<'static>>>
817for Int64ValueOwnedView {
818    fn from(inner: ::buffa::OwnedView<Int64ValueView<'static>>) -> Self {
819        Int64ValueOwnedView(inner)
820    }
821}
822impl ::core::convert::From<Int64ValueOwnedView>
823for ::buffa::OwnedView<Int64ValueView<'static>> {
824    fn from(wrapper: Int64ValueOwnedView) -> Self {
825        wrapper.0
826    }
827}
828impl ::core::convert::AsRef<::buffa::OwnedView<Int64ValueView<'static>>>
829for Int64ValueOwnedView {
830    fn as_ref(&self) -> &::buffa::OwnedView<Int64ValueView<'static>> {
831        &self.0
832    }
833}
834impl ::buffa::HasMessageView for super::super::Int64Value {
835    type View<'a> = Int64ValueView<'a>;
836    type ViewHandle = Int64ValueOwnedView;
837}
838#[cfg(feature = "reflect")]
839const _: () = {
840    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for Int64ValueView<'a> {
841        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
842            super::super::__buffa::reflect::descriptor_pool()
843                .message(Self::__buffa_reflect_message_index())
844        }
845        fn pool(
846            &self,
847        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
848            super::super::__buffa::reflect::descriptor_pool()
849        }
850        fn get(
851            &self,
852            field: &::buffa_descriptor::FieldDescriptor,
853        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
854            #[allow(unused_imports)]
855            use ::buffa::Enumeration as _;
856            match field.number() {
857                1u32 => ::buffa_descriptor::reflect::ValueRef::I64(self.value),
858                _ => {
859                    ::core::debug_assert!(
860                        false,
861                        "field number {} is not a member of this view's reflect get()",
862                        field.number(),
863                    );
864                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
865                }
866            }
867        }
868        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
869            match field.number() {
870                1u32 => self.value != 0,
871                _ => false,
872            }
873        }
874        fn for_each_set(
875            &self,
876            f: &mut dyn ::core::ops::FnMut(
877                &::buffa_descriptor::FieldDescriptor,
878                ::buffa_descriptor::reflect::ValueRef<'_>,
879            ),
880        ) {
881            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
882                self,
883            );
884            for fd in md.fields() {
885                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
886                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
887                }
888            }
889        }
890        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
891            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
892            ::buffa_descriptor::reflect::DynamicMessage::decode(
893                    ::buffa::alloc::sync::Arc::clone(
894                        super::super::__buffa::reflect::descriptor_pool(),
895                    ),
896                    Self::__buffa_reflect_message_index(),
897                    &bytes,
898                )
899                .expect("view re-encodes to bytes decodable against its own descriptor")
900        }
901    }
902    impl<'a> ::buffa_descriptor::reflect::ReflectElement for Int64ValueView<'a> {
903        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
904            ::buffa_descriptor::reflect::ValueRef::Message(
905                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
906            )
907        }
908    }
909    impl<'a> Int64ValueView<'a> {
910        /// Memoized `MessageIndex` for this view's message type, resolved
911        /// once against the package's embedded descriptor pool. An inherent
912        /// associated fn (not a free fn) so sibling views in the same module
913        /// do not collide.
914        #[doc(hidden)]
915        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
916            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
917            *IDX
918                .get_or_init(|| {
919                    super::super::__buffa::reflect::descriptor_pool()
920                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
921                        .expect(
922                            "generated view type is registered in the embedded descriptor pool",
923                        )
924                })
925        }
926    }
927};
928/// Wrapper message for `uint64`.
929///
930/// The JSON representation for `UInt64Value` is JSON string.
931#[derive(Clone, Debug, Default)]
932pub struct UInt64ValueView<'a> {
933    /// The uint64 value.
934    ///
935    /// Field 1: `value`
936    pub value: u64,
937    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
938}
939impl<'a> ::buffa::MessageView<'a> for UInt64ValueView<'a> {
940    type Owned = super::super::UInt64Value;
941    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
942        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
943        <Self as ::buffa::MessageView>::decode_view_ctx(
944            buf,
945            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
946        )
947    }
948    fn decode_view_with_ctx(
949        buf: &'a [u8],
950        ctx: ::buffa::DecodeContext<'_>,
951    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
952        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
953    }
954    #[inline]
955    fn merge_view_field(
956        &mut self,
957        tag: ::buffa::encoding::Tag,
958        cur: &'a [u8],
959        before_tag: &'a [u8],
960        ctx: ::buffa::DecodeContext<'_>,
961    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
962        let _ = ctx;
963        #[allow(unused_variables)]
964        let view = self;
965        let mut cur = cur;
966        match tag.field_number() {
967            1u32 => {
968                ::buffa::encoding::check_wire_type(
969                    tag,
970                    ::buffa::encoding::WireType::Varint,
971                )?;
972                view.value = ::buffa::types::decode_uint64(&mut cur)?;
973            }
974            _ => {
975                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
976                let span_len = before_tag.len() - cur.len();
977                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
978            }
979        }
980        ::core::result::Result::Ok(cur)
981    }
982    fn to_owned_message(
983        &self,
984    ) -> ::core::result::Result<super::super::UInt64Value, ::buffa::DecodeError> {
985        self.to_owned_from_source(None)
986    }
987    #[allow(clippy::useless_conversion, clippy::needless_update)]
988    fn to_owned_from_source(
989        &self,
990        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
991    ) -> ::core::result::Result<super::super::UInt64Value, ::buffa::DecodeError> {
992        #[allow(unused_imports)]
993        use ::buffa::alloc::string::ToString as _;
994        let _ = __buffa_src;
995        ::core::result::Result::Ok(super::super::UInt64Value {
996            value: self.value,
997            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
998            ..::core::default::Default::default()
999        })
1000    }
1001}
1002impl<'a> ::buffa::ViewEncode<'a> for UInt64ValueView<'a> {
1003    #[allow(clippy::needless_borrow, clippy::let_and_return)]
1004    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1005        #[allow(unused_imports)]
1006        use ::buffa::Enumeration as _;
1007        let mut size = 0u64;
1008        if self.value != 0u64 {
1009            size += 1u64 + ::buffa::types::uint64_encoded_len(self.value) as u64;
1010        }
1011        size += self.__buffa_unknown_fields.encoded_len() as u64;
1012        ::buffa::saturate_size(size)
1013    }
1014    #[allow(clippy::needless_borrow)]
1015    fn write_to(
1016        &self,
1017        _cache: &mut ::buffa::SizeCache,
1018        buf: &mut impl ::buffa::EncodeSink,
1019    ) {
1020        #[allow(unused_imports)]
1021        use ::buffa::Enumeration as _;
1022        if self.value != 0u64 {
1023            ::buffa::types::put_uint64_field(1u32, self.value, buf);
1024        }
1025        self.__buffa_unknown_fields.write_to(buf);
1026    }
1027}
1028impl<'a> ::buffa::MessageName for UInt64ValueView<'a> {
1029    const PACKAGE: &'static str = "google.protobuf";
1030    const NAME: &'static str = "UInt64Value";
1031    const FULL_NAME: &'static str = "google.protobuf.UInt64Value";
1032    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt64Value";
1033}
1034::buffa::impl_default_view_instance!(UInt64ValueView);
1035::buffa::impl_view_reborrow!(UInt64ValueView);
1036/** Self-contained, `'static` owned view of a `UInt64Value` message.
1037
1038 Wraps [`::buffa::OwnedView`]`<`[`UInt64ValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
1039
1040 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UInt64ValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1041#[derive(Clone, Debug)]
1042pub struct UInt64ValueOwnedView(::buffa::OwnedView<UInt64ValueView<'static>>);
1043impl UInt64ValueOwnedView {
1044    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1045    ///
1046    /// The view borrows directly from the buffer's data; the buffer is
1047    /// retained inside the returned handle.
1048    ///
1049    /// # Errors
1050    ///
1051    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1052    /// protobuf data.
1053    pub fn decode(
1054        bytes: ::buffa::bytes::Bytes,
1055    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1056        ::core::result::Result::Ok(
1057            UInt64ValueOwnedView(::buffa::OwnedView::decode(bytes)?),
1058        )
1059    }
1060    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1061    /// max message size).
1062    ///
1063    /// # Errors
1064    ///
1065    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1066    /// exceeds the configured limits.
1067    pub fn decode_with_options(
1068        bytes: ::buffa::bytes::Bytes,
1069        opts: &::buffa::DecodeOptions,
1070    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1071        ::core::result::Result::Ok(
1072            UInt64ValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
1073        )
1074    }
1075    /// Build from an owned message via an encode → decode round-trip.
1076    ///
1077    /// # Errors
1078    ///
1079    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
1080    /// message's encoded size exceeds the 2 GiB protobuf limit, or
1081    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
1082    /// somehow invalid (should not happen for well-formed messages).
1083    pub fn from_owned(
1084        msg: &super::super::UInt64Value,
1085    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1086        ::core::result::Result::Ok(
1087            UInt64ValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
1088        )
1089    }
1090    /// Borrow the full [`UInt64ValueView`] with its lifetime tied to `&self`.
1091    #[must_use]
1092    pub fn view(&self) -> &UInt64ValueView<'_> {
1093        self.0.reborrow()
1094    }
1095    /// Convert to the owned message type.
1096    ///
1097    /// Infallible: this type's constructors wire-decode their
1098    /// buffer, and a view produced by wire decoding always
1099    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
1100    /// whose contract also governs handles converted from a raw
1101    /// [`::buffa::OwnedView`].
1102    #[must_use]
1103    pub fn to_owned_message(&self) -> super::super::UInt64Value {
1104        self.0.to_owned_message()
1105    }
1106    /// The underlying bytes buffer.
1107    #[must_use]
1108    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
1109        self.0.bytes()
1110    }
1111    /// Consume the handle, returning the underlying bytes buffer.
1112    #[must_use]
1113    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
1114        self.0.into_bytes()
1115    }
1116    /// The uint64 value.
1117    ///
1118    /// Field 1: `value`
1119    #[must_use]
1120    pub fn value(&self) -> u64 {
1121        self.0.reborrow().value
1122    }
1123}
1124impl ::core::convert::From<::buffa::OwnedView<UInt64ValueView<'static>>>
1125for UInt64ValueOwnedView {
1126    fn from(inner: ::buffa::OwnedView<UInt64ValueView<'static>>) -> Self {
1127        UInt64ValueOwnedView(inner)
1128    }
1129}
1130impl ::core::convert::From<UInt64ValueOwnedView>
1131for ::buffa::OwnedView<UInt64ValueView<'static>> {
1132    fn from(wrapper: UInt64ValueOwnedView) -> Self {
1133        wrapper.0
1134    }
1135}
1136impl ::core::convert::AsRef<::buffa::OwnedView<UInt64ValueView<'static>>>
1137for UInt64ValueOwnedView {
1138    fn as_ref(&self) -> &::buffa::OwnedView<UInt64ValueView<'static>> {
1139        &self.0
1140    }
1141}
1142impl ::buffa::HasMessageView for super::super::UInt64Value {
1143    type View<'a> = UInt64ValueView<'a>;
1144    type ViewHandle = UInt64ValueOwnedView;
1145}
1146#[cfg(feature = "reflect")]
1147const _: () = {
1148    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for UInt64ValueView<'a> {
1149        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
1150            super::super::__buffa::reflect::descriptor_pool()
1151                .message(Self::__buffa_reflect_message_index())
1152        }
1153        fn pool(
1154            &self,
1155        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
1156            super::super::__buffa::reflect::descriptor_pool()
1157        }
1158        fn get(
1159            &self,
1160            field: &::buffa_descriptor::FieldDescriptor,
1161        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1162            #[allow(unused_imports)]
1163            use ::buffa::Enumeration as _;
1164            match field.number() {
1165                1u32 => ::buffa_descriptor::reflect::ValueRef::U64(self.value),
1166                _ => {
1167                    ::core::debug_assert!(
1168                        false,
1169                        "field number {} is not a member of this view's reflect get()",
1170                        field.number(),
1171                    );
1172                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
1173                }
1174            }
1175        }
1176        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
1177            match field.number() {
1178                1u32 => self.value != 0,
1179                _ => false,
1180            }
1181        }
1182        fn for_each_set(
1183            &self,
1184            f: &mut dyn ::core::ops::FnMut(
1185                &::buffa_descriptor::FieldDescriptor,
1186                ::buffa_descriptor::reflect::ValueRef<'_>,
1187            ),
1188        ) {
1189            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
1190                self,
1191            );
1192            for fd in md.fields() {
1193                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
1194                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
1195                }
1196            }
1197        }
1198        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
1199            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
1200            ::buffa_descriptor::reflect::DynamicMessage::decode(
1201                    ::buffa::alloc::sync::Arc::clone(
1202                        super::super::__buffa::reflect::descriptor_pool(),
1203                    ),
1204                    Self::__buffa_reflect_message_index(),
1205                    &bytes,
1206                )
1207                .expect("view re-encodes to bytes decodable against its own descriptor")
1208        }
1209    }
1210    impl<'a> ::buffa_descriptor::reflect::ReflectElement for UInt64ValueView<'a> {
1211        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1212            ::buffa_descriptor::reflect::ValueRef::Message(
1213                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
1214            )
1215        }
1216    }
1217    impl<'a> UInt64ValueView<'a> {
1218        /// Memoized `MessageIndex` for this view's message type, resolved
1219        /// once against the package's embedded descriptor pool. An inherent
1220        /// associated fn (not a free fn) so sibling views in the same module
1221        /// do not collide.
1222        #[doc(hidden)]
1223        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
1224            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
1225            *IDX
1226                .get_or_init(|| {
1227                    super::super::__buffa::reflect::descriptor_pool()
1228                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
1229                        .expect(
1230                            "generated view type is registered in the embedded descriptor pool",
1231                        )
1232                })
1233        }
1234    }
1235};
1236/// Wrapper message for `int32`.
1237///
1238/// The JSON representation for `Int32Value` is JSON number.
1239#[derive(Clone, Debug, Default)]
1240pub struct Int32ValueView<'a> {
1241    /// The int32 value.
1242    ///
1243    /// Field 1: `value`
1244    pub value: i32,
1245    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1246}
1247impl<'a> ::buffa::MessageView<'a> for Int32ValueView<'a> {
1248    type Owned = super::super::Int32Value;
1249    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1250        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
1251        <Self as ::buffa::MessageView>::decode_view_ctx(
1252            buf,
1253            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
1254        )
1255    }
1256    fn decode_view_with_ctx(
1257        buf: &'a [u8],
1258        ctx: ::buffa::DecodeContext<'_>,
1259    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1260        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
1261    }
1262    #[inline]
1263    fn merge_view_field(
1264        &mut self,
1265        tag: ::buffa::encoding::Tag,
1266        cur: &'a [u8],
1267        before_tag: &'a [u8],
1268        ctx: ::buffa::DecodeContext<'_>,
1269    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
1270        let _ = ctx;
1271        #[allow(unused_variables)]
1272        let view = self;
1273        let mut cur = cur;
1274        match tag.field_number() {
1275            1u32 => {
1276                ::buffa::encoding::check_wire_type(
1277                    tag,
1278                    ::buffa::encoding::WireType::Varint,
1279                )?;
1280                view.value = ::buffa::types::decode_int32(&mut cur)?;
1281            }
1282            _ => {
1283                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
1284                let span_len = before_tag.len() - cur.len();
1285                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
1286            }
1287        }
1288        ::core::result::Result::Ok(cur)
1289    }
1290    fn to_owned_message(
1291        &self,
1292    ) -> ::core::result::Result<super::super::Int32Value, ::buffa::DecodeError> {
1293        self.to_owned_from_source(None)
1294    }
1295    #[allow(clippy::useless_conversion, clippy::needless_update)]
1296    fn to_owned_from_source(
1297        &self,
1298        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1299    ) -> ::core::result::Result<super::super::Int32Value, ::buffa::DecodeError> {
1300        #[allow(unused_imports)]
1301        use ::buffa::alloc::string::ToString as _;
1302        let _ = __buffa_src;
1303        ::core::result::Result::Ok(super::super::Int32Value {
1304            value: self.value,
1305            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
1306            ..::core::default::Default::default()
1307        })
1308    }
1309}
1310impl<'a> ::buffa::ViewEncode<'a> for Int32ValueView<'a> {
1311    #[allow(clippy::needless_borrow, clippy::let_and_return)]
1312    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1313        #[allow(unused_imports)]
1314        use ::buffa::Enumeration as _;
1315        let mut size = 0u64;
1316        if self.value != 0i32 {
1317            size += 1u64 + ::buffa::types::int32_encoded_len(self.value) as u64;
1318        }
1319        size += self.__buffa_unknown_fields.encoded_len() as u64;
1320        ::buffa::saturate_size(size)
1321    }
1322    #[allow(clippy::needless_borrow)]
1323    fn write_to(
1324        &self,
1325        _cache: &mut ::buffa::SizeCache,
1326        buf: &mut impl ::buffa::EncodeSink,
1327    ) {
1328        #[allow(unused_imports)]
1329        use ::buffa::Enumeration as _;
1330        if self.value != 0i32 {
1331            ::buffa::types::put_int32_field(1u32, self.value, buf);
1332        }
1333        self.__buffa_unknown_fields.write_to(buf);
1334    }
1335}
1336impl<'a> ::buffa::MessageName for Int32ValueView<'a> {
1337    const PACKAGE: &'static str = "google.protobuf";
1338    const NAME: &'static str = "Int32Value";
1339    const FULL_NAME: &'static str = "google.protobuf.Int32Value";
1340    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.Int32Value";
1341}
1342::buffa::impl_default_view_instance!(Int32ValueView);
1343::buffa::impl_view_reborrow!(Int32ValueView);
1344/** Self-contained, `'static` owned view of a `Int32Value` message.
1345
1346 Wraps [`::buffa::OwnedView`]`<`[`Int32ValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
1347
1348 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`Int32ValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1349#[derive(Clone, Debug)]
1350pub struct Int32ValueOwnedView(::buffa::OwnedView<Int32ValueView<'static>>);
1351impl Int32ValueOwnedView {
1352    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1353    ///
1354    /// The view borrows directly from the buffer's data; the buffer is
1355    /// retained inside the returned handle.
1356    ///
1357    /// # Errors
1358    ///
1359    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1360    /// protobuf data.
1361    pub fn decode(
1362        bytes: ::buffa::bytes::Bytes,
1363    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1364        ::core::result::Result::Ok(
1365            Int32ValueOwnedView(::buffa::OwnedView::decode(bytes)?),
1366        )
1367    }
1368    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1369    /// max message size).
1370    ///
1371    /// # Errors
1372    ///
1373    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1374    /// exceeds the configured limits.
1375    pub fn decode_with_options(
1376        bytes: ::buffa::bytes::Bytes,
1377        opts: &::buffa::DecodeOptions,
1378    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1379        ::core::result::Result::Ok(
1380            Int32ValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
1381        )
1382    }
1383    /// Build from an owned message via an encode → decode round-trip.
1384    ///
1385    /// # Errors
1386    ///
1387    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
1388    /// message's encoded size exceeds the 2 GiB protobuf limit, or
1389    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
1390    /// somehow invalid (should not happen for well-formed messages).
1391    pub fn from_owned(
1392        msg: &super::super::Int32Value,
1393    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1394        ::core::result::Result::Ok(
1395            Int32ValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
1396        )
1397    }
1398    /// Borrow the full [`Int32ValueView`] with its lifetime tied to `&self`.
1399    #[must_use]
1400    pub fn view(&self) -> &Int32ValueView<'_> {
1401        self.0.reborrow()
1402    }
1403    /// Convert to the owned message type.
1404    ///
1405    /// Infallible: this type's constructors wire-decode their
1406    /// buffer, and a view produced by wire decoding always
1407    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
1408    /// whose contract also governs handles converted from a raw
1409    /// [`::buffa::OwnedView`].
1410    #[must_use]
1411    pub fn to_owned_message(&self) -> super::super::Int32Value {
1412        self.0.to_owned_message()
1413    }
1414    /// The underlying bytes buffer.
1415    #[must_use]
1416    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
1417        self.0.bytes()
1418    }
1419    /// Consume the handle, returning the underlying bytes buffer.
1420    #[must_use]
1421    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
1422        self.0.into_bytes()
1423    }
1424    /// The int32 value.
1425    ///
1426    /// Field 1: `value`
1427    #[must_use]
1428    pub fn value(&self) -> i32 {
1429        self.0.reborrow().value
1430    }
1431}
1432impl ::core::convert::From<::buffa::OwnedView<Int32ValueView<'static>>>
1433for Int32ValueOwnedView {
1434    fn from(inner: ::buffa::OwnedView<Int32ValueView<'static>>) -> Self {
1435        Int32ValueOwnedView(inner)
1436    }
1437}
1438impl ::core::convert::From<Int32ValueOwnedView>
1439for ::buffa::OwnedView<Int32ValueView<'static>> {
1440    fn from(wrapper: Int32ValueOwnedView) -> Self {
1441        wrapper.0
1442    }
1443}
1444impl ::core::convert::AsRef<::buffa::OwnedView<Int32ValueView<'static>>>
1445for Int32ValueOwnedView {
1446    fn as_ref(&self) -> &::buffa::OwnedView<Int32ValueView<'static>> {
1447        &self.0
1448    }
1449}
1450impl ::buffa::HasMessageView for super::super::Int32Value {
1451    type View<'a> = Int32ValueView<'a>;
1452    type ViewHandle = Int32ValueOwnedView;
1453}
1454#[cfg(feature = "reflect")]
1455const _: () = {
1456    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for Int32ValueView<'a> {
1457        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
1458            super::super::__buffa::reflect::descriptor_pool()
1459                .message(Self::__buffa_reflect_message_index())
1460        }
1461        fn pool(
1462            &self,
1463        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
1464            super::super::__buffa::reflect::descriptor_pool()
1465        }
1466        fn get(
1467            &self,
1468            field: &::buffa_descriptor::FieldDescriptor,
1469        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1470            #[allow(unused_imports)]
1471            use ::buffa::Enumeration as _;
1472            match field.number() {
1473                1u32 => ::buffa_descriptor::reflect::ValueRef::I32(self.value),
1474                _ => {
1475                    ::core::debug_assert!(
1476                        false,
1477                        "field number {} is not a member of this view's reflect get()",
1478                        field.number(),
1479                    );
1480                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
1481                }
1482            }
1483        }
1484        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
1485            match field.number() {
1486                1u32 => self.value != 0,
1487                _ => false,
1488            }
1489        }
1490        fn for_each_set(
1491            &self,
1492            f: &mut dyn ::core::ops::FnMut(
1493                &::buffa_descriptor::FieldDescriptor,
1494                ::buffa_descriptor::reflect::ValueRef<'_>,
1495            ),
1496        ) {
1497            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
1498                self,
1499            );
1500            for fd in md.fields() {
1501                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
1502                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
1503                }
1504            }
1505        }
1506        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
1507            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
1508            ::buffa_descriptor::reflect::DynamicMessage::decode(
1509                    ::buffa::alloc::sync::Arc::clone(
1510                        super::super::__buffa::reflect::descriptor_pool(),
1511                    ),
1512                    Self::__buffa_reflect_message_index(),
1513                    &bytes,
1514                )
1515                .expect("view re-encodes to bytes decodable against its own descriptor")
1516        }
1517    }
1518    impl<'a> ::buffa_descriptor::reflect::ReflectElement for Int32ValueView<'a> {
1519        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1520            ::buffa_descriptor::reflect::ValueRef::Message(
1521                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
1522            )
1523        }
1524    }
1525    impl<'a> Int32ValueView<'a> {
1526        /// Memoized `MessageIndex` for this view's message type, resolved
1527        /// once against the package's embedded descriptor pool. An inherent
1528        /// associated fn (not a free fn) so sibling views in the same module
1529        /// do not collide.
1530        #[doc(hidden)]
1531        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
1532            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
1533            *IDX
1534                .get_or_init(|| {
1535                    super::super::__buffa::reflect::descriptor_pool()
1536                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
1537                        .expect(
1538                            "generated view type is registered in the embedded descriptor pool",
1539                        )
1540                })
1541        }
1542    }
1543};
1544/// Wrapper message for `uint32`.
1545///
1546/// The JSON representation for `UInt32Value` is JSON number.
1547#[derive(Clone, Debug, Default)]
1548pub struct UInt32ValueView<'a> {
1549    /// The uint32 value.
1550    ///
1551    /// Field 1: `value`
1552    pub value: u32,
1553    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1554}
1555impl<'a> ::buffa::MessageView<'a> for UInt32ValueView<'a> {
1556    type Owned = super::super::UInt32Value;
1557    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1558        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
1559        <Self as ::buffa::MessageView>::decode_view_ctx(
1560            buf,
1561            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
1562        )
1563    }
1564    fn decode_view_with_ctx(
1565        buf: &'a [u8],
1566        ctx: ::buffa::DecodeContext<'_>,
1567    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1568        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
1569    }
1570    #[inline]
1571    fn merge_view_field(
1572        &mut self,
1573        tag: ::buffa::encoding::Tag,
1574        cur: &'a [u8],
1575        before_tag: &'a [u8],
1576        ctx: ::buffa::DecodeContext<'_>,
1577    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
1578        let _ = ctx;
1579        #[allow(unused_variables)]
1580        let view = self;
1581        let mut cur = cur;
1582        match tag.field_number() {
1583            1u32 => {
1584                ::buffa::encoding::check_wire_type(
1585                    tag,
1586                    ::buffa::encoding::WireType::Varint,
1587                )?;
1588                view.value = ::buffa::types::decode_uint32(&mut cur)?;
1589            }
1590            _ => {
1591                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
1592                let span_len = before_tag.len() - cur.len();
1593                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
1594            }
1595        }
1596        ::core::result::Result::Ok(cur)
1597    }
1598    fn to_owned_message(
1599        &self,
1600    ) -> ::core::result::Result<super::super::UInt32Value, ::buffa::DecodeError> {
1601        self.to_owned_from_source(None)
1602    }
1603    #[allow(clippy::useless_conversion, clippy::needless_update)]
1604    fn to_owned_from_source(
1605        &self,
1606        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1607    ) -> ::core::result::Result<super::super::UInt32Value, ::buffa::DecodeError> {
1608        #[allow(unused_imports)]
1609        use ::buffa::alloc::string::ToString as _;
1610        let _ = __buffa_src;
1611        ::core::result::Result::Ok(super::super::UInt32Value {
1612            value: self.value,
1613            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
1614            ..::core::default::Default::default()
1615        })
1616    }
1617}
1618impl<'a> ::buffa::ViewEncode<'a> for UInt32ValueView<'a> {
1619    #[allow(clippy::needless_borrow, clippy::let_and_return)]
1620    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1621        #[allow(unused_imports)]
1622        use ::buffa::Enumeration as _;
1623        let mut size = 0u64;
1624        if self.value != 0u32 {
1625            size += 1u64 + ::buffa::types::uint32_encoded_len(self.value) as u64;
1626        }
1627        size += self.__buffa_unknown_fields.encoded_len() as u64;
1628        ::buffa::saturate_size(size)
1629    }
1630    #[allow(clippy::needless_borrow)]
1631    fn write_to(
1632        &self,
1633        _cache: &mut ::buffa::SizeCache,
1634        buf: &mut impl ::buffa::EncodeSink,
1635    ) {
1636        #[allow(unused_imports)]
1637        use ::buffa::Enumeration as _;
1638        if self.value != 0u32 {
1639            ::buffa::types::put_uint32_field(1u32, self.value, buf);
1640        }
1641        self.__buffa_unknown_fields.write_to(buf);
1642    }
1643}
1644impl<'a> ::buffa::MessageName for UInt32ValueView<'a> {
1645    const PACKAGE: &'static str = "google.protobuf";
1646    const NAME: &'static str = "UInt32Value";
1647    const FULL_NAME: &'static str = "google.protobuf.UInt32Value";
1648    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.UInt32Value";
1649}
1650::buffa::impl_default_view_instance!(UInt32ValueView);
1651::buffa::impl_view_reborrow!(UInt32ValueView);
1652/** Self-contained, `'static` owned view of a `UInt32Value` message.
1653
1654 Wraps [`::buffa::OwnedView`]`<`[`UInt32ValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
1655
1656 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UInt32ValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1657#[derive(Clone, Debug)]
1658pub struct UInt32ValueOwnedView(::buffa::OwnedView<UInt32ValueView<'static>>);
1659impl UInt32ValueOwnedView {
1660    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1661    ///
1662    /// The view borrows directly from the buffer's data; the buffer is
1663    /// retained inside the returned handle.
1664    ///
1665    /// # Errors
1666    ///
1667    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1668    /// protobuf data.
1669    pub fn decode(
1670        bytes: ::buffa::bytes::Bytes,
1671    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1672        ::core::result::Result::Ok(
1673            UInt32ValueOwnedView(::buffa::OwnedView::decode(bytes)?),
1674        )
1675    }
1676    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1677    /// max message size).
1678    ///
1679    /// # Errors
1680    ///
1681    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1682    /// exceeds the configured limits.
1683    pub fn decode_with_options(
1684        bytes: ::buffa::bytes::Bytes,
1685        opts: &::buffa::DecodeOptions,
1686    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1687        ::core::result::Result::Ok(
1688            UInt32ValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
1689        )
1690    }
1691    /// Build from an owned message via an encode → decode round-trip.
1692    ///
1693    /// # Errors
1694    ///
1695    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
1696    /// message's encoded size exceeds the 2 GiB protobuf limit, or
1697    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
1698    /// somehow invalid (should not happen for well-formed messages).
1699    pub fn from_owned(
1700        msg: &super::super::UInt32Value,
1701    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1702        ::core::result::Result::Ok(
1703            UInt32ValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
1704        )
1705    }
1706    /// Borrow the full [`UInt32ValueView`] with its lifetime tied to `&self`.
1707    #[must_use]
1708    pub fn view(&self) -> &UInt32ValueView<'_> {
1709        self.0.reborrow()
1710    }
1711    /// Convert to the owned message type.
1712    ///
1713    /// Infallible: this type's constructors wire-decode their
1714    /// buffer, and a view produced by wire decoding always
1715    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
1716    /// whose contract also governs handles converted from a raw
1717    /// [`::buffa::OwnedView`].
1718    #[must_use]
1719    pub fn to_owned_message(&self) -> super::super::UInt32Value {
1720        self.0.to_owned_message()
1721    }
1722    /// The underlying bytes buffer.
1723    #[must_use]
1724    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
1725        self.0.bytes()
1726    }
1727    /// Consume the handle, returning the underlying bytes buffer.
1728    #[must_use]
1729    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
1730        self.0.into_bytes()
1731    }
1732    /// The uint32 value.
1733    ///
1734    /// Field 1: `value`
1735    #[must_use]
1736    pub fn value(&self) -> u32 {
1737        self.0.reborrow().value
1738    }
1739}
1740impl ::core::convert::From<::buffa::OwnedView<UInt32ValueView<'static>>>
1741for UInt32ValueOwnedView {
1742    fn from(inner: ::buffa::OwnedView<UInt32ValueView<'static>>) -> Self {
1743        UInt32ValueOwnedView(inner)
1744    }
1745}
1746impl ::core::convert::From<UInt32ValueOwnedView>
1747for ::buffa::OwnedView<UInt32ValueView<'static>> {
1748    fn from(wrapper: UInt32ValueOwnedView) -> Self {
1749        wrapper.0
1750    }
1751}
1752impl ::core::convert::AsRef<::buffa::OwnedView<UInt32ValueView<'static>>>
1753for UInt32ValueOwnedView {
1754    fn as_ref(&self) -> &::buffa::OwnedView<UInt32ValueView<'static>> {
1755        &self.0
1756    }
1757}
1758impl ::buffa::HasMessageView for super::super::UInt32Value {
1759    type View<'a> = UInt32ValueView<'a>;
1760    type ViewHandle = UInt32ValueOwnedView;
1761}
1762#[cfg(feature = "reflect")]
1763const _: () = {
1764    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for UInt32ValueView<'a> {
1765        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
1766            super::super::__buffa::reflect::descriptor_pool()
1767                .message(Self::__buffa_reflect_message_index())
1768        }
1769        fn pool(
1770            &self,
1771        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
1772            super::super::__buffa::reflect::descriptor_pool()
1773        }
1774        fn get(
1775            &self,
1776            field: &::buffa_descriptor::FieldDescriptor,
1777        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1778            #[allow(unused_imports)]
1779            use ::buffa::Enumeration as _;
1780            match field.number() {
1781                1u32 => ::buffa_descriptor::reflect::ValueRef::U32(self.value),
1782                _ => {
1783                    ::core::debug_assert!(
1784                        false,
1785                        "field number {} is not a member of this view's reflect get()",
1786                        field.number(),
1787                    );
1788                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
1789                }
1790            }
1791        }
1792        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
1793            match field.number() {
1794                1u32 => self.value != 0,
1795                _ => false,
1796            }
1797        }
1798        fn for_each_set(
1799            &self,
1800            f: &mut dyn ::core::ops::FnMut(
1801                &::buffa_descriptor::FieldDescriptor,
1802                ::buffa_descriptor::reflect::ValueRef<'_>,
1803            ),
1804        ) {
1805            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
1806                self,
1807            );
1808            for fd in md.fields() {
1809                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
1810                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
1811                }
1812            }
1813        }
1814        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
1815            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
1816            ::buffa_descriptor::reflect::DynamicMessage::decode(
1817                    ::buffa::alloc::sync::Arc::clone(
1818                        super::super::__buffa::reflect::descriptor_pool(),
1819                    ),
1820                    Self::__buffa_reflect_message_index(),
1821                    &bytes,
1822                )
1823                .expect("view re-encodes to bytes decodable against its own descriptor")
1824        }
1825    }
1826    impl<'a> ::buffa_descriptor::reflect::ReflectElement for UInt32ValueView<'a> {
1827        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
1828            ::buffa_descriptor::reflect::ValueRef::Message(
1829                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
1830            )
1831        }
1832    }
1833    impl<'a> UInt32ValueView<'a> {
1834        /// Memoized `MessageIndex` for this view's message type, resolved
1835        /// once against the package's embedded descriptor pool. An inherent
1836        /// associated fn (not a free fn) so sibling views in the same module
1837        /// do not collide.
1838        #[doc(hidden)]
1839        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
1840            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
1841            *IDX
1842                .get_or_init(|| {
1843                    super::super::__buffa::reflect::descriptor_pool()
1844                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
1845                        .expect(
1846                            "generated view type is registered in the embedded descriptor pool",
1847                        )
1848                })
1849        }
1850    }
1851};
1852/// Wrapper message for `bool`.
1853///
1854/// The JSON representation for `BoolValue` is JSON `true` and `false`.
1855#[derive(Clone, Debug, Default)]
1856pub struct BoolValueView<'a> {
1857    /// The bool value.
1858    ///
1859    /// Field 1: `value`
1860    pub value: bool,
1861    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1862}
1863impl<'a> ::buffa::MessageView<'a> for BoolValueView<'a> {
1864    type Owned = super::super::BoolValue;
1865    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1866        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
1867        <Self as ::buffa::MessageView>::decode_view_ctx(
1868            buf,
1869            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
1870        )
1871    }
1872    fn decode_view_with_ctx(
1873        buf: &'a [u8],
1874        ctx: ::buffa::DecodeContext<'_>,
1875    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1876        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
1877    }
1878    #[inline]
1879    fn merge_view_field(
1880        &mut self,
1881        tag: ::buffa::encoding::Tag,
1882        cur: &'a [u8],
1883        before_tag: &'a [u8],
1884        ctx: ::buffa::DecodeContext<'_>,
1885    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
1886        let _ = ctx;
1887        #[allow(unused_variables)]
1888        let view = self;
1889        let mut cur = cur;
1890        match tag.field_number() {
1891            1u32 => {
1892                ::buffa::encoding::check_wire_type(
1893                    tag,
1894                    ::buffa::encoding::WireType::Varint,
1895                )?;
1896                view.value = ::buffa::types::decode_bool(&mut cur)?;
1897            }
1898            _ => {
1899                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
1900                let span_len = before_tag.len() - cur.len();
1901                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
1902            }
1903        }
1904        ::core::result::Result::Ok(cur)
1905    }
1906    fn to_owned_message(
1907        &self,
1908    ) -> ::core::result::Result<super::super::BoolValue, ::buffa::DecodeError> {
1909        self.to_owned_from_source(None)
1910    }
1911    #[allow(clippy::useless_conversion, clippy::needless_update)]
1912    fn to_owned_from_source(
1913        &self,
1914        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1915    ) -> ::core::result::Result<super::super::BoolValue, ::buffa::DecodeError> {
1916        #[allow(unused_imports)]
1917        use ::buffa::alloc::string::ToString as _;
1918        let _ = __buffa_src;
1919        ::core::result::Result::Ok(super::super::BoolValue {
1920            value: self.value,
1921            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
1922            ..::core::default::Default::default()
1923        })
1924    }
1925}
1926impl<'a> ::buffa::ViewEncode<'a> for BoolValueView<'a> {
1927    #[allow(clippy::needless_borrow, clippy::let_and_return)]
1928    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1929        #[allow(unused_imports)]
1930        use ::buffa::Enumeration as _;
1931        let mut size = 0u64;
1932        if self.value {
1933            size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
1934        }
1935        size += self.__buffa_unknown_fields.encoded_len() as u64;
1936        ::buffa::saturate_size(size)
1937    }
1938    #[allow(clippy::needless_borrow)]
1939    fn write_to(
1940        &self,
1941        _cache: &mut ::buffa::SizeCache,
1942        buf: &mut impl ::buffa::EncodeSink,
1943    ) {
1944        #[allow(unused_imports)]
1945        use ::buffa::Enumeration as _;
1946        if self.value {
1947            ::buffa::types::put_bool_field(1u32, self.value, buf);
1948        }
1949        self.__buffa_unknown_fields.write_to(buf);
1950    }
1951}
1952impl<'a> ::buffa::MessageName for BoolValueView<'a> {
1953    const PACKAGE: &'static str = "google.protobuf";
1954    const NAME: &'static str = "BoolValue";
1955    const FULL_NAME: &'static str = "google.protobuf.BoolValue";
1956    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BoolValue";
1957}
1958::buffa::impl_default_view_instance!(BoolValueView);
1959::buffa::impl_view_reborrow!(BoolValueView);
1960/** Self-contained, `'static` owned view of a `BoolValue` message.
1961
1962 Wraps [`::buffa::OwnedView`]`<`[`BoolValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
1963
1964 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BoolValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1965#[derive(Clone, Debug)]
1966pub struct BoolValueOwnedView(::buffa::OwnedView<BoolValueView<'static>>);
1967impl BoolValueOwnedView {
1968    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1969    ///
1970    /// The view borrows directly from the buffer's data; the buffer is
1971    /// retained inside the returned handle.
1972    ///
1973    /// # Errors
1974    ///
1975    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1976    /// protobuf data.
1977    pub fn decode(
1978        bytes: ::buffa::bytes::Bytes,
1979    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1980        ::core::result::Result::Ok(
1981            BoolValueOwnedView(::buffa::OwnedView::decode(bytes)?),
1982        )
1983    }
1984    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1985    /// max message size).
1986    ///
1987    /// # Errors
1988    ///
1989    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1990    /// exceeds the configured limits.
1991    pub fn decode_with_options(
1992        bytes: ::buffa::bytes::Bytes,
1993        opts: &::buffa::DecodeOptions,
1994    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1995        ::core::result::Result::Ok(
1996            BoolValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
1997        )
1998    }
1999    /// Build from an owned message via an encode → decode round-trip.
2000    ///
2001    /// # Errors
2002    ///
2003    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
2004    /// message's encoded size exceeds the 2 GiB protobuf limit, or
2005    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
2006    /// somehow invalid (should not happen for well-formed messages).
2007    pub fn from_owned(
2008        msg: &super::super::BoolValue,
2009    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2010        ::core::result::Result::Ok(
2011            BoolValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
2012        )
2013    }
2014    /// Borrow the full [`BoolValueView`] with its lifetime tied to `&self`.
2015    #[must_use]
2016    pub fn view(&self) -> &BoolValueView<'_> {
2017        self.0.reborrow()
2018    }
2019    /// Convert to the owned message type.
2020    ///
2021    /// Infallible: this type's constructors wire-decode their
2022    /// buffer, and a view produced by wire decoding always
2023    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
2024    /// whose contract also governs handles converted from a raw
2025    /// [`::buffa::OwnedView`].
2026    #[must_use]
2027    pub fn to_owned_message(&self) -> super::super::BoolValue {
2028        self.0.to_owned_message()
2029    }
2030    /// The underlying bytes buffer.
2031    #[must_use]
2032    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2033        self.0.bytes()
2034    }
2035    /// Consume the handle, returning the underlying bytes buffer.
2036    #[must_use]
2037    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2038        self.0.into_bytes()
2039    }
2040    /// The bool value.
2041    ///
2042    /// Field 1: `value`
2043    #[must_use]
2044    pub fn value(&self) -> bool {
2045        self.0.reborrow().value
2046    }
2047}
2048impl ::core::convert::From<::buffa::OwnedView<BoolValueView<'static>>>
2049for BoolValueOwnedView {
2050    fn from(inner: ::buffa::OwnedView<BoolValueView<'static>>) -> Self {
2051        BoolValueOwnedView(inner)
2052    }
2053}
2054impl ::core::convert::From<BoolValueOwnedView>
2055for ::buffa::OwnedView<BoolValueView<'static>> {
2056    fn from(wrapper: BoolValueOwnedView) -> Self {
2057        wrapper.0
2058    }
2059}
2060impl ::core::convert::AsRef<::buffa::OwnedView<BoolValueView<'static>>>
2061for BoolValueOwnedView {
2062    fn as_ref(&self) -> &::buffa::OwnedView<BoolValueView<'static>> {
2063        &self.0
2064    }
2065}
2066impl ::buffa::HasMessageView for super::super::BoolValue {
2067    type View<'a> = BoolValueView<'a>;
2068    type ViewHandle = BoolValueOwnedView;
2069}
2070#[cfg(feature = "reflect")]
2071const _: () = {
2072    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for BoolValueView<'a> {
2073        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
2074            super::super::__buffa::reflect::descriptor_pool()
2075                .message(Self::__buffa_reflect_message_index())
2076        }
2077        fn pool(
2078            &self,
2079        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
2080            super::super::__buffa::reflect::descriptor_pool()
2081        }
2082        fn get(
2083            &self,
2084            field: &::buffa_descriptor::FieldDescriptor,
2085        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
2086            #[allow(unused_imports)]
2087            use ::buffa::Enumeration as _;
2088            match field.number() {
2089                1u32 => ::buffa_descriptor::reflect::ValueRef::Bool(self.value),
2090                _ => {
2091                    ::core::debug_assert!(
2092                        false,
2093                        "field number {} is not a member of this view's reflect get()",
2094                        field.number(),
2095                    );
2096                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
2097                }
2098            }
2099        }
2100        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
2101            match field.number() {
2102                1u32 => self.value,
2103                _ => false,
2104            }
2105        }
2106        fn for_each_set(
2107            &self,
2108            f: &mut dyn ::core::ops::FnMut(
2109                &::buffa_descriptor::FieldDescriptor,
2110                ::buffa_descriptor::reflect::ValueRef<'_>,
2111            ),
2112        ) {
2113            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
2114                self,
2115            );
2116            for fd in md.fields() {
2117                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
2118                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
2119                }
2120            }
2121        }
2122        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
2123            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
2124            ::buffa_descriptor::reflect::DynamicMessage::decode(
2125                    ::buffa::alloc::sync::Arc::clone(
2126                        super::super::__buffa::reflect::descriptor_pool(),
2127                    ),
2128                    Self::__buffa_reflect_message_index(),
2129                    &bytes,
2130                )
2131                .expect("view re-encodes to bytes decodable against its own descriptor")
2132        }
2133    }
2134    impl<'a> ::buffa_descriptor::reflect::ReflectElement for BoolValueView<'a> {
2135        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
2136            ::buffa_descriptor::reflect::ValueRef::Message(
2137                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
2138            )
2139        }
2140    }
2141    impl<'a> BoolValueView<'a> {
2142        /// Memoized `MessageIndex` for this view's message type, resolved
2143        /// once against the package's embedded descriptor pool. An inherent
2144        /// associated fn (not a free fn) so sibling views in the same module
2145        /// do not collide.
2146        #[doc(hidden)]
2147        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
2148            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
2149            *IDX
2150                .get_or_init(|| {
2151                    super::super::__buffa::reflect::descriptor_pool()
2152                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
2153                        .expect(
2154                            "generated view type is registered in the embedded descriptor pool",
2155                        )
2156                })
2157        }
2158    }
2159};
2160/// Wrapper message for `string`.
2161///
2162/// The JSON representation for `StringValue` is JSON string.
2163#[derive(Clone, Debug, Default)]
2164pub struct StringValueView<'a> {
2165    /// The string value.
2166    ///
2167    /// Field 1: `value`
2168    pub value: &'a str,
2169    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2170}
2171impl<'a> ::buffa::MessageView<'a> for StringValueView<'a> {
2172    type Owned = super::super::StringValue;
2173    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2174        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
2175        <Self as ::buffa::MessageView>::decode_view_ctx(
2176            buf,
2177            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
2178        )
2179    }
2180    fn decode_view_with_ctx(
2181        buf: &'a [u8],
2182        ctx: ::buffa::DecodeContext<'_>,
2183    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2184        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
2185    }
2186    #[inline]
2187    fn merge_view_field(
2188        &mut self,
2189        tag: ::buffa::encoding::Tag,
2190        cur: &'a [u8],
2191        before_tag: &'a [u8],
2192        ctx: ::buffa::DecodeContext<'_>,
2193    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
2194        let _ = ctx;
2195        #[allow(unused_variables)]
2196        let view = self;
2197        let mut cur = cur;
2198        match tag.field_number() {
2199            1u32 => {
2200                ::buffa::encoding::check_wire_type(
2201                    tag,
2202                    ::buffa::encoding::WireType::LengthDelimited,
2203                )?;
2204                view.value = ::buffa::types::borrow_str(&mut cur)?;
2205            }
2206            _ => {
2207                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
2208                let span_len = before_tag.len() - cur.len();
2209                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
2210            }
2211        }
2212        ::core::result::Result::Ok(cur)
2213    }
2214    fn to_owned_message(
2215        &self,
2216    ) -> ::core::result::Result<super::super::StringValue, ::buffa::DecodeError> {
2217        self.to_owned_from_source(None)
2218    }
2219    #[allow(clippy::useless_conversion, clippy::needless_update)]
2220    fn to_owned_from_source(
2221        &self,
2222        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2223    ) -> ::core::result::Result<super::super::StringValue, ::buffa::DecodeError> {
2224        #[allow(unused_imports)]
2225        use ::buffa::alloc::string::ToString as _;
2226        let _ = __buffa_src;
2227        ::core::result::Result::Ok(super::super::StringValue {
2228            value: self.value.to_string(),
2229            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
2230            ..::core::default::Default::default()
2231        })
2232    }
2233}
2234impl<'a> ::buffa::ViewEncode<'a> for StringValueView<'a> {
2235    #[allow(clippy::needless_borrow, clippy::let_and_return)]
2236    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2237        #[allow(unused_imports)]
2238        use ::buffa::Enumeration as _;
2239        let mut size = 0u64;
2240        if !self.value.is_empty() {
2241            size += 1u64 + ::buffa::types::string_encoded_len(&self.value) as u64;
2242        }
2243        size += self.__buffa_unknown_fields.encoded_len() as u64;
2244        ::buffa::saturate_size(size)
2245    }
2246    #[allow(clippy::needless_borrow)]
2247    fn write_to(
2248        &self,
2249        _cache: &mut ::buffa::SizeCache,
2250        buf: &mut impl ::buffa::EncodeSink,
2251    ) {
2252        #[allow(unused_imports)]
2253        use ::buffa::Enumeration as _;
2254        if !self.value.is_empty() {
2255            ::buffa::types::put_string_field(1u32, &self.value, buf);
2256        }
2257        self.__buffa_unknown_fields.write_to(buf);
2258    }
2259}
2260impl<'a> ::buffa::MessageName for StringValueView<'a> {
2261    const PACKAGE: &'static str = "google.protobuf";
2262    const NAME: &'static str = "StringValue";
2263    const FULL_NAME: &'static str = "google.protobuf.StringValue";
2264    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.StringValue";
2265}
2266::buffa::impl_default_view_instance!(StringValueView);
2267::buffa::impl_view_reborrow!(StringValueView);
2268/** Self-contained, `'static` owned view of a `StringValue` message.
2269
2270 Wraps [`::buffa::OwnedView`]`<`[`StringValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
2271
2272 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`StringValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
2273#[derive(Clone, Debug)]
2274pub struct StringValueOwnedView(::buffa::OwnedView<StringValueView<'static>>);
2275impl StringValueOwnedView {
2276    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
2277    ///
2278    /// The view borrows directly from the buffer's data; the buffer is
2279    /// retained inside the returned handle.
2280    ///
2281    /// # Errors
2282    ///
2283    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
2284    /// protobuf data.
2285    pub fn decode(
2286        bytes: ::buffa::bytes::Bytes,
2287    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2288        ::core::result::Result::Ok(
2289            StringValueOwnedView(::buffa::OwnedView::decode(bytes)?),
2290        )
2291    }
2292    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
2293    /// max message size).
2294    ///
2295    /// # Errors
2296    ///
2297    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
2298    /// exceeds the configured limits.
2299    pub fn decode_with_options(
2300        bytes: ::buffa::bytes::Bytes,
2301        opts: &::buffa::DecodeOptions,
2302    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2303        ::core::result::Result::Ok(
2304            StringValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
2305        )
2306    }
2307    /// Build from an owned message via an encode → decode round-trip.
2308    ///
2309    /// # Errors
2310    ///
2311    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
2312    /// message's encoded size exceeds the 2 GiB protobuf limit, or
2313    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
2314    /// somehow invalid (should not happen for well-formed messages).
2315    pub fn from_owned(
2316        msg: &super::super::StringValue,
2317    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2318        ::core::result::Result::Ok(
2319            StringValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
2320        )
2321    }
2322    /// Borrow the full [`StringValueView`] with its lifetime tied to `&self`.
2323    #[must_use]
2324    pub fn view(&self) -> &StringValueView<'_> {
2325        self.0.reborrow()
2326    }
2327    /// Convert to the owned message type.
2328    ///
2329    /// Infallible: this type's constructors wire-decode their
2330    /// buffer, and a view produced by wire decoding always
2331    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
2332    /// whose contract also governs handles converted from a raw
2333    /// [`::buffa::OwnedView`].
2334    #[must_use]
2335    pub fn to_owned_message(&self) -> super::super::StringValue {
2336        self.0.to_owned_message()
2337    }
2338    /// The underlying bytes buffer.
2339    #[must_use]
2340    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2341        self.0.bytes()
2342    }
2343    /// Consume the handle, returning the underlying bytes buffer.
2344    #[must_use]
2345    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2346        self.0.into_bytes()
2347    }
2348    /// The string value.
2349    ///
2350    /// Field 1: `value`
2351    #[must_use]
2352    pub fn value(&self) -> &'_ str {
2353        self.0.reborrow().value
2354    }
2355}
2356impl ::core::convert::From<::buffa::OwnedView<StringValueView<'static>>>
2357for StringValueOwnedView {
2358    fn from(inner: ::buffa::OwnedView<StringValueView<'static>>) -> Self {
2359        StringValueOwnedView(inner)
2360    }
2361}
2362impl ::core::convert::From<StringValueOwnedView>
2363for ::buffa::OwnedView<StringValueView<'static>> {
2364    fn from(wrapper: StringValueOwnedView) -> Self {
2365        wrapper.0
2366    }
2367}
2368impl ::core::convert::AsRef<::buffa::OwnedView<StringValueView<'static>>>
2369for StringValueOwnedView {
2370    fn as_ref(&self) -> &::buffa::OwnedView<StringValueView<'static>> {
2371        &self.0
2372    }
2373}
2374impl ::buffa::HasMessageView for super::super::StringValue {
2375    type View<'a> = StringValueView<'a>;
2376    type ViewHandle = StringValueOwnedView;
2377}
2378#[cfg(feature = "reflect")]
2379const _: () = {
2380    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for StringValueView<'a> {
2381        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
2382            super::super::__buffa::reflect::descriptor_pool()
2383                .message(Self::__buffa_reflect_message_index())
2384        }
2385        fn pool(
2386            &self,
2387        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
2388            super::super::__buffa::reflect::descriptor_pool()
2389        }
2390        fn get(
2391            &self,
2392            field: &::buffa_descriptor::FieldDescriptor,
2393        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
2394            #[allow(unused_imports)]
2395            use ::buffa::Enumeration as _;
2396            match field.number() {
2397                1u32 => ::buffa_descriptor::reflect::ValueRef::String(self.value),
2398                _ => {
2399                    ::core::debug_assert!(
2400                        false,
2401                        "field number {} is not a member of this view's reflect get()",
2402                        field.number(),
2403                    );
2404                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
2405                }
2406            }
2407        }
2408        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
2409            match field.number() {
2410                1u32 => !self.value.is_empty(),
2411                _ => false,
2412            }
2413        }
2414        fn for_each_set(
2415            &self,
2416            f: &mut dyn ::core::ops::FnMut(
2417                &::buffa_descriptor::FieldDescriptor,
2418                ::buffa_descriptor::reflect::ValueRef<'_>,
2419            ),
2420        ) {
2421            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
2422                self,
2423            );
2424            for fd in md.fields() {
2425                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
2426                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
2427                }
2428            }
2429        }
2430        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
2431            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
2432            ::buffa_descriptor::reflect::DynamicMessage::decode(
2433                    ::buffa::alloc::sync::Arc::clone(
2434                        super::super::__buffa::reflect::descriptor_pool(),
2435                    ),
2436                    Self::__buffa_reflect_message_index(),
2437                    &bytes,
2438                )
2439                .expect("view re-encodes to bytes decodable against its own descriptor")
2440        }
2441    }
2442    impl<'a> ::buffa_descriptor::reflect::ReflectElement for StringValueView<'a> {
2443        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
2444            ::buffa_descriptor::reflect::ValueRef::Message(
2445                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
2446            )
2447        }
2448    }
2449    impl<'a> StringValueView<'a> {
2450        /// Memoized `MessageIndex` for this view's message type, resolved
2451        /// once against the package's embedded descriptor pool. An inherent
2452        /// associated fn (not a free fn) so sibling views in the same module
2453        /// do not collide.
2454        #[doc(hidden)]
2455        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
2456            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
2457            *IDX
2458                .get_or_init(|| {
2459                    super::super::__buffa::reflect::descriptor_pool()
2460                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
2461                        .expect(
2462                            "generated view type is registered in the embedded descriptor pool",
2463                        )
2464                })
2465        }
2466    }
2467};
2468/// Wrapper message for `bytes`.
2469///
2470/// The JSON representation for `BytesValue` is JSON string.
2471#[derive(Clone, Debug, Default)]
2472pub struct BytesValueView<'a> {
2473    /// The bytes value.
2474    ///
2475    /// Field 1: `value`
2476    pub value: &'a [u8],
2477    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2478}
2479impl<'a> ::buffa::MessageView<'a> for BytesValueView<'a> {
2480    type Owned = super::super::BytesValue;
2481    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2482        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
2483        <Self as ::buffa::MessageView>::decode_view_ctx(
2484            buf,
2485            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
2486        )
2487    }
2488    fn decode_view_with_ctx(
2489        buf: &'a [u8],
2490        ctx: ::buffa::DecodeContext<'_>,
2491    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2492        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
2493    }
2494    #[inline]
2495    fn merge_view_field(
2496        &mut self,
2497        tag: ::buffa::encoding::Tag,
2498        cur: &'a [u8],
2499        before_tag: &'a [u8],
2500        ctx: ::buffa::DecodeContext<'_>,
2501    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
2502        let _ = ctx;
2503        #[allow(unused_variables)]
2504        let view = self;
2505        let mut cur = cur;
2506        match tag.field_number() {
2507            1u32 => {
2508                ::buffa::encoding::check_wire_type(
2509                    tag,
2510                    ::buffa::encoding::WireType::LengthDelimited,
2511                )?;
2512                view.value = ::buffa::types::borrow_bytes(&mut cur)?;
2513            }
2514            _ => {
2515                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
2516                let span_len = before_tag.len() - cur.len();
2517                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
2518            }
2519        }
2520        ::core::result::Result::Ok(cur)
2521    }
2522    fn to_owned_message(
2523        &self,
2524    ) -> ::core::result::Result<super::super::BytesValue, ::buffa::DecodeError> {
2525        self.to_owned_from_source(None)
2526    }
2527    #[allow(clippy::useless_conversion, clippy::needless_update)]
2528    fn to_owned_from_source(
2529        &self,
2530        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2531    ) -> ::core::result::Result<super::super::BytesValue, ::buffa::DecodeError> {
2532        #[allow(unused_imports)]
2533        use ::buffa::alloc::string::ToString as _;
2534        let _ = __buffa_src;
2535        ::core::result::Result::Ok(super::super::BytesValue {
2536            value: (self.value).to_vec(),
2537            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
2538            ..::core::default::Default::default()
2539        })
2540    }
2541}
2542impl<'a> ::buffa::ViewEncode<'a> for BytesValueView<'a> {
2543    #[allow(clippy::needless_borrow, clippy::let_and_return)]
2544    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2545        #[allow(unused_imports)]
2546        use ::buffa::Enumeration as _;
2547        let mut size = 0u64;
2548        if !self.value.is_empty() {
2549            size += 1u64 + ::buffa::types::bytes_encoded_len(&self.value) as u64;
2550        }
2551        size += self.__buffa_unknown_fields.encoded_len() as u64;
2552        ::buffa::saturate_size(size)
2553    }
2554    #[allow(clippy::needless_borrow)]
2555    fn write_to(
2556        &self,
2557        _cache: &mut ::buffa::SizeCache,
2558        buf: &mut impl ::buffa::EncodeSink,
2559    ) {
2560        #[allow(unused_imports)]
2561        use ::buffa::Enumeration as _;
2562        if !self.value.is_empty() {
2563            ::buffa::types::put_shared_bytes_field(1u32, &self.value, buf);
2564        }
2565        self.__buffa_unknown_fields.write_to(buf);
2566    }
2567}
2568impl<'a> ::buffa::MessageName for BytesValueView<'a> {
2569    const PACKAGE: &'static str = "google.protobuf";
2570    const NAME: &'static str = "BytesValue";
2571    const FULL_NAME: &'static str = "google.protobuf.BytesValue";
2572    const TYPE_URL: &'static str = "type.googleapis.com/google.protobuf.BytesValue";
2573}
2574::buffa::impl_default_view_instance!(BytesValueView);
2575::buffa::impl_view_reborrow!(BytesValueView);
2576/** Self-contained, `'static` owned view of a `BytesValue` message.
2577
2578 Wraps [`::buffa::OwnedView`]`<`[`BytesValueView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
2579
2580 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BytesValueView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
2581#[derive(Clone, Debug)]
2582pub struct BytesValueOwnedView(::buffa::OwnedView<BytesValueView<'static>>);
2583impl BytesValueOwnedView {
2584    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
2585    ///
2586    /// The view borrows directly from the buffer's data; the buffer is
2587    /// retained inside the returned handle.
2588    ///
2589    /// # Errors
2590    ///
2591    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
2592    /// protobuf data.
2593    pub fn decode(
2594        bytes: ::buffa::bytes::Bytes,
2595    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2596        ::core::result::Result::Ok(
2597            BytesValueOwnedView(::buffa::OwnedView::decode(bytes)?),
2598        )
2599    }
2600    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
2601    /// max message size).
2602    ///
2603    /// # Errors
2604    ///
2605    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
2606    /// exceeds the configured limits.
2607    pub fn decode_with_options(
2608        bytes: ::buffa::bytes::Bytes,
2609        opts: &::buffa::DecodeOptions,
2610    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2611        ::core::result::Result::Ok(
2612            BytesValueOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
2613        )
2614    }
2615    /// Build from an owned message via an encode → decode round-trip.
2616    ///
2617    /// # Errors
2618    ///
2619    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
2620    /// message's encoded size exceeds the 2 GiB protobuf limit, or
2621    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
2622    /// somehow invalid (should not happen for well-formed messages).
2623    pub fn from_owned(
2624        msg: &super::super::BytesValue,
2625    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2626        ::core::result::Result::Ok(
2627            BytesValueOwnedView(::buffa::OwnedView::from_owned(msg)?),
2628        )
2629    }
2630    /// Borrow the full [`BytesValueView`] with its lifetime tied to `&self`.
2631    #[must_use]
2632    pub fn view(&self) -> &BytesValueView<'_> {
2633        self.0.reborrow()
2634    }
2635    /// Convert to the owned message type.
2636    ///
2637    /// Infallible: this type's constructors wire-decode their
2638    /// buffer, and a view produced by wire decoding always
2639    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
2640    /// whose contract also governs handles converted from a raw
2641    /// [`::buffa::OwnedView`].
2642    #[must_use]
2643    pub fn to_owned_message(&self) -> super::super::BytesValue {
2644        self.0.to_owned_message()
2645    }
2646    /// The underlying bytes buffer.
2647    #[must_use]
2648    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2649        self.0.bytes()
2650    }
2651    /// Consume the handle, returning the underlying bytes buffer.
2652    #[must_use]
2653    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2654        self.0.into_bytes()
2655    }
2656    /// The bytes value.
2657    ///
2658    /// Field 1: `value`
2659    #[must_use]
2660    pub fn value(&self) -> &'_ [u8] {
2661        self.0.reborrow().value
2662    }
2663}
2664impl ::core::convert::From<::buffa::OwnedView<BytesValueView<'static>>>
2665for BytesValueOwnedView {
2666    fn from(inner: ::buffa::OwnedView<BytesValueView<'static>>) -> Self {
2667        BytesValueOwnedView(inner)
2668    }
2669}
2670impl ::core::convert::From<BytesValueOwnedView>
2671for ::buffa::OwnedView<BytesValueView<'static>> {
2672    fn from(wrapper: BytesValueOwnedView) -> Self {
2673        wrapper.0
2674    }
2675}
2676impl ::core::convert::AsRef<::buffa::OwnedView<BytesValueView<'static>>>
2677for BytesValueOwnedView {
2678    fn as_ref(&self) -> &::buffa::OwnedView<BytesValueView<'static>> {
2679        &self.0
2680    }
2681}
2682impl ::buffa::HasMessageView for super::super::BytesValue {
2683    type View<'a> = BytesValueView<'a>;
2684    type ViewHandle = BytesValueOwnedView;
2685}
2686#[cfg(feature = "reflect")]
2687const _: () = {
2688    impl<'a> ::buffa_descriptor::reflect::ReflectMessage for BytesValueView<'a> {
2689        fn message_descriptor(&self) -> &::buffa_descriptor::MessageDescriptor {
2690            super::super::__buffa::reflect::descriptor_pool()
2691                .message(Self::__buffa_reflect_message_index())
2692        }
2693        fn pool(
2694            &self,
2695        ) -> &::buffa::alloc::sync::Arc<::buffa_descriptor::DescriptorPool> {
2696            super::super::__buffa::reflect::descriptor_pool()
2697        }
2698        fn get(
2699            &self,
2700            field: &::buffa_descriptor::FieldDescriptor,
2701        ) -> ::buffa_descriptor::reflect::ValueRef<'_> {
2702            #[allow(unused_imports)]
2703            use ::buffa::Enumeration as _;
2704            match field.number() {
2705                1u32 => ::buffa_descriptor::reflect::ValueRef::Bytes(self.value),
2706                _ => {
2707                    ::core::debug_assert!(
2708                        false,
2709                        "field number {} is not a member of this view's reflect get()",
2710                        field.number(),
2711                    );
2712                    ::buffa_descriptor::reflect::ValueRef::Bool(false)
2713                }
2714            }
2715        }
2716        fn has(&self, field: &::buffa_descriptor::FieldDescriptor) -> bool {
2717            match field.number() {
2718                1u32 => !self.value.is_empty(),
2719                _ => false,
2720            }
2721        }
2722        fn for_each_set(
2723            &self,
2724            f: &mut dyn ::core::ops::FnMut(
2725                &::buffa_descriptor::FieldDescriptor,
2726                ::buffa_descriptor::reflect::ValueRef<'_>,
2727            ),
2728        ) {
2729            let md = ::buffa_descriptor::reflect::ReflectMessage::message_descriptor(
2730                self,
2731            );
2732            for fd in md.fields() {
2733                if ::buffa_descriptor::reflect::ReflectMessage::has(self, fd) {
2734                    f(fd, ::buffa_descriptor::reflect::ReflectMessage::get(self, fd));
2735                }
2736            }
2737        }
2738        fn to_dynamic(&self) -> ::buffa_descriptor::reflect::DynamicMessage {
2739            let bytes = ::buffa::ViewEncode::encode_to_vec(self);
2740            ::buffa_descriptor::reflect::DynamicMessage::decode(
2741                    ::buffa::alloc::sync::Arc::clone(
2742                        super::super::__buffa::reflect::descriptor_pool(),
2743                    ),
2744                    Self::__buffa_reflect_message_index(),
2745                    &bytes,
2746                )
2747                .expect("view re-encodes to bytes decodable against its own descriptor")
2748        }
2749    }
2750    impl<'a> ::buffa_descriptor::reflect::ReflectElement for BytesValueView<'a> {
2751        fn as_value_ref(&self) -> ::buffa_descriptor::reflect::ValueRef<'_> {
2752            ::buffa_descriptor::reflect::ValueRef::Message(
2753                ::buffa_descriptor::reflect::ReflectCow::Borrowed(self),
2754            )
2755        }
2756    }
2757    impl<'a> BytesValueView<'a> {
2758        /// Memoized `MessageIndex` for this view's message type, resolved
2759        /// once against the package's embedded descriptor pool. An inherent
2760        /// associated fn (not a free fn) so sibling views in the same module
2761        /// do not collide.
2762        #[doc(hidden)]
2763        fn __buffa_reflect_message_index() -> ::buffa_descriptor::MessageIndex {
2764            static IDX: ::std::sync::OnceLock<::buffa_descriptor::MessageIndex> = ::std::sync::OnceLock::new();
2765            *IDX
2766                .get_or_init(|| {
2767                    super::super::__buffa::reflect::descriptor_pool()
2768                        .message_index(<Self as ::buffa::MessageName>::FULL_NAME)
2769                        .expect(
2770                            "generated view type is registered in the embedded descriptor pool",
2771                        )
2772                })
2773        }
2774    }
2775};