Skip to main content

unitycatalog_common/models/_gen/
unitycatalog.functions.v1.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// Determines whether the function body is interpreted as SQL or as an external function.
4#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5#[repr(i32)]
6pub enum RoutineBody {
7    ROUTINE_BODY_UNSPECIFIED = 0i32,
8    /// The function is defined in SQL.
9    SQL = 1i32,
10    /// The function is defined externally.
11    EXTERNAL = 2i32,
12}
13impl RoutineBody {
14    ///Idiomatic alias for [`Self::ROUTINE_BODY_UNSPECIFIED`]; `Debug` prints the variant name.
15    #[allow(non_upper_case_globals)]
16    pub const RoutineBodyUnspecified: Self = Self::ROUTINE_BODY_UNSPECIFIED;
17    ///Idiomatic alias for [`Self::SQL`]; `Debug` prints the variant name.
18    #[allow(non_upper_case_globals)]
19    pub const Sql: Self = Self::SQL;
20    ///Idiomatic alias for [`Self::EXTERNAL`]; `Debug` prints the variant name.
21    #[allow(non_upper_case_globals)]
22    pub const External: Self = Self::EXTERNAL;
23}
24impl ::core::default::Default for RoutineBody {
25    fn default() -> Self {
26        Self::ROUTINE_BODY_UNSPECIFIED
27    }
28}
29impl ::serde::Serialize for RoutineBody {
30    fn serialize<S: ::serde::Serializer>(
31        &self,
32        s: S,
33    ) -> ::core::result::Result<S::Ok, S::Error> {
34        s.serialize_str(::buffa::Enumeration::proto_name(self))
35    }
36}
37impl<'de> ::serde::Deserialize<'de> for RoutineBody {
38    fn deserialize<D: ::serde::Deserializer<'de>>(
39        d: D,
40    ) -> ::core::result::Result<Self, D::Error> {
41        struct _V;
42        impl ::serde::de::Visitor<'_> for _V {
43            type Value = RoutineBody;
44            fn expecting(
45                &self,
46                f: &mut ::core::fmt::Formatter<'_>,
47            ) -> ::core::fmt::Result {
48                f.write_str(
49                    concat!("a string, integer, or null for ", stringify!(RoutineBody)),
50                )
51            }
52            fn visit_str<E: ::serde::de::Error>(
53                self,
54                v: &str,
55            ) -> ::core::result::Result<RoutineBody, E> {
56                <RoutineBody as ::buffa::Enumeration>::from_proto_name(v)
57                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
58            }
59            fn visit_i64<E: ::serde::de::Error>(
60                self,
61                v: i64,
62            ) -> ::core::result::Result<RoutineBody, E> {
63                let v32 = i32::try_from(v)
64                    .map_err(|_| {
65                        ::serde::de::Error::custom(
66                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
67                        )
68                    })?;
69                <RoutineBody as ::buffa::Enumeration>::from_i32(v32)
70                    .ok_or_else(|| {
71                        ::serde::de::Error::custom(
72                            ::buffa::alloc::format!("unknown enum value {v32}"),
73                        )
74                    })
75            }
76            fn visit_u64<E: ::serde::de::Error>(
77                self,
78                v: u64,
79            ) -> ::core::result::Result<RoutineBody, E> {
80                let v32 = i32::try_from(v)
81                    .map_err(|_| {
82                        ::serde::de::Error::custom(
83                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
84                        )
85                    })?;
86                <RoutineBody as ::buffa::Enumeration>::from_i32(v32)
87                    .ok_or_else(|| {
88                        ::serde::de::Error::custom(
89                            ::buffa::alloc::format!("unknown enum value {v32}"),
90                        )
91                    })
92            }
93            fn visit_unit<E: ::serde::de::Error>(
94                self,
95            ) -> ::core::result::Result<RoutineBody, E> {
96                ::core::result::Result::Ok(::core::default::Default::default())
97            }
98        }
99        d.deserialize_any(_V)
100    }
101}
102impl ::buffa::json_helpers::ProtoElemJson for RoutineBody {
103    fn serialize_proto_json<S: ::serde::Serializer>(
104        v: &Self,
105        s: S,
106    ) -> ::core::result::Result<S::Ok, S::Error> {
107        ::serde::Serialize::serialize(v, s)
108    }
109    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
110        d: D,
111    ) -> ::core::result::Result<Self, D::Error> {
112        <Self as ::serde::Deserialize>::deserialize(d)
113    }
114}
115impl ::buffa::Enumeration for RoutineBody {
116    fn from_i32(value: i32) -> ::core::option::Option<Self> {
117        match value {
118            0i32 => ::core::option::Option::Some(Self::ROUTINE_BODY_UNSPECIFIED),
119            1i32 => ::core::option::Option::Some(Self::SQL),
120            2i32 => ::core::option::Option::Some(Self::EXTERNAL),
121            _ => ::core::option::Option::None,
122        }
123    }
124    fn to_i32(&self) -> i32 {
125        *self as i32
126    }
127    fn proto_name(&self) -> &'static str {
128        match self {
129            Self::ROUTINE_BODY_UNSPECIFIED => "ROUTINE_BODY_UNSPECIFIED",
130            Self::SQL => "SQL",
131            Self::EXTERNAL => "EXTERNAL",
132        }
133    }
134    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
135        match name {
136            "ROUTINE_BODY_UNSPECIFIED" => {
137                ::core::option::Option::Some(Self::ROUTINE_BODY_UNSPECIFIED)
138            }
139            "SQL" => ::core::option::Option::Some(Self::SQL),
140            "EXTERNAL" => ::core::option::Option::Some(Self::EXTERNAL),
141            _ => ::core::option::Option::None,
142        }
143    }
144    fn values() -> &'static [Self] {
145        &[Self::ROUTINE_BODY_UNSPECIFIED, Self::SQL, Self::EXTERNAL]
146    }
147}
148/// The parameter-passing style.
149#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
150#[repr(i32)]
151pub enum ParameterStyle {
152    PARAMETER_STYLE_UNSPECIFIED = 0i32,
153    /// The parameters are passed positionally (S = SQL).
154    S = 1i32,
155}
156impl ParameterStyle {
157    ///Idiomatic alias for [`Self::PARAMETER_STYLE_UNSPECIFIED`]; `Debug` prints the variant name.
158    #[allow(non_upper_case_globals)]
159    pub const ParameterStyleUnspecified: Self = Self::PARAMETER_STYLE_UNSPECIFIED;
160}
161impl ::core::default::Default for ParameterStyle {
162    fn default() -> Self {
163        Self::PARAMETER_STYLE_UNSPECIFIED
164    }
165}
166impl ::serde::Serialize for ParameterStyle {
167    fn serialize<S: ::serde::Serializer>(
168        &self,
169        s: S,
170    ) -> ::core::result::Result<S::Ok, S::Error> {
171        s.serialize_str(::buffa::Enumeration::proto_name(self))
172    }
173}
174impl<'de> ::serde::Deserialize<'de> for ParameterStyle {
175    fn deserialize<D: ::serde::Deserializer<'de>>(
176        d: D,
177    ) -> ::core::result::Result<Self, D::Error> {
178        struct _V;
179        impl ::serde::de::Visitor<'_> for _V {
180            type Value = ParameterStyle;
181            fn expecting(
182                &self,
183                f: &mut ::core::fmt::Formatter<'_>,
184            ) -> ::core::fmt::Result {
185                f.write_str(
186                    concat!(
187                        "a string, integer, or null for ", stringify!(ParameterStyle)
188                    ),
189                )
190            }
191            fn visit_str<E: ::serde::de::Error>(
192                self,
193                v: &str,
194            ) -> ::core::result::Result<ParameterStyle, E> {
195                <ParameterStyle as ::buffa::Enumeration>::from_proto_name(v)
196                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
197            }
198            fn visit_i64<E: ::serde::de::Error>(
199                self,
200                v: i64,
201            ) -> ::core::result::Result<ParameterStyle, E> {
202                let v32 = i32::try_from(v)
203                    .map_err(|_| {
204                        ::serde::de::Error::custom(
205                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
206                        )
207                    })?;
208                <ParameterStyle as ::buffa::Enumeration>::from_i32(v32)
209                    .ok_or_else(|| {
210                        ::serde::de::Error::custom(
211                            ::buffa::alloc::format!("unknown enum value {v32}"),
212                        )
213                    })
214            }
215            fn visit_u64<E: ::serde::de::Error>(
216                self,
217                v: u64,
218            ) -> ::core::result::Result<ParameterStyle, E> {
219                let v32 = i32::try_from(v)
220                    .map_err(|_| {
221                        ::serde::de::Error::custom(
222                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
223                        )
224                    })?;
225                <ParameterStyle as ::buffa::Enumeration>::from_i32(v32)
226                    .ok_or_else(|| {
227                        ::serde::de::Error::custom(
228                            ::buffa::alloc::format!("unknown enum value {v32}"),
229                        )
230                    })
231            }
232            fn visit_unit<E: ::serde::de::Error>(
233                self,
234            ) -> ::core::result::Result<ParameterStyle, E> {
235                ::core::result::Result::Ok(::core::default::Default::default())
236            }
237        }
238        d.deserialize_any(_V)
239    }
240}
241impl ::buffa::json_helpers::ProtoElemJson for ParameterStyle {
242    fn serialize_proto_json<S: ::serde::Serializer>(
243        v: &Self,
244        s: S,
245    ) -> ::core::result::Result<S::Ok, S::Error> {
246        ::serde::Serialize::serialize(v, s)
247    }
248    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
249        d: D,
250    ) -> ::core::result::Result<Self, D::Error> {
251        <Self as ::serde::Deserialize>::deserialize(d)
252    }
253}
254impl ::buffa::Enumeration for ParameterStyle {
255    fn from_i32(value: i32) -> ::core::option::Option<Self> {
256        match value {
257            0i32 => ::core::option::Option::Some(Self::PARAMETER_STYLE_UNSPECIFIED),
258            1i32 => ::core::option::Option::Some(Self::S),
259            _ => ::core::option::Option::None,
260        }
261    }
262    fn to_i32(&self) -> i32 {
263        *self as i32
264    }
265    fn proto_name(&self) -> &'static str {
266        match self {
267            Self::PARAMETER_STYLE_UNSPECIFIED => "PARAMETER_STYLE_UNSPECIFIED",
268            Self::S => "S",
269        }
270    }
271    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
272        match name {
273            "PARAMETER_STYLE_UNSPECIFIED" => {
274                ::core::option::Option::Some(Self::PARAMETER_STYLE_UNSPECIFIED)
275            }
276            "S" => ::core::option::Option::Some(Self::S),
277            _ => ::core::option::Option::None,
278        }
279    }
280    fn values() -> &'static [Self] {
281        &[Self::PARAMETER_STYLE_UNSPECIFIED, Self::S]
282    }
283}
284/// The security type of the function.
285#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
286#[repr(i32)]
287pub enum SecurityType {
288    SECURITY_TYPE_UNSPECIFIED = 0i32,
289    /// The function runs as the invoking user (DEFINER = standard SQL semantics).
290    DEFINER = 1i32,
291}
292impl SecurityType {
293    ///Idiomatic alias for [`Self::SECURITY_TYPE_UNSPECIFIED`]; `Debug` prints the variant name.
294    #[allow(non_upper_case_globals)]
295    pub const SecurityTypeUnspecified: Self = Self::SECURITY_TYPE_UNSPECIFIED;
296    ///Idiomatic alias for [`Self::DEFINER`]; `Debug` prints the variant name.
297    #[allow(non_upper_case_globals)]
298    pub const Definer: Self = Self::DEFINER;
299}
300impl ::core::default::Default for SecurityType {
301    fn default() -> Self {
302        Self::SECURITY_TYPE_UNSPECIFIED
303    }
304}
305impl ::serde::Serialize for SecurityType {
306    fn serialize<S: ::serde::Serializer>(
307        &self,
308        s: S,
309    ) -> ::core::result::Result<S::Ok, S::Error> {
310        s.serialize_str(::buffa::Enumeration::proto_name(self))
311    }
312}
313impl<'de> ::serde::Deserialize<'de> for SecurityType {
314    fn deserialize<D: ::serde::Deserializer<'de>>(
315        d: D,
316    ) -> ::core::result::Result<Self, D::Error> {
317        struct _V;
318        impl ::serde::de::Visitor<'_> for _V {
319            type Value = SecurityType;
320            fn expecting(
321                &self,
322                f: &mut ::core::fmt::Formatter<'_>,
323            ) -> ::core::fmt::Result {
324                f.write_str(
325                    concat!("a string, integer, or null for ", stringify!(SecurityType)),
326                )
327            }
328            fn visit_str<E: ::serde::de::Error>(
329                self,
330                v: &str,
331            ) -> ::core::result::Result<SecurityType, E> {
332                <SecurityType as ::buffa::Enumeration>::from_proto_name(v)
333                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
334            }
335            fn visit_i64<E: ::serde::de::Error>(
336                self,
337                v: i64,
338            ) -> ::core::result::Result<SecurityType, E> {
339                let v32 = i32::try_from(v)
340                    .map_err(|_| {
341                        ::serde::de::Error::custom(
342                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
343                        )
344                    })?;
345                <SecurityType as ::buffa::Enumeration>::from_i32(v32)
346                    .ok_or_else(|| {
347                        ::serde::de::Error::custom(
348                            ::buffa::alloc::format!("unknown enum value {v32}"),
349                        )
350                    })
351            }
352            fn visit_u64<E: ::serde::de::Error>(
353                self,
354                v: u64,
355            ) -> ::core::result::Result<SecurityType, E> {
356                let v32 = i32::try_from(v)
357                    .map_err(|_| {
358                        ::serde::de::Error::custom(
359                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
360                        )
361                    })?;
362                <SecurityType as ::buffa::Enumeration>::from_i32(v32)
363                    .ok_or_else(|| {
364                        ::serde::de::Error::custom(
365                            ::buffa::alloc::format!("unknown enum value {v32}"),
366                        )
367                    })
368            }
369            fn visit_unit<E: ::serde::de::Error>(
370                self,
371            ) -> ::core::result::Result<SecurityType, E> {
372                ::core::result::Result::Ok(::core::default::Default::default())
373            }
374        }
375        d.deserialize_any(_V)
376    }
377}
378impl ::buffa::json_helpers::ProtoElemJson for SecurityType {
379    fn serialize_proto_json<S: ::serde::Serializer>(
380        v: &Self,
381        s: S,
382    ) -> ::core::result::Result<S::Ok, S::Error> {
383        ::serde::Serialize::serialize(v, s)
384    }
385    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
386        d: D,
387    ) -> ::core::result::Result<Self, D::Error> {
388        <Self as ::serde::Deserialize>::deserialize(d)
389    }
390}
391impl ::buffa::Enumeration for SecurityType {
392    fn from_i32(value: i32) -> ::core::option::Option<Self> {
393        match value {
394            0i32 => ::core::option::Option::Some(Self::SECURITY_TYPE_UNSPECIFIED),
395            1i32 => ::core::option::Option::Some(Self::DEFINER),
396            _ => ::core::option::Option::None,
397        }
398    }
399    fn to_i32(&self) -> i32 {
400        *self as i32
401    }
402    fn proto_name(&self) -> &'static str {
403        match self {
404            Self::SECURITY_TYPE_UNSPECIFIED => "SECURITY_TYPE_UNSPECIFIED",
405            Self::DEFINER => "DEFINER",
406        }
407    }
408    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
409        match name {
410            "SECURITY_TYPE_UNSPECIFIED" => {
411                ::core::option::Option::Some(Self::SECURITY_TYPE_UNSPECIFIED)
412            }
413            "DEFINER" => ::core::option::Option::Some(Self::DEFINER),
414            _ => ::core::option::Option::None,
415        }
416    }
417    fn values() -> &'static [Self] {
418        &[Self::SECURITY_TYPE_UNSPECIFIED, Self::DEFINER]
419    }
420}
421/// Information about the SQL data access capability of the function.
422#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
423#[repr(i32)]
424pub enum SqlDataAccess {
425    SQL_DATA_ACCESS_UNSPECIFIED = 0i32,
426    /// Function contains no SQL.
427    CONTAINS_SQL = 1i32,
428    /// Function reads from SQL tables or views.
429    READS_SQL_DATA = 2i32,
430    /// Function does not use SQL and does not access data.
431    NO_SQL = 3i32,
432}
433impl SqlDataAccess {
434    ///Idiomatic alias for [`Self::SQL_DATA_ACCESS_UNSPECIFIED`]; `Debug` prints the variant name.
435    #[allow(non_upper_case_globals)]
436    pub const SqlDataAccessUnspecified: Self = Self::SQL_DATA_ACCESS_UNSPECIFIED;
437    ///Idiomatic alias for [`Self::CONTAINS_SQL`]; `Debug` prints the variant name.
438    #[allow(non_upper_case_globals)]
439    pub const ContainsSql: Self = Self::CONTAINS_SQL;
440    ///Idiomatic alias for [`Self::READS_SQL_DATA`]; `Debug` prints the variant name.
441    #[allow(non_upper_case_globals)]
442    pub const ReadsSqlData: Self = Self::READS_SQL_DATA;
443    ///Idiomatic alias for [`Self::NO_SQL`]; `Debug` prints the variant name.
444    #[allow(non_upper_case_globals)]
445    pub const NoSql: Self = Self::NO_SQL;
446}
447impl ::core::default::Default for SqlDataAccess {
448    fn default() -> Self {
449        Self::SQL_DATA_ACCESS_UNSPECIFIED
450    }
451}
452impl ::serde::Serialize for SqlDataAccess {
453    fn serialize<S: ::serde::Serializer>(
454        &self,
455        s: S,
456    ) -> ::core::result::Result<S::Ok, S::Error> {
457        s.serialize_str(::buffa::Enumeration::proto_name(self))
458    }
459}
460impl<'de> ::serde::Deserialize<'de> for SqlDataAccess {
461    fn deserialize<D: ::serde::Deserializer<'de>>(
462        d: D,
463    ) -> ::core::result::Result<Self, D::Error> {
464        struct _V;
465        impl ::serde::de::Visitor<'_> for _V {
466            type Value = SqlDataAccess;
467            fn expecting(
468                &self,
469                f: &mut ::core::fmt::Formatter<'_>,
470            ) -> ::core::fmt::Result {
471                f.write_str(
472                    concat!("a string, integer, or null for ", stringify!(SqlDataAccess)),
473                )
474            }
475            fn visit_str<E: ::serde::de::Error>(
476                self,
477                v: &str,
478            ) -> ::core::result::Result<SqlDataAccess, E> {
479                <SqlDataAccess as ::buffa::Enumeration>::from_proto_name(v)
480                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
481            }
482            fn visit_i64<E: ::serde::de::Error>(
483                self,
484                v: i64,
485            ) -> ::core::result::Result<SqlDataAccess, E> {
486                let v32 = i32::try_from(v)
487                    .map_err(|_| {
488                        ::serde::de::Error::custom(
489                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
490                        )
491                    })?;
492                <SqlDataAccess as ::buffa::Enumeration>::from_i32(v32)
493                    .ok_or_else(|| {
494                        ::serde::de::Error::custom(
495                            ::buffa::alloc::format!("unknown enum value {v32}"),
496                        )
497                    })
498            }
499            fn visit_u64<E: ::serde::de::Error>(
500                self,
501                v: u64,
502            ) -> ::core::result::Result<SqlDataAccess, E> {
503                let v32 = i32::try_from(v)
504                    .map_err(|_| {
505                        ::serde::de::Error::custom(
506                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
507                        )
508                    })?;
509                <SqlDataAccess as ::buffa::Enumeration>::from_i32(v32)
510                    .ok_or_else(|| {
511                        ::serde::de::Error::custom(
512                            ::buffa::alloc::format!("unknown enum value {v32}"),
513                        )
514                    })
515            }
516            fn visit_unit<E: ::serde::de::Error>(
517                self,
518            ) -> ::core::result::Result<SqlDataAccess, E> {
519                ::core::result::Result::Ok(::core::default::Default::default())
520            }
521        }
522        d.deserialize_any(_V)
523    }
524}
525impl ::buffa::json_helpers::ProtoElemJson for SqlDataAccess {
526    fn serialize_proto_json<S: ::serde::Serializer>(
527        v: &Self,
528        s: S,
529    ) -> ::core::result::Result<S::Ok, S::Error> {
530        ::serde::Serialize::serialize(v, s)
531    }
532    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
533        d: D,
534    ) -> ::core::result::Result<Self, D::Error> {
535        <Self as ::serde::Deserialize>::deserialize(d)
536    }
537}
538impl ::buffa::Enumeration for SqlDataAccess {
539    fn from_i32(value: i32) -> ::core::option::Option<Self> {
540        match value {
541            0i32 => ::core::option::Option::Some(Self::SQL_DATA_ACCESS_UNSPECIFIED),
542            1i32 => ::core::option::Option::Some(Self::CONTAINS_SQL),
543            2i32 => ::core::option::Option::Some(Self::READS_SQL_DATA),
544            3i32 => ::core::option::Option::Some(Self::NO_SQL),
545            _ => ::core::option::Option::None,
546        }
547    }
548    fn to_i32(&self) -> i32 {
549        *self as i32
550    }
551    fn proto_name(&self) -> &'static str {
552        match self {
553            Self::SQL_DATA_ACCESS_UNSPECIFIED => "SQL_DATA_ACCESS_UNSPECIFIED",
554            Self::CONTAINS_SQL => "CONTAINS_SQL",
555            Self::READS_SQL_DATA => "READS_SQL_DATA",
556            Self::NO_SQL => "NO_SQL",
557        }
558    }
559    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
560        match name {
561            "SQL_DATA_ACCESS_UNSPECIFIED" => {
562                ::core::option::Option::Some(Self::SQL_DATA_ACCESS_UNSPECIFIED)
563            }
564            "CONTAINS_SQL" => ::core::option::Option::Some(Self::CONTAINS_SQL),
565            "READS_SQL_DATA" => ::core::option::Option::Some(Self::READS_SQL_DATA),
566            "NO_SQL" => ::core::option::Option::Some(Self::NO_SQL),
567            _ => ::core::option::Option::None,
568        }
569    }
570    fn values() -> &'static [Self] {
571        &[
572            Self::SQL_DATA_ACCESS_UNSPECIFIED,
573            Self::CONTAINS_SQL,
574            Self::READS_SQL_DATA,
575            Self::NO_SQL,
576        ]
577    }
578}
579/// The mode of the function parameter.
580#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
581#[repr(i32)]
582pub enum ParameterMode {
583    PARAMETER_MODE_UNSPECIFIED = 0i32,
584    /// Input parameter.
585    IN = 1i32,
586}
587impl ParameterMode {
588    ///Idiomatic alias for [`Self::PARAMETER_MODE_UNSPECIFIED`]; `Debug` prints the variant name.
589    #[allow(non_upper_case_globals)]
590    pub const ParameterModeUnspecified: Self = Self::PARAMETER_MODE_UNSPECIFIED;
591    ///Idiomatic alias for [`Self::IN`]; `Debug` prints the variant name.
592    #[allow(non_upper_case_globals)]
593    pub const In: Self = Self::IN;
594}
595impl ::core::default::Default for ParameterMode {
596    fn default() -> Self {
597        Self::PARAMETER_MODE_UNSPECIFIED
598    }
599}
600impl ::serde::Serialize for ParameterMode {
601    fn serialize<S: ::serde::Serializer>(
602        &self,
603        s: S,
604    ) -> ::core::result::Result<S::Ok, S::Error> {
605        s.serialize_str(::buffa::Enumeration::proto_name(self))
606    }
607}
608impl<'de> ::serde::Deserialize<'de> for ParameterMode {
609    fn deserialize<D: ::serde::Deserializer<'de>>(
610        d: D,
611    ) -> ::core::result::Result<Self, D::Error> {
612        struct _V;
613        impl ::serde::de::Visitor<'_> for _V {
614            type Value = ParameterMode;
615            fn expecting(
616                &self,
617                f: &mut ::core::fmt::Formatter<'_>,
618            ) -> ::core::fmt::Result {
619                f.write_str(
620                    concat!("a string, integer, or null for ", stringify!(ParameterMode)),
621                )
622            }
623            fn visit_str<E: ::serde::de::Error>(
624                self,
625                v: &str,
626            ) -> ::core::result::Result<ParameterMode, E> {
627                <ParameterMode as ::buffa::Enumeration>::from_proto_name(v)
628                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
629            }
630            fn visit_i64<E: ::serde::de::Error>(
631                self,
632                v: i64,
633            ) -> ::core::result::Result<ParameterMode, E> {
634                let v32 = i32::try_from(v)
635                    .map_err(|_| {
636                        ::serde::de::Error::custom(
637                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
638                        )
639                    })?;
640                <ParameterMode as ::buffa::Enumeration>::from_i32(v32)
641                    .ok_or_else(|| {
642                        ::serde::de::Error::custom(
643                            ::buffa::alloc::format!("unknown enum value {v32}"),
644                        )
645                    })
646            }
647            fn visit_u64<E: ::serde::de::Error>(
648                self,
649                v: u64,
650            ) -> ::core::result::Result<ParameterMode, E> {
651                let v32 = i32::try_from(v)
652                    .map_err(|_| {
653                        ::serde::de::Error::custom(
654                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
655                        )
656                    })?;
657                <ParameterMode as ::buffa::Enumeration>::from_i32(v32)
658                    .ok_or_else(|| {
659                        ::serde::de::Error::custom(
660                            ::buffa::alloc::format!("unknown enum value {v32}"),
661                        )
662                    })
663            }
664            fn visit_unit<E: ::serde::de::Error>(
665                self,
666            ) -> ::core::result::Result<ParameterMode, E> {
667                ::core::result::Result::Ok(::core::default::Default::default())
668            }
669        }
670        d.deserialize_any(_V)
671    }
672}
673impl ::buffa::json_helpers::ProtoElemJson for ParameterMode {
674    fn serialize_proto_json<S: ::serde::Serializer>(
675        v: &Self,
676        s: S,
677    ) -> ::core::result::Result<S::Ok, S::Error> {
678        ::serde::Serialize::serialize(v, s)
679    }
680    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
681        d: D,
682    ) -> ::core::result::Result<Self, D::Error> {
683        <Self as ::serde::Deserialize>::deserialize(d)
684    }
685}
686impl ::buffa::Enumeration for ParameterMode {
687    fn from_i32(value: i32) -> ::core::option::Option<Self> {
688        match value {
689            0i32 => ::core::option::Option::Some(Self::PARAMETER_MODE_UNSPECIFIED),
690            1i32 => ::core::option::Option::Some(Self::IN),
691            _ => ::core::option::Option::None,
692        }
693    }
694    fn to_i32(&self) -> i32 {
695        *self as i32
696    }
697    fn proto_name(&self) -> &'static str {
698        match self {
699            Self::PARAMETER_MODE_UNSPECIFIED => "PARAMETER_MODE_UNSPECIFIED",
700            Self::IN => "IN",
701        }
702    }
703    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
704        match name {
705            "PARAMETER_MODE_UNSPECIFIED" => {
706                ::core::option::Option::Some(Self::PARAMETER_MODE_UNSPECIFIED)
707            }
708            "IN" => ::core::option::Option::Some(Self::IN),
709            _ => ::core::option::Option::None,
710        }
711    }
712    fn values() -> &'static [Self] {
713        &[Self::PARAMETER_MODE_UNSPECIFIED, Self::IN]
714    }
715}
716/// The type of the function parameter.
717#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
718#[repr(i32)]
719pub enum FunctionParameterType {
720    FUNCTION_PARAMETER_TYPE_UNSPECIFIED = 0i32,
721    /// A named column parameter.
722    COLUMN = 1i32,
723    /// A named parameter (default).
724    PARAM = 2i32,
725}
726impl FunctionParameterType {
727    ///Idiomatic alias for [`Self::FUNCTION_PARAMETER_TYPE_UNSPECIFIED`]; `Debug` prints the variant name.
728    #[allow(non_upper_case_globals)]
729    pub const FunctionParameterTypeUnspecified: Self = Self::FUNCTION_PARAMETER_TYPE_UNSPECIFIED;
730    ///Idiomatic alias for [`Self::COLUMN`]; `Debug` prints the variant name.
731    #[allow(non_upper_case_globals)]
732    pub const Column: Self = Self::COLUMN;
733    ///Idiomatic alias for [`Self::PARAM`]; `Debug` prints the variant name.
734    #[allow(non_upper_case_globals)]
735    pub const Param: Self = Self::PARAM;
736}
737impl ::core::default::Default for FunctionParameterType {
738    fn default() -> Self {
739        Self::FUNCTION_PARAMETER_TYPE_UNSPECIFIED
740    }
741}
742impl ::serde::Serialize for FunctionParameterType {
743    fn serialize<S: ::serde::Serializer>(
744        &self,
745        s: S,
746    ) -> ::core::result::Result<S::Ok, S::Error> {
747        s.serialize_str(::buffa::Enumeration::proto_name(self))
748    }
749}
750impl<'de> ::serde::Deserialize<'de> for FunctionParameterType {
751    fn deserialize<D: ::serde::Deserializer<'de>>(
752        d: D,
753    ) -> ::core::result::Result<Self, D::Error> {
754        struct _V;
755        impl ::serde::de::Visitor<'_> for _V {
756            type Value = FunctionParameterType;
757            fn expecting(
758                &self,
759                f: &mut ::core::fmt::Formatter<'_>,
760            ) -> ::core::fmt::Result {
761                f.write_str(
762                    concat!(
763                        "a string, integer, or null for ",
764                        stringify!(FunctionParameterType)
765                    ),
766                )
767            }
768            fn visit_str<E: ::serde::de::Error>(
769                self,
770                v: &str,
771            ) -> ::core::result::Result<FunctionParameterType, E> {
772                <FunctionParameterType as ::buffa::Enumeration>::from_proto_name(v)
773                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
774            }
775            fn visit_i64<E: ::serde::de::Error>(
776                self,
777                v: i64,
778            ) -> ::core::result::Result<FunctionParameterType, E> {
779                let v32 = i32::try_from(v)
780                    .map_err(|_| {
781                        ::serde::de::Error::custom(
782                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
783                        )
784                    })?;
785                <FunctionParameterType as ::buffa::Enumeration>::from_i32(v32)
786                    .ok_or_else(|| {
787                        ::serde::de::Error::custom(
788                            ::buffa::alloc::format!("unknown enum value {v32}"),
789                        )
790                    })
791            }
792            fn visit_u64<E: ::serde::de::Error>(
793                self,
794                v: u64,
795            ) -> ::core::result::Result<FunctionParameterType, E> {
796                let v32 = i32::try_from(v)
797                    .map_err(|_| {
798                        ::serde::de::Error::custom(
799                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
800                        )
801                    })?;
802                <FunctionParameterType as ::buffa::Enumeration>::from_i32(v32)
803                    .ok_or_else(|| {
804                        ::serde::de::Error::custom(
805                            ::buffa::alloc::format!("unknown enum value {v32}"),
806                        )
807                    })
808            }
809            fn visit_unit<E: ::serde::de::Error>(
810                self,
811            ) -> ::core::result::Result<FunctionParameterType, E> {
812                ::core::result::Result::Ok(::core::default::Default::default())
813            }
814        }
815        d.deserialize_any(_V)
816    }
817}
818impl ::buffa::json_helpers::ProtoElemJson for FunctionParameterType {
819    fn serialize_proto_json<S: ::serde::Serializer>(
820        v: &Self,
821        s: S,
822    ) -> ::core::result::Result<S::Ok, S::Error> {
823        ::serde::Serialize::serialize(v, s)
824    }
825    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
826        d: D,
827    ) -> ::core::result::Result<Self, D::Error> {
828        <Self as ::serde::Deserialize>::deserialize(d)
829    }
830}
831impl ::buffa::Enumeration for FunctionParameterType {
832    fn from_i32(value: i32) -> ::core::option::Option<Self> {
833        match value {
834            0i32 => {
835                ::core::option::Option::Some(Self::FUNCTION_PARAMETER_TYPE_UNSPECIFIED)
836            }
837            1i32 => ::core::option::Option::Some(Self::COLUMN),
838            2i32 => ::core::option::Option::Some(Self::PARAM),
839            _ => ::core::option::Option::None,
840        }
841    }
842    fn to_i32(&self) -> i32 {
843        *self as i32
844    }
845    fn proto_name(&self) -> &'static str {
846        match self {
847            Self::FUNCTION_PARAMETER_TYPE_UNSPECIFIED => {
848                "FUNCTION_PARAMETER_TYPE_UNSPECIFIED"
849            }
850            Self::COLUMN => "COLUMN",
851            Self::PARAM => "PARAM",
852        }
853    }
854    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
855        match name {
856            "FUNCTION_PARAMETER_TYPE_UNSPECIFIED" => {
857                ::core::option::Option::Some(Self::FUNCTION_PARAMETER_TYPE_UNSPECIFIED)
858            }
859            "COLUMN" => ::core::option::Option::Some(Self::COLUMN),
860            "PARAM" => ::core::option::Option::Some(Self::PARAM),
861            _ => ::core::option::Option::None,
862        }
863    }
864    fn values() -> &'static [Self] {
865        &[Self::FUNCTION_PARAMETER_TYPE_UNSPECIFIED, Self::COLUMN, Self::PARAM]
866    }
867}
868/// Information about a single function parameter.
869#[derive(Clone, PartialEq, Default)]
870#[derive(::serde::Serialize, ::serde::Deserialize)]
871#[serde(default)]
872pub struct FunctionParameterInfo {
873    /// Name of parameter.
874    ///
875    /// Field 1: `name`
876    #[serde(
877        rename = "name",
878        with = "::buffa::json_helpers::proto_string",
879        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
880    )]
881    pub name: ::buffa::alloc::string::String,
882    /// Full data type specification as SQL/catalogString text.
883    ///
884    /// Field 2: `type_text`
885    #[serde(
886        rename = "type_text",
887        alias = "typeText",
888        with = "::buffa::json_helpers::proto_string",
889        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
890    )]
891    pub type_text: ::buffa::alloc::string::String,
892    /// Full data type specification, JSON-serialized.
893    ///
894    /// Field 3: `type_json`
895    #[serde(
896        rename = "type_json",
897        alias = "typeJson",
898        skip_serializing_if = "::core::option::Option::is_none"
899    )]
900    pub type_json: ::core::option::Option<::buffa::alloc::string::String>,
901    /// Data type name.
902    ///
903    /// Field 4: `type_name`
904    #[serde(
905        rename = "type_name",
906        alias = "typeName",
907        with = "::buffa::json_helpers::proto_enum",
908        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
909    )]
910    pub type_name: ::buffa::EnumValue<super::super::tables::v1::ColumnTypeName>,
911    /// Digits of precision; required for DecimalTypes.
912    ///
913    /// Field 5: `type_precision`
914    #[serde(
915        rename = "type_precision",
916        alias = "typePrecision",
917        with = "::buffa::json_helpers::opt_int32",
918        skip_serializing_if = "::core::option::Option::is_none"
919    )]
920    pub type_precision: ::core::option::Option<i32>,
921    /// Digits to right of decimal; required for DecimalTypes.
922    ///
923    /// Field 6: `type_scale`
924    #[serde(
925        rename = "type_scale",
926        alias = "typeScale",
927        with = "::buffa::json_helpers::opt_int32",
928        skip_serializing_if = "::core::option::Option::is_none"
929    )]
930    pub type_scale: ::core::option::Option<i32>,
931    /// Format of IntervalType.
932    ///
933    /// Field 7: `type_interval_type`
934    #[serde(
935        rename = "type_interval_type",
936        alias = "typeIntervalType",
937        skip_serializing_if = "::core::option::Option::is_none"
938    )]
939    pub type_interval_type: ::core::option::Option<::buffa::alloc::string::String>,
940    /// Ordinal position of column (starting at position 0).
941    ///
942    /// Field 8: `position`
943    #[serde(
944        rename = "position",
945        with = "::buffa::json_helpers::opt_int32",
946        skip_serializing_if = "::core::option::Option::is_none"
947    )]
948    pub position: ::core::option::Option<i32>,
949    /// The mode of the function parameter.
950    ///
951    /// Field 9: `parameter_mode`
952    #[serde(
953        rename = "parameter_mode",
954        alias = "parameterMode",
955        with = "::buffa::json_helpers::proto_enum",
956        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
957    )]
958    pub parameter_mode: ::buffa::EnumValue<ParameterMode>,
959    /// The type of function parameter.
960    ///
961    /// Field 10: `parameter_type`
962    #[serde(
963        rename = "parameter_type",
964        alias = "parameterType",
965        with = "::buffa::json_helpers::proto_enum",
966        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
967    )]
968    pub parameter_type: ::buffa::EnumValue<FunctionParameterType>,
969    /// Default value of the parameter.
970    ///
971    /// Field 11: `parameter_default`
972    #[serde(
973        rename = "parameter_default",
974        alias = "parameterDefault",
975        skip_serializing_if = "::core::option::Option::is_none"
976    )]
977    pub parameter_default: ::core::option::Option<::buffa::alloc::string::String>,
978    /// User-provided free-form text description.
979    ///
980    /// Field 12: `comment`
981    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
982    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
983    #[serde(skip)]
984    #[doc(hidden)]
985    pub __buffa_unknown_fields: ::buffa::UnknownFields,
986}
987impl ::core::fmt::Debug for FunctionParameterInfo {
988    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
989        f.debug_struct("FunctionParameterInfo")
990            .field("name", &self.name)
991            .field("type_text", &self.type_text)
992            .field("type_json", &self.type_json)
993            .field("type_name", &self.type_name)
994            .field("type_precision", &self.type_precision)
995            .field("type_scale", &self.type_scale)
996            .field("type_interval_type", &self.type_interval_type)
997            .field("position", &self.position)
998            .field("parameter_mode", &self.parameter_mode)
999            .field("parameter_type", &self.parameter_type)
1000            .field("parameter_default", &self.parameter_default)
1001            .field("comment", &self.comment)
1002            .finish()
1003    }
1004}
1005impl FunctionParameterInfo {
1006    /// Protobuf type URL for this message, for use with `Any::pack` and
1007    /// `Any::unpack_if`.
1008    ///
1009    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1010    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.FunctionParameterInfo";
1011}
1012impl FunctionParameterInfo {
1013    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1014    #[inline]
1015    ///Sets [`Self::type_json`] to `Some(value)`, consuming and returning `self`.
1016    pub fn with_type_json(
1017        mut self,
1018        value: impl Into<::buffa::alloc::string::String>,
1019    ) -> Self {
1020        self.type_json = Some(value.into());
1021        self
1022    }
1023    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1024    #[inline]
1025    ///Sets [`Self::type_precision`] to `Some(value)`, consuming and returning `self`.
1026    pub fn with_type_precision(mut self, value: i32) -> Self {
1027        self.type_precision = Some(value);
1028        self
1029    }
1030    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1031    #[inline]
1032    ///Sets [`Self::type_scale`] to `Some(value)`, consuming and returning `self`.
1033    pub fn with_type_scale(mut self, value: i32) -> Self {
1034        self.type_scale = Some(value);
1035        self
1036    }
1037    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1038    #[inline]
1039    ///Sets [`Self::type_interval_type`] to `Some(value)`, consuming and returning `self`.
1040    pub fn with_type_interval_type(
1041        mut self,
1042        value: impl Into<::buffa::alloc::string::String>,
1043    ) -> Self {
1044        self.type_interval_type = Some(value.into());
1045        self
1046    }
1047    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1048    #[inline]
1049    ///Sets [`Self::position`] to `Some(value)`, consuming and returning `self`.
1050    pub fn with_position(mut self, value: i32) -> Self {
1051        self.position = Some(value);
1052        self
1053    }
1054    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1055    #[inline]
1056    ///Sets [`Self::parameter_default`] to `Some(value)`, consuming and returning `self`.
1057    pub fn with_parameter_default(
1058        mut self,
1059        value: impl Into<::buffa::alloc::string::String>,
1060    ) -> Self {
1061        self.parameter_default = Some(value.into());
1062        self
1063    }
1064    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1065    #[inline]
1066    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
1067    pub fn with_comment(
1068        mut self,
1069        value: impl Into<::buffa::alloc::string::String>,
1070    ) -> Self {
1071        self.comment = Some(value.into());
1072        self
1073    }
1074}
1075impl ::buffa::DefaultInstance for FunctionParameterInfo {
1076    fn default_instance() -> &'static Self {
1077        static VALUE: ::buffa::__private::OnceBox<FunctionParameterInfo> = ::buffa::__private::OnceBox::new();
1078        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1079    }
1080}
1081impl ::buffa::MessageName for FunctionParameterInfo {
1082    const PACKAGE: &'static str = "unitycatalog.functions.v1";
1083    const NAME: &'static str = "FunctionParameterInfo";
1084    const FULL_NAME: &'static str = "unitycatalog.functions.v1.FunctionParameterInfo";
1085    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.FunctionParameterInfo";
1086}
1087impl ::buffa::Message for FunctionParameterInfo {
1088    /// Returns the total encoded size in bytes.
1089    ///
1090    /// The result is a `u32`; the protobuf specification requires all
1091    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1092    /// compliant message will never overflow this type.
1093    #[allow(clippy::let_and_return)]
1094    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1095        #[allow(unused_imports)]
1096        use ::buffa::Enumeration as _;
1097        let mut size = 0u32;
1098        if !self.name.is_empty() {
1099            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1100        }
1101        if !self.type_text.is_empty() {
1102            size += 1u32 + ::buffa::types::string_encoded_len(&self.type_text) as u32;
1103        }
1104        if let Some(ref v) = self.type_json {
1105            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1106        }
1107        {
1108            let val = self.type_name.to_i32();
1109            if val != 0 {
1110                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1111            }
1112        }
1113        if let Some(v) = self.type_precision {
1114            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1115        }
1116        if let Some(v) = self.type_scale {
1117            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1118        }
1119        if let Some(ref v) = self.type_interval_type {
1120            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1121        }
1122        if let Some(v) = self.position {
1123            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1124        }
1125        {
1126            let val = self.parameter_mode.to_i32();
1127            if val != 0 {
1128                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1129            }
1130        }
1131        {
1132            let val = self.parameter_type.to_i32();
1133            if val != 0 {
1134                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1135            }
1136        }
1137        if let Some(ref v) = self.parameter_default {
1138            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1139        }
1140        if let Some(ref v) = self.comment {
1141            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1142        }
1143        size += self.__buffa_unknown_fields.encoded_len() as u32;
1144        size
1145    }
1146    fn write_to(
1147        &self,
1148        _cache: &mut ::buffa::SizeCache,
1149        buf: &mut impl ::buffa::bytes::BufMut,
1150    ) {
1151        #[allow(unused_imports)]
1152        use ::buffa::Enumeration as _;
1153        if !self.name.is_empty() {
1154            ::buffa::encoding::Tag::new(
1155                    1u32,
1156                    ::buffa::encoding::WireType::LengthDelimited,
1157                )
1158                .encode(buf);
1159            ::buffa::types::encode_string(&self.name, buf);
1160        }
1161        if !self.type_text.is_empty() {
1162            ::buffa::encoding::Tag::new(
1163                    2u32,
1164                    ::buffa::encoding::WireType::LengthDelimited,
1165                )
1166                .encode(buf);
1167            ::buffa::types::encode_string(&self.type_text, buf);
1168        }
1169        if let Some(ref v) = self.type_json {
1170            ::buffa::encoding::Tag::new(
1171                    3u32,
1172                    ::buffa::encoding::WireType::LengthDelimited,
1173                )
1174                .encode(buf);
1175            ::buffa::types::encode_string(v, buf);
1176        }
1177        {
1178            let val = self.type_name.to_i32();
1179            if val != 0 {
1180                ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
1181                    .encode(buf);
1182                ::buffa::types::encode_int32(val, buf);
1183            }
1184        }
1185        if let Some(v) = self.type_precision {
1186            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
1187                .encode(buf);
1188            ::buffa::types::encode_int32(v, buf);
1189        }
1190        if let Some(v) = self.type_scale {
1191            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
1192                .encode(buf);
1193            ::buffa::types::encode_int32(v, buf);
1194        }
1195        if let Some(ref v) = self.type_interval_type {
1196            ::buffa::encoding::Tag::new(
1197                    7u32,
1198                    ::buffa::encoding::WireType::LengthDelimited,
1199                )
1200                .encode(buf);
1201            ::buffa::types::encode_string(v, buf);
1202        }
1203        if let Some(v) = self.position {
1204            ::buffa::encoding::Tag::new(8u32, ::buffa::encoding::WireType::Varint)
1205                .encode(buf);
1206            ::buffa::types::encode_int32(v, buf);
1207        }
1208        {
1209            let val = self.parameter_mode.to_i32();
1210            if val != 0 {
1211                ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
1212                    .encode(buf);
1213                ::buffa::types::encode_int32(val, buf);
1214            }
1215        }
1216        {
1217            let val = self.parameter_type.to_i32();
1218            if val != 0 {
1219                ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
1220                    .encode(buf);
1221                ::buffa::types::encode_int32(val, buf);
1222            }
1223        }
1224        if let Some(ref v) = self.parameter_default {
1225            ::buffa::encoding::Tag::new(
1226                    11u32,
1227                    ::buffa::encoding::WireType::LengthDelimited,
1228                )
1229                .encode(buf);
1230            ::buffa::types::encode_string(v, buf);
1231        }
1232        if let Some(ref v) = self.comment {
1233            ::buffa::encoding::Tag::new(
1234                    12u32,
1235                    ::buffa::encoding::WireType::LengthDelimited,
1236                )
1237                .encode(buf);
1238            ::buffa::types::encode_string(v, buf);
1239        }
1240        self.__buffa_unknown_fields.write_to(buf);
1241    }
1242    fn merge_field(
1243        &mut self,
1244        tag: ::buffa::encoding::Tag,
1245        buf: &mut impl ::buffa::bytes::Buf,
1246        depth: u32,
1247    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1248        #[allow(unused_imports)]
1249        use ::buffa::bytes::Buf as _;
1250        #[allow(unused_imports)]
1251        use ::buffa::Enumeration as _;
1252        match tag.field_number() {
1253            1u32 => {
1254                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1255                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1256                        field_number: 1u32,
1257                        expected: 2u8,
1258                        actual: tag.wire_type() as u8,
1259                    });
1260                }
1261                ::buffa::types::merge_string(&mut self.name, buf)?;
1262            }
1263            2u32 => {
1264                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1265                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1266                        field_number: 2u32,
1267                        expected: 2u8,
1268                        actual: tag.wire_type() as u8,
1269                    });
1270                }
1271                ::buffa::types::merge_string(&mut self.type_text, buf)?;
1272            }
1273            3u32 => {
1274                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1275                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1276                        field_number: 3u32,
1277                        expected: 2u8,
1278                        actual: tag.wire_type() as u8,
1279                    });
1280                }
1281                ::buffa::types::merge_string(
1282                    self
1283                        .type_json
1284                        .get_or_insert_with(::buffa::alloc::string::String::new),
1285                    buf,
1286                )?;
1287            }
1288            4u32 => {
1289                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1290                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1291                        field_number: 4u32,
1292                        expected: 0u8,
1293                        actual: tag.wire_type() as u8,
1294                    });
1295                }
1296                self.type_name = ::buffa::EnumValue::from(
1297                    ::buffa::types::decode_int32(buf)?,
1298                );
1299            }
1300            5u32 => {
1301                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1302                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1303                        field_number: 5u32,
1304                        expected: 0u8,
1305                        actual: tag.wire_type() as u8,
1306                    });
1307                }
1308                self.type_precision = ::core::option::Option::Some(
1309                    ::buffa::types::decode_int32(buf)?,
1310                );
1311            }
1312            6u32 => {
1313                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1314                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1315                        field_number: 6u32,
1316                        expected: 0u8,
1317                        actual: tag.wire_type() as u8,
1318                    });
1319                }
1320                self.type_scale = ::core::option::Option::Some(
1321                    ::buffa::types::decode_int32(buf)?,
1322                );
1323            }
1324            7u32 => {
1325                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1326                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1327                        field_number: 7u32,
1328                        expected: 2u8,
1329                        actual: tag.wire_type() as u8,
1330                    });
1331                }
1332                ::buffa::types::merge_string(
1333                    self
1334                        .type_interval_type
1335                        .get_or_insert_with(::buffa::alloc::string::String::new),
1336                    buf,
1337                )?;
1338            }
1339            8u32 => {
1340                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1341                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1342                        field_number: 8u32,
1343                        expected: 0u8,
1344                        actual: tag.wire_type() as u8,
1345                    });
1346                }
1347                self.position = ::core::option::Option::Some(
1348                    ::buffa::types::decode_int32(buf)?,
1349                );
1350            }
1351            9u32 => {
1352                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1353                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1354                        field_number: 9u32,
1355                        expected: 0u8,
1356                        actual: tag.wire_type() as u8,
1357                    });
1358                }
1359                self.parameter_mode = ::buffa::EnumValue::from(
1360                    ::buffa::types::decode_int32(buf)?,
1361                );
1362            }
1363            10u32 => {
1364                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1365                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1366                        field_number: 10u32,
1367                        expected: 0u8,
1368                        actual: tag.wire_type() as u8,
1369                    });
1370                }
1371                self.parameter_type = ::buffa::EnumValue::from(
1372                    ::buffa::types::decode_int32(buf)?,
1373                );
1374            }
1375            11u32 => {
1376                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1377                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1378                        field_number: 11u32,
1379                        expected: 2u8,
1380                        actual: tag.wire_type() as u8,
1381                    });
1382                }
1383                ::buffa::types::merge_string(
1384                    self
1385                        .parameter_default
1386                        .get_or_insert_with(::buffa::alloc::string::String::new),
1387                    buf,
1388                )?;
1389            }
1390            12u32 => {
1391                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1392                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1393                        field_number: 12u32,
1394                        expected: 2u8,
1395                        actual: tag.wire_type() as u8,
1396                    });
1397                }
1398                ::buffa::types::merge_string(
1399                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
1400                    buf,
1401                )?;
1402            }
1403            _ => {
1404                self.__buffa_unknown_fields
1405                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1406            }
1407        }
1408        ::core::result::Result::Ok(())
1409    }
1410    fn clear(&mut self) {
1411        self.name.clear();
1412        self.type_text.clear();
1413        self.type_json = ::core::option::Option::None;
1414        self.type_name = ::buffa::EnumValue::from(0);
1415        self.type_precision = ::core::option::Option::None;
1416        self.type_scale = ::core::option::Option::None;
1417        self.type_interval_type = ::core::option::Option::None;
1418        self.position = ::core::option::Option::None;
1419        self.parameter_mode = ::buffa::EnumValue::from(0);
1420        self.parameter_type = ::buffa::EnumValue::from(0);
1421        self.parameter_default = ::core::option::Option::None;
1422        self.comment = ::core::option::Option::None;
1423        self.__buffa_unknown_fields.clear();
1424    }
1425}
1426impl ::buffa::ExtensionSet for FunctionParameterInfo {
1427    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.FunctionParameterInfo";
1428    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1429        &self.__buffa_unknown_fields
1430    }
1431    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1432        &mut self.__buffa_unknown_fields
1433    }
1434}
1435impl ::buffa::json_helpers::ProtoElemJson for FunctionParameterInfo {
1436    fn serialize_proto_json<S: ::serde::Serializer>(
1437        v: &Self,
1438        s: S,
1439    ) -> ::core::result::Result<S::Ok, S::Error> {
1440        ::serde::Serialize::serialize(v, s)
1441    }
1442    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1443        d: D,
1444    ) -> ::core::result::Result<Self, D::Error> {
1445        <Self as ::serde::Deserialize>::deserialize(d)
1446    }
1447}
1448#[doc(hidden)]
1449pub const __FUNCTION_PARAMETER_INFO_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1450    type_url: "type.googleapis.com/unitycatalog.functions.v1.FunctionParameterInfo",
1451    to_json: ::buffa::type_registry::any_to_json::<FunctionParameterInfo>,
1452    from_json: ::buffa::type_registry::any_from_json::<FunctionParameterInfo>,
1453    is_wkt: false,
1454};
1455/// A collection of function parameters.
1456#[derive(Clone, PartialEq, Default)]
1457#[derive(::serde::Serialize, ::serde::Deserialize)]
1458#[serde(default)]
1459pub struct FunctionParameterInfos {
1460    /// The parameters of the function.
1461    ///
1462    /// Field 1: `parameters`
1463    #[serde(
1464        rename = "parameters",
1465        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1466        deserialize_with = "::buffa::json_helpers::null_as_default"
1467    )]
1468    pub parameters: ::buffa::alloc::vec::Vec<FunctionParameterInfo>,
1469    #[serde(skip)]
1470    #[doc(hidden)]
1471    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1472}
1473impl ::core::fmt::Debug for FunctionParameterInfos {
1474    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1475        f.debug_struct("FunctionParameterInfos")
1476            .field("parameters", &self.parameters)
1477            .finish()
1478    }
1479}
1480impl FunctionParameterInfos {
1481    /// Protobuf type URL for this message, for use with `Any::pack` and
1482    /// `Any::unpack_if`.
1483    ///
1484    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1485    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.FunctionParameterInfos";
1486}
1487impl ::buffa::DefaultInstance for FunctionParameterInfos {
1488    fn default_instance() -> &'static Self {
1489        static VALUE: ::buffa::__private::OnceBox<FunctionParameterInfos> = ::buffa::__private::OnceBox::new();
1490        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1491    }
1492}
1493impl ::buffa::MessageName for FunctionParameterInfos {
1494    const PACKAGE: &'static str = "unitycatalog.functions.v1";
1495    const NAME: &'static str = "FunctionParameterInfos";
1496    const FULL_NAME: &'static str = "unitycatalog.functions.v1.FunctionParameterInfos";
1497    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.FunctionParameterInfos";
1498}
1499impl ::buffa::Message for FunctionParameterInfos {
1500    /// Returns the total encoded size in bytes.
1501    ///
1502    /// The result is a `u32`; the protobuf specification requires all
1503    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1504    /// compliant message will never overflow this type.
1505    #[allow(clippy::let_and_return)]
1506    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1507        #[allow(unused_imports)]
1508        use ::buffa::Enumeration as _;
1509        let mut size = 0u32;
1510        for v in &self.parameters {
1511            let __slot = __cache.reserve();
1512            let inner_size = v.compute_size(__cache);
1513            __cache.set(__slot, inner_size);
1514            size
1515                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1516                    + inner_size;
1517        }
1518        size += self.__buffa_unknown_fields.encoded_len() as u32;
1519        size
1520    }
1521    fn write_to(
1522        &self,
1523        __cache: &mut ::buffa::SizeCache,
1524        buf: &mut impl ::buffa::bytes::BufMut,
1525    ) {
1526        #[allow(unused_imports)]
1527        use ::buffa::Enumeration as _;
1528        for v in &self.parameters {
1529            ::buffa::encoding::Tag::new(
1530                    1u32,
1531                    ::buffa::encoding::WireType::LengthDelimited,
1532                )
1533                .encode(buf);
1534            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1535            v.write_to(__cache, buf);
1536        }
1537        self.__buffa_unknown_fields.write_to(buf);
1538    }
1539    fn merge_field(
1540        &mut self,
1541        tag: ::buffa::encoding::Tag,
1542        buf: &mut impl ::buffa::bytes::Buf,
1543        depth: u32,
1544    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1545        #[allow(unused_imports)]
1546        use ::buffa::bytes::Buf as _;
1547        #[allow(unused_imports)]
1548        use ::buffa::Enumeration as _;
1549        match tag.field_number() {
1550            1u32 => {
1551                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1552                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1553                        field_number: 1u32,
1554                        expected: 2u8,
1555                        actual: tag.wire_type() as u8,
1556                    });
1557                }
1558                let mut elem = ::core::default::Default::default();
1559                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1560                self.parameters.push(elem);
1561            }
1562            _ => {
1563                self.__buffa_unknown_fields
1564                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1565            }
1566        }
1567        ::core::result::Result::Ok(())
1568    }
1569    fn clear(&mut self) {
1570        self.parameters.clear();
1571        self.__buffa_unknown_fields.clear();
1572    }
1573}
1574impl ::buffa::ExtensionSet for FunctionParameterInfos {
1575    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.FunctionParameterInfos";
1576    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1577        &self.__buffa_unknown_fields
1578    }
1579    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1580        &mut self.__buffa_unknown_fields
1581    }
1582}
1583impl ::buffa::json_helpers::ProtoElemJson for FunctionParameterInfos {
1584    fn serialize_proto_json<S: ::serde::Serializer>(
1585        v: &Self,
1586        s: S,
1587    ) -> ::core::result::Result<S::Ok, S::Error> {
1588        ::serde::Serialize::serialize(v, s)
1589    }
1590    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1591        d: D,
1592    ) -> ::core::result::Result<Self, D::Error> {
1593        <Self as ::serde::Deserialize>::deserialize(d)
1594    }
1595}
1596#[doc(hidden)]
1597pub const __FUNCTION_PARAMETER_INFOS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1598    type_url: "type.googleapis.com/unitycatalog.functions.v1.FunctionParameterInfos",
1599    to_json: ::buffa::type_registry::any_to_json::<FunctionParameterInfos>,
1600    from_json: ::buffa::type_registry::any_from_json::<FunctionParameterInfos>,
1601    is_wkt: false,
1602};
1603/// The payload for creating a new function.
1604///
1605/// Wrapped in the `function_info` envelope of a `CreateFunctionRequest`, matching
1606/// the Unity Catalog `POST /functions` wire contract.
1607#[derive(Clone, PartialEq, Default)]
1608#[derive(::serde::Serialize, ::serde::Deserialize)]
1609#[serde(default)]
1610pub struct CreateFunction {
1611    /// Name of function, relative to parent schema.
1612    ///
1613    /// Field 1: `name`
1614    #[serde(
1615        rename = "name",
1616        with = "::buffa::json_helpers::proto_string",
1617        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1618    )]
1619    pub name: ::buffa::alloc::string::String,
1620    /// Name of parent catalog.
1621    ///
1622    /// Field 2: `catalog_name`
1623    #[serde(
1624        rename = "catalog_name",
1625        alias = "catalogName",
1626        with = "::buffa::json_helpers::proto_string",
1627        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1628    )]
1629    pub catalog_name: ::buffa::alloc::string::String,
1630    /// Name of parent schema.
1631    ///
1632    /// Field 3: `schema_name`
1633    #[serde(
1634        rename = "schema_name",
1635        alias = "schemaName",
1636        with = "::buffa::json_helpers::proto_string",
1637        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1638    )]
1639    pub schema_name: ::buffa::alloc::string::String,
1640    /// Full data type specification of the return type of the function.
1641    ///
1642    /// Field 4: `data_type`
1643    #[serde(
1644        rename = "data_type",
1645        alias = "dataType",
1646        with = "::buffa::json_helpers::proto_string",
1647        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1648    )]
1649    pub data_type: ::buffa::alloc::string::String,
1650    /// Full data type specification as SQL/catalogString text.
1651    ///
1652    /// Field 5: `full_data_type`
1653    #[serde(
1654        rename = "full_data_type",
1655        alias = "fullDataType",
1656        with = "::buffa::json_helpers::proto_string",
1657        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1658    )]
1659    pub full_data_type: ::buffa::alloc::string::String,
1660    /// The array of function parameter infos.
1661    ///
1662    /// Field 6: `input_params`
1663    #[serde(
1664        rename = "input_params",
1665        alias = "inputParams",
1666        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1667    )]
1668    pub input_params: ::buffa::MessageField<FunctionParameterInfos>,
1669    /// The parameter-passing style.
1670    ///
1671    /// Field 7: `parameter_style`
1672    #[serde(
1673        rename = "parameter_style",
1674        alias = "parameterStyle",
1675        with = "::buffa::json_helpers::proto_enum",
1676        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1677    )]
1678    pub parameter_style: ::buffa::EnumValue<ParameterStyle>,
1679    /// Indicates whether the function is deterministic.
1680    ///
1681    /// Field 8: `is_deterministic`
1682    #[serde(
1683        rename = "is_deterministic",
1684        alias = "isDeterministic",
1685        with = "::buffa::json_helpers::proto_bool",
1686        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
1687    )]
1688    pub is_deterministic: bool,
1689    /// SQL data access information.
1690    ///
1691    /// Field 9: `sql_data_access`
1692    #[serde(
1693        rename = "sql_data_access",
1694        alias = "sqlDataAccess",
1695        with = "::buffa::json_helpers::proto_enum",
1696        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1697    )]
1698    pub sql_data_access: ::buffa::EnumValue<SqlDataAccess>,
1699    /// Indicates whether the function is null-calling.
1700    ///
1701    /// Field 10: `is_null_call`
1702    #[serde(
1703        rename = "is_null_call",
1704        alias = "isNullCall",
1705        with = "::buffa::json_helpers::proto_bool",
1706        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
1707    )]
1708    pub is_null_call: bool,
1709    /// The security type of the function.
1710    ///
1711    /// Field 11: `security_type`
1712    #[serde(
1713        rename = "security_type",
1714        alias = "securityType",
1715        with = "::buffa::json_helpers::proto_enum",
1716        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1717    )]
1718    pub security_type: ::buffa::EnumValue<SecurityType>,
1719    /// The routine body.
1720    ///
1721    /// Field 12: `routine_body`
1722    #[serde(
1723        rename = "routine_body",
1724        alias = "routineBody",
1725        with = "::buffa::json_helpers::proto_enum",
1726        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1727    )]
1728    pub routine_body: ::buffa::EnumValue<RoutineBody>,
1729    /// Function body.
1730    ///
1731    /// Field 13: `routine_definition`
1732    #[serde(
1733        rename = "routine_definition",
1734        alias = "routineDefinition",
1735        skip_serializing_if = "::core::option::Option::is_none"
1736    )]
1737    pub routine_definition: ::core::option::Option<::buffa::alloc::string::String>,
1738    /// The language of the function routine body.
1739    ///
1740    /// Field 14: `routine_body_language`
1741    #[serde(
1742        rename = "routine_body_language",
1743        alias = "routineBodyLanguage",
1744        skip_serializing_if = "::core::option::Option::is_none"
1745    )]
1746    pub routine_body_language: ::core::option::Option<::buffa::alloc::string::String>,
1747    /// User-provided free-form text description.
1748    ///
1749    /// Field 15: `comment`
1750    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
1751    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
1752    /// A map of key-value properties attached to the securable.
1753    ///
1754    /// Field 16: `properties`
1755    #[serde(
1756        rename = "properties",
1757        skip_serializing_if = "::buffa::__private::HashMap::is_empty",
1758        deserialize_with = "::buffa::json_helpers::null_as_default"
1759    )]
1760    pub properties: ::buffa::__private::HashMap<
1761        ::buffa::alloc::string::String,
1762        ::buffa::alloc::string::String,
1763    >,
1764    #[serde(skip)]
1765    #[doc(hidden)]
1766    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1767}
1768impl ::core::fmt::Debug for CreateFunction {
1769    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1770        f.debug_struct("CreateFunction")
1771            .field("name", &self.name)
1772            .field("catalog_name", &self.catalog_name)
1773            .field("schema_name", &self.schema_name)
1774            .field("data_type", &self.data_type)
1775            .field("full_data_type", &self.full_data_type)
1776            .field("input_params", &self.input_params)
1777            .field("parameter_style", &self.parameter_style)
1778            .field("is_deterministic", &self.is_deterministic)
1779            .field("sql_data_access", &self.sql_data_access)
1780            .field("is_null_call", &self.is_null_call)
1781            .field("security_type", &self.security_type)
1782            .field("routine_body", &self.routine_body)
1783            .field("routine_definition", &self.routine_definition)
1784            .field("routine_body_language", &self.routine_body_language)
1785            .field("comment", &self.comment)
1786            .field("properties", &self.properties)
1787            .finish()
1788    }
1789}
1790impl CreateFunction {
1791    /// Protobuf type URL for this message, for use with `Any::pack` and
1792    /// `Any::unpack_if`.
1793    ///
1794    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1795    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.CreateFunction";
1796}
1797impl CreateFunction {
1798    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1799    #[inline]
1800    ///Sets [`Self::routine_definition`] to `Some(value)`, consuming and returning `self`.
1801    pub fn with_routine_definition(
1802        mut self,
1803        value: impl Into<::buffa::alloc::string::String>,
1804    ) -> Self {
1805        self.routine_definition = Some(value.into());
1806        self
1807    }
1808    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1809    #[inline]
1810    ///Sets [`Self::routine_body_language`] to `Some(value)`, consuming and returning `self`.
1811    pub fn with_routine_body_language(
1812        mut self,
1813        value: impl Into<::buffa::alloc::string::String>,
1814    ) -> Self {
1815        self.routine_body_language = Some(value.into());
1816        self
1817    }
1818    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1819    #[inline]
1820    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
1821    pub fn with_comment(
1822        mut self,
1823        value: impl Into<::buffa::alloc::string::String>,
1824    ) -> Self {
1825        self.comment = Some(value.into());
1826        self
1827    }
1828}
1829impl ::buffa::DefaultInstance for CreateFunction {
1830    fn default_instance() -> &'static Self {
1831        static VALUE: ::buffa::__private::OnceBox<CreateFunction> = ::buffa::__private::OnceBox::new();
1832        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1833    }
1834}
1835impl ::buffa::MessageName for CreateFunction {
1836    const PACKAGE: &'static str = "unitycatalog.functions.v1";
1837    const NAME: &'static str = "CreateFunction";
1838    const FULL_NAME: &'static str = "unitycatalog.functions.v1.CreateFunction";
1839    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.CreateFunction";
1840}
1841impl ::buffa::Message for CreateFunction {
1842    /// Returns the total encoded size in bytes.
1843    ///
1844    /// The result is a `u32`; the protobuf specification requires all
1845    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1846    /// compliant message will never overflow this type.
1847    #[allow(clippy::let_and_return)]
1848    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1849        #[allow(unused_imports)]
1850        use ::buffa::Enumeration as _;
1851        let mut size = 0u32;
1852        if !self.name.is_empty() {
1853            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1854        }
1855        if !self.catalog_name.is_empty() {
1856            size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
1857        }
1858        if !self.schema_name.is_empty() {
1859            size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
1860        }
1861        if !self.data_type.is_empty() {
1862            size += 1u32 + ::buffa::types::string_encoded_len(&self.data_type) as u32;
1863        }
1864        if !self.full_data_type.is_empty() {
1865            size
1866                += 1u32
1867                    + ::buffa::types::string_encoded_len(&self.full_data_type) as u32;
1868        }
1869        if self.input_params.is_set() {
1870            let __slot = __cache.reserve();
1871            let inner_size = self.input_params.compute_size(__cache);
1872            __cache.set(__slot, inner_size);
1873            size
1874                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1875                    + inner_size;
1876        }
1877        {
1878            let val = self.parameter_style.to_i32();
1879            if val != 0 {
1880                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1881            }
1882        }
1883        if self.is_deterministic {
1884            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1885        }
1886        {
1887            let val = self.sql_data_access.to_i32();
1888            if val != 0 {
1889                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1890            }
1891        }
1892        if self.is_null_call {
1893            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1894        }
1895        {
1896            let val = self.security_type.to_i32();
1897            if val != 0 {
1898                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1899            }
1900        }
1901        {
1902            let val = self.routine_body.to_i32();
1903            if val != 0 {
1904                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1905            }
1906        }
1907        if let Some(ref v) = self.routine_definition {
1908            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1909        }
1910        if let Some(ref v) = self.routine_body_language {
1911            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1912        }
1913        if let Some(ref v) = self.comment {
1914            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1915        }
1916        #[allow(clippy::for_kv_map)]
1917        for (k, v) in &self.properties {
1918            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
1919                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1920            size
1921                += 2u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
1922                    + entry_size;
1923        }
1924        size += self.__buffa_unknown_fields.encoded_len() as u32;
1925        size
1926    }
1927    fn write_to(
1928        &self,
1929        __cache: &mut ::buffa::SizeCache,
1930        buf: &mut impl ::buffa::bytes::BufMut,
1931    ) {
1932        #[allow(unused_imports)]
1933        use ::buffa::Enumeration as _;
1934        if !self.name.is_empty() {
1935            ::buffa::encoding::Tag::new(
1936                    1u32,
1937                    ::buffa::encoding::WireType::LengthDelimited,
1938                )
1939                .encode(buf);
1940            ::buffa::types::encode_string(&self.name, buf);
1941        }
1942        if !self.catalog_name.is_empty() {
1943            ::buffa::encoding::Tag::new(
1944                    2u32,
1945                    ::buffa::encoding::WireType::LengthDelimited,
1946                )
1947                .encode(buf);
1948            ::buffa::types::encode_string(&self.catalog_name, buf);
1949        }
1950        if !self.schema_name.is_empty() {
1951            ::buffa::encoding::Tag::new(
1952                    3u32,
1953                    ::buffa::encoding::WireType::LengthDelimited,
1954                )
1955                .encode(buf);
1956            ::buffa::types::encode_string(&self.schema_name, buf);
1957        }
1958        if !self.data_type.is_empty() {
1959            ::buffa::encoding::Tag::new(
1960                    4u32,
1961                    ::buffa::encoding::WireType::LengthDelimited,
1962                )
1963                .encode(buf);
1964            ::buffa::types::encode_string(&self.data_type, buf);
1965        }
1966        if !self.full_data_type.is_empty() {
1967            ::buffa::encoding::Tag::new(
1968                    5u32,
1969                    ::buffa::encoding::WireType::LengthDelimited,
1970                )
1971                .encode(buf);
1972            ::buffa::types::encode_string(&self.full_data_type, buf);
1973        }
1974        if self.input_params.is_set() {
1975            ::buffa::encoding::Tag::new(
1976                    6u32,
1977                    ::buffa::encoding::WireType::LengthDelimited,
1978                )
1979                .encode(buf);
1980            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1981            self.input_params.write_to(__cache, buf);
1982        }
1983        {
1984            let val = self.parameter_style.to_i32();
1985            if val != 0 {
1986                ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
1987                    .encode(buf);
1988                ::buffa::types::encode_int32(val, buf);
1989            }
1990        }
1991        if self.is_deterministic {
1992            ::buffa::encoding::Tag::new(8u32, ::buffa::encoding::WireType::Varint)
1993                .encode(buf);
1994            ::buffa::types::encode_bool(self.is_deterministic, buf);
1995        }
1996        {
1997            let val = self.sql_data_access.to_i32();
1998            if val != 0 {
1999                ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
2000                    .encode(buf);
2001                ::buffa::types::encode_int32(val, buf);
2002            }
2003        }
2004        if self.is_null_call {
2005            ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
2006                .encode(buf);
2007            ::buffa::types::encode_bool(self.is_null_call, buf);
2008        }
2009        {
2010            let val = self.security_type.to_i32();
2011            if val != 0 {
2012                ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
2013                    .encode(buf);
2014                ::buffa::types::encode_int32(val, buf);
2015            }
2016        }
2017        {
2018            let val = self.routine_body.to_i32();
2019            if val != 0 {
2020                ::buffa::encoding::Tag::new(12u32, ::buffa::encoding::WireType::Varint)
2021                    .encode(buf);
2022                ::buffa::types::encode_int32(val, buf);
2023            }
2024        }
2025        if let Some(ref v) = self.routine_definition {
2026            ::buffa::encoding::Tag::new(
2027                    13u32,
2028                    ::buffa::encoding::WireType::LengthDelimited,
2029                )
2030                .encode(buf);
2031            ::buffa::types::encode_string(v, buf);
2032        }
2033        if let Some(ref v) = self.routine_body_language {
2034            ::buffa::encoding::Tag::new(
2035                    14u32,
2036                    ::buffa::encoding::WireType::LengthDelimited,
2037                )
2038                .encode(buf);
2039            ::buffa::types::encode_string(v, buf);
2040        }
2041        if let Some(ref v) = self.comment {
2042            ::buffa::encoding::Tag::new(
2043                    15u32,
2044                    ::buffa::encoding::WireType::LengthDelimited,
2045                )
2046                .encode(buf);
2047            ::buffa::types::encode_string(v, buf);
2048        }
2049        for (k, v) in &self.properties {
2050            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
2051                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2052            ::buffa::encoding::Tag::new(
2053                    16u32,
2054                    ::buffa::encoding::WireType::LengthDelimited,
2055                )
2056                .encode(buf);
2057            ::buffa::encoding::encode_varint(entry_size as u64, buf);
2058            ::buffa::encoding::Tag::new(
2059                    1u32,
2060                    ::buffa::encoding::WireType::LengthDelimited,
2061                )
2062                .encode(buf);
2063            ::buffa::types::encode_string(k, buf);
2064            ::buffa::encoding::Tag::new(
2065                    2u32,
2066                    ::buffa::encoding::WireType::LengthDelimited,
2067                )
2068                .encode(buf);
2069            ::buffa::types::encode_string(v, buf);
2070        }
2071        self.__buffa_unknown_fields.write_to(buf);
2072    }
2073    fn merge_field(
2074        &mut self,
2075        tag: ::buffa::encoding::Tag,
2076        buf: &mut impl ::buffa::bytes::Buf,
2077        depth: u32,
2078    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2079        #[allow(unused_imports)]
2080        use ::buffa::bytes::Buf as _;
2081        #[allow(unused_imports)]
2082        use ::buffa::Enumeration as _;
2083        match tag.field_number() {
2084            1u32 => {
2085                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2086                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2087                        field_number: 1u32,
2088                        expected: 2u8,
2089                        actual: tag.wire_type() as u8,
2090                    });
2091                }
2092                ::buffa::types::merge_string(&mut self.name, buf)?;
2093            }
2094            2u32 => {
2095                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2096                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2097                        field_number: 2u32,
2098                        expected: 2u8,
2099                        actual: tag.wire_type() as u8,
2100                    });
2101                }
2102                ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
2103            }
2104            3u32 => {
2105                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2106                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2107                        field_number: 3u32,
2108                        expected: 2u8,
2109                        actual: tag.wire_type() as u8,
2110                    });
2111                }
2112                ::buffa::types::merge_string(&mut self.schema_name, buf)?;
2113            }
2114            4u32 => {
2115                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2116                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2117                        field_number: 4u32,
2118                        expected: 2u8,
2119                        actual: tag.wire_type() as u8,
2120                    });
2121                }
2122                ::buffa::types::merge_string(&mut self.data_type, buf)?;
2123            }
2124            5u32 => {
2125                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2126                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2127                        field_number: 5u32,
2128                        expected: 2u8,
2129                        actual: tag.wire_type() as u8,
2130                    });
2131                }
2132                ::buffa::types::merge_string(&mut self.full_data_type, buf)?;
2133            }
2134            6u32 => {
2135                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2136                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2137                        field_number: 6u32,
2138                        expected: 2u8,
2139                        actual: tag.wire_type() as u8,
2140                    });
2141                }
2142                ::buffa::Message::merge_length_delimited(
2143                    self.input_params.get_or_insert_default(),
2144                    buf,
2145                    depth,
2146                )?;
2147            }
2148            7u32 => {
2149                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2150                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2151                        field_number: 7u32,
2152                        expected: 0u8,
2153                        actual: tag.wire_type() as u8,
2154                    });
2155                }
2156                self.parameter_style = ::buffa::EnumValue::from(
2157                    ::buffa::types::decode_int32(buf)?,
2158                );
2159            }
2160            8u32 => {
2161                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2162                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2163                        field_number: 8u32,
2164                        expected: 0u8,
2165                        actual: tag.wire_type() as u8,
2166                    });
2167                }
2168                self.is_deterministic = ::buffa::types::decode_bool(buf)?;
2169            }
2170            9u32 => {
2171                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2172                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2173                        field_number: 9u32,
2174                        expected: 0u8,
2175                        actual: tag.wire_type() as u8,
2176                    });
2177                }
2178                self.sql_data_access = ::buffa::EnumValue::from(
2179                    ::buffa::types::decode_int32(buf)?,
2180                );
2181            }
2182            10u32 => {
2183                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2184                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2185                        field_number: 10u32,
2186                        expected: 0u8,
2187                        actual: tag.wire_type() as u8,
2188                    });
2189                }
2190                self.is_null_call = ::buffa::types::decode_bool(buf)?;
2191            }
2192            11u32 => {
2193                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2194                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2195                        field_number: 11u32,
2196                        expected: 0u8,
2197                        actual: tag.wire_type() as u8,
2198                    });
2199                }
2200                self.security_type = ::buffa::EnumValue::from(
2201                    ::buffa::types::decode_int32(buf)?,
2202                );
2203            }
2204            12u32 => {
2205                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2206                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2207                        field_number: 12u32,
2208                        expected: 0u8,
2209                        actual: tag.wire_type() as u8,
2210                    });
2211                }
2212                self.routine_body = ::buffa::EnumValue::from(
2213                    ::buffa::types::decode_int32(buf)?,
2214                );
2215            }
2216            13u32 => {
2217                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2218                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2219                        field_number: 13u32,
2220                        expected: 2u8,
2221                        actual: tag.wire_type() as u8,
2222                    });
2223                }
2224                ::buffa::types::merge_string(
2225                    self
2226                        .routine_definition
2227                        .get_or_insert_with(::buffa::alloc::string::String::new),
2228                    buf,
2229                )?;
2230            }
2231            14u32 => {
2232                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2233                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2234                        field_number: 14u32,
2235                        expected: 2u8,
2236                        actual: tag.wire_type() as u8,
2237                    });
2238                }
2239                ::buffa::types::merge_string(
2240                    self
2241                        .routine_body_language
2242                        .get_or_insert_with(::buffa::alloc::string::String::new),
2243                    buf,
2244                )?;
2245            }
2246            15u32 => {
2247                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2248                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2249                        field_number: 15u32,
2250                        expected: 2u8,
2251                        actual: tag.wire_type() as u8,
2252                    });
2253                }
2254                ::buffa::types::merge_string(
2255                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
2256                    buf,
2257                )?;
2258            }
2259            16u32 => {
2260                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2261                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2262                        field_number: 16u32,
2263                        expected: 2u8,
2264                        actual: tag.wire_type() as u8,
2265                    });
2266                }
2267                let entry_len = ::buffa::encoding::decode_varint(buf)?;
2268                let entry_len = usize::try_from(entry_len)
2269                    .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
2270                if buf.remaining() < entry_len {
2271                    return ::core::result::Result::Err(
2272                        ::buffa::DecodeError::UnexpectedEof,
2273                    );
2274                }
2275                let entry_limit = buf.remaining() - entry_len;
2276                let mut key = ::core::default::Default::default();
2277                let mut val = ::core::default::Default::default();
2278                while buf.remaining() > entry_limit {
2279                    let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
2280                    match entry_tag.field_number() {
2281                        1 => {
2282                            if entry_tag.wire_type()
2283                                != ::buffa::encoding::WireType::LengthDelimited
2284                            {
2285                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2286                                    field_number: entry_tag.field_number(),
2287                                    expected: 2u8,
2288                                    actual: entry_tag.wire_type() as u8,
2289                                });
2290                            }
2291                            key = ::buffa::types::decode_string(buf)?;
2292                        }
2293                        2 => {
2294                            if entry_tag.wire_type()
2295                                != ::buffa::encoding::WireType::LengthDelimited
2296                            {
2297                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2298                                    field_number: entry_tag.field_number(),
2299                                    expected: 2u8,
2300                                    actual: entry_tag.wire_type() as u8,
2301                                });
2302                            }
2303                            val = ::buffa::types::decode_string(buf)?;
2304                        }
2305                        _ => {
2306                            ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
2307                        }
2308                    }
2309                }
2310                if buf.remaining() != entry_limit {
2311                    let remaining = buf.remaining();
2312                    if remaining > entry_limit {
2313                        buf.advance(remaining - entry_limit);
2314                    } else {
2315                        return ::core::result::Result::Err(
2316                            ::buffa::DecodeError::UnexpectedEof,
2317                        );
2318                    }
2319                }
2320                self.properties.insert(key, val);
2321            }
2322            _ => {
2323                self.__buffa_unknown_fields
2324                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2325            }
2326        }
2327        ::core::result::Result::Ok(())
2328    }
2329    fn clear(&mut self) {
2330        self.name.clear();
2331        self.catalog_name.clear();
2332        self.schema_name.clear();
2333        self.data_type.clear();
2334        self.full_data_type.clear();
2335        self.input_params = ::buffa::MessageField::none();
2336        self.parameter_style = ::buffa::EnumValue::from(0);
2337        self.is_deterministic = false;
2338        self.sql_data_access = ::buffa::EnumValue::from(0);
2339        self.is_null_call = false;
2340        self.security_type = ::buffa::EnumValue::from(0);
2341        self.routine_body = ::buffa::EnumValue::from(0);
2342        self.routine_definition = ::core::option::Option::None;
2343        self.routine_body_language = ::core::option::Option::None;
2344        self.comment = ::core::option::Option::None;
2345        self.properties.clear();
2346        self.__buffa_unknown_fields.clear();
2347    }
2348}
2349impl ::buffa::ExtensionSet for CreateFunction {
2350    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.CreateFunction";
2351    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2352        &self.__buffa_unknown_fields
2353    }
2354    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2355        &mut self.__buffa_unknown_fields
2356    }
2357}
2358impl ::buffa::json_helpers::ProtoElemJson for CreateFunction {
2359    fn serialize_proto_json<S: ::serde::Serializer>(
2360        v: &Self,
2361        s: S,
2362    ) -> ::core::result::Result<S::Ok, S::Error> {
2363        ::serde::Serialize::serialize(v, s)
2364    }
2365    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2366        d: D,
2367    ) -> ::core::result::Result<Self, D::Error> {
2368        <Self as ::serde::Deserialize>::deserialize(d)
2369    }
2370}
2371#[doc(hidden)]
2372pub const __CREATE_FUNCTION_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2373    type_url: "type.googleapis.com/unitycatalog.functions.v1.CreateFunction",
2374    to_json: ::buffa::type_registry::any_to_json::<CreateFunction>,
2375    from_json: ::buffa::type_registry::any_from_json::<CreateFunction>,
2376    is_wkt: false,
2377};
2378/// A User-Defined Function (UDF) registered under a catalog + schema hierarchy.
2379#[derive(Clone, PartialEq, Default)]
2380#[derive(::serde::Serialize, ::serde::Deserialize)]
2381#[serde(default)]
2382pub struct Function {
2383    /// Name of function, relative to parent schema.
2384    ///
2385    /// Field 1: `name`
2386    #[serde(
2387        rename = "name",
2388        with = "::buffa::json_helpers::proto_string",
2389        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2390    )]
2391    pub name: ::buffa::alloc::string::String,
2392    /// Name of parent catalog.
2393    ///
2394    /// Field 2: `catalog_name`
2395    #[serde(
2396        rename = "catalog_name",
2397        alias = "catalogName",
2398        with = "::buffa::json_helpers::proto_string",
2399        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2400    )]
2401    pub catalog_name: ::buffa::alloc::string::String,
2402    /// Name of parent schema.
2403    ///
2404    /// Field 3: `schema_name`
2405    #[serde(
2406        rename = "schema_name",
2407        alias = "schemaName",
2408        with = "::buffa::json_helpers::proto_string",
2409        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2410    )]
2411    pub schema_name: ::buffa::alloc::string::String,
2412    /// The three-level (fully qualified) name of the function.
2413    ///
2414    /// Format: catalog_name.schema_name.function_name
2415    ///
2416    /// Field 4: `full_name`
2417    #[serde(
2418        rename = "full_name",
2419        alias = "fullName",
2420        with = "::buffa::json_helpers::proto_string",
2421        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2422    )]
2423    pub full_name: ::buffa::alloc::string::String,
2424    /// Full data type specification of the return type of the function.
2425    ///
2426    /// Field 5: `data_type`
2427    #[serde(
2428        rename = "data_type",
2429        alias = "dataType",
2430        with = "::buffa::json_helpers::proto_string",
2431        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2432    )]
2433    pub data_type: ::buffa::alloc::string::String,
2434    /// Full data type specification as SQL/catalogString text.
2435    ///
2436    /// Field 6: `full_data_type`
2437    #[serde(
2438        rename = "full_data_type",
2439        alias = "fullDataType",
2440        with = "::buffa::json_helpers::proto_string",
2441        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2442    )]
2443    pub full_data_type: ::buffa::alloc::string::String,
2444    /// The array of function parameter infos.
2445    ///
2446    /// Field 7: `input_params`
2447    #[serde(
2448        rename = "input_params",
2449        alias = "inputParams",
2450        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2451    )]
2452    pub input_params: ::buffa::MessageField<FunctionParameterInfos>,
2453    /// The return type of the function in JSON format.
2454    ///
2455    /// Field 8: `return_params`
2456    #[serde(
2457        rename = "return_params",
2458        alias = "returnParams",
2459        skip_serializing_if = "::core::option::Option::is_none"
2460    )]
2461    pub return_params: ::core::option::Option<::buffa::alloc::string::String>,
2462    /// The language of the function routine body.
2463    ///
2464    /// Field 9: `routine_body_language`
2465    #[serde(
2466        rename = "routine_body_language",
2467        alias = "routineBodyLanguage",
2468        skip_serializing_if = "::core::option::Option::is_none"
2469    )]
2470    pub routine_body_language: ::core::option::Option<::buffa::alloc::string::String>,
2471    /// Function body.
2472    ///
2473    /// Field 10: `routine_definition`
2474    #[serde(
2475        rename = "routine_definition",
2476        alias = "routineDefinition",
2477        skip_serializing_if = "::core::option::Option::is_none"
2478    )]
2479    pub routine_definition: ::core::option::Option<::buffa::alloc::string::String>,
2480    /// Function dependencies (in JSON form).
2481    ///
2482    /// Field 11: `routine_dependencies`
2483    #[serde(
2484        rename = "routine_dependencies",
2485        alias = "routineDependencies",
2486        skip_serializing_if = "::core::option::Option::is_none"
2487    )]
2488    pub routine_dependencies: ::core::option::Option<::buffa::alloc::string::String>,
2489    /// The parameter-passing style.
2490    ///
2491    /// Field 12: `parameter_style`
2492    #[serde(
2493        rename = "parameter_style",
2494        alias = "parameterStyle",
2495        with = "::buffa::json_helpers::proto_enum",
2496        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2497    )]
2498    pub parameter_style: ::buffa::EnumValue<ParameterStyle>,
2499    /// Indicates whether the function is deterministic.
2500    ///
2501    /// Field 13: `is_deterministic`
2502    #[serde(
2503        rename = "is_deterministic",
2504        alias = "isDeterministic",
2505        with = "::buffa::json_helpers::proto_bool",
2506        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
2507    )]
2508    pub is_deterministic: bool,
2509    /// SQL data access information.
2510    ///
2511    /// Field 14: `sql_data_access`
2512    #[serde(
2513        rename = "sql_data_access",
2514        alias = "sqlDataAccess",
2515        with = "::buffa::json_helpers::proto_enum",
2516        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2517    )]
2518    pub sql_data_access: ::buffa::EnumValue<SqlDataAccess>,
2519    /// Indicates whether the function is null-calling.
2520    ///
2521    /// Field 15: `is_null_call`
2522    #[serde(
2523        rename = "is_null_call",
2524        alias = "isNullCall",
2525        with = "::buffa::json_helpers::proto_bool",
2526        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
2527    )]
2528    pub is_null_call: bool,
2529    /// The security type of the function.
2530    ///
2531    /// Field 16: `security_type`
2532    #[serde(
2533        rename = "security_type",
2534        alias = "securityType",
2535        with = "::buffa::json_helpers::proto_enum",
2536        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2537    )]
2538    pub security_type: ::buffa::EnumValue<SecurityType>,
2539    /// The type of the function (SCALAR or TABLE).
2540    ///
2541    /// Field 17: `specific_name`
2542    #[serde(
2543        rename = "specific_name",
2544        alias = "specificName",
2545        skip_serializing_if = "::core::option::Option::is_none"
2546    )]
2547    pub specific_name: ::core::option::Option<::buffa::alloc::string::String>,
2548    /// The routine body.
2549    ///
2550    /// Field 18: `routine_body`
2551    #[serde(
2552        rename = "routine_body",
2553        alias = "routineBody",
2554        with = "::buffa::json_helpers::proto_enum",
2555        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2556    )]
2557    pub routine_body: ::buffa::EnumValue<RoutineBody>,
2558    /// User-provided free-form text description.
2559    ///
2560    /// Field 19: `comment`
2561    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
2562    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
2563    /// A map of key-value properties attached to the securable.
2564    ///
2565    /// Field 20: `properties`
2566    #[serde(
2567        rename = "properties",
2568        skip_serializing_if = "::buffa::__private::HashMap::is_empty",
2569        deserialize_with = "::buffa::json_helpers::null_as_default"
2570    )]
2571    pub properties: ::buffa::__private::HashMap<
2572        ::buffa::alloc::string::String,
2573        ::buffa::alloc::string::String,
2574    >,
2575    /// Username of current owner of the function.
2576    ///
2577    /// Field 21: `owner`
2578    #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
2579    pub owner: ::core::option::Option<::buffa::alloc::string::String>,
2580    /// Unique identifier for the function.
2581    ///
2582    /// Field 22: `function_id`
2583    #[serde(
2584        rename = "function_id",
2585        alias = "functionId",
2586        skip_serializing_if = "::core::option::Option::is_none"
2587    )]
2588    pub function_id: ::core::option::Option<::buffa::alloc::string::String>,
2589    /// Time at which this function was created, in epoch milliseconds.
2590    ///
2591    /// Field 1000: `created_at`
2592    #[serde(
2593        rename = "created_at",
2594        alias = "createdAt",
2595        with = "::buffa::json_helpers::opt_int64",
2596        skip_serializing_if = "::core::option::Option::is_none"
2597    )]
2598    pub created_at: ::core::option::Option<i64>,
2599    /// Username of function creator.
2600    ///
2601    /// Field 1001: `created_by`
2602    #[serde(
2603        rename = "created_by",
2604        alias = "createdBy",
2605        skip_serializing_if = "::core::option::Option::is_none"
2606    )]
2607    pub created_by: ::core::option::Option<::buffa::alloc::string::String>,
2608    /// Time at which this function was last updated, in epoch milliseconds.
2609    ///
2610    /// Field 1002: `updated_at`
2611    #[serde(
2612        rename = "updated_at",
2613        alias = "updatedAt",
2614        with = "::buffa::json_helpers::opt_int64",
2615        skip_serializing_if = "::core::option::Option::is_none"
2616    )]
2617    pub updated_at: ::core::option::Option<i64>,
2618    /// Username of user who last modified the function.
2619    ///
2620    /// Field 1003: `updated_by`
2621    #[serde(
2622        rename = "updated_by",
2623        alias = "updatedBy",
2624        skip_serializing_if = "::core::option::Option::is_none"
2625    )]
2626    pub updated_by: ::core::option::Option<::buffa::alloc::string::String>,
2627    #[serde(skip)]
2628    #[doc(hidden)]
2629    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2630}
2631impl ::core::fmt::Debug for Function {
2632    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2633        f.debug_struct("Function")
2634            .field("name", &self.name)
2635            .field("catalog_name", &self.catalog_name)
2636            .field("schema_name", &self.schema_name)
2637            .field("full_name", &self.full_name)
2638            .field("data_type", &self.data_type)
2639            .field("full_data_type", &self.full_data_type)
2640            .field("input_params", &self.input_params)
2641            .field("return_params", &self.return_params)
2642            .field("routine_body_language", &self.routine_body_language)
2643            .field("routine_definition", &self.routine_definition)
2644            .field("routine_dependencies", &self.routine_dependencies)
2645            .field("parameter_style", &self.parameter_style)
2646            .field("is_deterministic", &self.is_deterministic)
2647            .field("sql_data_access", &self.sql_data_access)
2648            .field("is_null_call", &self.is_null_call)
2649            .field("security_type", &self.security_type)
2650            .field("specific_name", &self.specific_name)
2651            .field("routine_body", &self.routine_body)
2652            .field("comment", &self.comment)
2653            .field("properties", &self.properties)
2654            .field("owner", &self.owner)
2655            .field("function_id", &self.function_id)
2656            .field("created_at", &self.created_at)
2657            .field("created_by", &self.created_by)
2658            .field("updated_at", &self.updated_at)
2659            .field("updated_by", &self.updated_by)
2660            .finish()
2661    }
2662}
2663impl Function {
2664    /// Protobuf type URL for this message, for use with `Any::pack` and
2665    /// `Any::unpack_if`.
2666    ///
2667    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2668    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.Function";
2669}
2670impl Function {
2671    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2672    #[inline]
2673    ///Sets [`Self::return_params`] to `Some(value)`, consuming and returning `self`.
2674    pub fn with_return_params(
2675        mut self,
2676        value: impl Into<::buffa::alloc::string::String>,
2677    ) -> Self {
2678        self.return_params = Some(value.into());
2679        self
2680    }
2681    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2682    #[inline]
2683    ///Sets [`Self::routine_body_language`] to `Some(value)`, consuming and returning `self`.
2684    pub fn with_routine_body_language(
2685        mut self,
2686        value: impl Into<::buffa::alloc::string::String>,
2687    ) -> Self {
2688        self.routine_body_language = Some(value.into());
2689        self
2690    }
2691    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2692    #[inline]
2693    ///Sets [`Self::routine_definition`] to `Some(value)`, consuming and returning `self`.
2694    pub fn with_routine_definition(
2695        mut self,
2696        value: impl Into<::buffa::alloc::string::String>,
2697    ) -> Self {
2698        self.routine_definition = Some(value.into());
2699        self
2700    }
2701    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2702    #[inline]
2703    ///Sets [`Self::routine_dependencies`] to `Some(value)`, consuming and returning `self`.
2704    pub fn with_routine_dependencies(
2705        mut self,
2706        value: impl Into<::buffa::alloc::string::String>,
2707    ) -> Self {
2708        self.routine_dependencies = Some(value.into());
2709        self
2710    }
2711    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2712    #[inline]
2713    ///Sets [`Self::specific_name`] to `Some(value)`, consuming and returning `self`.
2714    pub fn with_specific_name(
2715        mut self,
2716        value: impl Into<::buffa::alloc::string::String>,
2717    ) -> Self {
2718        self.specific_name = Some(value.into());
2719        self
2720    }
2721    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2722    #[inline]
2723    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
2724    pub fn with_comment(
2725        mut self,
2726        value: impl Into<::buffa::alloc::string::String>,
2727    ) -> Self {
2728        self.comment = Some(value.into());
2729        self
2730    }
2731    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2732    #[inline]
2733    ///Sets [`Self::owner`] to `Some(value)`, consuming and returning `self`.
2734    pub fn with_owner(
2735        mut self,
2736        value: impl Into<::buffa::alloc::string::String>,
2737    ) -> Self {
2738        self.owner = Some(value.into());
2739        self
2740    }
2741    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2742    #[inline]
2743    ///Sets [`Self::function_id`] to `Some(value)`, consuming and returning `self`.
2744    pub fn with_function_id(
2745        mut self,
2746        value: impl Into<::buffa::alloc::string::String>,
2747    ) -> Self {
2748        self.function_id = Some(value.into());
2749        self
2750    }
2751    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2752    #[inline]
2753    ///Sets [`Self::created_at`] to `Some(value)`, consuming and returning `self`.
2754    pub fn with_created_at(mut self, value: i64) -> Self {
2755        self.created_at = Some(value);
2756        self
2757    }
2758    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2759    #[inline]
2760    ///Sets [`Self::created_by`] to `Some(value)`, consuming and returning `self`.
2761    pub fn with_created_by(
2762        mut self,
2763        value: impl Into<::buffa::alloc::string::String>,
2764    ) -> Self {
2765        self.created_by = Some(value.into());
2766        self
2767    }
2768    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2769    #[inline]
2770    ///Sets [`Self::updated_at`] to `Some(value)`, consuming and returning `self`.
2771    pub fn with_updated_at(mut self, value: i64) -> Self {
2772        self.updated_at = Some(value);
2773        self
2774    }
2775    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2776    #[inline]
2777    ///Sets [`Self::updated_by`] to `Some(value)`, consuming and returning `self`.
2778    pub fn with_updated_by(
2779        mut self,
2780        value: impl Into<::buffa::alloc::string::String>,
2781    ) -> Self {
2782        self.updated_by = Some(value.into());
2783        self
2784    }
2785}
2786impl ::buffa::DefaultInstance for Function {
2787    fn default_instance() -> &'static Self {
2788        static VALUE: ::buffa::__private::OnceBox<Function> = ::buffa::__private::OnceBox::new();
2789        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2790    }
2791}
2792impl ::buffa::MessageName for Function {
2793    const PACKAGE: &'static str = "unitycatalog.functions.v1";
2794    const NAME: &'static str = "Function";
2795    const FULL_NAME: &'static str = "unitycatalog.functions.v1.Function";
2796    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.Function";
2797}
2798impl ::buffa::Message for Function {
2799    /// Returns the total encoded size in bytes.
2800    ///
2801    /// The result is a `u32`; the protobuf specification requires all
2802    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2803    /// compliant message will never overflow this type.
2804    #[allow(clippy::let_and_return)]
2805    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2806        #[allow(unused_imports)]
2807        use ::buffa::Enumeration as _;
2808        let mut size = 0u32;
2809        if !self.name.is_empty() {
2810            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2811        }
2812        if !self.catalog_name.is_empty() {
2813            size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
2814        }
2815        if !self.schema_name.is_empty() {
2816            size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
2817        }
2818        if !self.full_name.is_empty() {
2819            size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
2820        }
2821        if !self.data_type.is_empty() {
2822            size += 1u32 + ::buffa::types::string_encoded_len(&self.data_type) as u32;
2823        }
2824        if !self.full_data_type.is_empty() {
2825            size
2826                += 1u32
2827                    + ::buffa::types::string_encoded_len(&self.full_data_type) as u32;
2828        }
2829        if self.input_params.is_set() {
2830            let __slot = __cache.reserve();
2831            let inner_size = self.input_params.compute_size(__cache);
2832            __cache.set(__slot, inner_size);
2833            size
2834                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2835                    + inner_size;
2836        }
2837        if let Some(ref v) = self.return_params {
2838            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2839        }
2840        if let Some(ref v) = self.routine_body_language {
2841            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2842        }
2843        if let Some(ref v) = self.routine_definition {
2844            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2845        }
2846        if let Some(ref v) = self.routine_dependencies {
2847            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2848        }
2849        {
2850            let val = self.parameter_style.to_i32();
2851            if val != 0 {
2852                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2853            }
2854        }
2855        if self.is_deterministic {
2856            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2857        }
2858        {
2859            let val = self.sql_data_access.to_i32();
2860            if val != 0 {
2861                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2862            }
2863        }
2864        if self.is_null_call {
2865            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2866        }
2867        {
2868            let val = self.security_type.to_i32();
2869            if val != 0 {
2870                size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
2871            }
2872        }
2873        if let Some(ref v) = self.specific_name {
2874            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2875        }
2876        {
2877            let val = self.routine_body.to_i32();
2878            if val != 0 {
2879                size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
2880            }
2881        }
2882        if let Some(ref v) = self.comment {
2883            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2884        }
2885        #[allow(clippy::for_kv_map)]
2886        for (k, v) in &self.properties {
2887            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
2888                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2889            size
2890                += 2u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
2891                    + entry_size;
2892        }
2893        if let Some(ref v) = self.owner {
2894            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2895        }
2896        if let Some(ref v) = self.function_id {
2897            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2898        }
2899        if let Some(v) = self.created_at {
2900            size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
2901        }
2902        if let Some(ref v) = self.created_by {
2903            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2904        }
2905        if let Some(v) = self.updated_at {
2906            size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
2907        }
2908        if let Some(ref v) = self.updated_by {
2909            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
2910        }
2911        size += self.__buffa_unknown_fields.encoded_len() as u32;
2912        size
2913    }
2914    fn write_to(
2915        &self,
2916        __cache: &mut ::buffa::SizeCache,
2917        buf: &mut impl ::buffa::bytes::BufMut,
2918    ) {
2919        #[allow(unused_imports)]
2920        use ::buffa::Enumeration as _;
2921        if !self.name.is_empty() {
2922            ::buffa::encoding::Tag::new(
2923                    1u32,
2924                    ::buffa::encoding::WireType::LengthDelimited,
2925                )
2926                .encode(buf);
2927            ::buffa::types::encode_string(&self.name, buf);
2928        }
2929        if !self.catalog_name.is_empty() {
2930            ::buffa::encoding::Tag::new(
2931                    2u32,
2932                    ::buffa::encoding::WireType::LengthDelimited,
2933                )
2934                .encode(buf);
2935            ::buffa::types::encode_string(&self.catalog_name, buf);
2936        }
2937        if !self.schema_name.is_empty() {
2938            ::buffa::encoding::Tag::new(
2939                    3u32,
2940                    ::buffa::encoding::WireType::LengthDelimited,
2941                )
2942                .encode(buf);
2943            ::buffa::types::encode_string(&self.schema_name, buf);
2944        }
2945        if !self.full_name.is_empty() {
2946            ::buffa::encoding::Tag::new(
2947                    4u32,
2948                    ::buffa::encoding::WireType::LengthDelimited,
2949                )
2950                .encode(buf);
2951            ::buffa::types::encode_string(&self.full_name, buf);
2952        }
2953        if !self.data_type.is_empty() {
2954            ::buffa::encoding::Tag::new(
2955                    5u32,
2956                    ::buffa::encoding::WireType::LengthDelimited,
2957                )
2958                .encode(buf);
2959            ::buffa::types::encode_string(&self.data_type, buf);
2960        }
2961        if !self.full_data_type.is_empty() {
2962            ::buffa::encoding::Tag::new(
2963                    6u32,
2964                    ::buffa::encoding::WireType::LengthDelimited,
2965                )
2966                .encode(buf);
2967            ::buffa::types::encode_string(&self.full_data_type, buf);
2968        }
2969        if self.input_params.is_set() {
2970            ::buffa::encoding::Tag::new(
2971                    7u32,
2972                    ::buffa::encoding::WireType::LengthDelimited,
2973                )
2974                .encode(buf);
2975            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2976            self.input_params.write_to(__cache, buf);
2977        }
2978        if let Some(ref v) = self.return_params {
2979            ::buffa::encoding::Tag::new(
2980                    8u32,
2981                    ::buffa::encoding::WireType::LengthDelimited,
2982                )
2983                .encode(buf);
2984            ::buffa::types::encode_string(v, buf);
2985        }
2986        if let Some(ref v) = self.routine_body_language {
2987            ::buffa::encoding::Tag::new(
2988                    9u32,
2989                    ::buffa::encoding::WireType::LengthDelimited,
2990                )
2991                .encode(buf);
2992            ::buffa::types::encode_string(v, buf);
2993        }
2994        if let Some(ref v) = self.routine_definition {
2995            ::buffa::encoding::Tag::new(
2996                    10u32,
2997                    ::buffa::encoding::WireType::LengthDelimited,
2998                )
2999                .encode(buf);
3000            ::buffa::types::encode_string(v, buf);
3001        }
3002        if let Some(ref v) = self.routine_dependencies {
3003            ::buffa::encoding::Tag::new(
3004                    11u32,
3005                    ::buffa::encoding::WireType::LengthDelimited,
3006                )
3007                .encode(buf);
3008            ::buffa::types::encode_string(v, buf);
3009        }
3010        {
3011            let val = self.parameter_style.to_i32();
3012            if val != 0 {
3013                ::buffa::encoding::Tag::new(12u32, ::buffa::encoding::WireType::Varint)
3014                    .encode(buf);
3015                ::buffa::types::encode_int32(val, buf);
3016            }
3017        }
3018        if self.is_deterministic {
3019            ::buffa::encoding::Tag::new(13u32, ::buffa::encoding::WireType::Varint)
3020                .encode(buf);
3021            ::buffa::types::encode_bool(self.is_deterministic, buf);
3022        }
3023        {
3024            let val = self.sql_data_access.to_i32();
3025            if val != 0 {
3026                ::buffa::encoding::Tag::new(14u32, ::buffa::encoding::WireType::Varint)
3027                    .encode(buf);
3028                ::buffa::types::encode_int32(val, buf);
3029            }
3030        }
3031        if self.is_null_call {
3032            ::buffa::encoding::Tag::new(15u32, ::buffa::encoding::WireType::Varint)
3033                .encode(buf);
3034            ::buffa::types::encode_bool(self.is_null_call, buf);
3035        }
3036        {
3037            let val = self.security_type.to_i32();
3038            if val != 0 {
3039                ::buffa::encoding::Tag::new(16u32, ::buffa::encoding::WireType::Varint)
3040                    .encode(buf);
3041                ::buffa::types::encode_int32(val, buf);
3042            }
3043        }
3044        if let Some(ref v) = self.specific_name {
3045            ::buffa::encoding::Tag::new(
3046                    17u32,
3047                    ::buffa::encoding::WireType::LengthDelimited,
3048                )
3049                .encode(buf);
3050            ::buffa::types::encode_string(v, buf);
3051        }
3052        {
3053            let val = self.routine_body.to_i32();
3054            if val != 0 {
3055                ::buffa::encoding::Tag::new(18u32, ::buffa::encoding::WireType::Varint)
3056                    .encode(buf);
3057                ::buffa::types::encode_int32(val, buf);
3058            }
3059        }
3060        if let Some(ref v) = self.comment {
3061            ::buffa::encoding::Tag::new(
3062                    19u32,
3063                    ::buffa::encoding::WireType::LengthDelimited,
3064                )
3065                .encode(buf);
3066            ::buffa::types::encode_string(v, buf);
3067        }
3068        for (k, v) in &self.properties {
3069            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
3070                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3071            ::buffa::encoding::Tag::new(
3072                    20u32,
3073                    ::buffa::encoding::WireType::LengthDelimited,
3074                )
3075                .encode(buf);
3076            ::buffa::encoding::encode_varint(entry_size as u64, buf);
3077            ::buffa::encoding::Tag::new(
3078                    1u32,
3079                    ::buffa::encoding::WireType::LengthDelimited,
3080                )
3081                .encode(buf);
3082            ::buffa::types::encode_string(k, buf);
3083            ::buffa::encoding::Tag::new(
3084                    2u32,
3085                    ::buffa::encoding::WireType::LengthDelimited,
3086                )
3087                .encode(buf);
3088            ::buffa::types::encode_string(v, buf);
3089        }
3090        if let Some(ref v) = self.owner {
3091            ::buffa::encoding::Tag::new(
3092                    21u32,
3093                    ::buffa::encoding::WireType::LengthDelimited,
3094                )
3095                .encode(buf);
3096            ::buffa::types::encode_string(v, buf);
3097        }
3098        if let Some(ref v) = self.function_id {
3099            ::buffa::encoding::Tag::new(
3100                    22u32,
3101                    ::buffa::encoding::WireType::LengthDelimited,
3102                )
3103                .encode(buf);
3104            ::buffa::types::encode_string(v, buf);
3105        }
3106        if let Some(v) = self.created_at {
3107            ::buffa::encoding::Tag::new(1000u32, ::buffa::encoding::WireType::Varint)
3108                .encode(buf);
3109            ::buffa::types::encode_int64(v, buf);
3110        }
3111        if let Some(ref v) = self.created_by {
3112            ::buffa::encoding::Tag::new(
3113                    1001u32,
3114                    ::buffa::encoding::WireType::LengthDelimited,
3115                )
3116                .encode(buf);
3117            ::buffa::types::encode_string(v, buf);
3118        }
3119        if let Some(v) = self.updated_at {
3120            ::buffa::encoding::Tag::new(1002u32, ::buffa::encoding::WireType::Varint)
3121                .encode(buf);
3122            ::buffa::types::encode_int64(v, buf);
3123        }
3124        if let Some(ref v) = self.updated_by {
3125            ::buffa::encoding::Tag::new(
3126                    1003u32,
3127                    ::buffa::encoding::WireType::LengthDelimited,
3128                )
3129                .encode(buf);
3130            ::buffa::types::encode_string(v, buf);
3131        }
3132        self.__buffa_unknown_fields.write_to(buf);
3133    }
3134    fn merge_field(
3135        &mut self,
3136        tag: ::buffa::encoding::Tag,
3137        buf: &mut impl ::buffa::bytes::Buf,
3138        depth: u32,
3139    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3140        #[allow(unused_imports)]
3141        use ::buffa::bytes::Buf as _;
3142        #[allow(unused_imports)]
3143        use ::buffa::Enumeration as _;
3144        match tag.field_number() {
3145            1u32 => {
3146                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3147                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3148                        field_number: 1u32,
3149                        expected: 2u8,
3150                        actual: tag.wire_type() as u8,
3151                    });
3152                }
3153                ::buffa::types::merge_string(&mut self.name, buf)?;
3154            }
3155            2u32 => {
3156                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3157                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3158                        field_number: 2u32,
3159                        expected: 2u8,
3160                        actual: tag.wire_type() as u8,
3161                    });
3162                }
3163                ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
3164            }
3165            3u32 => {
3166                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3167                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3168                        field_number: 3u32,
3169                        expected: 2u8,
3170                        actual: tag.wire_type() as u8,
3171                    });
3172                }
3173                ::buffa::types::merge_string(&mut self.schema_name, buf)?;
3174            }
3175            4u32 => {
3176                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3177                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3178                        field_number: 4u32,
3179                        expected: 2u8,
3180                        actual: tag.wire_type() as u8,
3181                    });
3182                }
3183                ::buffa::types::merge_string(&mut self.full_name, buf)?;
3184            }
3185            5u32 => {
3186                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3187                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3188                        field_number: 5u32,
3189                        expected: 2u8,
3190                        actual: tag.wire_type() as u8,
3191                    });
3192                }
3193                ::buffa::types::merge_string(&mut self.data_type, buf)?;
3194            }
3195            6u32 => {
3196                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3197                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3198                        field_number: 6u32,
3199                        expected: 2u8,
3200                        actual: tag.wire_type() as u8,
3201                    });
3202                }
3203                ::buffa::types::merge_string(&mut self.full_data_type, buf)?;
3204            }
3205            7u32 => {
3206                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3207                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3208                        field_number: 7u32,
3209                        expected: 2u8,
3210                        actual: tag.wire_type() as u8,
3211                    });
3212                }
3213                ::buffa::Message::merge_length_delimited(
3214                    self.input_params.get_or_insert_default(),
3215                    buf,
3216                    depth,
3217                )?;
3218            }
3219            8u32 => {
3220                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3221                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3222                        field_number: 8u32,
3223                        expected: 2u8,
3224                        actual: tag.wire_type() as u8,
3225                    });
3226                }
3227                ::buffa::types::merge_string(
3228                    self
3229                        .return_params
3230                        .get_or_insert_with(::buffa::alloc::string::String::new),
3231                    buf,
3232                )?;
3233            }
3234            9u32 => {
3235                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3236                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3237                        field_number: 9u32,
3238                        expected: 2u8,
3239                        actual: tag.wire_type() as u8,
3240                    });
3241                }
3242                ::buffa::types::merge_string(
3243                    self
3244                        .routine_body_language
3245                        .get_or_insert_with(::buffa::alloc::string::String::new),
3246                    buf,
3247                )?;
3248            }
3249            10u32 => {
3250                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3251                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3252                        field_number: 10u32,
3253                        expected: 2u8,
3254                        actual: tag.wire_type() as u8,
3255                    });
3256                }
3257                ::buffa::types::merge_string(
3258                    self
3259                        .routine_definition
3260                        .get_or_insert_with(::buffa::alloc::string::String::new),
3261                    buf,
3262                )?;
3263            }
3264            11u32 => {
3265                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3266                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3267                        field_number: 11u32,
3268                        expected: 2u8,
3269                        actual: tag.wire_type() as u8,
3270                    });
3271                }
3272                ::buffa::types::merge_string(
3273                    self
3274                        .routine_dependencies
3275                        .get_or_insert_with(::buffa::alloc::string::String::new),
3276                    buf,
3277                )?;
3278            }
3279            12u32 => {
3280                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3281                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3282                        field_number: 12u32,
3283                        expected: 0u8,
3284                        actual: tag.wire_type() as u8,
3285                    });
3286                }
3287                self.parameter_style = ::buffa::EnumValue::from(
3288                    ::buffa::types::decode_int32(buf)?,
3289                );
3290            }
3291            13u32 => {
3292                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3293                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3294                        field_number: 13u32,
3295                        expected: 0u8,
3296                        actual: tag.wire_type() as u8,
3297                    });
3298                }
3299                self.is_deterministic = ::buffa::types::decode_bool(buf)?;
3300            }
3301            14u32 => {
3302                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3303                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3304                        field_number: 14u32,
3305                        expected: 0u8,
3306                        actual: tag.wire_type() as u8,
3307                    });
3308                }
3309                self.sql_data_access = ::buffa::EnumValue::from(
3310                    ::buffa::types::decode_int32(buf)?,
3311                );
3312            }
3313            15u32 => {
3314                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3315                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3316                        field_number: 15u32,
3317                        expected: 0u8,
3318                        actual: tag.wire_type() as u8,
3319                    });
3320                }
3321                self.is_null_call = ::buffa::types::decode_bool(buf)?;
3322            }
3323            16u32 => {
3324                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3325                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3326                        field_number: 16u32,
3327                        expected: 0u8,
3328                        actual: tag.wire_type() as u8,
3329                    });
3330                }
3331                self.security_type = ::buffa::EnumValue::from(
3332                    ::buffa::types::decode_int32(buf)?,
3333                );
3334            }
3335            17u32 => {
3336                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3337                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3338                        field_number: 17u32,
3339                        expected: 2u8,
3340                        actual: tag.wire_type() as u8,
3341                    });
3342                }
3343                ::buffa::types::merge_string(
3344                    self
3345                        .specific_name
3346                        .get_or_insert_with(::buffa::alloc::string::String::new),
3347                    buf,
3348                )?;
3349            }
3350            18u32 => {
3351                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3352                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3353                        field_number: 18u32,
3354                        expected: 0u8,
3355                        actual: tag.wire_type() as u8,
3356                    });
3357                }
3358                self.routine_body = ::buffa::EnumValue::from(
3359                    ::buffa::types::decode_int32(buf)?,
3360                );
3361            }
3362            19u32 => {
3363                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3364                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3365                        field_number: 19u32,
3366                        expected: 2u8,
3367                        actual: tag.wire_type() as u8,
3368                    });
3369                }
3370                ::buffa::types::merge_string(
3371                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
3372                    buf,
3373                )?;
3374            }
3375            20u32 => {
3376                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3377                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3378                        field_number: 20u32,
3379                        expected: 2u8,
3380                        actual: tag.wire_type() as u8,
3381                    });
3382                }
3383                let entry_len = ::buffa::encoding::decode_varint(buf)?;
3384                let entry_len = usize::try_from(entry_len)
3385                    .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3386                if buf.remaining() < entry_len {
3387                    return ::core::result::Result::Err(
3388                        ::buffa::DecodeError::UnexpectedEof,
3389                    );
3390                }
3391                let entry_limit = buf.remaining() - entry_len;
3392                let mut key = ::core::default::Default::default();
3393                let mut val = ::core::default::Default::default();
3394                while buf.remaining() > entry_limit {
3395                    let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
3396                    match entry_tag.field_number() {
3397                        1 => {
3398                            if entry_tag.wire_type()
3399                                != ::buffa::encoding::WireType::LengthDelimited
3400                            {
3401                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3402                                    field_number: entry_tag.field_number(),
3403                                    expected: 2u8,
3404                                    actual: entry_tag.wire_type() as u8,
3405                                });
3406                            }
3407                            key = ::buffa::types::decode_string(buf)?;
3408                        }
3409                        2 => {
3410                            if entry_tag.wire_type()
3411                                != ::buffa::encoding::WireType::LengthDelimited
3412                            {
3413                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3414                                    field_number: entry_tag.field_number(),
3415                                    expected: 2u8,
3416                                    actual: entry_tag.wire_type() as u8,
3417                                });
3418                            }
3419                            val = ::buffa::types::decode_string(buf)?;
3420                        }
3421                        _ => {
3422                            ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
3423                        }
3424                    }
3425                }
3426                if buf.remaining() != entry_limit {
3427                    let remaining = buf.remaining();
3428                    if remaining > entry_limit {
3429                        buf.advance(remaining - entry_limit);
3430                    } else {
3431                        return ::core::result::Result::Err(
3432                            ::buffa::DecodeError::UnexpectedEof,
3433                        );
3434                    }
3435                }
3436                self.properties.insert(key, val);
3437            }
3438            21u32 => {
3439                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3440                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3441                        field_number: 21u32,
3442                        expected: 2u8,
3443                        actual: tag.wire_type() as u8,
3444                    });
3445                }
3446                ::buffa::types::merge_string(
3447                    self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
3448                    buf,
3449                )?;
3450            }
3451            22u32 => {
3452                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3453                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3454                        field_number: 22u32,
3455                        expected: 2u8,
3456                        actual: tag.wire_type() as u8,
3457                    });
3458                }
3459                ::buffa::types::merge_string(
3460                    self
3461                        .function_id
3462                        .get_or_insert_with(::buffa::alloc::string::String::new),
3463                    buf,
3464                )?;
3465            }
3466            1000u32 => {
3467                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3468                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3469                        field_number: 1000u32,
3470                        expected: 0u8,
3471                        actual: tag.wire_type() as u8,
3472                    });
3473                }
3474                self.created_at = ::core::option::Option::Some(
3475                    ::buffa::types::decode_int64(buf)?,
3476                );
3477            }
3478            1001u32 => {
3479                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3480                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3481                        field_number: 1001u32,
3482                        expected: 2u8,
3483                        actual: tag.wire_type() as u8,
3484                    });
3485                }
3486                ::buffa::types::merge_string(
3487                    self
3488                        .created_by
3489                        .get_or_insert_with(::buffa::alloc::string::String::new),
3490                    buf,
3491                )?;
3492            }
3493            1002u32 => {
3494                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3495                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3496                        field_number: 1002u32,
3497                        expected: 0u8,
3498                        actual: tag.wire_type() as u8,
3499                    });
3500                }
3501                self.updated_at = ::core::option::Option::Some(
3502                    ::buffa::types::decode_int64(buf)?,
3503                );
3504            }
3505            1003u32 => {
3506                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3507                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3508                        field_number: 1003u32,
3509                        expected: 2u8,
3510                        actual: tag.wire_type() as u8,
3511                    });
3512                }
3513                ::buffa::types::merge_string(
3514                    self
3515                        .updated_by
3516                        .get_or_insert_with(::buffa::alloc::string::String::new),
3517                    buf,
3518                )?;
3519            }
3520            _ => {
3521                self.__buffa_unknown_fields
3522                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3523            }
3524        }
3525        ::core::result::Result::Ok(())
3526    }
3527    fn clear(&mut self) {
3528        self.name.clear();
3529        self.catalog_name.clear();
3530        self.schema_name.clear();
3531        self.full_name.clear();
3532        self.data_type.clear();
3533        self.full_data_type.clear();
3534        self.input_params = ::buffa::MessageField::none();
3535        self.return_params = ::core::option::Option::None;
3536        self.routine_body_language = ::core::option::Option::None;
3537        self.routine_definition = ::core::option::Option::None;
3538        self.routine_dependencies = ::core::option::Option::None;
3539        self.parameter_style = ::buffa::EnumValue::from(0);
3540        self.is_deterministic = false;
3541        self.sql_data_access = ::buffa::EnumValue::from(0);
3542        self.is_null_call = false;
3543        self.security_type = ::buffa::EnumValue::from(0);
3544        self.specific_name = ::core::option::Option::None;
3545        self.routine_body = ::buffa::EnumValue::from(0);
3546        self.comment = ::core::option::Option::None;
3547        self.properties.clear();
3548        self.owner = ::core::option::Option::None;
3549        self.function_id = ::core::option::Option::None;
3550        self.created_at = ::core::option::Option::None;
3551        self.created_by = ::core::option::Option::None;
3552        self.updated_at = ::core::option::Option::None;
3553        self.updated_by = ::core::option::Option::None;
3554        self.__buffa_unknown_fields.clear();
3555    }
3556}
3557impl ::buffa::ExtensionSet for Function {
3558    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.Function";
3559    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3560        &self.__buffa_unknown_fields
3561    }
3562    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3563        &mut self.__buffa_unknown_fields
3564    }
3565}
3566impl ::buffa::json_helpers::ProtoElemJson for Function {
3567    fn serialize_proto_json<S: ::serde::Serializer>(
3568        v: &Self,
3569        s: S,
3570    ) -> ::core::result::Result<S::Ok, S::Error> {
3571        ::serde::Serialize::serialize(v, s)
3572    }
3573    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3574        d: D,
3575    ) -> ::core::result::Result<Self, D::Error> {
3576        <Self as ::serde::Deserialize>::deserialize(d)
3577    }
3578}
3579#[doc(hidden)]
3580pub const __FUNCTION_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3581    type_url: "type.googleapis.com/unitycatalog.functions.v1.Function",
3582    to_json: ::buffa::type_registry::any_to_json::<Function>,
3583    from_json: ::buffa::type_registry::any_from_json::<Function>,
3584    is_wkt: false,
3585};
3586/// List functions in a schema
3587#[derive(Clone, PartialEq, Default)]
3588#[derive(::serde::Serialize, ::serde::Deserialize)]
3589#[serde(default)]
3590pub struct ListFunctionsRequest {
3591    /// Name of parent catalog for functions of interest.
3592    ///
3593    /// Field 1: `catalog_name`
3594    #[serde(
3595        rename = "catalog_name",
3596        alias = "catalogName",
3597        with = "::buffa::json_helpers::proto_string",
3598        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3599    )]
3600    pub catalog_name: ::buffa::alloc::string::String,
3601    /// Parent schema of functions.
3602    ///
3603    /// Field 2: `schema_name`
3604    #[serde(
3605        rename = "schema_name",
3606        alias = "schemaName",
3607        with = "::buffa::json_helpers::proto_string",
3608        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3609    )]
3610    pub schema_name: ::buffa::alloc::string::String,
3611    /// The maximum number of results per page that should be returned.
3612    ///
3613    /// Field 3: `max_results`
3614    #[serde(
3615        rename = "max_results",
3616        alias = "maxResults",
3617        with = "::buffa::json_helpers::opt_int32",
3618        skip_serializing_if = "::core::option::Option::is_none"
3619    )]
3620    pub max_results: ::core::option::Option<i32>,
3621    /// Opaque pagination token to go to next page based on previous query.
3622    ///
3623    /// Field 4: `page_token`
3624    #[serde(
3625        rename = "page_token",
3626        alias = "pageToken",
3627        skip_serializing_if = "::core::option::Option::is_none"
3628    )]
3629    pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
3630    /// Whether to include functions in the response for which the principal can only access selective metadata for.
3631    ///
3632    /// Field 5: `include_browse`
3633    #[serde(
3634        rename = "include_browse",
3635        alias = "includeBrowse",
3636        skip_serializing_if = "::core::option::Option::is_none"
3637    )]
3638    pub include_browse: ::core::option::Option<bool>,
3639    #[serde(skip)]
3640    #[doc(hidden)]
3641    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3642}
3643impl ::core::fmt::Debug for ListFunctionsRequest {
3644    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3645        f.debug_struct("ListFunctionsRequest")
3646            .field("catalog_name", &self.catalog_name)
3647            .field("schema_name", &self.schema_name)
3648            .field("max_results", &self.max_results)
3649            .field("page_token", &self.page_token)
3650            .field("include_browse", &self.include_browse)
3651            .finish()
3652    }
3653}
3654impl ListFunctionsRequest {
3655    /// Protobuf type URL for this message, for use with `Any::pack` and
3656    /// `Any::unpack_if`.
3657    ///
3658    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3659    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.ListFunctionsRequest";
3660}
3661impl ListFunctionsRequest {
3662    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3663    #[inline]
3664    ///Sets [`Self::max_results`] to `Some(value)`, consuming and returning `self`.
3665    pub fn with_max_results(mut self, value: i32) -> Self {
3666        self.max_results = Some(value);
3667        self
3668    }
3669    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3670    #[inline]
3671    ///Sets [`Self::page_token`] to `Some(value)`, consuming and returning `self`.
3672    pub fn with_page_token(
3673        mut self,
3674        value: impl Into<::buffa::alloc::string::String>,
3675    ) -> Self {
3676        self.page_token = Some(value.into());
3677        self
3678    }
3679    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3680    #[inline]
3681    ///Sets [`Self::include_browse`] to `Some(value)`, consuming and returning `self`.
3682    pub fn with_include_browse(mut self, value: bool) -> Self {
3683        self.include_browse = Some(value);
3684        self
3685    }
3686}
3687impl ::buffa::DefaultInstance for ListFunctionsRequest {
3688    fn default_instance() -> &'static Self {
3689        static VALUE: ::buffa::__private::OnceBox<ListFunctionsRequest> = ::buffa::__private::OnceBox::new();
3690        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3691    }
3692}
3693impl ::buffa::MessageName for ListFunctionsRequest {
3694    const PACKAGE: &'static str = "unitycatalog.functions.v1";
3695    const NAME: &'static str = "ListFunctionsRequest";
3696    const FULL_NAME: &'static str = "unitycatalog.functions.v1.ListFunctionsRequest";
3697    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.ListFunctionsRequest";
3698}
3699impl ::buffa::Message for ListFunctionsRequest {
3700    /// Returns the total encoded size in bytes.
3701    ///
3702    /// The result is a `u32`; the protobuf specification requires all
3703    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3704    /// compliant message will never overflow this type.
3705    #[allow(clippy::let_and_return)]
3706    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3707        #[allow(unused_imports)]
3708        use ::buffa::Enumeration as _;
3709        let mut size = 0u32;
3710        if !self.catalog_name.is_empty() {
3711            size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
3712        }
3713        if !self.schema_name.is_empty() {
3714            size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
3715        }
3716        if let Some(v) = self.max_results {
3717            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3718        }
3719        if let Some(ref v) = self.page_token {
3720            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3721        }
3722        if self.include_browse.is_some() {
3723            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3724        }
3725        size += self.__buffa_unknown_fields.encoded_len() as u32;
3726        size
3727    }
3728    fn write_to(
3729        &self,
3730        _cache: &mut ::buffa::SizeCache,
3731        buf: &mut impl ::buffa::bytes::BufMut,
3732    ) {
3733        #[allow(unused_imports)]
3734        use ::buffa::Enumeration as _;
3735        if !self.catalog_name.is_empty() {
3736            ::buffa::encoding::Tag::new(
3737                    1u32,
3738                    ::buffa::encoding::WireType::LengthDelimited,
3739                )
3740                .encode(buf);
3741            ::buffa::types::encode_string(&self.catalog_name, buf);
3742        }
3743        if !self.schema_name.is_empty() {
3744            ::buffa::encoding::Tag::new(
3745                    2u32,
3746                    ::buffa::encoding::WireType::LengthDelimited,
3747                )
3748                .encode(buf);
3749            ::buffa::types::encode_string(&self.schema_name, buf);
3750        }
3751        if let Some(v) = self.max_results {
3752            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
3753                .encode(buf);
3754            ::buffa::types::encode_int32(v, buf);
3755        }
3756        if let Some(ref v) = self.page_token {
3757            ::buffa::encoding::Tag::new(
3758                    4u32,
3759                    ::buffa::encoding::WireType::LengthDelimited,
3760                )
3761                .encode(buf);
3762            ::buffa::types::encode_string(v, buf);
3763        }
3764        if let Some(v) = self.include_browse {
3765            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
3766                .encode(buf);
3767            ::buffa::types::encode_bool(v, buf);
3768        }
3769        self.__buffa_unknown_fields.write_to(buf);
3770    }
3771    fn merge_field(
3772        &mut self,
3773        tag: ::buffa::encoding::Tag,
3774        buf: &mut impl ::buffa::bytes::Buf,
3775        depth: u32,
3776    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3777        #[allow(unused_imports)]
3778        use ::buffa::bytes::Buf as _;
3779        #[allow(unused_imports)]
3780        use ::buffa::Enumeration as _;
3781        match tag.field_number() {
3782            1u32 => {
3783                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3784                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3785                        field_number: 1u32,
3786                        expected: 2u8,
3787                        actual: tag.wire_type() as u8,
3788                    });
3789                }
3790                ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
3791            }
3792            2u32 => {
3793                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3794                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3795                        field_number: 2u32,
3796                        expected: 2u8,
3797                        actual: tag.wire_type() as u8,
3798                    });
3799                }
3800                ::buffa::types::merge_string(&mut self.schema_name, buf)?;
3801            }
3802            3u32 => {
3803                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3804                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3805                        field_number: 3u32,
3806                        expected: 0u8,
3807                        actual: tag.wire_type() as u8,
3808                    });
3809                }
3810                self.max_results = ::core::option::Option::Some(
3811                    ::buffa::types::decode_int32(buf)?,
3812                );
3813            }
3814            4u32 => {
3815                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3816                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3817                        field_number: 4u32,
3818                        expected: 2u8,
3819                        actual: tag.wire_type() as u8,
3820                    });
3821                }
3822                ::buffa::types::merge_string(
3823                    self
3824                        .page_token
3825                        .get_or_insert_with(::buffa::alloc::string::String::new),
3826                    buf,
3827                )?;
3828            }
3829            5u32 => {
3830                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3831                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3832                        field_number: 5u32,
3833                        expected: 0u8,
3834                        actual: tag.wire_type() as u8,
3835                    });
3836                }
3837                self.include_browse = ::core::option::Option::Some(
3838                    ::buffa::types::decode_bool(buf)?,
3839                );
3840            }
3841            _ => {
3842                self.__buffa_unknown_fields
3843                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3844            }
3845        }
3846        ::core::result::Result::Ok(())
3847    }
3848    fn clear(&mut self) {
3849        self.catalog_name.clear();
3850        self.schema_name.clear();
3851        self.max_results = ::core::option::Option::None;
3852        self.page_token = ::core::option::Option::None;
3853        self.include_browse = ::core::option::Option::None;
3854        self.__buffa_unknown_fields.clear();
3855    }
3856}
3857impl ::buffa::ExtensionSet for ListFunctionsRequest {
3858    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.ListFunctionsRequest";
3859    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3860        &self.__buffa_unknown_fields
3861    }
3862    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3863        &mut self.__buffa_unknown_fields
3864    }
3865}
3866impl ::buffa::json_helpers::ProtoElemJson for ListFunctionsRequest {
3867    fn serialize_proto_json<S: ::serde::Serializer>(
3868        v: &Self,
3869        s: S,
3870    ) -> ::core::result::Result<S::Ok, S::Error> {
3871        ::serde::Serialize::serialize(v, s)
3872    }
3873    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3874        d: D,
3875    ) -> ::core::result::Result<Self, D::Error> {
3876        <Self as ::serde::Deserialize>::deserialize(d)
3877    }
3878}
3879#[doc(hidden)]
3880pub const __LIST_FUNCTIONS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3881    type_url: "type.googleapis.com/unitycatalog.functions.v1.ListFunctionsRequest",
3882    to_json: ::buffa::type_registry::any_to_json::<ListFunctionsRequest>,
3883    from_json: ::buffa::type_registry::any_from_json::<ListFunctionsRequest>,
3884    is_wkt: false,
3885};
3886/// List functions response.
3887#[derive(Clone, PartialEq, Default)]
3888#[derive(::serde::Serialize, ::serde::Deserialize)]
3889#[serde(default)]
3890pub struct ListFunctionsResponse {
3891    /// The functions returned.
3892    ///
3893    /// Field 1: `functions`
3894    #[serde(
3895        rename = "functions",
3896        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3897        deserialize_with = "::buffa::json_helpers::null_as_default"
3898    )]
3899    pub functions: ::buffa::alloc::vec::Vec<Function>,
3900    /// The next_page_token value to include in the next List request.
3901    ///
3902    /// Field 2: `next_page_token`
3903    #[serde(
3904        rename = "next_page_token",
3905        alias = "nextPageToken",
3906        skip_serializing_if = "::core::option::Option::is_none"
3907    )]
3908    pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
3909    #[serde(skip)]
3910    #[doc(hidden)]
3911    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3912}
3913impl ::core::fmt::Debug for ListFunctionsResponse {
3914    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3915        f.debug_struct("ListFunctionsResponse")
3916            .field("functions", &self.functions)
3917            .field("next_page_token", &self.next_page_token)
3918            .finish()
3919    }
3920}
3921impl ListFunctionsResponse {
3922    /// Protobuf type URL for this message, for use with `Any::pack` and
3923    /// `Any::unpack_if`.
3924    ///
3925    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3926    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.ListFunctionsResponse";
3927}
3928impl ListFunctionsResponse {
3929    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3930    #[inline]
3931    ///Sets [`Self::next_page_token`] to `Some(value)`, consuming and returning `self`.
3932    pub fn with_next_page_token(
3933        mut self,
3934        value: impl Into<::buffa::alloc::string::String>,
3935    ) -> Self {
3936        self.next_page_token = Some(value.into());
3937        self
3938    }
3939}
3940impl ::buffa::DefaultInstance for ListFunctionsResponse {
3941    fn default_instance() -> &'static Self {
3942        static VALUE: ::buffa::__private::OnceBox<ListFunctionsResponse> = ::buffa::__private::OnceBox::new();
3943        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3944    }
3945}
3946impl ::buffa::MessageName for ListFunctionsResponse {
3947    const PACKAGE: &'static str = "unitycatalog.functions.v1";
3948    const NAME: &'static str = "ListFunctionsResponse";
3949    const FULL_NAME: &'static str = "unitycatalog.functions.v1.ListFunctionsResponse";
3950    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.ListFunctionsResponse";
3951}
3952impl ::buffa::Message for ListFunctionsResponse {
3953    /// Returns the total encoded size in bytes.
3954    ///
3955    /// The result is a `u32`; the protobuf specification requires all
3956    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3957    /// compliant message will never overflow this type.
3958    #[allow(clippy::let_and_return)]
3959    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3960        #[allow(unused_imports)]
3961        use ::buffa::Enumeration as _;
3962        let mut size = 0u32;
3963        for v in &self.functions {
3964            let __slot = __cache.reserve();
3965            let inner_size = v.compute_size(__cache);
3966            __cache.set(__slot, inner_size);
3967            size
3968                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3969                    + inner_size;
3970        }
3971        if let Some(ref v) = self.next_page_token {
3972            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3973        }
3974        size += self.__buffa_unknown_fields.encoded_len() as u32;
3975        size
3976    }
3977    fn write_to(
3978        &self,
3979        __cache: &mut ::buffa::SizeCache,
3980        buf: &mut impl ::buffa::bytes::BufMut,
3981    ) {
3982        #[allow(unused_imports)]
3983        use ::buffa::Enumeration as _;
3984        for v in &self.functions {
3985            ::buffa::encoding::Tag::new(
3986                    1u32,
3987                    ::buffa::encoding::WireType::LengthDelimited,
3988                )
3989                .encode(buf);
3990            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3991            v.write_to(__cache, buf);
3992        }
3993        if let Some(ref v) = self.next_page_token {
3994            ::buffa::encoding::Tag::new(
3995                    2u32,
3996                    ::buffa::encoding::WireType::LengthDelimited,
3997                )
3998                .encode(buf);
3999            ::buffa::types::encode_string(v, buf);
4000        }
4001        self.__buffa_unknown_fields.write_to(buf);
4002    }
4003    fn merge_field(
4004        &mut self,
4005        tag: ::buffa::encoding::Tag,
4006        buf: &mut impl ::buffa::bytes::Buf,
4007        depth: u32,
4008    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4009        #[allow(unused_imports)]
4010        use ::buffa::bytes::Buf as _;
4011        #[allow(unused_imports)]
4012        use ::buffa::Enumeration as _;
4013        match tag.field_number() {
4014            1u32 => {
4015                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4016                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4017                        field_number: 1u32,
4018                        expected: 2u8,
4019                        actual: tag.wire_type() as u8,
4020                    });
4021                }
4022                let mut elem = ::core::default::Default::default();
4023                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4024                self.functions.push(elem);
4025            }
4026            2u32 => {
4027                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4028                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4029                        field_number: 2u32,
4030                        expected: 2u8,
4031                        actual: tag.wire_type() as u8,
4032                    });
4033                }
4034                ::buffa::types::merge_string(
4035                    self
4036                        .next_page_token
4037                        .get_or_insert_with(::buffa::alloc::string::String::new),
4038                    buf,
4039                )?;
4040            }
4041            _ => {
4042                self.__buffa_unknown_fields
4043                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4044            }
4045        }
4046        ::core::result::Result::Ok(())
4047    }
4048    fn clear(&mut self) {
4049        self.functions.clear();
4050        self.next_page_token = ::core::option::Option::None;
4051        self.__buffa_unknown_fields.clear();
4052    }
4053}
4054impl ::buffa::ExtensionSet for ListFunctionsResponse {
4055    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.ListFunctionsResponse";
4056    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4057        &self.__buffa_unknown_fields
4058    }
4059    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4060        &mut self.__buffa_unknown_fields
4061    }
4062}
4063impl ::buffa::json_helpers::ProtoElemJson for ListFunctionsResponse {
4064    fn serialize_proto_json<S: ::serde::Serializer>(
4065        v: &Self,
4066        s: S,
4067    ) -> ::core::result::Result<S::Ok, S::Error> {
4068        ::serde::Serialize::serialize(v, s)
4069    }
4070    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4071        d: D,
4072    ) -> ::core::result::Result<Self, D::Error> {
4073        <Self as ::serde::Deserialize>::deserialize(d)
4074    }
4075}
4076#[doc(hidden)]
4077pub const __LIST_FUNCTIONS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4078    type_url: "type.googleapis.com/unitycatalog.functions.v1.ListFunctionsResponse",
4079    to_json: ::buffa::type_registry::any_to_json::<ListFunctionsResponse>,
4080    from_json: ::buffa::type_registry::any_from_json::<ListFunctionsResponse>,
4081    is_wkt: false,
4082};
4083/// Create a new function
4084#[derive(Clone, PartialEq, Default)]
4085#[derive(::serde::Serialize, ::serde::Deserialize)]
4086#[serde(default)]
4087pub struct CreateFunctionRequest {
4088    /// The function to create.
4089    ///
4090    /// Field 1: `function_info`
4091    #[serde(
4092        rename = "function_info",
4093        alias = "functionInfo",
4094        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4095    )]
4096    pub function_info: ::buffa::MessageField<CreateFunction>,
4097    #[serde(skip)]
4098    #[doc(hidden)]
4099    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4100}
4101impl ::core::fmt::Debug for CreateFunctionRequest {
4102    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4103        f.debug_struct("CreateFunctionRequest")
4104            .field("function_info", &self.function_info)
4105            .finish()
4106    }
4107}
4108impl CreateFunctionRequest {
4109    /// Protobuf type URL for this message, for use with `Any::pack` and
4110    /// `Any::unpack_if`.
4111    ///
4112    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4113    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.CreateFunctionRequest";
4114}
4115impl ::buffa::DefaultInstance for CreateFunctionRequest {
4116    fn default_instance() -> &'static Self {
4117        static VALUE: ::buffa::__private::OnceBox<CreateFunctionRequest> = ::buffa::__private::OnceBox::new();
4118        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4119    }
4120}
4121impl ::buffa::MessageName for CreateFunctionRequest {
4122    const PACKAGE: &'static str = "unitycatalog.functions.v1";
4123    const NAME: &'static str = "CreateFunctionRequest";
4124    const FULL_NAME: &'static str = "unitycatalog.functions.v1.CreateFunctionRequest";
4125    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.CreateFunctionRequest";
4126}
4127impl ::buffa::Message for CreateFunctionRequest {
4128    /// Returns the total encoded size in bytes.
4129    ///
4130    /// The result is a `u32`; the protobuf specification requires all
4131    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4132    /// compliant message will never overflow this type.
4133    #[allow(clippy::let_and_return)]
4134    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4135        #[allow(unused_imports)]
4136        use ::buffa::Enumeration as _;
4137        let mut size = 0u32;
4138        if self.function_info.is_set() {
4139            let __slot = __cache.reserve();
4140            let inner_size = self.function_info.compute_size(__cache);
4141            __cache.set(__slot, inner_size);
4142            size
4143                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4144                    + inner_size;
4145        }
4146        size += self.__buffa_unknown_fields.encoded_len() as u32;
4147        size
4148    }
4149    fn write_to(
4150        &self,
4151        __cache: &mut ::buffa::SizeCache,
4152        buf: &mut impl ::buffa::bytes::BufMut,
4153    ) {
4154        #[allow(unused_imports)]
4155        use ::buffa::Enumeration as _;
4156        if self.function_info.is_set() {
4157            ::buffa::encoding::Tag::new(
4158                    1u32,
4159                    ::buffa::encoding::WireType::LengthDelimited,
4160                )
4161                .encode(buf);
4162            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4163            self.function_info.write_to(__cache, buf);
4164        }
4165        self.__buffa_unknown_fields.write_to(buf);
4166    }
4167    fn merge_field(
4168        &mut self,
4169        tag: ::buffa::encoding::Tag,
4170        buf: &mut impl ::buffa::bytes::Buf,
4171        depth: u32,
4172    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4173        #[allow(unused_imports)]
4174        use ::buffa::bytes::Buf as _;
4175        #[allow(unused_imports)]
4176        use ::buffa::Enumeration as _;
4177        match tag.field_number() {
4178            1u32 => {
4179                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4180                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4181                        field_number: 1u32,
4182                        expected: 2u8,
4183                        actual: tag.wire_type() as u8,
4184                    });
4185                }
4186                ::buffa::Message::merge_length_delimited(
4187                    self.function_info.get_or_insert_default(),
4188                    buf,
4189                    depth,
4190                )?;
4191            }
4192            _ => {
4193                self.__buffa_unknown_fields
4194                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4195            }
4196        }
4197        ::core::result::Result::Ok(())
4198    }
4199    fn clear(&mut self) {
4200        self.function_info = ::buffa::MessageField::none();
4201        self.__buffa_unknown_fields.clear();
4202    }
4203}
4204impl ::buffa::ExtensionSet for CreateFunctionRequest {
4205    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.CreateFunctionRequest";
4206    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4207        &self.__buffa_unknown_fields
4208    }
4209    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4210        &mut self.__buffa_unknown_fields
4211    }
4212}
4213impl ::buffa::json_helpers::ProtoElemJson for CreateFunctionRequest {
4214    fn serialize_proto_json<S: ::serde::Serializer>(
4215        v: &Self,
4216        s: S,
4217    ) -> ::core::result::Result<S::Ok, S::Error> {
4218        ::serde::Serialize::serialize(v, s)
4219    }
4220    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4221        d: D,
4222    ) -> ::core::result::Result<Self, D::Error> {
4223        <Self as ::serde::Deserialize>::deserialize(d)
4224    }
4225}
4226#[doc(hidden)]
4227pub const __CREATE_FUNCTION_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4228    type_url: "type.googleapis.com/unitycatalog.functions.v1.CreateFunctionRequest",
4229    to_json: ::buffa::type_registry::any_to_json::<CreateFunctionRequest>,
4230    from_json: ::buffa::type_registry::any_from_json::<CreateFunctionRequest>,
4231    is_wkt: false,
4232};
4233/// Get a function
4234#[derive(Clone, PartialEq, Default)]
4235#[derive(::serde::Serialize, ::serde::Deserialize)]
4236#[serde(default)]
4237pub struct GetFunctionRequest {
4238    /// The fully-qualified name of the function (three-level name: catalog.schema.function).
4239    ///
4240    /// Field 1: `name`
4241    #[serde(
4242        rename = "name",
4243        with = "::buffa::json_helpers::proto_string",
4244        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4245    )]
4246    pub name: ::buffa::alloc::string::String,
4247    #[serde(skip)]
4248    #[doc(hidden)]
4249    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4250}
4251impl ::core::fmt::Debug for GetFunctionRequest {
4252    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4253        f.debug_struct("GetFunctionRequest").field("name", &self.name).finish()
4254    }
4255}
4256impl GetFunctionRequest {
4257    /// Protobuf type URL for this message, for use with `Any::pack` and
4258    /// `Any::unpack_if`.
4259    ///
4260    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4261    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.GetFunctionRequest";
4262}
4263impl ::buffa::DefaultInstance for GetFunctionRequest {
4264    fn default_instance() -> &'static Self {
4265        static VALUE: ::buffa::__private::OnceBox<GetFunctionRequest> = ::buffa::__private::OnceBox::new();
4266        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4267    }
4268}
4269impl ::buffa::MessageName for GetFunctionRequest {
4270    const PACKAGE: &'static str = "unitycatalog.functions.v1";
4271    const NAME: &'static str = "GetFunctionRequest";
4272    const FULL_NAME: &'static str = "unitycatalog.functions.v1.GetFunctionRequest";
4273    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.GetFunctionRequest";
4274}
4275impl ::buffa::Message for GetFunctionRequest {
4276    /// Returns the total encoded size in bytes.
4277    ///
4278    /// The result is a `u32`; the protobuf specification requires all
4279    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4280    /// compliant message will never overflow this type.
4281    #[allow(clippy::let_and_return)]
4282    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4283        #[allow(unused_imports)]
4284        use ::buffa::Enumeration as _;
4285        let mut size = 0u32;
4286        if !self.name.is_empty() {
4287            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4288        }
4289        size += self.__buffa_unknown_fields.encoded_len() as u32;
4290        size
4291    }
4292    fn write_to(
4293        &self,
4294        _cache: &mut ::buffa::SizeCache,
4295        buf: &mut impl ::buffa::bytes::BufMut,
4296    ) {
4297        #[allow(unused_imports)]
4298        use ::buffa::Enumeration as _;
4299        if !self.name.is_empty() {
4300            ::buffa::encoding::Tag::new(
4301                    1u32,
4302                    ::buffa::encoding::WireType::LengthDelimited,
4303                )
4304                .encode(buf);
4305            ::buffa::types::encode_string(&self.name, buf);
4306        }
4307        self.__buffa_unknown_fields.write_to(buf);
4308    }
4309    fn merge_field(
4310        &mut self,
4311        tag: ::buffa::encoding::Tag,
4312        buf: &mut impl ::buffa::bytes::Buf,
4313        depth: u32,
4314    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4315        #[allow(unused_imports)]
4316        use ::buffa::bytes::Buf as _;
4317        #[allow(unused_imports)]
4318        use ::buffa::Enumeration as _;
4319        match tag.field_number() {
4320            1u32 => {
4321                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4322                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4323                        field_number: 1u32,
4324                        expected: 2u8,
4325                        actual: tag.wire_type() as u8,
4326                    });
4327                }
4328                ::buffa::types::merge_string(&mut self.name, buf)?;
4329            }
4330            _ => {
4331                self.__buffa_unknown_fields
4332                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4333            }
4334        }
4335        ::core::result::Result::Ok(())
4336    }
4337    fn clear(&mut self) {
4338        self.name.clear();
4339        self.__buffa_unknown_fields.clear();
4340    }
4341}
4342impl ::buffa::ExtensionSet for GetFunctionRequest {
4343    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.GetFunctionRequest";
4344    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4345        &self.__buffa_unknown_fields
4346    }
4347    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4348        &mut self.__buffa_unknown_fields
4349    }
4350}
4351impl ::buffa::json_helpers::ProtoElemJson for GetFunctionRequest {
4352    fn serialize_proto_json<S: ::serde::Serializer>(
4353        v: &Self,
4354        s: S,
4355    ) -> ::core::result::Result<S::Ok, S::Error> {
4356        ::serde::Serialize::serialize(v, s)
4357    }
4358    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4359        d: D,
4360    ) -> ::core::result::Result<Self, D::Error> {
4361        <Self as ::serde::Deserialize>::deserialize(d)
4362    }
4363}
4364#[doc(hidden)]
4365pub const __GET_FUNCTION_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4366    type_url: "type.googleapis.com/unitycatalog.functions.v1.GetFunctionRequest",
4367    to_json: ::buffa::type_registry::any_to_json::<GetFunctionRequest>,
4368    from_json: ::buffa::type_registry::any_from_json::<GetFunctionRequest>,
4369    is_wkt: false,
4370};
4371/// Update a function
4372#[derive(Clone, PartialEq, Default)]
4373#[derive(::serde::Serialize, ::serde::Deserialize)]
4374#[serde(default)]
4375pub struct UpdateFunctionRequest {
4376    /// The fully-qualified name of the function (three-level name: catalog.schema.function).
4377    ///
4378    /// Field 1: `name`
4379    #[serde(
4380        rename = "name",
4381        with = "::buffa::json_helpers::proto_string",
4382        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4383    )]
4384    pub name: ::buffa::alloc::string::String,
4385    /// Username of new owner of the function.
4386    ///
4387    /// Field 2: `owner`
4388    #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
4389    pub owner: ::core::option::Option<::buffa::alloc::string::String>,
4390    #[serde(skip)]
4391    #[doc(hidden)]
4392    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4393}
4394impl ::core::fmt::Debug for UpdateFunctionRequest {
4395    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4396        f.debug_struct("UpdateFunctionRequest")
4397            .field("name", &self.name)
4398            .field("owner", &self.owner)
4399            .finish()
4400    }
4401}
4402impl UpdateFunctionRequest {
4403    /// Protobuf type URL for this message, for use with `Any::pack` and
4404    /// `Any::unpack_if`.
4405    ///
4406    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4407    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.UpdateFunctionRequest";
4408}
4409impl UpdateFunctionRequest {
4410    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
4411    #[inline]
4412    ///Sets [`Self::owner`] to `Some(value)`, consuming and returning `self`.
4413    pub fn with_owner(
4414        mut self,
4415        value: impl Into<::buffa::alloc::string::String>,
4416    ) -> Self {
4417        self.owner = Some(value.into());
4418        self
4419    }
4420}
4421impl ::buffa::DefaultInstance for UpdateFunctionRequest {
4422    fn default_instance() -> &'static Self {
4423        static VALUE: ::buffa::__private::OnceBox<UpdateFunctionRequest> = ::buffa::__private::OnceBox::new();
4424        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4425    }
4426}
4427impl ::buffa::MessageName for UpdateFunctionRequest {
4428    const PACKAGE: &'static str = "unitycatalog.functions.v1";
4429    const NAME: &'static str = "UpdateFunctionRequest";
4430    const FULL_NAME: &'static str = "unitycatalog.functions.v1.UpdateFunctionRequest";
4431    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.UpdateFunctionRequest";
4432}
4433impl ::buffa::Message for UpdateFunctionRequest {
4434    /// Returns the total encoded size in bytes.
4435    ///
4436    /// The result is a `u32`; the protobuf specification requires all
4437    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4438    /// compliant message will never overflow this type.
4439    #[allow(clippy::let_and_return)]
4440    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4441        #[allow(unused_imports)]
4442        use ::buffa::Enumeration as _;
4443        let mut size = 0u32;
4444        if !self.name.is_empty() {
4445            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4446        }
4447        if let Some(ref v) = self.owner {
4448            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4449        }
4450        size += self.__buffa_unknown_fields.encoded_len() as u32;
4451        size
4452    }
4453    fn write_to(
4454        &self,
4455        _cache: &mut ::buffa::SizeCache,
4456        buf: &mut impl ::buffa::bytes::BufMut,
4457    ) {
4458        #[allow(unused_imports)]
4459        use ::buffa::Enumeration as _;
4460        if !self.name.is_empty() {
4461            ::buffa::encoding::Tag::new(
4462                    1u32,
4463                    ::buffa::encoding::WireType::LengthDelimited,
4464                )
4465                .encode(buf);
4466            ::buffa::types::encode_string(&self.name, buf);
4467        }
4468        if let Some(ref v) = self.owner {
4469            ::buffa::encoding::Tag::new(
4470                    2u32,
4471                    ::buffa::encoding::WireType::LengthDelimited,
4472                )
4473                .encode(buf);
4474            ::buffa::types::encode_string(v, buf);
4475        }
4476        self.__buffa_unknown_fields.write_to(buf);
4477    }
4478    fn merge_field(
4479        &mut self,
4480        tag: ::buffa::encoding::Tag,
4481        buf: &mut impl ::buffa::bytes::Buf,
4482        depth: u32,
4483    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4484        #[allow(unused_imports)]
4485        use ::buffa::bytes::Buf as _;
4486        #[allow(unused_imports)]
4487        use ::buffa::Enumeration as _;
4488        match tag.field_number() {
4489            1u32 => {
4490                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4491                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4492                        field_number: 1u32,
4493                        expected: 2u8,
4494                        actual: tag.wire_type() as u8,
4495                    });
4496                }
4497                ::buffa::types::merge_string(&mut self.name, buf)?;
4498            }
4499            2u32 => {
4500                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4501                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4502                        field_number: 2u32,
4503                        expected: 2u8,
4504                        actual: tag.wire_type() as u8,
4505                    });
4506                }
4507                ::buffa::types::merge_string(
4508                    self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
4509                    buf,
4510                )?;
4511            }
4512            _ => {
4513                self.__buffa_unknown_fields
4514                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4515            }
4516        }
4517        ::core::result::Result::Ok(())
4518    }
4519    fn clear(&mut self) {
4520        self.name.clear();
4521        self.owner = ::core::option::Option::None;
4522        self.__buffa_unknown_fields.clear();
4523    }
4524}
4525impl ::buffa::ExtensionSet for UpdateFunctionRequest {
4526    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.UpdateFunctionRequest";
4527    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4528        &self.__buffa_unknown_fields
4529    }
4530    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4531        &mut self.__buffa_unknown_fields
4532    }
4533}
4534impl ::buffa::json_helpers::ProtoElemJson for UpdateFunctionRequest {
4535    fn serialize_proto_json<S: ::serde::Serializer>(
4536        v: &Self,
4537        s: S,
4538    ) -> ::core::result::Result<S::Ok, S::Error> {
4539        ::serde::Serialize::serialize(v, s)
4540    }
4541    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4542        d: D,
4543    ) -> ::core::result::Result<Self, D::Error> {
4544        <Self as ::serde::Deserialize>::deserialize(d)
4545    }
4546}
4547#[doc(hidden)]
4548pub const __UPDATE_FUNCTION_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4549    type_url: "type.googleapis.com/unitycatalog.functions.v1.UpdateFunctionRequest",
4550    to_json: ::buffa::type_registry::any_to_json::<UpdateFunctionRequest>,
4551    from_json: ::buffa::type_registry::any_from_json::<UpdateFunctionRequest>,
4552    is_wkt: false,
4553};
4554/// Delete a function
4555#[derive(Clone, PartialEq, Default)]
4556#[derive(::serde::Serialize, ::serde::Deserialize)]
4557#[serde(default)]
4558pub struct DeleteFunctionRequest {
4559    /// The fully-qualified name of the function (three-level name: catalog.schema.function).
4560    ///
4561    /// Field 1: `name`
4562    #[serde(
4563        rename = "name",
4564        with = "::buffa::json_helpers::proto_string",
4565        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4566    )]
4567    pub name: ::buffa::alloc::string::String,
4568    /// Force deletion even if the function is not empty.
4569    ///
4570    /// Field 2: `force`
4571    #[serde(rename = "force", skip_serializing_if = "::core::option::Option::is_none")]
4572    pub force: ::core::option::Option<bool>,
4573    #[serde(skip)]
4574    #[doc(hidden)]
4575    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4576}
4577impl ::core::fmt::Debug for DeleteFunctionRequest {
4578    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4579        f.debug_struct("DeleteFunctionRequest")
4580            .field("name", &self.name)
4581            .field("force", &self.force)
4582            .finish()
4583    }
4584}
4585impl DeleteFunctionRequest {
4586    /// Protobuf type URL for this message, for use with `Any::pack` and
4587    /// `Any::unpack_if`.
4588    ///
4589    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4590    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.DeleteFunctionRequest";
4591}
4592impl DeleteFunctionRequest {
4593    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
4594    #[inline]
4595    ///Sets [`Self::force`] to `Some(value)`, consuming and returning `self`.
4596    pub fn with_force(mut self, value: bool) -> Self {
4597        self.force = Some(value);
4598        self
4599    }
4600}
4601impl ::buffa::DefaultInstance for DeleteFunctionRequest {
4602    fn default_instance() -> &'static Self {
4603        static VALUE: ::buffa::__private::OnceBox<DeleteFunctionRequest> = ::buffa::__private::OnceBox::new();
4604        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4605    }
4606}
4607impl ::buffa::MessageName for DeleteFunctionRequest {
4608    const PACKAGE: &'static str = "unitycatalog.functions.v1";
4609    const NAME: &'static str = "DeleteFunctionRequest";
4610    const FULL_NAME: &'static str = "unitycatalog.functions.v1.DeleteFunctionRequest";
4611    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.DeleteFunctionRequest";
4612}
4613impl ::buffa::Message for DeleteFunctionRequest {
4614    /// Returns the total encoded size in bytes.
4615    ///
4616    /// The result is a `u32`; the protobuf specification requires all
4617    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4618    /// compliant message will never overflow this type.
4619    #[allow(clippy::let_and_return)]
4620    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4621        #[allow(unused_imports)]
4622        use ::buffa::Enumeration as _;
4623        let mut size = 0u32;
4624        if !self.name.is_empty() {
4625            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4626        }
4627        if self.force.is_some() {
4628            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4629        }
4630        size += self.__buffa_unknown_fields.encoded_len() as u32;
4631        size
4632    }
4633    fn write_to(
4634        &self,
4635        _cache: &mut ::buffa::SizeCache,
4636        buf: &mut impl ::buffa::bytes::BufMut,
4637    ) {
4638        #[allow(unused_imports)]
4639        use ::buffa::Enumeration as _;
4640        if !self.name.is_empty() {
4641            ::buffa::encoding::Tag::new(
4642                    1u32,
4643                    ::buffa::encoding::WireType::LengthDelimited,
4644                )
4645                .encode(buf);
4646            ::buffa::types::encode_string(&self.name, buf);
4647        }
4648        if let Some(v) = self.force {
4649            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
4650                .encode(buf);
4651            ::buffa::types::encode_bool(v, buf);
4652        }
4653        self.__buffa_unknown_fields.write_to(buf);
4654    }
4655    fn merge_field(
4656        &mut self,
4657        tag: ::buffa::encoding::Tag,
4658        buf: &mut impl ::buffa::bytes::Buf,
4659        depth: u32,
4660    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4661        #[allow(unused_imports)]
4662        use ::buffa::bytes::Buf as _;
4663        #[allow(unused_imports)]
4664        use ::buffa::Enumeration as _;
4665        match tag.field_number() {
4666            1u32 => {
4667                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4668                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4669                        field_number: 1u32,
4670                        expected: 2u8,
4671                        actual: tag.wire_type() as u8,
4672                    });
4673                }
4674                ::buffa::types::merge_string(&mut self.name, buf)?;
4675            }
4676            2u32 => {
4677                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4678                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4679                        field_number: 2u32,
4680                        expected: 0u8,
4681                        actual: tag.wire_type() as u8,
4682                    });
4683                }
4684                self.force = ::core::option::Option::Some(
4685                    ::buffa::types::decode_bool(buf)?,
4686                );
4687            }
4688            _ => {
4689                self.__buffa_unknown_fields
4690                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4691            }
4692        }
4693        ::core::result::Result::Ok(())
4694    }
4695    fn clear(&mut self) {
4696        self.name.clear();
4697        self.force = ::core::option::Option::None;
4698        self.__buffa_unknown_fields.clear();
4699    }
4700}
4701impl ::buffa::ExtensionSet for DeleteFunctionRequest {
4702    const PROTO_FQN: &'static str = "unitycatalog.functions.v1.DeleteFunctionRequest";
4703    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4704        &self.__buffa_unknown_fields
4705    }
4706    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4707        &mut self.__buffa_unknown_fields
4708    }
4709}
4710impl ::buffa::json_helpers::ProtoElemJson for DeleteFunctionRequest {
4711    fn serialize_proto_json<S: ::serde::Serializer>(
4712        v: &Self,
4713        s: S,
4714    ) -> ::core::result::Result<S::Ok, S::Error> {
4715        ::serde::Serialize::serialize(v, s)
4716    }
4717    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4718        d: D,
4719    ) -> ::core::result::Result<Self, D::Error> {
4720        <Self as ::serde::Deserialize>::deserialize(d)
4721    }
4722}
4723#[doc(hidden)]
4724pub const __DELETE_FUNCTION_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4725    type_url: "type.googleapis.com/unitycatalog.functions.v1.DeleteFunctionRequest",
4726    to_json: ::buffa::type_registry::any_to_json::<DeleteFunctionRequest>,
4727    from_json: ::buffa::type_registry::any_from_json::<DeleteFunctionRequest>,
4728    is_wkt: false,
4729};
4730#[allow(
4731    non_camel_case_types,
4732    dead_code,
4733    unused_imports,
4734    unused_qualifications,
4735    clippy::derivable_impls,
4736    clippy::match_single_binding,
4737    clippy::uninlined_format_args,
4738    clippy::doc_lazy_continuation,
4739    clippy::module_inception
4740)]
4741pub mod __buffa {
4742    #[allow(unused_imports)]
4743    use super::*;
4744    pub mod view {
4745        #[allow(unused_imports)]
4746        use super::*;
4747        /// Information about a single function parameter.
4748        #[derive(Clone, Debug, Default)]
4749        pub struct FunctionParameterInfoView<'a> {
4750            /// Name of parameter.
4751            ///
4752            /// Field 1: `name`
4753            pub name: &'a str,
4754            /// Full data type specification as SQL/catalogString text.
4755            ///
4756            /// Field 2: `type_text`
4757            pub type_text: &'a str,
4758            /// Full data type specification, JSON-serialized.
4759            ///
4760            /// Field 3: `type_json`
4761            pub type_json: ::core::option::Option<&'a str>,
4762            /// Data type name.
4763            ///
4764            /// Field 4: `type_name`
4765            pub type_name: ::buffa::EnumValue<
4766                super::super::super::super::tables::v1::ColumnTypeName,
4767            >,
4768            /// Digits of precision; required for DecimalTypes.
4769            ///
4770            /// Field 5: `type_precision`
4771            pub type_precision: ::core::option::Option<i32>,
4772            /// Digits to right of decimal; required for DecimalTypes.
4773            ///
4774            /// Field 6: `type_scale`
4775            pub type_scale: ::core::option::Option<i32>,
4776            /// Format of IntervalType.
4777            ///
4778            /// Field 7: `type_interval_type`
4779            pub type_interval_type: ::core::option::Option<&'a str>,
4780            /// Ordinal position of column (starting at position 0).
4781            ///
4782            /// Field 8: `position`
4783            pub position: ::core::option::Option<i32>,
4784            /// The mode of the function parameter.
4785            ///
4786            /// Field 9: `parameter_mode`
4787            pub parameter_mode: ::buffa::EnumValue<super::super::ParameterMode>,
4788            /// The type of function parameter.
4789            ///
4790            /// Field 10: `parameter_type`
4791            pub parameter_type: ::buffa::EnumValue<super::super::FunctionParameterType>,
4792            /// Default value of the parameter.
4793            ///
4794            /// Field 11: `parameter_default`
4795            pub parameter_default: ::core::option::Option<&'a str>,
4796            /// User-provided free-form text description.
4797            ///
4798            /// Field 12: `comment`
4799            pub comment: ::core::option::Option<&'a str>,
4800            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4801        }
4802        impl<'a> FunctionParameterInfoView<'a> {
4803            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4804            ///
4805            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4806            /// and by generated sub-message decode arms with `depth - 1`.
4807            ///
4808            /// **Not part of the public API.** Named with a leading underscore to
4809            /// signal that it is for generated-code use only.
4810            #[doc(hidden)]
4811            pub fn _decode_depth(
4812                buf: &'a [u8],
4813                depth: u32,
4814            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4815                let mut view = Self::default();
4816                view._merge_into_view(buf, depth)?;
4817                ::core::result::Result::Ok(view)
4818            }
4819            /// Merge fields from `buf` into this view (proto merge semantics).
4820            ///
4821            /// Repeated fields append; singular fields last-wins; singular
4822            /// MESSAGE fields merge recursively. Used by sub-message decode
4823            /// arms when the same field appears multiple times on the wire.
4824            ///
4825            /// **Not part of the public API.**
4826            #[doc(hidden)]
4827            pub fn _merge_into_view(
4828                &mut self,
4829                buf: &'a [u8],
4830                depth: u32,
4831            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4832                let _ = depth;
4833                #[allow(unused_variables)]
4834                let view = self;
4835                let mut cur: &'a [u8] = buf;
4836                while !cur.is_empty() {
4837                    let before_tag = cur;
4838                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4839                    match tag.field_number() {
4840                        1u32 => {
4841                            if tag.wire_type()
4842                                != ::buffa::encoding::WireType::LengthDelimited
4843                            {
4844                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4845                                    field_number: 1u32,
4846                                    expected: 2u8,
4847                                    actual: tag.wire_type() as u8,
4848                                });
4849                            }
4850                            view.name = ::buffa::types::borrow_str(&mut cur)?;
4851                        }
4852                        2u32 => {
4853                            if tag.wire_type()
4854                                != ::buffa::encoding::WireType::LengthDelimited
4855                            {
4856                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4857                                    field_number: 2u32,
4858                                    expected: 2u8,
4859                                    actual: tag.wire_type() as u8,
4860                                });
4861                            }
4862                            view.type_text = ::buffa::types::borrow_str(&mut cur)?;
4863                        }
4864                        3u32 => {
4865                            if tag.wire_type()
4866                                != ::buffa::encoding::WireType::LengthDelimited
4867                            {
4868                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4869                                    field_number: 3u32,
4870                                    expected: 2u8,
4871                                    actual: tag.wire_type() as u8,
4872                                });
4873                            }
4874                            view.type_json = Some(::buffa::types::borrow_str(&mut cur)?);
4875                        }
4876                        4u32 => {
4877                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4878                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4879                                    field_number: 4u32,
4880                                    expected: 0u8,
4881                                    actual: tag.wire_type() as u8,
4882                                });
4883                            }
4884                            view.type_name = ::buffa::EnumValue::from(
4885                                ::buffa::types::decode_int32(&mut cur)?,
4886                            );
4887                        }
4888                        5u32 => {
4889                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4890                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4891                                    field_number: 5u32,
4892                                    expected: 0u8,
4893                                    actual: tag.wire_type() as u8,
4894                                });
4895                            }
4896                            view.type_precision = Some(
4897                                ::buffa::types::decode_int32(&mut cur)?,
4898                            );
4899                        }
4900                        6u32 => {
4901                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4902                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4903                                    field_number: 6u32,
4904                                    expected: 0u8,
4905                                    actual: tag.wire_type() as u8,
4906                                });
4907                            }
4908                            view.type_scale = Some(
4909                                ::buffa::types::decode_int32(&mut cur)?,
4910                            );
4911                        }
4912                        7u32 => {
4913                            if tag.wire_type()
4914                                != ::buffa::encoding::WireType::LengthDelimited
4915                            {
4916                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4917                                    field_number: 7u32,
4918                                    expected: 2u8,
4919                                    actual: tag.wire_type() as u8,
4920                                });
4921                            }
4922                            view.type_interval_type = Some(
4923                                ::buffa::types::borrow_str(&mut cur)?,
4924                            );
4925                        }
4926                        8u32 => {
4927                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4928                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4929                                    field_number: 8u32,
4930                                    expected: 0u8,
4931                                    actual: tag.wire_type() as u8,
4932                                });
4933                            }
4934                            view.position = Some(
4935                                ::buffa::types::decode_int32(&mut cur)?,
4936                            );
4937                        }
4938                        9u32 => {
4939                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4940                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4941                                    field_number: 9u32,
4942                                    expected: 0u8,
4943                                    actual: tag.wire_type() as u8,
4944                                });
4945                            }
4946                            view.parameter_mode = ::buffa::EnumValue::from(
4947                                ::buffa::types::decode_int32(&mut cur)?,
4948                            );
4949                        }
4950                        10u32 => {
4951                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4952                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4953                                    field_number: 10u32,
4954                                    expected: 0u8,
4955                                    actual: tag.wire_type() as u8,
4956                                });
4957                            }
4958                            view.parameter_type = ::buffa::EnumValue::from(
4959                                ::buffa::types::decode_int32(&mut cur)?,
4960                            );
4961                        }
4962                        11u32 => {
4963                            if tag.wire_type()
4964                                != ::buffa::encoding::WireType::LengthDelimited
4965                            {
4966                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4967                                    field_number: 11u32,
4968                                    expected: 2u8,
4969                                    actual: tag.wire_type() as u8,
4970                                });
4971                            }
4972                            view.parameter_default = Some(
4973                                ::buffa::types::borrow_str(&mut cur)?,
4974                            );
4975                        }
4976                        12u32 => {
4977                            if tag.wire_type()
4978                                != ::buffa::encoding::WireType::LengthDelimited
4979                            {
4980                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4981                                    field_number: 12u32,
4982                                    expected: 2u8,
4983                                    actual: tag.wire_type() as u8,
4984                                });
4985                            }
4986                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
4987                        }
4988                        _ => {
4989                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4990                            let span_len = before_tag.len() - cur.len();
4991                            view.__buffa_unknown_fields
4992                                .push_raw(&before_tag[..span_len]);
4993                        }
4994                    }
4995                }
4996                ::core::result::Result::Ok(())
4997            }
4998        }
4999        impl<'a> ::buffa::MessageView<'a> for FunctionParameterInfoView<'a> {
5000            type Owned = super::super::FunctionParameterInfo;
5001            fn decode_view(
5002                buf: &'a [u8],
5003            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5004                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5005            }
5006            fn decode_view_with_limit(
5007                buf: &'a [u8],
5008                depth: u32,
5009            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5010                Self::_decode_depth(buf, depth)
5011            }
5012            fn to_owned_message(&self) -> super::super::FunctionParameterInfo {
5013                self.to_owned_from_source(None)
5014            }
5015            #[allow(clippy::useless_conversion, clippy::needless_update)]
5016            fn to_owned_from_source(
5017                &self,
5018                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5019            ) -> super::super::FunctionParameterInfo {
5020                #[allow(unused_imports)]
5021                use ::buffa::alloc::string::ToString as _;
5022                let _ = __buffa_src;
5023                super::super::FunctionParameterInfo {
5024                    name: self.name.to_string(),
5025                    type_text: self.type_text.to_string(),
5026                    type_json: self.type_json.map(|s| s.to_string()),
5027                    type_name: self.type_name,
5028                    type_precision: self.type_precision,
5029                    type_scale: self.type_scale,
5030                    type_interval_type: self.type_interval_type.map(|s| s.to_string()),
5031                    position: self.position,
5032                    parameter_mode: self.parameter_mode,
5033                    parameter_type: self.parameter_type,
5034                    parameter_default: self.parameter_default.map(|s| s.to_string()),
5035                    comment: self.comment.map(|s| s.to_string()),
5036                    __buffa_unknown_fields: self
5037                        .__buffa_unknown_fields
5038                        .to_owned()
5039                        .unwrap_or_default()
5040                        .into(),
5041                    ..::core::default::Default::default()
5042                }
5043            }
5044        }
5045        impl<'a> ::buffa::ViewEncode<'a> for FunctionParameterInfoView<'a> {
5046            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5047            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5048                #[allow(unused_imports)]
5049                use ::buffa::Enumeration as _;
5050                let mut size = 0u32;
5051                if !self.name.is_empty() {
5052                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
5053                }
5054                if !self.type_text.is_empty() {
5055                    size
5056                        += 1u32
5057                            + ::buffa::types::string_encoded_len(&self.type_text) as u32;
5058                }
5059                if let Some(ref v) = self.type_json {
5060                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5061                }
5062                {
5063                    let val = self.type_name.to_i32();
5064                    if val != 0 {
5065                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5066                    }
5067                }
5068                if let Some(v) = self.type_precision {
5069                    size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
5070                }
5071                if let Some(v) = self.type_scale {
5072                    size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
5073                }
5074                if let Some(ref v) = self.type_interval_type {
5075                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5076                }
5077                if let Some(v) = self.position {
5078                    size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
5079                }
5080                {
5081                    let val = self.parameter_mode.to_i32();
5082                    if val != 0 {
5083                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5084                    }
5085                }
5086                {
5087                    let val = self.parameter_type.to_i32();
5088                    if val != 0 {
5089                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5090                    }
5091                }
5092                if let Some(ref v) = self.parameter_default {
5093                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5094                }
5095                if let Some(ref v) = self.comment {
5096                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5097                }
5098                size += self.__buffa_unknown_fields.encoded_len() as u32;
5099                size
5100            }
5101            #[allow(clippy::needless_borrow)]
5102            fn write_to(
5103                &self,
5104                _cache: &mut ::buffa::SizeCache,
5105                buf: &mut impl ::buffa::bytes::BufMut,
5106            ) {
5107                #[allow(unused_imports)]
5108                use ::buffa::Enumeration as _;
5109                if !self.name.is_empty() {
5110                    ::buffa::encoding::Tag::new(
5111                            1u32,
5112                            ::buffa::encoding::WireType::LengthDelimited,
5113                        )
5114                        .encode(buf);
5115                    ::buffa::types::encode_string(&self.name, buf);
5116                }
5117                if !self.type_text.is_empty() {
5118                    ::buffa::encoding::Tag::new(
5119                            2u32,
5120                            ::buffa::encoding::WireType::LengthDelimited,
5121                        )
5122                        .encode(buf);
5123                    ::buffa::types::encode_string(&self.type_text, buf);
5124                }
5125                if let Some(ref v) = self.type_json {
5126                    ::buffa::encoding::Tag::new(
5127                            3u32,
5128                            ::buffa::encoding::WireType::LengthDelimited,
5129                        )
5130                        .encode(buf);
5131                    ::buffa::types::encode_string(v, buf);
5132                }
5133                {
5134                    let val = self.type_name.to_i32();
5135                    if val != 0 {
5136                        ::buffa::encoding::Tag::new(
5137                                4u32,
5138                                ::buffa::encoding::WireType::Varint,
5139                            )
5140                            .encode(buf);
5141                        ::buffa::types::encode_int32(val, buf);
5142                    }
5143                }
5144                if let Some(v) = self.type_precision {
5145                    ::buffa::encoding::Tag::new(
5146                            5u32,
5147                            ::buffa::encoding::WireType::Varint,
5148                        )
5149                        .encode(buf);
5150                    ::buffa::types::encode_int32(v, buf);
5151                }
5152                if let Some(v) = self.type_scale {
5153                    ::buffa::encoding::Tag::new(
5154                            6u32,
5155                            ::buffa::encoding::WireType::Varint,
5156                        )
5157                        .encode(buf);
5158                    ::buffa::types::encode_int32(v, buf);
5159                }
5160                if let Some(ref v) = self.type_interval_type {
5161                    ::buffa::encoding::Tag::new(
5162                            7u32,
5163                            ::buffa::encoding::WireType::LengthDelimited,
5164                        )
5165                        .encode(buf);
5166                    ::buffa::types::encode_string(v, buf);
5167                }
5168                if let Some(v) = self.position {
5169                    ::buffa::encoding::Tag::new(
5170                            8u32,
5171                            ::buffa::encoding::WireType::Varint,
5172                        )
5173                        .encode(buf);
5174                    ::buffa::types::encode_int32(v, buf);
5175                }
5176                {
5177                    let val = self.parameter_mode.to_i32();
5178                    if val != 0 {
5179                        ::buffa::encoding::Tag::new(
5180                                9u32,
5181                                ::buffa::encoding::WireType::Varint,
5182                            )
5183                            .encode(buf);
5184                        ::buffa::types::encode_int32(val, buf);
5185                    }
5186                }
5187                {
5188                    let val = self.parameter_type.to_i32();
5189                    if val != 0 {
5190                        ::buffa::encoding::Tag::new(
5191                                10u32,
5192                                ::buffa::encoding::WireType::Varint,
5193                            )
5194                            .encode(buf);
5195                        ::buffa::types::encode_int32(val, buf);
5196                    }
5197                }
5198                if let Some(ref v) = self.parameter_default {
5199                    ::buffa::encoding::Tag::new(
5200                            11u32,
5201                            ::buffa::encoding::WireType::LengthDelimited,
5202                        )
5203                        .encode(buf);
5204                    ::buffa::types::encode_string(v, buf);
5205                }
5206                if let Some(ref v) = self.comment {
5207                    ::buffa::encoding::Tag::new(
5208                            12u32,
5209                            ::buffa::encoding::WireType::LengthDelimited,
5210                        )
5211                        .encode(buf);
5212                    ::buffa::types::encode_string(v, buf);
5213                }
5214                self.__buffa_unknown_fields.write_to(buf);
5215            }
5216        }
5217        /// Serializes this view as protobuf JSON.
5218        ///
5219        /// Implicit-presence fields with default values are omitted, `required`
5220        /// fields are always emitted, explicit-presence (`optional`) fields are
5221        /// emitted only when set, bytes fields are base64-encoded, and enum
5222        /// values are their proto name strings.
5223        ///
5224        /// This impl uses `serialize_map(None)` because the number of emitted
5225        /// fields depends on default-omission rules; serializers that require
5226        /// known map lengths (e.g. `bincode`) will return a runtime error.
5227        /// Use the owned message type for those formats.
5228        impl<'__a> ::serde::Serialize for FunctionParameterInfoView<'__a> {
5229            fn serialize<__S: ::serde::Serializer>(
5230                &self,
5231                __s: __S,
5232            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5233                use ::serde::ser::SerializeMap as _;
5234                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5235                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
5236                    __map.serialize_entry("name", self.name)?;
5237                }
5238                if !::buffa::json_helpers::skip_if::is_empty_str(self.type_text) {
5239                    __map.serialize_entry("type_text", self.type_text)?;
5240                }
5241                if let ::core::option::Option::Some(__v) = self.type_json {
5242                    __map.serialize_entry("type_json", __v)?;
5243                }
5244                if !::buffa::json_helpers::skip_if::is_default_enum_value(
5245                    &self.type_name,
5246                ) {
5247                    __map.serialize_entry("type_name", &self.type_name)?;
5248                }
5249                if let ::core::option::Option::Some(__v) = self.type_precision {
5250                    struct _W(i32);
5251                    impl ::serde::Serialize for _W {
5252                        fn serialize<__S: ::serde::Serializer>(
5253                            &self,
5254                            __s: __S,
5255                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
5256                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
5257                        }
5258                    }
5259                    __map.serialize_entry("type_precision", &_W(__v))?;
5260                }
5261                if let ::core::option::Option::Some(__v) = self.type_scale {
5262                    struct _W(i32);
5263                    impl ::serde::Serialize for _W {
5264                        fn serialize<__S: ::serde::Serializer>(
5265                            &self,
5266                            __s: __S,
5267                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
5268                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
5269                        }
5270                    }
5271                    __map.serialize_entry("type_scale", &_W(__v))?;
5272                }
5273                if let ::core::option::Option::Some(__v) = self.type_interval_type {
5274                    __map.serialize_entry("type_interval_type", __v)?;
5275                }
5276                if let ::core::option::Option::Some(__v) = self.position {
5277                    struct _W(i32);
5278                    impl ::serde::Serialize for _W {
5279                        fn serialize<__S: ::serde::Serializer>(
5280                            &self,
5281                            __s: __S,
5282                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
5283                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
5284                        }
5285                    }
5286                    __map.serialize_entry("position", &_W(__v))?;
5287                }
5288                if !::buffa::json_helpers::skip_if::is_default_enum_value(
5289                    &self.parameter_mode,
5290                ) {
5291                    __map.serialize_entry("parameter_mode", &self.parameter_mode)?;
5292                }
5293                if !::buffa::json_helpers::skip_if::is_default_enum_value(
5294                    &self.parameter_type,
5295                ) {
5296                    __map.serialize_entry("parameter_type", &self.parameter_type)?;
5297                }
5298                if let ::core::option::Option::Some(__v) = self.parameter_default {
5299                    __map.serialize_entry("parameter_default", __v)?;
5300                }
5301                if let ::core::option::Option::Some(__v) = self.comment {
5302                    __map.serialize_entry("comment", __v)?;
5303                }
5304                __map.end()
5305            }
5306        }
5307        impl<'a> ::buffa::MessageName for FunctionParameterInfoView<'a> {
5308            const PACKAGE: &'static str = "unitycatalog.functions.v1";
5309            const NAME: &'static str = "FunctionParameterInfo";
5310            const FULL_NAME: &'static str = "unitycatalog.functions.v1.FunctionParameterInfo";
5311            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.FunctionParameterInfo";
5312        }
5313        impl<'v> ::buffa::DefaultViewInstance for FunctionParameterInfoView<'v> {
5314            fn default_view_instance<'a>() -> &'a Self
5315            where
5316                Self: 'a,
5317            {
5318                static VALUE: ::buffa::__private::OnceBox<
5319                    FunctionParameterInfoView<'static>,
5320                > = ::buffa::__private::OnceBox::new();
5321                VALUE
5322                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5323                        <FunctionParameterInfoView<'static>>::default(),
5324                    ))
5325            }
5326        }
5327        impl ::buffa::ViewReborrow for FunctionParameterInfoView<'static> {
5328            type Reborrowed<'b> = FunctionParameterInfoView<'b>;
5329            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5330                this
5331            }
5332        }
5333        /** Self-contained, `'static` owned view of a `FunctionParameterInfo` message.
5334
5335 Wraps [`::buffa::OwnedView`]`<`[`FunctionParameterInfoView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
5336
5337 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FunctionParameterInfoView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5338        #[derive(Clone, Debug)]
5339        pub struct FunctionParameterInfoOwnedView(
5340            ::buffa::OwnedView<FunctionParameterInfoView<'static>>,
5341        );
5342        impl FunctionParameterInfoOwnedView {
5343            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5344            ///
5345            /// The view borrows directly from the buffer's data; the buffer is
5346            /// retained inside the returned handle.
5347            ///
5348            /// # Errors
5349            ///
5350            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5351            /// protobuf data.
5352            pub fn decode(
5353                bytes: ::buffa::bytes::Bytes,
5354            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5355                ::core::result::Result::Ok(
5356                    FunctionParameterInfoOwnedView(::buffa::OwnedView::decode(bytes)?),
5357                )
5358            }
5359            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5360            /// max message size).
5361            ///
5362            /// # Errors
5363            ///
5364            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5365            /// exceeds the configured limits.
5366            pub fn decode_with_options(
5367                bytes: ::buffa::bytes::Bytes,
5368                opts: &::buffa::DecodeOptions,
5369            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5370                ::core::result::Result::Ok(
5371                    FunctionParameterInfoOwnedView(
5372                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5373                    ),
5374                )
5375            }
5376            /// Build from an owned message via an encode → decode round-trip.
5377            ///
5378            /// # Errors
5379            ///
5380            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5381            /// somehow invalid (should not happen for well-formed messages).
5382            pub fn from_owned(
5383                msg: &super::super::FunctionParameterInfo,
5384            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5385                ::core::result::Result::Ok(
5386                    FunctionParameterInfoOwnedView(::buffa::OwnedView::from_owned(msg)?),
5387                )
5388            }
5389            /// Borrow the full [`FunctionParameterInfoView`] with its lifetime tied to `&self`.
5390            #[must_use]
5391            pub fn view(&self) -> &FunctionParameterInfoView<'_> {
5392                self.0.reborrow()
5393            }
5394            /// Convert to the owned message type.
5395            #[must_use]
5396            pub fn to_owned_message(&self) -> super::super::FunctionParameterInfo {
5397                self.0.to_owned_message()
5398            }
5399            /// The underlying bytes buffer.
5400            #[must_use]
5401            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5402                self.0.bytes()
5403            }
5404            /// Consume the handle, returning the underlying bytes buffer.
5405            #[must_use]
5406            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5407                self.0.into_bytes()
5408            }
5409            /// Name of parameter.
5410            ///
5411            /// Field 1: `name`
5412            #[must_use]
5413            pub fn name(&self) -> &'_ str {
5414                self.0.reborrow().name
5415            }
5416            /// Full data type specification as SQL/catalogString text.
5417            ///
5418            /// Field 2: `type_text`
5419            #[must_use]
5420            pub fn type_text(&self) -> &'_ str {
5421                self.0.reborrow().type_text
5422            }
5423            /// Full data type specification, JSON-serialized.
5424            ///
5425            /// Field 3: `type_json`
5426            #[must_use]
5427            pub fn type_json(&self) -> ::core::option::Option<&'_ str> {
5428                self.0.reborrow().type_json
5429            }
5430            /// Data type name.
5431            ///
5432            /// Field 4: `type_name`
5433            #[must_use]
5434            pub fn type_name(
5435                &self,
5436            ) -> ::buffa::EnumValue<
5437                super::super::super::super::tables::v1::ColumnTypeName,
5438            > {
5439                self.0.reborrow().type_name
5440            }
5441            /// Digits of precision; required for DecimalTypes.
5442            ///
5443            /// Field 5: `type_precision`
5444            #[must_use]
5445            pub fn type_precision(&self) -> ::core::option::Option<i32> {
5446                self.0.reborrow().type_precision
5447            }
5448            /// Digits to right of decimal; required for DecimalTypes.
5449            ///
5450            /// Field 6: `type_scale`
5451            #[must_use]
5452            pub fn type_scale(&self) -> ::core::option::Option<i32> {
5453                self.0.reborrow().type_scale
5454            }
5455            /// Format of IntervalType.
5456            ///
5457            /// Field 7: `type_interval_type`
5458            #[must_use]
5459            pub fn type_interval_type(&self) -> ::core::option::Option<&'_ str> {
5460                self.0.reborrow().type_interval_type
5461            }
5462            /// Ordinal position of column (starting at position 0).
5463            ///
5464            /// Field 8: `position`
5465            #[must_use]
5466            pub fn position(&self) -> ::core::option::Option<i32> {
5467                self.0.reborrow().position
5468            }
5469            /// The mode of the function parameter.
5470            ///
5471            /// Field 9: `parameter_mode`
5472            #[must_use]
5473            pub fn parameter_mode(
5474                &self,
5475            ) -> ::buffa::EnumValue<super::super::ParameterMode> {
5476                self.0.reborrow().parameter_mode
5477            }
5478            /// The type of function parameter.
5479            ///
5480            /// Field 10: `parameter_type`
5481            #[must_use]
5482            pub fn parameter_type(
5483                &self,
5484            ) -> ::buffa::EnumValue<super::super::FunctionParameterType> {
5485                self.0.reborrow().parameter_type
5486            }
5487            /// Default value of the parameter.
5488            ///
5489            /// Field 11: `parameter_default`
5490            #[must_use]
5491            pub fn parameter_default(&self) -> ::core::option::Option<&'_ str> {
5492                self.0.reborrow().parameter_default
5493            }
5494            /// User-provided free-form text description.
5495            ///
5496            /// Field 12: `comment`
5497            #[must_use]
5498            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
5499                self.0.reborrow().comment
5500            }
5501        }
5502        impl ::core::convert::From<
5503            ::buffa::OwnedView<FunctionParameterInfoView<'static>>,
5504        > for FunctionParameterInfoOwnedView {
5505            fn from(
5506                inner: ::buffa::OwnedView<FunctionParameterInfoView<'static>>,
5507            ) -> Self {
5508                FunctionParameterInfoOwnedView(inner)
5509            }
5510        }
5511        impl ::core::convert::From<FunctionParameterInfoOwnedView>
5512        for ::buffa::OwnedView<FunctionParameterInfoView<'static>> {
5513            fn from(wrapper: FunctionParameterInfoOwnedView) -> Self {
5514                wrapper.0
5515            }
5516        }
5517        impl ::core::convert::AsRef<
5518            ::buffa::OwnedView<FunctionParameterInfoView<'static>>,
5519        > for FunctionParameterInfoOwnedView {
5520            fn as_ref(&self) -> &::buffa::OwnedView<FunctionParameterInfoView<'static>> {
5521                &self.0
5522            }
5523        }
5524        impl ::buffa::HasMessageView for super::super::FunctionParameterInfo {
5525            type View<'a> = FunctionParameterInfoView<'a>;
5526            type ViewHandle = FunctionParameterInfoOwnedView;
5527        }
5528        impl ::serde::Serialize for FunctionParameterInfoOwnedView {
5529            fn serialize<__S: ::serde::Serializer>(
5530                &self,
5531                __s: __S,
5532            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5533                ::serde::Serialize::serialize(&self.0, __s)
5534            }
5535        }
5536        /// A collection of function parameters.
5537        #[derive(Clone, Debug, Default)]
5538        pub struct FunctionParameterInfosView<'a> {
5539            /// The parameters of the function.
5540            ///
5541            /// Field 1: `parameters`
5542            pub parameters: ::buffa::RepeatedView<
5543                'a,
5544                super::super::__buffa::view::FunctionParameterInfoView<'a>,
5545            >,
5546            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5547        }
5548        impl<'a> FunctionParameterInfosView<'a> {
5549            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5550            ///
5551            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5552            /// and by generated sub-message decode arms with `depth - 1`.
5553            ///
5554            /// **Not part of the public API.** Named with a leading underscore to
5555            /// signal that it is for generated-code use only.
5556            #[doc(hidden)]
5557            pub fn _decode_depth(
5558                buf: &'a [u8],
5559                depth: u32,
5560            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5561                let mut view = Self::default();
5562                view._merge_into_view(buf, depth)?;
5563                ::core::result::Result::Ok(view)
5564            }
5565            /// Merge fields from `buf` into this view (proto merge semantics).
5566            ///
5567            /// Repeated fields append; singular fields last-wins; singular
5568            /// MESSAGE fields merge recursively. Used by sub-message decode
5569            /// arms when the same field appears multiple times on the wire.
5570            ///
5571            /// **Not part of the public API.**
5572            #[doc(hidden)]
5573            pub fn _merge_into_view(
5574                &mut self,
5575                buf: &'a [u8],
5576                depth: u32,
5577            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5578                let _ = depth;
5579                #[allow(unused_variables)]
5580                let view = self;
5581                let mut cur: &'a [u8] = buf;
5582                while !cur.is_empty() {
5583                    let before_tag = cur;
5584                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5585                    match tag.field_number() {
5586                        1u32 => {
5587                            if tag.wire_type()
5588                                != ::buffa::encoding::WireType::LengthDelimited
5589                            {
5590                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5591                                    field_number: 1u32,
5592                                    expected: 2u8,
5593                                    actual: tag.wire_type() as u8,
5594                                });
5595                            }
5596                            if depth == 0 {
5597                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
5598                            }
5599                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5600                            view.parameters
5601                                .push(
5602                                    super::super::__buffa::view::FunctionParameterInfoView::_decode_depth(
5603                                        sub,
5604                                        depth - 1,
5605                                    )?,
5606                                );
5607                        }
5608                        _ => {
5609                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5610                            let span_len = before_tag.len() - cur.len();
5611                            view.__buffa_unknown_fields
5612                                .push_raw(&before_tag[..span_len]);
5613                        }
5614                    }
5615                }
5616                ::core::result::Result::Ok(())
5617            }
5618        }
5619        impl<'a> ::buffa::MessageView<'a> for FunctionParameterInfosView<'a> {
5620            type Owned = super::super::FunctionParameterInfos;
5621            fn decode_view(
5622                buf: &'a [u8],
5623            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5624                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5625            }
5626            fn decode_view_with_limit(
5627                buf: &'a [u8],
5628                depth: u32,
5629            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5630                Self::_decode_depth(buf, depth)
5631            }
5632            fn to_owned_message(&self) -> super::super::FunctionParameterInfos {
5633                self.to_owned_from_source(None)
5634            }
5635            #[allow(clippy::useless_conversion, clippy::needless_update)]
5636            fn to_owned_from_source(
5637                &self,
5638                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5639            ) -> super::super::FunctionParameterInfos {
5640                #[allow(unused_imports)]
5641                use ::buffa::alloc::string::ToString as _;
5642                let _ = __buffa_src;
5643                super::super::FunctionParameterInfos {
5644                    parameters: self
5645                        .parameters
5646                        .iter()
5647                        .map(|v| v.to_owned_from_source(__buffa_src))
5648                        .collect(),
5649                    __buffa_unknown_fields: self
5650                        .__buffa_unknown_fields
5651                        .to_owned()
5652                        .unwrap_or_default()
5653                        .into(),
5654                    ..::core::default::Default::default()
5655                }
5656            }
5657        }
5658        impl<'a> ::buffa::ViewEncode<'a> for FunctionParameterInfosView<'a> {
5659            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5660            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5661                #[allow(unused_imports)]
5662                use ::buffa::Enumeration as _;
5663                let mut size = 0u32;
5664                for v in &self.parameters {
5665                    let __slot = __cache.reserve();
5666                    let inner_size = v.compute_size(__cache);
5667                    __cache.set(__slot, inner_size);
5668                    size
5669                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5670                            + inner_size;
5671                }
5672                size += self.__buffa_unknown_fields.encoded_len() as u32;
5673                size
5674            }
5675            #[allow(clippy::needless_borrow)]
5676            fn write_to(
5677                &self,
5678                __cache: &mut ::buffa::SizeCache,
5679                buf: &mut impl ::buffa::bytes::BufMut,
5680            ) {
5681                #[allow(unused_imports)]
5682                use ::buffa::Enumeration as _;
5683                for v in &self.parameters {
5684                    ::buffa::encoding::Tag::new(
5685                            1u32,
5686                            ::buffa::encoding::WireType::LengthDelimited,
5687                        )
5688                        .encode(buf);
5689                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5690                    v.write_to(__cache, buf);
5691                }
5692                self.__buffa_unknown_fields.write_to(buf);
5693            }
5694        }
5695        /// Serializes this view as protobuf JSON.
5696        ///
5697        /// Implicit-presence fields with default values are omitted, `required`
5698        /// fields are always emitted, explicit-presence (`optional`) fields are
5699        /// emitted only when set, bytes fields are base64-encoded, and enum
5700        /// values are their proto name strings.
5701        ///
5702        /// This impl uses `serialize_map(None)` because the number of emitted
5703        /// fields depends on default-omission rules; serializers that require
5704        /// known map lengths (e.g. `bincode`) will return a runtime error.
5705        /// Use the owned message type for those formats.
5706        impl<'__a> ::serde::Serialize for FunctionParameterInfosView<'__a> {
5707            fn serialize<__S: ::serde::Serializer>(
5708                &self,
5709                __s: __S,
5710            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5711                use ::serde::ser::SerializeMap as _;
5712                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5713                if !self.parameters.is_empty() {
5714                    __map.serialize_entry("parameters", &*self.parameters)?;
5715                }
5716                __map.end()
5717            }
5718        }
5719        impl<'a> ::buffa::MessageName for FunctionParameterInfosView<'a> {
5720            const PACKAGE: &'static str = "unitycatalog.functions.v1";
5721            const NAME: &'static str = "FunctionParameterInfos";
5722            const FULL_NAME: &'static str = "unitycatalog.functions.v1.FunctionParameterInfos";
5723            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.FunctionParameterInfos";
5724        }
5725        impl<'v> ::buffa::DefaultViewInstance for FunctionParameterInfosView<'v> {
5726            fn default_view_instance<'a>() -> &'a Self
5727            where
5728                Self: 'a,
5729            {
5730                static VALUE: ::buffa::__private::OnceBox<
5731                    FunctionParameterInfosView<'static>,
5732                > = ::buffa::__private::OnceBox::new();
5733                VALUE
5734                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5735                        <FunctionParameterInfosView<'static>>::default(),
5736                    ))
5737            }
5738        }
5739        impl ::buffa::ViewReborrow for FunctionParameterInfosView<'static> {
5740            type Reborrowed<'b> = FunctionParameterInfosView<'b>;
5741            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5742                this
5743            }
5744        }
5745        /** Self-contained, `'static` owned view of a `FunctionParameterInfos` message.
5746
5747 Wraps [`::buffa::OwnedView`]`<`[`FunctionParameterInfosView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
5748
5749 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FunctionParameterInfosView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5750        #[derive(Clone, Debug)]
5751        pub struct FunctionParameterInfosOwnedView(
5752            ::buffa::OwnedView<FunctionParameterInfosView<'static>>,
5753        );
5754        impl FunctionParameterInfosOwnedView {
5755            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5756            ///
5757            /// The view borrows directly from the buffer's data; the buffer is
5758            /// retained inside the returned handle.
5759            ///
5760            /// # Errors
5761            ///
5762            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5763            /// protobuf data.
5764            pub fn decode(
5765                bytes: ::buffa::bytes::Bytes,
5766            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5767                ::core::result::Result::Ok(
5768                    FunctionParameterInfosOwnedView(::buffa::OwnedView::decode(bytes)?),
5769                )
5770            }
5771            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5772            /// max message size).
5773            ///
5774            /// # Errors
5775            ///
5776            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5777            /// exceeds the configured limits.
5778            pub fn decode_with_options(
5779                bytes: ::buffa::bytes::Bytes,
5780                opts: &::buffa::DecodeOptions,
5781            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5782                ::core::result::Result::Ok(
5783                    FunctionParameterInfosOwnedView(
5784                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5785                    ),
5786                )
5787            }
5788            /// Build from an owned message via an encode → decode round-trip.
5789            ///
5790            /// # Errors
5791            ///
5792            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5793            /// somehow invalid (should not happen for well-formed messages).
5794            pub fn from_owned(
5795                msg: &super::super::FunctionParameterInfos,
5796            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5797                ::core::result::Result::Ok(
5798                    FunctionParameterInfosOwnedView(::buffa::OwnedView::from_owned(msg)?),
5799                )
5800            }
5801            /// Borrow the full [`FunctionParameterInfosView`] with its lifetime tied to `&self`.
5802            #[must_use]
5803            pub fn view(&self) -> &FunctionParameterInfosView<'_> {
5804                self.0.reborrow()
5805            }
5806            /// Convert to the owned message type.
5807            #[must_use]
5808            pub fn to_owned_message(&self) -> super::super::FunctionParameterInfos {
5809                self.0.to_owned_message()
5810            }
5811            /// The underlying bytes buffer.
5812            #[must_use]
5813            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5814                self.0.bytes()
5815            }
5816            /// Consume the handle, returning the underlying bytes buffer.
5817            #[must_use]
5818            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5819                self.0.into_bytes()
5820            }
5821            /// The parameters of the function.
5822            ///
5823            /// Field 1: `parameters`
5824            #[must_use]
5825            pub fn parameters(
5826                &self,
5827            ) -> &::buffa::RepeatedView<
5828                '_,
5829                super::super::__buffa::view::FunctionParameterInfoView<'_>,
5830            > {
5831                &self.0.reborrow().parameters
5832            }
5833        }
5834        impl ::core::convert::From<
5835            ::buffa::OwnedView<FunctionParameterInfosView<'static>>,
5836        > for FunctionParameterInfosOwnedView {
5837            fn from(
5838                inner: ::buffa::OwnedView<FunctionParameterInfosView<'static>>,
5839            ) -> Self {
5840                FunctionParameterInfosOwnedView(inner)
5841            }
5842        }
5843        impl ::core::convert::From<FunctionParameterInfosOwnedView>
5844        for ::buffa::OwnedView<FunctionParameterInfosView<'static>> {
5845            fn from(wrapper: FunctionParameterInfosOwnedView) -> Self {
5846                wrapper.0
5847            }
5848        }
5849        impl ::core::convert::AsRef<
5850            ::buffa::OwnedView<FunctionParameterInfosView<'static>>,
5851        > for FunctionParameterInfosOwnedView {
5852            fn as_ref(
5853                &self,
5854            ) -> &::buffa::OwnedView<FunctionParameterInfosView<'static>> {
5855                &self.0
5856            }
5857        }
5858        impl ::buffa::HasMessageView for super::super::FunctionParameterInfos {
5859            type View<'a> = FunctionParameterInfosView<'a>;
5860            type ViewHandle = FunctionParameterInfosOwnedView;
5861        }
5862        impl ::serde::Serialize for FunctionParameterInfosOwnedView {
5863            fn serialize<__S: ::serde::Serializer>(
5864                &self,
5865                __s: __S,
5866            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5867                ::serde::Serialize::serialize(&self.0, __s)
5868            }
5869        }
5870        /// The payload for creating a new function.
5871        ///
5872        /// Wrapped in the `function_info` envelope of a `CreateFunctionRequest`, matching
5873        /// the Unity Catalog `POST /functions` wire contract.
5874        #[derive(Clone, Debug, Default)]
5875        pub struct CreateFunctionView<'a> {
5876            /// Name of function, relative to parent schema.
5877            ///
5878            /// Field 1: `name`
5879            pub name: &'a str,
5880            /// Name of parent catalog.
5881            ///
5882            /// Field 2: `catalog_name`
5883            pub catalog_name: &'a str,
5884            /// Name of parent schema.
5885            ///
5886            /// Field 3: `schema_name`
5887            pub schema_name: &'a str,
5888            /// Full data type specification of the return type of the function.
5889            ///
5890            /// Field 4: `data_type`
5891            pub data_type: &'a str,
5892            /// Full data type specification as SQL/catalogString text.
5893            ///
5894            /// Field 5: `full_data_type`
5895            pub full_data_type: &'a str,
5896            /// The array of function parameter infos.
5897            ///
5898            /// Field 6: `input_params`
5899            pub input_params: ::buffa::MessageFieldView<
5900                super::super::__buffa::view::FunctionParameterInfosView<'a>,
5901            >,
5902            /// The parameter-passing style.
5903            ///
5904            /// Field 7: `parameter_style`
5905            pub parameter_style: ::buffa::EnumValue<super::super::ParameterStyle>,
5906            /// Indicates whether the function is deterministic.
5907            ///
5908            /// Field 8: `is_deterministic`
5909            pub is_deterministic: bool,
5910            /// SQL data access information.
5911            ///
5912            /// Field 9: `sql_data_access`
5913            pub sql_data_access: ::buffa::EnumValue<super::super::SqlDataAccess>,
5914            /// Indicates whether the function is null-calling.
5915            ///
5916            /// Field 10: `is_null_call`
5917            pub is_null_call: bool,
5918            /// The security type of the function.
5919            ///
5920            /// Field 11: `security_type`
5921            pub security_type: ::buffa::EnumValue<super::super::SecurityType>,
5922            /// The routine body.
5923            ///
5924            /// Field 12: `routine_body`
5925            pub routine_body: ::buffa::EnumValue<super::super::RoutineBody>,
5926            /// Function body.
5927            ///
5928            /// Field 13: `routine_definition`
5929            pub routine_definition: ::core::option::Option<&'a str>,
5930            /// The language of the function routine body.
5931            ///
5932            /// Field 14: `routine_body_language`
5933            pub routine_body_language: ::core::option::Option<&'a str>,
5934            /// User-provided free-form text description.
5935            ///
5936            /// Field 15: `comment`
5937            pub comment: ::core::option::Option<&'a str>,
5938            /// A map of key-value properties attached to the securable.
5939            ///
5940            /// Field 16: `properties` (map)
5941            pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
5942            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5943        }
5944        impl<'a> CreateFunctionView<'a> {
5945            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5946            ///
5947            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5948            /// and by generated sub-message decode arms with `depth - 1`.
5949            ///
5950            /// **Not part of the public API.** Named with a leading underscore to
5951            /// signal that it is for generated-code use only.
5952            #[doc(hidden)]
5953            pub fn _decode_depth(
5954                buf: &'a [u8],
5955                depth: u32,
5956            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5957                let mut view = Self::default();
5958                view._merge_into_view(buf, depth)?;
5959                ::core::result::Result::Ok(view)
5960            }
5961            /// Merge fields from `buf` into this view (proto merge semantics).
5962            ///
5963            /// Repeated fields append; singular fields last-wins; singular
5964            /// MESSAGE fields merge recursively. Used by sub-message decode
5965            /// arms when the same field appears multiple times on the wire.
5966            ///
5967            /// **Not part of the public API.**
5968            #[doc(hidden)]
5969            pub fn _merge_into_view(
5970                &mut self,
5971                buf: &'a [u8],
5972                depth: u32,
5973            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5974                let _ = depth;
5975                #[allow(unused_variables)]
5976                let view = self;
5977                let mut cur: &'a [u8] = buf;
5978                while !cur.is_empty() {
5979                    let before_tag = cur;
5980                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5981                    match tag.field_number() {
5982                        1u32 => {
5983                            if tag.wire_type()
5984                                != ::buffa::encoding::WireType::LengthDelimited
5985                            {
5986                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5987                                    field_number: 1u32,
5988                                    expected: 2u8,
5989                                    actual: tag.wire_type() as u8,
5990                                });
5991                            }
5992                            view.name = ::buffa::types::borrow_str(&mut cur)?;
5993                        }
5994                        2u32 => {
5995                            if tag.wire_type()
5996                                != ::buffa::encoding::WireType::LengthDelimited
5997                            {
5998                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5999                                    field_number: 2u32,
6000                                    expected: 2u8,
6001                                    actual: tag.wire_type() as u8,
6002                                });
6003                            }
6004                            view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
6005                        }
6006                        3u32 => {
6007                            if tag.wire_type()
6008                                != ::buffa::encoding::WireType::LengthDelimited
6009                            {
6010                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6011                                    field_number: 3u32,
6012                                    expected: 2u8,
6013                                    actual: tag.wire_type() as u8,
6014                                });
6015                            }
6016                            view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
6017                        }
6018                        4u32 => {
6019                            if tag.wire_type()
6020                                != ::buffa::encoding::WireType::LengthDelimited
6021                            {
6022                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6023                                    field_number: 4u32,
6024                                    expected: 2u8,
6025                                    actual: tag.wire_type() as u8,
6026                                });
6027                            }
6028                            view.data_type = ::buffa::types::borrow_str(&mut cur)?;
6029                        }
6030                        5u32 => {
6031                            if tag.wire_type()
6032                                != ::buffa::encoding::WireType::LengthDelimited
6033                            {
6034                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6035                                    field_number: 5u32,
6036                                    expected: 2u8,
6037                                    actual: tag.wire_type() as u8,
6038                                });
6039                            }
6040                            view.full_data_type = ::buffa::types::borrow_str(&mut cur)?;
6041                        }
6042                        6u32 => {
6043                            if tag.wire_type()
6044                                != ::buffa::encoding::WireType::LengthDelimited
6045                            {
6046                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6047                                    field_number: 6u32,
6048                                    expected: 2u8,
6049                                    actual: tag.wire_type() as u8,
6050                                });
6051                            }
6052                            if depth == 0 {
6053                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
6054                            }
6055                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
6056                            match view.input_params.as_mut() {
6057                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
6058                                None => {
6059                                    view.input_params = ::buffa::MessageFieldView::set(
6060                                        super::super::__buffa::view::FunctionParameterInfosView::_decode_depth(
6061                                            sub,
6062                                            depth - 1,
6063                                        )?,
6064                                    );
6065                                }
6066                            }
6067                        }
6068                        7u32 => {
6069                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6070                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6071                                    field_number: 7u32,
6072                                    expected: 0u8,
6073                                    actual: tag.wire_type() as u8,
6074                                });
6075                            }
6076                            view.parameter_style = ::buffa::EnumValue::from(
6077                                ::buffa::types::decode_int32(&mut cur)?,
6078                            );
6079                        }
6080                        8u32 => {
6081                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6082                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6083                                    field_number: 8u32,
6084                                    expected: 0u8,
6085                                    actual: tag.wire_type() as u8,
6086                                });
6087                            }
6088                            view.is_deterministic = ::buffa::types::decode_bool(
6089                                &mut cur,
6090                            )?;
6091                        }
6092                        9u32 => {
6093                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6094                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6095                                    field_number: 9u32,
6096                                    expected: 0u8,
6097                                    actual: tag.wire_type() as u8,
6098                                });
6099                            }
6100                            view.sql_data_access = ::buffa::EnumValue::from(
6101                                ::buffa::types::decode_int32(&mut cur)?,
6102                            );
6103                        }
6104                        10u32 => {
6105                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6106                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6107                                    field_number: 10u32,
6108                                    expected: 0u8,
6109                                    actual: tag.wire_type() as u8,
6110                                });
6111                            }
6112                            view.is_null_call = ::buffa::types::decode_bool(&mut cur)?;
6113                        }
6114                        11u32 => {
6115                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6116                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6117                                    field_number: 11u32,
6118                                    expected: 0u8,
6119                                    actual: tag.wire_type() as u8,
6120                                });
6121                            }
6122                            view.security_type = ::buffa::EnumValue::from(
6123                                ::buffa::types::decode_int32(&mut cur)?,
6124                            );
6125                        }
6126                        12u32 => {
6127                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6128                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6129                                    field_number: 12u32,
6130                                    expected: 0u8,
6131                                    actual: tag.wire_type() as u8,
6132                                });
6133                            }
6134                            view.routine_body = ::buffa::EnumValue::from(
6135                                ::buffa::types::decode_int32(&mut cur)?,
6136                            );
6137                        }
6138                        13u32 => {
6139                            if tag.wire_type()
6140                                != ::buffa::encoding::WireType::LengthDelimited
6141                            {
6142                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6143                                    field_number: 13u32,
6144                                    expected: 2u8,
6145                                    actual: tag.wire_type() as u8,
6146                                });
6147                            }
6148                            view.routine_definition = Some(
6149                                ::buffa::types::borrow_str(&mut cur)?,
6150                            );
6151                        }
6152                        14u32 => {
6153                            if tag.wire_type()
6154                                != ::buffa::encoding::WireType::LengthDelimited
6155                            {
6156                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6157                                    field_number: 14u32,
6158                                    expected: 2u8,
6159                                    actual: tag.wire_type() as u8,
6160                                });
6161                            }
6162                            view.routine_body_language = Some(
6163                                ::buffa::types::borrow_str(&mut cur)?,
6164                            );
6165                        }
6166                        15u32 => {
6167                            if tag.wire_type()
6168                                != ::buffa::encoding::WireType::LengthDelimited
6169                            {
6170                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6171                                    field_number: 15u32,
6172                                    expected: 2u8,
6173                                    actual: tag.wire_type() as u8,
6174                                });
6175                            }
6176                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
6177                        }
6178                        16u32 => {
6179                            if tag.wire_type()
6180                                != ::buffa::encoding::WireType::LengthDelimited
6181                            {
6182                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6183                                    field_number: 16u32,
6184                                    expected: 2u8,
6185                                    actual: tag.wire_type() as u8,
6186                                });
6187                            }
6188                            let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
6189                            let mut entry_cur: &'a [u8] = entry_bytes;
6190                            let mut key = "";
6191                            let mut val = "";
6192                            while !entry_cur.is_empty() {
6193                                let entry_tag = ::buffa::encoding::Tag::decode(
6194                                    &mut entry_cur,
6195                                )?;
6196                                match entry_tag.field_number() {
6197                                    1 => {
6198                                        if entry_tag.wire_type()
6199                                            != ::buffa::encoding::WireType::LengthDelimited
6200                                        {
6201                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6202                                                field_number: entry_tag.field_number(),
6203                                                expected: 2u8,
6204                                                actual: entry_tag.wire_type() as u8,
6205                                            });
6206                                        }
6207                                        key = ::buffa::types::borrow_str(&mut entry_cur)?;
6208                                    }
6209                                    2 => {
6210                                        if entry_tag.wire_type()
6211                                            != ::buffa::encoding::WireType::LengthDelimited
6212                                        {
6213                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6214                                                field_number: entry_tag.field_number(),
6215                                                expected: 2u8,
6216                                                actual: entry_tag.wire_type() as u8,
6217                                            });
6218                                        }
6219                                        val = ::buffa::types::borrow_str(&mut entry_cur)?;
6220                                    }
6221                                    _ => {
6222                                        ::buffa::encoding::skip_field_depth(
6223                                            entry_tag,
6224                                            &mut entry_cur,
6225                                            depth,
6226                                        )?;
6227                                    }
6228                                }
6229                            }
6230                            view.properties.push(key, val);
6231                        }
6232                        _ => {
6233                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6234                            let span_len = before_tag.len() - cur.len();
6235                            view.__buffa_unknown_fields
6236                                .push_raw(&before_tag[..span_len]);
6237                        }
6238                    }
6239                }
6240                ::core::result::Result::Ok(())
6241            }
6242        }
6243        impl<'a> ::buffa::MessageView<'a> for CreateFunctionView<'a> {
6244            type Owned = super::super::CreateFunction;
6245            fn decode_view(
6246                buf: &'a [u8],
6247            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6248                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6249            }
6250            fn decode_view_with_limit(
6251                buf: &'a [u8],
6252                depth: u32,
6253            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6254                Self::_decode_depth(buf, depth)
6255            }
6256            fn to_owned_message(&self) -> super::super::CreateFunction {
6257                self.to_owned_from_source(None)
6258            }
6259            #[allow(clippy::useless_conversion, clippy::needless_update)]
6260            fn to_owned_from_source(
6261                &self,
6262                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6263            ) -> super::super::CreateFunction {
6264                #[allow(unused_imports)]
6265                use ::buffa::alloc::string::ToString as _;
6266                let _ = __buffa_src;
6267                super::super::CreateFunction {
6268                    name: self.name.to_string(),
6269                    catalog_name: self.catalog_name.to_string(),
6270                    schema_name: self.schema_name.to_string(),
6271                    data_type: self.data_type.to_string(),
6272                    full_data_type: self.full_data_type.to_string(),
6273                    input_params: match self.input_params.as_option() {
6274                        Some(v) => {
6275                            ::buffa::MessageField::<
6276                                super::super::FunctionParameterInfos,
6277                            >::some(v.to_owned_from_source(__buffa_src))
6278                        }
6279                        None => ::buffa::MessageField::none(),
6280                    },
6281                    parameter_style: self.parameter_style,
6282                    is_deterministic: self.is_deterministic,
6283                    sql_data_access: self.sql_data_access,
6284                    is_null_call: self.is_null_call,
6285                    security_type: self.security_type,
6286                    routine_body: self.routine_body,
6287                    routine_definition: self.routine_definition.map(|s| s.to_string()),
6288                    routine_body_language: self
6289                        .routine_body_language
6290                        .map(|s| s.to_string()),
6291                    comment: self.comment.map(|s| s.to_string()),
6292                    properties: self
6293                        .properties
6294                        .iter()
6295                        .map(|(k, v)| (k.to_string(), v.to_string()))
6296                        .collect(),
6297                    __buffa_unknown_fields: self
6298                        .__buffa_unknown_fields
6299                        .to_owned()
6300                        .unwrap_or_default()
6301                        .into(),
6302                    ..::core::default::Default::default()
6303                }
6304            }
6305        }
6306        impl<'a> ::buffa::ViewEncode<'a> for CreateFunctionView<'a> {
6307            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6308            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6309                #[allow(unused_imports)]
6310                use ::buffa::Enumeration as _;
6311                let mut size = 0u32;
6312                if !self.name.is_empty() {
6313                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
6314                }
6315                if !self.catalog_name.is_empty() {
6316                    size
6317                        += 1u32
6318                            + ::buffa::types::string_encoded_len(&self.catalog_name)
6319                                as u32;
6320                }
6321                if !self.schema_name.is_empty() {
6322                    size
6323                        += 1u32
6324                            + ::buffa::types::string_encoded_len(&self.schema_name)
6325                                as u32;
6326                }
6327                if !self.data_type.is_empty() {
6328                    size
6329                        += 1u32
6330                            + ::buffa::types::string_encoded_len(&self.data_type) as u32;
6331                }
6332                if !self.full_data_type.is_empty() {
6333                    size
6334                        += 1u32
6335                            + ::buffa::types::string_encoded_len(&self.full_data_type)
6336                                as u32;
6337                }
6338                if self.input_params.is_set() {
6339                    let __slot = __cache.reserve();
6340                    let inner_size = self.input_params.compute_size(__cache);
6341                    __cache.set(__slot, inner_size);
6342                    size
6343                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6344                            + inner_size;
6345                }
6346                {
6347                    let val = self.parameter_style.to_i32();
6348                    if val != 0 {
6349                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6350                    }
6351                }
6352                if self.is_deterministic {
6353                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6354                }
6355                {
6356                    let val = self.sql_data_access.to_i32();
6357                    if val != 0 {
6358                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6359                    }
6360                }
6361                if self.is_null_call {
6362                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6363                }
6364                {
6365                    let val = self.security_type.to_i32();
6366                    if val != 0 {
6367                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6368                    }
6369                }
6370                {
6371                    let val = self.routine_body.to_i32();
6372                    if val != 0 {
6373                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6374                    }
6375                }
6376                if let Some(ref v) = self.routine_definition {
6377                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6378                }
6379                if let Some(ref v) = self.routine_body_language {
6380                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6381                }
6382                if let Some(ref v) = self.comment {
6383                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6384                }
6385                #[allow(clippy::for_kv_map)]
6386                for (k, v) in &self.properties {
6387                    let entry_size: u32 = 1u32
6388                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
6389                        + ::buffa::types::string_encoded_len(v) as u32;
6390                    size
6391                        += 2u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
6392                            + entry_size;
6393                }
6394                size += self.__buffa_unknown_fields.encoded_len() as u32;
6395                size
6396            }
6397            #[allow(clippy::needless_borrow)]
6398            fn write_to(
6399                &self,
6400                __cache: &mut ::buffa::SizeCache,
6401                buf: &mut impl ::buffa::bytes::BufMut,
6402            ) {
6403                #[allow(unused_imports)]
6404                use ::buffa::Enumeration as _;
6405                if !self.name.is_empty() {
6406                    ::buffa::encoding::Tag::new(
6407                            1u32,
6408                            ::buffa::encoding::WireType::LengthDelimited,
6409                        )
6410                        .encode(buf);
6411                    ::buffa::types::encode_string(&self.name, buf);
6412                }
6413                if !self.catalog_name.is_empty() {
6414                    ::buffa::encoding::Tag::new(
6415                            2u32,
6416                            ::buffa::encoding::WireType::LengthDelimited,
6417                        )
6418                        .encode(buf);
6419                    ::buffa::types::encode_string(&self.catalog_name, buf);
6420                }
6421                if !self.schema_name.is_empty() {
6422                    ::buffa::encoding::Tag::new(
6423                            3u32,
6424                            ::buffa::encoding::WireType::LengthDelimited,
6425                        )
6426                        .encode(buf);
6427                    ::buffa::types::encode_string(&self.schema_name, buf);
6428                }
6429                if !self.data_type.is_empty() {
6430                    ::buffa::encoding::Tag::new(
6431                            4u32,
6432                            ::buffa::encoding::WireType::LengthDelimited,
6433                        )
6434                        .encode(buf);
6435                    ::buffa::types::encode_string(&self.data_type, buf);
6436                }
6437                if !self.full_data_type.is_empty() {
6438                    ::buffa::encoding::Tag::new(
6439                            5u32,
6440                            ::buffa::encoding::WireType::LengthDelimited,
6441                        )
6442                        .encode(buf);
6443                    ::buffa::types::encode_string(&self.full_data_type, buf);
6444                }
6445                if self.input_params.is_set() {
6446                    ::buffa::encoding::Tag::new(
6447                            6u32,
6448                            ::buffa::encoding::WireType::LengthDelimited,
6449                        )
6450                        .encode(buf);
6451                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6452                    self.input_params.write_to(__cache, buf);
6453                }
6454                {
6455                    let val = self.parameter_style.to_i32();
6456                    if val != 0 {
6457                        ::buffa::encoding::Tag::new(
6458                                7u32,
6459                                ::buffa::encoding::WireType::Varint,
6460                            )
6461                            .encode(buf);
6462                        ::buffa::types::encode_int32(val, buf);
6463                    }
6464                }
6465                if self.is_deterministic {
6466                    ::buffa::encoding::Tag::new(
6467                            8u32,
6468                            ::buffa::encoding::WireType::Varint,
6469                        )
6470                        .encode(buf);
6471                    ::buffa::types::encode_bool(self.is_deterministic, buf);
6472                }
6473                {
6474                    let val = self.sql_data_access.to_i32();
6475                    if val != 0 {
6476                        ::buffa::encoding::Tag::new(
6477                                9u32,
6478                                ::buffa::encoding::WireType::Varint,
6479                            )
6480                            .encode(buf);
6481                        ::buffa::types::encode_int32(val, buf);
6482                    }
6483                }
6484                if self.is_null_call {
6485                    ::buffa::encoding::Tag::new(
6486                            10u32,
6487                            ::buffa::encoding::WireType::Varint,
6488                        )
6489                        .encode(buf);
6490                    ::buffa::types::encode_bool(self.is_null_call, buf);
6491                }
6492                {
6493                    let val = self.security_type.to_i32();
6494                    if val != 0 {
6495                        ::buffa::encoding::Tag::new(
6496                                11u32,
6497                                ::buffa::encoding::WireType::Varint,
6498                            )
6499                            .encode(buf);
6500                        ::buffa::types::encode_int32(val, buf);
6501                    }
6502                }
6503                {
6504                    let val = self.routine_body.to_i32();
6505                    if val != 0 {
6506                        ::buffa::encoding::Tag::new(
6507                                12u32,
6508                                ::buffa::encoding::WireType::Varint,
6509                            )
6510                            .encode(buf);
6511                        ::buffa::types::encode_int32(val, buf);
6512                    }
6513                }
6514                if let Some(ref v) = self.routine_definition {
6515                    ::buffa::encoding::Tag::new(
6516                            13u32,
6517                            ::buffa::encoding::WireType::LengthDelimited,
6518                        )
6519                        .encode(buf);
6520                    ::buffa::types::encode_string(v, buf);
6521                }
6522                if let Some(ref v) = self.routine_body_language {
6523                    ::buffa::encoding::Tag::new(
6524                            14u32,
6525                            ::buffa::encoding::WireType::LengthDelimited,
6526                        )
6527                        .encode(buf);
6528                    ::buffa::types::encode_string(v, buf);
6529                }
6530                if let Some(ref v) = self.comment {
6531                    ::buffa::encoding::Tag::new(
6532                            15u32,
6533                            ::buffa::encoding::WireType::LengthDelimited,
6534                        )
6535                        .encode(buf);
6536                    ::buffa::types::encode_string(v, buf);
6537                }
6538                for (k, v) in &self.properties {
6539                    let entry_size: u32 = 1u32
6540                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
6541                        + ::buffa::types::string_encoded_len(v) as u32;
6542                    ::buffa::encoding::Tag::new(
6543                            16u32,
6544                            ::buffa::encoding::WireType::LengthDelimited,
6545                        )
6546                        .encode(buf);
6547                    ::buffa::encoding::encode_varint(entry_size as u64, buf);
6548                    ::buffa::encoding::Tag::new(
6549                            1u32,
6550                            ::buffa::encoding::WireType::LengthDelimited,
6551                        )
6552                        .encode(buf);
6553                    ::buffa::types::encode_string(k, buf);
6554                    ::buffa::encoding::Tag::new(
6555                            2u32,
6556                            ::buffa::encoding::WireType::LengthDelimited,
6557                        )
6558                        .encode(buf);
6559                    ::buffa::types::encode_string(v, buf);
6560                }
6561                self.__buffa_unknown_fields.write_to(buf);
6562            }
6563        }
6564        /// Serializes this view as protobuf JSON.
6565        ///
6566        /// Implicit-presence fields with default values are omitted, `required`
6567        /// fields are always emitted, explicit-presence (`optional`) fields are
6568        /// emitted only when set, bytes fields are base64-encoded, and enum
6569        /// values are their proto name strings.
6570        ///
6571        /// This impl uses `serialize_map(None)` because the number of emitted
6572        /// fields depends on default-omission rules; serializers that require
6573        /// known map lengths (e.g. `bincode`) will return a runtime error.
6574        /// Use the owned message type for those formats.
6575        impl<'__a> ::serde::Serialize for CreateFunctionView<'__a> {
6576            fn serialize<__S: ::serde::Serializer>(
6577                &self,
6578                __s: __S,
6579            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6580                use ::serde::ser::SerializeMap as _;
6581                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6582                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
6583                    __map.serialize_entry("name", self.name)?;
6584                }
6585                if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
6586                    __map.serialize_entry("catalog_name", self.catalog_name)?;
6587                }
6588                if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
6589                    __map.serialize_entry("schema_name", self.schema_name)?;
6590                }
6591                if !::buffa::json_helpers::skip_if::is_empty_str(self.data_type) {
6592                    __map.serialize_entry("data_type", self.data_type)?;
6593                }
6594                if !::buffa::json_helpers::skip_if::is_empty_str(self.full_data_type) {
6595                    __map.serialize_entry("full_data_type", self.full_data_type)?;
6596                }
6597                {
6598                    if let ::core::option::Option::Some(__v) = self
6599                        .input_params
6600                        .as_option()
6601                    {
6602                        __map.serialize_entry("input_params", __v)?;
6603                    }
6604                }
6605                if !::buffa::json_helpers::skip_if::is_default_enum_value(
6606                    &self.parameter_style,
6607                ) {
6608                    __map.serialize_entry("parameter_style", &self.parameter_style)?;
6609                }
6610                if self.is_deterministic {
6611                    __map.serialize_entry("is_deterministic", &self.is_deterministic)?;
6612                }
6613                if !::buffa::json_helpers::skip_if::is_default_enum_value(
6614                    &self.sql_data_access,
6615                ) {
6616                    __map.serialize_entry("sql_data_access", &self.sql_data_access)?;
6617                }
6618                if self.is_null_call {
6619                    __map.serialize_entry("is_null_call", &self.is_null_call)?;
6620                }
6621                if !::buffa::json_helpers::skip_if::is_default_enum_value(
6622                    &self.security_type,
6623                ) {
6624                    __map.serialize_entry("security_type", &self.security_type)?;
6625                }
6626                if !::buffa::json_helpers::skip_if::is_default_enum_value(
6627                    &self.routine_body,
6628                ) {
6629                    __map.serialize_entry("routine_body", &self.routine_body)?;
6630                }
6631                if let ::core::option::Option::Some(__v) = self.routine_definition {
6632                    __map.serialize_entry("routine_definition", __v)?;
6633                }
6634                if let ::core::option::Option::Some(__v) = self.routine_body_language {
6635                    __map.serialize_entry("routine_body_language", __v)?;
6636                }
6637                if let ::core::option::Option::Some(__v) = self.comment {
6638                    __map.serialize_entry("comment", __v)?;
6639                }
6640                if !self.properties.is_empty() {
6641                    struct _WM<'__a, '__x>(
6642                        &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
6643                    );
6644                    impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
6645                        fn serialize<__S: ::serde::Serializer>(
6646                            &self,
6647                            __s: __S,
6648                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
6649                            use ::serde::ser::SerializeMap as _;
6650                            let mut __m = __s
6651                                .serialize_map(::core::option::Option::Some(self.0.len()))?;
6652                            for (k, v) in self.0.iter_unique() {
6653                                __m.serialize_entry(k, v)?;
6654                            }
6655                            __m.end()
6656                        }
6657                    }
6658                    __map.serialize_entry("properties", &_WM(&self.properties))?;
6659                }
6660                __map.end()
6661            }
6662        }
6663        impl<'a> ::buffa::MessageName for CreateFunctionView<'a> {
6664            const PACKAGE: &'static str = "unitycatalog.functions.v1";
6665            const NAME: &'static str = "CreateFunction";
6666            const FULL_NAME: &'static str = "unitycatalog.functions.v1.CreateFunction";
6667            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.CreateFunction";
6668        }
6669        impl<'v> ::buffa::DefaultViewInstance for CreateFunctionView<'v> {
6670            fn default_view_instance<'a>() -> &'a Self
6671            where
6672                Self: 'a,
6673            {
6674                static VALUE: ::buffa::__private::OnceBox<CreateFunctionView<'static>> = ::buffa::__private::OnceBox::new();
6675                VALUE
6676                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6677                        <CreateFunctionView<'static>>::default(),
6678                    ))
6679            }
6680        }
6681        impl ::buffa::ViewReborrow for CreateFunctionView<'static> {
6682            type Reborrowed<'b> = CreateFunctionView<'b>;
6683            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6684                this
6685            }
6686        }
6687        /** Self-contained, `'static` owned view of a `CreateFunction` message.
6688
6689 Wraps [`::buffa::OwnedView`]`<`[`CreateFunctionView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
6690
6691 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateFunctionView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6692        #[derive(Clone, Debug)]
6693        pub struct CreateFunctionOwnedView(
6694            ::buffa::OwnedView<CreateFunctionView<'static>>,
6695        );
6696        impl CreateFunctionOwnedView {
6697            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6698            ///
6699            /// The view borrows directly from the buffer's data; the buffer is
6700            /// retained inside the returned handle.
6701            ///
6702            /// # Errors
6703            ///
6704            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6705            /// protobuf data.
6706            pub fn decode(
6707                bytes: ::buffa::bytes::Bytes,
6708            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6709                ::core::result::Result::Ok(
6710                    CreateFunctionOwnedView(::buffa::OwnedView::decode(bytes)?),
6711                )
6712            }
6713            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6714            /// max message size).
6715            ///
6716            /// # Errors
6717            ///
6718            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6719            /// exceeds the configured limits.
6720            pub fn decode_with_options(
6721                bytes: ::buffa::bytes::Bytes,
6722                opts: &::buffa::DecodeOptions,
6723            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6724                ::core::result::Result::Ok(
6725                    CreateFunctionOwnedView(
6726                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6727                    ),
6728                )
6729            }
6730            /// Build from an owned message via an encode → decode round-trip.
6731            ///
6732            /// # Errors
6733            ///
6734            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6735            /// somehow invalid (should not happen for well-formed messages).
6736            pub fn from_owned(
6737                msg: &super::super::CreateFunction,
6738            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6739                ::core::result::Result::Ok(
6740                    CreateFunctionOwnedView(::buffa::OwnedView::from_owned(msg)?),
6741                )
6742            }
6743            /// Borrow the full [`CreateFunctionView`] with its lifetime tied to `&self`.
6744            #[must_use]
6745            pub fn view(&self) -> &CreateFunctionView<'_> {
6746                self.0.reborrow()
6747            }
6748            /// Convert to the owned message type.
6749            #[must_use]
6750            pub fn to_owned_message(&self) -> super::super::CreateFunction {
6751                self.0.to_owned_message()
6752            }
6753            /// The underlying bytes buffer.
6754            #[must_use]
6755            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6756                self.0.bytes()
6757            }
6758            /// Consume the handle, returning the underlying bytes buffer.
6759            #[must_use]
6760            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6761                self.0.into_bytes()
6762            }
6763            /// Name of function, relative to parent schema.
6764            ///
6765            /// Field 1: `name`
6766            #[must_use]
6767            pub fn name(&self) -> &'_ str {
6768                self.0.reborrow().name
6769            }
6770            /// Name of parent catalog.
6771            ///
6772            /// Field 2: `catalog_name`
6773            #[must_use]
6774            pub fn catalog_name(&self) -> &'_ str {
6775                self.0.reborrow().catalog_name
6776            }
6777            /// Name of parent schema.
6778            ///
6779            /// Field 3: `schema_name`
6780            #[must_use]
6781            pub fn schema_name(&self) -> &'_ str {
6782                self.0.reborrow().schema_name
6783            }
6784            /// Full data type specification of the return type of the function.
6785            ///
6786            /// Field 4: `data_type`
6787            #[must_use]
6788            pub fn data_type(&self) -> &'_ str {
6789                self.0.reborrow().data_type
6790            }
6791            /// Full data type specification as SQL/catalogString text.
6792            ///
6793            /// Field 5: `full_data_type`
6794            #[must_use]
6795            pub fn full_data_type(&self) -> &'_ str {
6796                self.0.reborrow().full_data_type
6797            }
6798            /// The array of function parameter infos.
6799            ///
6800            /// Field 6: `input_params`
6801            #[must_use]
6802            pub fn input_params(
6803                &self,
6804            ) -> &::buffa::MessageFieldView<
6805                super::super::__buffa::view::FunctionParameterInfosView<'_>,
6806            > {
6807                &self.0.reborrow().input_params
6808            }
6809            /// The parameter-passing style.
6810            ///
6811            /// Field 7: `parameter_style`
6812            #[must_use]
6813            pub fn parameter_style(
6814                &self,
6815            ) -> ::buffa::EnumValue<super::super::ParameterStyle> {
6816                self.0.reborrow().parameter_style
6817            }
6818            /// Indicates whether the function is deterministic.
6819            ///
6820            /// Field 8: `is_deterministic`
6821            #[must_use]
6822            pub fn is_deterministic(&self) -> bool {
6823                self.0.reborrow().is_deterministic
6824            }
6825            /// SQL data access information.
6826            ///
6827            /// Field 9: `sql_data_access`
6828            #[must_use]
6829            pub fn sql_data_access(
6830                &self,
6831            ) -> ::buffa::EnumValue<super::super::SqlDataAccess> {
6832                self.0.reborrow().sql_data_access
6833            }
6834            /// Indicates whether the function is null-calling.
6835            ///
6836            /// Field 10: `is_null_call`
6837            #[must_use]
6838            pub fn is_null_call(&self) -> bool {
6839                self.0.reborrow().is_null_call
6840            }
6841            /// The security type of the function.
6842            ///
6843            /// Field 11: `security_type`
6844            #[must_use]
6845            pub fn security_type(
6846                &self,
6847            ) -> ::buffa::EnumValue<super::super::SecurityType> {
6848                self.0.reborrow().security_type
6849            }
6850            /// The routine body.
6851            ///
6852            /// Field 12: `routine_body`
6853            #[must_use]
6854            pub fn routine_body(&self) -> ::buffa::EnumValue<super::super::RoutineBody> {
6855                self.0.reborrow().routine_body
6856            }
6857            /// Function body.
6858            ///
6859            /// Field 13: `routine_definition`
6860            #[must_use]
6861            pub fn routine_definition(&self) -> ::core::option::Option<&'_ str> {
6862                self.0.reborrow().routine_definition
6863            }
6864            /// The language of the function routine body.
6865            ///
6866            /// Field 14: `routine_body_language`
6867            #[must_use]
6868            pub fn routine_body_language(&self) -> ::core::option::Option<&'_ str> {
6869                self.0.reborrow().routine_body_language
6870            }
6871            /// User-provided free-form text description.
6872            ///
6873            /// Field 15: `comment`
6874            #[must_use]
6875            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
6876                self.0.reborrow().comment
6877            }
6878            /// A map of key-value properties attached to the securable.
6879            ///
6880            /// Field 16: `properties` (map)
6881            #[must_use]
6882            pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
6883                &self.0.reborrow().properties
6884            }
6885        }
6886        impl ::core::convert::From<::buffa::OwnedView<CreateFunctionView<'static>>>
6887        for CreateFunctionOwnedView {
6888            fn from(inner: ::buffa::OwnedView<CreateFunctionView<'static>>) -> Self {
6889                CreateFunctionOwnedView(inner)
6890            }
6891        }
6892        impl ::core::convert::From<CreateFunctionOwnedView>
6893        for ::buffa::OwnedView<CreateFunctionView<'static>> {
6894            fn from(wrapper: CreateFunctionOwnedView) -> Self {
6895                wrapper.0
6896            }
6897        }
6898        impl ::core::convert::AsRef<::buffa::OwnedView<CreateFunctionView<'static>>>
6899        for CreateFunctionOwnedView {
6900            fn as_ref(&self) -> &::buffa::OwnedView<CreateFunctionView<'static>> {
6901                &self.0
6902            }
6903        }
6904        impl ::buffa::HasMessageView for super::super::CreateFunction {
6905            type View<'a> = CreateFunctionView<'a>;
6906            type ViewHandle = CreateFunctionOwnedView;
6907        }
6908        impl ::serde::Serialize for CreateFunctionOwnedView {
6909            fn serialize<__S: ::serde::Serializer>(
6910                &self,
6911                __s: __S,
6912            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6913                ::serde::Serialize::serialize(&self.0, __s)
6914            }
6915        }
6916        /// A User-Defined Function (UDF) registered under a catalog + schema hierarchy.
6917        #[derive(Clone, Debug, Default)]
6918        pub struct FunctionView<'a> {
6919            /// Name of function, relative to parent schema.
6920            ///
6921            /// Field 1: `name`
6922            pub name: &'a str,
6923            /// Name of parent catalog.
6924            ///
6925            /// Field 2: `catalog_name`
6926            pub catalog_name: &'a str,
6927            /// Name of parent schema.
6928            ///
6929            /// Field 3: `schema_name`
6930            pub schema_name: &'a str,
6931            /// The three-level (fully qualified) name of the function.
6932            ///
6933            /// Format: catalog_name.schema_name.function_name
6934            ///
6935            /// Field 4: `full_name`
6936            pub full_name: &'a str,
6937            /// Full data type specification of the return type of the function.
6938            ///
6939            /// Field 5: `data_type`
6940            pub data_type: &'a str,
6941            /// Full data type specification as SQL/catalogString text.
6942            ///
6943            /// Field 6: `full_data_type`
6944            pub full_data_type: &'a str,
6945            /// The array of function parameter infos.
6946            ///
6947            /// Field 7: `input_params`
6948            pub input_params: ::buffa::MessageFieldView<
6949                super::super::__buffa::view::FunctionParameterInfosView<'a>,
6950            >,
6951            /// The return type of the function in JSON format.
6952            ///
6953            /// Field 8: `return_params`
6954            pub return_params: ::core::option::Option<&'a str>,
6955            /// The language of the function routine body.
6956            ///
6957            /// Field 9: `routine_body_language`
6958            pub routine_body_language: ::core::option::Option<&'a str>,
6959            /// Function body.
6960            ///
6961            /// Field 10: `routine_definition`
6962            pub routine_definition: ::core::option::Option<&'a str>,
6963            /// Function dependencies (in JSON form).
6964            ///
6965            /// Field 11: `routine_dependencies`
6966            pub routine_dependencies: ::core::option::Option<&'a str>,
6967            /// The parameter-passing style.
6968            ///
6969            /// Field 12: `parameter_style`
6970            pub parameter_style: ::buffa::EnumValue<super::super::ParameterStyle>,
6971            /// Indicates whether the function is deterministic.
6972            ///
6973            /// Field 13: `is_deterministic`
6974            pub is_deterministic: bool,
6975            /// SQL data access information.
6976            ///
6977            /// Field 14: `sql_data_access`
6978            pub sql_data_access: ::buffa::EnumValue<super::super::SqlDataAccess>,
6979            /// Indicates whether the function is null-calling.
6980            ///
6981            /// Field 15: `is_null_call`
6982            pub is_null_call: bool,
6983            /// The security type of the function.
6984            ///
6985            /// Field 16: `security_type`
6986            pub security_type: ::buffa::EnumValue<super::super::SecurityType>,
6987            /// The type of the function (SCALAR or TABLE).
6988            ///
6989            /// Field 17: `specific_name`
6990            pub specific_name: ::core::option::Option<&'a str>,
6991            /// The routine body.
6992            ///
6993            /// Field 18: `routine_body`
6994            pub routine_body: ::buffa::EnumValue<super::super::RoutineBody>,
6995            /// User-provided free-form text description.
6996            ///
6997            /// Field 19: `comment`
6998            pub comment: ::core::option::Option<&'a str>,
6999            /// A map of key-value properties attached to the securable.
7000            ///
7001            /// Field 20: `properties` (map)
7002            pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
7003            /// Username of current owner of the function.
7004            ///
7005            /// Field 21: `owner`
7006            pub owner: ::core::option::Option<&'a str>,
7007            /// Unique identifier for the function.
7008            ///
7009            /// Field 22: `function_id`
7010            pub function_id: ::core::option::Option<&'a str>,
7011            /// Time at which this function was created, in epoch milliseconds.
7012            ///
7013            /// Field 1000: `created_at`
7014            pub created_at: ::core::option::Option<i64>,
7015            /// Username of function creator.
7016            ///
7017            /// Field 1001: `created_by`
7018            pub created_by: ::core::option::Option<&'a str>,
7019            /// Time at which this function was last updated, in epoch milliseconds.
7020            ///
7021            /// Field 1002: `updated_at`
7022            pub updated_at: ::core::option::Option<i64>,
7023            /// Username of user who last modified the function.
7024            ///
7025            /// Field 1003: `updated_by`
7026            pub updated_by: ::core::option::Option<&'a str>,
7027            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7028        }
7029        impl<'a> FunctionView<'a> {
7030            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
7031            ///
7032            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
7033            /// and by generated sub-message decode arms with `depth - 1`.
7034            ///
7035            /// **Not part of the public API.** Named with a leading underscore to
7036            /// signal that it is for generated-code use only.
7037            #[doc(hidden)]
7038            pub fn _decode_depth(
7039                buf: &'a [u8],
7040                depth: u32,
7041            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7042                let mut view = Self::default();
7043                view._merge_into_view(buf, depth)?;
7044                ::core::result::Result::Ok(view)
7045            }
7046            /// Merge fields from `buf` into this view (proto merge semantics).
7047            ///
7048            /// Repeated fields append; singular fields last-wins; singular
7049            /// MESSAGE fields merge recursively. Used by sub-message decode
7050            /// arms when the same field appears multiple times on the wire.
7051            ///
7052            /// **Not part of the public API.**
7053            #[doc(hidden)]
7054            pub fn _merge_into_view(
7055                &mut self,
7056                buf: &'a [u8],
7057                depth: u32,
7058            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7059                let _ = depth;
7060                #[allow(unused_variables)]
7061                let view = self;
7062                let mut cur: &'a [u8] = buf;
7063                while !cur.is_empty() {
7064                    let before_tag = cur;
7065                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
7066                    match tag.field_number() {
7067                        1u32 => {
7068                            if tag.wire_type()
7069                                != ::buffa::encoding::WireType::LengthDelimited
7070                            {
7071                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7072                                    field_number: 1u32,
7073                                    expected: 2u8,
7074                                    actual: tag.wire_type() as u8,
7075                                });
7076                            }
7077                            view.name = ::buffa::types::borrow_str(&mut cur)?;
7078                        }
7079                        2u32 => {
7080                            if tag.wire_type()
7081                                != ::buffa::encoding::WireType::LengthDelimited
7082                            {
7083                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7084                                    field_number: 2u32,
7085                                    expected: 2u8,
7086                                    actual: tag.wire_type() as u8,
7087                                });
7088                            }
7089                            view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
7090                        }
7091                        3u32 => {
7092                            if tag.wire_type()
7093                                != ::buffa::encoding::WireType::LengthDelimited
7094                            {
7095                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7096                                    field_number: 3u32,
7097                                    expected: 2u8,
7098                                    actual: tag.wire_type() as u8,
7099                                });
7100                            }
7101                            view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
7102                        }
7103                        4u32 => {
7104                            if tag.wire_type()
7105                                != ::buffa::encoding::WireType::LengthDelimited
7106                            {
7107                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7108                                    field_number: 4u32,
7109                                    expected: 2u8,
7110                                    actual: tag.wire_type() as u8,
7111                                });
7112                            }
7113                            view.full_name = ::buffa::types::borrow_str(&mut cur)?;
7114                        }
7115                        5u32 => {
7116                            if tag.wire_type()
7117                                != ::buffa::encoding::WireType::LengthDelimited
7118                            {
7119                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7120                                    field_number: 5u32,
7121                                    expected: 2u8,
7122                                    actual: tag.wire_type() as u8,
7123                                });
7124                            }
7125                            view.data_type = ::buffa::types::borrow_str(&mut cur)?;
7126                        }
7127                        6u32 => {
7128                            if tag.wire_type()
7129                                != ::buffa::encoding::WireType::LengthDelimited
7130                            {
7131                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7132                                    field_number: 6u32,
7133                                    expected: 2u8,
7134                                    actual: tag.wire_type() as u8,
7135                                });
7136                            }
7137                            view.full_data_type = ::buffa::types::borrow_str(&mut cur)?;
7138                        }
7139                        7u32 => {
7140                            if tag.wire_type()
7141                                != ::buffa::encoding::WireType::LengthDelimited
7142                            {
7143                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7144                                    field_number: 7u32,
7145                                    expected: 2u8,
7146                                    actual: tag.wire_type() as u8,
7147                                });
7148                            }
7149                            if depth == 0 {
7150                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
7151                            }
7152                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7153                            match view.input_params.as_mut() {
7154                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
7155                                None => {
7156                                    view.input_params = ::buffa::MessageFieldView::set(
7157                                        super::super::__buffa::view::FunctionParameterInfosView::_decode_depth(
7158                                            sub,
7159                                            depth - 1,
7160                                        )?,
7161                                    );
7162                                }
7163                            }
7164                        }
7165                        8u32 => {
7166                            if tag.wire_type()
7167                                != ::buffa::encoding::WireType::LengthDelimited
7168                            {
7169                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7170                                    field_number: 8u32,
7171                                    expected: 2u8,
7172                                    actual: tag.wire_type() as u8,
7173                                });
7174                            }
7175                            view.return_params = Some(
7176                                ::buffa::types::borrow_str(&mut cur)?,
7177                            );
7178                        }
7179                        9u32 => {
7180                            if tag.wire_type()
7181                                != ::buffa::encoding::WireType::LengthDelimited
7182                            {
7183                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7184                                    field_number: 9u32,
7185                                    expected: 2u8,
7186                                    actual: tag.wire_type() as u8,
7187                                });
7188                            }
7189                            view.routine_body_language = Some(
7190                                ::buffa::types::borrow_str(&mut cur)?,
7191                            );
7192                        }
7193                        10u32 => {
7194                            if tag.wire_type()
7195                                != ::buffa::encoding::WireType::LengthDelimited
7196                            {
7197                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7198                                    field_number: 10u32,
7199                                    expected: 2u8,
7200                                    actual: tag.wire_type() as u8,
7201                                });
7202                            }
7203                            view.routine_definition = Some(
7204                                ::buffa::types::borrow_str(&mut cur)?,
7205                            );
7206                        }
7207                        11u32 => {
7208                            if tag.wire_type()
7209                                != ::buffa::encoding::WireType::LengthDelimited
7210                            {
7211                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7212                                    field_number: 11u32,
7213                                    expected: 2u8,
7214                                    actual: tag.wire_type() as u8,
7215                                });
7216                            }
7217                            view.routine_dependencies = Some(
7218                                ::buffa::types::borrow_str(&mut cur)?,
7219                            );
7220                        }
7221                        12u32 => {
7222                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7223                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7224                                    field_number: 12u32,
7225                                    expected: 0u8,
7226                                    actual: tag.wire_type() as u8,
7227                                });
7228                            }
7229                            view.parameter_style = ::buffa::EnumValue::from(
7230                                ::buffa::types::decode_int32(&mut cur)?,
7231                            );
7232                        }
7233                        13u32 => {
7234                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7235                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7236                                    field_number: 13u32,
7237                                    expected: 0u8,
7238                                    actual: tag.wire_type() as u8,
7239                                });
7240                            }
7241                            view.is_deterministic = ::buffa::types::decode_bool(
7242                                &mut cur,
7243                            )?;
7244                        }
7245                        14u32 => {
7246                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7247                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7248                                    field_number: 14u32,
7249                                    expected: 0u8,
7250                                    actual: tag.wire_type() as u8,
7251                                });
7252                            }
7253                            view.sql_data_access = ::buffa::EnumValue::from(
7254                                ::buffa::types::decode_int32(&mut cur)?,
7255                            );
7256                        }
7257                        15u32 => {
7258                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7259                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7260                                    field_number: 15u32,
7261                                    expected: 0u8,
7262                                    actual: tag.wire_type() as u8,
7263                                });
7264                            }
7265                            view.is_null_call = ::buffa::types::decode_bool(&mut cur)?;
7266                        }
7267                        16u32 => {
7268                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7269                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7270                                    field_number: 16u32,
7271                                    expected: 0u8,
7272                                    actual: tag.wire_type() as u8,
7273                                });
7274                            }
7275                            view.security_type = ::buffa::EnumValue::from(
7276                                ::buffa::types::decode_int32(&mut cur)?,
7277                            );
7278                        }
7279                        17u32 => {
7280                            if tag.wire_type()
7281                                != ::buffa::encoding::WireType::LengthDelimited
7282                            {
7283                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7284                                    field_number: 17u32,
7285                                    expected: 2u8,
7286                                    actual: tag.wire_type() as u8,
7287                                });
7288                            }
7289                            view.specific_name = Some(
7290                                ::buffa::types::borrow_str(&mut cur)?,
7291                            );
7292                        }
7293                        18u32 => {
7294                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7295                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7296                                    field_number: 18u32,
7297                                    expected: 0u8,
7298                                    actual: tag.wire_type() as u8,
7299                                });
7300                            }
7301                            view.routine_body = ::buffa::EnumValue::from(
7302                                ::buffa::types::decode_int32(&mut cur)?,
7303                            );
7304                        }
7305                        19u32 => {
7306                            if tag.wire_type()
7307                                != ::buffa::encoding::WireType::LengthDelimited
7308                            {
7309                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7310                                    field_number: 19u32,
7311                                    expected: 2u8,
7312                                    actual: tag.wire_type() as u8,
7313                                });
7314                            }
7315                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
7316                        }
7317                        21u32 => {
7318                            if tag.wire_type()
7319                                != ::buffa::encoding::WireType::LengthDelimited
7320                            {
7321                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7322                                    field_number: 21u32,
7323                                    expected: 2u8,
7324                                    actual: tag.wire_type() as u8,
7325                                });
7326                            }
7327                            view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
7328                        }
7329                        22u32 => {
7330                            if tag.wire_type()
7331                                != ::buffa::encoding::WireType::LengthDelimited
7332                            {
7333                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7334                                    field_number: 22u32,
7335                                    expected: 2u8,
7336                                    actual: tag.wire_type() as u8,
7337                                });
7338                            }
7339                            view.function_id = Some(
7340                                ::buffa::types::borrow_str(&mut cur)?,
7341                            );
7342                        }
7343                        1000u32 => {
7344                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7345                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7346                                    field_number: 1000u32,
7347                                    expected: 0u8,
7348                                    actual: tag.wire_type() as u8,
7349                                });
7350                            }
7351                            view.created_at = Some(
7352                                ::buffa::types::decode_int64(&mut cur)?,
7353                            );
7354                        }
7355                        1001u32 => {
7356                            if tag.wire_type()
7357                                != ::buffa::encoding::WireType::LengthDelimited
7358                            {
7359                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7360                                    field_number: 1001u32,
7361                                    expected: 2u8,
7362                                    actual: tag.wire_type() as u8,
7363                                });
7364                            }
7365                            view.created_by = Some(
7366                                ::buffa::types::borrow_str(&mut cur)?,
7367                            );
7368                        }
7369                        1002u32 => {
7370                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7371                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7372                                    field_number: 1002u32,
7373                                    expected: 0u8,
7374                                    actual: tag.wire_type() as u8,
7375                                });
7376                            }
7377                            view.updated_at = Some(
7378                                ::buffa::types::decode_int64(&mut cur)?,
7379                            );
7380                        }
7381                        1003u32 => {
7382                            if tag.wire_type()
7383                                != ::buffa::encoding::WireType::LengthDelimited
7384                            {
7385                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7386                                    field_number: 1003u32,
7387                                    expected: 2u8,
7388                                    actual: tag.wire_type() as u8,
7389                                });
7390                            }
7391                            view.updated_by = Some(
7392                                ::buffa::types::borrow_str(&mut cur)?,
7393                            );
7394                        }
7395                        20u32 => {
7396                            if tag.wire_type()
7397                                != ::buffa::encoding::WireType::LengthDelimited
7398                            {
7399                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7400                                    field_number: 20u32,
7401                                    expected: 2u8,
7402                                    actual: tag.wire_type() as u8,
7403                                });
7404                            }
7405                            let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
7406                            let mut entry_cur: &'a [u8] = entry_bytes;
7407                            let mut key = "";
7408                            let mut val = "";
7409                            while !entry_cur.is_empty() {
7410                                let entry_tag = ::buffa::encoding::Tag::decode(
7411                                    &mut entry_cur,
7412                                )?;
7413                                match entry_tag.field_number() {
7414                                    1 => {
7415                                        if entry_tag.wire_type()
7416                                            != ::buffa::encoding::WireType::LengthDelimited
7417                                        {
7418                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7419                                                field_number: entry_tag.field_number(),
7420                                                expected: 2u8,
7421                                                actual: entry_tag.wire_type() as u8,
7422                                            });
7423                                        }
7424                                        key = ::buffa::types::borrow_str(&mut entry_cur)?;
7425                                    }
7426                                    2 => {
7427                                        if entry_tag.wire_type()
7428                                            != ::buffa::encoding::WireType::LengthDelimited
7429                                        {
7430                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7431                                                field_number: entry_tag.field_number(),
7432                                                expected: 2u8,
7433                                                actual: entry_tag.wire_type() as u8,
7434                                            });
7435                                        }
7436                                        val = ::buffa::types::borrow_str(&mut entry_cur)?;
7437                                    }
7438                                    _ => {
7439                                        ::buffa::encoding::skip_field_depth(
7440                                            entry_tag,
7441                                            &mut entry_cur,
7442                                            depth,
7443                                        )?;
7444                                    }
7445                                }
7446                            }
7447                            view.properties.push(key, val);
7448                        }
7449                        _ => {
7450                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
7451                            let span_len = before_tag.len() - cur.len();
7452                            view.__buffa_unknown_fields
7453                                .push_raw(&before_tag[..span_len]);
7454                        }
7455                    }
7456                }
7457                ::core::result::Result::Ok(())
7458            }
7459        }
7460        impl<'a> ::buffa::MessageView<'a> for FunctionView<'a> {
7461            type Owned = super::super::Function;
7462            fn decode_view(
7463                buf: &'a [u8],
7464            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7465                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
7466            }
7467            fn decode_view_with_limit(
7468                buf: &'a [u8],
7469                depth: u32,
7470            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7471                Self::_decode_depth(buf, depth)
7472            }
7473            fn to_owned_message(&self) -> super::super::Function {
7474                self.to_owned_from_source(None)
7475            }
7476            #[allow(clippy::useless_conversion, clippy::needless_update)]
7477            fn to_owned_from_source(
7478                &self,
7479                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7480            ) -> super::super::Function {
7481                #[allow(unused_imports)]
7482                use ::buffa::alloc::string::ToString as _;
7483                let _ = __buffa_src;
7484                super::super::Function {
7485                    name: self.name.to_string(),
7486                    catalog_name: self.catalog_name.to_string(),
7487                    schema_name: self.schema_name.to_string(),
7488                    full_name: self.full_name.to_string(),
7489                    data_type: self.data_type.to_string(),
7490                    full_data_type: self.full_data_type.to_string(),
7491                    input_params: match self.input_params.as_option() {
7492                        Some(v) => {
7493                            ::buffa::MessageField::<
7494                                super::super::FunctionParameterInfos,
7495                            >::some(v.to_owned_from_source(__buffa_src))
7496                        }
7497                        None => ::buffa::MessageField::none(),
7498                    },
7499                    return_params: self.return_params.map(|s| s.to_string()),
7500                    routine_body_language: self
7501                        .routine_body_language
7502                        .map(|s| s.to_string()),
7503                    routine_definition: self.routine_definition.map(|s| s.to_string()),
7504                    routine_dependencies: self
7505                        .routine_dependencies
7506                        .map(|s| s.to_string()),
7507                    parameter_style: self.parameter_style,
7508                    is_deterministic: self.is_deterministic,
7509                    sql_data_access: self.sql_data_access,
7510                    is_null_call: self.is_null_call,
7511                    security_type: self.security_type,
7512                    specific_name: self.specific_name.map(|s| s.to_string()),
7513                    routine_body: self.routine_body,
7514                    comment: self.comment.map(|s| s.to_string()),
7515                    properties: self
7516                        .properties
7517                        .iter()
7518                        .map(|(k, v)| (k.to_string(), v.to_string()))
7519                        .collect(),
7520                    owner: self.owner.map(|s| s.to_string()),
7521                    function_id: self.function_id.map(|s| s.to_string()),
7522                    created_at: self.created_at,
7523                    created_by: self.created_by.map(|s| s.to_string()),
7524                    updated_at: self.updated_at,
7525                    updated_by: self.updated_by.map(|s| s.to_string()),
7526                    __buffa_unknown_fields: self
7527                        .__buffa_unknown_fields
7528                        .to_owned()
7529                        .unwrap_or_default()
7530                        .into(),
7531                    ..::core::default::Default::default()
7532                }
7533            }
7534        }
7535        impl<'a> ::buffa::ViewEncode<'a> for FunctionView<'a> {
7536            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7537            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7538                #[allow(unused_imports)]
7539                use ::buffa::Enumeration as _;
7540                let mut size = 0u32;
7541                if !self.name.is_empty() {
7542                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
7543                }
7544                if !self.catalog_name.is_empty() {
7545                    size
7546                        += 1u32
7547                            + ::buffa::types::string_encoded_len(&self.catalog_name)
7548                                as u32;
7549                }
7550                if !self.schema_name.is_empty() {
7551                    size
7552                        += 1u32
7553                            + ::buffa::types::string_encoded_len(&self.schema_name)
7554                                as u32;
7555                }
7556                if !self.full_name.is_empty() {
7557                    size
7558                        += 1u32
7559                            + ::buffa::types::string_encoded_len(&self.full_name) as u32;
7560                }
7561                if !self.data_type.is_empty() {
7562                    size
7563                        += 1u32
7564                            + ::buffa::types::string_encoded_len(&self.data_type) as u32;
7565                }
7566                if !self.full_data_type.is_empty() {
7567                    size
7568                        += 1u32
7569                            + ::buffa::types::string_encoded_len(&self.full_data_type)
7570                                as u32;
7571                }
7572                if self.input_params.is_set() {
7573                    let __slot = __cache.reserve();
7574                    let inner_size = self.input_params.compute_size(__cache);
7575                    __cache.set(__slot, inner_size);
7576                    size
7577                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7578                            + inner_size;
7579                }
7580                if let Some(ref v) = self.return_params {
7581                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7582                }
7583                if let Some(ref v) = self.routine_body_language {
7584                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7585                }
7586                if let Some(ref v) = self.routine_definition {
7587                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7588                }
7589                if let Some(ref v) = self.routine_dependencies {
7590                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7591                }
7592                {
7593                    let val = self.parameter_style.to_i32();
7594                    if val != 0 {
7595                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7596                    }
7597                }
7598                if self.is_deterministic {
7599                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7600                }
7601                {
7602                    let val = self.sql_data_access.to_i32();
7603                    if val != 0 {
7604                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7605                    }
7606                }
7607                if self.is_null_call {
7608                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7609                }
7610                {
7611                    let val = self.security_type.to_i32();
7612                    if val != 0 {
7613                        size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
7614                    }
7615                }
7616                if let Some(ref v) = self.specific_name {
7617                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
7618                }
7619                {
7620                    let val = self.routine_body.to_i32();
7621                    if val != 0 {
7622                        size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
7623                    }
7624                }
7625                if let Some(ref v) = self.comment {
7626                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
7627                }
7628                #[allow(clippy::for_kv_map)]
7629                for (k, v) in &self.properties {
7630                    let entry_size: u32 = 1u32
7631                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
7632                        + ::buffa::types::string_encoded_len(v) as u32;
7633                    size
7634                        += 2u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
7635                            + entry_size;
7636                }
7637                if let Some(ref v) = self.owner {
7638                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
7639                }
7640                if let Some(ref v) = self.function_id {
7641                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
7642                }
7643                if let Some(v) = self.created_at {
7644                    size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
7645                }
7646                if let Some(ref v) = self.created_by {
7647                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
7648                }
7649                if let Some(v) = self.updated_at {
7650                    size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
7651                }
7652                if let Some(ref v) = self.updated_by {
7653                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
7654                }
7655                size += self.__buffa_unknown_fields.encoded_len() as u32;
7656                size
7657            }
7658            #[allow(clippy::needless_borrow)]
7659            fn write_to(
7660                &self,
7661                __cache: &mut ::buffa::SizeCache,
7662                buf: &mut impl ::buffa::bytes::BufMut,
7663            ) {
7664                #[allow(unused_imports)]
7665                use ::buffa::Enumeration as _;
7666                if !self.name.is_empty() {
7667                    ::buffa::encoding::Tag::new(
7668                            1u32,
7669                            ::buffa::encoding::WireType::LengthDelimited,
7670                        )
7671                        .encode(buf);
7672                    ::buffa::types::encode_string(&self.name, buf);
7673                }
7674                if !self.catalog_name.is_empty() {
7675                    ::buffa::encoding::Tag::new(
7676                            2u32,
7677                            ::buffa::encoding::WireType::LengthDelimited,
7678                        )
7679                        .encode(buf);
7680                    ::buffa::types::encode_string(&self.catalog_name, buf);
7681                }
7682                if !self.schema_name.is_empty() {
7683                    ::buffa::encoding::Tag::new(
7684                            3u32,
7685                            ::buffa::encoding::WireType::LengthDelimited,
7686                        )
7687                        .encode(buf);
7688                    ::buffa::types::encode_string(&self.schema_name, buf);
7689                }
7690                if !self.full_name.is_empty() {
7691                    ::buffa::encoding::Tag::new(
7692                            4u32,
7693                            ::buffa::encoding::WireType::LengthDelimited,
7694                        )
7695                        .encode(buf);
7696                    ::buffa::types::encode_string(&self.full_name, buf);
7697                }
7698                if !self.data_type.is_empty() {
7699                    ::buffa::encoding::Tag::new(
7700                            5u32,
7701                            ::buffa::encoding::WireType::LengthDelimited,
7702                        )
7703                        .encode(buf);
7704                    ::buffa::types::encode_string(&self.data_type, buf);
7705                }
7706                if !self.full_data_type.is_empty() {
7707                    ::buffa::encoding::Tag::new(
7708                            6u32,
7709                            ::buffa::encoding::WireType::LengthDelimited,
7710                        )
7711                        .encode(buf);
7712                    ::buffa::types::encode_string(&self.full_data_type, buf);
7713                }
7714                if self.input_params.is_set() {
7715                    ::buffa::encoding::Tag::new(
7716                            7u32,
7717                            ::buffa::encoding::WireType::LengthDelimited,
7718                        )
7719                        .encode(buf);
7720                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7721                    self.input_params.write_to(__cache, buf);
7722                }
7723                if let Some(ref v) = self.return_params {
7724                    ::buffa::encoding::Tag::new(
7725                            8u32,
7726                            ::buffa::encoding::WireType::LengthDelimited,
7727                        )
7728                        .encode(buf);
7729                    ::buffa::types::encode_string(v, buf);
7730                }
7731                if let Some(ref v) = self.routine_body_language {
7732                    ::buffa::encoding::Tag::new(
7733                            9u32,
7734                            ::buffa::encoding::WireType::LengthDelimited,
7735                        )
7736                        .encode(buf);
7737                    ::buffa::types::encode_string(v, buf);
7738                }
7739                if let Some(ref v) = self.routine_definition {
7740                    ::buffa::encoding::Tag::new(
7741                            10u32,
7742                            ::buffa::encoding::WireType::LengthDelimited,
7743                        )
7744                        .encode(buf);
7745                    ::buffa::types::encode_string(v, buf);
7746                }
7747                if let Some(ref v) = self.routine_dependencies {
7748                    ::buffa::encoding::Tag::new(
7749                            11u32,
7750                            ::buffa::encoding::WireType::LengthDelimited,
7751                        )
7752                        .encode(buf);
7753                    ::buffa::types::encode_string(v, buf);
7754                }
7755                {
7756                    let val = self.parameter_style.to_i32();
7757                    if val != 0 {
7758                        ::buffa::encoding::Tag::new(
7759                                12u32,
7760                                ::buffa::encoding::WireType::Varint,
7761                            )
7762                            .encode(buf);
7763                        ::buffa::types::encode_int32(val, buf);
7764                    }
7765                }
7766                if self.is_deterministic {
7767                    ::buffa::encoding::Tag::new(
7768                            13u32,
7769                            ::buffa::encoding::WireType::Varint,
7770                        )
7771                        .encode(buf);
7772                    ::buffa::types::encode_bool(self.is_deterministic, buf);
7773                }
7774                {
7775                    let val = self.sql_data_access.to_i32();
7776                    if val != 0 {
7777                        ::buffa::encoding::Tag::new(
7778                                14u32,
7779                                ::buffa::encoding::WireType::Varint,
7780                            )
7781                            .encode(buf);
7782                        ::buffa::types::encode_int32(val, buf);
7783                    }
7784                }
7785                if self.is_null_call {
7786                    ::buffa::encoding::Tag::new(
7787                            15u32,
7788                            ::buffa::encoding::WireType::Varint,
7789                        )
7790                        .encode(buf);
7791                    ::buffa::types::encode_bool(self.is_null_call, buf);
7792                }
7793                {
7794                    let val = self.security_type.to_i32();
7795                    if val != 0 {
7796                        ::buffa::encoding::Tag::new(
7797                                16u32,
7798                                ::buffa::encoding::WireType::Varint,
7799                            )
7800                            .encode(buf);
7801                        ::buffa::types::encode_int32(val, buf);
7802                    }
7803                }
7804                if let Some(ref v) = self.specific_name {
7805                    ::buffa::encoding::Tag::new(
7806                            17u32,
7807                            ::buffa::encoding::WireType::LengthDelimited,
7808                        )
7809                        .encode(buf);
7810                    ::buffa::types::encode_string(v, buf);
7811                }
7812                {
7813                    let val = self.routine_body.to_i32();
7814                    if val != 0 {
7815                        ::buffa::encoding::Tag::new(
7816                                18u32,
7817                                ::buffa::encoding::WireType::Varint,
7818                            )
7819                            .encode(buf);
7820                        ::buffa::types::encode_int32(val, buf);
7821                    }
7822                }
7823                if let Some(ref v) = self.comment {
7824                    ::buffa::encoding::Tag::new(
7825                            19u32,
7826                            ::buffa::encoding::WireType::LengthDelimited,
7827                        )
7828                        .encode(buf);
7829                    ::buffa::types::encode_string(v, buf);
7830                }
7831                for (k, v) in &self.properties {
7832                    let entry_size: u32 = 1u32
7833                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
7834                        + ::buffa::types::string_encoded_len(v) as u32;
7835                    ::buffa::encoding::Tag::new(
7836                            20u32,
7837                            ::buffa::encoding::WireType::LengthDelimited,
7838                        )
7839                        .encode(buf);
7840                    ::buffa::encoding::encode_varint(entry_size as u64, buf);
7841                    ::buffa::encoding::Tag::new(
7842                            1u32,
7843                            ::buffa::encoding::WireType::LengthDelimited,
7844                        )
7845                        .encode(buf);
7846                    ::buffa::types::encode_string(k, buf);
7847                    ::buffa::encoding::Tag::new(
7848                            2u32,
7849                            ::buffa::encoding::WireType::LengthDelimited,
7850                        )
7851                        .encode(buf);
7852                    ::buffa::types::encode_string(v, buf);
7853                }
7854                if let Some(ref v) = self.owner {
7855                    ::buffa::encoding::Tag::new(
7856                            21u32,
7857                            ::buffa::encoding::WireType::LengthDelimited,
7858                        )
7859                        .encode(buf);
7860                    ::buffa::types::encode_string(v, buf);
7861                }
7862                if let Some(ref v) = self.function_id {
7863                    ::buffa::encoding::Tag::new(
7864                            22u32,
7865                            ::buffa::encoding::WireType::LengthDelimited,
7866                        )
7867                        .encode(buf);
7868                    ::buffa::types::encode_string(v, buf);
7869                }
7870                if let Some(v) = self.created_at {
7871                    ::buffa::encoding::Tag::new(
7872                            1000u32,
7873                            ::buffa::encoding::WireType::Varint,
7874                        )
7875                        .encode(buf);
7876                    ::buffa::types::encode_int64(v, buf);
7877                }
7878                if let Some(ref v) = self.created_by {
7879                    ::buffa::encoding::Tag::new(
7880                            1001u32,
7881                            ::buffa::encoding::WireType::LengthDelimited,
7882                        )
7883                        .encode(buf);
7884                    ::buffa::types::encode_string(v, buf);
7885                }
7886                if let Some(v) = self.updated_at {
7887                    ::buffa::encoding::Tag::new(
7888                            1002u32,
7889                            ::buffa::encoding::WireType::Varint,
7890                        )
7891                        .encode(buf);
7892                    ::buffa::types::encode_int64(v, buf);
7893                }
7894                if let Some(ref v) = self.updated_by {
7895                    ::buffa::encoding::Tag::new(
7896                            1003u32,
7897                            ::buffa::encoding::WireType::LengthDelimited,
7898                        )
7899                        .encode(buf);
7900                    ::buffa::types::encode_string(v, buf);
7901                }
7902                self.__buffa_unknown_fields.write_to(buf);
7903            }
7904        }
7905        /// Serializes this view as protobuf JSON.
7906        ///
7907        /// Implicit-presence fields with default values are omitted, `required`
7908        /// fields are always emitted, explicit-presence (`optional`) fields are
7909        /// emitted only when set, bytes fields are base64-encoded, and enum
7910        /// values are their proto name strings.
7911        ///
7912        /// This impl uses `serialize_map(None)` because the number of emitted
7913        /// fields depends on default-omission rules; serializers that require
7914        /// known map lengths (e.g. `bincode`) will return a runtime error.
7915        /// Use the owned message type for those formats.
7916        impl<'__a> ::serde::Serialize for FunctionView<'__a> {
7917            fn serialize<__S: ::serde::Serializer>(
7918                &self,
7919                __s: __S,
7920            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7921                use ::serde::ser::SerializeMap as _;
7922                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7923                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
7924                    __map.serialize_entry("name", self.name)?;
7925                }
7926                if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
7927                    __map.serialize_entry("catalog_name", self.catalog_name)?;
7928                }
7929                if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
7930                    __map.serialize_entry("schema_name", self.schema_name)?;
7931                }
7932                if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
7933                    __map.serialize_entry("full_name", self.full_name)?;
7934                }
7935                if !::buffa::json_helpers::skip_if::is_empty_str(self.data_type) {
7936                    __map.serialize_entry("data_type", self.data_type)?;
7937                }
7938                if !::buffa::json_helpers::skip_if::is_empty_str(self.full_data_type) {
7939                    __map.serialize_entry("full_data_type", self.full_data_type)?;
7940                }
7941                {
7942                    if let ::core::option::Option::Some(__v) = self
7943                        .input_params
7944                        .as_option()
7945                    {
7946                        __map.serialize_entry("input_params", __v)?;
7947                    }
7948                }
7949                if let ::core::option::Option::Some(__v) = self.return_params {
7950                    __map.serialize_entry("return_params", __v)?;
7951                }
7952                if let ::core::option::Option::Some(__v) = self.routine_body_language {
7953                    __map.serialize_entry("routine_body_language", __v)?;
7954                }
7955                if let ::core::option::Option::Some(__v) = self.routine_definition {
7956                    __map.serialize_entry("routine_definition", __v)?;
7957                }
7958                if let ::core::option::Option::Some(__v) = self.routine_dependencies {
7959                    __map.serialize_entry("routine_dependencies", __v)?;
7960                }
7961                if !::buffa::json_helpers::skip_if::is_default_enum_value(
7962                    &self.parameter_style,
7963                ) {
7964                    __map.serialize_entry("parameter_style", &self.parameter_style)?;
7965                }
7966                if self.is_deterministic {
7967                    __map.serialize_entry("is_deterministic", &self.is_deterministic)?;
7968                }
7969                if !::buffa::json_helpers::skip_if::is_default_enum_value(
7970                    &self.sql_data_access,
7971                ) {
7972                    __map.serialize_entry("sql_data_access", &self.sql_data_access)?;
7973                }
7974                if self.is_null_call {
7975                    __map.serialize_entry("is_null_call", &self.is_null_call)?;
7976                }
7977                if !::buffa::json_helpers::skip_if::is_default_enum_value(
7978                    &self.security_type,
7979                ) {
7980                    __map.serialize_entry("security_type", &self.security_type)?;
7981                }
7982                if let ::core::option::Option::Some(__v) = self.specific_name {
7983                    __map.serialize_entry("specific_name", __v)?;
7984                }
7985                if !::buffa::json_helpers::skip_if::is_default_enum_value(
7986                    &self.routine_body,
7987                ) {
7988                    __map.serialize_entry("routine_body", &self.routine_body)?;
7989                }
7990                if let ::core::option::Option::Some(__v) = self.comment {
7991                    __map.serialize_entry("comment", __v)?;
7992                }
7993                if !self.properties.is_empty() {
7994                    struct _WM<'__a, '__x>(
7995                        &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
7996                    );
7997                    impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
7998                        fn serialize<__S: ::serde::Serializer>(
7999                            &self,
8000                            __s: __S,
8001                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
8002                            use ::serde::ser::SerializeMap as _;
8003                            let mut __m = __s
8004                                .serialize_map(::core::option::Option::Some(self.0.len()))?;
8005                            for (k, v) in self.0.iter_unique() {
8006                                __m.serialize_entry(k, v)?;
8007                            }
8008                            __m.end()
8009                        }
8010                    }
8011                    __map.serialize_entry("properties", &_WM(&self.properties))?;
8012                }
8013                if let ::core::option::Option::Some(__v) = self.owner {
8014                    __map.serialize_entry("owner", __v)?;
8015                }
8016                if let ::core::option::Option::Some(__v) = self.function_id {
8017                    __map.serialize_entry("function_id", __v)?;
8018                }
8019                if let ::core::option::Option::Some(__v) = self.created_at {
8020                    struct _W(i64);
8021                    impl ::serde::Serialize for _W {
8022                        fn serialize<__S: ::serde::Serializer>(
8023                            &self,
8024                            __s: __S,
8025                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
8026                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
8027                        }
8028                    }
8029                    __map.serialize_entry("created_at", &_W(__v))?;
8030                }
8031                if let ::core::option::Option::Some(__v) = self.created_by {
8032                    __map.serialize_entry("created_by", __v)?;
8033                }
8034                if let ::core::option::Option::Some(__v) = self.updated_at {
8035                    struct _W(i64);
8036                    impl ::serde::Serialize for _W {
8037                        fn serialize<__S: ::serde::Serializer>(
8038                            &self,
8039                            __s: __S,
8040                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
8041                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
8042                        }
8043                    }
8044                    __map.serialize_entry("updated_at", &_W(__v))?;
8045                }
8046                if let ::core::option::Option::Some(__v) = self.updated_by {
8047                    __map.serialize_entry("updated_by", __v)?;
8048                }
8049                __map.end()
8050            }
8051        }
8052        impl<'a> ::buffa::MessageName for FunctionView<'a> {
8053            const PACKAGE: &'static str = "unitycatalog.functions.v1";
8054            const NAME: &'static str = "Function";
8055            const FULL_NAME: &'static str = "unitycatalog.functions.v1.Function";
8056            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.Function";
8057        }
8058        impl<'v> ::buffa::DefaultViewInstance for FunctionView<'v> {
8059            fn default_view_instance<'a>() -> &'a Self
8060            where
8061                Self: 'a,
8062            {
8063                static VALUE: ::buffa::__private::OnceBox<FunctionView<'static>> = ::buffa::__private::OnceBox::new();
8064                VALUE
8065                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
8066                        <FunctionView<'static>>::default(),
8067                    ))
8068            }
8069        }
8070        impl ::buffa::ViewReborrow for FunctionView<'static> {
8071            type Reborrowed<'b> = FunctionView<'b>;
8072            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
8073                this
8074            }
8075        }
8076        /** Self-contained, `'static` owned view of a `Function` message.
8077
8078 Wraps [`::buffa::OwnedView`]`<`[`FunctionView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
8079
8080 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`FunctionView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8081        #[derive(Clone, Debug)]
8082        pub struct FunctionOwnedView(::buffa::OwnedView<FunctionView<'static>>);
8083        impl FunctionOwnedView {
8084            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8085            ///
8086            /// The view borrows directly from the buffer's data; the buffer is
8087            /// retained inside the returned handle.
8088            ///
8089            /// # Errors
8090            ///
8091            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8092            /// protobuf data.
8093            pub fn decode(
8094                bytes: ::buffa::bytes::Bytes,
8095            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8096                ::core::result::Result::Ok(
8097                    FunctionOwnedView(::buffa::OwnedView::decode(bytes)?),
8098                )
8099            }
8100            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8101            /// max message size).
8102            ///
8103            /// # Errors
8104            ///
8105            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8106            /// exceeds the configured limits.
8107            pub fn decode_with_options(
8108                bytes: ::buffa::bytes::Bytes,
8109                opts: &::buffa::DecodeOptions,
8110            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8111                ::core::result::Result::Ok(
8112                    FunctionOwnedView(
8113                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8114                    ),
8115                )
8116            }
8117            /// Build from an owned message via an encode → decode round-trip.
8118            ///
8119            /// # Errors
8120            ///
8121            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8122            /// somehow invalid (should not happen for well-formed messages).
8123            pub fn from_owned(
8124                msg: &super::super::Function,
8125            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8126                ::core::result::Result::Ok(
8127                    FunctionOwnedView(::buffa::OwnedView::from_owned(msg)?),
8128                )
8129            }
8130            /// Borrow the full [`FunctionView`] with its lifetime tied to `&self`.
8131            #[must_use]
8132            pub fn view(&self) -> &FunctionView<'_> {
8133                self.0.reborrow()
8134            }
8135            /// Convert to the owned message type.
8136            #[must_use]
8137            pub fn to_owned_message(&self) -> super::super::Function {
8138                self.0.to_owned_message()
8139            }
8140            /// The underlying bytes buffer.
8141            #[must_use]
8142            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8143                self.0.bytes()
8144            }
8145            /// Consume the handle, returning the underlying bytes buffer.
8146            #[must_use]
8147            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8148                self.0.into_bytes()
8149            }
8150            /// Name of function, relative to parent schema.
8151            ///
8152            /// Field 1: `name`
8153            #[must_use]
8154            pub fn name(&self) -> &'_ str {
8155                self.0.reborrow().name
8156            }
8157            /// Name of parent catalog.
8158            ///
8159            /// Field 2: `catalog_name`
8160            #[must_use]
8161            pub fn catalog_name(&self) -> &'_ str {
8162                self.0.reborrow().catalog_name
8163            }
8164            /// Name of parent schema.
8165            ///
8166            /// Field 3: `schema_name`
8167            #[must_use]
8168            pub fn schema_name(&self) -> &'_ str {
8169                self.0.reborrow().schema_name
8170            }
8171            /// The three-level (fully qualified) name of the function.
8172            ///
8173            /// Format: catalog_name.schema_name.function_name
8174            ///
8175            /// Field 4: `full_name`
8176            #[must_use]
8177            pub fn full_name(&self) -> &'_ str {
8178                self.0.reborrow().full_name
8179            }
8180            /// Full data type specification of the return type of the function.
8181            ///
8182            /// Field 5: `data_type`
8183            #[must_use]
8184            pub fn data_type(&self) -> &'_ str {
8185                self.0.reborrow().data_type
8186            }
8187            /// Full data type specification as SQL/catalogString text.
8188            ///
8189            /// Field 6: `full_data_type`
8190            #[must_use]
8191            pub fn full_data_type(&self) -> &'_ str {
8192                self.0.reborrow().full_data_type
8193            }
8194            /// The array of function parameter infos.
8195            ///
8196            /// Field 7: `input_params`
8197            #[must_use]
8198            pub fn input_params(
8199                &self,
8200            ) -> &::buffa::MessageFieldView<
8201                super::super::__buffa::view::FunctionParameterInfosView<'_>,
8202            > {
8203                &self.0.reborrow().input_params
8204            }
8205            /// The return type of the function in JSON format.
8206            ///
8207            /// Field 8: `return_params`
8208            #[must_use]
8209            pub fn return_params(&self) -> ::core::option::Option<&'_ str> {
8210                self.0.reborrow().return_params
8211            }
8212            /// The language of the function routine body.
8213            ///
8214            /// Field 9: `routine_body_language`
8215            #[must_use]
8216            pub fn routine_body_language(&self) -> ::core::option::Option<&'_ str> {
8217                self.0.reborrow().routine_body_language
8218            }
8219            /// Function body.
8220            ///
8221            /// Field 10: `routine_definition`
8222            #[must_use]
8223            pub fn routine_definition(&self) -> ::core::option::Option<&'_ str> {
8224                self.0.reborrow().routine_definition
8225            }
8226            /// Function dependencies (in JSON form).
8227            ///
8228            /// Field 11: `routine_dependencies`
8229            #[must_use]
8230            pub fn routine_dependencies(&self) -> ::core::option::Option<&'_ str> {
8231                self.0.reborrow().routine_dependencies
8232            }
8233            /// The parameter-passing style.
8234            ///
8235            /// Field 12: `parameter_style`
8236            #[must_use]
8237            pub fn parameter_style(
8238                &self,
8239            ) -> ::buffa::EnumValue<super::super::ParameterStyle> {
8240                self.0.reborrow().parameter_style
8241            }
8242            /// Indicates whether the function is deterministic.
8243            ///
8244            /// Field 13: `is_deterministic`
8245            #[must_use]
8246            pub fn is_deterministic(&self) -> bool {
8247                self.0.reborrow().is_deterministic
8248            }
8249            /// SQL data access information.
8250            ///
8251            /// Field 14: `sql_data_access`
8252            #[must_use]
8253            pub fn sql_data_access(
8254                &self,
8255            ) -> ::buffa::EnumValue<super::super::SqlDataAccess> {
8256                self.0.reborrow().sql_data_access
8257            }
8258            /// Indicates whether the function is null-calling.
8259            ///
8260            /// Field 15: `is_null_call`
8261            #[must_use]
8262            pub fn is_null_call(&self) -> bool {
8263                self.0.reborrow().is_null_call
8264            }
8265            /// The security type of the function.
8266            ///
8267            /// Field 16: `security_type`
8268            #[must_use]
8269            pub fn security_type(
8270                &self,
8271            ) -> ::buffa::EnumValue<super::super::SecurityType> {
8272                self.0.reborrow().security_type
8273            }
8274            /// The type of the function (SCALAR or TABLE).
8275            ///
8276            /// Field 17: `specific_name`
8277            #[must_use]
8278            pub fn specific_name(&self) -> ::core::option::Option<&'_ str> {
8279                self.0.reborrow().specific_name
8280            }
8281            /// The routine body.
8282            ///
8283            /// Field 18: `routine_body`
8284            #[must_use]
8285            pub fn routine_body(&self) -> ::buffa::EnumValue<super::super::RoutineBody> {
8286                self.0.reborrow().routine_body
8287            }
8288            /// User-provided free-form text description.
8289            ///
8290            /// Field 19: `comment`
8291            #[must_use]
8292            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
8293                self.0.reborrow().comment
8294            }
8295            /// A map of key-value properties attached to the securable.
8296            ///
8297            /// Field 20: `properties` (map)
8298            #[must_use]
8299            pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
8300                &self.0.reborrow().properties
8301            }
8302            /// Username of current owner of the function.
8303            ///
8304            /// Field 21: `owner`
8305            #[must_use]
8306            pub fn owner(&self) -> ::core::option::Option<&'_ str> {
8307                self.0.reborrow().owner
8308            }
8309            /// Unique identifier for the function.
8310            ///
8311            /// Field 22: `function_id`
8312            #[must_use]
8313            pub fn function_id(&self) -> ::core::option::Option<&'_ str> {
8314                self.0.reborrow().function_id
8315            }
8316            /// Time at which this function was created, in epoch milliseconds.
8317            ///
8318            /// Field 1000: `created_at`
8319            #[must_use]
8320            pub fn created_at(&self) -> ::core::option::Option<i64> {
8321                self.0.reborrow().created_at
8322            }
8323            /// Username of function creator.
8324            ///
8325            /// Field 1001: `created_by`
8326            #[must_use]
8327            pub fn created_by(&self) -> ::core::option::Option<&'_ str> {
8328                self.0.reborrow().created_by
8329            }
8330            /// Time at which this function was last updated, in epoch milliseconds.
8331            ///
8332            /// Field 1002: `updated_at`
8333            #[must_use]
8334            pub fn updated_at(&self) -> ::core::option::Option<i64> {
8335                self.0.reborrow().updated_at
8336            }
8337            /// Username of user who last modified the function.
8338            ///
8339            /// Field 1003: `updated_by`
8340            #[must_use]
8341            pub fn updated_by(&self) -> ::core::option::Option<&'_ str> {
8342                self.0.reborrow().updated_by
8343            }
8344        }
8345        impl ::core::convert::From<::buffa::OwnedView<FunctionView<'static>>>
8346        for FunctionOwnedView {
8347            fn from(inner: ::buffa::OwnedView<FunctionView<'static>>) -> Self {
8348                FunctionOwnedView(inner)
8349            }
8350        }
8351        impl ::core::convert::From<FunctionOwnedView>
8352        for ::buffa::OwnedView<FunctionView<'static>> {
8353            fn from(wrapper: FunctionOwnedView) -> Self {
8354                wrapper.0
8355            }
8356        }
8357        impl ::core::convert::AsRef<::buffa::OwnedView<FunctionView<'static>>>
8358        for FunctionOwnedView {
8359            fn as_ref(&self) -> &::buffa::OwnedView<FunctionView<'static>> {
8360                &self.0
8361            }
8362        }
8363        impl ::buffa::HasMessageView for super::super::Function {
8364            type View<'a> = FunctionView<'a>;
8365            type ViewHandle = FunctionOwnedView;
8366        }
8367        impl ::serde::Serialize for FunctionOwnedView {
8368            fn serialize<__S: ::serde::Serializer>(
8369                &self,
8370                __s: __S,
8371            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8372                ::serde::Serialize::serialize(&self.0, __s)
8373            }
8374        }
8375        /// List functions in a schema
8376        #[derive(Clone, Debug, Default)]
8377        pub struct ListFunctionsRequestView<'a> {
8378            /// Name of parent catalog for functions of interest.
8379            ///
8380            /// Field 1: `catalog_name`
8381            pub catalog_name: &'a str,
8382            /// Parent schema of functions.
8383            ///
8384            /// Field 2: `schema_name`
8385            pub schema_name: &'a str,
8386            /// The maximum number of results per page that should be returned.
8387            ///
8388            /// Field 3: `max_results`
8389            pub max_results: ::core::option::Option<i32>,
8390            /// Opaque pagination token to go to next page based on previous query.
8391            ///
8392            /// Field 4: `page_token`
8393            pub page_token: ::core::option::Option<&'a str>,
8394            /// Whether to include functions in the response for which the principal can only access selective metadata for.
8395            ///
8396            /// Field 5: `include_browse`
8397            pub include_browse: ::core::option::Option<bool>,
8398            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8399        }
8400        impl<'a> ListFunctionsRequestView<'a> {
8401            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
8402            ///
8403            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
8404            /// and by generated sub-message decode arms with `depth - 1`.
8405            ///
8406            /// **Not part of the public API.** Named with a leading underscore to
8407            /// signal that it is for generated-code use only.
8408            #[doc(hidden)]
8409            pub fn _decode_depth(
8410                buf: &'a [u8],
8411                depth: u32,
8412            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8413                let mut view = Self::default();
8414                view._merge_into_view(buf, depth)?;
8415                ::core::result::Result::Ok(view)
8416            }
8417            /// Merge fields from `buf` into this view (proto merge semantics).
8418            ///
8419            /// Repeated fields append; singular fields last-wins; singular
8420            /// MESSAGE fields merge recursively. Used by sub-message decode
8421            /// arms when the same field appears multiple times on the wire.
8422            ///
8423            /// **Not part of the public API.**
8424            #[doc(hidden)]
8425            pub fn _merge_into_view(
8426                &mut self,
8427                buf: &'a [u8],
8428                depth: u32,
8429            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8430                let _ = depth;
8431                #[allow(unused_variables)]
8432                let view = self;
8433                let mut cur: &'a [u8] = buf;
8434                while !cur.is_empty() {
8435                    let before_tag = cur;
8436                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8437                    match tag.field_number() {
8438                        1u32 => {
8439                            if tag.wire_type()
8440                                != ::buffa::encoding::WireType::LengthDelimited
8441                            {
8442                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8443                                    field_number: 1u32,
8444                                    expected: 2u8,
8445                                    actual: tag.wire_type() as u8,
8446                                });
8447                            }
8448                            view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
8449                        }
8450                        2u32 => {
8451                            if tag.wire_type()
8452                                != ::buffa::encoding::WireType::LengthDelimited
8453                            {
8454                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8455                                    field_number: 2u32,
8456                                    expected: 2u8,
8457                                    actual: tag.wire_type() as u8,
8458                                });
8459                            }
8460                            view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
8461                        }
8462                        3u32 => {
8463                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8464                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8465                                    field_number: 3u32,
8466                                    expected: 0u8,
8467                                    actual: tag.wire_type() as u8,
8468                                });
8469                            }
8470                            view.max_results = Some(
8471                                ::buffa::types::decode_int32(&mut cur)?,
8472                            );
8473                        }
8474                        4u32 => {
8475                            if tag.wire_type()
8476                                != ::buffa::encoding::WireType::LengthDelimited
8477                            {
8478                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8479                                    field_number: 4u32,
8480                                    expected: 2u8,
8481                                    actual: tag.wire_type() as u8,
8482                                });
8483                            }
8484                            view.page_token = Some(
8485                                ::buffa::types::borrow_str(&mut cur)?,
8486                            );
8487                        }
8488                        5u32 => {
8489                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8490                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8491                                    field_number: 5u32,
8492                                    expected: 0u8,
8493                                    actual: tag.wire_type() as u8,
8494                                });
8495                            }
8496                            view.include_browse = Some(
8497                                ::buffa::types::decode_bool(&mut cur)?,
8498                            );
8499                        }
8500                        _ => {
8501                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
8502                            let span_len = before_tag.len() - cur.len();
8503                            view.__buffa_unknown_fields
8504                                .push_raw(&before_tag[..span_len]);
8505                        }
8506                    }
8507                }
8508                ::core::result::Result::Ok(())
8509            }
8510        }
8511        impl<'a> ::buffa::MessageView<'a> for ListFunctionsRequestView<'a> {
8512            type Owned = super::super::ListFunctionsRequest;
8513            fn decode_view(
8514                buf: &'a [u8],
8515            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8516                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
8517            }
8518            fn decode_view_with_limit(
8519                buf: &'a [u8],
8520                depth: u32,
8521            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8522                Self::_decode_depth(buf, depth)
8523            }
8524            fn to_owned_message(&self) -> super::super::ListFunctionsRequest {
8525                self.to_owned_from_source(None)
8526            }
8527            #[allow(clippy::useless_conversion, clippy::needless_update)]
8528            fn to_owned_from_source(
8529                &self,
8530                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8531            ) -> super::super::ListFunctionsRequest {
8532                #[allow(unused_imports)]
8533                use ::buffa::alloc::string::ToString as _;
8534                let _ = __buffa_src;
8535                super::super::ListFunctionsRequest {
8536                    catalog_name: self.catalog_name.to_string(),
8537                    schema_name: self.schema_name.to_string(),
8538                    max_results: self.max_results,
8539                    page_token: self.page_token.map(|s| s.to_string()),
8540                    include_browse: self.include_browse,
8541                    __buffa_unknown_fields: self
8542                        .__buffa_unknown_fields
8543                        .to_owned()
8544                        .unwrap_or_default()
8545                        .into(),
8546                    ..::core::default::Default::default()
8547                }
8548            }
8549        }
8550        impl<'a> ::buffa::ViewEncode<'a> for ListFunctionsRequestView<'a> {
8551            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8552            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8553                #[allow(unused_imports)]
8554                use ::buffa::Enumeration as _;
8555                let mut size = 0u32;
8556                if !self.catalog_name.is_empty() {
8557                    size
8558                        += 1u32
8559                            + ::buffa::types::string_encoded_len(&self.catalog_name)
8560                                as u32;
8561                }
8562                if !self.schema_name.is_empty() {
8563                    size
8564                        += 1u32
8565                            + ::buffa::types::string_encoded_len(&self.schema_name)
8566                                as u32;
8567                }
8568                if let Some(v) = self.max_results {
8569                    size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
8570                }
8571                if let Some(ref v) = self.page_token {
8572                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8573                }
8574                if self.include_browse.is_some() {
8575                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
8576                }
8577                size += self.__buffa_unknown_fields.encoded_len() as u32;
8578                size
8579            }
8580            #[allow(clippy::needless_borrow)]
8581            fn write_to(
8582                &self,
8583                _cache: &mut ::buffa::SizeCache,
8584                buf: &mut impl ::buffa::bytes::BufMut,
8585            ) {
8586                #[allow(unused_imports)]
8587                use ::buffa::Enumeration as _;
8588                if !self.catalog_name.is_empty() {
8589                    ::buffa::encoding::Tag::new(
8590                            1u32,
8591                            ::buffa::encoding::WireType::LengthDelimited,
8592                        )
8593                        .encode(buf);
8594                    ::buffa::types::encode_string(&self.catalog_name, buf);
8595                }
8596                if !self.schema_name.is_empty() {
8597                    ::buffa::encoding::Tag::new(
8598                            2u32,
8599                            ::buffa::encoding::WireType::LengthDelimited,
8600                        )
8601                        .encode(buf);
8602                    ::buffa::types::encode_string(&self.schema_name, buf);
8603                }
8604                if let Some(v) = self.max_results {
8605                    ::buffa::encoding::Tag::new(
8606                            3u32,
8607                            ::buffa::encoding::WireType::Varint,
8608                        )
8609                        .encode(buf);
8610                    ::buffa::types::encode_int32(v, buf);
8611                }
8612                if let Some(ref v) = self.page_token {
8613                    ::buffa::encoding::Tag::new(
8614                            4u32,
8615                            ::buffa::encoding::WireType::LengthDelimited,
8616                        )
8617                        .encode(buf);
8618                    ::buffa::types::encode_string(v, buf);
8619                }
8620                if let Some(v) = self.include_browse {
8621                    ::buffa::encoding::Tag::new(
8622                            5u32,
8623                            ::buffa::encoding::WireType::Varint,
8624                        )
8625                        .encode(buf);
8626                    ::buffa::types::encode_bool(v, buf);
8627                }
8628                self.__buffa_unknown_fields.write_to(buf);
8629            }
8630        }
8631        /// Serializes this view as protobuf JSON.
8632        ///
8633        /// Implicit-presence fields with default values are omitted, `required`
8634        /// fields are always emitted, explicit-presence (`optional`) fields are
8635        /// emitted only when set, bytes fields are base64-encoded, and enum
8636        /// values are their proto name strings.
8637        ///
8638        /// This impl uses `serialize_map(None)` because the number of emitted
8639        /// fields depends on default-omission rules; serializers that require
8640        /// known map lengths (e.g. `bincode`) will return a runtime error.
8641        /// Use the owned message type for those formats.
8642        impl<'__a> ::serde::Serialize for ListFunctionsRequestView<'__a> {
8643            fn serialize<__S: ::serde::Serializer>(
8644                &self,
8645                __s: __S,
8646            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8647                use ::serde::ser::SerializeMap as _;
8648                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8649                if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
8650                    __map.serialize_entry("catalog_name", self.catalog_name)?;
8651                }
8652                if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
8653                    __map.serialize_entry("schema_name", self.schema_name)?;
8654                }
8655                if let ::core::option::Option::Some(__v) = self.max_results {
8656                    struct _W(i32);
8657                    impl ::serde::Serialize for _W {
8658                        fn serialize<__S: ::serde::Serializer>(
8659                            &self,
8660                            __s: __S,
8661                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
8662                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
8663                        }
8664                    }
8665                    __map.serialize_entry("max_results", &_W(__v))?;
8666                }
8667                if let ::core::option::Option::Some(__v) = self.page_token {
8668                    __map.serialize_entry("page_token", __v)?;
8669                }
8670                if let ::core::option::Option::Some(__v) = self.include_browse {
8671                    __map.serialize_entry("include_browse", &__v)?;
8672                }
8673                __map.end()
8674            }
8675        }
8676        impl<'a> ::buffa::MessageName for ListFunctionsRequestView<'a> {
8677            const PACKAGE: &'static str = "unitycatalog.functions.v1";
8678            const NAME: &'static str = "ListFunctionsRequest";
8679            const FULL_NAME: &'static str = "unitycatalog.functions.v1.ListFunctionsRequest";
8680            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.ListFunctionsRequest";
8681        }
8682        impl<'v> ::buffa::DefaultViewInstance for ListFunctionsRequestView<'v> {
8683            fn default_view_instance<'a>() -> &'a Self
8684            where
8685                Self: 'a,
8686            {
8687                static VALUE: ::buffa::__private::OnceBox<
8688                    ListFunctionsRequestView<'static>,
8689                > = ::buffa::__private::OnceBox::new();
8690                VALUE
8691                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
8692                        <ListFunctionsRequestView<'static>>::default(),
8693                    ))
8694            }
8695        }
8696        impl ::buffa::ViewReborrow for ListFunctionsRequestView<'static> {
8697            type Reborrowed<'b> = ListFunctionsRequestView<'b>;
8698            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
8699                this
8700            }
8701        }
8702        /** Self-contained, `'static` owned view of a `ListFunctionsRequest` message.
8703
8704 Wraps [`::buffa::OwnedView`]`<`[`ListFunctionsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
8705
8706 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListFunctionsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8707        #[derive(Clone, Debug)]
8708        pub struct ListFunctionsRequestOwnedView(
8709            ::buffa::OwnedView<ListFunctionsRequestView<'static>>,
8710        );
8711        impl ListFunctionsRequestOwnedView {
8712            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8713            ///
8714            /// The view borrows directly from the buffer's data; the buffer is
8715            /// retained inside the returned handle.
8716            ///
8717            /// # Errors
8718            ///
8719            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8720            /// protobuf data.
8721            pub fn decode(
8722                bytes: ::buffa::bytes::Bytes,
8723            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8724                ::core::result::Result::Ok(
8725                    ListFunctionsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
8726                )
8727            }
8728            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8729            /// max message size).
8730            ///
8731            /// # Errors
8732            ///
8733            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8734            /// exceeds the configured limits.
8735            pub fn decode_with_options(
8736                bytes: ::buffa::bytes::Bytes,
8737                opts: &::buffa::DecodeOptions,
8738            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8739                ::core::result::Result::Ok(
8740                    ListFunctionsRequestOwnedView(
8741                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8742                    ),
8743                )
8744            }
8745            /// Build from an owned message via an encode → decode round-trip.
8746            ///
8747            /// # Errors
8748            ///
8749            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8750            /// somehow invalid (should not happen for well-formed messages).
8751            pub fn from_owned(
8752                msg: &super::super::ListFunctionsRequest,
8753            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8754                ::core::result::Result::Ok(
8755                    ListFunctionsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
8756                )
8757            }
8758            /// Borrow the full [`ListFunctionsRequestView`] with its lifetime tied to `&self`.
8759            #[must_use]
8760            pub fn view(&self) -> &ListFunctionsRequestView<'_> {
8761                self.0.reborrow()
8762            }
8763            /// Convert to the owned message type.
8764            #[must_use]
8765            pub fn to_owned_message(&self) -> super::super::ListFunctionsRequest {
8766                self.0.to_owned_message()
8767            }
8768            /// The underlying bytes buffer.
8769            #[must_use]
8770            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8771                self.0.bytes()
8772            }
8773            /// Consume the handle, returning the underlying bytes buffer.
8774            #[must_use]
8775            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8776                self.0.into_bytes()
8777            }
8778            /// Name of parent catalog for functions of interest.
8779            ///
8780            /// Field 1: `catalog_name`
8781            #[must_use]
8782            pub fn catalog_name(&self) -> &'_ str {
8783                self.0.reborrow().catalog_name
8784            }
8785            /// Parent schema of functions.
8786            ///
8787            /// Field 2: `schema_name`
8788            #[must_use]
8789            pub fn schema_name(&self) -> &'_ str {
8790                self.0.reborrow().schema_name
8791            }
8792            /// The maximum number of results per page that should be returned.
8793            ///
8794            /// Field 3: `max_results`
8795            #[must_use]
8796            pub fn max_results(&self) -> ::core::option::Option<i32> {
8797                self.0.reborrow().max_results
8798            }
8799            /// Opaque pagination token to go to next page based on previous query.
8800            ///
8801            /// Field 4: `page_token`
8802            #[must_use]
8803            pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
8804                self.0.reborrow().page_token
8805            }
8806            /// Whether to include functions in the response for which the principal can only access selective metadata for.
8807            ///
8808            /// Field 5: `include_browse`
8809            #[must_use]
8810            pub fn include_browse(&self) -> ::core::option::Option<bool> {
8811                self.0.reborrow().include_browse
8812            }
8813        }
8814        impl ::core::convert::From<::buffa::OwnedView<ListFunctionsRequestView<'static>>>
8815        for ListFunctionsRequestOwnedView {
8816            fn from(
8817                inner: ::buffa::OwnedView<ListFunctionsRequestView<'static>>,
8818            ) -> Self {
8819                ListFunctionsRequestOwnedView(inner)
8820            }
8821        }
8822        impl ::core::convert::From<ListFunctionsRequestOwnedView>
8823        for ::buffa::OwnedView<ListFunctionsRequestView<'static>> {
8824            fn from(wrapper: ListFunctionsRequestOwnedView) -> Self {
8825                wrapper.0
8826            }
8827        }
8828        impl ::core::convert::AsRef<
8829            ::buffa::OwnedView<ListFunctionsRequestView<'static>>,
8830        > for ListFunctionsRequestOwnedView {
8831            fn as_ref(&self) -> &::buffa::OwnedView<ListFunctionsRequestView<'static>> {
8832                &self.0
8833            }
8834        }
8835        impl ::buffa::HasMessageView for super::super::ListFunctionsRequest {
8836            type View<'a> = ListFunctionsRequestView<'a>;
8837            type ViewHandle = ListFunctionsRequestOwnedView;
8838        }
8839        impl ::serde::Serialize for ListFunctionsRequestOwnedView {
8840            fn serialize<__S: ::serde::Serializer>(
8841                &self,
8842                __s: __S,
8843            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8844                ::serde::Serialize::serialize(&self.0, __s)
8845            }
8846        }
8847        /// List functions response.
8848        #[derive(Clone, Debug, Default)]
8849        pub struct ListFunctionsResponseView<'a> {
8850            /// The functions returned.
8851            ///
8852            /// Field 1: `functions`
8853            pub functions: ::buffa::RepeatedView<
8854                'a,
8855                super::super::__buffa::view::FunctionView<'a>,
8856            >,
8857            /// The next_page_token value to include in the next List request.
8858            ///
8859            /// Field 2: `next_page_token`
8860            pub next_page_token: ::core::option::Option<&'a str>,
8861            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8862        }
8863        impl<'a> ListFunctionsResponseView<'a> {
8864            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
8865            ///
8866            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
8867            /// and by generated sub-message decode arms with `depth - 1`.
8868            ///
8869            /// **Not part of the public API.** Named with a leading underscore to
8870            /// signal that it is for generated-code use only.
8871            #[doc(hidden)]
8872            pub fn _decode_depth(
8873                buf: &'a [u8],
8874                depth: u32,
8875            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8876                let mut view = Self::default();
8877                view._merge_into_view(buf, depth)?;
8878                ::core::result::Result::Ok(view)
8879            }
8880            /// Merge fields from `buf` into this view (proto merge semantics).
8881            ///
8882            /// Repeated fields append; singular fields last-wins; singular
8883            /// MESSAGE fields merge recursively. Used by sub-message decode
8884            /// arms when the same field appears multiple times on the wire.
8885            ///
8886            /// **Not part of the public API.**
8887            #[doc(hidden)]
8888            pub fn _merge_into_view(
8889                &mut self,
8890                buf: &'a [u8],
8891                depth: u32,
8892            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8893                let _ = depth;
8894                #[allow(unused_variables)]
8895                let view = self;
8896                let mut cur: &'a [u8] = buf;
8897                while !cur.is_empty() {
8898                    let before_tag = cur;
8899                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8900                    match tag.field_number() {
8901                        2u32 => {
8902                            if tag.wire_type()
8903                                != ::buffa::encoding::WireType::LengthDelimited
8904                            {
8905                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8906                                    field_number: 2u32,
8907                                    expected: 2u8,
8908                                    actual: tag.wire_type() as u8,
8909                                });
8910                            }
8911                            view.next_page_token = Some(
8912                                ::buffa::types::borrow_str(&mut cur)?,
8913                            );
8914                        }
8915                        1u32 => {
8916                            if tag.wire_type()
8917                                != ::buffa::encoding::WireType::LengthDelimited
8918                            {
8919                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8920                                    field_number: 1u32,
8921                                    expected: 2u8,
8922                                    actual: tag.wire_type() as u8,
8923                                });
8924                            }
8925                            if depth == 0 {
8926                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
8927                            }
8928                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8929                            view.functions
8930                                .push(
8931                                    super::super::__buffa::view::FunctionView::_decode_depth(
8932                                        sub,
8933                                        depth - 1,
8934                                    )?,
8935                                );
8936                        }
8937                        _ => {
8938                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
8939                            let span_len = before_tag.len() - cur.len();
8940                            view.__buffa_unknown_fields
8941                                .push_raw(&before_tag[..span_len]);
8942                        }
8943                    }
8944                }
8945                ::core::result::Result::Ok(())
8946            }
8947        }
8948        impl<'a> ::buffa::MessageView<'a> for ListFunctionsResponseView<'a> {
8949            type Owned = super::super::ListFunctionsResponse;
8950            fn decode_view(
8951                buf: &'a [u8],
8952            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8953                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
8954            }
8955            fn decode_view_with_limit(
8956                buf: &'a [u8],
8957                depth: u32,
8958            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8959                Self::_decode_depth(buf, depth)
8960            }
8961            fn to_owned_message(&self) -> super::super::ListFunctionsResponse {
8962                self.to_owned_from_source(None)
8963            }
8964            #[allow(clippy::useless_conversion, clippy::needless_update)]
8965            fn to_owned_from_source(
8966                &self,
8967                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8968            ) -> super::super::ListFunctionsResponse {
8969                #[allow(unused_imports)]
8970                use ::buffa::alloc::string::ToString as _;
8971                let _ = __buffa_src;
8972                super::super::ListFunctionsResponse {
8973                    functions: self
8974                        .functions
8975                        .iter()
8976                        .map(|v| v.to_owned_from_source(__buffa_src))
8977                        .collect(),
8978                    next_page_token: self.next_page_token.map(|s| s.to_string()),
8979                    __buffa_unknown_fields: self
8980                        .__buffa_unknown_fields
8981                        .to_owned()
8982                        .unwrap_or_default()
8983                        .into(),
8984                    ..::core::default::Default::default()
8985                }
8986            }
8987        }
8988        impl<'a> ::buffa::ViewEncode<'a> for ListFunctionsResponseView<'a> {
8989            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8990            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8991                #[allow(unused_imports)]
8992                use ::buffa::Enumeration as _;
8993                let mut size = 0u32;
8994                for v in &self.functions {
8995                    let __slot = __cache.reserve();
8996                    let inner_size = v.compute_size(__cache);
8997                    __cache.set(__slot, inner_size);
8998                    size
8999                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9000                            + inner_size;
9001                }
9002                if let Some(ref v) = self.next_page_token {
9003                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9004                }
9005                size += self.__buffa_unknown_fields.encoded_len() as u32;
9006                size
9007            }
9008            #[allow(clippy::needless_borrow)]
9009            fn write_to(
9010                &self,
9011                __cache: &mut ::buffa::SizeCache,
9012                buf: &mut impl ::buffa::bytes::BufMut,
9013            ) {
9014                #[allow(unused_imports)]
9015                use ::buffa::Enumeration as _;
9016                for v in &self.functions {
9017                    ::buffa::encoding::Tag::new(
9018                            1u32,
9019                            ::buffa::encoding::WireType::LengthDelimited,
9020                        )
9021                        .encode(buf);
9022                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9023                    v.write_to(__cache, buf);
9024                }
9025                if let Some(ref v) = self.next_page_token {
9026                    ::buffa::encoding::Tag::new(
9027                            2u32,
9028                            ::buffa::encoding::WireType::LengthDelimited,
9029                        )
9030                        .encode(buf);
9031                    ::buffa::types::encode_string(v, buf);
9032                }
9033                self.__buffa_unknown_fields.write_to(buf);
9034            }
9035        }
9036        /// Serializes this view as protobuf JSON.
9037        ///
9038        /// Implicit-presence fields with default values are omitted, `required`
9039        /// fields are always emitted, explicit-presence (`optional`) fields are
9040        /// emitted only when set, bytes fields are base64-encoded, and enum
9041        /// values are their proto name strings.
9042        ///
9043        /// This impl uses `serialize_map(None)` because the number of emitted
9044        /// fields depends on default-omission rules; serializers that require
9045        /// known map lengths (e.g. `bincode`) will return a runtime error.
9046        /// Use the owned message type for those formats.
9047        impl<'__a> ::serde::Serialize for ListFunctionsResponseView<'__a> {
9048            fn serialize<__S: ::serde::Serializer>(
9049                &self,
9050                __s: __S,
9051            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9052                use ::serde::ser::SerializeMap as _;
9053                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9054                if !self.functions.is_empty() {
9055                    __map.serialize_entry("functions", &*self.functions)?;
9056                }
9057                if let ::core::option::Option::Some(__v) = self.next_page_token {
9058                    __map.serialize_entry("next_page_token", __v)?;
9059                }
9060                __map.end()
9061            }
9062        }
9063        impl<'a> ::buffa::MessageName for ListFunctionsResponseView<'a> {
9064            const PACKAGE: &'static str = "unitycatalog.functions.v1";
9065            const NAME: &'static str = "ListFunctionsResponse";
9066            const FULL_NAME: &'static str = "unitycatalog.functions.v1.ListFunctionsResponse";
9067            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.ListFunctionsResponse";
9068        }
9069        impl<'v> ::buffa::DefaultViewInstance for ListFunctionsResponseView<'v> {
9070            fn default_view_instance<'a>() -> &'a Self
9071            where
9072                Self: 'a,
9073            {
9074                static VALUE: ::buffa::__private::OnceBox<
9075                    ListFunctionsResponseView<'static>,
9076                > = ::buffa::__private::OnceBox::new();
9077                VALUE
9078                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9079                        <ListFunctionsResponseView<'static>>::default(),
9080                    ))
9081            }
9082        }
9083        impl ::buffa::ViewReborrow for ListFunctionsResponseView<'static> {
9084            type Reborrowed<'b> = ListFunctionsResponseView<'b>;
9085            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9086                this
9087            }
9088        }
9089        /** Self-contained, `'static` owned view of a `ListFunctionsResponse` message.
9090
9091 Wraps [`::buffa::OwnedView`]`<`[`ListFunctionsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
9092
9093 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListFunctionsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9094        #[derive(Clone, Debug)]
9095        pub struct ListFunctionsResponseOwnedView(
9096            ::buffa::OwnedView<ListFunctionsResponseView<'static>>,
9097        );
9098        impl ListFunctionsResponseOwnedView {
9099            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9100            ///
9101            /// The view borrows directly from the buffer's data; the buffer is
9102            /// retained inside the returned handle.
9103            ///
9104            /// # Errors
9105            ///
9106            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9107            /// protobuf data.
9108            pub fn decode(
9109                bytes: ::buffa::bytes::Bytes,
9110            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9111                ::core::result::Result::Ok(
9112                    ListFunctionsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
9113                )
9114            }
9115            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9116            /// max message size).
9117            ///
9118            /// # Errors
9119            ///
9120            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9121            /// exceeds the configured limits.
9122            pub fn decode_with_options(
9123                bytes: ::buffa::bytes::Bytes,
9124                opts: &::buffa::DecodeOptions,
9125            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9126                ::core::result::Result::Ok(
9127                    ListFunctionsResponseOwnedView(
9128                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9129                    ),
9130                )
9131            }
9132            /// Build from an owned message via an encode → decode round-trip.
9133            ///
9134            /// # Errors
9135            ///
9136            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9137            /// somehow invalid (should not happen for well-formed messages).
9138            pub fn from_owned(
9139                msg: &super::super::ListFunctionsResponse,
9140            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9141                ::core::result::Result::Ok(
9142                    ListFunctionsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
9143                )
9144            }
9145            /// Borrow the full [`ListFunctionsResponseView`] with its lifetime tied to `&self`.
9146            #[must_use]
9147            pub fn view(&self) -> &ListFunctionsResponseView<'_> {
9148                self.0.reborrow()
9149            }
9150            /// Convert to the owned message type.
9151            #[must_use]
9152            pub fn to_owned_message(&self) -> super::super::ListFunctionsResponse {
9153                self.0.to_owned_message()
9154            }
9155            /// The underlying bytes buffer.
9156            #[must_use]
9157            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9158                self.0.bytes()
9159            }
9160            /// Consume the handle, returning the underlying bytes buffer.
9161            #[must_use]
9162            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9163                self.0.into_bytes()
9164            }
9165            /// The functions returned.
9166            ///
9167            /// Field 1: `functions`
9168            #[must_use]
9169            pub fn functions(
9170                &self,
9171            ) -> &::buffa::RepeatedView<
9172                '_,
9173                super::super::__buffa::view::FunctionView<'_>,
9174            > {
9175                &self.0.reborrow().functions
9176            }
9177            /// The next_page_token value to include in the next List request.
9178            ///
9179            /// Field 2: `next_page_token`
9180            #[must_use]
9181            pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
9182                self.0.reborrow().next_page_token
9183            }
9184        }
9185        impl ::core::convert::From<
9186            ::buffa::OwnedView<ListFunctionsResponseView<'static>>,
9187        > for ListFunctionsResponseOwnedView {
9188            fn from(
9189                inner: ::buffa::OwnedView<ListFunctionsResponseView<'static>>,
9190            ) -> Self {
9191                ListFunctionsResponseOwnedView(inner)
9192            }
9193        }
9194        impl ::core::convert::From<ListFunctionsResponseOwnedView>
9195        for ::buffa::OwnedView<ListFunctionsResponseView<'static>> {
9196            fn from(wrapper: ListFunctionsResponseOwnedView) -> Self {
9197                wrapper.0
9198            }
9199        }
9200        impl ::core::convert::AsRef<
9201            ::buffa::OwnedView<ListFunctionsResponseView<'static>>,
9202        > for ListFunctionsResponseOwnedView {
9203            fn as_ref(&self) -> &::buffa::OwnedView<ListFunctionsResponseView<'static>> {
9204                &self.0
9205            }
9206        }
9207        impl ::buffa::HasMessageView for super::super::ListFunctionsResponse {
9208            type View<'a> = ListFunctionsResponseView<'a>;
9209            type ViewHandle = ListFunctionsResponseOwnedView;
9210        }
9211        impl ::serde::Serialize for ListFunctionsResponseOwnedView {
9212            fn serialize<__S: ::serde::Serializer>(
9213                &self,
9214                __s: __S,
9215            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9216                ::serde::Serialize::serialize(&self.0, __s)
9217            }
9218        }
9219        /// Create a new function
9220        #[derive(Clone, Debug, Default)]
9221        pub struct CreateFunctionRequestView<'a> {
9222            /// The function to create.
9223            ///
9224            /// Field 1: `function_info`
9225            pub function_info: ::buffa::MessageFieldView<
9226                super::super::__buffa::view::CreateFunctionView<'a>,
9227            >,
9228            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9229        }
9230        impl<'a> CreateFunctionRequestView<'a> {
9231            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9232            ///
9233            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9234            /// and by generated sub-message decode arms with `depth - 1`.
9235            ///
9236            /// **Not part of the public API.** Named with a leading underscore to
9237            /// signal that it is for generated-code use only.
9238            #[doc(hidden)]
9239            pub fn _decode_depth(
9240                buf: &'a [u8],
9241                depth: u32,
9242            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9243                let mut view = Self::default();
9244                view._merge_into_view(buf, depth)?;
9245                ::core::result::Result::Ok(view)
9246            }
9247            /// Merge fields from `buf` into this view (proto merge semantics).
9248            ///
9249            /// Repeated fields append; singular fields last-wins; singular
9250            /// MESSAGE fields merge recursively. Used by sub-message decode
9251            /// arms when the same field appears multiple times on the wire.
9252            ///
9253            /// **Not part of the public API.**
9254            #[doc(hidden)]
9255            pub fn _merge_into_view(
9256                &mut self,
9257                buf: &'a [u8],
9258                depth: u32,
9259            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9260                let _ = depth;
9261                #[allow(unused_variables)]
9262                let view = self;
9263                let mut cur: &'a [u8] = buf;
9264                while !cur.is_empty() {
9265                    let before_tag = cur;
9266                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9267                    match tag.field_number() {
9268                        1u32 => {
9269                            if tag.wire_type()
9270                                != ::buffa::encoding::WireType::LengthDelimited
9271                            {
9272                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9273                                    field_number: 1u32,
9274                                    expected: 2u8,
9275                                    actual: tag.wire_type() as u8,
9276                                });
9277                            }
9278                            if depth == 0 {
9279                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
9280                            }
9281                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9282                            match view.function_info.as_mut() {
9283                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
9284                                None => {
9285                                    view.function_info = ::buffa::MessageFieldView::set(
9286                                        super::super::__buffa::view::CreateFunctionView::_decode_depth(
9287                                            sub,
9288                                            depth - 1,
9289                                        )?,
9290                                    );
9291                                }
9292                            }
9293                        }
9294                        _ => {
9295                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9296                            let span_len = before_tag.len() - cur.len();
9297                            view.__buffa_unknown_fields
9298                                .push_raw(&before_tag[..span_len]);
9299                        }
9300                    }
9301                }
9302                ::core::result::Result::Ok(())
9303            }
9304        }
9305        impl<'a> ::buffa::MessageView<'a> for CreateFunctionRequestView<'a> {
9306            type Owned = super::super::CreateFunctionRequest;
9307            fn decode_view(
9308                buf: &'a [u8],
9309            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9310                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9311            }
9312            fn decode_view_with_limit(
9313                buf: &'a [u8],
9314                depth: u32,
9315            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9316                Self::_decode_depth(buf, depth)
9317            }
9318            fn to_owned_message(&self) -> super::super::CreateFunctionRequest {
9319                self.to_owned_from_source(None)
9320            }
9321            #[allow(clippy::useless_conversion, clippy::needless_update)]
9322            fn to_owned_from_source(
9323                &self,
9324                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9325            ) -> super::super::CreateFunctionRequest {
9326                #[allow(unused_imports)]
9327                use ::buffa::alloc::string::ToString as _;
9328                let _ = __buffa_src;
9329                super::super::CreateFunctionRequest {
9330                    function_info: match self.function_info.as_option() {
9331                        Some(v) => {
9332                            ::buffa::MessageField::<
9333                                super::super::CreateFunction,
9334                            >::some(v.to_owned_from_source(__buffa_src))
9335                        }
9336                        None => ::buffa::MessageField::none(),
9337                    },
9338                    __buffa_unknown_fields: self
9339                        .__buffa_unknown_fields
9340                        .to_owned()
9341                        .unwrap_or_default()
9342                        .into(),
9343                    ..::core::default::Default::default()
9344                }
9345            }
9346        }
9347        impl<'a> ::buffa::ViewEncode<'a> for CreateFunctionRequestView<'a> {
9348            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9349            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9350                #[allow(unused_imports)]
9351                use ::buffa::Enumeration as _;
9352                let mut size = 0u32;
9353                if self.function_info.is_set() {
9354                    let __slot = __cache.reserve();
9355                    let inner_size = self.function_info.compute_size(__cache);
9356                    __cache.set(__slot, inner_size);
9357                    size
9358                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9359                            + inner_size;
9360                }
9361                size += self.__buffa_unknown_fields.encoded_len() as u32;
9362                size
9363            }
9364            #[allow(clippy::needless_borrow)]
9365            fn write_to(
9366                &self,
9367                __cache: &mut ::buffa::SizeCache,
9368                buf: &mut impl ::buffa::bytes::BufMut,
9369            ) {
9370                #[allow(unused_imports)]
9371                use ::buffa::Enumeration as _;
9372                if self.function_info.is_set() {
9373                    ::buffa::encoding::Tag::new(
9374                            1u32,
9375                            ::buffa::encoding::WireType::LengthDelimited,
9376                        )
9377                        .encode(buf);
9378                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9379                    self.function_info.write_to(__cache, buf);
9380                }
9381                self.__buffa_unknown_fields.write_to(buf);
9382            }
9383        }
9384        /// Serializes this view as protobuf JSON.
9385        ///
9386        /// Implicit-presence fields with default values are omitted, `required`
9387        /// fields are always emitted, explicit-presence (`optional`) fields are
9388        /// emitted only when set, bytes fields are base64-encoded, and enum
9389        /// values are their proto name strings.
9390        ///
9391        /// This impl uses `serialize_map(None)` because the number of emitted
9392        /// fields depends on default-omission rules; serializers that require
9393        /// known map lengths (e.g. `bincode`) will return a runtime error.
9394        /// Use the owned message type for those formats.
9395        impl<'__a> ::serde::Serialize for CreateFunctionRequestView<'__a> {
9396            fn serialize<__S: ::serde::Serializer>(
9397                &self,
9398                __s: __S,
9399            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9400                use ::serde::ser::SerializeMap as _;
9401                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9402                {
9403                    if let ::core::option::Option::Some(__v) = self
9404                        .function_info
9405                        .as_option()
9406                    {
9407                        __map.serialize_entry("function_info", __v)?;
9408                    }
9409                }
9410                __map.end()
9411            }
9412        }
9413        impl<'a> ::buffa::MessageName for CreateFunctionRequestView<'a> {
9414            const PACKAGE: &'static str = "unitycatalog.functions.v1";
9415            const NAME: &'static str = "CreateFunctionRequest";
9416            const FULL_NAME: &'static str = "unitycatalog.functions.v1.CreateFunctionRequest";
9417            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.CreateFunctionRequest";
9418        }
9419        impl<'v> ::buffa::DefaultViewInstance for CreateFunctionRequestView<'v> {
9420            fn default_view_instance<'a>() -> &'a Self
9421            where
9422                Self: 'a,
9423            {
9424                static VALUE: ::buffa::__private::OnceBox<
9425                    CreateFunctionRequestView<'static>,
9426                > = ::buffa::__private::OnceBox::new();
9427                VALUE
9428                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9429                        <CreateFunctionRequestView<'static>>::default(),
9430                    ))
9431            }
9432        }
9433        impl ::buffa::ViewReborrow for CreateFunctionRequestView<'static> {
9434            type Reborrowed<'b> = CreateFunctionRequestView<'b>;
9435            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9436                this
9437            }
9438        }
9439        /** Self-contained, `'static` owned view of a `CreateFunctionRequest` message.
9440
9441 Wraps [`::buffa::OwnedView`]`<`[`CreateFunctionRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
9442
9443 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateFunctionRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9444        #[derive(Clone, Debug)]
9445        pub struct CreateFunctionRequestOwnedView(
9446            ::buffa::OwnedView<CreateFunctionRequestView<'static>>,
9447        );
9448        impl CreateFunctionRequestOwnedView {
9449            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9450            ///
9451            /// The view borrows directly from the buffer's data; the buffer is
9452            /// retained inside the returned handle.
9453            ///
9454            /// # Errors
9455            ///
9456            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9457            /// protobuf data.
9458            pub fn decode(
9459                bytes: ::buffa::bytes::Bytes,
9460            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9461                ::core::result::Result::Ok(
9462                    CreateFunctionRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9463                )
9464            }
9465            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9466            /// max message size).
9467            ///
9468            /// # Errors
9469            ///
9470            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9471            /// exceeds the configured limits.
9472            pub fn decode_with_options(
9473                bytes: ::buffa::bytes::Bytes,
9474                opts: &::buffa::DecodeOptions,
9475            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9476                ::core::result::Result::Ok(
9477                    CreateFunctionRequestOwnedView(
9478                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9479                    ),
9480                )
9481            }
9482            /// Build from an owned message via an encode → decode round-trip.
9483            ///
9484            /// # Errors
9485            ///
9486            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9487            /// somehow invalid (should not happen for well-formed messages).
9488            pub fn from_owned(
9489                msg: &super::super::CreateFunctionRequest,
9490            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9491                ::core::result::Result::Ok(
9492                    CreateFunctionRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9493                )
9494            }
9495            /// Borrow the full [`CreateFunctionRequestView`] with its lifetime tied to `&self`.
9496            #[must_use]
9497            pub fn view(&self) -> &CreateFunctionRequestView<'_> {
9498                self.0.reborrow()
9499            }
9500            /// Convert to the owned message type.
9501            #[must_use]
9502            pub fn to_owned_message(&self) -> super::super::CreateFunctionRequest {
9503                self.0.to_owned_message()
9504            }
9505            /// The underlying bytes buffer.
9506            #[must_use]
9507            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9508                self.0.bytes()
9509            }
9510            /// Consume the handle, returning the underlying bytes buffer.
9511            #[must_use]
9512            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9513                self.0.into_bytes()
9514            }
9515            /// The function to create.
9516            ///
9517            /// Field 1: `function_info`
9518            #[must_use]
9519            pub fn function_info(
9520                &self,
9521            ) -> &::buffa::MessageFieldView<
9522                super::super::__buffa::view::CreateFunctionView<'_>,
9523            > {
9524                &self.0.reborrow().function_info
9525            }
9526        }
9527        impl ::core::convert::From<
9528            ::buffa::OwnedView<CreateFunctionRequestView<'static>>,
9529        > for CreateFunctionRequestOwnedView {
9530            fn from(
9531                inner: ::buffa::OwnedView<CreateFunctionRequestView<'static>>,
9532            ) -> Self {
9533                CreateFunctionRequestOwnedView(inner)
9534            }
9535        }
9536        impl ::core::convert::From<CreateFunctionRequestOwnedView>
9537        for ::buffa::OwnedView<CreateFunctionRequestView<'static>> {
9538            fn from(wrapper: CreateFunctionRequestOwnedView) -> Self {
9539                wrapper.0
9540            }
9541        }
9542        impl ::core::convert::AsRef<
9543            ::buffa::OwnedView<CreateFunctionRequestView<'static>>,
9544        > for CreateFunctionRequestOwnedView {
9545            fn as_ref(&self) -> &::buffa::OwnedView<CreateFunctionRequestView<'static>> {
9546                &self.0
9547            }
9548        }
9549        impl ::buffa::HasMessageView for super::super::CreateFunctionRequest {
9550            type View<'a> = CreateFunctionRequestView<'a>;
9551            type ViewHandle = CreateFunctionRequestOwnedView;
9552        }
9553        impl ::serde::Serialize for CreateFunctionRequestOwnedView {
9554            fn serialize<__S: ::serde::Serializer>(
9555                &self,
9556                __s: __S,
9557            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9558                ::serde::Serialize::serialize(&self.0, __s)
9559            }
9560        }
9561        /// Get a function
9562        #[derive(Clone, Debug, Default)]
9563        pub struct GetFunctionRequestView<'a> {
9564            /// The fully-qualified name of the function (three-level name: catalog.schema.function).
9565            ///
9566            /// Field 1: `name`
9567            pub name: &'a str,
9568            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9569        }
9570        impl<'a> GetFunctionRequestView<'a> {
9571            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9572            ///
9573            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9574            /// and by generated sub-message decode arms with `depth - 1`.
9575            ///
9576            /// **Not part of the public API.** Named with a leading underscore to
9577            /// signal that it is for generated-code use only.
9578            #[doc(hidden)]
9579            pub fn _decode_depth(
9580                buf: &'a [u8],
9581                depth: u32,
9582            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9583                let mut view = Self::default();
9584                view._merge_into_view(buf, depth)?;
9585                ::core::result::Result::Ok(view)
9586            }
9587            /// Merge fields from `buf` into this view (proto merge semantics).
9588            ///
9589            /// Repeated fields append; singular fields last-wins; singular
9590            /// MESSAGE fields merge recursively. Used by sub-message decode
9591            /// arms when the same field appears multiple times on the wire.
9592            ///
9593            /// **Not part of the public API.**
9594            #[doc(hidden)]
9595            pub fn _merge_into_view(
9596                &mut self,
9597                buf: &'a [u8],
9598                depth: u32,
9599            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9600                let _ = depth;
9601                #[allow(unused_variables)]
9602                let view = self;
9603                let mut cur: &'a [u8] = buf;
9604                while !cur.is_empty() {
9605                    let before_tag = cur;
9606                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9607                    match tag.field_number() {
9608                        1u32 => {
9609                            if tag.wire_type()
9610                                != ::buffa::encoding::WireType::LengthDelimited
9611                            {
9612                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9613                                    field_number: 1u32,
9614                                    expected: 2u8,
9615                                    actual: tag.wire_type() as u8,
9616                                });
9617                            }
9618                            view.name = ::buffa::types::borrow_str(&mut cur)?;
9619                        }
9620                        _ => {
9621                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9622                            let span_len = before_tag.len() - cur.len();
9623                            view.__buffa_unknown_fields
9624                                .push_raw(&before_tag[..span_len]);
9625                        }
9626                    }
9627                }
9628                ::core::result::Result::Ok(())
9629            }
9630        }
9631        impl<'a> ::buffa::MessageView<'a> for GetFunctionRequestView<'a> {
9632            type Owned = super::super::GetFunctionRequest;
9633            fn decode_view(
9634                buf: &'a [u8],
9635            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9636                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9637            }
9638            fn decode_view_with_limit(
9639                buf: &'a [u8],
9640                depth: u32,
9641            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9642                Self::_decode_depth(buf, depth)
9643            }
9644            fn to_owned_message(&self) -> super::super::GetFunctionRequest {
9645                self.to_owned_from_source(None)
9646            }
9647            #[allow(clippy::useless_conversion, clippy::needless_update)]
9648            fn to_owned_from_source(
9649                &self,
9650                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9651            ) -> super::super::GetFunctionRequest {
9652                #[allow(unused_imports)]
9653                use ::buffa::alloc::string::ToString as _;
9654                let _ = __buffa_src;
9655                super::super::GetFunctionRequest {
9656                    name: self.name.to_string(),
9657                    __buffa_unknown_fields: self
9658                        .__buffa_unknown_fields
9659                        .to_owned()
9660                        .unwrap_or_default()
9661                        .into(),
9662                    ..::core::default::Default::default()
9663                }
9664            }
9665        }
9666        impl<'a> ::buffa::ViewEncode<'a> for GetFunctionRequestView<'a> {
9667            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9668            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9669                #[allow(unused_imports)]
9670                use ::buffa::Enumeration as _;
9671                let mut size = 0u32;
9672                if !self.name.is_empty() {
9673                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
9674                }
9675                size += self.__buffa_unknown_fields.encoded_len() as u32;
9676                size
9677            }
9678            #[allow(clippy::needless_borrow)]
9679            fn write_to(
9680                &self,
9681                _cache: &mut ::buffa::SizeCache,
9682                buf: &mut impl ::buffa::bytes::BufMut,
9683            ) {
9684                #[allow(unused_imports)]
9685                use ::buffa::Enumeration as _;
9686                if !self.name.is_empty() {
9687                    ::buffa::encoding::Tag::new(
9688                            1u32,
9689                            ::buffa::encoding::WireType::LengthDelimited,
9690                        )
9691                        .encode(buf);
9692                    ::buffa::types::encode_string(&self.name, buf);
9693                }
9694                self.__buffa_unknown_fields.write_to(buf);
9695            }
9696        }
9697        /// Serializes this view as protobuf JSON.
9698        ///
9699        /// Implicit-presence fields with default values are omitted, `required`
9700        /// fields are always emitted, explicit-presence (`optional`) fields are
9701        /// emitted only when set, bytes fields are base64-encoded, and enum
9702        /// values are their proto name strings.
9703        ///
9704        /// This impl uses `serialize_map(None)` because the number of emitted
9705        /// fields depends on default-omission rules; serializers that require
9706        /// known map lengths (e.g. `bincode`) will return a runtime error.
9707        /// Use the owned message type for those formats.
9708        impl<'__a> ::serde::Serialize for GetFunctionRequestView<'__a> {
9709            fn serialize<__S: ::serde::Serializer>(
9710                &self,
9711                __s: __S,
9712            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9713                use ::serde::ser::SerializeMap as _;
9714                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9715                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
9716                    __map.serialize_entry("name", self.name)?;
9717                }
9718                __map.end()
9719            }
9720        }
9721        impl<'a> ::buffa::MessageName for GetFunctionRequestView<'a> {
9722            const PACKAGE: &'static str = "unitycatalog.functions.v1";
9723            const NAME: &'static str = "GetFunctionRequest";
9724            const FULL_NAME: &'static str = "unitycatalog.functions.v1.GetFunctionRequest";
9725            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.GetFunctionRequest";
9726        }
9727        impl<'v> ::buffa::DefaultViewInstance for GetFunctionRequestView<'v> {
9728            fn default_view_instance<'a>() -> &'a Self
9729            where
9730                Self: 'a,
9731            {
9732                static VALUE: ::buffa::__private::OnceBox<
9733                    GetFunctionRequestView<'static>,
9734                > = ::buffa::__private::OnceBox::new();
9735                VALUE
9736                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9737                        <GetFunctionRequestView<'static>>::default(),
9738                    ))
9739            }
9740        }
9741        impl ::buffa::ViewReborrow for GetFunctionRequestView<'static> {
9742            type Reborrowed<'b> = GetFunctionRequestView<'b>;
9743            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9744                this
9745            }
9746        }
9747        /** Self-contained, `'static` owned view of a `GetFunctionRequest` message.
9748
9749 Wraps [`::buffa::OwnedView`]`<`[`GetFunctionRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
9750
9751 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetFunctionRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9752        #[derive(Clone, Debug)]
9753        pub struct GetFunctionRequestOwnedView(
9754            ::buffa::OwnedView<GetFunctionRequestView<'static>>,
9755        );
9756        impl GetFunctionRequestOwnedView {
9757            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9758            ///
9759            /// The view borrows directly from the buffer's data; the buffer is
9760            /// retained inside the returned handle.
9761            ///
9762            /// # Errors
9763            ///
9764            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9765            /// protobuf data.
9766            pub fn decode(
9767                bytes: ::buffa::bytes::Bytes,
9768            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9769                ::core::result::Result::Ok(
9770                    GetFunctionRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9771                )
9772            }
9773            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9774            /// max message size).
9775            ///
9776            /// # Errors
9777            ///
9778            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9779            /// exceeds the configured limits.
9780            pub fn decode_with_options(
9781                bytes: ::buffa::bytes::Bytes,
9782                opts: &::buffa::DecodeOptions,
9783            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9784                ::core::result::Result::Ok(
9785                    GetFunctionRequestOwnedView(
9786                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9787                    ),
9788                )
9789            }
9790            /// Build from an owned message via an encode → decode round-trip.
9791            ///
9792            /// # Errors
9793            ///
9794            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9795            /// somehow invalid (should not happen for well-formed messages).
9796            pub fn from_owned(
9797                msg: &super::super::GetFunctionRequest,
9798            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9799                ::core::result::Result::Ok(
9800                    GetFunctionRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9801                )
9802            }
9803            /// Borrow the full [`GetFunctionRequestView`] with its lifetime tied to `&self`.
9804            #[must_use]
9805            pub fn view(&self) -> &GetFunctionRequestView<'_> {
9806                self.0.reborrow()
9807            }
9808            /// Convert to the owned message type.
9809            #[must_use]
9810            pub fn to_owned_message(&self) -> super::super::GetFunctionRequest {
9811                self.0.to_owned_message()
9812            }
9813            /// The underlying bytes buffer.
9814            #[must_use]
9815            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9816                self.0.bytes()
9817            }
9818            /// Consume the handle, returning the underlying bytes buffer.
9819            #[must_use]
9820            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9821                self.0.into_bytes()
9822            }
9823            /// The fully-qualified name of the function (three-level name: catalog.schema.function).
9824            ///
9825            /// Field 1: `name`
9826            #[must_use]
9827            pub fn name(&self) -> &'_ str {
9828                self.0.reborrow().name
9829            }
9830        }
9831        impl ::core::convert::From<::buffa::OwnedView<GetFunctionRequestView<'static>>>
9832        for GetFunctionRequestOwnedView {
9833            fn from(inner: ::buffa::OwnedView<GetFunctionRequestView<'static>>) -> Self {
9834                GetFunctionRequestOwnedView(inner)
9835            }
9836        }
9837        impl ::core::convert::From<GetFunctionRequestOwnedView>
9838        for ::buffa::OwnedView<GetFunctionRequestView<'static>> {
9839            fn from(wrapper: GetFunctionRequestOwnedView) -> Self {
9840                wrapper.0
9841            }
9842        }
9843        impl ::core::convert::AsRef<::buffa::OwnedView<GetFunctionRequestView<'static>>>
9844        for GetFunctionRequestOwnedView {
9845            fn as_ref(&self) -> &::buffa::OwnedView<GetFunctionRequestView<'static>> {
9846                &self.0
9847            }
9848        }
9849        impl ::buffa::HasMessageView for super::super::GetFunctionRequest {
9850            type View<'a> = GetFunctionRequestView<'a>;
9851            type ViewHandle = GetFunctionRequestOwnedView;
9852        }
9853        impl ::serde::Serialize for GetFunctionRequestOwnedView {
9854            fn serialize<__S: ::serde::Serializer>(
9855                &self,
9856                __s: __S,
9857            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9858                ::serde::Serialize::serialize(&self.0, __s)
9859            }
9860        }
9861        /// Update a function
9862        #[derive(Clone, Debug, Default)]
9863        pub struct UpdateFunctionRequestView<'a> {
9864            /// The fully-qualified name of the function (three-level name: catalog.schema.function).
9865            ///
9866            /// Field 1: `name`
9867            pub name: &'a str,
9868            /// Username of new owner of the function.
9869            ///
9870            /// Field 2: `owner`
9871            pub owner: ::core::option::Option<&'a str>,
9872            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9873        }
9874        impl<'a> UpdateFunctionRequestView<'a> {
9875            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9876            ///
9877            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9878            /// and by generated sub-message decode arms with `depth - 1`.
9879            ///
9880            /// **Not part of the public API.** Named with a leading underscore to
9881            /// signal that it is for generated-code use only.
9882            #[doc(hidden)]
9883            pub fn _decode_depth(
9884                buf: &'a [u8],
9885                depth: u32,
9886            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9887                let mut view = Self::default();
9888                view._merge_into_view(buf, depth)?;
9889                ::core::result::Result::Ok(view)
9890            }
9891            /// Merge fields from `buf` into this view (proto merge semantics).
9892            ///
9893            /// Repeated fields append; singular fields last-wins; singular
9894            /// MESSAGE fields merge recursively. Used by sub-message decode
9895            /// arms when the same field appears multiple times on the wire.
9896            ///
9897            /// **Not part of the public API.**
9898            #[doc(hidden)]
9899            pub fn _merge_into_view(
9900                &mut self,
9901                buf: &'a [u8],
9902                depth: u32,
9903            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9904                let _ = depth;
9905                #[allow(unused_variables)]
9906                let view = self;
9907                let mut cur: &'a [u8] = buf;
9908                while !cur.is_empty() {
9909                    let before_tag = cur;
9910                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9911                    match tag.field_number() {
9912                        1u32 => {
9913                            if tag.wire_type()
9914                                != ::buffa::encoding::WireType::LengthDelimited
9915                            {
9916                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9917                                    field_number: 1u32,
9918                                    expected: 2u8,
9919                                    actual: tag.wire_type() as u8,
9920                                });
9921                            }
9922                            view.name = ::buffa::types::borrow_str(&mut cur)?;
9923                        }
9924                        2u32 => {
9925                            if tag.wire_type()
9926                                != ::buffa::encoding::WireType::LengthDelimited
9927                            {
9928                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9929                                    field_number: 2u32,
9930                                    expected: 2u8,
9931                                    actual: tag.wire_type() as u8,
9932                                });
9933                            }
9934                            view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
9935                        }
9936                        _ => {
9937                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9938                            let span_len = before_tag.len() - cur.len();
9939                            view.__buffa_unknown_fields
9940                                .push_raw(&before_tag[..span_len]);
9941                        }
9942                    }
9943                }
9944                ::core::result::Result::Ok(())
9945            }
9946        }
9947        impl<'a> ::buffa::MessageView<'a> for UpdateFunctionRequestView<'a> {
9948            type Owned = super::super::UpdateFunctionRequest;
9949            fn decode_view(
9950                buf: &'a [u8],
9951            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9952                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9953            }
9954            fn decode_view_with_limit(
9955                buf: &'a [u8],
9956                depth: u32,
9957            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9958                Self::_decode_depth(buf, depth)
9959            }
9960            fn to_owned_message(&self) -> super::super::UpdateFunctionRequest {
9961                self.to_owned_from_source(None)
9962            }
9963            #[allow(clippy::useless_conversion, clippy::needless_update)]
9964            fn to_owned_from_source(
9965                &self,
9966                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9967            ) -> super::super::UpdateFunctionRequest {
9968                #[allow(unused_imports)]
9969                use ::buffa::alloc::string::ToString as _;
9970                let _ = __buffa_src;
9971                super::super::UpdateFunctionRequest {
9972                    name: self.name.to_string(),
9973                    owner: self.owner.map(|s| s.to_string()),
9974                    __buffa_unknown_fields: self
9975                        .__buffa_unknown_fields
9976                        .to_owned()
9977                        .unwrap_or_default()
9978                        .into(),
9979                    ..::core::default::Default::default()
9980                }
9981            }
9982        }
9983        impl<'a> ::buffa::ViewEncode<'a> for UpdateFunctionRequestView<'a> {
9984            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9985            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9986                #[allow(unused_imports)]
9987                use ::buffa::Enumeration as _;
9988                let mut size = 0u32;
9989                if !self.name.is_empty() {
9990                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
9991                }
9992                if let Some(ref v) = self.owner {
9993                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9994                }
9995                size += self.__buffa_unknown_fields.encoded_len() as u32;
9996                size
9997            }
9998            #[allow(clippy::needless_borrow)]
9999            fn write_to(
10000                &self,
10001                _cache: &mut ::buffa::SizeCache,
10002                buf: &mut impl ::buffa::bytes::BufMut,
10003            ) {
10004                #[allow(unused_imports)]
10005                use ::buffa::Enumeration as _;
10006                if !self.name.is_empty() {
10007                    ::buffa::encoding::Tag::new(
10008                            1u32,
10009                            ::buffa::encoding::WireType::LengthDelimited,
10010                        )
10011                        .encode(buf);
10012                    ::buffa::types::encode_string(&self.name, buf);
10013                }
10014                if let Some(ref v) = self.owner {
10015                    ::buffa::encoding::Tag::new(
10016                            2u32,
10017                            ::buffa::encoding::WireType::LengthDelimited,
10018                        )
10019                        .encode(buf);
10020                    ::buffa::types::encode_string(v, buf);
10021                }
10022                self.__buffa_unknown_fields.write_to(buf);
10023            }
10024        }
10025        /// Serializes this view as protobuf JSON.
10026        ///
10027        /// Implicit-presence fields with default values are omitted, `required`
10028        /// fields are always emitted, explicit-presence (`optional`) fields are
10029        /// emitted only when set, bytes fields are base64-encoded, and enum
10030        /// values are their proto name strings.
10031        ///
10032        /// This impl uses `serialize_map(None)` because the number of emitted
10033        /// fields depends on default-omission rules; serializers that require
10034        /// known map lengths (e.g. `bincode`) will return a runtime error.
10035        /// Use the owned message type for those formats.
10036        impl<'__a> ::serde::Serialize for UpdateFunctionRequestView<'__a> {
10037            fn serialize<__S: ::serde::Serializer>(
10038                &self,
10039                __s: __S,
10040            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10041                use ::serde::ser::SerializeMap as _;
10042                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10043                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
10044                    __map.serialize_entry("name", self.name)?;
10045                }
10046                if let ::core::option::Option::Some(__v) = self.owner {
10047                    __map.serialize_entry("owner", __v)?;
10048                }
10049                __map.end()
10050            }
10051        }
10052        impl<'a> ::buffa::MessageName for UpdateFunctionRequestView<'a> {
10053            const PACKAGE: &'static str = "unitycatalog.functions.v1";
10054            const NAME: &'static str = "UpdateFunctionRequest";
10055            const FULL_NAME: &'static str = "unitycatalog.functions.v1.UpdateFunctionRequest";
10056            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.UpdateFunctionRequest";
10057        }
10058        impl<'v> ::buffa::DefaultViewInstance for UpdateFunctionRequestView<'v> {
10059            fn default_view_instance<'a>() -> &'a Self
10060            where
10061                Self: 'a,
10062            {
10063                static VALUE: ::buffa::__private::OnceBox<
10064                    UpdateFunctionRequestView<'static>,
10065                > = ::buffa::__private::OnceBox::new();
10066                VALUE
10067                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
10068                        <UpdateFunctionRequestView<'static>>::default(),
10069                    ))
10070            }
10071        }
10072        impl ::buffa::ViewReborrow for UpdateFunctionRequestView<'static> {
10073            type Reborrowed<'b> = UpdateFunctionRequestView<'b>;
10074            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
10075                this
10076            }
10077        }
10078        /** Self-contained, `'static` owned view of a `UpdateFunctionRequest` message.
10079
10080 Wraps [`::buffa::OwnedView`]`<`[`UpdateFunctionRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
10081
10082 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdateFunctionRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10083        #[derive(Clone, Debug)]
10084        pub struct UpdateFunctionRequestOwnedView(
10085            ::buffa::OwnedView<UpdateFunctionRequestView<'static>>,
10086        );
10087        impl UpdateFunctionRequestOwnedView {
10088            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10089            ///
10090            /// The view borrows directly from the buffer's data; the buffer is
10091            /// retained inside the returned handle.
10092            ///
10093            /// # Errors
10094            ///
10095            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10096            /// protobuf data.
10097            pub fn decode(
10098                bytes: ::buffa::bytes::Bytes,
10099            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10100                ::core::result::Result::Ok(
10101                    UpdateFunctionRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
10102                )
10103            }
10104            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10105            /// max message size).
10106            ///
10107            /// # Errors
10108            ///
10109            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10110            /// exceeds the configured limits.
10111            pub fn decode_with_options(
10112                bytes: ::buffa::bytes::Bytes,
10113                opts: &::buffa::DecodeOptions,
10114            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10115                ::core::result::Result::Ok(
10116                    UpdateFunctionRequestOwnedView(
10117                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10118                    ),
10119                )
10120            }
10121            /// Build from an owned message via an encode → decode round-trip.
10122            ///
10123            /// # Errors
10124            ///
10125            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10126            /// somehow invalid (should not happen for well-formed messages).
10127            pub fn from_owned(
10128                msg: &super::super::UpdateFunctionRequest,
10129            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10130                ::core::result::Result::Ok(
10131                    UpdateFunctionRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
10132                )
10133            }
10134            /// Borrow the full [`UpdateFunctionRequestView`] with its lifetime tied to `&self`.
10135            #[must_use]
10136            pub fn view(&self) -> &UpdateFunctionRequestView<'_> {
10137                self.0.reborrow()
10138            }
10139            /// Convert to the owned message type.
10140            #[must_use]
10141            pub fn to_owned_message(&self) -> super::super::UpdateFunctionRequest {
10142                self.0.to_owned_message()
10143            }
10144            /// The underlying bytes buffer.
10145            #[must_use]
10146            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10147                self.0.bytes()
10148            }
10149            /// Consume the handle, returning the underlying bytes buffer.
10150            #[must_use]
10151            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10152                self.0.into_bytes()
10153            }
10154            /// The fully-qualified name of the function (three-level name: catalog.schema.function).
10155            ///
10156            /// Field 1: `name`
10157            #[must_use]
10158            pub fn name(&self) -> &'_ str {
10159                self.0.reborrow().name
10160            }
10161            /// Username of new owner of the function.
10162            ///
10163            /// Field 2: `owner`
10164            #[must_use]
10165            pub fn owner(&self) -> ::core::option::Option<&'_ str> {
10166                self.0.reborrow().owner
10167            }
10168        }
10169        impl ::core::convert::From<
10170            ::buffa::OwnedView<UpdateFunctionRequestView<'static>>,
10171        > for UpdateFunctionRequestOwnedView {
10172            fn from(
10173                inner: ::buffa::OwnedView<UpdateFunctionRequestView<'static>>,
10174            ) -> Self {
10175                UpdateFunctionRequestOwnedView(inner)
10176            }
10177        }
10178        impl ::core::convert::From<UpdateFunctionRequestOwnedView>
10179        for ::buffa::OwnedView<UpdateFunctionRequestView<'static>> {
10180            fn from(wrapper: UpdateFunctionRequestOwnedView) -> Self {
10181                wrapper.0
10182            }
10183        }
10184        impl ::core::convert::AsRef<
10185            ::buffa::OwnedView<UpdateFunctionRequestView<'static>>,
10186        > for UpdateFunctionRequestOwnedView {
10187            fn as_ref(&self) -> &::buffa::OwnedView<UpdateFunctionRequestView<'static>> {
10188                &self.0
10189            }
10190        }
10191        impl ::buffa::HasMessageView for super::super::UpdateFunctionRequest {
10192            type View<'a> = UpdateFunctionRequestView<'a>;
10193            type ViewHandle = UpdateFunctionRequestOwnedView;
10194        }
10195        impl ::serde::Serialize for UpdateFunctionRequestOwnedView {
10196            fn serialize<__S: ::serde::Serializer>(
10197                &self,
10198                __s: __S,
10199            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10200                ::serde::Serialize::serialize(&self.0, __s)
10201            }
10202        }
10203        /// Delete a function
10204        #[derive(Clone, Debug, Default)]
10205        pub struct DeleteFunctionRequestView<'a> {
10206            /// The fully-qualified name of the function (three-level name: catalog.schema.function).
10207            ///
10208            /// Field 1: `name`
10209            pub name: &'a str,
10210            /// Force deletion even if the function is not empty.
10211            ///
10212            /// Field 2: `force`
10213            pub force: ::core::option::Option<bool>,
10214            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10215        }
10216        impl<'a> DeleteFunctionRequestView<'a> {
10217            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
10218            ///
10219            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
10220            /// and by generated sub-message decode arms with `depth - 1`.
10221            ///
10222            /// **Not part of the public API.** Named with a leading underscore to
10223            /// signal that it is for generated-code use only.
10224            #[doc(hidden)]
10225            pub fn _decode_depth(
10226                buf: &'a [u8],
10227                depth: u32,
10228            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10229                let mut view = Self::default();
10230                view._merge_into_view(buf, depth)?;
10231                ::core::result::Result::Ok(view)
10232            }
10233            /// Merge fields from `buf` into this view (proto merge semantics).
10234            ///
10235            /// Repeated fields append; singular fields last-wins; singular
10236            /// MESSAGE fields merge recursively. Used by sub-message decode
10237            /// arms when the same field appears multiple times on the wire.
10238            ///
10239            /// **Not part of the public API.**
10240            #[doc(hidden)]
10241            pub fn _merge_into_view(
10242                &mut self,
10243                buf: &'a [u8],
10244                depth: u32,
10245            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
10246                let _ = depth;
10247                #[allow(unused_variables)]
10248                let view = self;
10249                let mut cur: &'a [u8] = buf;
10250                while !cur.is_empty() {
10251                    let before_tag = cur;
10252                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
10253                    match tag.field_number() {
10254                        1u32 => {
10255                            if tag.wire_type()
10256                                != ::buffa::encoding::WireType::LengthDelimited
10257                            {
10258                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10259                                    field_number: 1u32,
10260                                    expected: 2u8,
10261                                    actual: tag.wire_type() as u8,
10262                                });
10263                            }
10264                            view.name = ::buffa::types::borrow_str(&mut cur)?;
10265                        }
10266                        2u32 => {
10267                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10268                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10269                                    field_number: 2u32,
10270                                    expected: 0u8,
10271                                    actual: tag.wire_type() as u8,
10272                                });
10273                            }
10274                            view.force = Some(::buffa::types::decode_bool(&mut cur)?);
10275                        }
10276                        _ => {
10277                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
10278                            let span_len = before_tag.len() - cur.len();
10279                            view.__buffa_unknown_fields
10280                                .push_raw(&before_tag[..span_len]);
10281                        }
10282                    }
10283                }
10284                ::core::result::Result::Ok(())
10285            }
10286        }
10287        impl<'a> ::buffa::MessageView<'a> for DeleteFunctionRequestView<'a> {
10288            type Owned = super::super::DeleteFunctionRequest;
10289            fn decode_view(
10290                buf: &'a [u8],
10291            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10292                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
10293            }
10294            fn decode_view_with_limit(
10295                buf: &'a [u8],
10296                depth: u32,
10297            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10298                Self::_decode_depth(buf, depth)
10299            }
10300            fn to_owned_message(&self) -> super::super::DeleteFunctionRequest {
10301                self.to_owned_from_source(None)
10302            }
10303            #[allow(clippy::useless_conversion, clippy::needless_update)]
10304            fn to_owned_from_source(
10305                &self,
10306                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10307            ) -> super::super::DeleteFunctionRequest {
10308                #[allow(unused_imports)]
10309                use ::buffa::alloc::string::ToString as _;
10310                let _ = __buffa_src;
10311                super::super::DeleteFunctionRequest {
10312                    name: self.name.to_string(),
10313                    force: self.force,
10314                    __buffa_unknown_fields: self
10315                        .__buffa_unknown_fields
10316                        .to_owned()
10317                        .unwrap_or_default()
10318                        .into(),
10319                    ..::core::default::Default::default()
10320                }
10321            }
10322        }
10323        impl<'a> ::buffa::ViewEncode<'a> for DeleteFunctionRequestView<'a> {
10324            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10325            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
10326                #[allow(unused_imports)]
10327                use ::buffa::Enumeration as _;
10328                let mut size = 0u32;
10329                if !self.name.is_empty() {
10330                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
10331                }
10332                if self.force.is_some() {
10333                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10334                }
10335                size += self.__buffa_unknown_fields.encoded_len() as u32;
10336                size
10337            }
10338            #[allow(clippy::needless_borrow)]
10339            fn write_to(
10340                &self,
10341                _cache: &mut ::buffa::SizeCache,
10342                buf: &mut impl ::buffa::bytes::BufMut,
10343            ) {
10344                #[allow(unused_imports)]
10345                use ::buffa::Enumeration as _;
10346                if !self.name.is_empty() {
10347                    ::buffa::encoding::Tag::new(
10348                            1u32,
10349                            ::buffa::encoding::WireType::LengthDelimited,
10350                        )
10351                        .encode(buf);
10352                    ::buffa::types::encode_string(&self.name, buf);
10353                }
10354                if let Some(v) = self.force {
10355                    ::buffa::encoding::Tag::new(
10356                            2u32,
10357                            ::buffa::encoding::WireType::Varint,
10358                        )
10359                        .encode(buf);
10360                    ::buffa::types::encode_bool(v, buf);
10361                }
10362                self.__buffa_unknown_fields.write_to(buf);
10363            }
10364        }
10365        /// Serializes this view as protobuf JSON.
10366        ///
10367        /// Implicit-presence fields with default values are omitted, `required`
10368        /// fields are always emitted, explicit-presence (`optional`) fields are
10369        /// emitted only when set, bytes fields are base64-encoded, and enum
10370        /// values are their proto name strings.
10371        ///
10372        /// This impl uses `serialize_map(None)` because the number of emitted
10373        /// fields depends on default-omission rules; serializers that require
10374        /// known map lengths (e.g. `bincode`) will return a runtime error.
10375        /// Use the owned message type for those formats.
10376        impl<'__a> ::serde::Serialize for DeleteFunctionRequestView<'__a> {
10377            fn serialize<__S: ::serde::Serializer>(
10378                &self,
10379                __s: __S,
10380            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10381                use ::serde::ser::SerializeMap as _;
10382                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10383                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
10384                    __map.serialize_entry("name", self.name)?;
10385                }
10386                if let ::core::option::Option::Some(__v) = self.force {
10387                    __map.serialize_entry("force", &__v)?;
10388                }
10389                __map.end()
10390            }
10391        }
10392        impl<'a> ::buffa::MessageName for DeleteFunctionRequestView<'a> {
10393            const PACKAGE: &'static str = "unitycatalog.functions.v1";
10394            const NAME: &'static str = "DeleteFunctionRequest";
10395            const FULL_NAME: &'static str = "unitycatalog.functions.v1.DeleteFunctionRequest";
10396            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.functions.v1.DeleteFunctionRequest";
10397        }
10398        impl<'v> ::buffa::DefaultViewInstance for DeleteFunctionRequestView<'v> {
10399            fn default_view_instance<'a>() -> &'a Self
10400            where
10401                Self: 'a,
10402            {
10403                static VALUE: ::buffa::__private::OnceBox<
10404                    DeleteFunctionRequestView<'static>,
10405                > = ::buffa::__private::OnceBox::new();
10406                VALUE
10407                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
10408                        <DeleteFunctionRequestView<'static>>::default(),
10409                    ))
10410            }
10411        }
10412        impl ::buffa::ViewReborrow for DeleteFunctionRequestView<'static> {
10413            type Reborrowed<'b> = DeleteFunctionRequestView<'b>;
10414            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
10415                this
10416            }
10417        }
10418        /** Self-contained, `'static` owned view of a `DeleteFunctionRequest` message.
10419
10420 Wraps [`::buffa::OwnedView`]`<`[`DeleteFunctionRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
10421
10422 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DeleteFunctionRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10423        #[derive(Clone, Debug)]
10424        pub struct DeleteFunctionRequestOwnedView(
10425            ::buffa::OwnedView<DeleteFunctionRequestView<'static>>,
10426        );
10427        impl DeleteFunctionRequestOwnedView {
10428            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10429            ///
10430            /// The view borrows directly from the buffer's data; the buffer is
10431            /// retained inside the returned handle.
10432            ///
10433            /// # Errors
10434            ///
10435            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10436            /// protobuf data.
10437            pub fn decode(
10438                bytes: ::buffa::bytes::Bytes,
10439            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10440                ::core::result::Result::Ok(
10441                    DeleteFunctionRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
10442                )
10443            }
10444            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10445            /// max message size).
10446            ///
10447            /// # Errors
10448            ///
10449            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10450            /// exceeds the configured limits.
10451            pub fn decode_with_options(
10452                bytes: ::buffa::bytes::Bytes,
10453                opts: &::buffa::DecodeOptions,
10454            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10455                ::core::result::Result::Ok(
10456                    DeleteFunctionRequestOwnedView(
10457                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10458                    ),
10459                )
10460            }
10461            /// Build from an owned message via an encode → decode round-trip.
10462            ///
10463            /// # Errors
10464            ///
10465            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10466            /// somehow invalid (should not happen for well-formed messages).
10467            pub fn from_owned(
10468                msg: &super::super::DeleteFunctionRequest,
10469            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10470                ::core::result::Result::Ok(
10471                    DeleteFunctionRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
10472                )
10473            }
10474            /// Borrow the full [`DeleteFunctionRequestView`] with its lifetime tied to `&self`.
10475            #[must_use]
10476            pub fn view(&self) -> &DeleteFunctionRequestView<'_> {
10477                self.0.reborrow()
10478            }
10479            /// Convert to the owned message type.
10480            #[must_use]
10481            pub fn to_owned_message(&self) -> super::super::DeleteFunctionRequest {
10482                self.0.to_owned_message()
10483            }
10484            /// The underlying bytes buffer.
10485            #[must_use]
10486            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10487                self.0.bytes()
10488            }
10489            /// Consume the handle, returning the underlying bytes buffer.
10490            #[must_use]
10491            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10492                self.0.into_bytes()
10493            }
10494            /// The fully-qualified name of the function (three-level name: catalog.schema.function).
10495            ///
10496            /// Field 1: `name`
10497            #[must_use]
10498            pub fn name(&self) -> &'_ str {
10499                self.0.reborrow().name
10500            }
10501            /// Force deletion even if the function is not empty.
10502            ///
10503            /// Field 2: `force`
10504            #[must_use]
10505            pub fn force(&self) -> ::core::option::Option<bool> {
10506                self.0.reborrow().force
10507            }
10508        }
10509        impl ::core::convert::From<
10510            ::buffa::OwnedView<DeleteFunctionRequestView<'static>>,
10511        > for DeleteFunctionRequestOwnedView {
10512            fn from(
10513                inner: ::buffa::OwnedView<DeleteFunctionRequestView<'static>>,
10514            ) -> Self {
10515                DeleteFunctionRequestOwnedView(inner)
10516            }
10517        }
10518        impl ::core::convert::From<DeleteFunctionRequestOwnedView>
10519        for ::buffa::OwnedView<DeleteFunctionRequestView<'static>> {
10520            fn from(wrapper: DeleteFunctionRequestOwnedView) -> Self {
10521                wrapper.0
10522            }
10523        }
10524        impl ::core::convert::AsRef<
10525            ::buffa::OwnedView<DeleteFunctionRequestView<'static>>,
10526        > for DeleteFunctionRequestOwnedView {
10527            fn as_ref(&self) -> &::buffa::OwnedView<DeleteFunctionRequestView<'static>> {
10528                &self.0
10529            }
10530        }
10531        impl ::buffa::HasMessageView for super::super::DeleteFunctionRequest {
10532            type View<'a> = DeleteFunctionRequestView<'a>;
10533            type ViewHandle = DeleteFunctionRequestOwnedView;
10534        }
10535        impl ::serde::Serialize for DeleteFunctionRequestOwnedView {
10536            fn serialize<__S: ::serde::Serializer>(
10537                &self,
10538                __s: __S,
10539            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10540                ::serde::Serialize::serialize(&self.0, __s)
10541            }
10542        }
10543    }
10544    /// Register this package's `Any` type entries and extension entries.
10545    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
10546        reg.register_json_any(super::__FUNCTION_PARAMETER_INFO_JSON_ANY);
10547        reg.register_json_any(super::__FUNCTION_PARAMETER_INFOS_JSON_ANY);
10548        reg.register_json_any(super::__CREATE_FUNCTION_JSON_ANY);
10549        reg.register_json_any(super::__FUNCTION_JSON_ANY);
10550        reg.register_json_any(super::__LIST_FUNCTIONS_REQUEST_JSON_ANY);
10551        reg.register_json_any(super::__LIST_FUNCTIONS_RESPONSE_JSON_ANY);
10552        reg.register_json_any(super::__CREATE_FUNCTION_REQUEST_JSON_ANY);
10553        reg.register_json_any(super::__GET_FUNCTION_REQUEST_JSON_ANY);
10554        reg.register_json_any(super::__UPDATE_FUNCTION_REQUEST_JSON_ANY);
10555        reg.register_json_any(super::__DELETE_FUNCTION_REQUEST_JSON_ANY);
10556    }
10557}
10558#[doc(inline)]
10559pub use self::__buffa::view::FunctionParameterInfoView;
10560#[doc(inline)]
10561pub use self::__buffa::view::FunctionParameterInfoOwnedView;
10562#[doc(inline)]
10563pub use self::__buffa::view::FunctionParameterInfosView;
10564#[doc(inline)]
10565pub use self::__buffa::view::FunctionParameterInfosOwnedView;
10566#[doc(inline)]
10567pub use self::__buffa::view::CreateFunctionView;
10568#[doc(inline)]
10569pub use self::__buffa::view::CreateFunctionOwnedView;
10570#[doc(inline)]
10571pub use self::__buffa::view::FunctionView;
10572#[doc(inline)]
10573pub use self::__buffa::view::FunctionOwnedView;
10574#[doc(inline)]
10575pub use self::__buffa::view::ListFunctionsRequestView;
10576#[doc(inline)]
10577pub use self::__buffa::view::ListFunctionsRequestOwnedView;
10578#[doc(inline)]
10579pub use self::__buffa::view::ListFunctionsResponseView;
10580#[doc(inline)]
10581pub use self::__buffa::view::ListFunctionsResponseOwnedView;
10582#[doc(inline)]
10583pub use self::__buffa::view::CreateFunctionRequestView;
10584#[doc(inline)]
10585pub use self::__buffa::view::CreateFunctionRequestOwnedView;
10586#[doc(inline)]
10587pub use self::__buffa::view::GetFunctionRequestView;
10588#[doc(inline)]
10589pub use self::__buffa::view::GetFunctionRequestOwnedView;
10590#[doc(inline)]
10591pub use self::__buffa::view::UpdateFunctionRequestView;
10592#[doc(inline)]
10593pub use self::__buffa::view::UpdateFunctionRequestOwnedView;
10594#[doc(inline)]
10595pub use self::__buffa::view::DeleteFunctionRequestView;
10596#[doc(inline)]
10597pub use self::__buffa::view::DeleteFunctionRequestOwnedView;
10598#[doc(inline)]
10599pub use self::__buffa::register_types;