Skip to main content

sqlc_gen_sqlx/
plugin.codegen.rs

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