Skip to main content

sqlc_gen_sqlx/
plugin.codegen.__view.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2// source: plugin/codegen.proto
3
4#[derive(Clone, Debug, Default)]
5pub struct FileView<'a> {
6    /// Field 1: `name`
7    pub name: &'a str,
8    /// Field 2: `contents`
9    pub contents: &'a [u8],
10    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11}
12impl<'a> ::buffa::MessageView<'a> for FileView<'a> {
13    type Owned = super::super::File;
14    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
16        <Self as ::buffa::MessageView>::decode_view_ctx(
17            buf,
18            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
19        )
20    }
21    fn decode_view_with_ctx(
22        buf: &'a [u8],
23        ctx: ::buffa::DecodeContext<'_>,
24    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
25        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
26    }
27    #[inline]
28    fn merge_view_field(
29        &mut self,
30        tag: ::buffa::encoding::Tag,
31        cur: &'a [u8],
32        before_tag: &'a [u8],
33        ctx: ::buffa::DecodeContext<'_>,
34    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
35        let _ = ctx;
36        #[allow(unused_variables)]
37        let view = self;
38        let mut cur = cur;
39        match tag.field_number() {
40            1u32 => {
41                ::buffa::encoding::check_wire_type(
42                    tag,
43                    ::buffa::encoding::WireType::LengthDelimited,
44                )?;
45                view.name = ::buffa::types::borrow_str(&mut cur)?;
46            }
47            2u32 => {
48                ::buffa::encoding::check_wire_type(
49                    tag,
50                    ::buffa::encoding::WireType::LengthDelimited,
51                )?;
52                view.contents = ::buffa::types::borrow_bytes(&mut cur)?;
53            }
54            _ => {
55                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
56                let span_len = before_tag.len() - cur.len();
57                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
58            }
59        }
60        ::core::result::Result::Ok(cur)
61    }
62    fn to_owned_message(
63        &self,
64    ) -> ::core::result::Result<super::super::File, ::buffa::DecodeError> {
65        self.to_owned_from_source(None)
66    }
67    #[allow(clippy::useless_conversion, clippy::needless_update)]
68    fn to_owned_from_source(
69        &self,
70        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
71    ) -> ::core::result::Result<super::super::File, ::buffa::DecodeError> {
72        #[allow(unused_imports)]
73        use ::buffa::alloc::string::ToString as _;
74        let _ = __buffa_src;
75        ::core::result::Result::Ok(super::super::File {
76            name: self.name.to_string(),
77            contents: (self.contents).to_vec(),
78            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
79            ..::core::default::Default::default()
80        })
81    }
82}
83impl<'a> ::buffa::ViewEncode<'a> for FileView<'a> {
84    #[allow(clippy::needless_borrow, clippy::let_and_return)]
85    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
86        #[allow(unused_imports)]
87        use ::buffa::Enumeration as _;
88        let mut size = 0u64;
89        if !self.name.is_empty() {
90            size += 1u64 + ::buffa::types::string_encoded_len(&self.name) as u64;
91        }
92        if !self.contents.is_empty() {
93            size += 1u64 + ::buffa::types::bytes_encoded_len(&self.contents) as u64;
94        }
95        size += self.__buffa_unknown_fields.encoded_len() as u64;
96        ::buffa::saturate_size(size)
97    }
98    #[allow(clippy::needless_borrow)]
99    fn write_to(
100        &self,
101        _cache: &mut ::buffa::SizeCache,
102        buf: &mut impl ::buffa::EncodeSink,
103    ) {
104        #[allow(unused_imports)]
105        use ::buffa::Enumeration as _;
106        if !self.name.is_empty() {
107            ::buffa::types::put_string_field(1u32, &self.name, buf);
108        }
109        if !self.contents.is_empty() {
110            ::buffa::types::put_shared_bytes_field(2u32, &self.contents, buf);
111        }
112        self.__buffa_unknown_fields.write_to(buf);
113    }
114}
115impl<'a> ::buffa::MessageName for FileView<'a> {
116    const PACKAGE: &'static str = "plugin";
117    const NAME: &'static str = "File";
118    const FULL_NAME: &'static str = "plugin.File";
119    const TYPE_URL: &'static str = "type.googleapis.com/plugin.File";
120}
121::buffa::impl_default_view_instance!(FileView);
122::buffa::impl_view_reborrow!(FileView);
123/** Self-contained, `'static` owned view of a `File` message.
124
125 Wraps [`::buffa::OwnedView`]`<`[`FileView`]`<'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.
126
127 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FileView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
128#[derive(Clone, Debug)]
129pub struct FileOwnedView(::buffa::OwnedView<FileView<'static>>);
130impl FileOwnedView {
131    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
132    ///
133    /// The view borrows directly from the buffer's data; the buffer is
134    /// retained inside the returned handle.
135    ///
136    /// # Errors
137    ///
138    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
139    /// protobuf data.
140    pub fn decode(
141        bytes: ::buffa::bytes::Bytes,
142    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
143        ::core::result::Result::Ok(FileOwnedView(::buffa::OwnedView::decode(bytes)?))
144    }
145    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
146    /// max message size).
147    ///
148    /// # Errors
149    ///
150    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
151    /// exceeds the configured limits.
152    pub fn decode_with_options(
153        bytes: ::buffa::bytes::Bytes,
154        opts: &::buffa::DecodeOptions,
155    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
156        ::core::result::Result::Ok(
157            FileOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
158        )
159    }
160    /// Build from an owned message via an encode → decode round-trip.
161    ///
162    /// # Errors
163    ///
164    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
165    /// message's encoded size exceeds the 2 GiB protobuf limit, or
166    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
167    /// somehow invalid (should not happen for well-formed messages).
168    pub fn from_owned(
169        msg: &super::super::File,
170    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
171        ::core::result::Result::Ok(FileOwnedView(::buffa::OwnedView::from_owned(msg)?))
172    }
173    /// Borrow the full [`FileView`] with its lifetime tied to `&self`.
174    #[must_use]
175    pub fn view(&self) -> &FileView<'_> {
176        self.0.reborrow()
177    }
178    /// Convert to the owned message type.
179    ///
180    /// Infallible: this type's constructors wire-decode their
181    /// buffer, and a view produced by wire decoding always
182    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
183    /// whose contract also governs handles converted from a raw
184    /// [`::buffa::OwnedView`].
185    #[must_use]
186    pub fn to_owned_message(&self) -> super::super::File {
187        self.0.to_owned_message()
188    }
189    /// The underlying bytes buffer.
190    #[must_use]
191    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
192        self.0.bytes()
193    }
194    /// Consume the handle, returning the underlying bytes buffer.
195    #[must_use]
196    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
197        self.0.into_bytes()
198    }
199    /// Field 1: `name`
200    #[must_use]
201    pub fn name(&self) -> &'_ str {
202        self.0.reborrow().name
203    }
204    /// Field 2: `contents`
205    #[must_use]
206    pub fn contents(&self) -> &'_ [u8] {
207        self.0.reborrow().contents
208    }
209}
210impl ::core::convert::From<::buffa::OwnedView<FileView<'static>>> for FileOwnedView {
211    fn from(inner: ::buffa::OwnedView<FileView<'static>>) -> Self {
212        FileOwnedView(inner)
213    }
214}
215impl ::core::convert::From<FileOwnedView> for ::buffa::OwnedView<FileView<'static>> {
216    fn from(wrapper: FileOwnedView) -> Self {
217        wrapper.0
218    }
219}
220impl ::core::convert::AsRef<::buffa::OwnedView<FileView<'static>>> for FileOwnedView {
221    fn as_ref(&self) -> &::buffa::OwnedView<FileView<'static>> {
222        &self.0
223    }
224}
225impl ::buffa::HasMessageView for super::super::File {
226    type View<'a> = FileView<'a>;
227    type ViewHandle = FileOwnedView;
228}
229#[derive(Clone, Debug, Default)]
230pub struct SettingsView<'a> {
231    /// Field 1: `version`
232    pub version: &'a str,
233    /// Field 2: `engine`
234    pub engine: &'a str,
235    /// Field 3: `schema`
236    pub schema: ::buffa::RepeatedView<'a, &'a str>,
237    /// Field 4: `queries`
238    pub queries: ::buffa::RepeatedView<'a, &'a str>,
239    /// Field 12: `codegen`
240    pub codegen: ::buffa::MessageFieldView<super::super::__buffa::view::CodegenView<'a>>,
241    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
242}
243impl<'a> ::buffa::MessageView<'a> for SettingsView<'a> {
244    type Owned = super::super::Settings;
245    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
246        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
247        <Self as ::buffa::MessageView>::decode_view_ctx(
248            buf,
249            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
250        )
251    }
252    fn decode_view_with_ctx(
253        buf: &'a [u8],
254        ctx: ::buffa::DecodeContext<'_>,
255    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
256        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
257    }
258    #[inline]
259    fn merge_view_field(
260        &mut self,
261        tag: ::buffa::encoding::Tag,
262        cur: &'a [u8],
263        before_tag: &'a [u8],
264        ctx: ::buffa::DecodeContext<'_>,
265    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
266        let _ = ctx;
267        #[allow(unused_variables)]
268        let view = self;
269        let mut cur = cur;
270        match tag.field_number() {
271            1u32 => {
272                ::buffa::encoding::check_wire_type(
273                    tag,
274                    ::buffa::encoding::WireType::LengthDelimited,
275                )?;
276                view.version = ::buffa::types::borrow_str(&mut cur)?;
277            }
278            2u32 => {
279                ::buffa::encoding::check_wire_type(
280                    tag,
281                    ::buffa::encoding::WireType::LengthDelimited,
282                )?;
283                view.engine = ::buffa::types::borrow_str(&mut cur)?;
284            }
285            12u32 => {
286                ::buffa::encoding::check_wire_type(
287                    tag,
288                    ::buffa::encoding::WireType::LengthDelimited,
289                )?;
290                let __sub_ctx = ctx.descend()?;
291                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
292                match view.codegen.as_mut() {
293                    Some(existing) => {
294                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
295                    }
296                    None => {
297                        view.codegen = ::buffa::MessageFieldView::set(
298                            <super::super::__buffa::view::CodegenView as ::buffa::MessageView>::decode_view_ctx(
299                                sub,
300                                __sub_ctx,
301                            )?,
302                        );
303                    }
304                }
305            }
306            3u32 => {
307                ::buffa::encoding::check_wire_type(
308                    tag,
309                    ::buffa::encoding::WireType::LengthDelimited,
310                )?;
311                let __elem = ::buffa::types::borrow_str(&mut cur)?;
312                ctx.register_element_memory(
313                    ::buffa::__private::element_footprint(&__elem),
314                )?;
315                view.schema.push(__elem);
316            }
317            4u32 => {
318                ::buffa::encoding::check_wire_type(
319                    tag,
320                    ::buffa::encoding::WireType::LengthDelimited,
321                )?;
322                let __elem = ::buffa::types::borrow_str(&mut cur)?;
323                ctx.register_element_memory(
324                    ::buffa::__private::element_footprint(&__elem),
325                )?;
326                view.queries.push(__elem);
327            }
328            _ => {
329                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
330                let span_len = before_tag.len() - cur.len();
331                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
332            }
333        }
334        ::core::result::Result::Ok(cur)
335    }
336    fn to_owned_message(
337        &self,
338    ) -> ::core::result::Result<super::super::Settings, ::buffa::DecodeError> {
339        self.to_owned_from_source(None)
340    }
341    #[allow(clippy::useless_conversion, clippy::needless_update)]
342    fn to_owned_from_source(
343        &self,
344        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
345    ) -> ::core::result::Result<super::super::Settings, ::buffa::DecodeError> {
346        #[allow(unused_imports)]
347        use ::buffa::alloc::string::ToString as _;
348        let _ = __buffa_src;
349        ::core::result::Result::Ok(super::super::Settings {
350            version: self.version.to_string(),
351            engine: self.engine.to_string(),
352            schema: self.schema.iter().map(|s| s.to_string()).collect(),
353            queries: self.queries.iter().map(|s| s.to_string()).collect(),
354            codegen: match self.codegen.as_option() {
355                Some(v) => {
356                    ::buffa::MessageField::<
357                        super::super::Codegen,
358                        ::buffa::Inline<super::super::Codegen>,
359                    >::some(v.to_owned_from_source(__buffa_src)?)
360                }
361                None => ::buffa::MessageField::none(),
362            },
363            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
364            ..::core::default::Default::default()
365        })
366    }
367}
368impl<'a> ::buffa::ViewEncode<'a> for SettingsView<'a> {
369    #[allow(clippy::needless_borrow, clippy::let_and_return)]
370    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
371        #[allow(unused_imports)]
372        use ::buffa::Enumeration as _;
373        let mut size = 0u64;
374        if !self.version.is_empty() {
375            size += 1u64 + ::buffa::types::string_encoded_len(&self.version) as u64;
376        }
377        if !self.engine.is_empty() {
378            size += 1u64 + ::buffa::types::string_encoded_len(&self.engine) as u64;
379        }
380        for v in &self.schema {
381            size += 1u64 + ::buffa::types::string_encoded_len(v) as u64;
382        }
383        for v in &self.queries {
384            size += 1u64 + ::buffa::types::string_encoded_len(v) as u64;
385        }
386        if self.codegen.is_set() {
387            let __slot = __cache.reserve();
388            let inner_size = self.codegen.compute_size(__cache);
389            __cache.set(__slot, inner_size);
390            size
391                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
392                    + inner_size as u64;
393        }
394        size += self.__buffa_unknown_fields.encoded_len() as u64;
395        ::buffa::saturate_size(size)
396    }
397    #[allow(clippy::needless_borrow)]
398    fn write_to(
399        &self,
400        __cache: &mut ::buffa::SizeCache,
401        buf: &mut impl ::buffa::EncodeSink,
402    ) {
403        #[allow(unused_imports)]
404        use ::buffa::Enumeration as _;
405        if !self.version.is_empty() {
406            ::buffa::types::put_string_field(1u32, &self.version, buf);
407        }
408        if !self.engine.is_empty() {
409            ::buffa::types::put_string_field(2u32, &self.engine, buf);
410        }
411        for v in &self.schema {
412            ::buffa::types::put_string_field(3u32, v, buf);
413        }
414        for v in &self.queries {
415            ::buffa::types::put_string_field(4u32, v, buf);
416        }
417        if self.codegen.is_set() {
418            ::buffa::types::put_len_delimited_header(
419                12u32,
420                u64::from(__cache.consume_next()),
421                buf,
422            );
423            self.codegen.write_to(__cache, buf);
424        }
425        self.__buffa_unknown_fields.write_to(buf);
426    }
427}
428impl<'a> ::buffa::MessageName for SettingsView<'a> {
429    const PACKAGE: &'static str = "plugin";
430    const NAME: &'static str = "Settings";
431    const FULL_NAME: &'static str = "plugin.Settings";
432    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Settings";
433}
434::buffa::impl_default_view_instance!(SettingsView);
435::buffa::impl_view_reborrow!(SettingsView);
436/** Self-contained, `'static` owned view of a `Settings` message.
437
438 Wraps [`::buffa::OwnedView`]`<`[`SettingsView`]`<'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.
439
440 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`SettingsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
441#[derive(Clone, Debug)]
442pub struct SettingsOwnedView(::buffa::OwnedView<SettingsView<'static>>);
443impl SettingsOwnedView {
444    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
445    ///
446    /// The view borrows directly from the buffer's data; the buffer is
447    /// retained inside the returned handle.
448    ///
449    /// # Errors
450    ///
451    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
452    /// protobuf data.
453    pub fn decode(
454        bytes: ::buffa::bytes::Bytes,
455    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
456        ::core::result::Result::Ok(SettingsOwnedView(::buffa::OwnedView::decode(bytes)?))
457    }
458    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
459    /// max message size).
460    ///
461    /// # Errors
462    ///
463    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
464    /// exceeds the configured limits.
465    pub fn decode_with_options(
466        bytes: ::buffa::bytes::Bytes,
467        opts: &::buffa::DecodeOptions,
468    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
469        ::core::result::Result::Ok(
470            SettingsOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
471        )
472    }
473    /// Build from an owned message via an encode → decode round-trip.
474    ///
475    /// # Errors
476    ///
477    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
478    /// message's encoded size exceeds the 2 GiB protobuf limit, or
479    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
480    /// somehow invalid (should not happen for well-formed messages).
481    pub fn from_owned(
482        msg: &super::super::Settings,
483    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
484        ::core::result::Result::Ok(
485            SettingsOwnedView(::buffa::OwnedView::from_owned(msg)?),
486        )
487    }
488    /// Borrow the full [`SettingsView`] with its lifetime tied to `&self`.
489    #[must_use]
490    pub fn view(&self) -> &SettingsView<'_> {
491        self.0.reborrow()
492    }
493    /// Convert to the owned message type.
494    ///
495    /// Infallible: this type's constructors wire-decode their
496    /// buffer, and a view produced by wire decoding always
497    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
498    /// whose contract also governs handles converted from a raw
499    /// [`::buffa::OwnedView`].
500    #[must_use]
501    pub fn to_owned_message(&self) -> super::super::Settings {
502        self.0.to_owned_message()
503    }
504    /// The underlying bytes buffer.
505    #[must_use]
506    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
507        self.0.bytes()
508    }
509    /// Consume the handle, returning the underlying bytes buffer.
510    #[must_use]
511    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
512        self.0.into_bytes()
513    }
514    /// Field 1: `version`
515    #[must_use]
516    pub fn version(&self) -> &'_ str {
517        self.0.reborrow().version
518    }
519    /// Field 2: `engine`
520    #[must_use]
521    pub fn engine(&self) -> &'_ str {
522        self.0.reborrow().engine
523    }
524    /// Field 3: `schema`
525    #[must_use]
526    pub fn schema(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
527        &self.0.reborrow().schema
528    }
529    /// Field 4: `queries`
530    #[must_use]
531    pub fn queries(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
532        &self.0.reborrow().queries
533    }
534    /// Field 12: `codegen`
535    #[must_use]
536    pub fn codegen(
537        &self,
538    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::CodegenView<'_>> {
539        &self.0.reborrow().codegen
540    }
541}
542impl ::core::convert::From<::buffa::OwnedView<SettingsView<'static>>>
543for SettingsOwnedView {
544    fn from(inner: ::buffa::OwnedView<SettingsView<'static>>) -> Self {
545        SettingsOwnedView(inner)
546    }
547}
548impl ::core::convert::From<SettingsOwnedView>
549for ::buffa::OwnedView<SettingsView<'static>> {
550    fn from(wrapper: SettingsOwnedView) -> Self {
551        wrapper.0
552    }
553}
554impl ::core::convert::AsRef<::buffa::OwnedView<SettingsView<'static>>>
555for SettingsOwnedView {
556    fn as_ref(&self) -> &::buffa::OwnedView<SettingsView<'static>> {
557        &self.0
558    }
559}
560impl ::buffa::HasMessageView for super::super::Settings {
561    type View<'a> = SettingsView<'a>;
562    type ViewHandle = SettingsOwnedView;
563}
564#[derive(Clone, Debug, Default)]
565pub struct CodegenView<'a> {
566    /// Field 1: `out`
567    pub out: &'a str,
568    /// Field 2: `plugin`
569    pub plugin: &'a str,
570    /// Field 3: `options`
571    pub options: &'a [u8],
572    /// Field 4: `env`
573    pub env: ::buffa::RepeatedView<'a, &'a str>,
574    /// Field 5: `process`
575    pub process: ::buffa::MessageFieldView<
576        super::super::__buffa::view::codegen::ProcessView<'a>,
577    >,
578    /// Field 6: `wasm`
579    pub wasm: ::buffa::MessageFieldView<
580        super::super::__buffa::view::codegen::WASMView<'a>,
581    >,
582    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
583}
584impl<'a> ::buffa::MessageView<'a> for CodegenView<'a> {
585    type Owned = super::super::Codegen;
586    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
587        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
588        <Self as ::buffa::MessageView>::decode_view_ctx(
589            buf,
590            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
591        )
592    }
593    fn decode_view_with_ctx(
594        buf: &'a [u8],
595        ctx: ::buffa::DecodeContext<'_>,
596    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
597        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
598    }
599    #[inline]
600    fn merge_view_field(
601        &mut self,
602        tag: ::buffa::encoding::Tag,
603        cur: &'a [u8],
604        before_tag: &'a [u8],
605        ctx: ::buffa::DecodeContext<'_>,
606    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
607        let _ = ctx;
608        #[allow(unused_variables)]
609        let view = self;
610        let mut cur = cur;
611        match tag.field_number() {
612            1u32 => {
613                ::buffa::encoding::check_wire_type(
614                    tag,
615                    ::buffa::encoding::WireType::LengthDelimited,
616                )?;
617                view.out = ::buffa::types::borrow_str(&mut cur)?;
618            }
619            2u32 => {
620                ::buffa::encoding::check_wire_type(
621                    tag,
622                    ::buffa::encoding::WireType::LengthDelimited,
623                )?;
624                view.plugin = ::buffa::types::borrow_str(&mut cur)?;
625            }
626            3u32 => {
627                ::buffa::encoding::check_wire_type(
628                    tag,
629                    ::buffa::encoding::WireType::LengthDelimited,
630                )?;
631                view.options = ::buffa::types::borrow_bytes(&mut cur)?;
632            }
633            5u32 => {
634                ::buffa::encoding::check_wire_type(
635                    tag,
636                    ::buffa::encoding::WireType::LengthDelimited,
637                )?;
638                let __sub_ctx = ctx.descend()?;
639                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
640                match view.process.as_mut() {
641                    Some(existing) => {
642                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
643                    }
644                    None => {
645                        view.process = ::buffa::MessageFieldView::set(
646                            <super::super::__buffa::view::codegen::ProcessView as ::buffa::MessageView>::decode_view_ctx(
647                                sub,
648                                __sub_ctx,
649                            )?,
650                        );
651                    }
652                }
653            }
654            6u32 => {
655                ::buffa::encoding::check_wire_type(
656                    tag,
657                    ::buffa::encoding::WireType::LengthDelimited,
658                )?;
659                let __sub_ctx = ctx.descend()?;
660                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
661                match view.wasm.as_mut() {
662                    Some(existing) => {
663                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
664                    }
665                    None => {
666                        view.wasm = ::buffa::MessageFieldView::set(
667                            <super::super::__buffa::view::codegen::WASMView as ::buffa::MessageView>::decode_view_ctx(
668                                sub,
669                                __sub_ctx,
670                            )?,
671                        );
672                    }
673                }
674            }
675            4u32 => {
676                ::buffa::encoding::check_wire_type(
677                    tag,
678                    ::buffa::encoding::WireType::LengthDelimited,
679                )?;
680                let __elem = ::buffa::types::borrow_str(&mut cur)?;
681                ctx.register_element_memory(
682                    ::buffa::__private::element_footprint(&__elem),
683                )?;
684                view.env.push(__elem);
685            }
686            _ => {
687                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
688                let span_len = before_tag.len() - cur.len();
689                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
690            }
691        }
692        ::core::result::Result::Ok(cur)
693    }
694    fn to_owned_message(
695        &self,
696    ) -> ::core::result::Result<super::super::Codegen, ::buffa::DecodeError> {
697        self.to_owned_from_source(None)
698    }
699    #[allow(clippy::useless_conversion, clippy::needless_update)]
700    fn to_owned_from_source(
701        &self,
702        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
703    ) -> ::core::result::Result<super::super::Codegen, ::buffa::DecodeError> {
704        #[allow(unused_imports)]
705        use ::buffa::alloc::string::ToString as _;
706        let _ = __buffa_src;
707        ::core::result::Result::Ok(super::super::Codegen {
708            out: self.out.to_string(),
709            plugin: self.plugin.to_string(),
710            options: (self.options).to_vec(),
711            env: self.env.iter().map(|s| s.to_string()).collect(),
712            process: match self.process.as_option() {
713                Some(v) => {
714                    ::buffa::MessageField::<
715                        super::super::codegen::Process,
716                        ::buffa::Inline<super::super::codegen::Process>,
717                    >::some(v.to_owned_from_source(__buffa_src)?)
718                }
719                None => ::buffa::MessageField::none(),
720            },
721            wasm: match self.wasm.as_option() {
722                Some(v) => {
723                    ::buffa::MessageField::<
724                        super::super::codegen::WASM,
725                        ::buffa::Inline<super::super::codegen::WASM>,
726                    >::some(v.to_owned_from_source(__buffa_src)?)
727                }
728                None => ::buffa::MessageField::none(),
729            },
730            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
731            ..::core::default::Default::default()
732        })
733    }
734}
735impl<'a> ::buffa::ViewEncode<'a> for CodegenView<'a> {
736    #[allow(clippy::needless_borrow, clippy::let_and_return)]
737    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
738        #[allow(unused_imports)]
739        use ::buffa::Enumeration as _;
740        let mut size = 0u64;
741        if !self.out.is_empty() {
742            size += 1u64 + ::buffa::types::string_encoded_len(&self.out) as u64;
743        }
744        if !self.plugin.is_empty() {
745            size += 1u64 + ::buffa::types::string_encoded_len(&self.plugin) as u64;
746        }
747        if !self.options.is_empty() {
748            size += 1u64 + ::buffa::types::bytes_encoded_len(&self.options) as u64;
749        }
750        for v in &self.env {
751            size += 1u64 + ::buffa::types::string_encoded_len(v) as u64;
752        }
753        if self.process.is_set() {
754            let __slot = __cache.reserve();
755            let inner_size = self.process.compute_size(__cache);
756            __cache.set(__slot, inner_size);
757            size
758                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
759                    + inner_size as u64;
760        }
761        if self.wasm.is_set() {
762            let __slot = __cache.reserve();
763            let inner_size = self.wasm.compute_size(__cache);
764            __cache.set(__slot, inner_size);
765            size
766                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
767                    + inner_size as u64;
768        }
769        size += self.__buffa_unknown_fields.encoded_len() as u64;
770        ::buffa::saturate_size(size)
771    }
772    #[allow(clippy::needless_borrow)]
773    fn write_to(
774        &self,
775        __cache: &mut ::buffa::SizeCache,
776        buf: &mut impl ::buffa::EncodeSink,
777    ) {
778        #[allow(unused_imports)]
779        use ::buffa::Enumeration as _;
780        if !self.out.is_empty() {
781            ::buffa::types::put_string_field(1u32, &self.out, buf);
782        }
783        if !self.plugin.is_empty() {
784            ::buffa::types::put_string_field(2u32, &self.plugin, buf);
785        }
786        if !self.options.is_empty() {
787            ::buffa::types::put_shared_bytes_field(3u32, &self.options, buf);
788        }
789        for v in &self.env {
790            ::buffa::types::put_string_field(4u32, v, buf);
791        }
792        if self.process.is_set() {
793            ::buffa::types::put_len_delimited_header(
794                5u32,
795                u64::from(__cache.consume_next()),
796                buf,
797            );
798            self.process.write_to(__cache, buf);
799        }
800        if self.wasm.is_set() {
801            ::buffa::types::put_len_delimited_header(
802                6u32,
803                u64::from(__cache.consume_next()),
804                buf,
805            );
806            self.wasm.write_to(__cache, buf);
807        }
808        self.__buffa_unknown_fields.write_to(buf);
809    }
810}
811impl<'a> ::buffa::MessageName for CodegenView<'a> {
812    const PACKAGE: &'static str = "plugin";
813    const NAME: &'static str = "Codegen";
814    const FULL_NAME: &'static str = "plugin.Codegen";
815    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Codegen";
816}
817::buffa::impl_default_view_instance!(CodegenView);
818::buffa::impl_view_reborrow!(CodegenView);
819/** Self-contained, `'static` owned view of a `Codegen` message.
820
821 Wraps [`::buffa::OwnedView`]`<`[`CodegenView`]`<'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.
822
823 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CodegenView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
824#[derive(Clone, Debug)]
825pub struct CodegenOwnedView(::buffa::OwnedView<CodegenView<'static>>);
826impl CodegenOwnedView {
827    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
828    ///
829    /// The view borrows directly from the buffer's data; the buffer is
830    /// retained inside the returned handle.
831    ///
832    /// # Errors
833    ///
834    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
835    /// protobuf data.
836    pub fn decode(
837        bytes: ::buffa::bytes::Bytes,
838    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
839        ::core::result::Result::Ok(CodegenOwnedView(::buffa::OwnedView::decode(bytes)?))
840    }
841    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
842    /// max message size).
843    ///
844    /// # Errors
845    ///
846    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
847    /// exceeds the configured limits.
848    pub fn decode_with_options(
849        bytes: ::buffa::bytes::Bytes,
850        opts: &::buffa::DecodeOptions,
851    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
852        ::core::result::Result::Ok(
853            CodegenOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
854        )
855    }
856    /// Build from an owned message via an encode → decode round-trip.
857    ///
858    /// # Errors
859    ///
860    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
861    /// message's encoded size exceeds the 2 GiB protobuf limit, or
862    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
863    /// somehow invalid (should not happen for well-formed messages).
864    pub fn from_owned(
865        msg: &super::super::Codegen,
866    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
867        ::core::result::Result::Ok(
868            CodegenOwnedView(::buffa::OwnedView::from_owned(msg)?),
869        )
870    }
871    /// Borrow the full [`CodegenView`] with its lifetime tied to `&self`.
872    #[must_use]
873    pub fn view(&self) -> &CodegenView<'_> {
874        self.0.reborrow()
875    }
876    /// Convert to the owned message type.
877    ///
878    /// Infallible: this type's constructors wire-decode their
879    /// buffer, and a view produced by wire decoding always
880    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
881    /// whose contract also governs handles converted from a raw
882    /// [`::buffa::OwnedView`].
883    #[must_use]
884    pub fn to_owned_message(&self) -> super::super::Codegen {
885        self.0.to_owned_message()
886    }
887    /// The underlying bytes buffer.
888    #[must_use]
889    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
890        self.0.bytes()
891    }
892    /// Consume the handle, returning the underlying bytes buffer.
893    #[must_use]
894    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
895        self.0.into_bytes()
896    }
897    /// Field 1: `out`
898    #[must_use]
899    pub fn out(&self) -> &'_ str {
900        self.0.reborrow().out
901    }
902    /// Field 2: `plugin`
903    #[must_use]
904    pub fn plugin(&self) -> &'_ str {
905        self.0.reborrow().plugin
906    }
907    /// Field 3: `options`
908    #[must_use]
909    pub fn options(&self) -> &'_ [u8] {
910        self.0.reborrow().options
911    }
912    /// Field 4: `env`
913    #[must_use]
914    pub fn env(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
915        &self.0.reborrow().env
916    }
917    /// Field 5: `process`
918    #[must_use]
919    pub fn process(
920        &self,
921    ) -> &::buffa::MessageFieldView<
922        super::super::__buffa::view::codegen::ProcessView<'_>,
923    > {
924        &self.0.reborrow().process
925    }
926    /// Field 6: `wasm`
927    #[must_use]
928    pub fn wasm(
929        &self,
930    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::codegen::WASMView<'_>> {
931        &self.0.reborrow().wasm
932    }
933}
934impl ::core::convert::From<::buffa::OwnedView<CodegenView<'static>>>
935for CodegenOwnedView {
936    fn from(inner: ::buffa::OwnedView<CodegenView<'static>>) -> Self {
937        CodegenOwnedView(inner)
938    }
939}
940impl ::core::convert::From<CodegenOwnedView>
941for ::buffa::OwnedView<CodegenView<'static>> {
942    fn from(wrapper: CodegenOwnedView) -> Self {
943        wrapper.0
944    }
945}
946impl ::core::convert::AsRef<::buffa::OwnedView<CodegenView<'static>>>
947for CodegenOwnedView {
948    fn as_ref(&self) -> &::buffa::OwnedView<CodegenView<'static>> {
949        &self.0
950    }
951}
952impl ::buffa::HasMessageView for super::super::Codegen {
953    type View<'a> = CodegenView<'a>;
954    type ViewHandle = CodegenOwnedView;
955}
956pub mod codegen {
957    #[allow(unused_imports)]
958    use super::*;
959    #[derive(Clone, Debug, Default)]
960    pub struct ProcessView<'a> {
961        /// Field 1: `cmd`
962        pub cmd: &'a str,
963        pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
964    }
965    impl<'a> ::buffa::MessageView<'a> for ProcessView<'a> {
966        type Owned = super::super::super::codegen::Process;
967        fn decode_view(
968            buf: &'a [u8],
969        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
970            let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
971            <Self as ::buffa::MessageView>::decode_view_ctx(
972                buf,
973                ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
974            )
975        }
976        fn decode_view_with_ctx(
977            buf: &'a [u8],
978            ctx: ::buffa::DecodeContext<'_>,
979        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
980            <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
981        }
982        #[inline]
983        fn merge_view_field(
984            &mut self,
985            tag: ::buffa::encoding::Tag,
986            cur: &'a [u8],
987            before_tag: &'a [u8],
988            ctx: ::buffa::DecodeContext<'_>,
989        ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
990            let _ = ctx;
991            #[allow(unused_variables)]
992            let view = self;
993            let mut cur = cur;
994            match tag.field_number() {
995                1u32 => {
996                    ::buffa::encoding::check_wire_type(
997                        tag,
998                        ::buffa::encoding::WireType::LengthDelimited,
999                    )?;
1000                    view.cmd = ::buffa::types::borrow_str(&mut cur)?;
1001                }
1002                _ => {
1003                    ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
1004                    let span_len = before_tag.len() - cur.len();
1005                    view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
1006                }
1007            }
1008            ::core::result::Result::Ok(cur)
1009        }
1010        fn to_owned_message(
1011            &self,
1012        ) -> ::core::result::Result<
1013            super::super::super::codegen::Process,
1014            ::buffa::DecodeError,
1015        > {
1016            self.to_owned_from_source(None)
1017        }
1018        #[allow(clippy::useless_conversion, clippy::needless_update)]
1019        fn to_owned_from_source(
1020            &self,
1021            __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1022        ) -> ::core::result::Result<
1023            super::super::super::codegen::Process,
1024            ::buffa::DecodeError,
1025        > {
1026            #[allow(unused_imports)]
1027            use ::buffa::alloc::string::ToString as _;
1028            let _ = __buffa_src;
1029            ::core::result::Result::Ok(super::super::super::codegen::Process {
1030                cmd: self.cmd.to_string(),
1031                __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
1032                ..::core::default::Default::default()
1033            })
1034        }
1035    }
1036    impl<'a> ::buffa::ViewEncode<'a> for ProcessView<'a> {
1037        #[allow(clippy::needless_borrow, clippy::let_and_return)]
1038        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1039            #[allow(unused_imports)]
1040            use ::buffa::Enumeration as _;
1041            let mut size = 0u64;
1042            if !self.cmd.is_empty() {
1043                size += 1u64 + ::buffa::types::string_encoded_len(&self.cmd) as u64;
1044            }
1045            size += self.__buffa_unknown_fields.encoded_len() as u64;
1046            ::buffa::saturate_size(size)
1047        }
1048        #[allow(clippy::needless_borrow)]
1049        fn write_to(
1050            &self,
1051            _cache: &mut ::buffa::SizeCache,
1052            buf: &mut impl ::buffa::EncodeSink,
1053        ) {
1054            #[allow(unused_imports)]
1055            use ::buffa::Enumeration as _;
1056            if !self.cmd.is_empty() {
1057                ::buffa::types::put_string_field(1u32, &self.cmd, buf);
1058            }
1059            self.__buffa_unknown_fields.write_to(buf);
1060        }
1061    }
1062    impl<'a> ::buffa::MessageName for ProcessView<'a> {
1063        const PACKAGE: &'static str = "plugin";
1064        const NAME: &'static str = "Codegen.Process";
1065        const FULL_NAME: &'static str = "plugin.Codegen.Process";
1066        const TYPE_URL: &'static str = "type.googleapis.com/plugin.Codegen.Process";
1067    }
1068    ::buffa::impl_default_view_instance!(ProcessView);
1069    ::buffa::impl_view_reborrow!(ProcessView);
1070    /** Self-contained, `'static` owned view of a `Process` message.
1071
1072 Wraps [`::buffa::OwnedView`]`<`[`ProcessView`]`<'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.
1073
1074 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ProcessView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1075    #[derive(Clone, Debug)]
1076    pub struct ProcessOwnedView(::buffa::OwnedView<ProcessView<'static>>);
1077    impl ProcessOwnedView {
1078        /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1079        ///
1080        /// The view borrows directly from the buffer's data; the buffer is
1081        /// retained inside the returned handle.
1082        ///
1083        /// # Errors
1084        ///
1085        /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1086        /// protobuf data.
1087        pub fn decode(
1088            bytes: ::buffa::bytes::Bytes,
1089        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1090            ::core::result::Result::Ok(
1091                ProcessOwnedView(::buffa::OwnedView::decode(bytes)?),
1092            )
1093        }
1094        /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1095        /// max message size).
1096        ///
1097        /// # Errors
1098        ///
1099        /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1100        /// exceeds the configured limits.
1101        pub fn decode_with_options(
1102            bytes: ::buffa::bytes::Bytes,
1103            opts: &::buffa::DecodeOptions,
1104        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1105            ::core::result::Result::Ok(
1106                ProcessOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
1107            )
1108        }
1109        /// Build from an owned message via an encode → decode round-trip.
1110        ///
1111        /// # Errors
1112        ///
1113        /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
1114        /// message's encoded size exceeds the 2 GiB protobuf limit, or
1115        /// another [`::buffa::DecodeError`] if the re-encoded bytes are
1116        /// somehow invalid (should not happen for well-formed messages).
1117        pub fn from_owned(
1118            msg: &super::super::super::codegen::Process,
1119        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1120            ::core::result::Result::Ok(
1121                ProcessOwnedView(::buffa::OwnedView::from_owned(msg)?),
1122            )
1123        }
1124        /// Borrow the full [`ProcessView`] with its lifetime tied to `&self`.
1125        #[must_use]
1126        pub fn view(&self) -> &ProcessView<'_> {
1127            self.0.reborrow()
1128        }
1129        /// Convert to the owned message type.
1130        ///
1131        /// Infallible: this type's constructors wire-decode their
1132        /// buffer, and a view produced by wire decoding always
1133        /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
1134        /// whose contract also governs handles converted from a raw
1135        /// [`::buffa::OwnedView`].
1136        #[must_use]
1137        pub fn to_owned_message(&self) -> super::super::super::codegen::Process {
1138            self.0.to_owned_message()
1139        }
1140        /// The underlying bytes buffer.
1141        #[must_use]
1142        pub fn bytes(&self) -> &::buffa::bytes::Bytes {
1143            self.0.bytes()
1144        }
1145        /// Consume the handle, returning the underlying bytes buffer.
1146        #[must_use]
1147        pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
1148            self.0.into_bytes()
1149        }
1150        /// Field 1: `cmd`
1151        #[must_use]
1152        pub fn cmd(&self) -> &'_ str {
1153            self.0.reborrow().cmd
1154        }
1155    }
1156    impl ::core::convert::From<::buffa::OwnedView<ProcessView<'static>>>
1157    for ProcessOwnedView {
1158        fn from(inner: ::buffa::OwnedView<ProcessView<'static>>) -> Self {
1159            ProcessOwnedView(inner)
1160        }
1161    }
1162    impl ::core::convert::From<ProcessOwnedView>
1163    for ::buffa::OwnedView<ProcessView<'static>> {
1164        fn from(wrapper: ProcessOwnedView) -> Self {
1165            wrapper.0
1166        }
1167    }
1168    impl ::core::convert::AsRef<::buffa::OwnedView<ProcessView<'static>>>
1169    for ProcessOwnedView {
1170        fn as_ref(&self) -> &::buffa::OwnedView<ProcessView<'static>> {
1171            &self.0
1172        }
1173    }
1174    impl ::buffa::HasMessageView for super::super::super::codegen::Process {
1175        type View<'a> = ProcessView<'a>;
1176        type ViewHandle = ProcessOwnedView;
1177    }
1178    #[derive(Clone, Debug, Default)]
1179    pub struct WASMView<'a> {
1180        /// Field 1: `url`
1181        pub url: &'a str,
1182        /// Field 2: `sha256`
1183        pub sha256: &'a str,
1184        pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1185    }
1186    impl<'a> ::buffa::MessageView<'a> for WASMView<'a> {
1187        type Owned = super::super::super::codegen::WASM;
1188        fn decode_view(
1189            buf: &'a [u8],
1190        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1191            let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
1192            <Self as ::buffa::MessageView>::decode_view_ctx(
1193                buf,
1194                ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
1195            )
1196        }
1197        fn decode_view_with_ctx(
1198            buf: &'a [u8],
1199            ctx: ::buffa::DecodeContext<'_>,
1200        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1201            <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
1202        }
1203        #[inline]
1204        fn merge_view_field(
1205            &mut self,
1206            tag: ::buffa::encoding::Tag,
1207            cur: &'a [u8],
1208            before_tag: &'a [u8],
1209            ctx: ::buffa::DecodeContext<'_>,
1210        ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
1211            let _ = ctx;
1212            #[allow(unused_variables)]
1213            let view = self;
1214            let mut cur = cur;
1215            match tag.field_number() {
1216                1u32 => {
1217                    ::buffa::encoding::check_wire_type(
1218                        tag,
1219                        ::buffa::encoding::WireType::LengthDelimited,
1220                    )?;
1221                    view.url = ::buffa::types::borrow_str(&mut cur)?;
1222                }
1223                2u32 => {
1224                    ::buffa::encoding::check_wire_type(
1225                        tag,
1226                        ::buffa::encoding::WireType::LengthDelimited,
1227                    )?;
1228                    view.sha256 = ::buffa::types::borrow_str(&mut cur)?;
1229                }
1230                _ => {
1231                    ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
1232                    let span_len = before_tag.len() - cur.len();
1233                    view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
1234                }
1235            }
1236            ::core::result::Result::Ok(cur)
1237        }
1238        fn to_owned_message(
1239            &self,
1240        ) -> ::core::result::Result<
1241            super::super::super::codegen::WASM,
1242            ::buffa::DecodeError,
1243        > {
1244            self.to_owned_from_source(None)
1245        }
1246        #[allow(clippy::useless_conversion, clippy::needless_update)]
1247        fn to_owned_from_source(
1248            &self,
1249            __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1250        ) -> ::core::result::Result<
1251            super::super::super::codegen::WASM,
1252            ::buffa::DecodeError,
1253        > {
1254            #[allow(unused_imports)]
1255            use ::buffa::alloc::string::ToString as _;
1256            let _ = __buffa_src;
1257            ::core::result::Result::Ok(super::super::super::codegen::WASM {
1258                url: self.url.to_string(),
1259                sha256: self.sha256.to_string(),
1260                __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
1261                ..::core::default::Default::default()
1262            })
1263        }
1264    }
1265    impl<'a> ::buffa::ViewEncode<'a> for WASMView<'a> {
1266        #[allow(clippy::needless_borrow, clippy::let_and_return)]
1267        fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1268            #[allow(unused_imports)]
1269            use ::buffa::Enumeration as _;
1270            let mut size = 0u64;
1271            if !self.url.is_empty() {
1272                size += 1u64 + ::buffa::types::string_encoded_len(&self.url) as u64;
1273            }
1274            if !self.sha256.is_empty() {
1275                size += 1u64 + ::buffa::types::string_encoded_len(&self.sha256) as u64;
1276            }
1277            size += self.__buffa_unknown_fields.encoded_len() as u64;
1278            ::buffa::saturate_size(size)
1279        }
1280        #[allow(clippy::needless_borrow)]
1281        fn write_to(
1282            &self,
1283            _cache: &mut ::buffa::SizeCache,
1284            buf: &mut impl ::buffa::EncodeSink,
1285        ) {
1286            #[allow(unused_imports)]
1287            use ::buffa::Enumeration as _;
1288            if !self.url.is_empty() {
1289                ::buffa::types::put_string_field(1u32, &self.url, buf);
1290            }
1291            if !self.sha256.is_empty() {
1292                ::buffa::types::put_string_field(2u32, &self.sha256, buf);
1293            }
1294            self.__buffa_unknown_fields.write_to(buf);
1295        }
1296    }
1297    impl<'a> ::buffa::MessageName for WASMView<'a> {
1298        const PACKAGE: &'static str = "plugin";
1299        const NAME: &'static str = "Codegen.WASM";
1300        const FULL_NAME: &'static str = "plugin.Codegen.WASM";
1301        const TYPE_URL: &'static str = "type.googleapis.com/plugin.Codegen.WASM";
1302    }
1303    ::buffa::impl_default_view_instance!(WASMView);
1304    ::buffa::impl_view_reborrow!(WASMView);
1305    /** Self-contained, `'static` owned view of a `WASM` message.
1306
1307 Wraps [`::buffa::OwnedView`]`<`[`WASMView`]`<'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.
1308
1309 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`WASMView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1310    #[derive(Clone, Debug)]
1311    pub struct WASMOwnedView(::buffa::OwnedView<WASMView<'static>>);
1312    impl WASMOwnedView {
1313        /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1314        ///
1315        /// The view borrows directly from the buffer's data; the buffer is
1316        /// retained inside the returned handle.
1317        ///
1318        /// # Errors
1319        ///
1320        /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1321        /// protobuf data.
1322        pub fn decode(
1323            bytes: ::buffa::bytes::Bytes,
1324        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1325            ::core::result::Result::Ok(WASMOwnedView(::buffa::OwnedView::decode(bytes)?))
1326        }
1327        /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1328        /// max message size).
1329        ///
1330        /// # Errors
1331        ///
1332        /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1333        /// exceeds the configured limits.
1334        pub fn decode_with_options(
1335            bytes: ::buffa::bytes::Bytes,
1336            opts: &::buffa::DecodeOptions,
1337        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1338            ::core::result::Result::Ok(
1339                WASMOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
1340            )
1341        }
1342        /// Build from an owned message via an encode → decode round-trip.
1343        ///
1344        /// # Errors
1345        ///
1346        /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
1347        /// message's encoded size exceeds the 2 GiB protobuf limit, or
1348        /// another [`::buffa::DecodeError`] if the re-encoded bytes are
1349        /// somehow invalid (should not happen for well-formed messages).
1350        pub fn from_owned(
1351            msg: &super::super::super::codegen::WASM,
1352        ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1353            ::core::result::Result::Ok(
1354                WASMOwnedView(::buffa::OwnedView::from_owned(msg)?),
1355            )
1356        }
1357        /// Borrow the full [`WASMView`] with its lifetime tied to `&self`.
1358        #[must_use]
1359        pub fn view(&self) -> &WASMView<'_> {
1360            self.0.reborrow()
1361        }
1362        /// Convert to the owned message type.
1363        ///
1364        /// Infallible: this type's constructors wire-decode their
1365        /// buffer, and a view produced by wire decoding always
1366        /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
1367        /// whose contract also governs handles converted from a raw
1368        /// [`::buffa::OwnedView`].
1369        #[must_use]
1370        pub fn to_owned_message(&self) -> super::super::super::codegen::WASM {
1371            self.0.to_owned_message()
1372        }
1373        /// The underlying bytes buffer.
1374        #[must_use]
1375        pub fn bytes(&self) -> &::buffa::bytes::Bytes {
1376            self.0.bytes()
1377        }
1378        /// Consume the handle, returning the underlying bytes buffer.
1379        #[must_use]
1380        pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
1381            self.0.into_bytes()
1382        }
1383        /// Field 1: `url`
1384        #[must_use]
1385        pub fn url(&self) -> &'_ str {
1386            self.0.reborrow().url
1387        }
1388        /// Field 2: `sha256`
1389        #[must_use]
1390        pub fn sha256(&self) -> &'_ str {
1391            self.0.reborrow().sha256
1392        }
1393    }
1394    impl ::core::convert::From<::buffa::OwnedView<WASMView<'static>>> for WASMOwnedView {
1395        fn from(inner: ::buffa::OwnedView<WASMView<'static>>) -> Self {
1396            WASMOwnedView(inner)
1397        }
1398    }
1399    impl ::core::convert::From<WASMOwnedView> for ::buffa::OwnedView<WASMView<'static>> {
1400        fn from(wrapper: WASMOwnedView) -> Self {
1401            wrapper.0
1402        }
1403    }
1404    impl ::core::convert::AsRef<::buffa::OwnedView<WASMView<'static>>>
1405    for WASMOwnedView {
1406        fn as_ref(&self) -> &::buffa::OwnedView<WASMView<'static>> {
1407            &self.0
1408        }
1409    }
1410    impl ::buffa::HasMessageView for super::super::super::codegen::WASM {
1411        type View<'a> = WASMView<'a>;
1412        type ViewHandle = WASMOwnedView;
1413    }
1414}
1415#[derive(Clone, Debug, Default)]
1416pub struct CatalogView<'a> {
1417    /// Field 1: `comment`
1418    pub comment: &'a str,
1419    /// Field 2: `default_schema`
1420    pub default_schema: &'a str,
1421    /// Field 3: `name`
1422    pub name: &'a str,
1423    /// Field 4: `schemas`
1424    pub schemas: ::buffa::RepeatedView<'a, super::super::__buffa::view::SchemaView<'a>>,
1425    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1426}
1427impl<'a> ::buffa::MessageView<'a> for CatalogView<'a> {
1428    type Owned = super::super::Catalog;
1429    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1430        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
1431        <Self as ::buffa::MessageView>::decode_view_ctx(
1432            buf,
1433            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
1434        )
1435    }
1436    fn decode_view_with_ctx(
1437        buf: &'a [u8],
1438        ctx: ::buffa::DecodeContext<'_>,
1439    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1440        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
1441    }
1442    #[inline]
1443    fn merge_view_field(
1444        &mut self,
1445        tag: ::buffa::encoding::Tag,
1446        cur: &'a [u8],
1447        before_tag: &'a [u8],
1448        ctx: ::buffa::DecodeContext<'_>,
1449    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
1450        let _ = ctx;
1451        #[allow(unused_variables)]
1452        let view = self;
1453        let mut cur = cur;
1454        match tag.field_number() {
1455            1u32 => {
1456                ::buffa::encoding::check_wire_type(
1457                    tag,
1458                    ::buffa::encoding::WireType::LengthDelimited,
1459                )?;
1460                view.comment = ::buffa::types::borrow_str(&mut cur)?;
1461            }
1462            2u32 => {
1463                ::buffa::encoding::check_wire_type(
1464                    tag,
1465                    ::buffa::encoding::WireType::LengthDelimited,
1466                )?;
1467                view.default_schema = ::buffa::types::borrow_str(&mut cur)?;
1468            }
1469            3u32 => {
1470                ::buffa::encoding::check_wire_type(
1471                    tag,
1472                    ::buffa::encoding::WireType::LengthDelimited,
1473                )?;
1474                view.name = ::buffa::types::borrow_str(&mut cur)?;
1475            }
1476            4u32 => {
1477                ::buffa::encoding::check_wire_type(
1478                    tag,
1479                    ::buffa::encoding::WireType::LengthDelimited,
1480                )?;
1481                let __sub_ctx = ctx.descend()?;
1482                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
1483                ctx.register_element_memory(
1484                    ::core::mem::size_of::<super::super::__buffa::view::SchemaView>(),
1485                )?;
1486                view.schemas
1487                    .push(
1488                        <super::super::__buffa::view::SchemaView as ::buffa::MessageView>::decode_view_ctx(
1489                            sub,
1490                            __sub_ctx,
1491                        )?,
1492                    );
1493            }
1494            _ => {
1495                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
1496                let span_len = before_tag.len() - cur.len();
1497                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
1498            }
1499        }
1500        ::core::result::Result::Ok(cur)
1501    }
1502    fn to_owned_message(
1503        &self,
1504    ) -> ::core::result::Result<super::super::Catalog, ::buffa::DecodeError> {
1505        self.to_owned_from_source(None)
1506    }
1507    #[allow(clippy::useless_conversion, clippy::needless_update)]
1508    fn to_owned_from_source(
1509        &self,
1510        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1511    ) -> ::core::result::Result<super::super::Catalog, ::buffa::DecodeError> {
1512        #[allow(unused_imports)]
1513        use ::buffa::alloc::string::ToString as _;
1514        let _ = __buffa_src;
1515        ::core::result::Result::Ok(super::super::Catalog {
1516            comment: self.comment.to_string(),
1517            default_schema: self.default_schema.to_string(),
1518            name: self.name.to_string(),
1519            schemas: self
1520                .schemas
1521                .iter()
1522                .map(|v| v.to_owned_from_source(__buffa_src))
1523                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
1524            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
1525            ..::core::default::Default::default()
1526        })
1527    }
1528}
1529impl<'a> ::buffa::ViewEncode<'a> for CatalogView<'a> {
1530    #[allow(clippy::needless_borrow, clippy::let_and_return)]
1531    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1532        #[allow(unused_imports)]
1533        use ::buffa::Enumeration as _;
1534        let mut size = 0u64;
1535        if !self.comment.is_empty() {
1536            size += 1u64 + ::buffa::types::string_encoded_len(&self.comment) as u64;
1537        }
1538        if !self.default_schema.is_empty() {
1539            size
1540                += 1u64
1541                    + ::buffa::types::string_encoded_len(&self.default_schema) as u64;
1542        }
1543        if !self.name.is_empty() {
1544            size += 1u64 + ::buffa::types::string_encoded_len(&self.name) as u64;
1545        }
1546        for v in &self.schemas {
1547            let __slot = __cache.reserve();
1548            let inner_size = v.compute_size(__cache);
1549            __cache.set(__slot, inner_size);
1550            size
1551                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
1552                    + inner_size as u64;
1553        }
1554        size += self.__buffa_unknown_fields.encoded_len() as u64;
1555        ::buffa::saturate_size(size)
1556    }
1557    #[allow(clippy::needless_borrow)]
1558    fn write_to(
1559        &self,
1560        __cache: &mut ::buffa::SizeCache,
1561        buf: &mut impl ::buffa::EncodeSink,
1562    ) {
1563        #[allow(unused_imports)]
1564        use ::buffa::Enumeration as _;
1565        if !self.comment.is_empty() {
1566            ::buffa::types::put_string_field(1u32, &self.comment, buf);
1567        }
1568        if !self.default_schema.is_empty() {
1569            ::buffa::types::put_string_field(2u32, &self.default_schema, buf);
1570        }
1571        if !self.name.is_empty() {
1572            ::buffa::types::put_string_field(3u32, &self.name, buf);
1573        }
1574        for v in &self.schemas {
1575            ::buffa::types::put_len_delimited_header(
1576                4u32,
1577                u64::from(__cache.consume_next()),
1578                buf,
1579            );
1580            v.write_to(__cache, buf);
1581        }
1582        self.__buffa_unknown_fields.write_to(buf);
1583    }
1584}
1585impl<'a> ::buffa::MessageName for CatalogView<'a> {
1586    const PACKAGE: &'static str = "plugin";
1587    const NAME: &'static str = "Catalog";
1588    const FULL_NAME: &'static str = "plugin.Catalog";
1589    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Catalog";
1590}
1591::buffa::impl_default_view_instance!(CatalogView);
1592::buffa::impl_view_reborrow!(CatalogView);
1593/** Self-contained, `'static` owned view of a `Catalog` message.
1594
1595 Wraps [`::buffa::OwnedView`]`<`[`CatalogView`]`<'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.
1596
1597 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CatalogView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1598#[derive(Clone, Debug)]
1599pub struct CatalogOwnedView(::buffa::OwnedView<CatalogView<'static>>);
1600impl CatalogOwnedView {
1601    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1602    ///
1603    /// The view borrows directly from the buffer's data; the buffer is
1604    /// retained inside the returned handle.
1605    ///
1606    /// # Errors
1607    ///
1608    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1609    /// protobuf data.
1610    pub fn decode(
1611        bytes: ::buffa::bytes::Bytes,
1612    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1613        ::core::result::Result::Ok(CatalogOwnedView(::buffa::OwnedView::decode(bytes)?))
1614    }
1615    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1616    /// max message size).
1617    ///
1618    /// # Errors
1619    ///
1620    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1621    /// exceeds the configured limits.
1622    pub fn decode_with_options(
1623        bytes: ::buffa::bytes::Bytes,
1624        opts: &::buffa::DecodeOptions,
1625    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1626        ::core::result::Result::Ok(
1627            CatalogOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
1628        )
1629    }
1630    /// Build from an owned message via an encode → decode round-trip.
1631    ///
1632    /// # Errors
1633    ///
1634    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
1635    /// message's encoded size exceeds the 2 GiB protobuf limit, or
1636    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
1637    /// somehow invalid (should not happen for well-formed messages).
1638    pub fn from_owned(
1639        msg: &super::super::Catalog,
1640    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1641        ::core::result::Result::Ok(
1642            CatalogOwnedView(::buffa::OwnedView::from_owned(msg)?),
1643        )
1644    }
1645    /// Borrow the full [`CatalogView`] with its lifetime tied to `&self`.
1646    #[must_use]
1647    pub fn view(&self) -> &CatalogView<'_> {
1648        self.0.reborrow()
1649    }
1650    /// Convert to the owned message type.
1651    ///
1652    /// Infallible: this type's constructors wire-decode their
1653    /// buffer, and a view produced by wire decoding always
1654    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
1655    /// whose contract also governs handles converted from a raw
1656    /// [`::buffa::OwnedView`].
1657    #[must_use]
1658    pub fn to_owned_message(&self) -> super::super::Catalog {
1659        self.0.to_owned_message()
1660    }
1661    /// The underlying bytes buffer.
1662    #[must_use]
1663    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
1664        self.0.bytes()
1665    }
1666    /// Consume the handle, returning the underlying bytes buffer.
1667    #[must_use]
1668    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
1669        self.0.into_bytes()
1670    }
1671    /// Field 1: `comment`
1672    #[must_use]
1673    pub fn comment(&self) -> &'_ str {
1674        self.0.reborrow().comment
1675    }
1676    /// Field 2: `default_schema`
1677    #[must_use]
1678    pub fn default_schema(&self) -> &'_ str {
1679        self.0.reborrow().default_schema
1680    }
1681    /// Field 3: `name`
1682    #[must_use]
1683    pub fn name(&self) -> &'_ str {
1684        self.0.reborrow().name
1685    }
1686    /// Field 4: `schemas`
1687    #[must_use]
1688    pub fn schemas(
1689        &self,
1690    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::SchemaView<'_>> {
1691        &self.0.reborrow().schemas
1692    }
1693}
1694impl ::core::convert::From<::buffa::OwnedView<CatalogView<'static>>>
1695for CatalogOwnedView {
1696    fn from(inner: ::buffa::OwnedView<CatalogView<'static>>) -> Self {
1697        CatalogOwnedView(inner)
1698    }
1699}
1700impl ::core::convert::From<CatalogOwnedView>
1701for ::buffa::OwnedView<CatalogView<'static>> {
1702    fn from(wrapper: CatalogOwnedView) -> Self {
1703        wrapper.0
1704    }
1705}
1706impl ::core::convert::AsRef<::buffa::OwnedView<CatalogView<'static>>>
1707for CatalogOwnedView {
1708    fn as_ref(&self) -> &::buffa::OwnedView<CatalogView<'static>> {
1709        &self.0
1710    }
1711}
1712impl ::buffa::HasMessageView for super::super::Catalog {
1713    type View<'a> = CatalogView<'a>;
1714    type ViewHandle = CatalogOwnedView;
1715}
1716#[derive(Clone, Debug, Default)]
1717pub struct SchemaView<'a> {
1718    /// Field 1: `comment`
1719    pub comment: &'a str,
1720    /// Field 2: `name`
1721    pub name: &'a str,
1722    /// Field 3: `tables`
1723    pub tables: ::buffa::RepeatedView<'a, super::super::__buffa::view::TableView<'a>>,
1724    /// Field 4: `enums`
1725    pub enums: ::buffa::RepeatedView<'a, super::super::__buffa::view::EnumView<'a>>,
1726    /// Field 5: `composite_types`
1727    pub composite_types: ::buffa::RepeatedView<
1728        'a,
1729        super::super::__buffa::view::CompositeTypeView<'a>,
1730    >,
1731    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
1732}
1733impl<'a> ::buffa::MessageView<'a> for SchemaView<'a> {
1734    type Owned = super::super::Schema;
1735    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1736        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
1737        <Self as ::buffa::MessageView>::decode_view_ctx(
1738            buf,
1739            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
1740        )
1741    }
1742    fn decode_view_with_ctx(
1743        buf: &'a [u8],
1744        ctx: ::buffa::DecodeContext<'_>,
1745    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1746        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
1747    }
1748    #[inline]
1749    fn merge_view_field(
1750        &mut self,
1751        tag: ::buffa::encoding::Tag,
1752        cur: &'a [u8],
1753        before_tag: &'a [u8],
1754        ctx: ::buffa::DecodeContext<'_>,
1755    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
1756        let _ = ctx;
1757        #[allow(unused_variables)]
1758        let view = self;
1759        let mut cur = cur;
1760        match tag.field_number() {
1761            1u32 => {
1762                ::buffa::encoding::check_wire_type(
1763                    tag,
1764                    ::buffa::encoding::WireType::LengthDelimited,
1765                )?;
1766                view.comment = ::buffa::types::borrow_str(&mut cur)?;
1767            }
1768            2u32 => {
1769                ::buffa::encoding::check_wire_type(
1770                    tag,
1771                    ::buffa::encoding::WireType::LengthDelimited,
1772                )?;
1773                view.name = ::buffa::types::borrow_str(&mut cur)?;
1774            }
1775            3u32 => {
1776                ::buffa::encoding::check_wire_type(
1777                    tag,
1778                    ::buffa::encoding::WireType::LengthDelimited,
1779                )?;
1780                let __sub_ctx = ctx.descend()?;
1781                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
1782                ctx.register_element_memory(
1783                    ::core::mem::size_of::<super::super::__buffa::view::TableView>(),
1784                )?;
1785                view.tables
1786                    .push(
1787                        <super::super::__buffa::view::TableView as ::buffa::MessageView>::decode_view_ctx(
1788                            sub,
1789                            __sub_ctx,
1790                        )?,
1791                    );
1792            }
1793            4u32 => {
1794                ::buffa::encoding::check_wire_type(
1795                    tag,
1796                    ::buffa::encoding::WireType::LengthDelimited,
1797                )?;
1798                let __sub_ctx = ctx.descend()?;
1799                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
1800                ctx.register_element_memory(
1801                    ::core::mem::size_of::<super::super::__buffa::view::EnumView>(),
1802                )?;
1803                view.enums
1804                    .push(
1805                        <super::super::__buffa::view::EnumView as ::buffa::MessageView>::decode_view_ctx(
1806                            sub,
1807                            __sub_ctx,
1808                        )?,
1809                    );
1810            }
1811            5u32 => {
1812                ::buffa::encoding::check_wire_type(
1813                    tag,
1814                    ::buffa::encoding::WireType::LengthDelimited,
1815                )?;
1816                let __sub_ctx = ctx.descend()?;
1817                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
1818                ctx.register_element_memory(
1819                    ::core::mem::size_of::<
1820                        super::super::__buffa::view::CompositeTypeView,
1821                    >(),
1822                )?;
1823                view.composite_types
1824                    .push(
1825                        <super::super::__buffa::view::CompositeTypeView as ::buffa::MessageView>::decode_view_ctx(
1826                            sub,
1827                            __sub_ctx,
1828                        )?,
1829                    );
1830            }
1831            _ => {
1832                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
1833                let span_len = before_tag.len() - cur.len();
1834                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
1835            }
1836        }
1837        ::core::result::Result::Ok(cur)
1838    }
1839    fn to_owned_message(
1840        &self,
1841    ) -> ::core::result::Result<super::super::Schema, ::buffa::DecodeError> {
1842        self.to_owned_from_source(None)
1843    }
1844    #[allow(clippy::useless_conversion, clippy::needless_update)]
1845    fn to_owned_from_source(
1846        &self,
1847        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
1848    ) -> ::core::result::Result<super::super::Schema, ::buffa::DecodeError> {
1849        #[allow(unused_imports)]
1850        use ::buffa::alloc::string::ToString as _;
1851        let _ = __buffa_src;
1852        ::core::result::Result::Ok(super::super::Schema {
1853            comment: self.comment.to_string(),
1854            name: self.name.to_string(),
1855            tables: self
1856                .tables
1857                .iter()
1858                .map(|v| v.to_owned_from_source(__buffa_src))
1859                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
1860            enums: self
1861                .enums
1862                .iter()
1863                .map(|v| v.to_owned_from_source(__buffa_src))
1864                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
1865            composite_types: self
1866                .composite_types
1867                .iter()
1868                .map(|v| v.to_owned_from_source(__buffa_src))
1869                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
1870            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
1871            ..::core::default::Default::default()
1872        })
1873    }
1874}
1875impl<'a> ::buffa::ViewEncode<'a> for SchemaView<'a> {
1876    #[allow(clippy::needless_borrow, clippy::let_and_return)]
1877    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1878        #[allow(unused_imports)]
1879        use ::buffa::Enumeration as _;
1880        let mut size = 0u64;
1881        if !self.comment.is_empty() {
1882            size += 1u64 + ::buffa::types::string_encoded_len(&self.comment) as u64;
1883        }
1884        if !self.name.is_empty() {
1885            size += 1u64 + ::buffa::types::string_encoded_len(&self.name) as u64;
1886        }
1887        for v in &self.tables {
1888            let __slot = __cache.reserve();
1889            let inner_size = v.compute_size(__cache);
1890            __cache.set(__slot, inner_size);
1891            size
1892                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
1893                    + inner_size as u64;
1894        }
1895        for v in &self.enums {
1896            let __slot = __cache.reserve();
1897            let inner_size = v.compute_size(__cache);
1898            __cache.set(__slot, inner_size);
1899            size
1900                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
1901                    + inner_size as u64;
1902        }
1903        for v in &self.composite_types {
1904            let __slot = __cache.reserve();
1905            let inner_size = v.compute_size(__cache);
1906            __cache.set(__slot, inner_size);
1907            size
1908                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
1909                    + inner_size as u64;
1910        }
1911        size += self.__buffa_unknown_fields.encoded_len() as u64;
1912        ::buffa::saturate_size(size)
1913    }
1914    #[allow(clippy::needless_borrow)]
1915    fn write_to(
1916        &self,
1917        __cache: &mut ::buffa::SizeCache,
1918        buf: &mut impl ::buffa::EncodeSink,
1919    ) {
1920        #[allow(unused_imports)]
1921        use ::buffa::Enumeration as _;
1922        if !self.comment.is_empty() {
1923            ::buffa::types::put_string_field(1u32, &self.comment, buf);
1924        }
1925        if !self.name.is_empty() {
1926            ::buffa::types::put_string_field(2u32, &self.name, buf);
1927        }
1928        for v in &self.tables {
1929            ::buffa::types::put_len_delimited_header(
1930                3u32,
1931                u64::from(__cache.consume_next()),
1932                buf,
1933            );
1934            v.write_to(__cache, buf);
1935        }
1936        for v in &self.enums {
1937            ::buffa::types::put_len_delimited_header(
1938                4u32,
1939                u64::from(__cache.consume_next()),
1940                buf,
1941            );
1942            v.write_to(__cache, buf);
1943        }
1944        for v in &self.composite_types {
1945            ::buffa::types::put_len_delimited_header(
1946                5u32,
1947                u64::from(__cache.consume_next()),
1948                buf,
1949            );
1950            v.write_to(__cache, buf);
1951        }
1952        self.__buffa_unknown_fields.write_to(buf);
1953    }
1954}
1955impl<'a> ::buffa::MessageName for SchemaView<'a> {
1956    const PACKAGE: &'static str = "plugin";
1957    const NAME: &'static str = "Schema";
1958    const FULL_NAME: &'static str = "plugin.Schema";
1959    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Schema";
1960}
1961::buffa::impl_default_view_instance!(SchemaView);
1962::buffa::impl_view_reborrow!(SchemaView);
1963/** Self-contained, `'static` owned view of a `Schema` message.
1964
1965 Wraps [`::buffa::OwnedView`]`<`[`SchemaView`]`<'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.
1966
1967 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`SchemaView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
1968#[derive(Clone, Debug)]
1969pub struct SchemaOwnedView(::buffa::OwnedView<SchemaView<'static>>);
1970impl SchemaOwnedView {
1971    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
1972    ///
1973    /// The view borrows directly from the buffer's data; the buffer is
1974    /// retained inside the returned handle.
1975    ///
1976    /// # Errors
1977    ///
1978    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
1979    /// protobuf data.
1980    pub fn decode(
1981        bytes: ::buffa::bytes::Bytes,
1982    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1983        ::core::result::Result::Ok(SchemaOwnedView(::buffa::OwnedView::decode(bytes)?))
1984    }
1985    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
1986    /// max message size).
1987    ///
1988    /// # Errors
1989    ///
1990    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
1991    /// exceeds the configured limits.
1992    pub fn decode_with_options(
1993        bytes: ::buffa::bytes::Bytes,
1994        opts: &::buffa::DecodeOptions,
1995    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
1996        ::core::result::Result::Ok(
1997            SchemaOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
1998        )
1999    }
2000    /// Build from an owned message via an encode → decode round-trip.
2001    ///
2002    /// # Errors
2003    ///
2004    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
2005    /// message's encoded size exceeds the 2 GiB protobuf limit, or
2006    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
2007    /// somehow invalid (should not happen for well-formed messages).
2008    pub fn from_owned(
2009        msg: &super::super::Schema,
2010    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2011        ::core::result::Result::Ok(SchemaOwnedView(::buffa::OwnedView::from_owned(msg)?))
2012    }
2013    /// Borrow the full [`SchemaView`] with its lifetime tied to `&self`.
2014    #[must_use]
2015    pub fn view(&self) -> &SchemaView<'_> {
2016        self.0.reborrow()
2017    }
2018    /// Convert to the owned message type.
2019    ///
2020    /// Infallible: this type's constructors wire-decode their
2021    /// buffer, and a view produced by wire decoding always
2022    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
2023    /// whose contract also governs handles converted from a raw
2024    /// [`::buffa::OwnedView`].
2025    #[must_use]
2026    pub fn to_owned_message(&self) -> super::super::Schema {
2027        self.0.to_owned_message()
2028    }
2029    /// The underlying bytes buffer.
2030    #[must_use]
2031    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2032        self.0.bytes()
2033    }
2034    /// Consume the handle, returning the underlying bytes buffer.
2035    #[must_use]
2036    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2037        self.0.into_bytes()
2038    }
2039    /// Field 1: `comment`
2040    #[must_use]
2041    pub fn comment(&self) -> &'_ str {
2042        self.0.reborrow().comment
2043    }
2044    /// Field 2: `name`
2045    #[must_use]
2046    pub fn name(&self) -> &'_ str {
2047        self.0.reborrow().name
2048    }
2049    /// Field 3: `tables`
2050    #[must_use]
2051    pub fn tables(
2052        &self,
2053    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::TableView<'_>> {
2054        &self.0.reborrow().tables
2055    }
2056    /// Field 4: `enums`
2057    #[must_use]
2058    pub fn enums(
2059        &self,
2060    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::EnumView<'_>> {
2061        &self.0.reborrow().enums
2062    }
2063    /// Field 5: `composite_types`
2064    #[must_use]
2065    pub fn composite_types(
2066        &self,
2067    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::CompositeTypeView<'_>> {
2068        &self.0.reborrow().composite_types
2069    }
2070}
2071impl ::core::convert::From<::buffa::OwnedView<SchemaView<'static>>> for SchemaOwnedView {
2072    fn from(inner: ::buffa::OwnedView<SchemaView<'static>>) -> Self {
2073        SchemaOwnedView(inner)
2074    }
2075}
2076impl ::core::convert::From<SchemaOwnedView> for ::buffa::OwnedView<SchemaView<'static>> {
2077    fn from(wrapper: SchemaOwnedView) -> Self {
2078        wrapper.0
2079    }
2080}
2081impl ::core::convert::AsRef<::buffa::OwnedView<SchemaView<'static>>>
2082for SchemaOwnedView {
2083    fn as_ref(&self) -> &::buffa::OwnedView<SchemaView<'static>> {
2084        &self.0
2085    }
2086}
2087impl ::buffa::HasMessageView for super::super::Schema {
2088    type View<'a> = SchemaView<'a>;
2089    type ViewHandle = SchemaOwnedView;
2090}
2091#[derive(Clone, Debug, Default)]
2092pub struct CompositeTypeView<'a> {
2093    /// Field 1: `name`
2094    pub name: &'a str,
2095    /// Field 2: `comment`
2096    pub comment: &'a str,
2097    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2098}
2099impl<'a> ::buffa::MessageView<'a> for CompositeTypeView<'a> {
2100    type Owned = super::super::CompositeType;
2101    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2102        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
2103        <Self as ::buffa::MessageView>::decode_view_ctx(
2104            buf,
2105            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
2106        )
2107    }
2108    fn decode_view_with_ctx(
2109        buf: &'a [u8],
2110        ctx: ::buffa::DecodeContext<'_>,
2111    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2112        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
2113    }
2114    #[inline]
2115    fn merge_view_field(
2116        &mut self,
2117        tag: ::buffa::encoding::Tag,
2118        cur: &'a [u8],
2119        before_tag: &'a [u8],
2120        ctx: ::buffa::DecodeContext<'_>,
2121    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
2122        let _ = ctx;
2123        #[allow(unused_variables)]
2124        let view = self;
2125        let mut cur = cur;
2126        match tag.field_number() {
2127            1u32 => {
2128                ::buffa::encoding::check_wire_type(
2129                    tag,
2130                    ::buffa::encoding::WireType::LengthDelimited,
2131                )?;
2132                view.name = ::buffa::types::borrow_str(&mut cur)?;
2133            }
2134            2u32 => {
2135                ::buffa::encoding::check_wire_type(
2136                    tag,
2137                    ::buffa::encoding::WireType::LengthDelimited,
2138                )?;
2139                view.comment = ::buffa::types::borrow_str(&mut cur)?;
2140            }
2141            _ => {
2142                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
2143                let span_len = before_tag.len() - cur.len();
2144                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
2145            }
2146        }
2147        ::core::result::Result::Ok(cur)
2148    }
2149    fn to_owned_message(
2150        &self,
2151    ) -> ::core::result::Result<super::super::CompositeType, ::buffa::DecodeError> {
2152        self.to_owned_from_source(None)
2153    }
2154    #[allow(clippy::useless_conversion, clippy::needless_update)]
2155    fn to_owned_from_source(
2156        &self,
2157        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2158    ) -> ::core::result::Result<super::super::CompositeType, ::buffa::DecodeError> {
2159        #[allow(unused_imports)]
2160        use ::buffa::alloc::string::ToString as _;
2161        let _ = __buffa_src;
2162        ::core::result::Result::Ok(super::super::CompositeType {
2163            name: self.name.to_string(),
2164            comment: self.comment.to_string(),
2165            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
2166            ..::core::default::Default::default()
2167        })
2168    }
2169}
2170impl<'a> ::buffa::ViewEncode<'a> for CompositeTypeView<'a> {
2171    #[allow(clippy::needless_borrow, clippy::let_and_return)]
2172    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2173        #[allow(unused_imports)]
2174        use ::buffa::Enumeration as _;
2175        let mut size = 0u64;
2176        if !self.name.is_empty() {
2177            size += 1u64 + ::buffa::types::string_encoded_len(&self.name) as u64;
2178        }
2179        if !self.comment.is_empty() {
2180            size += 1u64 + ::buffa::types::string_encoded_len(&self.comment) as u64;
2181        }
2182        size += self.__buffa_unknown_fields.encoded_len() as u64;
2183        ::buffa::saturate_size(size)
2184    }
2185    #[allow(clippy::needless_borrow)]
2186    fn write_to(
2187        &self,
2188        _cache: &mut ::buffa::SizeCache,
2189        buf: &mut impl ::buffa::EncodeSink,
2190    ) {
2191        #[allow(unused_imports)]
2192        use ::buffa::Enumeration as _;
2193        if !self.name.is_empty() {
2194            ::buffa::types::put_string_field(1u32, &self.name, buf);
2195        }
2196        if !self.comment.is_empty() {
2197            ::buffa::types::put_string_field(2u32, &self.comment, buf);
2198        }
2199        self.__buffa_unknown_fields.write_to(buf);
2200    }
2201}
2202impl<'a> ::buffa::MessageName for CompositeTypeView<'a> {
2203    const PACKAGE: &'static str = "plugin";
2204    const NAME: &'static str = "CompositeType";
2205    const FULL_NAME: &'static str = "plugin.CompositeType";
2206    const TYPE_URL: &'static str = "type.googleapis.com/plugin.CompositeType";
2207}
2208::buffa::impl_default_view_instance!(CompositeTypeView);
2209::buffa::impl_view_reborrow!(CompositeTypeView);
2210/** Self-contained, `'static` owned view of a `CompositeType` message.
2211
2212 Wraps [`::buffa::OwnedView`]`<`[`CompositeTypeView`]`<'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.
2213
2214 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CompositeTypeView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
2215#[derive(Clone, Debug)]
2216pub struct CompositeTypeOwnedView(::buffa::OwnedView<CompositeTypeView<'static>>);
2217impl CompositeTypeOwnedView {
2218    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
2219    ///
2220    /// The view borrows directly from the buffer's data; the buffer is
2221    /// retained inside the returned handle.
2222    ///
2223    /// # Errors
2224    ///
2225    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
2226    /// protobuf data.
2227    pub fn decode(
2228        bytes: ::buffa::bytes::Bytes,
2229    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2230        ::core::result::Result::Ok(
2231            CompositeTypeOwnedView(::buffa::OwnedView::decode(bytes)?),
2232        )
2233    }
2234    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
2235    /// max message size).
2236    ///
2237    /// # Errors
2238    ///
2239    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
2240    /// exceeds the configured limits.
2241    pub fn decode_with_options(
2242        bytes: ::buffa::bytes::Bytes,
2243        opts: &::buffa::DecodeOptions,
2244    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2245        ::core::result::Result::Ok(
2246            CompositeTypeOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
2247        )
2248    }
2249    /// Build from an owned message via an encode → decode round-trip.
2250    ///
2251    /// # Errors
2252    ///
2253    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
2254    /// message's encoded size exceeds the 2 GiB protobuf limit, or
2255    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
2256    /// somehow invalid (should not happen for well-formed messages).
2257    pub fn from_owned(
2258        msg: &super::super::CompositeType,
2259    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2260        ::core::result::Result::Ok(
2261            CompositeTypeOwnedView(::buffa::OwnedView::from_owned(msg)?),
2262        )
2263    }
2264    /// Borrow the full [`CompositeTypeView`] with its lifetime tied to `&self`.
2265    #[must_use]
2266    pub fn view(&self) -> &CompositeTypeView<'_> {
2267        self.0.reborrow()
2268    }
2269    /// Convert to the owned message type.
2270    ///
2271    /// Infallible: this type's constructors wire-decode their
2272    /// buffer, and a view produced by wire decoding always
2273    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
2274    /// whose contract also governs handles converted from a raw
2275    /// [`::buffa::OwnedView`].
2276    #[must_use]
2277    pub fn to_owned_message(&self) -> super::super::CompositeType {
2278        self.0.to_owned_message()
2279    }
2280    /// The underlying bytes buffer.
2281    #[must_use]
2282    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2283        self.0.bytes()
2284    }
2285    /// Consume the handle, returning the underlying bytes buffer.
2286    #[must_use]
2287    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2288        self.0.into_bytes()
2289    }
2290    /// Field 1: `name`
2291    #[must_use]
2292    pub fn name(&self) -> &'_ str {
2293        self.0.reborrow().name
2294    }
2295    /// Field 2: `comment`
2296    #[must_use]
2297    pub fn comment(&self) -> &'_ str {
2298        self.0.reborrow().comment
2299    }
2300}
2301impl ::core::convert::From<::buffa::OwnedView<CompositeTypeView<'static>>>
2302for CompositeTypeOwnedView {
2303    fn from(inner: ::buffa::OwnedView<CompositeTypeView<'static>>) -> Self {
2304        CompositeTypeOwnedView(inner)
2305    }
2306}
2307impl ::core::convert::From<CompositeTypeOwnedView>
2308for ::buffa::OwnedView<CompositeTypeView<'static>> {
2309    fn from(wrapper: CompositeTypeOwnedView) -> Self {
2310        wrapper.0
2311    }
2312}
2313impl ::core::convert::AsRef<::buffa::OwnedView<CompositeTypeView<'static>>>
2314for CompositeTypeOwnedView {
2315    fn as_ref(&self) -> &::buffa::OwnedView<CompositeTypeView<'static>> {
2316        &self.0
2317    }
2318}
2319impl ::buffa::HasMessageView for super::super::CompositeType {
2320    type View<'a> = CompositeTypeView<'a>;
2321    type ViewHandle = CompositeTypeOwnedView;
2322}
2323#[derive(Clone, Debug, Default)]
2324pub struct EnumView<'a> {
2325    /// Field 1: `name`
2326    pub name: &'a str,
2327    /// Field 2: `vals`
2328    pub vals: ::buffa::RepeatedView<'a, &'a str>,
2329    /// Field 3: `comment`
2330    pub comment: &'a str,
2331    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2332}
2333impl<'a> ::buffa::MessageView<'a> for EnumView<'a> {
2334    type Owned = super::super::Enum;
2335    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2336        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
2337        <Self as ::buffa::MessageView>::decode_view_ctx(
2338            buf,
2339            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
2340        )
2341    }
2342    fn decode_view_with_ctx(
2343        buf: &'a [u8],
2344        ctx: ::buffa::DecodeContext<'_>,
2345    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2346        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
2347    }
2348    #[inline]
2349    fn merge_view_field(
2350        &mut self,
2351        tag: ::buffa::encoding::Tag,
2352        cur: &'a [u8],
2353        before_tag: &'a [u8],
2354        ctx: ::buffa::DecodeContext<'_>,
2355    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
2356        let _ = ctx;
2357        #[allow(unused_variables)]
2358        let view = self;
2359        let mut cur = cur;
2360        match tag.field_number() {
2361            1u32 => {
2362                ::buffa::encoding::check_wire_type(
2363                    tag,
2364                    ::buffa::encoding::WireType::LengthDelimited,
2365                )?;
2366                view.name = ::buffa::types::borrow_str(&mut cur)?;
2367            }
2368            3u32 => {
2369                ::buffa::encoding::check_wire_type(
2370                    tag,
2371                    ::buffa::encoding::WireType::LengthDelimited,
2372                )?;
2373                view.comment = ::buffa::types::borrow_str(&mut cur)?;
2374            }
2375            2u32 => {
2376                ::buffa::encoding::check_wire_type(
2377                    tag,
2378                    ::buffa::encoding::WireType::LengthDelimited,
2379                )?;
2380                let __elem = ::buffa::types::borrow_str(&mut cur)?;
2381                ctx.register_element_memory(
2382                    ::buffa::__private::element_footprint(&__elem),
2383                )?;
2384                view.vals.push(__elem);
2385            }
2386            _ => {
2387                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
2388                let span_len = before_tag.len() - cur.len();
2389                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
2390            }
2391        }
2392        ::core::result::Result::Ok(cur)
2393    }
2394    fn to_owned_message(
2395        &self,
2396    ) -> ::core::result::Result<super::super::Enum, ::buffa::DecodeError> {
2397        self.to_owned_from_source(None)
2398    }
2399    #[allow(clippy::useless_conversion, clippy::needless_update)]
2400    fn to_owned_from_source(
2401        &self,
2402        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2403    ) -> ::core::result::Result<super::super::Enum, ::buffa::DecodeError> {
2404        #[allow(unused_imports)]
2405        use ::buffa::alloc::string::ToString as _;
2406        let _ = __buffa_src;
2407        ::core::result::Result::Ok(super::super::Enum {
2408            name: self.name.to_string(),
2409            vals: self.vals.iter().map(|s| s.to_string()).collect(),
2410            comment: self.comment.to_string(),
2411            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
2412            ..::core::default::Default::default()
2413        })
2414    }
2415}
2416impl<'a> ::buffa::ViewEncode<'a> for EnumView<'a> {
2417    #[allow(clippy::needless_borrow, clippy::let_and_return)]
2418    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2419        #[allow(unused_imports)]
2420        use ::buffa::Enumeration as _;
2421        let mut size = 0u64;
2422        if !self.name.is_empty() {
2423            size += 1u64 + ::buffa::types::string_encoded_len(&self.name) as u64;
2424        }
2425        for v in &self.vals {
2426            size += 1u64 + ::buffa::types::string_encoded_len(v) as u64;
2427        }
2428        if !self.comment.is_empty() {
2429            size += 1u64 + ::buffa::types::string_encoded_len(&self.comment) as u64;
2430        }
2431        size += self.__buffa_unknown_fields.encoded_len() as u64;
2432        ::buffa::saturate_size(size)
2433    }
2434    #[allow(clippy::needless_borrow)]
2435    fn write_to(
2436        &self,
2437        _cache: &mut ::buffa::SizeCache,
2438        buf: &mut impl ::buffa::EncodeSink,
2439    ) {
2440        #[allow(unused_imports)]
2441        use ::buffa::Enumeration as _;
2442        if !self.name.is_empty() {
2443            ::buffa::types::put_string_field(1u32, &self.name, buf);
2444        }
2445        for v in &self.vals {
2446            ::buffa::types::put_string_field(2u32, v, buf);
2447        }
2448        if !self.comment.is_empty() {
2449            ::buffa::types::put_string_field(3u32, &self.comment, buf);
2450        }
2451        self.__buffa_unknown_fields.write_to(buf);
2452    }
2453}
2454impl<'a> ::buffa::MessageName for EnumView<'a> {
2455    const PACKAGE: &'static str = "plugin";
2456    const NAME: &'static str = "Enum";
2457    const FULL_NAME: &'static str = "plugin.Enum";
2458    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Enum";
2459}
2460::buffa::impl_default_view_instance!(EnumView);
2461::buffa::impl_view_reborrow!(EnumView);
2462/** Self-contained, `'static` owned view of a `Enum` message.
2463
2464 Wraps [`::buffa::OwnedView`]`<`[`EnumView`]`<'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.
2465
2466 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`EnumView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
2467#[derive(Clone, Debug)]
2468pub struct EnumOwnedView(::buffa::OwnedView<EnumView<'static>>);
2469impl EnumOwnedView {
2470    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
2471    ///
2472    /// The view borrows directly from the buffer's data; the buffer is
2473    /// retained inside the returned handle.
2474    ///
2475    /// # Errors
2476    ///
2477    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
2478    /// protobuf data.
2479    pub fn decode(
2480        bytes: ::buffa::bytes::Bytes,
2481    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2482        ::core::result::Result::Ok(EnumOwnedView(::buffa::OwnedView::decode(bytes)?))
2483    }
2484    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
2485    /// max message size).
2486    ///
2487    /// # Errors
2488    ///
2489    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
2490    /// exceeds the configured limits.
2491    pub fn decode_with_options(
2492        bytes: ::buffa::bytes::Bytes,
2493        opts: &::buffa::DecodeOptions,
2494    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2495        ::core::result::Result::Ok(
2496            EnumOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
2497        )
2498    }
2499    /// Build from an owned message via an encode → decode round-trip.
2500    ///
2501    /// # Errors
2502    ///
2503    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
2504    /// message's encoded size exceeds the 2 GiB protobuf limit, or
2505    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
2506    /// somehow invalid (should not happen for well-formed messages).
2507    pub fn from_owned(
2508        msg: &super::super::Enum,
2509    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2510        ::core::result::Result::Ok(EnumOwnedView(::buffa::OwnedView::from_owned(msg)?))
2511    }
2512    /// Borrow the full [`EnumView`] with its lifetime tied to `&self`.
2513    #[must_use]
2514    pub fn view(&self) -> &EnumView<'_> {
2515        self.0.reborrow()
2516    }
2517    /// Convert to the owned message type.
2518    ///
2519    /// Infallible: this type's constructors wire-decode their
2520    /// buffer, and a view produced by wire decoding always
2521    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
2522    /// whose contract also governs handles converted from a raw
2523    /// [`::buffa::OwnedView`].
2524    #[must_use]
2525    pub fn to_owned_message(&self) -> super::super::Enum {
2526        self.0.to_owned_message()
2527    }
2528    /// The underlying bytes buffer.
2529    #[must_use]
2530    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2531        self.0.bytes()
2532    }
2533    /// Consume the handle, returning the underlying bytes buffer.
2534    #[must_use]
2535    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2536        self.0.into_bytes()
2537    }
2538    /// Field 1: `name`
2539    #[must_use]
2540    pub fn name(&self) -> &'_ str {
2541        self.0.reborrow().name
2542    }
2543    /// Field 2: `vals`
2544    #[must_use]
2545    pub fn vals(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
2546        &self.0.reborrow().vals
2547    }
2548    /// Field 3: `comment`
2549    #[must_use]
2550    pub fn comment(&self) -> &'_ str {
2551        self.0.reborrow().comment
2552    }
2553}
2554impl ::core::convert::From<::buffa::OwnedView<EnumView<'static>>> for EnumOwnedView {
2555    fn from(inner: ::buffa::OwnedView<EnumView<'static>>) -> Self {
2556        EnumOwnedView(inner)
2557    }
2558}
2559impl ::core::convert::From<EnumOwnedView> for ::buffa::OwnedView<EnumView<'static>> {
2560    fn from(wrapper: EnumOwnedView) -> Self {
2561        wrapper.0
2562    }
2563}
2564impl ::core::convert::AsRef<::buffa::OwnedView<EnumView<'static>>> for EnumOwnedView {
2565    fn as_ref(&self) -> &::buffa::OwnedView<EnumView<'static>> {
2566        &self.0
2567    }
2568}
2569impl ::buffa::HasMessageView for super::super::Enum {
2570    type View<'a> = EnumView<'a>;
2571    type ViewHandle = EnumOwnedView;
2572}
2573#[derive(Clone, Debug, Default)]
2574pub struct TableView<'a> {
2575    /// Field 1: `rel`
2576    pub rel: ::buffa::MessageFieldView<super::super::__buffa::view::IdentifierView<'a>>,
2577    /// Field 2: `columns`
2578    pub columns: ::buffa::RepeatedView<'a, super::super::__buffa::view::ColumnView<'a>>,
2579    /// Field 3: `comment`
2580    pub comment: &'a str,
2581    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2582}
2583impl<'a> ::buffa::MessageView<'a> for TableView<'a> {
2584    type Owned = super::super::Table;
2585    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2586        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
2587        <Self as ::buffa::MessageView>::decode_view_ctx(
2588            buf,
2589            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
2590        )
2591    }
2592    fn decode_view_with_ctx(
2593        buf: &'a [u8],
2594        ctx: ::buffa::DecodeContext<'_>,
2595    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2596        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
2597    }
2598    #[inline]
2599    fn merge_view_field(
2600        &mut self,
2601        tag: ::buffa::encoding::Tag,
2602        cur: &'a [u8],
2603        before_tag: &'a [u8],
2604        ctx: ::buffa::DecodeContext<'_>,
2605    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
2606        let _ = ctx;
2607        #[allow(unused_variables)]
2608        let view = self;
2609        let mut cur = cur;
2610        match tag.field_number() {
2611            1u32 => {
2612                ::buffa::encoding::check_wire_type(
2613                    tag,
2614                    ::buffa::encoding::WireType::LengthDelimited,
2615                )?;
2616                let __sub_ctx = ctx.descend()?;
2617                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
2618                match view.rel.as_mut() {
2619                    Some(existing) => {
2620                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
2621                    }
2622                    None => {
2623                        view.rel = ::buffa::MessageFieldView::set(
2624                            <super::super::__buffa::view::IdentifierView as ::buffa::MessageView>::decode_view_ctx(
2625                                sub,
2626                                __sub_ctx,
2627                            )?,
2628                        );
2629                    }
2630                }
2631            }
2632            3u32 => {
2633                ::buffa::encoding::check_wire_type(
2634                    tag,
2635                    ::buffa::encoding::WireType::LengthDelimited,
2636                )?;
2637                view.comment = ::buffa::types::borrow_str(&mut cur)?;
2638            }
2639            2u32 => {
2640                ::buffa::encoding::check_wire_type(
2641                    tag,
2642                    ::buffa::encoding::WireType::LengthDelimited,
2643                )?;
2644                let __sub_ctx = ctx.descend()?;
2645                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
2646                ctx.register_element_memory(
2647                    ::core::mem::size_of::<super::super::__buffa::view::ColumnView>(),
2648                )?;
2649                view.columns
2650                    .push(
2651                        <super::super::__buffa::view::ColumnView as ::buffa::MessageView>::decode_view_ctx(
2652                            sub,
2653                            __sub_ctx,
2654                        )?,
2655                    );
2656            }
2657            _ => {
2658                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
2659                let span_len = before_tag.len() - cur.len();
2660                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
2661            }
2662        }
2663        ::core::result::Result::Ok(cur)
2664    }
2665    fn to_owned_message(
2666        &self,
2667    ) -> ::core::result::Result<super::super::Table, ::buffa::DecodeError> {
2668        self.to_owned_from_source(None)
2669    }
2670    #[allow(clippy::useless_conversion, clippy::needless_update)]
2671    fn to_owned_from_source(
2672        &self,
2673        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2674    ) -> ::core::result::Result<super::super::Table, ::buffa::DecodeError> {
2675        #[allow(unused_imports)]
2676        use ::buffa::alloc::string::ToString as _;
2677        let _ = __buffa_src;
2678        ::core::result::Result::Ok(super::super::Table {
2679            rel: match self.rel.as_option() {
2680                Some(v) => {
2681                    ::buffa::MessageField::<
2682                        super::super::Identifier,
2683                        ::buffa::Inline<super::super::Identifier>,
2684                    >::some(v.to_owned_from_source(__buffa_src)?)
2685                }
2686                None => ::buffa::MessageField::none(),
2687            },
2688            columns: self
2689                .columns
2690                .iter()
2691                .map(|v| v.to_owned_from_source(__buffa_src))
2692                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
2693            comment: self.comment.to_string(),
2694            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
2695            ..::core::default::Default::default()
2696        })
2697    }
2698}
2699impl<'a> ::buffa::ViewEncode<'a> for TableView<'a> {
2700    #[allow(clippy::needless_borrow, clippy::let_and_return)]
2701    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2702        #[allow(unused_imports)]
2703        use ::buffa::Enumeration as _;
2704        let mut size = 0u64;
2705        if self.rel.is_set() {
2706            let __slot = __cache.reserve();
2707            let inner_size = self.rel.compute_size(__cache);
2708            __cache.set(__slot, inner_size);
2709            size
2710                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
2711                    + inner_size as u64;
2712        }
2713        for v in &self.columns {
2714            let __slot = __cache.reserve();
2715            let inner_size = v.compute_size(__cache);
2716            __cache.set(__slot, inner_size);
2717            size
2718                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
2719                    + inner_size as u64;
2720        }
2721        if !self.comment.is_empty() {
2722            size += 1u64 + ::buffa::types::string_encoded_len(&self.comment) as u64;
2723        }
2724        size += self.__buffa_unknown_fields.encoded_len() as u64;
2725        ::buffa::saturate_size(size)
2726    }
2727    #[allow(clippy::needless_borrow)]
2728    fn write_to(
2729        &self,
2730        __cache: &mut ::buffa::SizeCache,
2731        buf: &mut impl ::buffa::EncodeSink,
2732    ) {
2733        #[allow(unused_imports)]
2734        use ::buffa::Enumeration as _;
2735        if self.rel.is_set() {
2736            ::buffa::types::put_len_delimited_header(
2737                1u32,
2738                u64::from(__cache.consume_next()),
2739                buf,
2740            );
2741            self.rel.write_to(__cache, buf);
2742        }
2743        for v in &self.columns {
2744            ::buffa::types::put_len_delimited_header(
2745                2u32,
2746                u64::from(__cache.consume_next()),
2747                buf,
2748            );
2749            v.write_to(__cache, buf);
2750        }
2751        if !self.comment.is_empty() {
2752            ::buffa::types::put_string_field(3u32, &self.comment, buf);
2753        }
2754        self.__buffa_unknown_fields.write_to(buf);
2755    }
2756}
2757impl<'a> ::buffa::MessageName for TableView<'a> {
2758    const PACKAGE: &'static str = "plugin";
2759    const NAME: &'static str = "Table";
2760    const FULL_NAME: &'static str = "plugin.Table";
2761    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Table";
2762}
2763::buffa::impl_default_view_instance!(TableView);
2764::buffa::impl_view_reborrow!(TableView);
2765/** Self-contained, `'static` owned view of a `Table` message.
2766
2767 Wraps [`::buffa::OwnedView`]`<`[`TableView`]`<'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.
2768
2769 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`TableView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
2770#[derive(Clone, Debug)]
2771pub struct TableOwnedView(::buffa::OwnedView<TableView<'static>>);
2772impl TableOwnedView {
2773    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
2774    ///
2775    /// The view borrows directly from the buffer's data; the buffer is
2776    /// retained inside the returned handle.
2777    ///
2778    /// # Errors
2779    ///
2780    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
2781    /// protobuf data.
2782    pub fn decode(
2783        bytes: ::buffa::bytes::Bytes,
2784    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2785        ::core::result::Result::Ok(TableOwnedView(::buffa::OwnedView::decode(bytes)?))
2786    }
2787    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
2788    /// max message size).
2789    ///
2790    /// # Errors
2791    ///
2792    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
2793    /// exceeds the configured limits.
2794    pub fn decode_with_options(
2795        bytes: ::buffa::bytes::Bytes,
2796        opts: &::buffa::DecodeOptions,
2797    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2798        ::core::result::Result::Ok(
2799            TableOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
2800        )
2801    }
2802    /// Build from an owned message via an encode → decode round-trip.
2803    ///
2804    /// # Errors
2805    ///
2806    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
2807    /// message's encoded size exceeds the 2 GiB protobuf limit, or
2808    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
2809    /// somehow invalid (should not happen for well-formed messages).
2810    pub fn from_owned(
2811        msg: &super::super::Table,
2812    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2813        ::core::result::Result::Ok(TableOwnedView(::buffa::OwnedView::from_owned(msg)?))
2814    }
2815    /// Borrow the full [`TableView`] with its lifetime tied to `&self`.
2816    #[must_use]
2817    pub fn view(&self) -> &TableView<'_> {
2818        self.0.reborrow()
2819    }
2820    /// Convert to the owned message type.
2821    ///
2822    /// Infallible: this type's constructors wire-decode their
2823    /// buffer, and a view produced by wire decoding always
2824    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
2825    /// whose contract also governs handles converted from a raw
2826    /// [`::buffa::OwnedView`].
2827    #[must_use]
2828    pub fn to_owned_message(&self) -> super::super::Table {
2829        self.0.to_owned_message()
2830    }
2831    /// The underlying bytes buffer.
2832    #[must_use]
2833    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
2834        self.0.bytes()
2835    }
2836    /// Consume the handle, returning the underlying bytes buffer.
2837    #[must_use]
2838    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
2839        self.0.into_bytes()
2840    }
2841    /// Field 1: `rel`
2842    #[must_use]
2843    pub fn rel(
2844        &self,
2845    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::IdentifierView<'_>> {
2846        &self.0.reborrow().rel
2847    }
2848    /// Field 2: `columns`
2849    #[must_use]
2850    pub fn columns(
2851        &self,
2852    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::ColumnView<'_>> {
2853        &self.0.reborrow().columns
2854    }
2855    /// Field 3: `comment`
2856    #[must_use]
2857    pub fn comment(&self) -> &'_ str {
2858        self.0.reborrow().comment
2859    }
2860}
2861impl ::core::convert::From<::buffa::OwnedView<TableView<'static>>> for TableOwnedView {
2862    fn from(inner: ::buffa::OwnedView<TableView<'static>>) -> Self {
2863        TableOwnedView(inner)
2864    }
2865}
2866impl ::core::convert::From<TableOwnedView> for ::buffa::OwnedView<TableView<'static>> {
2867    fn from(wrapper: TableOwnedView) -> Self {
2868        wrapper.0
2869    }
2870}
2871impl ::core::convert::AsRef<::buffa::OwnedView<TableView<'static>>> for TableOwnedView {
2872    fn as_ref(&self) -> &::buffa::OwnedView<TableView<'static>> {
2873        &self.0
2874    }
2875}
2876impl ::buffa::HasMessageView for super::super::Table {
2877    type View<'a> = TableView<'a>;
2878    type ViewHandle = TableOwnedView;
2879}
2880#[derive(Clone, Debug, Default)]
2881pub struct IdentifierView<'a> {
2882    /// Field 1: `catalog`
2883    pub catalog: &'a str,
2884    /// Field 2: `schema`
2885    pub schema: &'a str,
2886    /// Field 3: `name`
2887    pub name: &'a str,
2888    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2889}
2890impl<'a> ::buffa::MessageView<'a> for IdentifierView<'a> {
2891    type Owned = super::super::Identifier;
2892    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2893        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
2894        <Self as ::buffa::MessageView>::decode_view_ctx(
2895            buf,
2896            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
2897        )
2898    }
2899    fn decode_view_with_ctx(
2900        buf: &'a [u8],
2901        ctx: ::buffa::DecodeContext<'_>,
2902    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2903        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
2904    }
2905    #[inline]
2906    fn merge_view_field(
2907        &mut self,
2908        tag: ::buffa::encoding::Tag,
2909        cur: &'a [u8],
2910        before_tag: &'a [u8],
2911        ctx: ::buffa::DecodeContext<'_>,
2912    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
2913        let _ = ctx;
2914        #[allow(unused_variables)]
2915        let view = self;
2916        let mut cur = cur;
2917        match tag.field_number() {
2918            1u32 => {
2919                ::buffa::encoding::check_wire_type(
2920                    tag,
2921                    ::buffa::encoding::WireType::LengthDelimited,
2922                )?;
2923                view.catalog = ::buffa::types::borrow_str(&mut cur)?;
2924            }
2925            2u32 => {
2926                ::buffa::encoding::check_wire_type(
2927                    tag,
2928                    ::buffa::encoding::WireType::LengthDelimited,
2929                )?;
2930                view.schema = ::buffa::types::borrow_str(&mut cur)?;
2931            }
2932            3u32 => {
2933                ::buffa::encoding::check_wire_type(
2934                    tag,
2935                    ::buffa::encoding::WireType::LengthDelimited,
2936                )?;
2937                view.name = ::buffa::types::borrow_str(&mut cur)?;
2938            }
2939            _ => {
2940                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
2941                let span_len = before_tag.len() - cur.len();
2942                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
2943            }
2944        }
2945        ::core::result::Result::Ok(cur)
2946    }
2947    fn to_owned_message(
2948        &self,
2949    ) -> ::core::result::Result<super::super::Identifier, ::buffa::DecodeError> {
2950        self.to_owned_from_source(None)
2951    }
2952    #[allow(clippy::useless_conversion, clippy::needless_update)]
2953    fn to_owned_from_source(
2954        &self,
2955        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2956    ) -> ::core::result::Result<super::super::Identifier, ::buffa::DecodeError> {
2957        #[allow(unused_imports)]
2958        use ::buffa::alloc::string::ToString as _;
2959        let _ = __buffa_src;
2960        ::core::result::Result::Ok(super::super::Identifier {
2961            catalog: self.catalog.to_string(),
2962            schema: self.schema.to_string(),
2963            name: self.name.to_string(),
2964            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
2965            ..::core::default::Default::default()
2966        })
2967    }
2968}
2969impl<'a> ::buffa::ViewEncode<'a> for IdentifierView<'a> {
2970    #[allow(clippy::needless_borrow, clippy::let_and_return)]
2971    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2972        #[allow(unused_imports)]
2973        use ::buffa::Enumeration as _;
2974        let mut size = 0u64;
2975        if !self.catalog.is_empty() {
2976            size += 1u64 + ::buffa::types::string_encoded_len(&self.catalog) as u64;
2977        }
2978        if !self.schema.is_empty() {
2979            size += 1u64 + ::buffa::types::string_encoded_len(&self.schema) as u64;
2980        }
2981        if !self.name.is_empty() {
2982            size += 1u64 + ::buffa::types::string_encoded_len(&self.name) as u64;
2983        }
2984        size += self.__buffa_unknown_fields.encoded_len() as u64;
2985        ::buffa::saturate_size(size)
2986    }
2987    #[allow(clippy::needless_borrow)]
2988    fn write_to(
2989        &self,
2990        _cache: &mut ::buffa::SizeCache,
2991        buf: &mut impl ::buffa::EncodeSink,
2992    ) {
2993        #[allow(unused_imports)]
2994        use ::buffa::Enumeration as _;
2995        if !self.catalog.is_empty() {
2996            ::buffa::types::put_string_field(1u32, &self.catalog, buf);
2997        }
2998        if !self.schema.is_empty() {
2999            ::buffa::types::put_string_field(2u32, &self.schema, buf);
3000        }
3001        if !self.name.is_empty() {
3002            ::buffa::types::put_string_field(3u32, &self.name, buf);
3003        }
3004        self.__buffa_unknown_fields.write_to(buf);
3005    }
3006}
3007impl<'a> ::buffa::MessageName for IdentifierView<'a> {
3008    const PACKAGE: &'static str = "plugin";
3009    const NAME: &'static str = "Identifier";
3010    const FULL_NAME: &'static str = "plugin.Identifier";
3011    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Identifier";
3012}
3013::buffa::impl_default_view_instance!(IdentifierView);
3014::buffa::impl_view_reborrow!(IdentifierView);
3015/** Self-contained, `'static` owned view of a `Identifier` message.
3016
3017 Wraps [`::buffa::OwnedView`]`<`[`IdentifierView`]`<'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.
3018
3019 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`IdentifierView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3020#[derive(Clone, Debug)]
3021pub struct IdentifierOwnedView(::buffa::OwnedView<IdentifierView<'static>>);
3022impl IdentifierOwnedView {
3023    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3024    ///
3025    /// The view borrows directly from the buffer's data; the buffer is
3026    /// retained inside the returned handle.
3027    ///
3028    /// # Errors
3029    ///
3030    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3031    /// protobuf data.
3032    pub fn decode(
3033        bytes: ::buffa::bytes::Bytes,
3034    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3035        ::core::result::Result::Ok(
3036            IdentifierOwnedView(::buffa::OwnedView::decode(bytes)?),
3037        )
3038    }
3039    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3040    /// max message size).
3041    ///
3042    /// # Errors
3043    ///
3044    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3045    /// exceeds the configured limits.
3046    pub fn decode_with_options(
3047        bytes: ::buffa::bytes::Bytes,
3048        opts: &::buffa::DecodeOptions,
3049    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3050        ::core::result::Result::Ok(
3051            IdentifierOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
3052        )
3053    }
3054    /// Build from an owned message via an encode → decode round-trip.
3055    ///
3056    /// # Errors
3057    ///
3058    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
3059    /// message's encoded size exceeds the 2 GiB protobuf limit, or
3060    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
3061    /// somehow invalid (should not happen for well-formed messages).
3062    pub fn from_owned(
3063        msg: &super::super::Identifier,
3064    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3065        ::core::result::Result::Ok(
3066            IdentifierOwnedView(::buffa::OwnedView::from_owned(msg)?),
3067        )
3068    }
3069    /// Borrow the full [`IdentifierView`] with its lifetime tied to `&self`.
3070    #[must_use]
3071    pub fn view(&self) -> &IdentifierView<'_> {
3072        self.0.reborrow()
3073    }
3074    /// Convert to the owned message type.
3075    ///
3076    /// Infallible: this type's constructors wire-decode their
3077    /// buffer, and a view produced by wire decoding always
3078    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
3079    /// whose contract also governs handles converted from a raw
3080    /// [`::buffa::OwnedView`].
3081    #[must_use]
3082    pub fn to_owned_message(&self) -> super::super::Identifier {
3083        self.0.to_owned_message()
3084    }
3085    /// The underlying bytes buffer.
3086    #[must_use]
3087    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3088        self.0.bytes()
3089    }
3090    /// Consume the handle, returning the underlying bytes buffer.
3091    #[must_use]
3092    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3093        self.0.into_bytes()
3094    }
3095    /// Field 1: `catalog`
3096    #[must_use]
3097    pub fn catalog(&self) -> &'_ str {
3098        self.0.reborrow().catalog
3099    }
3100    /// Field 2: `schema`
3101    #[must_use]
3102    pub fn schema(&self) -> &'_ str {
3103        self.0.reborrow().schema
3104    }
3105    /// Field 3: `name`
3106    #[must_use]
3107    pub fn name(&self) -> &'_ str {
3108        self.0.reborrow().name
3109    }
3110}
3111impl ::core::convert::From<::buffa::OwnedView<IdentifierView<'static>>>
3112for IdentifierOwnedView {
3113    fn from(inner: ::buffa::OwnedView<IdentifierView<'static>>) -> Self {
3114        IdentifierOwnedView(inner)
3115    }
3116}
3117impl ::core::convert::From<IdentifierOwnedView>
3118for ::buffa::OwnedView<IdentifierView<'static>> {
3119    fn from(wrapper: IdentifierOwnedView) -> Self {
3120        wrapper.0
3121    }
3122}
3123impl ::core::convert::AsRef<::buffa::OwnedView<IdentifierView<'static>>>
3124for IdentifierOwnedView {
3125    fn as_ref(&self) -> &::buffa::OwnedView<IdentifierView<'static>> {
3126        &self.0
3127    }
3128}
3129impl ::buffa::HasMessageView for super::super::Identifier {
3130    type View<'a> = IdentifierView<'a>;
3131    type ViewHandle = IdentifierOwnedView;
3132}
3133#[derive(Clone, Debug, Default)]
3134pub struct ColumnView<'a> {
3135    /// Field 1: `name`
3136    pub name: &'a str,
3137    /// Field 3: `not_null`
3138    pub not_null: bool,
3139    /// Field 4: `is_array`
3140    pub is_array: bool,
3141    /// Field 5: `comment`
3142    pub comment: &'a str,
3143    /// Field 6: `length`
3144    pub length: i32,
3145    /// Field 7: `is_named_param`
3146    pub is_named_param: bool,
3147    /// Field 8: `is_func_call`
3148    pub is_func_call: bool,
3149    /// XXX: Figure out what PostgreSQL calls `foo.id`
3150    ///
3151    /// Field 9: `scope`
3152    pub scope: &'a str,
3153    /// Field 10: `table`
3154    pub table: ::buffa::MessageFieldView<
3155        super::super::__buffa::view::IdentifierView<'a>,
3156    >,
3157    /// Field 11: `table_alias`
3158    pub table_alias: &'a str,
3159    /// Field 12: `type`
3160    pub r#type: ::buffa::MessageFieldView<
3161        super::super::__buffa::view::IdentifierView<'a>,
3162    >,
3163    /// Field 13: `is_sqlc_slice`
3164    pub is_sqlc_slice: bool,
3165    /// Field 14: `embed_table`
3166    pub embed_table: ::buffa::MessageFieldView<
3167        super::super::__buffa::view::IdentifierView<'a>,
3168    >,
3169    /// Field 15: `original_name`
3170    pub original_name: &'a str,
3171    /// Field 16: `unsigned`
3172    pub unsigned: bool,
3173    /// Field 17: `array_dims`
3174    pub array_dims: i32,
3175    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3176}
3177impl<'a> ::buffa::MessageView<'a> for ColumnView<'a> {
3178    type Owned = super::super::Column;
3179    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3180        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
3181        <Self as ::buffa::MessageView>::decode_view_ctx(
3182            buf,
3183            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
3184        )
3185    }
3186    fn decode_view_with_ctx(
3187        buf: &'a [u8],
3188        ctx: ::buffa::DecodeContext<'_>,
3189    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3190        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
3191    }
3192    #[inline]
3193    fn merge_view_field(
3194        &mut self,
3195        tag: ::buffa::encoding::Tag,
3196        cur: &'a [u8],
3197        before_tag: &'a [u8],
3198        ctx: ::buffa::DecodeContext<'_>,
3199    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
3200        let _ = ctx;
3201        #[allow(unused_variables)]
3202        let view = self;
3203        let mut cur = cur;
3204        match tag.field_number() {
3205            1u32 => {
3206                ::buffa::encoding::check_wire_type(
3207                    tag,
3208                    ::buffa::encoding::WireType::LengthDelimited,
3209                )?;
3210                view.name = ::buffa::types::borrow_str(&mut cur)?;
3211            }
3212            3u32 => {
3213                ::buffa::encoding::check_wire_type(
3214                    tag,
3215                    ::buffa::encoding::WireType::Varint,
3216                )?;
3217                view.not_null = ::buffa::types::decode_bool(&mut cur)?;
3218            }
3219            4u32 => {
3220                ::buffa::encoding::check_wire_type(
3221                    tag,
3222                    ::buffa::encoding::WireType::Varint,
3223                )?;
3224                view.is_array = ::buffa::types::decode_bool(&mut cur)?;
3225            }
3226            5u32 => {
3227                ::buffa::encoding::check_wire_type(
3228                    tag,
3229                    ::buffa::encoding::WireType::LengthDelimited,
3230                )?;
3231                view.comment = ::buffa::types::borrow_str(&mut cur)?;
3232            }
3233            6u32 => {
3234                ::buffa::encoding::check_wire_type(
3235                    tag,
3236                    ::buffa::encoding::WireType::Varint,
3237                )?;
3238                view.length = ::buffa::types::decode_int32(&mut cur)?;
3239            }
3240            7u32 => {
3241                ::buffa::encoding::check_wire_type(
3242                    tag,
3243                    ::buffa::encoding::WireType::Varint,
3244                )?;
3245                view.is_named_param = ::buffa::types::decode_bool(&mut cur)?;
3246            }
3247            8u32 => {
3248                ::buffa::encoding::check_wire_type(
3249                    tag,
3250                    ::buffa::encoding::WireType::Varint,
3251                )?;
3252                view.is_func_call = ::buffa::types::decode_bool(&mut cur)?;
3253            }
3254            9u32 => {
3255                ::buffa::encoding::check_wire_type(
3256                    tag,
3257                    ::buffa::encoding::WireType::LengthDelimited,
3258                )?;
3259                view.scope = ::buffa::types::borrow_str(&mut cur)?;
3260            }
3261            10u32 => {
3262                ::buffa::encoding::check_wire_type(
3263                    tag,
3264                    ::buffa::encoding::WireType::LengthDelimited,
3265                )?;
3266                let __sub_ctx = ctx.descend()?;
3267                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3268                match view.table.as_mut() {
3269                    Some(existing) => {
3270                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
3271                    }
3272                    None => {
3273                        view.table = ::buffa::MessageFieldView::set(
3274                            <super::super::__buffa::view::IdentifierView as ::buffa::MessageView>::decode_view_ctx(
3275                                sub,
3276                                __sub_ctx,
3277                            )?,
3278                        );
3279                    }
3280                }
3281            }
3282            11u32 => {
3283                ::buffa::encoding::check_wire_type(
3284                    tag,
3285                    ::buffa::encoding::WireType::LengthDelimited,
3286                )?;
3287                view.table_alias = ::buffa::types::borrow_str(&mut cur)?;
3288            }
3289            12u32 => {
3290                ::buffa::encoding::check_wire_type(
3291                    tag,
3292                    ::buffa::encoding::WireType::LengthDelimited,
3293                )?;
3294                let __sub_ctx = ctx.descend()?;
3295                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3296                match view.r#type.as_mut() {
3297                    Some(existing) => {
3298                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
3299                    }
3300                    None => {
3301                        view.r#type = ::buffa::MessageFieldView::set(
3302                            <super::super::__buffa::view::IdentifierView as ::buffa::MessageView>::decode_view_ctx(
3303                                sub,
3304                                __sub_ctx,
3305                            )?,
3306                        );
3307                    }
3308                }
3309            }
3310            13u32 => {
3311                ::buffa::encoding::check_wire_type(
3312                    tag,
3313                    ::buffa::encoding::WireType::Varint,
3314                )?;
3315                view.is_sqlc_slice = ::buffa::types::decode_bool(&mut cur)?;
3316            }
3317            14u32 => {
3318                ::buffa::encoding::check_wire_type(
3319                    tag,
3320                    ::buffa::encoding::WireType::LengthDelimited,
3321                )?;
3322                let __sub_ctx = ctx.descend()?;
3323                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3324                match view.embed_table.as_mut() {
3325                    Some(existing) => {
3326                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
3327                    }
3328                    None => {
3329                        view.embed_table = ::buffa::MessageFieldView::set(
3330                            <super::super::__buffa::view::IdentifierView as ::buffa::MessageView>::decode_view_ctx(
3331                                sub,
3332                                __sub_ctx,
3333                            )?,
3334                        );
3335                    }
3336                }
3337            }
3338            15u32 => {
3339                ::buffa::encoding::check_wire_type(
3340                    tag,
3341                    ::buffa::encoding::WireType::LengthDelimited,
3342                )?;
3343                view.original_name = ::buffa::types::borrow_str(&mut cur)?;
3344            }
3345            16u32 => {
3346                ::buffa::encoding::check_wire_type(
3347                    tag,
3348                    ::buffa::encoding::WireType::Varint,
3349                )?;
3350                view.unsigned = ::buffa::types::decode_bool(&mut cur)?;
3351            }
3352            17u32 => {
3353                ::buffa::encoding::check_wire_type(
3354                    tag,
3355                    ::buffa::encoding::WireType::Varint,
3356                )?;
3357                view.array_dims = ::buffa::types::decode_int32(&mut cur)?;
3358            }
3359            _ => {
3360                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
3361                let span_len = before_tag.len() - cur.len();
3362                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
3363            }
3364        }
3365        ::core::result::Result::Ok(cur)
3366    }
3367    fn to_owned_message(
3368        &self,
3369    ) -> ::core::result::Result<super::super::Column, ::buffa::DecodeError> {
3370        self.to_owned_from_source(None)
3371    }
3372    #[allow(clippy::useless_conversion, clippy::needless_update)]
3373    fn to_owned_from_source(
3374        &self,
3375        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3376    ) -> ::core::result::Result<super::super::Column, ::buffa::DecodeError> {
3377        #[allow(unused_imports)]
3378        use ::buffa::alloc::string::ToString as _;
3379        let _ = __buffa_src;
3380        ::core::result::Result::Ok(super::super::Column {
3381            name: self.name.to_string(),
3382            not_null: self.not_null,
3383            is_array: self.is_array,
3384            comment: self.comment.to_string(),
3385            length: self.length,
3386            is_named_param: self.is_named_param,
3387            is_func_call: self.is_func_call,
3388            scope: self.scope.to_string(),
3389            table: match self.table.as_option() {
3390                Some(v) => {
3391                    ::buffa::MessageField::<
3392                        super::super::Identifier,
3393                        ::buffa::Inline<super::super::Identifier>,
3394                    >::some(v.to_owned_from_source(__buffa_src)?)
3395                }
3396                None => ::buffa::MessageField::none(),
3397            },
3398            table_alias: self.table_alias.to_string(),
3399            r#type: match self.r#type.as_option() {
3400                Some(v) => {
3401                    ::buffa::MessageField::<
3402                        super::super::Identifier,
3403                        ::buffa::Inline<super::super::Identifier>,
3404                    >::some(v.to_owned_from_source(__buffa_src)?)
3405                }
3406                None => ::buffa::MessageField::none(),
3407            },
3408            is_sqlc_slice: self.is_sqlc_slice,
3409            embed_table: match self.embed_table.as_option() {
3410                Some(v) => {
3411                    ::buffa::MessageField::<
3412                        super::super::Identifier,
3413                        ::buffa::Inline<super::super::Identifier>,
3414                    >::some(v.to_owned_from_source(__buffa_src)?)
3415                }
3416                None => ::buffa::MessageField::none(),
3417            },
3418            original_name: self.original_name.to_string(),
3419            unsigned: self.unsigned,
3420            array_dims: self.array_dims,
3421            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
3422            ..::core::default::Default::default()
3423        })
3424    }
3425}
3426impl<'a> ::buffa::ViewEncode<'a> for ColumnView<'a> {
3427    #[allow(clippy::needless_borrow, clippy::let_and_return)]
3428    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3429        #[allow(unused_imports)]
3430        use ::buffa::Enumeration as _;
3431        let mut size = 0u64;
3432        if !self.name.is_empty() {
3433            size += 1u64 + ::buffa::types::string_encoded_len(&self.name) as u64;
3434        }
3435        if self.not_null {
3436            size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
3437        }
3438        if self.is_array {
3439            size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
3440        }
3441        if !self.comment.is_empty() {
3442            size += 1u64 + ::buffa::types::string_encoded_len(&self.comment) as u64;
3443        }
3444        if self.length != 0i32 {
3445            size += 1u64 + ::buffa::types::int32_encoded_len(self.length) as u64;
3446        }
3447        if self.is_named_param {
3448            size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
3449        }
3450        if self.is_func_call {
3451            size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
3452        }
3453        if !self.scope.is_empty() {
3454            size += 1u64 + ::buffa::types::string_encoded_len(&self.scope) as u64;
3455        }
3456        if self.table.is_set() {
3457            let __slot = __cache.reserve();
3458            let inner_size = self.table.compute_size(__cache);
3459            __cache.set(__slot, inner_size);
3460            size
3461                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
3462                    + inner_size as u64;
3463        }
3464        if !self.table_alias.is_empty() {
3465            size += 1u64 + ::buffa::types::string_encoded_len(&self.table_alias) as u64;
3466        }
3467        if self.r#type.is_set() {
3468            let __slot = __cache.reserve();
3469            let inner_size = self.r#type.compute_size(__cache);
3470            __cache.set(__slot, inner_size);
3471            size
3472                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
3473                    + inner_size as u64;
3474        }
3475        if self.is_sqlc_slice {
3476            size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
3477        }
3478        if self.embed_table.is_set() {
3479            let __slot = __cache.reserve();
3480            let inner_size = self.embed_table.compute_size(__cache);
3481            __cache.set(__slot, inner_size);
3482            size
3483                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
3484                    + inner_size as u64;
3485        }
3486        if !self.original_name.is_empty() {
3487            size
3488                += 1u64 + ::buffa::types::string_encoded_len(&self.original_name) as u64;
3489        }
3490        if self.unsigned {
3491            size += 2u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
3492        }
3493        if self.array_dims != 0i32 {
3494            size += 2u64 + ::buffa::types::int32_encoded_len(self.array_dims) as u64;
3495        }
3496        size += self.__buffa_unknown_fields.encoded_len() as u64;
3497        ::buffa::saturate_size(size)
3498    }
3499    #[allow(clippy::needless_borrow)]
3500    fn write_to(
3501        &self,
3502        __cache: &mut ::buffa::SizeCache,
3503        buf: &mut impl ::buffa::EncodeSink,
3504    ) {
3505        #[allow(unused_imports)]
3506        use ::buffa::Enumeration as _;
3507        if !self.name.is_empty() {
3508            ::buffa::types::put_string_field(1u32, &self.name, buf);
3509        }
3510        if self.not_null {
3511            ::buffa::types::put_bool_field(3u32, self.not_null, buf);
3512        }
3513        if self.is_array {
3514            ::buffa::types::put_bool_field(4u32, self.is_array, buf);
3515        }
3516        if !self.comment.is_empty() {
3517            ::buffa::types::put_string_field(5u32, &self.comment, buf);
3518        }
3519        if self.length != 0i32 {
3520            ::buffa::types::put_int32_field(6u32, self.length, buf);
3521        }
3522        if self.is_named_param {
3523            ::buffa::types::put_bool_field(7u32, self.is_named_param, buf);
3524        }
3525        if self.is_func_call {
3526            ::buffa::types::put_bool_field(8u32, self.is_func_call, buf);
3527        }
3528        if !self.scope.is_empty() {
3529            ::buffa::types::put_string_field(9u32, &self.scope, buf);
3530        }
3531        if self.table.is_set() {
3532            ::buffa::types::put_len_delimited_header(
3533                10u32,
3534                u64::from(__cache.consume_next()),
3535                buf,
3536            );
3537            self.table.write_to(__cache, buf);
3538        }
3539        if !self.table_alias.is_empty() {
3540            ::buffa::types::put_string_field(11u32, &self.table_alias, buf);
3541        }
3542        if self.r#type.is_set() {
3543            ::buffa::types::put_len_delimited_header(
3544                12u32,
3545                u64::from(__cache.consume_next()),
3546                buf,
3547            );
3548            self.r#type.write_to(__cache, buf);
3549        }
3550        if self.is_sqlc_slice {
3551            ::buffa::types::put_bool_field(13u32, self.is_sqlc_slice, buf);
3552        }
3553        if self.embed_table.is_set() {
3554            ::buffa::types::put_len_delimited_header(
3555                14u32,
3556                u64::from(__cache.consume_next()),
3557                buf,
3558            );
3559            self.embed_table.write_to(__cache, buf);
3560        }
3561        if !self.original_name.is_empty() {
3562            ::buffa::types::put_string_field(15u32, &self.original_name, buf);
3563        }
3564        if self.unsigned {
3565            ::buffa::types::put_bool_field(16u32, self.unsigned, buf);
3566        }
3567        if self.array_dims != 0i32 {
3568            ::buffa::types::put_int32_field(17u32, self.array_dims, buf);
3569        }
3570        self.__buffa_unknown_fields.write_to(buf);
3571    }
3572}
3573impl<'a> ::buffa::MessageName for ColumnView<'a> {
3574    const PACKAGE: &'static str = "plugin";
3575    const NAME: &'static str = "Column";
3576    const FULL_NAME: &'static str = "plugin.Column";
3577    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Column";
3578}
3579::buffa::impl_default_view_instance!(ColumnView);
3580::buffa::impl_view_reborrow!(ColumnView);
3581/** Self-contained, `'static` owned view of a `Column` message.
3582
3583 Wraps [`::buffa::OwnedView`]`<`[`ColumnView`]`<'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.
3584
3585 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ColumnView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3586#[derive(Clone, Debug)]
3587pub struct ColumnOwnedView(::buffa::OwnedView<ColumnView<'static>>);
3588impl ColumnOwnedView {
3589    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3590    ///
3591    /// The view borrows directly from the buffer's data; the buffer is
3592    /// retained inside the returned handle.
3593    ///
3594    /// # Errors
3595    ///
3596    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3597    /// protobuf data.
3598    pub fn decode(
3599        bytes: ::buffa::bytes::Bytes,
3600    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3601        ::core::result::Result::Ok(ColumnOwnedView(::buffa::OwnedView::decode(bytes)?))
3602    }
3603    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3604    /// max message size).
3605    ///
3606    /// # Errors
3607    ///
3608    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3609    /// exceeds the configured limits.
3610    pub fn decode_with_options(
3611        bytes: ::buffa::bytes::Bytes,
3612        opts: &::buffa::DecodeOptions,
3613    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3614        ::core::result::Result::Ok(
3615            ColumnOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
3616        )
3617    }
3618    /// Build from an owned message via an encode → decode round-trip.
3619    ///
3620    /// # Errors
3621    ///
3622    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
3623    /// message's encoded size exceeds the 2 GiB protobuf limit, or
3624    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
3625    /// somehow invalid (should not happen for well-formed messages).
3626    pub fn from_owned(
3627        msg: &super::super::Column,
3628    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3629        ::core::result::Result::Ok(ColumnOwnedView(::buffa::OwnedView::from_owned(msg)?))
3630    }
3631    /// Borrow the full [`ColumnView`] with its lifetime tied to `&self`.
3632    #[must_use]
3633    pub fn view(&self) -> &ColumnView<'_> {
3634        self.0.reborrow()
3635    }
3636    /// Convert to the owned message type.
3637    ///
3638    /// Infallible: this type's constructors wire-decode their
3639    /// buffer, and a view produced by wire decoding always
3640    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
3641    /// whose contract also governs handles converted from a raw
3642    /// [`::buffa::OwnedView`].
3643    #[must_use]
3644    pub fn to_owned_message(&self) -> super::super::Column {
3645        self.0.to_owned_message()
3646    }
3647    /// The underlying bytes buffer.
3648    #[must_use]
3649    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3650        self.0.bytes()
3651    }
3652    /// Consume the handle, returning the underlying bytes buffer.
3653    #[must_use]
3654    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3655        self.0.into_bytes()
3656    }
3657    /// Field 1: `name`
3658    #[must_use]
3659    pub fn name(&self) -> &'_ str {
3660        self.0.reborrow().name
3661    }
3662    /// Field 3: `not_null`
3663    #[must_use]
3664    pub fn not_null(&self) -> bool {
3665        self.0.reborrow().not_null
3666    }
3667    /// Field 4: `is_array`
3668    #[must_use]
3669    pub fn is_array(&self) -> bool {
3670        self.0.reborrow().is_array
3671    }
3672    /// Field 5: `comment`
3673    #[must_use]
3674    pub fn comment(&self) -> &'_ str {
3675        self.0.reborrow().comment
3676    }
3677    /// Field 6: `length`
3678    #[must_use]
3679    pub fn length(&self) -> i32 {
3680        self.0.reborrow().length
3681    }
3682    /// Field 7: `is_named_param`
3683    #[must_use]
3684    pub fn is_named_param(&self) -> bool {
3685        self.0.reborrow().is_named_param
3686    }
3687    /// Field 8: `is_func_call`
3688    #[must_use]
3689    pub fn is_func_call(&self) -> bool {
3690        self.0.reborrow().is_func_call
3691    }
3692    /// XXX: Figure out what PostgreSQL calls `foo.id`
3693    ///
3694    /// Field 9: `scope`
3695    #[must_use]
3696    pub fn scope(&self) -> &'_ str {
3697        self.0.reborrow().scope
3698    }
3699    /// Field 10: `table`
3700    #[must_use]
3701    pub fn table(
3702        &self,
3703    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::IdentifierView<'_>> {
3704        &self.0.reborrow().table
3705    }
3706    /// Field 11: `table_alias`
3707    #[must_use]
3708    pub fn table_alias(&self) -> &'_ str {
3709        self.0.reborrow().table_alias
3710    }
3711    /// Field 12: `type`
3712    #[must_use]
3713    pub fn r#type(
3714        &self,
3715    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::IdentifierView<'_>> {
3716        &self.0.reborrow().r#type
3717    }
3718    /// Field 13: `is_sqlc_slice`
3719    #[must_use]
3720    pub fn is_sqlc_slice(&self) -> bool {
3721        self.0.reborrow().is_sqlc_slice
3722    }
3723    /// Field 14: `embed_table`
3724    #[must_use]
3725    pub fn embed_table(
3726        &self,
3727    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::IdentifierView<'_>> {
3728        &self.0.reborrow().embed_table
3729    }
3730    /// Field 15: `original_name`
3731    #[must_use]
3732    pub fn original_name(&self) -> &'_ str {
3733        self.0.reborrow().original_name
3734    }
3735    /// Field 16: `unsigned`
3736    #[must_use]
3737    pub fn unsigned(&self) -> bool {
3738        self.0.reborrow().unsigned
3739    }
3740    /// Field 17: `array_dims`
3741    #[must_use]
3742    pub fn array_dims(&self) -> i32 {
3743        self.0.reborrow().array_dims
3744    }
3745}
3746impl ::core::convert::From<::buffa::OwnedView<ColumnView<'static>>> for ColumnOwnedView {
3747    fn from(inner: ::buffa::OwnedView<ColumnView<'static>>) -> Self {
3748        ColumnOwnedView(inner)
3749    }
3750}
3751impl ::core::convert::From<ColumnOwnedView> for ::buffa::OwnedView<ColumnView<'static>> {
3752    fn from(wrapper: ColumnOwnedView) -> Self {
3753        wrapper.0
3754    }
3755}
3756impl ::core::convert::AsRef<::buffa::OwnedView<ColumnView<'static>>>
3757for ColumnOwnedView {
3758    fn as_ref(&self) -> &::buffa::OwnedView<ColumnView<'static>> {
3759        &self.0
3760    }
3761}
3762impl ::buffa::HasMessageView for super::super::Column {
3763    type View<'a> = ColumnView<'a>;
3764    type ViewHandle = ColumnOwnedView;
3765}
3766#[derive(Clone, Debug, Default)]
3767pub struct QueryView<'a> {
3768    /// Field 1: `text`
3769    pub text: &'a str,
3770    /// Field 2: `name`
3771    pub name: &'a str,
3772    /// Field 3: `cmd`
3773    pub cmd: &'a str,
3774    /// Field 4: `columns`
3775    pub columns: ::buffa::RepeatedView<'a, super::super::__buffa::view::ColumnView<'a>>,
3776    /// Field 5: `params`
3777    pub params: ::buffa::RepeatedView<
3778        'a,
3779        super::super::__buffa::view::ParameterView<'a>,
3780    >,
3781    /// Field 6: `comments`
3782    pub comments: ::buffa::RepeatedView<'a, &'a str>,
3783    /// Field 7: `filename`
3784    pub filename: &'a str,
3785    /// Field 8: `insert_into_table`
3786    pub insert_into_table: ::buffa::MessageFieldView<
3787        super::super::__buffa::view::IdentifierView<'a>,
3788    >,
3789    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3790}
3791impl<'a> ::buffa::MessageView<'a> for QueryView<'a> {
3792    type Owned = super::super::Query;
3793    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3794        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
3795        <Self as ::buffa::MessageView>::decode_view_ctx(
3796            buf,
3797            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
3798        )
3799    }
3800    fn decode_view_with_ctx(
3801        buf: &'a [u8],
3802        ctx: ::buffa::DecodeContext<'_>,
3803    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3804        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
3805    }
3806    #[inline]
3807    fn merge_view_field(
3808        &mut self,
3809        tag: ::buffa::encoding::Tag,
3810        cur: &'a [u8],
3811        before_tag: &'a [u8],
3812        ctx: ::buffa::DecodeContext<'_>,
3813    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
3814        let _ = ctx;
3815        #[allow(unused_variables)]
3816        let view = self;
3817        let mut cur = cur;
3818        match tag.field_number() {
3819            1u32 => {
3820                ::buffa::encoding::check_wire_type(
3821                    tag,
3822                    ::buffa::encoding::WireType::LengthDelimited,
3823                )?;
3824                view.text = ::buffa::types::borrow_str(&mut cur)?;
3825            }
3826            2u32 => {
3827                ::buffa::encoding::check_wire_type(
3828                    tag,
3829                    ::buffa::encoding::WireType::LengthDelimited,
3830                )?;
3831                view.name = ::buffa::types::borrow_str(&mut cur)?;
3832            }
3833            3u32 => {
3834                ::buffa::encoding::check_wire_type(
3835                    tag,
3836                    ::buffa::encoding::WireType::LengthDelimited,
3837                )?;
3838                view.cmd = ::buffa::types::borrow_str(&mut cur)?;
3839            }
3840            7u32 => {
3841                ::buffa::encoding::check_wire_type(
3842                    tag,
3843                    ::buffa::encoding::WireType::LengthDelimited,
3844                )?;
3845                view.filename = ::buffa::types::borrow_str(&mut cur)?;
3846            }
3847            8u32 => {
3848                ::buffa::encoding::check_wire_type(
3849                    tag,
3850                    ::buffa::encoding::WireType::LengthDelimited,
3851                )?;
3852                let __sub_ctx = ctx.descend()?;
3853                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3854                match view.insert_into_table.as_mut() {
3855                    Some(existing) => {
3856                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
3857                    }
3858                    None => {
3859                        view.insert_into_table = ::buffa::MessageFieldView::set(
3860                            <super::super::__buffa::view::IdentifierView as ::buffa::MessageView>::decode_view_ctx(
3861                                sub,
3862                                __sub_ctx,
3863                            )?,
3864                        );
3865                    }
3866                }
3867            }
3868            4u32 => {
3869                ::buffa::encoding::check_wire_type(
3870                    tag,
3871                    ::buffa::encoding::WireType::LengthDelimited,
3872                )?;
3873                let __sub_ctx = ctx.descend()?;
3874                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3875                ctx.register_element_memory(
3876                    ::core::mem::size_of::<super::super::__buffa::view::ColumnView>(),
3877                )?;
3878                view.columns
3879                    .push(
3880                        <super::super::__buffa::view::ColumnView as ::buffa::MessageView>::decode_view_ctx(
3881                            sub,
3882                            __sub_ctx,
3883                        )?,
3884                    );
3885            }
3886            5u32 => {
3887                ::buffa::encoding::check_wire_type(
3888                    tag,
3889                    ::buffa::encoding::WireType::LengthDelimited,
3890                )?;
3891                let __sub_ctx = ctx.descend()?;
3892                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3893                ctx.register_element_memory(
3894                    ::core::mem::size_of::<super::super::__buffa::view::ParameterView>(),
3895                )?;
3896                view.params
3897                    .push(
3898                        <super::super::__buffa::view::ParameterView as ::buffa::MessageView>::decode_view_ctx(
3899                            sub,
3900                            __sub_ctx,
3901                        )?,
3902                    );
3903            }
3904            6u32 => {
3905                ::buffa::encoding::check_wire_type(
3906                    tag,
3907                    ::buffa::encoding::WireType::LengthDelimited,
3908                )?;
3909                let __elem = ::buffa::types::borrow_str(&mut cur)?;
3910                ctx.register_element_memory(
3911                    ::buffa::__private::element_footprint(&__elem),
3912                )?;
3913                view.comments.push(__elem);
3914            }
3915            _ => {
3916                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
3917                let span_len = before_tag.len() - cur.len();
3918                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
3919            }
3920        }
3921        ::core::result::Result::Ok(cur)
3922    }
3923    fn to_owned_message(
3924        &self,
3925    ) -> ::core::result::Result<super::super::Query, ::buffa::DecodeError> {
3926        self.to_owned_from_source(None)
3927    }
3928    #[allow(clippy::useless_conversion, clippy::needless_update)]
3929    fn to_owned_from_source(
3930        &self,
3931        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3932    ) -> ::core::result::Result<super::super::Query, ::buffa::DecodeError> {
3933        #[allow(unused_imports)]
3934        use ::buffa::alloc::string::ToString as _;
3935        let _ = __buffa_src;
3936        ::core::result::Result::Ok(super::super::Query {
3937            text: self.text.to_string(),
3938            name: self.name.to_string(),
3939            cmd: self.cmd.to_string(),
3940            columns: self
3941                .columns
3942                .iter()
3943                .map(|v| v.to_owned_from_source(__buffa_src))
3944                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
3945            params: self
3946                .params
3947                .iter()
3948                .map(|v| v.to_owned_from_source(__buffa_src))
3949                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
3950            comments: self.comments.iter().map(|s| s.to_string()).collect(),
3951            filename: self.filename.to_string(),
3952            insert_into_table: match self.insert_into_table.as_option() {
3953                Some(v) => {
3954                    ::buffa::MessageField::<
3955                        super::super::Identifier,
3956                        ::buffa::Inline<super::super::Identifier>,
3957                    >::some(v.to_owned_from_source(__buffa_src)?)
3958                }
3959                None => ::buffa::MessageField::none(),
3960            },
3961            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
3962            ..::core::default::Default::default()
3963        })
3964    }
3965}
3966impl<'a> ::buffa::ViewEncode<'a> for QueryView<'a> {
3967    #[allow(clippy::needless_borrow, clippy::let_and_return)]
3968    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3969        #[allow(unused_imports)]
3970        use ::buffa::Enumeration as _;
3971        let mut size = 0u64;
3972        if !self.text.is_empty() {
3973            size += 1u64 + ::buffa::types::string_encoded_len(&self.text) as u64;
3974        }
3975        if !self.name.is_empty() {
3976            size += 1u64 + ::buffa::types::string_encoded_len(&self.name) as u64;
3977        }
3978        if !self.cmd.is_empty() {
3979            size += 1u64 + ::buffa::types::string_encoded_len(&self.cmd) as u64;
3980        }
3981        for v in &self.columns {
3982            let __slot = __cache.reserve();
3983            let inner_size = v.compute_size(__cache);
3984            __cache.set(__slot, inner_size);
3985            size
3986                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
3987                    + inner_size as u64;
3988        }
3989        for v in &self.params {
3990            let __slot = __cache.reserve();
3991            let inner_size = v.compute_size(__cache);
3992            __cache.set(__slot, inner_size);
3993            size
3994                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
3995                    + inner_size as u64;
3996        }
3997        for v in &self.comments {
3998            size += 1u64 + ::buffa::types::string_encoded_len(v) as u64;
3999        }
4000        if !self.filename.is_empty() {
4001            size += 1u64 + ::buffa::types::string_encoded_len(&self.filename) as u64;
4002        }
4003        if self.insert_into_table.is_set() {
4004            let __slot = __cache.reserve();
4005            let inner_size = self.insert_into_table.compute_size(__cache);
4006            __cache.set(__slot, inner_size);
4007            size
4008                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
4009                    + inner_size as u64;
4010        }
4011        size += self.__buffa_unknown_fields.encoded_len() as u64;
4012        ::buffa::saturate_size(size)
4013    }
4014    #[allow(clippy::needless_borrow)]
4015    fn write_to(
4016        &self,
4017        __cache: &mut ::buffa::SizeCache,
4018        buf: &mut impl ::buffa::EncodeSink,
4019    ) {
4020        #[allow(unused_imports)]
4021        use ::buffa::Enumeration as _;
4022        if !self.text.is_empty() {
4023            ::buffa::types::put_string_field(1u32, &self.text, buf);
4024        }
4025        if !self.name.is_empty() {
4026            ::buffa::types::put_string_field(2u32, &self.name, buf);
4027        }
4028        if !self.cmd.is_empty() {
4029            ::buffa::types::put_string_field(3u32, &self.cmd, buf);
4030        }
4031        for v in &self.columns {
4032            ::buffa::types::put_len_delimited_header(
4033                4u32,
4034                u64::from(__cache.consume_next()),
4035                buf,
4036            );
4037            v.write_to(__cache, buf);
4038        }
4039        for v in &self.params {
4040            ::buffa::types::put_len_delimited_header(
4041                5u32,
4042                u64::from(__cache.consume_next()),
4043                buf,
4044            );
4045            v.write_to(__cache, buf);
4046        }
4047        for v in &self.comments {
4048            ::buffa::types::put_string_field(6u32, v, buf);
4049        }
4050        if !self.filename.is_empty() {
4051            ::buffa::types::put_string_field(7u32, &self.filename, buf);
4052        }
4053        if self.insert_into_table.is_set() {
4054            ::buffa::types::put_len_delimited_header(
4055                8u32,
4056                u64::from(__cache.consume_next()),
4057                buf,
4058            );
4059            self.insert_into_table.write_to(__cache, buf);
4060        }
4061        self.__buffa_unknown_fields.write_to(buf);
4062    }
4063}
4064impl<'a> ::buffa::MessageName for QueryView<'a> {
4065    const PACKAGE: &'static str = "plugin";
4066    const NAME: &'static str = "Query";
4067    const FULL_NAME: &'static str = "plugin.Query";
4068    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Query";
4069}
4070::buffa::impl_default_view_instance!(QueryView);
4071::buffa::impl_view_reborrow!(QueryView);
4072/** Self-contained, `'static` owned view of a `Query` message.
4073
4074 Wraps [`::buffa::OwnedView`]`<`[`QueryView`]`<'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.
4075
4076 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`QueryView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4077#[derive(Clone, Debug)]
4078pub struct QueryOwnedView(::buffa::OwnedView<QueryView<'static>>);
4079impl QueryOwnedView {
4080    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4081    ///
4082    /// The view borrows directly from the buffer's data; the buffer is
4083    /// retained inside the returned handle.
4084    ///
4085    /// # Errors
4086    ///
4087    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4088    /// protobuf data.
4089    pub fn decode(
4090        bytes: ::buffa::bytes::Bytes,
4091    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4092        ::core::result::Result::Ok(QueryOwnedView(::buffa::OwnedView::decode(bytes)?))
4093    }
4094    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4095    /// max message size).
4096    ///
4097    /// # Errors
4098    ///
4099    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4100    /// exceeds the configured limits.
4101    pub fn decode_with_options(
4102        bytes: ::buffa::bytes::Bytes,
4103        opts: &::buffa::DecodeOptions,
4104    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4105        ::core::result::Result::Ok(
4106            QueryOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
4107        )
4108    }
4109    /// Build from an owned message via an encode → decode round-trip.
4110    ///
4111    /// # Errors
4112    ///
4113    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
4114    /// message's encoded size exceeds the 2 GiB protobuf limit, or
4115    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
4116    /// somehow invalid (should not happen for well-formed messages).
4117    pub fn from_owned(
4118        msg: &super::super::Query,
4119    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4120        ::core::result::Result::Ok(QueryOwnedView(::buffa::OwnedView::from_owned(msg)?))
4121    }
4122    /// Borrow the full [`QueryView`] with its lifetime tied to `&self`.
4123    #[must_use]
4124    pub fn view(&self) -> &QueryView<'_> {
4125        self.0.reborrow()
4126    }
4127    /// Convert to the owned message type.
4128    ///
4129    /// Infallible: this type's constructors wire-decode their
4130    /// buffer, and a view produced by wire decoding always
4131    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
4132    /// whose contract also governs handles converted from a raw
4133    /// [`::buffa::OwnedView`].
4134    #[must_use]
4135    pub fn to_owned_message(&self) -> super::super::Query {
4136        self.0.to_owned_message()
4137    }
4138    /// The underlying bytes buffer.
4139    #[must_use]
4140    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4141        self.0.bytes()
4142    }
4143    /// Consume the handle, returning the underlying bytes buffer.
4144    #[must_use]
4145    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4146        self.0.into_bytes()
4147    }
4148    /// Field 1: `text`
4149    #[must_use]
4150    pub fn text(&self) -> &'_ str {
4151        self.0.reborrow().text
4152    }
4153    /// Field 2: `name`
4154    #[must_use]
4155    pub fn name(&self) -> &'_ str {
4156        self.0.reborrow().name
4157    }
4158    /// Field 3: `cmd`
4159    #[must_use]
4160    pub fn cmd(&self) -> &'_ str {
4161        self.0.reborrow().cmd
4162    }
4163    /// Field 4: `columns`
4164    #[must_use]
4165    pub fn columns(
4166        &self,
4167    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::ColumnView<'_>> {
4168        &self.0.reborrow().columns
4169    }
4170    /// Field 5: `params`
4171    #[must_use]
4172    pub fn params(
4173        &self,
4174    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::ParameterView<'_>> {
4175        &self.0.reborrow().params
4176    }
4177    /// Field 6: `comments`
4178    #[must_use]
4179    pub fn comments(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
4180        &self.0.reborrow().comments
4181    }
4182    /// Field 7: `filename`
4183    #[must_use]
4184    pub fn filename(&self) -> &'_ str {
4185        self.0.reborrow().filename
4186    }
4187    /// Field 8: `insert_into_table`
4188    #[must_use]
4189    pub fn insert_into_table(
4190        &self,
4191    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::IdentifierView<'_>> {
4192        &self.0.reborrow().insert_into_table
4193    }
4194}
4195impl ::core::convert::From<::buffa::OwnedView<QueryView<'static>>> for QueryOwnedView {
4196    fn from(inner: ::buffa::OwnedView<QueryView<'static>>) -> Self {
4197        QueryOwnedView(inner)
4198    }
4199}
4200impl ::core::convert::From<QueryOwnedView> for ::buffa::OwnedView<QueryView<'static>> {
4201    fn from(wrapper: QueryOwnedView) -> Self {
4202        wrapper.0
4203    }
4204}
4205impl ::core::convert::AsRef<::buffa::OwnedView<QueryView<'static>>> for QueryOwnedView {
4206    fn as_ref(&self) -> &::buffa::OwnedView<QueryView<'static>> {
4207        &self.0
4208    }
4209}
4210impl ::buffa::HasMessageView for super::super::Query {
4211    type View<'a> = QueryView<'a>;
4212    type ViewHandle = QueryOwnedView;
4213}
4214#[derive(Clone, Debug, Default)]
4215pub struct ParameterView<'a> {
4216    /// Field 1: `number`
4217    pub number: i32,
4218    /// Field 2: `column`
4219    pub column: ::buffa::MessageFieldView<super::super::__buffa::view::ColumnView<'a>>,
4220    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4221}
4222impl<'a> ::buffa::MessageView<'a> for ParameterView<'a> {
4223    type Owned = super::super::Parameter;
4224    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4225        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
4226        <Self as ::buffa::MessageView>::decode_view_ctx(
4227            buf,
4228            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4229        )
4230    }
4231    fn decode_view_with_ctx(
4232        buf: &'a [u8],
4233        ctx: ::buffa::DecodeContext<'_>,
4234    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4235        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4236    }
4237    #[inline]
4238    fn merge_view_field(
4239        &mut self,
4240        tag: ::buffa::encoding::Tag,
4241        cur: &'a [u8],
4242        before_tag: &'a [u8],
4243        ctx: ::buffa::DecodeContext<'_>,
4244    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4245        let _ = ctx;
4246        #[allow(unused_variables)]
4247        let view = self;
4248        let mut cur = cur;
4249        match tag.field_number() {
4250            1u32 => {
4251                ::buffa::encoding::check_wire_type(
4252                    tag,
4253                    ::buffa::encoding::WireType::Varint,
4254                )?;
4255                view.number = ::buffa::types::decode_int32(&mut cur)?;
4256            }
4257            2u32 => {
4258                ::buffa::encoding::check_wire_type(
4259                    tag,
4260                    ::buffa::encoding::WireType::LengthDelimited,
4261                )?;
4262                let __sub_ctx = ctx.descend()?;
4263                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4264                match view.column.as_mut() {
4265                    Some(existing) => {
4266                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
4267                    }
4268                    None => {
4269                        view.column = ::buffa::MessageFieldView::set(
4270                            <super::super::__buffa::view::ColumnView as ::buffa::MessageView>::decode_view_ctx(
4271                                sub,
4272                                __sub_ctx,
4273                            )?,
4274                        );
4275                    }
4276                }
4277            }
4278            _ => {
4279                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4280                let span_len = before_tag.len() - cur.len();
4281                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
4282            }
4283        }
4284        ::core::result::Result::Ok(cur)
4285    }
4286    fn to_owned_message(
4287        &self,
4288    ) -> ::core::result::Result<super::super::Parameter, ::buffa::DecodeError> {
4289        self.to_owned_from_source(None)
4290    }
4291    #[allow(clippy::useless_conversion, clippy::needless_update)]
4292    fn to_owned_from_source(
4293        &self,
4294        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4295    ) -> ::core::result::Result<super::super::Parameter, ::buffa::DecodeError> {
4296        #[allow(unused_imports)]
4297        use ::buffa::alloc::string::ToString as _;
4298        let _ = __buffa_src;
4299        ::core::result::Result::Ok(super::super::Parameter {
4300            number: self.number,
4301            column: match self.column.as_option() {
4302                Some(v) => {
4303                    ::buffa::MessageField::<
4304                        super::super::Column,
4305                        ::buffa::Inline<super::super::Column>,
4306                    >::some(v.to_owned_from_source(__buffa_src)?)
4307                }
4308                None => ::buffa::MessageField::none(),
4309            },
4310            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
4311            ..::core::default::Default::default()
4312        })
4313    }
4314}
4315impl<'a> ::buffa::ViewEncode<'a> for ParameterView<'a> {
4316    #[allow(clippy::needless_borrow, clippy::let_and_return)]
4317    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4318        #[allow(unused_imports)]
4319        use ::buffa::Enumeration as _;
4320        let mut size = 0u64;
4321        if self.number != 0i32 {
4322            size += 1u64 + ::buffa::types::int32_encoded_len(self.number) as u64;
4323        }
4324        if self.column.is_set() {
4325            let __slot = __cache.reserve();
4326            let inner_size = self.column.compute_size(__cache);
4327            __cache.set(__slot, inner_size);
4328            size
4329                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
4330                    + inner_size as u64;
4331        }
4332        size += self.__buffa_unknown_fields.encoded_len() as u64;
4333        ::buffa::saturate_size(size)
4334    }
4335    #[allow(clippy::needless_borrow)]
4336    fn write_to(
4337        &self,
4338        __cache: &mut ::buffa::SizeCache,
4339        buf: &mut impl ::buffa::EncodeSink,
4340    ) {
4341        #[allow(unused_imports)]
4342        use ::buffa::Enumeration as _;
4343        if self.number != 0i32 {
4344            ::buffa::types::put_int32_field(1u32, self.number, buf);
4345        }
4346        if self.column.is_set() {
4347            ::buffa::types::put_len_delimited_header(
4348                2u32,
4349                u64::from(__cache.consume_next()),
4350                buf,
4351            );
4352            self.column.write_to(__cache, buf);
4353        }
4354        self.__buffa_unknown_fields.write_to(buf);
4355    }
4356}
4357impl<'a> ::buffa::MessageName for ParameterView<'a> {
4358    const PACKAGE: &'static str = "plugin";
4359    const NAME: &'static str = "Parameter";
4360    const FULL_NAME: &'static str = "plugin.Parameter";
4361    const TYPE_URL: &'static str = "type.googleapis.com/plugin.Parameter";
4362}
4363::buffa::impl_default_view_instance!(ParameterView);
4364::buffa::impl_view_reborrow!(ParameterView);
4365/** Self-contained, `'static` owned view of a `Parameter` message.
4366
4367 Wraps [`::buffa::OwnedView`]`<`[`ParameterView`]`<'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.
4368
4369 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ParameterView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4370#[derive(Clone, Debug)]
4371pub struct ParameterOwnedView(::buffa::OwnedView<ParameterView<'static>>);
4372impl ParameterOwnedView {
4373    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4374    ///
4375    /// The view borrows directly from the buffer's data; the buffer is
4376    /// retained inside the returned handle.
4377    ///
4378    /// # Errors
4379    ///
4380    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4381    /// protobuf data.
4382    pub fn decode(
4383        bytes: ::buffa::bytes::Bytes,
4384    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4385        ::core::result::Result::Ok(
4386            ParameterOwnedView(::buffa::OwnedView::decode(bytes)?),
4387        )
4388    }
4389    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4390    /// max message size).
4391    ///
4392    /// # Errors
4393    ///
4394    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4395    /// exceeds the configured limits.
4396    pub fn decode_with_options(
4397        bytes: ::buffa::bytes::Bytes,
4398        opts: &::buffa::DecodeOptions,
4399    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4400        ::core::result::Result::Ok(
4401            ParameterOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
4402        )
4403    }
4404    /// Build from an owned message via an encode → decode round-trip.
4405    ///
4406    /// # Errors
4407    ///
4408    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
4409    /// message's encoded size exceeds the 2 GiB protobuf limit, or
4410    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
4411    /// somehow invalid (should not happen for well-formed messages).
4412    pub fn from_owned(
4413        msg: &super::super::Parameter,
4414    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4415        ::core::result::Result::Ok(
4416            ParameterOwnedView(::buffa::OwnedView::from_owned(msg)?),
4417        )
4418    }
4419    /// Borrow the full [`ParameterView`] with its lifetime tied to `&self`.
4420    #[must_use]
4421    pub fn view(&self) -> &ParameterView<'_> {
4422        self.0.reborrow()
4423    }
4424    /// Convert to the owned message type.
4425    ///
4426    /// Infallible: this type's constructors wire-decode their
4427    /// buffer, and a view produced by wire decoding always
4428    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
4429    /// whose contract also governs handles converted from a raw
4430    /// [`::buffa::OwnedView`].
4431    #[must_use]
4432    pub fn to_owned_message(&self) -> super::super::Parameter {
4433        self.0.to_owned_message()
4434    }
4435    /// The underlying bytes buffer.
4436    #[must_use]
4437    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4438        self.0.bytes()
4439    }
4440    /// Consume the handle, returning the underlying bytes buffer.
4441    #[must_use]
4442    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4443        self.0.into_bytes()
4444    }
4445    /// Field 1: `number`
4446    #[must_use]
4447    pub fn number(&self) -> i32 {
4448        self.0.reborrow().number
4449    }
4450    /// Field 2: `column`
4451    #[must_use]
4452    pub fn column(
4453        &self,
4454    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::ColumnView<'_>> {
4455        &self.0.reborrow().column
4456    }
4457}
4458impl ::core::convert::From<::buffa::OwnedView<ParameterView<'static>>>
4459for ParameterOwnedView {
4460    fn from(inner: ::buffa::OwnedView<ParameterView<'static>>) -> Self {
4461        ParameterOwnedView(inner)
4462    }
4463}
4464impl ::core::convert::From<ParameterOwnedView>
4465for ::buffa::OwnedView<ParameterView<'static>> {
4466    fn from(wrapper: ParameterOwnedView) -> Self {
4467        wrapper.0
4468    }
4469}
4470impl ::core::convert::AsRef<::buffa::OwnedView<ParameterView<'static>>>
4471for ParameterOwnedView {
4472    fn as_ref(&self) -> &::buffa::OwnedView<ParameterView<'static>> {
4473        &self.0
4474    }
4475}
4476impl ::buffa::HasMessageView for super::super::Parameter {
4477    type View<'a> = ParameterView<'a>;
4478    type ViewHandle = ParameterOwnedView;
4479}
4480#[derive(Clone, Debug, Default)]
4481pub struct GenerateRequestView<'a> {
4482    /// Field 1: `settings`
4483    pub settings: ::buffa::MessageFieldView<
4484        super::super::__buffa::view::SettingsView<'a>,
4485    >,
4486    /// Field 2: `catalog`
4487    pub catalog: ::buffa::MessageFieldView<super::super::__buffa::view::CatalogView<'a>>,
4488    /// Field 3: `queries`
4489    pub queries: ::buffa::RepeatedView<'a, super::super::__buffa::view::QueryView<'a>>,
4490    /// Field 4: `sqlc_version`
4491    pub sqlc_version: &'a str,
4492    /// Field 5: `plugin_options`
4493    pub plugin_options: &'a [u8],
4494    /// Field 6: `global_options`
4495    pub global_options: &'a [u8],
4496    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4497}
4498impl<'a> ::buffa::MessageView<'a> for GenerateRequestView<'a> {
4499    type Owned = super::super::GenerateRequest;
4500    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4501        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
4502        <Self as ::buffa::MessageView>::decode_view_ctx(
4503            buf,
4504            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4505        )
4506    }
4507    fn decode_view_with_ctx(
4508        buf: &'a [u8],
4509        ctx: ::buffa::DecodeContext<'_>,
4510    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4511        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4512    }
4513    #[inline]
4514    fn merge_view_field(
4515        &mut self,
4516        tag: ::buffa::encoding::Tag,
4517        cur: &'a [u8],
4518        before_tag: &'a [u8],
4519        ctx: ::buffa::DecodeContext<'_>,
4520    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4521        let _ = ctx;
4522        #[allow(unused_variables)]
4523        let view = self;
4524        let mut cur = cur;
4525        match tag.field_number() {
4526            1u32 => {
4527                ::buffa::encoding::check_wire_type(
4528                    tag,
4529                    ::buffa::encoding::WireType::LengthDelimited,
4530                )?;
4531                let __sub_ctx = ctx.descend()?;
4532                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4533                match view.settings.as_mut() {
4534                    Some(existing) => {
4535                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
4536                    }
4537                    None => {
4538                        view.settings = ::buffa::MessageFieldView::set(
4539                            <super::super::__buffa::view::SettingsView as ::buffa::MessageView>::decode_view_ctx(
4540                                sub,
4541                                __sub_ctx,
4542                            )?,
4543                        );
4544                    }
4545                }
4546            }
4547            2u32 => {
4548                ::buffa::encoding::check_wire_type(
4549                    tag,
4550                    ::buffa::encoding::WireType::LengthDelimited,
4551                )?;
4552                let __sub_ctx = ctx.descend()?;
4553                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4554                match view.catalog.as_mut() {
4555                    Some(existing) => {
4556                        ::buffa::MessageView::merge_into_view(existing, sub, __sub_ctx)?
4557                    }
4558                    None => {
4559                        view.catalog = ::buffa::MessageFieldView::set(
4560                            <super::super::__buffa::view::CatalogView as ::buffa::MessageView>::decode_view_ctx(
4561                                sub,
4562                                __sub_ctx,
4563                            )?,
4564                        );
4565                    }
4566                }
4567            }
4568            4u32 => {
4569                ::buffa::encoding::check_wire_type(
4570                    tag,
4571                    ::buffa::encoding::WireType::LengthDelimited,
4572                )?;
4573                view.sqlc_version = ::buffa::types::borrow_str(&mut cur)?;
4574            }
4575            5u32 => {
4576                ::buffa::encoding::check_wire_type(
4577                    tag,
4578                    ::buffa::encoding::WireType::LengthDelimited,
4579                )?;
4580                view.plugin_options = ::buffa::types::borrow_bytes(&mut cur)?;
4581            }
4582            6u32 => {
4583                ::buffa::encoding::check_wire_type(
4584                    tag,
4585                    ::buffa::encoding::WireType::LengthDelimited,
4586                )?;
4587                view.global_options = ::buffa::types::borrow_bytes(&mut cur)?;
4588            }
4589            3u32 => {
4590                ::buffa::encoding::check_wire_type(
4591                    tag,
4592                    ::buffa::encoding::WireType::LengthDelimited,
4593                )?;
4594                let __sub_ctx = ctx.descend()?;
4595                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4596                ctx.register_element_memory(
4597                    ::core::mem::size_of::<super::super::__buffa::view::QueryView>(),
4598                )?;
4599                view.queries
4600                    .push(
4601                        <super::super::__buffa::view::QueryView as ::buffa::MessageView>::decode_view_ctx(
4602                            sub,
4603                            __sub_ctx,
4604                        )?,
4605                    );
4606            }
4607            _ => {
4608                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4609                let span_len = before_tag.len() - cur.len();
4610                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
4611            }
4612        }
4613        ::core::result::Result::Ok(cur)
4614    }
4615    fn to_owned_message(
4616        &self,
4617    ) -> ::core::result::Result<super::super::GenerateRequest, ::buffa::DecodeError> {
4618        self.to_owned_from_source(None)
4619    }
4620    #[allow(clippy::useless_conversion, clippy::needless_update)]
4621    fn to_owned_from_source(
4622        &self,
4623        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4624    ) -> ::core::result::Result<super::super::GenerateRequest, ::buffa::DecodeError> {
4625        #[allow(unused_imports)]
4626        use ::buffa::alloc::string::ToString as _;
4627        let _ = __buffa_src;
4628        ::core::result::Result::Ok(super::super::GenerateRequest {
4629            settings: match self.settings.as_option() {
4630                Some(v) => {
4631                    ::buffa::MessageField::<
4632                        super::super::Settings,
4633                        ::buffa::Inline<super::super::Settings>,
4634                    >::some(v.to_owned_from_source(__buffa_src)?)
4635                }
4636                None => ::buffa::MessageField::none(),
4637            },
4638            catalog: match self.catalog.as_option() {
4639                Some(v) => {
4640                    ::buffa::MessageField::<
4641                        super::super::Catalog,
4642                        ::buffa::Inline<super::super::Catalog>,
4643                    >::some(v.to_owned_from_source(__buffa_src)?)
4644                }
4645                None => ::buffa::MessageField::none(),
4646            },
4647            queries: self
4648                .queries
4649                .iter()
4650                .map(|v| v.to_owned_from_source(__buffa_src))
4651                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
4652            sqlc_version: self.sqlc_version.to_string(),
4653            plugin_options: (self.plugin_options).to_vec(),
4654            global_options: (self.global_options).to_vec(),
4655            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
4656            ..::core::default::Default::default()
4657        })
4658    }
4659}
4660impl<'a> ::buffa::ViewEncode<'a> for GenerateRequestView<'a> {
4661    #[allow(clippy::needless_borrow, clippy::let_and_return)]
4662    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4663        #[allow(unused_imports)]
4664        use ::buffa::Enumeration as _;
4665        let mut size = 0u64;
4666        if self.settings.is_set() {
4667            let __slot = __cache.reserve();
4668            let inner_size = self.settings.compute_size(__cache);
4669            __cache.set(__slot, inner_size);
4670            size
4671                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
4672                    + inner_size as u64;
4673        }
4674        if self.catalog.is_set() {
4675            let __slot = __cache.reserve();
4676            let inner_size = self.catalog.compute_size(__cache);
4677            __cache.set(__slot, inner_size);
4678            size
4679                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
4680                    + inner_size as u64;
4681        }
4682        for v in &self.queries {
4683            let __slot = __cache.reserve();
4684            let inner_size = v.compute_size(__cache);
4685            __cache.set(__slot, inner_size);
4686            size
4687                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
4688                    + inner_size as u64;
4689        }
4690        if !self.sqlc_version.is_empty() {
4691            size += 1u64 + ::buffa::types::string_encoded_len(&self.sqlc_version) as u64;
4692        }
4693        if !self.plugin_options.is_empty() {
4694            size
4695                += 1u64 + ::buffa::types::bytes_encoded_len(&self.plugin_options) as u64;
4696        }
4697        if !self.global_options.is_empty() {
4698            size
4699                += 1u64 + ::buffa::types::bytes_encoded_len(&self.global_options) as u64;
4700        }
4701        size += self.__buffa_unknown_fields.encoded_len() as u64;
4702        ::buffa::saturate_size(size)
4703    }
4704    #[allow(clippy::needless_borrow)]
4705    fn write_to(
4706        &self,
4707        __cache: &mut ::buffa::SizeCache,
4708        buf: &mut impl ::buffa::EncodeSink,
4709    ) {
4710        #[allow(unused_imports)]
4711        use ::buffa::Enumeration as _;
4712        if self.settings.is_set() {
4713            ::buffa::types::put_len_delimited_header(
4714                1u32,
4715                u64::from(__cache.consume_next()),
4716                buf,
4717            );
4718            self.settings.write_to(__cache, buf);
4719        }
4720        if self.catalog.is_set() {
4721            ::buffa::types::put_len_delimited_header(
4722                2u32,
4723                u64::from(__cache.consume_next()),
4724                buf,
4725            );
4726            self.catalog.write_to(__cache, buf);
4727        }
4728        for v in &self.queries {
4729            ::buffa::types::put_len_delimited_header(
4730                3u32,
4731                u64::from(__cache.consume_next()),
4732                buf,
4733            );
4734            v.write_to(__cache, buf);
4735        }
4736        if !self.sqlc_version.is_empty() {
4737            ::buffa::types::put_string_field(4u32, &self.sqlc_version, buf);
4738        }
4739        if !self.plugin_options.is_empty() {
4740            ::buffa::types::put_shared_bytes_field(5u32, &self.plugin_options, buf);
4741        }
4742        if !self.global_options.is_empty() {
4743            ::buffa::types::put_shared_bytes_field(6u32, &self.global_options, buf);
4744        }
4745        self.__buffa_unknown_fields.write_to(buf);
4746    }
4747}
4748impl<'a> ::buffa::MessageName for GenerateRequestView<'a> {
4749    const PACKAGE: &'static str = "plugin";
4750    const NAME: &'static str = "GenerateRequest";
4751    const FULL_NAME: &'static str = "plugin.GenerateRequest";
4752    const TYPE_URL: &'static str = "type.googleapis.com/plugin.GenerateRequest";
4753}
4754::buffa::impl_default_view_instance!(GenerateRequestView);
4755::buffa::impl_view_reborrow!(GenerateRequestView);
4756/** Self-contained, `'static` owned view of a `GenerateRequest` message.
4757
4758 Wraps [`::buffa::OwnedView`]`<`[`GenerateRequestView`]`<'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.
4759
4760 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GenerateRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4761#[derive(Clone, Debug)]
4762pub struct GenerateRequestOwnedView(::buffa::OwnedView<GenerateRequestView<'static>>);
4763impl GenerateRequestOwnedView {
4764    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4765    ///
4766    /// The view borrows directly from the buffer's data; the buffer is
4767    /// retained inside the returned handle.
4768    ///
4769    /// # Errors
4770    ///
4771    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4772    /// protobuf data.
4773    pub fn decode(
4774        bytes: ::buffa::bytes::Bytes,
4775    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4776        ::core::result::Result::Ok(
4777            GenerateRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
4778        )
4779    }
4780    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4781    /// max message size).
4782    ///
4783    /// # Errors
4784    ///
4785    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4786    /// exceeds the configured limits.
4787    pub fn decode_with_options(
4788        bytes: ::buffa::bytes::Bytes,
4789        opts: &::buffa::DecodeOptions,
4790    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4791        ::core::result::Result::Ok(
4792            GenerateRequestOwnedView(
4793                ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4794            ),
4795        )
4796    }
4797    /// Build from an owned message via an encode → decode round-trip.
4798    ///
4799    /// # Errors
4800    ///
4801    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
4802    /// message's encoded size exceeds the 2 GiB protobuf limit, or
4803    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
4804    /// somehow invalid (should not happen for well-formed messages).
4805    pub fn from_owned(
4806        msg: &super::super::GenerateRequest,
4807    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4808        ::core::result::Result::Ok(
4809            GenerateRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
4810        )
4811    }
4812    /// Borrow the full [`GenerateRequestView`] with its lifetime tied to `&self`.
4813    #[must_use]
4814    pub fn view(&self) -> &GenerateRequestView<'_> {
4815        self.0.reborrow()
4816    }
4817    /// Convert to the owned message type.
4818    ///
4819    /// Infallible: this type's constructors wire-decode their
4820    /// buffer, and a view produced by wire decoding always
4821    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
4822    /// whose contract also governs handles converted from a raw
4823    /// [`::buffa::OwnedView`].
4824    #[must_use]
4825    pub fn to_owned_message(&self) -> super::super::GenerateRequest {
4826        self.0.to_owned_message()
4827    }
4828    /// The underlying bytes buffer.
4829    #[must_use]
4830    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4831        self.0.bytes()
4832    }
4833    /// Consume the handle, returning the underlying bytes buffer.
4834    #[must_use]
4835    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4836        self.0.into_bytes()
4837    }
4838    /// Field 1: `settings`
4839    #[must_use]
4840    pub fn settings(
4841        &self,
4842    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::SettingsView<'_>> {
4843        &self.0.reborrow().settings
4844    }
4845    /// Field 2: `catalog`
4846    #[must_use]
4847    pub fn catalog(
4848        &self,
4849    ) -> &::buffa::MessageFieldView<super::super::__buffa::view::CatalogView<'_>> {
4850        &self.0.reborrow().catalog
4851    }
4852    /// Field 3: `queries`
4853    #[must_use]
4854    pub fn queries(
4855        &self,
4856    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::QueryView<'_>> {
4857        &self.0.reborrow().queries
4858    }
4859    /// Field 4: `sqlc_version`
4860    #[must_use]
4861    pub fn sqlc_version(&self) -> &'_ str {
4862        self.0.reborrow().sqlc_version
4863    }
4864    /// Field 5: `plugin_options`
4865    #[must_use]
4866    pub fn plugin_options(&self) -> &'_ [u8] {
4867        self.0.reborrow().plugin_options
4868    }
4869    /// Field 6: `global_options`
4870    #[must_use]
4871    pub fn global_options(&self) -> &'_ [u8] {
4872        self.0.reborrow().global_options
4873    }
4874}
4875impl ::core::convert::From<::buffa::OwnedView<GenerateRequestView<'static>>>
4876for GenerateRequestOwnedView {
4877    fn from(inner: ::buffa::OwnedView<GenerateRequestView<'static>>) -> Self {
4878        GenerateRequestOwnedView(inner)
4879    }
4880}
4881impl ::core::convert::From<GenerateRequestOwnedView>
4882for ::buffa::OwnedView<GenerateRequestView<'static>> {
4883    fn from(wrapper: GenerateRequestOwnedView) -> Self {
4884        wrapper.0
4885    }
4886}
4887impl ::core::convert::AsRef<::buffa::OwnedView<GenerateRequestView<'static>>>
4888for GenerateRequestOwnedView {
4889    fn as_ref(&self) -> &::buffa::OwnedView<GenerateRequestView<'static>> {
4890        &self.0
4891    }
4892}
4893impl ::buffa::HasMessageView for super::super::GenerateRequest {
4894    type View<'a> = GenerateRequestView<'a>;
4895    type ViewHandle = GenerateRequestOwnedView;
4896}
4897#[derive(Clone, Debug, Default)]
4898pub struct GenerateResponseView<'a> {
4899    /// Field 1: `files`
4900    pub files: ::buffa::RepeatedView<'a, super::super::__buffa::view::FileView<'a>>,
4901    pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4902}
4903impl<'a> ::buffa::MessageView<'a> for GenerateResponseView<'a> {
4904    type Owned = super::super::GenerateResponse;
4905    fn decode_view(buf: &'a [u8]) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4906        let __limit = ::core::cell::Cell::new(::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT);
4907        <Self as ::buffa::MessageView>::decode_view_ctx(
4908            buf,
4909            ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4910        )
4911    }
4912    fn decode_view_with_ctx(
4913        buf: &'a [u8],
4914        ctx: ::buffa::DecodeContext<'_>,
4915    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4916        <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4917    }
4918    #[inline]
4919    fn merge_view_field(
4920        &mut self,
4921        tag: ::buffa::encoding::Tag,
4922        cur: &'a [u8],
4923        before_tag: &'a [u8],
4924        ctx: ::buffa::DecodeContext<'_>,
4925    ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4926        let _ = ctx;
4927        #[allow(unused_variables)]
4928        let view = self;
4929        let mut cur = cur;
4930        match tag.field_number() {
4931            1u32 => {
4932                ::buffa::encoding::check_wire_type(
4933                    tag,
4934                    ::buffa::encoding::WireType::LengthDelimited,
4935                )?;
4936                let __sub_ctx = ctx.descend()?;
4937                let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4938                ctx.register_element_memory(
4939                    ::core::mem::size_of::<super::super::__buffa::view::FileView>(),
4940                )?;
4941                view.files
4942                    .push(
4943                        <super::super::__buffa::view::FileView as ::buffa::MessageView>::decode_view_ctx(
4944                            sub,
4945                            __sub_ctx,
4946                        )?,
4947                    );
4948            }
4949            _ => {
4950                ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4951                let span_len = before_tag.len() - cur.len();
4952                view.__buffa_unknown_fields.push_record(before_tag, span_len, ctx)?;
4953            }
4954        }
4955        ::core::result::Result::Ok(cur)
4956    }
4957    fn to_owned_message(
4958        &self,
4959    ) -> ::core::result::Result<super::super::GenerateResponse, ::buffa::DecodeError> {
4960        self.to_owned_from_source(None)
4961    }
4962    #[allow(clippy::useless_conversion, clippy::needless_update)]
4963    fn to_owned_from_source(
4964        &self,
4965        __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4966    ) -> ::core::result::Result<super::super::GenerateResponse, ::buffa::DecodeError> {
4967        #[allow(unused_imports)]
4968        use ::buffa::alloc::string::ToString as _;
4969        let _ = __buffa_src;
4970        ::core::result::Result::Ok(super::super::GenerateResponse {
4971            files: self
4972                .files
4973                .iter()
4974                .map(|v| v.to_owned_from_source(__buffa_src))
4975                .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
4976            __buffa_unknown_fields: self.__buffa_unknown_fields.to_owned()?.into(),
4977            ..::core::default::Default::default()
4978        })
4979    }
4980}
4981impl<'a> ::buffa::ViewEncode<'a> for GenerateResponseView<'a> {
4982    #[allow(clippy::needless_borrow, clippy::let_and_return)]
4983    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4984        #[allow(unused_imports)]
4985        use ::buffa::Enumeration as _;
4986        let mut size = 0u64;
4987        for v in &self.files {
4988            let __slot = __cache.reserve();
4989            let inner_size = v.compute_size(__cache);
4990            __cache.set(__slot, inner_size);
4991            size
4992                += 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
4993                    + inner_size as u64;
4994        }
4995        size += self.__buffa_unknown_fields.encoded_len() as u64;
4996        ::buffa::saturate_size(size)
4997    }
4998    #[allow(clippy::needless_borrow)]
4999    fn write_to(
5000        &self,
5001        __cache: &mut ::buffa::SizeCache,
5002        buf: &mut impl ::buffa::EncodeSink,
5003    ) {
5004        #[allow(unused_imports)]
5005        use ::buffa::Enumeration as _;
5006        for v in &self.files {
5007            ::buffa::types::put_len_delimited_header(
5008                1u32,
5009                u64::from(__cache.consume_next()),
5010                buf,
5011            );
5012            v.write_to(__cache, buf);
5013        }
5014        self.__buffa_unknown_fields.write_to(buf);
5015    }
5016}
5017impl<'a> ::buffa::MessageName for GenerateResponseView<'a> {
5018    const PACKAGE: &'static str = "plugin";
5019    const NAME: &'static str = "GenerateResponse";
5020    const FULL_NAME: &'static str = "plugin.GenerateResponse";
5021    const TYPE_URL: &'static str = "type.googleapis.com/plugin.GenerateResponse";
5022}
5023::buffa::impl_default_view_instance!(GenerateResponseView);
5024::buffa::impl_view_reborrow!(GenerateResponseView);
5025/** Self-contained, `'static` owned view of a `GenerateResponse` message.
5026
5027 Wraps [`::buffa::OwnedView`]`<`[`GenerateResponseView`]`<'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.
5028
5029 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GenerateResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5030#[derive(Clone, Debug)]
5031pub struct GenerateResponseOwnedView(::buffa::OwnedView<GenerateResponseView<'static>>);
5032impl GenerateResponseOwnedView {
5033    /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5034    ///
5035    /// The view borrows directly from the buffer's data; the buffer is
5036    /// retained inside the returned handle.
5037    ///
5038    /// # Errors
5039    ///
5040    /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5041    /// protobuf data.
5042    pub fn decode(
5043        bytes: ::buffa::bytes::Bytes,
5044    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5045        ::core::result::Result::Ok(
5046            GenerateResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
5047        )
5048    }
5049    /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5050    /// max message size).
5051    ///
5052    /// # Errors
5053    ///
5054    /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5055    /// exceeds the configured limits.
5056    pub fn decode_with_options(
5057        bytes: ::buffa::bytes::Bytes,
5058        opts: &::buffa::DecodeOptions,
5059    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5060        ::core::result::Result::Ok(
5061            GenerateResponseOwnedView(
5062                ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5063            ),
5064        )
5065    }
5066    /// Build from an owned message via an encode → decode round-trip.
5067    ///
5068    /// # Errors
5069    ///
5070    /// Returns [`::buffa::DecodeError::MessageTooLarge`] if the
5071    /// message's encoded size exceeds the 2 GiB protobuf limit, or
5072    /// another [`::buffa::DecodeError`] if the re-encoded bytes are
5073    /// somehow invalid (should not happen for well-formed messages).
5074    pub fn from_owned(
5075        msg: &super::super::GenerateResponse,
5076    ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5077        ::core::result::Result::Ok(
5078            GenerateResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
5079        )
5080    }
5081    /// Borrow the full [`GenerateResponseView`] with its lifetime tied to `&self`.
5082    #[must_use]
5083    pub fn view(&self) -> &GenerateResponseView<'_> {
5084        self.0.reborrow()
5085    }
5086    /// Convert to the owned message type.
5087    ///
5088    /// Infallible: this type's constructors wire-decode their
5089    /// buffer, and a view produced by wire decoding always
5090    /// converts. Delegates to [`::buffa::OwnedView::to_owned_message`],
5091    /// whose contract also governs handles converted from a raw
5092    /// [`::buffa::OwnedView`].
5093    #[must_use]
5094    pub fn to_owned_message(&self) -> super::super::GenerateResponse {
5095        self.0.to_owned_message()
5096    }
5097    /// The underlying bytes buffer.
5098    #[must_use]
5099    pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5100        self.0.bytes()
5101    }
5102    /// Consume the handle, returning the underlying bytes buffer.
5103    #[must_use]
5104    pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5105        self.0.into_bytes()
5106    }
5107    /// Field 1: `files`
5108    #[must_use]
5109    pub fn files(
5110        &self,
5111    ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::FileView<'_>> {
5112        &self.0.reborrow().files
5113    }
5114}
5115impl ::core::convert::From<::buffa::OwnedView<GenerateResponseView<'static>>>
5116for GenerateResponseOwnedView {
5117    fn from(inner: ::buffa::OwnedView<GenerateResponseView<'static>>) -> Self {
5118        GenerateResponseOwnedView(inner)
5119    }
5120}
5121impl ::core::convert::From<GenerateResponseOwnedView>
5122for ::buffa::OwnedView<GenerateResponseView<'static>> {
5123    fn from(wrapper: GenerateResponseOwnedView) -> Self {
5124        wrapper.0
5125    }
5126}
5127impl ::core::convert::AsRef<::buffa::OwnedView<GenerateResponseView<'static>>>
5128for GenerateResponseOwnedView {
5129    fn as_ref(&self) -> &::buffa::OwnedView<GenerateResponseView<'static>> {
5130        &self.0
5131    }
5132}
5133impl ::buffa::HasMessageView for super::super::GenerateResponse {
5134    type View<'a> = GenerateResponseView<'a>;
5135    type ViewHandle = GenerateResponseOwnedView;
5136}