Skip to main content

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

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// The type of the catalog.
4#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5#[repr(i32)]
6pub enum CatalogType {
7    /// Unknown catalog type.
8    CATALOG_TYPE_UNSPECIFIED = 0i32,
9    MANAGED_CATALOG = 1i32,
10    DELTASHARING_CATALOG = 2i32,
11    SYSTEM_CATALOG = 3i32,
12}
13impl CatalogType {
14    ///Idiomatic alias for [`Self::CATALOG_TYPE_UNSPECIFIED`]; `Debug` prints the variant name.
15    #[allow(non_upper_case_globals)]
16    pub const CatalogTypeUnspecified: Self = Self::CATALOG_TYPE_UNSPECIFIED;
17    ///Idiomatic alias for [`Self::MANAGED_CATALOG`]; `Debug` prints the variant name.
18    #[allow(non_upper_case_globals)]
19    pub const ManagedCatalog: Self = Self::MANAGED_CATALOG;
20    ///Idiomatic alias for [`Self::DELTASHARING_CATALOG`]; `Debug` prints the variant name.
21    #[allow(non_upper_case_globals)]
22    pub const DeltasharingCatalog: Self = Self::DELTASHARING_CATALOG;
23    ///Idiomatic alias for [`Self::SYSTEM_CATALOG`]; `Debug` prints the variant name.
24    #[allow(non_upper_case_globals)]
25    pub const SystemCatalog: Self = Self::SYSTEM_CATALOG;
26}
27impl ::core::default::Default for CatalogType {
28    fn default() -> Self {
29        Self::CATALOG_TYPE_UNSPECIFIED
30    }
31}
32impl ::serde::Serialize for CatalogType {
33    fn serialize<S: ::serde::Serializer>(
34        &self,
35        s: S,
36    ) -> ::core::result::Result<S::Ok, S::Error> {
37        s.serialize_str(::buffa::Enumeration::proto_name(self))
38    }
39}
40impl<'de> ::serde::Deserialize<'de> for CatalogType {
41    fn deserialize<D: ::serde::Deserializer<'de>>(
42        d: D,
43    ) -> ::core::result::Result<Self, D::Error> {
44        struct _V;
45        impl ::serde::de::Visitor<'_> for _V {
46            type Value = CatalogType;
47            fn expecting(
48                &self,
49                f: &mut ::core::fmt::Formatter<'_>,
50            ) -> ::core::fmt::Result {
51                f.write_str(
52                    concat!("a string, integer, or null for ", stringify!(CatalogType)),
53                )
54            }
55            fn visit_str<E: ::serde::de::Error>(
56                self,
57                v: &str,
58            ) -> ::core::result::Result<CatalogType, E> {
59                <CatalogType as ::buffa::Enumeration>::from_proto_name(v)
60                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
61            }
62            fn visit_i64<E: ::serde::de::Error>(
63                self,
64                v: i64,
65            ) -> ::core::result::Result<CatalogType, E> {
66                let v32 = i32::try_from(v)
67                    .map_err(|_| {
68                        ::serde::de::Error::custom(
69                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
70                        )
71                    })?;
72                <CatalogType as ::buffa::Enumeration>::from_i32(v32)
73                    .ok_or_else(|| {
74                        ::serde::de::Error::custom(
75                            ::buffa::alloc::format!("unknown enum value {v32}"),
76                        )
77                    })
78            }
79            fn visit_u64<E: ::serde::de::Error>(
80                self,
81                v: u64,
82            ) -> ::core::result::Result<CatalogType, E> {
83                let v32 = i32::try_from(v)
84                    .map_err(|_| {
85                        ::serde::de::Error::custom(
86                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
87                        )
88                    })?;
89                <CatalogType as ::buffa::Enumeration>::from_i32(v32)
90                    .ok_or_else(|| {
91                        ::serde::de::Error::custom(
92                            ::buffa::alloc::format!("unknown enum value {v32}"),
93                        )
94                    })
95            }
96            fn visit_unit<E: ::serde::de::Error>(
97                self,
98            ) -> ::core::result::Result<CatalogType, E> {
99                ::core::result::Result::Ok(::core::default::Default::default())
100            }
101        }
102        d.deserialize_any(_V)
103    }
104}
105impl ::buffa::json_helpers::ProtoElemJson for CatalogType {
106    fn serialize_proto_json<S: ::serde::Serializer>(
107        v: &Self,
108        s: S,
109    ) -> ::core::result::Result<S::Ok, S::Error> {
110        ::serde::Serialize::serialize(v, s)
111    }
112    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
113        d: D,
114    ) -> ::core::result::Result<Self, D::Error> {
115        <Self as ::serde::Deserialize>::deserialize(d)
116    }
117}
118impl ::buffa::Enumeration for CatalogType {
119    fn from_i32(value: i32) -> ::core::option::Option<Self> {
120        match value {
121            0i32 => ::core::option::Option::Some(Self::CATALOG_TYPE_UNSPECIFIED),
122            1i32 => ::core::option::Option::Some(Self::MANAGED_CATALOG),
123            2i32 => ::core::option::Option::Some(Self::DELTASHARING_CATALOG),
124            3i32 => ::core::option::Option::Some(Self::SYSTEM_CATALOG),
125            _ => ::core::option::Option::None,
126        }
127    }
128    fn to_i32(&self) -> i32 {
129        *self as i32
130    }
131    fn proto_name(&self) -> &'static str {
132        match self {
133            Self::CATALOG_TYPE_UNSPECIFIED => "CATALOG_TYPE_UNSPECIFIED",
134            Self::MANAGED_CATALOG => "MANAGED_CATALOG",
135            Self::DELTASHARING_CATALOG => "DELTASHARING_CATALOG",
136            Self::SYSTEM_CATALOG => "SYSTEM_CATALOG",
137        }
138    }
139    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
140        match name {
141            "CATALOG_TYPE_UNSPECIFIED" => {
142                ::core::option::Option::Some(Self::CATALOG_TYPE_UNSPECIFIED)
143            }
144            "MANAGED_CATALOG" => ::core::option::Option::Some(Self::MANAGED_CATALOG),
145            "DELTASHARING_CATALOG" => {
146                ::core::option::Option::Some(Self::DELTASHARING_CATALOG)
147            }
148            "SYSTEM_CATALOG" => ::core::option::Option::Some(Self::SYSTEM_CATALOG),
149            _ => ::core::option::Option::None,
150        }
151    }
152    fn values() -> &'static [Self] {
153        &[
154            Self::CATALOG_TYPE_UNSPECIFIED,
155            Self::MANAGED_CATALOG,
156            Self::DELTASHARING_CATALOG,
157            Self::SYSTEM_CATALOG,
158        ]
159    }
160}
161/// A catalog is a root-level namespace that contains schemas.
162#[derive(Clone, PartialEq, Default)]
163#[derive(::serde::Serialize, ::serde::Deserialize)]
164#[serde(default)]
165pub struct Catalog {
166    /// Name of catalog.
167    ///
168    /// Field 1: `name`
169    #[serde(
170        rename = "name",
171        with = "::buffa::json_helpers::proto_string",
172        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
173    )]
174    pub name: ::buffa::alloc::string::String,
175    /// Unique identifier for the catalog.
176    ///
177    /// Field 2: `id`
178    #[serde(rename = "id", skip_serializing_if = "::core::option::Option::is_none")]
179    pub id: ::core::option::Option<::buffa::alloc::string::String>,
180    /// Username of current owner of catalog.
181    ///
182    /// Field 3: `owner`
183    #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
184    pub owner: ::core::option::Option<::buffa::alloc::string::String>,
185    /// User-provided free-form text description.
186    ///
187    /// Field 4: `comment`
188    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
189    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
190    /// A map of key-value properties attached to the securable.
191    ///
192    /// Field 5: `properties`
193    #[serde(
194        rename = "properties",
195        skip_serializing_if = "::buffa::__private::HashMap::is_empty",
196        deserialize_with = "::buffa::json_helpers::null_as_default"
197    )]
198    pub properties: ::buffa::__private::HashMap<
199        ::buffa::alloc::string::String,
200        ::buffa::alloc::string::String,
201    >,
202    /// Storage root URL for managed tables within catalog.
203    ///
204    /// Field 6: `storage_root`
205    #[serde(
206        rename = "storage_root",
207        alias = "storageRoot",
208        skip_serializing_if = "::core::option::Option::is_none"
209    )]
210    pub storage_root: ::core::option::Option<::buffa::alloc::string::String>,
211    /// The name of delta sharing provider.
212    ///
213    /// A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server.
214    ///
215    /// Field 7: `provider_name`
216    #[serde(
217        rename = "provider_name",
218        alias = "providerName",
219        skip_serializing_if = "::core::option::Option::is_none"
220    )]
221    pub provider_name: ::core::option::Option<::buffa::alloc::string::String>,
222    /// The name of the share under the share provider.
223    ///
224    /// Field 8: `share_name`
225    #[serde(
226        rename = "share_name",
227        alias = "shareName",
228        skip_serializing_if = "::core::option::Option::is_none"
229    )]
230    pub share_name: ::core::option::Option<::buffa::alloc::string::String>,
231    /// The type of the catalog.
232    ///
233    /// Field 9: `catalog_type`
234    #[serde(
235        rename = "catalog_type",
236        alias = "catalogType",
237        with = "::buffa::json_helpers::opt_enum",
238        skip_serializing_if = "::core::option::Option::is_none"
239    )]
240    pub catalog_type: ::core::option::Option<::buffa::EnumValue<CatalogType>>,
241    /// Storage location URL (full path) for managed storage of the catalog.
242    ///
243    /// A unique path under `storage_root`, used as the managed-storage parent for
244    /// managed tables/volumes whose schema has no storage location of its own.
245    /// Absent when the catalog has no `storage_root`.
246    /// Example: `s3://bucket/ucroot/__unitystorage/catalogs/{catalog_id}`.
247    ///
248    /// Field 10: `storage_location`
249    #[serde(
250        rename = "storage_location",
251        alias = "storageLocation",
252        skip_serializing_if = "::core::option::Option::is_none"
253    )]
254    pub storage_location: ::core::option::Option<::buffa::alloc::string::String>,
255    /// Time at which this catalog was created, in epoch milliseconds.
256    ///
257    /// Field 1000: `created_at`
258    #[serde(
259        rename = "created_at",
260        alias = "createdAt",
261        with = "::buffa::json_helpers::opt_int64",
262        skip_serializing_if = "::core::option::Option::is_none"
263    )]
264    pub created_at: ::core::option::Option<i64>,
265    /// Username of catalog creator.
266    ///
267    /// Field 1001: `created_by`
268    #[serde(
269        rename = "created_by",
270        alias = "createdBy",
271        skip_serializing_if = "::core::option::Option::is_none"
272    )]
273    pub created_by: ::core::option::Option<::buffa::alloc::string::String>,
274    /// Time at which this catalog was last updated, in epoch milliseconds.
275    ///
276    /// Field 1002: `updated_at`
277    #[serde(
278        rename = "updated_at",
279        alias = "updatedAt",
280        with = "::buffa::json_helpers::opt_int64",
281        skip_serializing_if = "::core::option::Option::is_none"
282    )]
283    pub updated_at: ::core::option::Option<i64>,
284    /// Username of user who last modified catalog.
285    ///
286    /// Field 1003: `updated_by`
287    #[serde(
288        rename = "updated_by",
289        alias = "updatedBy",
290        skip_serializing_if = "::core::option::Option::is_none"
291    )]
292    pub updated_by: ::core::option::Option<::buffa::alloc::string::String>,
293    /// Indicates whether the principal is limited to retrieving metadata
294    /// for the associated object through the BROWSE privilege when include_browse
295    /// is enabled in the request.
296    ///
297    /// Field 1004: `browse_only`
298    #[serde(
299        rename = "browse_only",
300        alias = "browseOnly",
301        skip_serializing_if = "::core::option::Option::is_none"
302    )]
303    pub browse_only: ::core::option::Option<bool>,
304    #[serde(skip)]
305    #[doc(hidden)]
306    pub __buffa_unknown_fields: ::buffa::UnknownFields,
307}
308impl ::core::fmt::Debug for Catalog {
309    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
310        f.debug_struct("Catalog")
311            .field("name", &self.name)
312            .field("id", &self.id)
313            .field("owner", &self.owner)
314            .field("comment", &self.comment)
315            .field("properties", &self.properties)
316            .field("storage_root", &self.storage_root)
317            .field("provider_name", &self.provider_name)
318            .field("share_name", &self.share_name)
319            .field("catalog_type", &self.catalog_type)
320            .field("storage_location", &self.storage_location)
321            .field("created_at", &self.created_at)
322            .field("created_by", &self.created_by)
323            .field("updated_at", &self.updated_at)
324            .field("updated_by", &self.updated_by)
325            .field("browse_only", &self.browse_only)
326            .finish()
327    }
328}
329impl Catalog {
330    /// Protobuf type URL for this message, for use with `Any::pack` and
331    /// `Any::unpack_if`.
332    ///
333    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
334    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.Catalog";
335}
336impl Catalog {
337    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
338    #[inline]
339    ///Sets [`Self::id`] to `Some(value)`, consuming and returning `self`.
340    pub fn with_id(mut self, value: impl Into<::buffa::alloc::string::String>) -> Self {
341        self.id = Some(value.into());
342        self
343    }
344    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
345    #[inline]
346    ///Sets [`Self::owner`] to `Some(value)`, consuming and returning `self`.
347    pub fn with_owner(
348        mut self,
349        value: impl Into<::buffa::alloc::string::String>,
350    ) -> Self {
351        self.owner = Some(value.into());
352        self
353    }
354    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
355    #[inline]
356    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
357    pub fn with_comment(
358        mut self,
359        value: impl Into<::buffa::alloc::string::String>,
360    ) -> Self {
361        self.comment = Some(value.into());
362        self
363    }
364    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
365    #[inline]
366    ///Sets [`Self::storage_root`] to `Some(value)`, consuming and returning `self`.
367    pub fn with_storage_root(
368        mut self,
369        value: impl Into<::buffa::alloc::string::String>,
370    ) -> Self {
371        self.storage_root = Some(value.into());
372        self
373    }
374    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
375    #[inline]
376    ///Sets [`Self::provider_name`] to `Some(value)`, consuming and returning `self`.
377    pub fn with_provider_name(
378        mut self,
379        value: impl Into<::buffa::alloc::string::String>,
380    ) -> Self {
381        self.provider_name = Some(value.into());
382        self
383    }
384    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
385    #[inline]
386    ///Sets [`Self::share_name`] to `Some(value)`, consuming and returning `self`.
387    pub fn with_share_name(
388        mut self,
389        value: impl Into<::buffa::alloc::string::String>,
390    ) -> Self {
391        self.share_name = Some(value.into());
392        self
393    }
394    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
395    #[inline]
396    ///Sets [`Self::catalog_type`] to `Some(value)`, consuming and returning `self`.
397    pub fn with_catalog_type(
398        mut self,
399        value: impl Into<::buffa::EnumValue<CatalogType>>,
400    ) -> Self {
401        self.catalog_type = Some(value.into());
402        self
403    }
404    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
405    #[inline]
406    ///Sets [`Self::storage_location`] to `Some(value)`, consuming and returning `self`.
407    pub fn with_storage_location(
408        mut self,
409        value: impl Into<::buffa::alloc::string::String>,
410    ) -> Self {
411        self.storage_location = Some(value.into());
412        self
413    }
414    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
415    #[inline]
416    ///Sets [`Self::created_at`] to `Some(value)`, consuming and returning `self`.
417    pub fn with_created_at(mut self, value: i64) -> Self {
418        self.created_at = Some(value);
419        self
420    }
421    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
422    #[inline]
423    ///Sets [`Self::created_by`] to `Some(value)`, consuming and returning `self`.
424    pub fn with_created_by(
425        mut self,
426        value: impl Into<::buffa::alloc::string::String>,
427    ) -> Self {
428        self.created_by = Some(value.into());
429        self
430    }
431    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
432    #[inline]
433    ///Sets [`Self::updated_at`] to `Some(value)`, consuming and returning `self`.
434    pub fn with_updated_at(mut self, value: i64) -> Self {
435        self.updated_at = Some(value);
436        self
437    }
438    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
439    #[inline]
440    ///Sets [`Self::updated_by`] to `Some(value)`, consuming and returning `self`.
441    pub fn with_updated_by(
442        mut self,
443        value: impl Into<::buffa::alloc::string::String>,
444    ) -> Self {
445        self.updated_by = Some(value.into());
446        self
447    }
448    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
449    #[inline]
450    ///Sets [`Self::browse_only`] to `Some(value)`, consuming and returning `self`.
451    pub fn with_browse_only(mut self, value: bool) -> Self {
452        self.browse_only = Some(value);
453        self
454    }
455}
456impl ::buffa::DefaultInstance for Catalog {
457    fn default_instance() -> &'static Self {
458        static VALUE: ::buffa::__private::OnceBox<Catalog> = ::buffa::__private::OnceBox::new();
459        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
460    }
461}
462impl ::buffa::MessageName for Catalog {
463    const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
464    const NAME: &'static str = "Catalog";
465    const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.Catalog";
466    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.Catalog";
467}
468impl ::buffa::Message for Catalog {
469    /// Returns the total encoded size in bytes.
470    ///
471    /// The result is a `u32`; the protobuf specification requires all
472    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
473    /// compliant message will never overflow this type.
474    #[allow(clippy::let_and_return)]
475    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
476        #[allow(unused_imports)]
477        use ::buffa::Enumeration as _;
478        let mut size = 0u32;
479        if !self.name.is_empty() {
480            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
481        }
482        if let Some(ref v) = self.id {
483            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
484        }
485        if let Some(ref v) = self.owner {
486            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
487        }
488        if let Some(ref v) = self.comment {
489            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
490        }
491        #[allow(clippy::for_kv_map)]
492        for (k, v) in &self.properties {
493            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
494                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
495            size
496                += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
497                    + entry_size;
498        }
499        if let Some(ref v) = self.storage_root {
500            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
501        }
502        if let Some(ref v) = self.provider_name {
503            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
504        }
505        if let Some(ref v) = self.share_name {
506            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
507        }
508        if let Some(ref v) = self.catalog_type {
509            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
510        }
511        if let Some(ref v) = self.storage_location {
512            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
513        }
514        if let Some(v) = self.created_at {
515            size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
516        }
517        if let Some(ref v) = self.created_by {
518            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
519        }
520        if let Some(v) = self.updated_at {
521            size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
522        }
523        if let Some(ref v) = self.updated_by {
524            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
525        }
526        if self.browse_only.is_some() {
527            size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
528        }
529        size += self.__buffa_unknown_fields.encoded_len() as u32;
530        size
531    }
532    fn write_to(
533        &self,
534        _cache: &mut ::buffa::SizeCache,
535        buf: &mut impl ::buffa::bytes::BufMut,
536    ) {
537        #[allow(unused_imports)]
538        use ::buffa::Enumeration as _;
539        if !self.name.is_empty() {
540            ::buffa::encoding::Tag::new(
541                    1u32,
542                    ::buffa::encoding::WireType::LengthDelimited,
543                )
544                .encode(buf);
545            ::buffa::types::encode_string(&self.name, buf);
546        }
547        if let Some(ref v) = self.id {
548            ::buffa::encoding::Tag::new(
549                    2u32,
550                    ::buffa::encoding::WireType::LengthDelimited,
551                )
552                .encode(buf);
553            ::buffa::types::encode_string(v, buf);
554        }
555        if let Some(ref v) = self.owner {
556            ::buffa::encoding::Tag::new(
557                    3u32,
558                    ::buffa::encoding::WireType::LengthDelimited,
559                )
560                .encode(buf);
561            ::buffa::types::encode_string(v, buf);
562        }
563        if let Some(ref v) = self.comment {
564            ::buffa::encoding::Tag::new(
565                    4u32,
566                    ::buffa::encoding::WireType::LengthDelimited,
567                )
568                .encode(buf);
569            ::buffa::types::encode_string(v, buf);
570        }
571        for (k, v) in &self.properties {
572            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
573                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
574            ::buffa::encoding::Tag::new(
575                    5u32,
576                    ::buffa::encoding::WireType::LengthDelimited,
577                )
578                .encode(buf);
579            ::buffa::encoding::encode_varint(entry_size as u64, buf);
580            ::buffa::encoding::Tag::new(
581                    1u32,
582                    ::buffa::encoding::WireType::LengthDelimited,
583                )
584                .encode(buf);
585            ::buffa::types::encode_string(k, buf);
586            ::buffa::encoding::Tag::new(
587                    2u32,
588                    ::buffa::encoding::WireType::LengthDelimited,
589                )
590                .encode(buf);
591            ::buffa::types::encode_string(v, buf);
592        }
593        if let Some(ref v) = self.storage_root {
594            ::buffa::encoding::Tag::new(
595                    6u32,
596                    ::buffa::encoding::WireType::LengthDelimited,
597                )
598                .encode(buf);
599            ::buffa::types::encode_string(v, buf);
600        }
601        if let Some(ref v) = self.provider_name {
602            ::buffa::encoding::Tag::new(
603                    7u32,
604                    ::buffa::encoding::WireType::LengthDelimited,
605                )
606                .encode(buf);
607            ::buffa::types::encode_string(v, buf);
608        }
609        if let Some(ref v) = self.share_name {
610            ::buffa::encoding::Tag::new(
611                    8u32,
612                    ::buffa::encoding::WireType::LengthDelimited,
613                )
614                .encode(buf);
615            ::buffa::types::encode_string(v, buf);
616        }
617        if let Some(ref v) = self.catalog_type {
618            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
619                .encode(buf);
620            ::buffa::types::encode_int32(v.to_i32(), buf);
621        }
622        if let Some(ref v) = self.storage_location {
623            ::buffa::encoding::Tag::new(
624                    10u32,
625                    ::buffa::encoding::WireType::LengthDelimited,
626                )
627                .encode(buf);
628            ::buffa::types::encode_string(v, buf);
629        }
630        if let Some(v) = self.created_at {
631            ::buffa::encoding::Tag::new(1000u32, ::buffa::encoding::WireType::Varint)
632                .encode(buf);
633            ::buffa::types::encode_int64(v, buf);
634        }
635        if let Some(ref v) = self.created_by {
636            ::buffa::encoding::Tag::new(
637                    1001u32,
638                    ::buffa::encoding::WireType::LengthDelimited,
639                )
640                .encode(buf);
641            ::buffa::types::encode_string(v, buf);
642        }
643        if let Some(v) = self.updated_at {
644            ::buffa::encoding::Tag::new(1002u32, ::buffa::encoding::WireType::Varint)
645                .encode(buf);
646            ::buffa::types::encode_int64(v, buf);
647        }
648        if let Some(ref v) = self.updated_by {
649            ::buffa::encoding::Tag::new(
650                    1003u32,
651                    ::buffa::encoding::WireType::LengthDelimited,
652                )
653                .encode(buf);
654            ::buffa::types::encode_string(v, buf);
655        }
656        if let Some(v) = self.browse_only {
657            ::buffa::encoding::Tag::new(1004u32, ::buffa::encoding::WireType::Varint)
658                .encode(buf);
659            ::buffa::types::encode_bool(v, buf);
660        }
661        self.__buffa_unknown_fields.write_to(buf);
662    }
663    fn merge_field(
664        &mut self,
665        tag: ::buffa::encoding::Tag,
666        buf: &mut impl ::buffa::bytes::Buf,
667        depth: u32,
668    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
669        #[allow(unused_imports)]
670        use ::buffa::bytes::Buf as _;
671        #[allow(unused_imports)]
672        use ::buffa::Enumeration as _;
673        match tag.field_number() {
674            1u32 => {
675                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
676                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
677                        field_number: 1u32,
678                        expected: 2u8,
679                        actual: tag.wire_type() as u8,
680                    });
681                }
682                ::buffa::types::merge_string(&mut self.name, buf)?;
683            }
684            2u32 => {
685                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
686                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
687                        field_number: 2u32,
688                        expected: 2u8,
689                        actual: tag.wire_type() as u8,
690                    });
691                }
692                ::buffa::types::merge_string(
693                    self.id.get_or_insert_with(::buffa::alloc::string::String::new),
694                    buf,
695                )?;
696            }
697            3u32 => {
698                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
699                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
700                        field_number: 3u32,
701                        expected: 2u8,
702                        actual: tag.wire_type() as u8,
703                    });
704                }
705                ::buffa::types::merge_string(
706                    self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
707                    buf,
708                )?;
709            }
710            4u32 => {
711                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
712                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
713                        field_number: 4u32,
714                        expected: 2u8,
715                        actual: tag.wire_type() as u8,
716                    });
717                }
718                ::buffa::types::merge_string(
719                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
720                    buf,
721                )?;
722            }
723            5u32 => {
724                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
725                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
726                        field_number: 5u32,
727                        expected: 2u8,
728                        actual: tag.wire_type() as u8,
729                    });
730                }
731                let entry_len = ::buffa::encoding::decode_varint(buf)?;
732                let entry_len = usize::try_from(entry_len)
733                    .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
734                if buf.remaining() < entry_len {
735                    return ::core::result::Result::Err(
736                        ::buffa::DecodeError::UnexpectedEof,
737                    );
738                }
739                let entry_limit = buf.remaining() - entry_len;
740                let mut key = ::core::default::Default::default();
741                let mut val = ::core::default::Default::default();
742                while buf.remaining() > entry_limit {
743                    let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
744                    match entry_tag.field_number() {
745                        1 => {
746                            if entry_tag.wire_type()
747                                != ::buffa::encoding::WireType::LengthDelimited
748                            {
749                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
750                                    field_number: entry_tag.field_number(),
751                                    expected: 2u8,
752                                    actual: entry_tag.wire_type() as u8,
753                                });
754                            }
755                            key = ::buffa::types::decode_string(buf)?;
756                        }
757                        2 => {
758                            if entry_tag.wire_type()
759                                != ::buffa::encoding::WireType::LengthDelimited
760                            {
761                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
762                                    field_number: entry_tag.field_number(),
763                                    expected: 2u8,
764                                    actual: entry_tag.wire_type() as u8,
765                                });
766                            }
767                            val = ::buffa::types::decode_string(buf)?;
768                        }
769                        _ => {
770                            ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
771                        }
772                    }
773                }
774                if buf.remaining() != entry_limit {
775                    let remaining = buf.remaining();
776                    if remaining > entry_limit {
777                        buf.advance(remaining - entry_limit);
778                    } else {
779                        return ::core::result::Result::Err(
780                            ::buffa::DecodeError::UnexpectedEof,
781                        );
782                    }
783                }
784                self.properties.insert(key, val);
785            }
786            6u32 => {
787                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
788                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
789                        field_number: 6u32,
790                        expected: 2u8,
791                        actual: tag.wire_type() as u8,
792                    });
793                }
794                ::buffa::types::merge_string(
795                    self
796                        .storage_root
797                        .get_or_insert_with(::buffa::alloc::string::String::new),
798                    buf,
799                )?;
800            }
801            7u32 => {
802                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
803                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
804                        field_number: 7u32,
805                        expected: 2u8,
806                        actual: tag.wire_type() as u8,
807                    });
808                }
809                ::buffa::types::merge_string(
810                    self
811                        .provider_name
812                        .get_or_insert_with(::buffa::alloc::string::String::new),
813                    buf,
814                )?;
815            }
816            8u32 => {
817                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
818                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
819                        field_number: 8u32,
820                        expected: 2u8,
821                        actual: tag.wire_type() as u8,
822                    });
823                }
824                ::buffa::types::merge_string(
825                    self
826                        .share_name
827                        .get_or_insert_with(::buffa::alloc::string::String::new),
828                    buf,
829                )?;
830            }
831            9u32 => {
832                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
833                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
834                        field_number: 9u32,
835                        expected: 0u8,
836                        actual: tag.wire_type() as u8,
837                    });
838                }
839                self.catalog_type = ::core::option::Option::Some(
840                    ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?),
841                );
842            }
843            10u32 => {
844                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
845                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
846                        field_number: 10u32,
847                        expected: 2u8,
848                        actual: tag.wire_type() as u8,
849                    });
850                }
851                ::buffa::types::merge_string(
852                    self
853                        .storage_location
854                        .get_or_insert_with(::buffa::alloc::string::String::new),
855                    buf,
856                )?;
857            }
858            1000u32 => {
859                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
860                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
861                        field_number: 1000u32,
862                        expected: 0u8,
863                        actual: tag.wire_type() as u8,
864                    });
865                }
866                self.created_at = ::core::option::Option::Some(
867                    ::buffa::types::decode_int64(buf)?,
868                );
869            }
870            1001u32 => {
871                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
872                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
873                        field_number: 1001u32,
874                        expected: 2u8,
875                        actual: tag.wire_type() as u8,
876                    });
877                }
878                ::buffa::types::merge_string(
879                    self
880                        .created_by
881                        .get_or_insert_with(::buffa::alloc::string::String::new),
882                    buf,
883                )?;
884            }
885            1002u32 => {
886                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
887                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
888                        field_number: 1002u32,
889                        expected: 0u8,
890                        actual: tag.wire_type() as u8,
891                    });
892                }
893                self.updated_at = ::core::option::Option::Some(
894                    ::buffa::types::decode_int64(buf)?,
895                );
896            }
897            1003u32 => {
898                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
899                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
900                        field_number: 1003u32,
901                        expected: 2u8,
902                        actual: tag.wire_type() as u8,
903                    });
904                }
905                ::buffa::types::merge_string(
906                    self
907                        .updated_by
908                        .get_or_insert_with(::buffa::alloc::string::String::new),
909                    buf,
910                )?;
911            }
912            1004u32 => {
913                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
914                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
915                        field_number: 1004u32,
916                        expected: 0u8,
917                        actual: tag.wire_type() as u8,
918                    });
919                }
920                self.browse_only = ::core::option::Option::Some(
921                    ::buffa::types::decode_bool(buf)?,
922                );
923            }
924            _ => {
925                self.__buffa_unknown_fields
926                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
927            }
928        }
929        ::core::result::Result::Ok(())
930    }
931    fn clear(&mut self) {
932        self.name.clear();
933        self.id = ::core::option::Option::None;
934        self.owner = ::core::option::Option::None;
935        self.comment = ::core::option::Option::None;
936        self.properties.clear();
937        self.storage_root = ::core::option::Option::None;
938        self.provider_name = ::core::option::Option::None;
939        self.share_name = ::core::option::Option::None;
940        self.catalog_type = ::core::option::Option::None;
941        self.storage_location = ::core::option::Option::None;
942        self.created_at = ::core::option::Option::None;
943        self.created_by = ::core::option::Option::None;
944        self.updated_at = ::core::option::Option::None;
945        self.updated_by = ::core::option::Option::None;
946        self.browse_only = ::core::option::Option::None;
947        self.__buffa_unknown_fields.clear();
948    }
949}
950impl ::buffa::ExtensionSet for Catalog {
951    const PROTO_FQN: &'static str = "unitycatalog.catalogs.v1.Catalog";
952    fn unknown_fields(&self) -> &::buffa::UnknownFields {
953        &self.__buffa_unknown_fields
954    }
955    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
956        &mut self.__buffa_unknown_fields
957    }
958}
959impl ::buffa::json_helpers::ProtoElemJson for Catalog {
960    fn serialize_proto_json<S: ::serde::Serializer>(
961        v: &Self,
962        s: S,
963    ) -> ::core::result::Result<S::Ok, S::Error> {
964        ::serde::Serialize::serialize(v, s)
965    }
966    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
967        d: D,
968    ) -> ::core::result::Result<Self, D::Error> {
969        <Self as ::serde::Deserialize>::deserialize(d)
970    }
971}
972#[doc(hidden)]
973pub const __CATALOG_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
974    type_url: "type.googleapis.com/unitycatalog.catalogs.v1.Catalog",
975    to_json: ::buffa::type_registry::any_to_json::<Catalog>,
976    from_json: ::buffa::type_registry::any_from_json::<Catalog>,
977    is_wkt: false,
978};
979/// List catalogs
980#[derive(Clone, PartialEq, Default)]
981#[derive(::serde::Serialize, ::serde::Deserialize)]
982#[serde(default)]
983pub struct ListCatalogsRequest {
984    /// The maximum number of results per page that should be returned.
985    ///
986    /// Field 2: `max_results`
987    #[serde(
988        rename = "max_results",
989        alias = "maxResults",
990        with = "::buffa::json_helpers::opt_int32",
991        skip_serializing_if = "::core::option::Option::is_none"
992    )]
993    pub max_results: ::core::option::Option<i32>,
994    /// Opaque pagination token to go to next page based on previous query.
995    ///
996    /// Field 3: `page_token`
997    #[serde(
998        rename = "page_token",
999        alias = "pageToken",
1000        skip_serializing_if = "::core::option::Option::is_none"
1001    )]
1002    pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
1003    #[serde(skip)]
1004    #[doc(hidden)]
1005    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1006}
1007impl ::core::fmt::Debug for ListCatalogsRequest {
1008    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1009        f.debug_struct("ListCatalogsRequest")
1010            .field("max_results", &self.max_results)
1011            .field("page_token", &self.page_token)
1012            .finish()
1013    }
1014}
1015impl ListCatalogsRequest {
1016    /// Protobuf type URL for this message, for use with `Any::pack` and
1017    /// `Any::unpack_if`.
1018    ///
1019    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1020    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.ListCatalogsRequest";
1021}
1022impl ListCatalogsRequest {
1023    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1024    #[inline]
1025    ///Sets [`Self::max_results`] to `Some(value)`, consuming and returning `self`.
1026    pub fn with_max_results(mut self, value: i32) -> Self {
1027        self.max_results = Some(value);
1028        self
1029    }
1030    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1031    #[inline]
1032    ///Sets [`Self::page_token`] to `Some(value)`, consuming and returning `self`.
1033    pub fn with_page_token(
1034        mut self,
1035        value: impl Into<::buffa::alloc::string::String>,
1036    ) -> Self {
1037        self.page_token = Some(value.into());
1038        self
1039    }
1040}
1041impl ::buffa::DefaultInstance for ListCatalogsRequest {
1042    fn default_instance() -> &'static Self {
1043        static VALUE: ::buffa::__private::OnceBox<ListCatalogsRequest> = ::buffa::__private::OnceBox::new();
1044        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1045    }
1046}
1047impl ::buffa::MessageName for ListCatalogsRequest {
1048    const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
1049    const NAME: &'static str = "ListCatalogsRequest";
1050    const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.ListCatalogsRequest";
1051    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.ListCatalogsRequest";
1052}
1053impl ::buffa::Message for ListCatalogsRequest {
1054    /// Returns the total encoded size in bytes.
1055    ///
1056    /// The result is a `u32`; the protobuf specification requires all
1057    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1058    /// compliant message will never overflow this type.
1059    #[allow(clippy::let_and_return)]
1060    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1061        #[allow(unused_imports)]
1062        use ::buffa::Enumeration as _;
1063        let mut size = 0u32;
1064        if let Some(v) = self.max_results {
1065            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
1066        }
1067        if let Some(ref v) = self.page_token {
1068            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1069        }
1070        size += self.__buffa_unknown_fields.encoded_len() as u32;
1071        size
1072    }
1073    fn write_to(
1074        &self,
1075        _cache: &mut ::buffa::SizeCache,
1076        buf: &mut impl ::buffa::bytes::BufMut,
1077    ) {
1078        #[allow(unused_imports)]
1079        use ::buffa::Enumeration as _;
1080        if let Some(v) = self.max_results {
1081            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1082                .encode(buf);
1083            ::buffa::types::encode_int32(v, buf);
1084        }
1085        if let Some(ref v) = self.page_token {
1086            ::buffa::encoding::Tag::new(
1087                    3u32,
1088                    ::buffa::encoding::WireType::LengthDelimited,
1089                )
1090                .encode(buf);
1091            ::buffa::types::encode_string(v, buf);
1092        }
1093        self.__buffa_unknown_fields.write_to(buf);
1094    }
1095    fn merge_field(
1096        &mut self,
1097        tag: ::buffa::encoding::Tag,
1098        buf: &mut impl ::buffa::bytes::Buf,
1099        depth: u32,
1100    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1101        #[allow(unused_imports)]
1102        use ::buffa::bytes::Buf as _;
1103        #[allow(unused_imports)]
1104        use ::buffa::Enumeration as _;
1105        match tag.field_number() {
1106            2u32 => {
1107                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1108                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1109                        field_number: 2u32,
1110                        expected: 0u8,
1111                        actual: tag.wire_type() as u8,
1112                    });
1113                }
1114                self.max_results = ::core::option::Option::Some(
1115                    ::buffa::types::decode_int32(buf)?,
1116                );
1117            }
1118            3u32 => {
1119                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1120                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1121                        field_number: 3u32,
1122                        expected: 2u8,
1123                        actual: tag.wire_type() as u8,
1124                    });
1125                }
1126                ::buffa::types::merge_string(
1127                    self
1128                        .page_token
1129                        .get_or_insert_with(::buffa::alloc::string::String::new),
1130                    buf,
1131                )?;
1132            }
1133            _ => {
1134                self.__buffa_unknown_fields
1135                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1136            }
1137        }
1138        ::core::result::Result::Ok(())
1139    }
1140    fn clear(&mut self) {
1141        self.max_results = ::core::option::Option::None;
1142        self.page_token = ::core::option::Option::None;
1143        self.__buffa_unknown_fields.clear();
1144    }
1145}
1146impl ::buffa::ExtensionSet for ListCatalogsRequest {
1147    const PROTO_FQN: &'static str = "unitycatalog.catalogs.v1.ListCatalogsRequest";
1148    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1149        &self.__buffa_unknown_fields
1150    }
1151    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1152        &mut self.__buffa_unknown_fields
1153    }
1154}
1155impl ::buffa::json_helpers::ProtoElemJson for ListCatalogsRequest {
1156    fn serialize_proto_json<S: ::serde::Serializer>(
1157        v: &Self,
1158        s: S,
1159    ) -> ::core::result::Result<S::Ok, S::Error> {
1160        ::serde::Serialize::serialize(v, s)
1161    }
1162    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1163        d: D,
1164    ) -> ::core::result::Result<Self, D::Error> {
1165        <Self as ::serde::Deserialize>::deserialize(d)
1166    }
1167}
1168#[doc(hidden)]
1169pub const __LIST_CATALOGS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1170    type_url: "type.googleapis.com/unitycatalog.catalogs.v1.ListCatalogsRequest",
1171    to_json: ::buffa::type_registry::any_to_json::<ListCatalogsRequest>,
1172    from_json: ::buffa::type_registry::any_from_json::<ListCatalogsRequest>,
1173    is_wkt: false,
1174};
1175/// List catalogs response.
1176#[derive(Clone, PartialEq, Default)]
1177#[derive(::serde::Serialize, ::serde::Deserialize)]
1178#[serde(default)]
1179pub struct ListCatalogsResponse {
1180    /// The catalogs returned.
1181    ///
1182    /// Field 1: `catalogs`
1183    #[serde(
1184        rename = "catalogs",
1185        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1186        deserialize_with = "::buffa::json_helpers::null_as_default"
1187    )]
1188    pub catalogs: ::buffa::alloc::vec::Vec<Catalog>,
1189    /// The next_page_token value to include in the next List request.
1190    ///
1191    /// Field 2: `next_page_token`
1192    #[serde(
1193        rename = "next_page_token",
1194        alias = "nextPageToken",
1195        skip_serializing_if = "::core::option::Option::is_none"
1196    )]
1197    pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
1198    #[serde(skip)]
1199    #[doc(hidden)]
1200    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1201}
1202impl ::core::fmt::Debug for ListCatalogsResponse {
1203    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1204        f.debug_struct("ListCatalogsResponse")
1205            .field("catalogs", &self.catalogs)
1206            .field("next_page_token", &self.next_page_token)
1207            .finish()
1208    }
1209}
1210impl ListCatalogsResponse {
1211    /// Protobuf type URL for this message, for use with `Any::pack` and
1212    /// `Any::unpack_if`.
1213    ///
1214    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1215    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.ListCatalogsResponse";
1216}
1217impl ListCatalogsResponse {
1218    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1219    #[inline]
1220    ///Sets [`Self::next_page_token`] to `Some(value)`, consuming and returning `self`.
1221    pub fn with_next_page_token(
1222        mut self,
1223        value: impl Into<::buffa::alloc::string::String>,
1224    ) -> Self {
1225        self.next_page_token = Some(value.into());
1226        self
1227    }
1228}
1229impl ::buffa::DefaultInstance for ListCatalogsResponse {
1230    fn default_instance() -> &'static Self {
1231        static VALUE: ::buffa::__private::OnceBox<ListCatalogsResponse> = ::buffa::__private::OnceBox::new();
1232        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1233    }
1234}
1235impl ::buffa::MessageName for ListCatalogsResponse {
1236    const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
1237    const NAME: &'static str = "ListCatalogsResponse";
1238    const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.ListCatalogsResponse";
1239    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.ListCatalogsResponse";
1240}
1241impl ::buffa::Message for ListCatalogsResponse {
1242    /// Returns the total encoded size in bytes.
1243    ///
1244    /// The result is a `u32`; the protobuf specification requires all
1245    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1246    /// compliant message will never overflow this type.
1247    #[allow(clippy::let_and_return)]
1248    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1249        #[allow(unused_imports)]
1250        use ::buffa::Enumeration as _;
1251        let mut size = 0u32;
1252        for v in &self.catalogs {
1253            let __slot = __cache.reserve();
1254            let inner_size = v.compute_size(__cache);
1255            __cache.set(__slot, inner_size);
1256            size
1257                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1258                    + inner_size;
1259        }
1260        if let Some(ref v) = self.next_page_token {
1261            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1262        }
1263        size += self.__buffa_unknown_fields.encoded_len() as u32;
1264        size
1265    }
1266    fn write_to(
1267        &self,
1268        __cache: &mut ::buffa::SizeCache,
1269        buf: &mut impl ::buffa::bytes::BufMut,
1270    ) {
1271        #[allow(unused_imports)]
1272        use ::buffa::Enumeration as _;
1273        for v in &self.catalogs {
1274            ::buffa::encoding::Tag::new(
1275                    1u32,
1276                    ::buffa::encoding::WireType::LengthDelimited,
1277                )
1278                .encode(buf);
1279            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1280            v.write_to(__cache, buf);
1281        }
1282        if let Some(ref v) = self.next_page_token {
1283            ::buffa::encoding::Tag::new(
1284                    2u32,
1285                    ::buffa::encoding::WireType::LengthDelimited,
1286                )
1287                .encode(buf);
1288            ::buffa::types::encode_string(v, buf);
1289        }
1290        self.__buffa_unknown_fields.write_to(buf);
1291    }
1292    fn merge_field(
1293        &mut self,
1294        tag: ::buffa::encoding::Tag,
1295        buf: &mut impl ::buffa::bytes::Buf,
1296        depth: u32,
1297    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1298        #[allow(unused_imports)]
1299        use ::buffa::bytes::Buf as _;
1300        #[allow(unused_imports)]
1301        use ::buffa::Enumeration as _;
1302        match tag.field_number() {
1303            1u32 => {
1304                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1305                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1306                        field_number: 1u32,
1307                        expected: 2u8,
1308                        actual: tag.wire_type() as u8,
1309                    });
1310                }
1311                let mut elem = ::core::default::Default::default();
1312                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1313                self.catalogs.push(elem);
1314            }
1315            2u32 => {
1316                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1317                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1318                        field_number: 2u32,
1319                        expected: 2u8,
1320                        actual: tag.wire_type() as u8,
1321                    });
1322                }
1323                ::buffa::types::merge_string(
1324                    self
1325                        .next_page_token
1326                        .get_or_insert_with(::buffa::alloc::string::String::new),
1327                    buf,
1328                )?;
1329            }
1330            _ => {
1331                self.__buffa_unknown_fields
1332                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1333            }
1334        }
1335        ::core::result::Result::Ok(())
1336    }
1337    fn clear(&mut self) {
1338        self.catalogs.clear();
1339        self.next_page_token = ::core::option::Option::None;
1340        self.__buffa_unknown_fields.clear();
1341    }
1342}
1343impl ::buffa::ExtensionSet for ListCatalogsResponse {
1344    const PROTO_FQN: &'static str = "unitycatalog.catalogs.v1.ListCatalogsResponse";
1345    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1346        &self.__buffa_unknown_fields
1347    }
1348    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1349        &mut self.__buffa_unknown_fields
1350    }
1351}
1352impl ::buffa::json_helpers::ProtoElemJson for ListCatalogsResponse {
1353    fn serialize_proto_json<S: ::serde::Serializer>(
1354        v: &Self,
1355        s: S,
1356    ) -> ::core::result::Result<S::Ok, S::Error> {
1357        ::serde::Serialize::serialize(v, s)
1358    }
1359    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1360        d: D,
1361    ) -> ::core::result::Result<Self, D::Error> {
1362        <Self as ::serde::Deserialize>::deserialize(d)
1363    }
1364}
1365#[doc(hidden)]
1366pub const __LIST_CATALOGS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1367    type_url: "type.googleapis.com/unitycatalog.catalogs.v1.ListCatalogsResponse",
1368    to_json: ::buffa::type_registry::any_to_json::<ListCatalogsResponse>,
1369    from_json: ::buffa::type_registry::any_from_json::<ListCatalogsResponse>,
1370    is_wkt: false,
1371};
1372/// Create a new catalog
1373#[derive(Clone, PartialEq, Default)]
1374#[derive(::serde::Serialize, ::serde::Deserialize)]
1375#[serde(default)]
1376pub struct CreateCatalogRequest {
1377    /// Name of catalog.
1378    ///
1379    /// Field 1: `name`
1380    #[serde(
1381        rename = "name",
1382        with = "::buffa::json_helpers::proto_string",
1383        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1384    )]
1385    pub name: ::buffa::alloc::string::String,
1386    /// User-provided free-form text description.
1387    ///
1388    /// Field 2: `comment`
1389    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
1390    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
1391    /// A map of key-value properties attached to the securable.
1392    ///
1393    /// Field 3: `properties`
1394    #[serde(
1395        rename = "properties",
1396        skip_serializing_if = "::buffa::__private::HashMap::is_empty",
1397        deserialize_with = "::buffa::json_helpers::null_as_default"
1398    )]
1399    pub properties: ::buffa::__private::HashMap<
1400        ::buffa::alloc::string::String,
1401        ::buffa::alloc::string::String,
1402    >,
1403    /// Storage root URL for managed tables within catalog.
1404    ///
1405    /// Field 4: `storage_root`
1406    #[serde(
1407        rename = "storage_root",
1408        alias = "storageRoot",
1409        skip_serializing_if = "::core::option::Option::is_none"
1410    )]
1411    pub storage_root: ::core::option::Option<::buffa::alloc::string::String>,
1412    /// The name of delta sharing provider.
1413    ///
1414    /// A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server.
1415    ///
1416    /// Field 5: `provider_name`
1417    #[serde(
1418        rename = "provider_name",
1419        alias = "providerName",
1420        skip_serializing_if = "::core::option::Option::is_none"
1421    )]
1422    pub provider_name: ::core::option::Option<::buffa::alloc::string::String>,
1423    /// The name of the share under the share provider.
1424    ///
1425    /// Field 6: `share_name`
1426    #[serde(
1427        rename = "share_name",
1428        alias = "shareName",
1429        skip_serializing_if = "::core::option::Option::is_none"
1430    )]
1431    pub share_name: ::core::option::Option<::buffa::alloc::string::String>,
1432    #[serde(skip)]
1433    #[doc(hidden)]
1434    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1435}
1436impl ::core::fmt::Debug for CreateCatalogRequest {
1437    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1438        f.debug_struct("CreateCatalogRequest")
1439            .field("name", &self.name)
1440            .field("comment", &self.comment)
1441            .field("properties", &self.properties)
1442            .field("storage_root", &self.storage_root)
1443            .field("provider_name", &self.provider_name)
1444            .field("share_name", &self.share_name)
1445            .finish()
1446    }
1447}
1448impl CreateCatalogRequest {
1449    /// Protobuf type URL for this message, for use with `Any::pack` and
1450    /// `Any::unpack_if`.
1451    ///
1452    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1453    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.CreateCatalogRequest";
1454}
1455impl CreateCatalogRequest {
1456    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1457    #[inline]
1458    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
1459    pub fn with_comment(
1460        mut self,
1461        value: impl Into<::buffa::alloc::string::String>,
1462    ) -> Self {
1463        self.comment = Some(value.into());
1464        self
1465    }
1466    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1467    #[inline]
1468    ///Sets [`Self::storage_root`] to `Some(value)`, consuming and returning `self`.
1469    pub fn with_storage_root(
1470        mut self,
1471        value: impl Into<::buffa::alloc::string::String>,
1472    ) -> Self {
1473        self.storage_root = Some(value.into());
1474        self
1475    }
1476    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1477    #[inline]
1478    ///Sets [`Self::provider_name`] to `Some(value)`, consuming and returning `self`.
1479    pub fn with_provider_name(
1480        mut self,
1481        value: impl Into<::buffa::alloc::string::String>,
1482    ) -> Self {
1483        self.provider_name = Some(value.into());
1484        self
1485    }
1486    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1487    #[inline]
1488    ///Sets [`Self::share_name`] to `Some(value)`, consuming and returning `self`.
1489    pub fn with_share_name(
1490        mut self,
1491        value: impl Into<::buffa::alloc::string::String>,
1492    ) -> Self {
1493        self.share_name = Some(value.into());
1494        self
1495    }
1496}
1497impl ::buffa::DefaultInstance for CreateCatalogRequest {
1498    fn default_instance() -> &'static Self {
1499        static VALUE: ::buffa::__private::OnceBox<CreateCatalogRequest> = ::buffa::__private::OnceBox::new();
1500        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1501    }
1502}
1503impl ::buffa::MessageName for CreateCatalogRequest {
1504    const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
1505    const NAME: &'static str = "CreateCatalogRequest";
1506    const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.CreateCatalogRequest";
1507    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.CreateCatalogRequest";
1508}
1509impl ::buffa::Message for CreateCatalogRequest {
1510    /// Returns the total encoded size in bytes.
1511    ///
1512    /// The result is a `u32`; the protobuf specification requires all
1513    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1514    /// compliant message will never overflow this type.
1515    #[allow(clippy::let_and_return)]
1516    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1517        #[allow(unused_imports)]
1518        use ::buffa::Enumeration as _;
1519        let mut size = 0u32;
1520        if !self.name.is_empty() {
1521            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1522        }
1523        if let Some(ref v) = self.comment {
1524            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1525        }
1526        #[allow(clippy::for_kv_map)]
1527        for (k, v) in &self.properties {
1528            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
1529                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1530            size
1531                += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
1532                    + entry_size;
1533        }
1534        if let Some(ref v) = self.storage_root {
1535            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1536        }
1537        if let Some(ref v) = self.provider_name {
1538            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1539        }
1540        if let Some(ref v) = self.share_name {
1541            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1542        }
1543        size += self.__buffa_unknown_fields.encoded_len() as u32;
1544        size
1545    }
1546    fn write_to(
1547        &self,
1548        _cache: &mut ::buffa::SizeCache,
1549        buf: &mut impl ::buffa::bytes::BufMut,
1550    ) {
1551        #[allow(unused_imports)]
1552        use ::buffa::Enumeration as _;
1553        if !self.name.is_empty() {
1554            ::buffa::encoding::Tag::new(
1555                    1u32,
1556                    ::buffa::encoding::WireType::LengthDelimited,
1557                )
1558                .encode(buf);
1559            ::buffa::types::encode_string(&self.name, buf);
1560        }
1561        if let Some(ref v) = self.comment {
1562            ::buffa::encoding::Tag::new(
1563                    2u32,
1564                    ::buffa::encoding::WireType::LengthDelimited,
1565                )
1566                .encode(buf);
1567            ::buffa::types::encode_string(v, buf);
1568        }
1569        for (k, v) in &self.properties {
1570            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
1571                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1572            ::buffa::encoding::Tag::new(
1573                    3u32,
1574                    ::buffa::encoding::WireType::LengthDelimited,
1575                )
1576                .encode(buf);
1577            ::buffa::encoding::encode_varint(entry_size as u64, buf);
1578            ::buffa::encoding::Tag::new(
1579                    1u32,
1580                    ::buffa::encoding::WireType::LengthDelimited,
1581                )
1582                .encode(buf);
1583            ::buffa::types::encode_string(k, buf);
1584            ::buffa::encoding::Tag::new(
1585                    2u32,
1586                    ::buffa::encoding::WireType::LengthDelimited,
1587                )
1588                .encode(buf);
1589            ::buffa::types::encode_string(v, buf);
1590        }
1591        if let Some(ref v) = self.storage_root {
1592            ::buffa::encoding::Tag::new(
1593                    4u32,
1594                    ::buffa::encoding::WireType::LengthDelimited,
1595                )
1596                .encode(buf);
1597            ::buffa::types::encode_string(v, buf);
1598        }
1599        if let Some(ref v) = self.provider_name {
1600            ::buffa::encoding::Tag::new(
1601                    5u32,
1602                    ::buffa::encoding::WireType::LengthDelimited,
1603                )
1604                .encode(buf);
1605            ::buffa::types::encode_string(v, buf);
1606        }
1607        if let Some(ref v) = self.share_name {
1608            ::buffa::encoding::Tag::new(
1609                    6u32,
1610                    ::buffa::encoding::WireType::LengthDelimited,
1611                )
1612                .encode(buf);
1613            ::buffa::types::encode_string(v, buf);
1614        }
1615        self.__buffa_unknown_fields.write_to(buf);
1616    }
1617    fn merge_field(
1618        &mut self,
1619        tag: ::buffa::encoding::Tag,
1620        buf: &mut impl ::buffa::bytes::Buf,
1621        depth: u32,
1622    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1623        #[allow(unused_imports)]
1624        use ::buffa::bytes::Buf as _;
1625        #[allow(unused_imports)]
1626        use ::buffa::Enumeration as _;
1627        match tag.field_number() {
1628            1u32 => {
1629                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1630                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1631                        field_number: 1u32,
1632                        expected: 2u8,
1633                        actual: tag.wire_type() as u8,
1634                    });
1635                }
1636                ::buffa::types::merge_string(&mut self.name, buf)?;
1637            }
1638            2u32 => {
1639                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1640                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1641                        field_number: 2u32,
1642                        expected: 2u8,
1643                        actual: tag.wire_type() as u8,
1644                    });
1645                }
1646                ::buffa::types::merge_string(
1647                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
1648                    buf,
1649                )?;
1650            }
1651            3u32 => {
1652                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1653                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1654                        field_number: 3u32,
1655                        expected: 2u8,
1656                        actual: tag.wire_type() as u8,
1657                    });
1658                }
1659                let entry_len = ::buffa::encoding::decode_varint(buf)?;
1660                let entry_len = usize::try_from(entry_len)
1661                    .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
1662                if buf.remaining() < entry_len {
1663                    return ::core::result::Result::Err(
1664                        ::buffa::DecodeError::UnexpectedEof,
1665                    );
1666                }
1667                let entry_limit = buf.remaining() - entry_len;
1668                let mut key = ::core::default::Default::default();
1669                let mut val = ::core::default::Default::default();
1670                while buf.remaining() > entry_limit {
1671                    let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
1672                    match entry_tag.field_number() {
1673                        1 => {
1674                            if entry_tag.wire_type()
1675                                != ::buffa::encoding::WireType::LengthDelimited
1676                            {
1677                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1678                                    field_number: entry_tag.field_number(),
1679                                    expected: 2u8,
1680                                    actual: entry_tag.wire_type() as u8,
1681                                });
1682                            }
1683                            key = ::buffa::types::decode_string(buf)?;
1684                        }
1685                        2 => {
1686                            if entry_tag.wire_type()
1687                                != ::buffa::encoding::WireType::LengthDelimited
1688                            {
1689                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1690                                    field_number: entry_tag.field_number(),
1691                                    expected: 2u8,
1692                                    actual: entry_tag.wire_type() as u8,
1693                                });
1694                            }
1695                            val = ::buffa::types::decode_string(buf)?;
1696                        }
1697                        _ => {
1698                            ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
1699                        }
1700                    }
1701                }
1702                if buf.remaining() != entry_limit {
1703                    let remaining = buf.remaining();
1704                    if remaining > entry_limit {
1705                        buf.advance(remaining - entry_limit);
1706                    } else {
1707                        return ::core::result::Result::Err(
1708                            ::buffa::DecodeError::UnexpectedEof,
1709                        );
1710                    }
1711                }
1712                self.properties.insert(key, val);
1713            }
1714            4u32 => {
1715                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1716                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1717                        field_number: 4u32,
1718                        expected: 2u8,
1719                        actual: tag.wire_type() as u8,
1720                    });
1721                }
1722                ::buffa::types::merge_string(
1723                    self
1724                        .storage_root
1725                        .get_or_insert_with(::buffa::alloc::string::String::new),
1726                    buf,
1727                )?;
1728            }
1729            5u32 => {
1730                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1731                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1732                        field_number: 5u32,
1733                        expected: 2u8,
1734                        actual: tag.wire_type() as u8,
1735                    });
1736                }
1737                ::buffa::types::merge_string(
1738                    self
1739                        .provider_name
1740                        .get_or_insert_with(::buffa::alloc::string::String::new),
1741                    buf,
1742                )?;
1743            }
1744            6u32 => {
1745                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1746                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1747                        field_number: 6u32,
1748                        expected: 2u8,
1749                        actual: tag.wire_type() as u8,
1750                    });
1751                }
1752                ::buffa::types::merge_string(
1753                    self
1754                        .share_name
1755                        .get_or_insert_with(::buffa::alloc::string::String::new),
1756                    buf,
1757                )?;
1758            }
1759            _ => {
1760                self.__buffa_unknown_fields
1761                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1762            }
1763        }
1764        ::core::result::Result::Ok(())
1765    }
1766    fn clear(&mut self) {
1767        self.name.clear();
1768        self.comment = ::core::option::Option::None;
1769        self.properties.clear();
1770        self.storage_root = ::core::option::Option::None;
1771        self.provider_name = ::core::option::Option::None;
1772        self.share_name = ::core::option::Option::None;
1773        self.__buffa_unknown_fields.clear();
1774    }
1775}
1776impl ::buffa::ExtensionSet for CreateCatalogRequest {
1777    const PROTO_FQN: &'static str = "unitycatalog.catalogs.v1.CreateCatalogRequest";
1778    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1779        &self.__buffa_unknown_fields
1780    }
1781    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1782        &mut self.__buffa_unknown_fields
1783    }
1784}
1785impl ::buffa::json_helpers::ProtoElemJson for CreateCatalogRequest {
1786    fn serialize_proto_json<S: ::serde::Serializer>(
1787        v: &Self,
1788        s: S,
1789    ) -> ::core::result::Result<S::Ok, S::Error> {
1790        ::serde::Serialize::serialize(v, s)
1791    }
1792    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1793        d: D,
1794    ) -> ::core::result::Result<Self, D::Error> {
1795        <Self as ::serde::Deserialize>::deserialize(d)
1796    }
1797}
1798#[doc(hidden)]
1799pub const __CREATE_CATALOG_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1800    type_url: "type.googleapis.com/unitycatalog.catalogs.v1.CreateCatalogRequest",
1801    to_json: ::buffa::type_registry::any_to_json::<CreateCatalogRequest>,
1802    from_json: ::buffa::type_registry::any_from_json::<CreateCatalogRequest>,
1803    is_wkt: false,
1804};
1805/// Get a catalog
1806#[derive(Clone, PartialEq, Default)]
1807#[derive(::serde::Serialize, ::serde::Deserialize)]
1808#[serde(default)]
1809pub struct GetCatalogRequest {
1810    /// Name of catalog.
1811    ///
1812    /// Field 1: `name`
1813    #[serde(
1814        rename = "name",
1815        with = "::buffa::json_helpers::proto_string",
1816        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1817    )]
1818    pub name: ::buffa::alloc::string::String,
1819    /// Whether to include catalogs in the response for which the principal can only access selective metadata for
1820    ///
1821    /// Field 2: `include_browse`
1822    #[serde(
1823        rename = "include_browse",
1824        alias = "includeBrowse",
1825        skip_serializing_if = "::core::option::Option::is_none"
1826    )]
1827    pub include_browse: ::core::option::Option<bool>,
1828    #[serde(skip)]
1829    #[doc(hidden)]
1830    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1831}
1832impl ::core::fmt::Debug for GetCatalogRequest {
1833    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1834        f.debug_struct("GetCatalogRequest")
1835            .field("name", &self.name)
1836            .field("include_browse", &self.include_browse)
1837            .finish()
1838    }
1839}
1840impl GetCatalogRequest {
1841    /// Protobuf type URL for this message, for use with `Any::pack` and
1842    /// `Any::unpack_if`.
1843    ///
1844    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1845    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.GetCatalogRequest";
1846}
1847impl GetCatalogRequest {
1848    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1849    #[inline]
1850    ///Sets [`Self::include_browse`] to `Some(value)`, consuming and returning `self`.
1851    pub fn with_include_browse(mut self, value: bool) -> Self {
1852        self.include_browse = Some(value);
1853        self
1854    }
1855}
1856impl ::buffa::DefaultInstance for GetCatalogRequest {
1857    fn default_instance() -> &'static Self {
1858        static VALUE: ::buffa::__private::OnceBox<GetCatalogRequest> = ::buffa::__private::OnceBox::new();
1859        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1860    }
1861}
1862impl ::buffa::MessageName for GetCatalogRequest {
1863    const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
1864    const NAME: &'static str = "GetCatalogRequest";
1865    const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.GetCatalogRequest";
1866    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.GetCatalogRequest";
1867}
1868impl ::buffa::Message for GetCatalogRequest {
1869    /// Returns the total encoded size in bytes.
1870    ///
1871    /// The result is a `u32`; the protobuf specification requires all
1872    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1873    /// compliant message will never overflow this type.
1874    #[allow(clippy::let_and_return)]
1875    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1876        #[allow(unused_imports)]
1877        use ::buffa::Enumeration as _;
1878        let mut size = 0u32;
1879        if !self.name.is_empty() {
1880            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1881        }
1882        if self.include_browse.is_some() {
1883            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1884        }
1885        size += self.__buffa_unknown_fields.encoded_len() as u32;
1886        size
1887    }
1888    fn write_to(
1889        &self,
1890        _cache: &mut ::buffa::SizeCache,
1891        buf: &mut impl ::buffa::bytes::BufMut,
1892    ) {
1893        #[allow(unused_imports)]
1894        use ::buffa::Enumeration as _;
1895        if !self.name.is_empty() {
1896            ::buffa::encoding::Tag::new(
1897                    1u32,
1898                    ::buffa::encoding::WireType::LengthDelimited,
1899                )
1900                .encode(buf);
1901            ::buffa::types::encode_string(&self.name, buf);
1902        }
1903        if let Some(v) = self.include_browse {
1904            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1905                .encode(buf);
1906            ::buffa::types::encode_bool(v, buf);
1907        }
1908        self.__buffa_unknown_fields.write_to(buf);
1909    }
1910    fn merge_field(
1911        &mut self,
1912        tag: ::buffa::encoding::Tag,
1913        buf: &mut impl ::buffa::bytes::Buf,
1914        depth: u32,
1915    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1916        #[allow(unused_imports)]
1917        use ::buffa::bytes::Buf as _;
1918        #[allow(unused_imports)]
1919        use ::buffa::Enumeration as _;
1920        match tag.field_number() {
1921            1u32 => {
1922                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1923                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1924                        field_number: 1u32,
1925                        expected: 2u8,
1926                        actual: tag.wire_type() as u8,
1927                    });
1928                }
1929                ::buffa::types::merge_string(&mut self.name, buf)?;
1930            }
1931            2u32 => {
1932                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1933                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1934                        field_number: 2u32,
1935                        expected: 0u8,
1936                        actual: tag.wire_type() as u8,
1937                    });
1938                }
1939                self.include_browse = ::core::option::Option::Some(
1940                    ::buffa::types::decode_bool(buf)?,
1941                );
1942            }
1943            _ => {
1944                self.__buffa_unknown_fields
1945                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1946            }
1947        }
1948        ::core::result::Result::Ok(())
1949    }
1950    fn clear(&mut self) {
1951        self.name.clear();
1952        self.include_browse = ::core::option::Option::None;
1953        self.__buffa_unknown_fields.clear();
1954    }
1955}
1956impl ::buffa::ExtensionSet for GetCatalogRequest {
1957    const PROTO_FQN: &'static str = "unitycatalog.catalogs.v1.GetCatalogRequest";
1958    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1959        &self.__buffa_unknown_fields
1960    }
1961    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1962        &mut self.__buffa_unknown_fields
1963    }
1964}
1965impl ::buffa::json_helpers::ProtoElemJson for GetCatalogRequest {
1966    fn serialize_proto_json<S: ::serde::Serializer>(
1967        v: &Self,
1968        s: S,
1969    ) -> ::core::result::Result<S::Ok, S::Error> {
1970        ::serde::Serialize::serialize(v, s)
1971    }
1972    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1973        d: D,
1974    ) -> ::core::result::Result<Self, D::Error> {
1975        <Self as ::serde::Deserialize>::deserialize(d)
1976    }
1977}
1978#[doc(hidden)]
1979pub const __GET_CATALOG_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1980    type_url: "type.googleapis.com/unitycatalog.catalogs.v1.GetCatalogRequest",
1981    to_json: ::buffa::type_registry::any_to_json::<GetCatalogRequest>,
1982    from_json: ::buffa::type_registry::any_from_json::<GetCatalogRequest>,
1983    is_wkt: false,
1984};
1985/// Update a catalog
1986#[derive(Clone, PartialEq, Default)]
1987#[derive(::serde::Serialize, ::serde::Deserialize)]
1988#[serde(default)]
1989pub struct UpdateCatalogRequest {
1990    /// Name of catalog.
1991    ///
1992    /// Field 1: `name`
1993    #[serde(
1994        rename = "name",
1995        with = "::buffa::json_helpers::proto_string",
1996        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1997    )]
1998    pub name: ::buffa::alloc::string::String,
1999    /// Username of new owner of catalog.
2000    ///
2001    /// Field 2: `owner`
2002    #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
2003    pub owner: ::core::option::Option<::buffa::alloc::string::String>,
2004    /// User-provided free-form text description.
2005    ///
2006    /// Field 3: `comment`
2007    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
2008    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
2009    /// A map of key-value properties attached to the securable.
2010    ///
2011    /// When provided in update request, the specified properties will override the existing properties.
2012    /// To add and remove properties, one would need to perform a read-modify-write.
2013    ///
2014    /// Field 4: `properties`
2015    #[serde(
2016        rename = "properties",
2017        skip_serializing_if = "::buffa::__private::HashMap::is_empty",
2018        deserialize_with = "::buffa::json_helpers::null_as_default"
2019    )]
2020    pub properties: ::buffa::__private::HashMap<
2021        ::buffa::alloc::string::String,
2022        ::buffa::alloc::string::String,
2023    >,
2024    /// Name of catalog.
2025    ///
2026    /// Field 5: `new_name`
2027    #[serde(
2028        rename = "new_name",
2029        alias = "newName",
2030        skip_serializing_if = "::core::option::Option::is_none"
2031    )]
2032    pub new_name: ::core::option::Option<::buffa::alloc::string::String>,
2033    #[serde(skip)]
2034    #[doc(hidden)]
2035    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2036}
2037impl ::core::fmt::Debug for UpdateCatalogRequest {
2038    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2039        f.debug_struct("UpdateCatalogRequest")
2040            .field("name", &self.name)
2041            .field("owner", &self.owner)
2042            .field("comment", &self.comment)
2043            .field("properties", &self.properties)
2044            .field("new_name", &self.new_name)
2045            .finish()
2046    }
2047}
2048impl UpdateCatalogRequest {
2049    /// Protobuf type URL for this message, for use with `Any::pack` and
2050    /// `Any::unpack_if`.
2051    ///
2052    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2053    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.UpdateCatalogRequest";
2054}
2055impl UpdateCatalogRequest {
2056    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2057    #[inline]
2058    ///Sets [`Self::owner`] to `Some(value)`, consuming and returning `self`.
2059    pub fn with_owner(
2060        mut self,
2061        value: impl Into<::buffa::alloc::string::String>,
2062    ) -> Self {
2063        self.owner = Some(value.into());
2064        self
2065    }
2066    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2067    #[inline]
2068    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
2069    pub fn with_comment(
2070        mut self,
2071        value: impl Into<::buffa::alloc::string::String>,
2072    ) -> Self {
2073        self.comment = Some(value.into());
2074        self
2075    }
2076    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2077    #[inline]
2078    ///Sets [`Self::new_name`] to `Some(value)`, consuming and returning `self`.
2079    pub fn with_new_name(
2080        mut self,
2081        value: impl Into<::buffa::alloc::string::String>,
2082    ) -> Self {
2083        self.new_name = Some(value.into());
2084        self
2085    }
2086}
2087impl ::buffa::DefaultInstance for UpdateCatalogRequest {
2088    fn default_instance() -> &'static Self {
2089        static VALUE: ::buffa::__private::OnceBox<UpdateCatalogRequest> = ::buffa::__private::OnceBox::new();
2090        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2091    }
2092}
2093impl ::buffa::MessageName for UpdateCatalogRequest {
2094    const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
2095    const NAME: &'static str = "UpdateCatalogRequest";
2096    const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.UpdateCatalogRequest";
2097    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.UpdateCatalogRequest";
2098}
2099impl ::buffa::Message for UpdateCatalogRequest {
2100    /// Returns the total encoded size in bytes.
2101    ///
2102    /// The result is a `u32`; the protobuf specification requires all
2103    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2104    /// compliant message will never overflow this type.
2105    #[allow(clippy::let_and_return)]
2106    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2107        #[allow(unused_imports)]
2108        use ::buffa::Enumeration as _;
2109        let mut size = 0u32;
2110        if !self.name.is_empty() {
2111            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2112        }
2113        if let Some(ref v) = self.owner {
2114            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2115        }
2116        if let Some(ref v) = self.comment {
2117            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2118        }
2119        #[allow(clippy::for_kv_map)]
2120        for (k, v) in &self.properties {
2121            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
2122                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2123            size
2124                += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
2125                    + entry_size;
2126        }
2127        if let Some(ref v) = self.new_name {
2128            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2129        }
2130        size += self.__buffa_unknown_fields.encoded_len() as u32;
2131        size
2132    }
2133    fn write_to(
2134        &self,
2135        _cache: &mut ::buffa::SizeCache,
2136        buf: &mut impl ::buffa::bytes::BufMut,
2137    ) {
2138        #[allow(unused_imports)]
2139        use ::buffa::Enumeration as _;
2140        if !self.name.is_empty() {
2141            ::buffa::encoding::Tag::new(
2142                    1u32,
2143                    ::buffa::encoding::WireType::LengthDelimited,
2144                )
2145                .encode(buf);
2146            ::buffa::types::encode_string(&self.name, buf);
2147        }
2148        if let Some(ref v) = self.owner {
2149            ::buffa::encoding::Tag::new(
2150                    2u32,
2151                    ::buffa::encoding::WireType::LengthDelimited,
2152                )
2153                .encode(buf);
2154            ::buffa::types::encode_string(v, buf);
2155        }
2156        if let Some(ref v) = self.comment {
2157            ::buffa::encoding::Tag::new(
2158                    3u32,
2159                    ::buffa::encoding::WireType::LengthDelimited,
2160                )
2161                .encode(buf);
2162            ::buffa::types::encode_string(v, buf);
2163        }
2164        for (k, v) in &self.properties {
2165            let entry_size: u32 = 1u32 + ::buffa::types::string_encoded_len(k) as u32
2166                + 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2167            ::buffa::encoding::Tag::new(
2168                    4u32,
2169                    ::buffa::encoding::WireType::LengthDelimited,
2170                )
2171                .encode(buf);
2172            ::buffa::encoding::encode_varint(entry_size as u64, buf);
2173            ::buffa::encoding::Tag::new(
2174                    1u32,
2175                    ::buffa::encoding::WireType::LengthDelimited,
2176                )
2177                .encode(buf);
2178            ::buffa::types::encode_string(k, buf);
2179            ::buffa::encoding::Tag::new(
2180                    2u32,
2181                    ::buffa::encoding::WireType::LengthDelimited,
2182                )
2183                .encode(buf);
2184            ::buffa::types::encode_string(v, buf);
2185        }
2186        if let Some(ref v) = self.new_name {
2187            ::buffa::encoding::Tag::new(
2188                    5u32,
2189                    ::buffa::encoding::WireType::LengthDelimited,
2190                )
2191                .encode(buf);
2192            ::buffa::types::encode_string(v, buf);
2193        }
2194        self.__buffa_unknown_fields.write_to(buf);
2195    }
2196    fn merge_field(
2197        &mut self,
2198        tag: ::buffa::encoding::Tag,
2199        buf: &mut impl ::buffa::bytes::Buf,
2200        depth: u32,
2201    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2202        #[allow(unused_imports)]
2203        use ::buffa::bytes::Buf as _;
2204        #[allow(unused_imports)]
2205        use ::buffa::Enumeration as _;
2206        match tag.field_number() {
2207            1u32 => {
2208                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2209                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2210                        field_number: 1u32,
2211                        expected: 2u8,
2212                        actual: tag.wire_type() as u8,
2213                    });
2214                }
2215                ::buffa::types::merge_string(&mut self.name, buf)?;
2216            }
2217            2u32 => {
2218                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2219                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2220                        field_number: 2u32,
2221                        expected: 2u8,
2222                        actual: tag.wire_type() as u8,
2223                    });
2224                }
2225                ::buffa::types::merge_string(
2226                    self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
2227                    buf,
2228                )?;
2229            }
2230            3u32 => {
2231                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2232                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2233                        field_number: 3u32,
2234                        expected: 2u8,
2235                        actual: tag.wire_type() as u8,
2236                    });
2237                }
2238                ::buffa::types::merge_string(
2239                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
2240                    buf,
2241                )?;
2242            }
2243            4u32 => {
2244                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2245                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2246                        field_number: 4u32,
2247                        expected: 2u8,
2248                        actual: tag.wire_type() as u8,
2249                    });
2250                }
2251                let entry_len = ::buffa::encoding::decode_varint(buf)?;
2252                let entry_len = usize::try_from(entry_len)
2253                    .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
2254                if buf.remaining() < entry_len {
2255                    return ::core::result::Result::Err(
2256                        ::buffa::DecodeError::UnexpectedEof,
2257                    );
2258                }
2259                let entry_limit = buf.remaining() - entry_len;
2260                let mut key = ::core::default::Default::default();
2261                let mut val = ::core::default::Default::default();
2262                while buf.remaining() > entry_limit {
2263                    let entry_tag = ::buffa::encoding::Tag::decode(buf)?;
2264                    match entry_tag.field_number() {
2265                        1 => {
2266                            if entry_tag.wire_type()
2267                                != ::buffa::encoding::WireType::LengthDelimited
2268                            {
2269                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2270                                    field_number: entry_tag.field_number(),
2271                                    expected: 2u8,
2272                                    actual: entry_tag.wire_type() as u8,
2273                                });
2274                            }
2275                            key = ::buffa::types::decode_string(buf)?;
2276                        }
2277                        2 => {
2278                            if entry_tag.wire_type()
2279                                != ::buffa::encoding::WireType::LengthDelimited
2280                            {
2281                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2282                                    field_number: entry_tag.field_number(),
2283                                    expected: 2u8,
2284                                    actual: entry_tag.wire_type() as u8,
2285                                });
2286                            }
2287                            val = ::buffa::types::decode_string(buf)?;
2288                        }
2289                        _ => {
2290                            ::buffa::encoding::skip_field_depth(entry_tag, buf, depth)?;
2291                        }
2292                    }
2293                }
2294                if buf.remaining() != entry_limit {
2295                    let remaining = buf.remaining();
2296                    if remaining > entry_limit {
2297                        buf.advance(remaining - entry_limit);
2298                    } else {
2299                        return ::core::result::Result::Err(
2300                            ::buffa::DecodeError::UnexpectedEof,
2301                        );
2302                    }
2303                }
2304                self.properties.insert(key, val);
2305            }
2306            5u32 => {
2307                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2308                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2309                        field_number: 5u32,
2310                        expected: 2u8,
2311                        actual: tag.wire_type() as u8,
2312                    });
2313                }
2314                ::buffa::types::merge_string(
2315                    self
2316                        .new_name
2317                        .get_or_insert_with(::buffa::alloc::string::String::new),
2318                    buf,
2319                )?;
2320            }
2321            _ => {
2322                self.__buffa_unknown_fields
2323                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2324            }
2325        }
2326        ::core::result::Result::Ok(())
2327    }
2328    fn clear(&mut self) {
2329        self.name.clear();
2330        self.owner = ::core::option::Option::None;
2331        self.comment = ::core::option::Option::None;
2332        self.properties.clear();
2333        self.new_name = ::core::option::Option::None;
2334        self.__buffa_unknown_fields.clear();
2335    }
2336}
2337impl ::buffa::ExtensionSet for UpdateCatalogRequest {
2338    const PROTO_FQN: &'static str = "unitycatalog.catalogs.v1.UpdateCatalogRequest";
2339    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2340        &self.__buffa_unknown_fields
2341    }
2342    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2343        &mut self.__buffa_unknown_fields
2344    }
2345}
2346impl ::buffa::json_helpers::ProtoElemJson for UpdateCatalogRequest {
2347    fn serialize_proto_json<S: ::serde::Serializer>(
2348        v: &Self,
2349        s: S,
2350    ) -> ::core::result::Result<S::Ok, S::Error> {
2351        ::serde::Serialize::serialize(v, s)
2352    }
2353    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2354        d: D,
2355    ) -> ::core::result::Result<Self, D::Error> {
2356        <Self as ::serde::Deserialize>::deserialize(d)
2357    }
2358}
2359#[doc(hidden)]
2360pub const __UPDATE_CATALOG_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2361    type_url: "type.googleapis.com/unitycatalog.catalogs.v1.UpdateCatalogRequest",
2362    to_json: ::buffa::type_registry::any_to_json::<UpdateCatalogRequest>,
2363    from_json: ::buffa::type_registry::any_from_json::<UpdateCatalogRequest>,
2364    is_wkt: false,
2365};
2366/// Delete a catalog
2367#[derive(Clone, PartialEq, Default)]
2368#[derive(::serde::Serialize, ::serde::Deserialize)]
2369#[serde(default)]
2370pub struct DeleteCatalogRequest {
2371    /// Name of catalog.
2372    ///
2373    /// Field 1: `name`
2374    #[serde(
2375        rename = "name",
2376        with = "::buffa::json_helpers::proto_string",
2377        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2378    )]
2379    pub name: ::buffa::alloc::string::String,
2380    /// Force deletion even if the catalog is not empty.
2381    ///
2382    /// Field 2: `force`
2383    #[serde(rename = "force", skip_serializing_if = "::core::option::Option::is_none")]
2384    pub force: ::core::option::Option<bool>,
2385    #[serde(skip)]
2386    #[doc(hidden)]
2387    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2388}
2389impl ::core::fmt::Debug for DeleteCatalogRequest {
2390    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2391        f.debug_struct("DeleteCatalogRequest")
2392            .field("name", &self.name)
2393            .field("force", &self.force)
2394            .finish()
2395    }
2396}
2397impl DeleteCatalogRequest {
2398    /// Protobuf type URL for this message, for use with `Any::pack` and
2399    /// `Any::unpack_if`.
2400    ///
2401    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2402    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.DeleteCatalogRequest";
2403}
2404impl DeleteCatalogRequest {
2405    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2406    #[inline]
2407    ///Sets [`Self::force`] to `Some(value)`, consuming and returning `self`.
2408    pub fn with_force(mut self, value: bool) -> Self {
2409        self.force = Some(value);
2410        self
2411    }
2412}
2413impl ::buffa::DefaultInstance for DeleteCatalogRequest {
2414    fn default_instance() -> &'static Self {
2415        static VALUE: ::buffa::__private::OnceBox<DeleteCatalogRequest> = ::buffa::__private::OnceBox::new();
2416        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2417    }
2418}
2419impl ::buffa::MessageName for DeleteCatalogRequest {
2420    const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
2421    const NAME: &'static str = "DeleteCatalogRequest";
2422    const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.DeleteCatalogRequest";
2423    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.DeleteCatalogRequest";
2424}
2425impl ::buffa::Message for DeleteCatalogRequest {
2426    /// Returns the total encoded size in bytes.
2427    ///
2428    /// The result is a `u32`; the protobuf specification requires all
2429    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2430    /// compliant message will never overflow this type.
2431    #[allow(clippy::let_and_return)]
2432    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2433        #[allow(unused_imports)]
2434        use ::buffa::Enumeration as _;
2435        let mut size = 0u32;
2436        if !self.name.is_empty() {
2437            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2438        }
2439        if self.force.is_some() {
2440            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2441        }
2442        size += self.__buffa_unknown_fields.encoded_len() as u32;
2443        size
2444    }
2445    fn write_to(
2446        &self,
2447        _cache: &mut ::buffa::SizeCache,
2448        buf: &mut impl ::buffa::bytes::BufMut,
2449    ) {
2450        #[allow(unused_imports)]
2451        use ::buffa::Enumeration as _;
2452        if !self.name.is_empty() {
2453            ::buffa::encoding::Tag::new(
2454                    1u32,
2455                    ::buffa::encoding::WireType::LengthDelimited,
2456                )
2457                .encode(buf);
2458            ::buffa::types::encode_string(&self.name, buf);
2459        }
2460        if let Some(v) = self.force {
2461            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
2462                .encode(buf);
2463            ::buffa::types::encode_bool(v, buf);
2464        }
2465        self.__buffa_unknown_fields.write_to(buf);
2466    }
2467    fn merge_field(
2468        &mut self,
2469        tag: ::buffa::encoding::Tag,
2470        buf: &mut impl ::buffa::bytes::Buf,
2471        depth: u32,
2472    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2473        #[allow(unused_imports)]
2474        use ::buffa::bytes::Buf as _;
2475        #[allow(unused_imports)]
2476        use ::buffa::Enumeration as _;
2477        match tag.field_number() {
2478            1u32 => {
2479                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2480                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2481                        field_number: 1u32,
2482                        expected: 2u8,
2483                        actual: tag.wire_type() as u8,
2484                    });
2485                }
2486                ::buffa::types::merge_string(&mut self.name, buf)?;
2487            }
2488            2u32 => {
2489                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2490                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2491                        field_number: 2u32,
2492                        expected: 0u8,
2493                        actual: tag.wire_type() as u8,
2494                    });
2495                }
2496                self.force = ::core::option::Option::Some(
2497                    ::buffa::types::decode_bool(buf)?,
2498                );
2499            }
2500            _ => {
2501                self.__buffa_unknown_fields
2502                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2503            }
2504        }
2505        ::core::result::Result::Ok(())
2506    }
2507    fn clear(&mut self) {
2508        self.name.clear();
2509        self.force = ::core::option::Option::None;
2510        self.__buffa_unknown_fields.clear();
2511    }
2512}
2513impl ::buffa::ExtensionSet for DeleteCatalogRequest {
2514    const PROTO_FQN: &'static str = "unitycatalog.catalogs.v1.DeleteCatalogRequest";
2515    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2516        &self.__buffa_unknown_fields
2517    }
2518    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2519        &mut self.__buffa_unknown_fields
2520    }
2521}
2522impl ::buffa::json_helpers::ProtoElemJson for DeleteCatalogRequest {
2523    fn serialize_proto_json<S: ::serde::Serializer>(
2524        v: &Self,
2525        s: S,
2526    ) -> ::core::result::Result<S::Ok, S::Error> {
2527        ::serde::Serialize::serialize(v, s)
2528    }
2529    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2530        d: D,
2531    ) -> ::core::result::Result<Self, D::Error> {
2532        <Self as ::serde::Deserialize>::deserialize(d)
2533    }
2534}
2535#[doc(hidden)]
2536pub const __DELETE_CATALOG_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2537    type_url: "type.googleapis.com/unitycatalog.catalogs.v1.DeleteCatalogRequest",
2538    to_json: ::buffa::type_registry::any_to_json::<DeleteCatalogRequest>,
2539    from_json: ::buffa::type_registry::any_from_json::<DeleteCatalogRequest>,
2540    is_wkt: false,
2541};
2542#[allow(
2543    non_camel_case_types,
2544    dead_code,
2545    unused_imports,
2546    unused_qualifications,
2547    clippy::derivable_impls,
2548    clippy::match_single_binding,
2549    clippy::uninlined_format_args,
2550    clippy::doc_lazy_continuation,
2551    clippy::module_inception
2552)]
2553pub mod __buffa {
2554    #[allow(unused_imports)]
2555    use super::*;
2556    pub mod view {
2557        #[allow(unused_imports)]
2558        use super::*;
2559        /// A catalog is a root-level namespace that contains schemas.
2560        #[derive(Clone, Debug, Default)]
2561        pub struct CatalogView<'a> {
2562            /// Name of catalog.
2563            ///
2564            /// Field 1: `name`
2565            pub name: &'a str,
2566            /// Unique identifier for the catalog.
2567            ///
2568            /// Field 2: `id`
2569            pub id: ::core::option::Option<&'a str>,
2570            /// Username of current owner of catalog.
2571            ///
2572            /// Field 3: `owner`
2573            pub owner: ::core::option::Option<&'a str>,
2574            /// User-provided free-form text description.
2575            ///
2576            /// Field 4: `comment`
2577            pub comment: ::core::option::Option<&'a str>,
2578            /// A map of key-value properties attached to the securable.
2579            ///
2580            /// Field 5: `properties` (map)
2581            pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
2582            /// Storage root URL for managed tables within catalog.
2583            ///
2584            /// Field 6: `storage_root`
2585            pub storage_root: ::core::option::Option<&'a str>,
2586            /// The name of delta sharing provider.
2587            ///
2588            /// A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server.
2589            ///
2590            /// Field 7: `provider_name`
2591            pub provider_name: ::core::option::Option<&'a str>,
2592            /// The name of the share under the share provider.
2593            ///
2594            /// Field 8: `share_name`
2595            pub share_name: ::core::option::Option<&'a str>,
2596            /// The type of the catalog.
2597            ///
2598            /// Field 9: `catalog_type`
2599            pub catalog_type: ::core::option::Option<
2600                ::buffa::EnumValue<super::super::CatalogType>,
2601            >,
2602            /// Storage location URL (full path) for managed storage of the catalog.
2603            ///
2604            /// A unique path under `storage_root`, used as the managed-storage parent for
2605            /// managed tables/volumes whose schema has no storage location of its own.
2606            /// Absent when the catalog has no `storage_root`.
2607            /// Example: `s3://bucket/ucroot/__unitystorage/catalogs/{catalog_id}`.
2608            ///
2609            /// Field 10: `storage_location`
2610            pub storage_location: ::core::option::Option<&'a str>,
2611            /// Time at which this catalog was created, in epoch milliseconds.
2612            ///
2613            /// Field 1000: `created_at`
2614            pub created_at: ::core::option::Option<i64>,
2615            /// Username of catalog creator.
2616            ///
2617            /// Field 1001: `created_by`
2618            pub created_by: ::core::option::Option<&'a str>,
2619            /// Time at which this catalog was last updated, in epoch milliseconds.
2620            ///
2621            /// Field 1002: `updated_at`
2622            pub updated_at: ::core::option::Option<i64>,
2623            /// Username of user who last modified catalog.
2624            ///
2625            /// Field 1003: `updated_by`
2626            pub updated_by: ::core::option::Option<&'a str>,
2627            /// Indicates whether the principal is limited to retrieving metadata
2628            /// for the associated object through the BROWSE privilege when include_browse
2629            /// is enabled in the request.
2630            ///
2631            /// Field 1004: `browse_only`
2632            pub browse_only: ::core::option::Option<bool>,
2633            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
2634        }
2635        impl<'a> CatalogView<'a> {
2636            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
2637            ///
2638            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
2639            /// and by generated sub-message decode arms with `depth - 1`.
2640            ///
2641            /// **Not part of the public API.** Named with a leading underscore to
2642            /// signal that it is for generated-code use only.
2643            #[doc(hidden)]
2644            pub fn _decode_depth(
2645                buf: &'a [u8],
2646                depth: u32,
2647            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2648                let mut view = Self::default();
2649                view._merge_into_view(buf, depth)?;
2650                ::core::result::Result::Ok(view)
2651            }
2652            /// Merge fields from `buf` into this view (proto merge semantics).
2653            ///
2654            /// Repeated fields append; singular fields last-wins; singular
2655            /// MESSAGE fields merge recursively. Used by sub-message decode
2656            /// arms when the same field appears multiple times on the wire.
2657            ///
2658            /// **Not part of the public API.**
2659            #[doc(hidden)]
2660            pub fn _merge_into_view(
2661                &mut self,
2662                buf: &'a [u8],
2663                depth: u32,
2664            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2665                let _ = depth;
2666                #[allow(unused_variables)]
2667                let view = self;
2668                let mut cur: &'a [u8] = buf;
2669                while !cur.is_empty() {
2670                    let before_tag = cur;
2671                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
2672                    match tag.field_number() {
2673                        1u32 => {
2674                            if tag.wire_type()
2675                                != ::buffa::encoding::WireType::LengthDelimited
2676                            {
2677                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2678                                    field_number: 1u32,
2679                                    expected: 2u8,
2680                                    actual: tag.wire_type() as u8,
2681                                });
2682                            }
2683                            view.name = ::buffa::types::borrow_str(&mut cur)?;
2684                        }
2685                        2u32 => {
2686                            if tag.wire_type()
2687                                != ::buffa::encoding::WireType::LengthDelimited
2688                            {
2689                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2690                                    field_number: 2u32,
2691                                    expected: 2u8,
2692                                    actual: tag.wire_type() as u8,
2693                                });
2694                            }
2695                            view.id = Some(::buffa::types::borrow_str(&mut cur)?);
2696                        }
2697                        3u32 => {
2698                            if tag.wire_type()
2699                                != ::buffa::encoding::WireType::LengthDelimited
2700                            {
2701                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2702                                    field_number: 3u32,
2703                                    expected: 2u8,
2704                                    actual: tag.wire_type() as u8,
2705                                });
2706                            }
2707                            view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
2708                        }
2709                        4u32 => {
2710                            if tag.wire_type()
2711                                != ::buffa::encoding::WireType::LengthDelimited
2712                            {
2713                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2714                                    field_number: 4u32,
2715                                    expected: 2u8,
2716                                    actual: tag.wire_type() as u8,
2717                                });
2718                            }
2719                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
2720                        }
2721                        6u32 => {
2722                            if tag.wire_type()
2723                                != ::buffa::encoding::WireType::LengthDelimited
2724                            {
2725                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2726                                    field_number: 6u32,
2727                                    expected: 2u8,
2728                                    actual: tag.wire_type() as u8,
2729                                });
2730                            }
2731                            view.storage_root = Some(
2732                                ::buffa::types::borrow_str(&mut cur)?,
2733                            );
2734                        }
2735                        7u32 => {
2736                            if tag.wire_type()
2737                                != ::buffa::encoding::WireType::LengthDelimited
2738                            {
2739                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2740                                    field_number: 7u32,
2741                                    expected: 2u8,
2742                                    actual: tag.wire_type() as u8,
2743                                });
2744                            }
2745                            view.provider_name = Some(
2746                                ::buffa::types::borrow_str(&mut cur)?,
2747                            );
2748                        }
2749                        8u32 => {
2750                            if tag.wire_type()
2751                                != ::buffa::encoding::WireType::LengthDelimited
2752                            {
2753                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2754                                    field_number: 8u32,
2755                                    expected: 2u8,
2756                                    actual: tag.wire_type() as u8,
2757                                });
2758                            }
2759                            view.share_name = Some(
2760                                ::buffa::types::borrow_str(&mut cur)?,
2761                            );
2762                        }
2763                        9u32 => {
2764                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2765                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2766                                    field_number: 9u32,
2767                                    expected: 0u8,
2768                                    actual: tag.wire_type() as u8,
2769                                });
2770                            }
2771                            view.catalog_type = Some(
2772                                ::buffa::EnumValue::from(
2773                                    ::buffa::types::decode_int32(&mut cur)?,
2774                                ),
2775                            );
2776                        }
2777                        10u32 => {
2778                            if tag.wire_type()
2779                                != ::buffa::encoding::WireType::LengthDelimited
2780                            {
2781                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2782                                    field_number: 10u32,
2783                                    expected: 2u8,
2784                                    actual: tag.wire_type() as u8,
2785                                });
2786                            }
2787                            view.storage_location = Some(
2788                                ::buffa::types::borrow_str(&mut cur)?,
2789                            );
2790                        }
2791                        1000u32 => {
2792                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2793                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2794                                    field_number: 1000u32,
2795                                    expected: 0u8,
2796                                    actual: tag.wire_type() as u8,
2797                                });
2798                            }
2799                            view.created_at = Some(
2800                                ::buffa::types::decode_int64(&mut cur)?,
2801                            );
2802                        }
2803                        1001u32 => {
2804                            if tag.wire_type()
2805                                != ::buffa::encoding::WireType::LengthDelimited
2806                            {
2807                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2808                                    field_number: 1001u32,
2809                                    expected: 2u8,
2810                                    actual: tag.wire_type() as u8,
2811                                });
2812                            }
2813                            view.created_by = Some(
2814                                ::buffa::types::borrow_str(&mut cur)?,
2815                            );
2816                        }
2817                        1002u32 => {
2818                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2819                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2820                                    field_number: 1002u32,
2821                                    expected: 0u8,
2822                                    actual: tag.wire_type() as u8,
2823                                });
2824                            }
2825                            view.updated_at = Some(
2826                                ::buffa::types::decode_int64(&mut cur)?,
2827                            );
2828                        }
2829                        1003u32 => {
2830                            if tag.wire_type()
2831                                != ::buffa::encoding::WireType::LengthDelimited
2832                            {
2833                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2834                                    field_number: 1003u32,
2835                                    expected: 2u8,
2836                                    actual: tag.wire_type() as u8,
2837                                });
2838                            }
2839                            view.updated_by = Some(
2840                                ::buffa::types::borrow_str(&mut cur)?,
2841                            );
2842                        }
2843                        1004u32 => {
2844                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2845                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2846                                    field_number: 1004u32,
2847                                    expected: 0u8,
2848                                    actual: tag.wire_type() as u8,
2849                                });
2850                            }
2851                            view.browse_only = Some(
2852                                ::buffa::types::decode_bool(&mut cur)?,
2853                            );
2854                        }
2855                        5u32 => {
2856                            if tag.wire_type()
2857                                != ::buffa::encoding::WireType::LengthDelimited
2858                            {
2859                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2860                                    field_number: 5u32,
2861                                    expected: 2u8,
2862                                    actual: tag.wire_type() as u8,
2863                                });
2864                            }
2865                            let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
2866                            let mut entry_cur: &'a [u8] = entry_bytes;
2867                            let mut key = "";
2868                            let mut val = "";
2869                            while !entry_cur.is_empty() {
2870                                let entry_tag = ::buffa::encoding::Tag::decode(
2871                                    &mut entry_cur,
2872                                )?;
2873                                match entry_tag.field_number() {
2874                                    1 => {
2875                                        if entry_tag.wire_type()
2876                                            != ::buffa::encoding::WireType::LengthDelimited
2877                                        {
2878                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2879                                                field_number: entry_tag.field_number(),
2880                                                expected: 2u8,
2881                                                actual: entry_tag.wire_type() as u8,
2882                                            });
2883                                        }
2884                                        key = ::buffa::types::borrow_str(&mut entry_cur)?;
2885                                    }
2886                                    2 => {
2887                                        if entry_tag.wire_type()
2888                                            != ::buffa::encoding::WireType::LengthDelimited
2889                                        {
2890                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2891                                                field_number: entry_tag.field_number(),
2892                                                expected: 2u8,
2893                                                actual: entry_tag.wire_type() as u8,
2894                                            });
2895                                        }
2896                                        val = ::buffa::types::borrow_str(&mut entry_cur)?;
2897                                    }
2898                                    _ => {
2899                                        ::buffa::encoding::skip_field_depth(
2900                                            entry_tag,
2901                                            &mut entry_cur,
2902                                            depth,
2903                                        )?;
2904                                    }
2905                                }
2906                            }
2907                            view.properties.push(key, val);
2908                        }
2909                        _ => {
2910                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
2911                            let span_len = before_tag.len() - cur.len();
2912                            view.__buffa_unknown_fields
2913                                .push_raw(&before_tag[..span_len]);
2914                        }
2915                    }
2916                }
2917                ::core::result::Result::Ok(())
2918            }
2919        }
2920        impl<'a> ::buffa::MessageView<'a> for CatalogView<'a> {
2921            type Owned = super::super::Catalog;
2922            fn decode_view(
2923                buf: &'a [u8],
2924            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2925                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
2926            }
2927            fn decode_view_with_limit(
2928                buf: &'a [u8],
2929                depth: u32,
2930            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
2931                Self::_decode_depth(buf, depth)
2932            }
2933            fn to_owned_message(&self) -> super::super::Catalog {
2934                self.to_owned_from_source(None)
2935            }
2936            #[allow(clippy::useless_conversion, clippy::needless_update)]
2937            fn to_owned_from_source(
2938                &self,
2939                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
2940            ) -> super::super::Catalog {
2941                #[allow(unused_imports)]
2942                use ::buffa::alloc::string::ToString as _;
2943                let _ = __buffa_src;
2944                super::super::Catalog {
2945                    name: self.name.to_string(),
2946                    id: self.id.map(|s| s.to_string()),
2947                    owner: self.owner.map(|s| s.to_string()),
2948                    comment: self.comment.map(|s| s.to_string()),
2949                    properties: self
2950                        .properties
2951                        .iter()
2952                        .map(|(k, v)| (k.to_string(), v.to_string()))
2953                        .collect(),
2954                    storage_root: self.storage_root.map(|s| s.to_string()),
2955                    provider_name: self.provider_name.map(|s| s.to_string()),
2956                    share_name: self.share_name.map(|s| s.to_string()),
2957                    catalog_type: self.catalog_type,
2958                    storage_location: self.storage_location.map(|s| s.to_string()),
2959                    created_at: self.created_at,
2960                    created_by: self.created_by.map(|s| s.to_string()),
2961                    updated_at: self.updated_at,
2962                    updated_by: self.updated_by.map(|s| s.to_string()),
2963                    browse_only: self.browse_only,
2964                    __buffa_unknown_fields: self
2965                        .__buffa_unknown_fields
2966                        .to_owned()
2967                        .unwrap_or_default()
2968                        .into(),
2969                    ..::core::default::Default::default()
2970                }
2971            }
2972        }
2973        impl<'a> ::buffa::ViewEncode<'a> for CatalogView<'a> {
2974            #[allow(clippy::needless_borrow, clippy::let_and_return)]
2975            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2976                #[allow(unused_imports)]
2977                use ::buffa::Enumeration as _;
2978                let mut size = 0u32;
2979                if !self.name.is_empty() {
2980                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2981                }
2982                if let Some(ref v) = self.id {
2983                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2984                }
2985                if let Some(ref v) = self.owner {
2986                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2987                }
2988                if let Some(ref v) = self.comment {
2989                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2990                }
2991                #[allow(clippy::for_kv_map)]
2992                for (k, v) in &self.properties {
2993                    let entry_size: u32 = 1u32
2994                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
2995                        + ::buffa::types::string_encoded_len(v) as u32;
2996                    size
2997                        += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
2998                            + entry_size;
2999                }
3000                if let Some(ref v) = self.storage_root {
3001                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3002                }
3003                if let Some(ref v) = self.provider_name {
3004                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3005                }
3006                if let Some(ref v) = self.share_name {
3007                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3008                }
3009                if let Some(ref v) = self.catalog_type {
3010                    size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
3011                }
3012                if let Some(ref v) = self.storage_location {
3013                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3014                }
3015                if let Some(v) = self.created_at {
3016                    size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
3017                }
3018                if let Some(ref v) = self.created_by {
3019                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
3020                }
3021                if let Some(v) = self.updated_at {
3022                    size += 2u32 + ::buffa::types::int64_encoded_len(v) as u32;
3023                }
3024                if let Some(ref v) = self.updated_by {
3025                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
3026                }
3027                if self.browse_only.is_some() {
3028                    size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3029                }
3030                size += self.__buffa_unknown_fields.encoded_len() as u32;
3031                size
3032            }
3033            #[allow(clippy::needless_borrow)]
3034            fn write_to(
3035                &self,
3036                _cache: &mut ::buffa::SizeCache,
3037                buf: &mut impl ::buffa::bytes::BufMut,
3038            ) {
3039                #[allow(unused_imports)]
3040                use ::buffa::Enumeration as _;
3041                if !self.name.is_empty() {
3042                    ::buffa::encoding::Tag::new(
3043                            1u32,
3044                            ::buffa::encoding::WireType::LengthDelimited,
3045                        )
3046                        .encode(buf);
3047                    ::buffa::types::encode_string(&self.name, buf);
3048                }
3049                if let Some(ref v) = self.id {
3050                    ::buffa::encoding::Tag::new(
3051                            2u32,
3052                            ::buffa::encoding::WireType::LengthDelimited,
3053                        )
3054                        .encode(buf);
3055                    ::buffa::types::encode_string(v, buf);
3056                }
3057                if let Some(ref v) = self.owner {
3058                    ::buffa::encoding::Tag::new(
3059                            3u32,
3060                            ::buffa::encoding::WireType::LengthDelimited,
3061                        )
3062                        .encode(buf);
3063                    ::buffa::types::encode_string(v, buf);
3064                }
3065                if let Some(ref v) = self.comment {
3066                    ::buffa::encoding::Tag::new(
3067                            4u32,
3068                            ::buffa::encoding::WireType::LengthDelimited,
3069                        )
3070                        .encode(buf);
3071                    ::buffa::types::encode_string(v, buf);
3072                }
3073                for (k, v) in &self.properties {
3074                    let entry_size: u32 = 1u32
3075                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
3076                        + ::buffa::types::string_encoded_len(v) as u32;
3077                    ::buffa::encoding::Tag::new(
3078                            5u32,
3079                            ::buffa::encoding::WireType::LengthDelimited,
3080                        )
3081                        .encode(buf);
3082                    ::buffa::encoding::encode_varint(entry_size as u64, buf);
3083                    ::buffa::encoding::Tag::new(
3084                            1u32,
3085                            ::buffa::encoding::WireType::LengthDelimited,
3086                        )
3087                        .encode(buf);
3088                    ::buffa::types::encode_string(k, buf);
3089                    ::buffa::encoding::Tag::new(
3090                            2u32,
3091                            ::buffa::encoding::WireType::LengthDelimited,
3092                        )
3093                        .encode(buf);
3094                    ::buffa::types::encode_string(v, buf);
3095                }
3096                if let Some(ref v) = self.storage_root {
3097                    ::buffa::encoding::Tag::new(
3098                            6u32,
3099                            ::buffa::encoding::WireType::LengthDelimited,
3100                        )
3101                        .encode(buf);
3102                    ::buffa::types::encode_string(v, buf);
3103                }
3104                if let Some(ref v) = self.provider_name {
3105                    ::buffa::encoding::Tag::new(
3106                            7u32,
3107                            ::buffa::encoding::WireType::LengthDelimited,
3108                        )
3109                        .encode(buf);
3110                    ::buffa::types::encode_string(v, buf);
3111                }
3112                if let Some(ref v) = self.share_name {
3113                    ::buffa::encoding::Tag::new(
3114                            8u32,
3115                            ::buffa::encoding::WireType::LengthDelimited,
3116                        )
3117                        .encode(buf);
3118                    ::buffa::types::encode_string(v, buf);
3119                }
3120                if let Some(ref v) = self.catalog_type {
3121                    ::buffa::encoding::Tag::new(
3122                            9u32,
3123                            ::buffa::encoding::WireType::Varint,
3124                        )
3125                        .encode(buf);
3126                    ::buffa::types::encode_int32(v.to_i32(), buf);
3127                }
3128                if let Some(ref v) = self.storage_location {
3129                    ::buffa::encoding::Tag::new(
3130                            10u32,
3131                            ::buffa::encoding::WireType::LengthDelimited,
3132                        )
3133                        .encode(buf);
3134                    ::buffa::types::encode_string(v, buf);
3135                }
3136                if let Some(v) = self.created_at {
3137                    ::buffa::encoding::Tag::new(
3138                            1000u32,
3139                            ::buffa::encoding::WireType::Varint,
3140                        )
3141                        .encode(buf);
3142                    ::buffa::types::encode_int64(v, buf);
3143                }
3144                if let Some(ref v) = self.created_by {
3145                    ::buffa::encoding::Tag::new(
3146                            1001u32,
3147                            ::buffa::encoding::WireType::LengthDelimited,
3148                        )
3149                        .encode(buf);
3150                    ::buffa::types::encode_string(v, buf);
3151                }
3152                if let Some(v) = self.updated_at {
3153                    ::buffa::encoding::Tag::new(
3154                            1002u32,
3155                            ::buffa::encoding::WireType::Varint,
3156                        )
3157                        .encode(buf);
3158                    ::buffa::types::encode_int64(v, buf);
3159                }
3160                if let Some(ref v) = self.updated_by {
3161                    ::buffa::encoding::Tag::new(
3162                            1003u32,
3163                            ::buffa::encoding::WireType::LengthDelimited,
3164                        )
3165                        .encode(buf);
3166                    ::buffa::types::encode_string(v, buf);
3167                }
3168                if let Some(v) = self.browse_only {
3169                    ::buffa::encoding::Tag::new(
3170                            1004u32,
3171                            ::buffa::encoding::WireType::Varint,
3172                        )
3173                        .encode(buf);
3174                    ::buffa::types::encode_bool(v, buf);
3175                }
3176                self.__buffa_unknown_fields.write_to(buf);
3177            }
3178        }
3179        /// Serializes this view as protobuf JSON.
3180        ///
3181        /// Implicit-presence fields with default values are omitted, `required`
3182        /// fields are always emitted, explicit-presence (`optional`) fields are
3183        /// emitted only when set, bytes fields are base64-encoded, and enum
3184        /// values are their proto name strings.
3185        ///
3186        /// This impl uses `serialize_map(None)` because the number of emitted
3187        /// fields depends on default-omission rules; serializers that require
3188        /// known map lengths (e.g. `bincode`) will return a runtime error.
3189        /// Use the owned message type for those formats.
3190        impl<'__a> ::serde::Serialize for CatalogView<'__a> {
3191            fn serialize<__S: ::serde::Serializer>(
3192                &self,
3193                __s: __S,
3194            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3195                use ::serde::ser::SerializeMap as _;
3196                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3197                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
3198                    __map.serialize_entry("name", self.name)?;
3199                }
3200                if let ::core::option::Option::Some(__v) = self.id {
3201                    __map.serialize_entry("id", __v)?;
3202                }
3203                if let ::core::option::Option::Some(__v) = self.owner {
3204                    __map.serialize_entry("owner", __v)?;
3205                }
3206                if let ::core::option::Option::Some(__v) = self.comment {
3207                    __map.serialize_entry("comment", __v)?;
3208                }
3209                if !self.properties.is_empty() {
3210                    struct _WM<'__a, '__x>(
3211                        &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
3212                    );
3213                    impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
3214                        fn serialize<__S: ::serde::Serializer>(
3215                            &self,
3216                            __s: __S,
3217                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
3218                            use ::serde::ser::SerializeMap as _;
3219                            let mut __m = __s
3220                                .serialize_map(::core::option::Option::Some(self.0.len()))?;
3221                            for (k, v) in self.0.iter_unique() {
3222                                __m.serialize_entry(k, v)?;
3223                            }
3224                            __m.end()
3225                        }
3226                    }
3227                    __map.serialize_entry("properties", &_WM(&self.properties))?;
3228                }
3229                if let ::core::option::Option::Some(__v) = self.storage_root {
3230                    __map.serialize_entry("storage_root", __v)?;
3231                }
3232                if let ::core::option::Option::Some(__v) = self.provider_name {
3233                    __map.serialize_entry("provider_name", __v)?;
3234                }
3235                if let ::core::option::Option::Some(__v) = self.share_name {
3236                    __map.serialize_entry("share_name", __v)?;
3237                }
3238                if let ::core::option::Option::Some(ref __v) = self.catalog_type {
3239                    __map.serialize_entry("catalog_type", __v)?;
3240                }
3241                if let ::core::option::Option::Some(__v) = self.storage_location {
3242                    __map.serialize_entry("storage_location", __v)?;
3243                }
3244                if let ::core::option::Option::Some(__v) = self.created_at {
3245                    struct _W(i64);
3246                    impl ::serde::Serialize for _W {
3247                        fn serialize<__S: ::serde::Serializer>(
3248                            &self,
3249                            __s: __S,
3250                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
3251                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
3252                        }
3253                    }
3254                    __map.serialize_entry("created_at", &_W(__v))?;
3255                }
3256                if let ::core::option::Option::Some(__v) = self.created_by {
3257                    __map.serialize_entry("created_by", __v)?;
3258                }
3259                if let ::core::option::Option::Some(__v) = self.updated_at {
3260                    struct _W(i64);
3261                    impl ::serde::Serialize for _W {
3262                        fn serialize<__S: ::serde::Serializer>(
3263                            &self,
3264                            __s: __S,
3265                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
3266                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
3267                        }
3268                    }
3269                    __map.serialize_entry("updated_at", &_W(__v))?;
3270                }
3271                if let ::core::option::Option::Some(__v) = self.updated_by {
3272                    __map.serialize_entry("updated_by", __v)?;
3273                }
3274                if let ::core::option::Option::Some(__v) = self.browse_only {
3275                    __map.serialize_entry("browse_only", &__v)?;
3276                }
3277                __map.end()
3278            }
3279        }
3280        impl<'a> ::buffa::MessageName for CatalogView<'a> {
3281            const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
3282            const NAME: &'static str = "Catalog";
3283            const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.Catalog";
3284            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.Catalog";
3285        }
3286        impl<'v> ::buffa::DefaultViewInstance for CatalogView<'v> {
3287            fn default_view_instance<'a>() -> &'a Self
3288            where
3289                Self: 'a,
3290            {
3291                static VALUE: ::buffa::__private::OnceBox<CatalogView<'static>> = ::buffa::__private::OnceBox::new();
3292                VALUE
3293                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3294                        <CatalogView<'static>>::default(),
3295                    ))
3296            }
3297        }
3298        impl ::buffa::ViewReborrow for CatalogView<'static> {
3299            type Reborrowed<'b> = CatalogView<'b>;
3300            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3301                this
3302            }
3303        }
3304        /** Self-contained, `'static` owned view of a `Catalog` message.
3305
3306 Wraps [`::buffa::OwnedView`]`<`[`CatalogView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
3307
3308 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CatalogView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3309        #[derive(Clone, Debug)]
3310        pub struct CatalogOwnedView(::buffa::OwnedView<CatalogView<'static>>);
3311        impl CatalogOwnedView {
3312            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3313            ///
3314            /// The view borrows directly from the buffer's data; the buffer is
3315            /// retained inside the returned handle.
3316            ///
3317            /// # Errors
3318            ///
3319            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3320            /// protobuf data.
3321            pub fn decode(
3322                bytes: ::buffa::bytes::Bytes,
3323            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3324                ::core::result::Result::Ok(
3325                    CatalogOwnedView(::buffa::OwnedView::decode(bytes)?),
3326                )
3327            }
3328            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3329            /// max message size).
3330            ///
3331            /// # Errors
3332            ///
3333            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3334            /// exceeds the configured limits.
3335            pub fn decode_with_options(
3336                bytes: ::buffa::bytes::Bytes,
3337                opts: &::buffa::DecodeOptions,
3338            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3339                ::core::result::Result::Ok(
3340                    CatalogOwnedView(
3341                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3342                    ),
3343                )
3344            }
3345            /// Build from an owned message via an encode → decode round-trip.
3346            ///
3347            /// # Errors
3348            ///
3349            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3350            /// somehow invalid (should not happen for well-formed messages).
3351            pub fn from_owned(
3352                msg: &super::super::Catalog,
3353            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3354                ::core::result::Result::Ok(
3355                    CatalogOwnedView(::buffa::OwnedView::from_owned(msg)?),
3356                )
3357            }
3358            /// Borrow the full [`CatalogView`] with its lifetime tied to `&self`.
3359            #[must_use]
3360            pub fn view(&self) -> &CatalogView<'_> {
3361                self.0.reborrow()
3362            }
3363            /// Convert to the owned message type.
3364            #[must_use]
3365            pub fn to_owned_message(&self) -> super::super::Catalog {
3366                self.0.to_owned_message()
3367            }
3368            /// The underlying bytes buffer.
3369            #[must_use]
3370            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3371                self.0.bytes()
3372            }
3373            /// Consume the handle, returning the underlying bytes buffer.
3374            #[must_use]
3375            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3376                self.0.into_bytes()
3377            }
3378            /// Name of catalog.
3379            ///
3380            /// Field 1: `name`
3381            #[must_use]
3382            pub fn name(&self) -> &'_ str {
3383                self.0.reborrow().name
3384            }
3385            /// Unique identifier for the catalog.
3386            ///
3387            /// Field 2: `id`
3388            #[must_use]
3389            pub fn id(&self) -> ::core::option::Option<&'_ str> {
3390                self.0.reborrow().id
3391            }
3392            /// Username of current owner of catalog.
3393            ///
3394            /// Field 3: `owner`
3395            #[must_use]
3396            pub fn owner(&self) -> ::core::option::Option<&'_ str> {
3397                self.0.reborrow().owner
3398            }
3399            /// User-provided free-form text description.
3400            ///
3401            /// Field 4: `comment`
3402            #[must_use]
3403            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
3404                self.0.reborrow().comment
3405            }
3406            /// A map of key-value properties attached to the securable.
3407            ///
3408            /// Field 5: `properties` (map)
3409            #[must_use]
3410            pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
3411                &self.0.reborrow().properties
3412            }
3413            /// Storage root URL for managed tables within catalog.
3414            ///
3415            /// Field 6: `storage_root`
3416            #[must_use]
3417            pub fn storage_root(&self) -> ::core::option::Option<&'_ str> {
3418                self.0.reborrow().storage_root
3419            }
3420            /// The name of delta sharing provider.
3421            ///
3422            /// A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server.
3423            ///
3424            /// Field 7: `provider_name`
3425            #[must_use]
3426            pub fn provider_name(&self) -> ::core::option::Option<&'_ str> {
3427                self.0.reborrow().provider_name
3428            }
3429            /// The name of the share under the share provider.
3430            ///
3431            /// Field 8: `share_name`
3432            #[must_use]
3433            pub fn share_name(&self) -> ::core::option::Option<&'_ str> {
3434                self.0.reborrow().share_name
3435            }
3436            /// The type of the catalog.
3437            ///
3438            /// Field 9: `catalog_type`
3439            #[must_use]
3440            pub fn catalog_type(
3441                &self,
3442            ) -> ::core::option::Option<::buffa::EnumValue<super::super::CatalogType>> {
3443                self.0.reborrow().catalog_type
3444            }
3445            /// Storage location URL (full path) for managed storage of the catalog.
3446            ///
3447            /// A unique path under `storage_root`, used as the managed-storage parent for
3448            /// managed tables/volumes whose schema has no storage location of its own.
3449            /// Absent when the catalog has no `storage_root`.
3450            /// Example: `s3://bucket/ucroot/__unitystorage/catalogs/{catalog_id}`.
3451            ///
3452            /// Field 10: `storage_location`
3453            #[must_use]
3454            pub fn storage_location(&self) -> ::core::option::Option<&'_ str> {
3455                self.0.reborrow().storage_location
3456            }
3457            /// Time at which this catalog was created, in epoch milliseconds.
3458            ///
3459            /// Field 1000: `created_at`
3460            #[must_use]
3461            pub fn created_at(&self) -> ::core::option::Option<i64> {
3462                self.0.reborrow().created_at
3463            }
3464            /// Username of catalog creator.
3465            ///
3466            /// Field 1001: `created_by`
3467            #[must_use]
3468            pub fn created_by(&self) -> ::core::option::Option<&'_ str> {
3469                self.0.reborrow().created_by
3470            }
3471            /// Time at which this catalog was last updated, in epoch milliseconds.
3472            ///
3473            /// Field 1002: `updated_at`
3474            #[must_use]
3475            pub fn updated_at(&self) -> ::core::option::Option<i64> {
3476                self.0.reborrow().updated_at
3477            }
3478            /// Username of user who last modified catalog.
3479            ///
3480            /// Field 1003: `updated_by`
3481            #[must_use]
3482            pub fn updated_by(&self) -> ::core::option::Option<&'_ str> {
3483                self.0.reborrow().updated_by
3484            }
3485            /// Indicates whether the principal is limited to retrieving metadata
3486            /// for the associated object through the BROWSE privilege when include_browse
3487            /// is enabled in the request.
3488            ///
3489            /// Field 1004: `browse_only`
3490            #[must_use]
3491            pub fn browse_only(&self) -> ::core::option::Option<bool> {
3492                self.0.reborrow().browse_only
3493            }
3494        }
3495        impl ::core::convert::From<::buffa::OwnedView<CatalogView<'static>>>
3496        for CatalogOwnedView {
3497            fn from(inner: ::buffa::OwnedView<CatalogView<'static>>) -> Self {
3498                CatalogOwnedView(inner)
3499            }
3500        }
3501        impl ::core::convert::From<CatalogOwnedView>
3502        for ::buffa::OwnedView<CatalogView<'static>> {
3503            fn from(wrapper: CatalogOwnedView) -> Self {
3504                wrapper.0
3505            }
3506        }
3507        impl ::core::convert::AsRef<::buffa::OwnedView<CatalogView<'static>>>
3508        for CatalogOwnedView {
3509            fn as_ref(&self) -> &::buffa::OwnedView<CatalogView<'static>> {
3510                &self.0
3511            }
3512        }
3513        impl ::buffa::HasMessageView for super::super::Catalog {
3514            type View<'a> = CatalogView<'a>;
3515            type ViewHandle = CatalogOwnedView;
3516        }
3517        impl ::serde::Serialize for CatalogOwnedView {
3518            fn serialize<__S: ::serde::Serializer>(
3519                &self,
3520                __s: __S,
3521            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3522                ::serde::Serialize::serialize(&self.0, __s)
3523            }
3524        }
3525        /// List catalogs
3526        #[derive(Clone, Debug, Default)]
3527        pub struct ListCatalogsRequestView<'a> {
3528            /// The maximum number of results per page that should be returned.
3529            ///
3530            /// Field 2: `max_results`
3531            pub max_results: ::core::option::Option<i32>,
3532            /// Opaque pagination token to go to next page based on previous query.
3533            ///
3534            /// Field 3: `page_token`
3535            pub page_token: ::core::option::Option<&'a str>,
3536            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3537        }
3538        impl<'a> ListCatalogsRequestView<'a> {
3539            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
3540            ///
3541            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
3542            /// and by generated sub-message decode arms with `depth - 1`.
3543            ///
3544            /// **Not part of the public API.** Named with a leading underscore to
3545            /// signal that it is for generated-code use only.
3546            #[doc(hidden)]
3547            pub fn _decode_depth(
3548                buf: &'a [u8],
3549                depth: u32,
3550            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3551                let mut view = Self::default();
3552                view._merge_into_view(buf, depth)?;
3553                ::core::result::Result::Ok(view)
3554            }
3555            /// Merge fields from `buf` into this view (proto merge semantics).
3556            ///
3557            /// Repeated fields append; singular fields last-wins; singular
3558            /// MESSAGE fields merge recursively. Used by sub-message decode
3559            /// arms when the same field appears multiple times on the wire.
3560            ///
3561            /// **Not part of the public API.**
3562            #[doc(hidden)]
3563            pub fn _merge_into_view(
3564                &mut self,
3565                buf: &'a [u8],
3566                depth: u32,
3567            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3568                let _ = depth;
3569                #[allow(unused_variables)]
3570                let view = self;
3571                let mut cur: &'a [u8] = buf;
3572                while !cur.is_empty() {
3573                    let before_tag = cur;
3574                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3575                    match tag.field_number() {
3576                        2u32 => {
3577                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3578                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3579                                    field_number: 2u32,
3580                                    expected: 0u8,
3581                                    actual: tag.wire_type() as u8,
3582                                });
3583                            }
3584                            view.max_results = Some(
3585                                ::buffa::types::decode_int32(&mut cur)?,
3586                            );
3587                        }
3588                        3u32 => {
3589                            if tag.wire_type()
3590                                != ::buffa::encoding::WireType::LengthDelimited
3591                            {
3592                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3593                                    field_number: 3u32,
3594                                    expected: 2u8,
3595                                    actual: tag.wire_type() as u8,
3596                                });
3597                            }
3598                            view.page_token = Some(
3599                                ::buffa::types::borrow_str(&mut cur)?,
3600                            );
3601                        }
3602                        _ => {
3603                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3604                            let span_len = before_tag.len() - cur.len();
3605                            view.__buffa_unknown_fields
3606                                .push_raw(&before_tag[..span_len]);
3607                        }
3608                    }
3609                }
3610                ::core::result::Result::Ok(())
3611            }
3612        }
3613        impl<'a> ::buffa::MessageView<'a> for ListCatalogsRequestView<'a> {
3614            type Owned = super::super::ListCatalogsRequest;
3615            fn decode_view(
3616                buf: &'a [u8],
3617            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3618                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3619            }
3620            fn decode_view_with_limit(
3621                buf: &'a [u8],
3622                depth: u32,
3623            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3624                Self::_decode_depth(buf, depth)
3625            }
3626            fn to_owned_message(&self) -> super::super::ListCatalogsRequest {
3627                self.to_owned_from_source(None)
3628            }
3629            #[allow(clippy::useless_conversion, clippy::needless_update)]
3630            fn to_owned_from_source(
3631                &self,
3632                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3633            ) -> super::super::ListCatalogsRequest {
3634                #[allow(unused_imports)]
3635                use ::buffa::alloc::string::ToString as _;
3636                let _ = __buffa_src;
3637                super::super::ListCatalogsRequest {
3638                    max_results: self.max_results,
3639                    page_token: self.page_token.map(|s| s.to_string()),
3640                    __buffa_unknown_fields: self
3641                        .__buffa_unknown_fields
3642                        .to_owned()
3643                        .unwrap_or_default()
3644                        .into(),
3645                    ..::core::default::Default::default()
3646                }
3647            }
3648        }
3649        impl<'a> ::buffa::ViewEncode<'a> for ListCatalogsRequestView<'a> {
3650            #[allow(clippy::needless_borrow, clippy::let_and_return)]
3651            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3652                #[allow(unused_imports)]
3653                use ::buffa::Enumeration as _;
3654                let mut size = 0u32;
3655                if let Some(v) = self.max_results {
3656                    size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3657                }
3658                if let Some(ref v) = self.page_token {
3659                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3660                }
3661                size += self.__buffa_unknown_fields.encoded_len() as u32;
3662                size
3663            }
3664            #[allow(clippy::needless_borrow)]
3665            fn write_to(
3666                &self,
3667                _cache: &mut ::buffa::SizeCache,
3668                buf: &mut impl ::buffa::bytes::BufMut,
3669            ) {
3670                #[allow(unused_imports)]
3671                use ::buffa::Enumeration as _;
3672                if let Some(v) = self.max_results {
3673                    ::buffa::encoding::Tag::new(
3674                            2u32,
3675                            ::buffa::encoding::WireType::Varint,
3676                        )
3677                        .encode(buf);
3678                    ::buffa::types::encode_int32(v, buf);
3679                }
3680                if let Some(ref v) = self.page_token {
3681                    ::buffa::encoding::Tag::new(
3682                            3u32,
3683                            ::buffa::encoding::WireType::LengthDelimited,
3684                        )
3685                        .encode(buf);
3686                    ::buffa::types::encode_string(v, buf);
3687                }
3688                self.__buffa_unknown_fields.write_to(buf);
3689            }
3690        }
3691        /// Serializes this view as protobuf JSON.
3692        ///
3693        /// Implicit-presence fields with default values are omitted, `required`
3694        /// fields are always emitted, explicit-presence (`optional`) fields are
3695        /// emitted only when set, bytes fields are base64-encoded, and enum
3696        /// values are their proto name strings.
3697        ///
3698        /// This impl uses `serialize_map(None)` because the number of emitted
3699        /// fields depends on default-omission rules; serializers that require
3700        /// known map lengths (e.g. `bincode`) will return a runtime error.
3701        /// Use the owned message type for those formats.
3702        impl<'__a> ::serde::Serialize for ListCatalogsRequestView<'__a> {
3703            fn serialize<__S: ::serde::Serializer>(
3704                &self,
3705                __s: __S,
3706            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3707                use ::serde::ser::SerializeMap as _;
3708                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3709                if let ::core::option::Option::Some(__v) = self.max_results {
3710                    struct _W(i32);
3711                    impl ::serde::Serialize for _W {
3712                        fn serialize<__S: ::serde::Serializer>(
3713                            &self,
3714                            __s: __S,
3715                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
3716                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
3717                        }
3718                    }
3719                    __map.serialize_entry("max_results", &_W(__v))?;
3720                }
3721                if let ::core::option::Option::Some(__v) = self.page_token {
3722                    __map.serialize_entry("page_token", __v)?;
3723                }
3724                __map.end()
3725            }
3726        }
3727        impl<'a> ::buffa::MessageName for ListCatalogsRequestView<'a> {
3728            const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
3729            const NAME: &'static str = "ListCatalogsRequest";
3730            const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.ListCatalogsRequest";
3731            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.ListCatalogsRequest";
3732        }
3733        impl<'v> ::buffa::DefaultViewInstance for ListCatalogsRequestView<'v> {
3734            fn default_view_instance<'a>() -> &'a Self
3735            where
3736                Self: 'a,
3737            {
3738                static VALUE: ::buffa::__private::OnceBox<
3739                    ListCatalogsRequestView<'static>,
3740                > = ::buffa::__private::OnceBox::new();
3741                VALUE
3742                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3743                        <ListCatalogsRequestView<'static>>::default(),
3744                    ))
3745            }
3746        }
3747        impl ::buffa::ViewReborrow for ListCatalogsRequestView<'static> {
3748            type Reborrowed<'b> = ListCatalogsRequestView<'b>;
3749            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3750                this
3751            }
3752        }
3753        /** Self-contained, `'static` owned view of a `ListCatalogsRequest` message.
3754
3755 Wraps [`::buffa::OwnedView`]`<`[`ListCatalogsRequestView`]`<'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.
3756
3757 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListCatalogsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3758        #[derive(Clone, Debug)]
3759        pub struct ListCatalogsRequestOwnedView(
3760            ::buffa::OwnedView<ListCatalogsRequestView<'static>>,
3761        );
3762        impl ListCatalogsRequestOwnedView {
3763            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3764            ///
3765            /// The view borrows directly from the buffer's data; the buffer is
3766            /// retained inside the returned handle.
3767            ///
3768            /// # Errors
3769            ///
3770            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3771            /// protobuf data.
3772            pub fn decode(
3773                bytes: ::buffa::bytes::Bytes,
3774            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3775                ::core::result::Result::Ok(
3776                    ListCatalogsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
3777                )
3778            }
3779            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3780            /// max message size).
3781            ///
3782            /// # Errors
3783            ///
3784            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3785            /// exceeds the configured limits.
3786            pub fn decode_with_options(
3787                bytes: ::buffa::bytes::Bytes,
3788                opts: &::buffa::DecodeOptions,
3789            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3790                ::core::result::Result::Ok(
3791                    ListCatalogsRequestOwnedView(
3792                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3793                    ),
3794                )
3795            }
3796            /// Build from an owned message via an encode → decode round-trip.
3797            ///
3798            /// # Errors
3799            ///
3800            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3801            /// somehow invalid (should not happen for well-formed messages).
3802            pub fn from_owned(
3803                msg: &super::super::ListCatalogsRequest,
3804            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3805                ::core::result::Result::Ok(
3806                    ListCatalogsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
3807                )
3808            }
3809            /// Borrow the full [`ListCatalogsRequestView`] with its lifetime tied to `&self`.
3810            #[must_use]
3811            pub fn view(&self) -> &ListCatalogsRequestView<'_> {
3812                self.0.reborrow()
3813            }
3814            /// Convert to the owned message type.
3815            #[must_use]
3816            pub fn to_owned_message(&self) -> super::super::ListCatalogsRequest {
3817                self.0.to_owned_message()
3818            }
3819            /// The underlying bytes buffer.
3820            #[must_use]
3821            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3822                self.0.bytes()
3823            }
3824            /// Consume the handle, returning the underlying bytes buffer.
3825            #[must_use]
3826            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3827                self.0.into_bytes()
3828            }
3829            /// The maximum number of results per page that should be returned.
3830            ///
3831            /// Field 2: `max_results`
3832            #[must_use]
3833            pub fn max_results(&self) -> ::core::option::Option<i32> {
3834                self.0.reborrow().max_results
3835            }
3836            /// Opaque pagination token to go to next page based on previous query.
3837            ///
3838            /// Field 3: `page_token`
3839            #[must_use]
3840            pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
3841                self.0.reborrow().page_token
3842            }
3843        }
3844        impl ::core::convert::From<::buffa::OwnedView<ListCatalogsRequestView<'static>>>
3845        for ListCatalogsRequestOwnedView {
3846            fn from(
3847                inner: ::buffa::OwnedView<ListCatalogsRequestView<'static>>,
3848            ) -> Self {
3849                ListCatalogsRequestOwnedView(inner)
3850            }
3851        }
3852        impl ::core::convert::From<ListCatalogsRequestOwnedView>
3853        for ::buffa::OwnedView<ListCatalogsRequestView<'static>> {
3854            fn from(wrapper: ListCatalogsRequestOwnedView) -> Self {
3855                wrapper.0
3856            }
3857        }
3858        impl ::core::convert::AsRef<::buffa::OwnedView<ListCatalogsRequestView<'static>>>
3859        for ListCatalogsRequestOwnedView {
3860            fn as_ref(&self) -> &::buffa::OwnedView<ListCatalogsRequestView<'static>> {
3861                &self.0
3862            }
3863        }
3864        impl ::buffa::HasMessageView for super::super::ListCatalogsRequest {
3865            type View<'a> = ListCatalogsRequestView<'a>;
3866            type ViewHandle = ListCatalogsRequestOwnedView;
3867        }
3868        impl ::serde::Serialize for ListCatalogsRequestOwnedView {
3869            fn serialize<__S: ::serde::Serializer>(
3870                &self,
3871                __s: __S,
3872            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3873                ::serde::Serialize::serialize(&self.0, __s)
3874            }
3875        }
3876        /// List catalogs response.
3877        #[derive(Clone, Debug, Default)]
3878        pub struct ListCatalogsResponseView<'a> {
3879            /// The catalogs returned.
3880            ///
3881            /// Field 1: `catalogs`
3882            pub catalogs: ::buffa::RepeatedView<
3883                'a,
3884                super::super::__buffa::view::CatalogView<'a>,
3885            >,
3886            /// The next_page_token value to include in the next List request.
3887            ///
3888            /// Field 2: `next_page_token`
3889            pub next_page_token: ::core::option::Option<&'a str>,
3890            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3891        }
3892        impl<'a> ListCatalogsResponseView<'a> {
3893            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
3894            ///
3895            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
3896            /// and by generated sub-message decode arms with `depth - 1`.
3897            ///
3898            /// **Not part of the public API.** Named with a leading underscore to
3899            /// signal that it is for generated-code use only.
3900            #[doc(hidden)]
3901            pub fn _decode_depth(
3902                buf: &'a [u8],
3903                depth: u32,
3904            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3905                let mut view = Self::default();
3906                view._merge_into_view(buf, depth)?;
3907                ::core::result::Result::Ok(view)
3908            }
3909            /// Merge fields from `buf` into this view (proto merge semantics).
3910            ///
3911            /// Repeated fields append; singular fields last-wins; singular
3912            /// MESSAGE fields merge recursively. Used by sub-message decode
3913            /// arms when the same field appears multiple times on the wire.
3914            ///
3915            /// **Not part of the public API.**
3916            #[doc(hidden)]
3917            pub fn _merge_into_view(
3918                &mut self,
3919                buf: &'a [u8],
3920                depth: u32,
3921            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3922                let _ = depth;
3923                #[allow(unused_variables)]
3924                let view = self;
3925                let mut cur: &'a [u8] = buf;
3926                while !cur.is_empty() {
3927                    let before_tag = cur;
3928                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3929                    match tag.field_number() {
3930                        2u32 => {
3931                            if tag.wire_type()
3932                                != ::buffa::encoding::WireType::LengthDelimited
3933                            {
3934                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3935                                    field_number: 2u32,
3936                                    expected: 2u8,
3937                                    actual: tag.wire_type() as u8,
3938                                });
3939                            }
3940                            view.next_page_token = Some(
3941                                ::buffa::types::borrow_str(&mut cur)?,
3942                            );
3943                        }
3944                        1u32 => {
3945                            if tag.wire_type()
3946                                != ::buffa::encoding::WireType::LengthDelimited
3947                            {
3948                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3949                                    field_number: 1u32,
3950                                    expected: 2u8,
3951                                    actual: tag.wire_type() as u8,
3952                                });
3953                            }
3954                            if depth == 0 {
3955                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
3956                            }
3957                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
3958                            view.catalogs
3959                                .push(
3960                                    super::super::__buffa::view::CatalogView::_decode_depth(
3961                                        sub,
3962                                        depth - 1,
3963                                    )?,
3964                                );
3965                        }
3966                        _ => {
3967                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3968                            let span_len = before_tag.len() - cur.len();
3969                            view.__buffa_unknown_fields
3970                                .push_raw(&before_tag[..span_len]);
3971                        }
3972                    }
3973                }
3974                ::core::result::Result::Ok(())
3975            }
3976        }
3977        impl<'a> ::buffa::MessageView<'a> for ListCatalogsResponseView<'a> {
3978            type Owned = super::super::ListCatalogsResponse;
3979            fn decode_view(
3980                buf: &'a [u8],
3981            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3982                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3983            }
3984            fn decode_view_with_limit(
3985                buf: &'a [u8],
3986                depth: u32,
3987            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3988                Self::_decode_depth(buf, depth)
3989            }
3990            fn to_owned_message(&self) -> super::super::ListCatalogsResponse {
3991                self.to_owned_from_source(None)
3992            }
3993            #[allow(clippy::useless_conversion, clippy::needless_update)]
3994            fn to_owned_from_source(
3995                &self,
3996                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3997            ) -> super::super::ListCatalogsResponse {
3998                #[allow(unused_imports)]
3999                use ::buffa::alloc::string::ToString as _;
4000                let _ = __buffa_src;
4001                super::super::ListCatalogsResponse {
4002                    catalogs: self
4003                        .catalogs
4004                        .iter()
4005                        .map(|v| v.to_owned_from_source(__buffa_src))
4006                        .collect(),
4007                    next_page_token: self.next_page_token.map(|s| s.to_string()),
4008                    __buffa_unknown_fields: self
4009                        .__buffa_unknown_fields
4010                        .to_owned()
4011                        .unwrap_or_default()
4012                        .into(),
4013                    ..::core::default::Default::default()
4014                }
4015            }
4016        }
4017        impl<'a> ::buffa::ViewEncode<'a> for ListCatalogsResponseView<'a> {
4018            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4019            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4020                #[allow(unused_imports)]
4021                use ::buffa::Enumeration as _;
4022                let mut size = 0u32;
4023                for v in &self.catalogs {
4024                    let __slot = __cache.reserve();
4025                    let inner_size = v.compute_size(__cache);
4026                    __cache.set(__slot, inner_size);
4027                    size
4028                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4029                            + inner_size;
4030                }
4031                if let Some(ref v) = self.next_page_token {
4032                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4033                }
4034                size += self.__buffa_unknown_fields.encoded_len() as u32;
4035                size
4036            }
4037            #[allow(clippy::needless_borrow)]
4038            fn write_to(
4039                &self,
4040                __cache: &mut ::buffa::SizeCache,
4041                buf: &mut impl ::buffa::bytes::BufMut,
4042            ) {
4043                #[allow(unused_imports)]
4044                use ::buffa::Enumeration as _;
4045                for v in &self.catalogs {
4046                    ::buffa::encoding::Tag::new(
4047                            1u32,
4048                            ::buffa::encoding::WireType::LengthDelimited,
4049                        )
4050                        .encode(buf);
4051                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4052                    v.write_to(__cache, buf);
4053                }
4054                if let Some(ref v) = self.next_page_token {
4055                    ::buffa::encoding::Tag::new(
4056                            2u32,
4057                            ::buffa::encoding::WireType::LengthDelimited,
4058                        )
4059                        .encode(buf);
4060                    ::buffa::types::encode_string(v, buf);
4061                }
4062                self.__buffa_unknown_fields.write_to(buf);
4063            }
4064        }
4065        /// Serializes this view as protobuf JSON.
4066        ///
4067        /// Implicit-presence fields with default values are omitted, `required`
4068        /// fields are always emitted, explicit-presence (`optional`) fields are
4069        /// emitted only when set, bytes fields are base64-encoded, and enum
4070        /// values are their proto name strings.
4071        ///
4072        /// This impl uses `serialize_map(None)` because the number of emitted
4073        /// fields depends on default-omission rules; serializers that require
4074        /// known map lengths (e.g. `bincode`) will return a runtime error.
4075        /// Use the owned message type for those formats.
4076        impl<'__a> ::serde::Serialize for ListCatalogsResponseView<'__a> {
4077            fn serialize<__S: ::serde::Serializer>(
4078                &self,
4079                __s: __S,
4080            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4081                use ::serde::ser::SerializeMap as _;
4082                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4083                if !self.catalogs.is_empty() {
4084                    __map.serialize_entry("catalogs", &*self.catalogs)?;
4085                }
4086                if let ::core::option::Option::Some(__v) = self.next_page_token {
4087                    __map.serialize_entry("next_page_token", __v)?;
4088                }
4089                __map.end()
4090            }
4091        }
4092        impl<'a> ::buffa::MessageName for ListCatalogsResponseView<'a> {
4093            const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
4094            const NAME: &'static str = "ListCatalogsResponse";
4095            const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.ListCatalogsResponse";
4096            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.ListCatalogsResponse";
4097        }
4098        impl<'v> ::buffa::DefaultViewInstance for ListCatalogsResponseView<'v> {
4099            fn default_view_instance<'a>() -> &'a Self
4100            where
4101                Self: 'a,
4102            {
4103                static VALUE: ::buffa::__private::OnceBox<
4104                    ListCatalogsResponseView<'static>,
4105                > = ::buffa::__private::OnceBox::new();
4106                VALUE
4107                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4108                        <ListCatalogsResponseView<'static>>::default(),
4109                    ))
4110            }
4111        }
4112        impl ::buffa::ViewReborrow for ListCatalogsResponseView<'static> {
4113            type Reborrowed<'b> = ListCatalogsResponseView<'b>;
4114            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4115                this
4116            }
4117        }
4118        /** Self-contained, `'static` owned view of a `ListCatalogsResponse` message.
4119
4120 Wraps [`::buffa::OwnedView`]`<`[`ListCatalogsResponseView`]`<'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.
4121
4122 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListCatalogsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4123        #[derive(Clone, Debug)]
4124        pub struct ListCatalogsResponseOwnedView(
4125            ::buffa::OwnedView<ListCatalogsResponseView<'static>>,
4126        );
4127        impl ListCatalogsResponseOwnedView {
4128            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4129            ///
4130            /// The view borrows directly from the buffer's data; the buffer is
4131            /// retained inside the returned handle.
4132            ///
4133            /// # Errors
4134            ///
4135            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4136            /// protobuf data.
4137            pub fn decode(
4138                bytes: ::buffa::bytes::Bytes,
4139            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4140                ::core::result::Result::Ok(
4141                    ListCatalogsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
4142                )
4143            }
4144            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4145            /// max message size).
4146            ///
4147            /// # Errors
4148            ///
4149            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4150            /// exceeds the configured limits.
4151            pub fn decode_with_options(
4152                bytes: ::buffa::bytes::Bytes,
4153                opts: &::buffa::DecodeOptions,
4154            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4155                ::core::result::Result::Ok(
4156                    ListCatalogsResponseOwnedView(
4157                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4158                    ),
4159                )
4160            }
4161            /// Build from an owned message via an encode → decode round-trip.
4162            ///
4163            /// # Errors
4164            ///
4165            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4166            /// somehow invalid (should not happen for well-formed messages).
4167            pub fn from_owned(
4168                msg: &super::super::ListCatalogsResponse,
4169            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4170                ::core::result::Result::Ok(
4171                    ListCatalogsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
4172                )
4173            }
4174            /// Borrow the full [`ListCatalogsResponseView`] with its lifetime tied to `&self`.
4175            #[must_use]
4176            pub fn view(&self) -> &ListCatalogsResponseView<'_> {
4177                self.0.reborrow()
4178            }
4179            /// Convert to the owned message type.
4180            #[must_use]
4181            pub fn to_owned_message(&self) -> super::super::ListCatalogsResponse {
4182                self.0.to_owned_message()
4183            }
4184            /// The underlying bytes buffer.
4185            #[must_use]
4186            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4187                self.0.bytes()
4188            }
4189            /// Consume the handle, returning the underlying bytes buffer.
4190            #[must_use]
4191            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4192                self.0.into_bytes()
4193            }
4194            /// The catalogs returned.
4195            ///
4196            /// Field 1: `catalogs`
4197            #[must_use]
4198            pub fn catalogs(
4199                &self,
4200            ) -> &::buffa::RepeatedView<
4201                '_,
4202                super::super::__buffa::view::CatalogView<'_>,
4203            > {
4204                &self.0.reborrow().catalogs
4205            }
4206            /// The next_page_token value to include in the next List request.
4207            ///
4208            /// Field 2: `next_page_token`
4209            #[must_use]
4210            pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
4211                self.0.reborrow().next_page_token
4212            }
4213        }
4214        impl ::core::convert::From<::buffa::OwnedView<ListCatalogsResponseView<'static>>>
4215        for ListCatalogsResponseOwnedView {
4216            fn from(
4217                inner: ::buffa::OwnedView<ListCatalogsResponseView<'static>>,
4218            ) -> Self {
4219                ListCatalogsResponseOwnedView(inner)
4220            }
4221        }
4222        impl ::core::convert::From<ListCatalogsResponseOwnedView>
4223        for ::buffa::OwnedView<ListCatalogsResponseView<'static>> {
4224            fn from(wrapper: ListCatalogsResponseOwnedView) -> Self {
4225                wrapper.0
4226            }
4227        }
4228        impl ::core::convert::AsRef<
4229            ::buffa::OwnedView<ListCatalogsResponseView<'static>>,
4230        > for ListCatalogsResponseOwnedView {
4231            fn as_ref(&self) -> &::buffa::OwnedView<ListCatalogsResponseView<'static>> {
4232                &self.0
4233            }
4234        }
4235        impl ::buffa::HasMessageView for super::super::ListCatalogsResponse {
4236            type View<'a> = ListCatalogsResponseView<'a>;
4237            type ViewHandle = ListCatalogsResponseOwnedView;
4238        }
4239        impl ::serde::Serialize for ListCatalogsResponseOwnedView {
4240            fn serialize<__S: ::serde::Serializer>(
4241                &self,
4242                __s: __S,
4243            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4244                ::serde::Serialize::serialize(&self.0, __s)
4245            }
4246        }
4247        /// Create a new catalog
4248        #[derive(Clone, Debug, Default)]
4249        pub struct CreateCatalogRequestView<'a> {
4250            /// Name of catalog.
4251            ///
4252            /// Field 1: `name`
4253            pub name: &'a str,
4254            /// User-provided free-form text description.
4255            ///
4256            /// Field 2: `comment`
4257            pub comment: ::core::option::Option<&'a str>,
4258            /// A map of key-value properties attached to the securable.
4259            ///
4260            /// Field 3: `properties` (map)
4261            pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
4262            /// Storage root URL for managed tables within catalog.
4263            ///
4264            /// Field 4: `storage_root`
4265            pub storage_root: ::core::option::Option<&'a str>,
4266            /// The name of delta sharing provider.
4267            ///
4268            /// A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server.
4269            ///
4270            /// Field 5: `provider_name`
4271            pub provider_name: ::core::option::Option<&'a str>,
4272            /// The name of the share under the share provider.
4273            ///
4274            /// Field 6: `share_name`
4275            pub share_name: ::core::option::Option<&'a str>,
4276            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4277        }
4278        impl<'a> CreateCatalogRequestView<'a> {
4279            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4280            ///
4281            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4282            /// and by generated sub-message decode arms with `depth - 1`.
4283            ///
4284            /// **Not part of the public API.** Named with a leading underscore to
4285            /// signal that it is for generated-code use only.
4286            #[doc(hidden)]
4287            pub fn _decode_depth(
4288                buf: &'a [u8],
4289                depth: u32,
4290            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4291                let mut view = Self::default();
4292                view._merge_into_view(buf, depth)?;
4293                ::core::result::Result::Ok(view)
4294            }
4295            /// Merge fields from `buf` into this view (proto merge semantics).
4296            ///
4297            /// Repeated fields append; singular fields last-wins; singular
4298            /// MESSAGE fields merge recursively. Used by sub-message decode
4299            /// arms when the same field appears multiple times on the wire.
4300            ///
4301            /// **Not part of the public API.**
4302            #[doc(hidden)]
4303            pub fn _merge_into_view(
4304                &mut self,
4305                buf: &'a [u8],
4306                depth: u32,
4307            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4308                let _ = depth;
4309                #[allow(unused_variables)]
4310                let view = self;
4311                let mut cur: &'a [u8] = buf;
4312                while !cur.is_empty() {
4313                    let before_tag = cur;
4314                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4315                    match tag.field_number() {
4316                        1u32 => {
4317                            if tag.wire_type()
4318                                != ::buffa::encoding::WireType::LengthDelimited
4319                            {
4320                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4321                                    field_number: 1u32,
4322                                    expected: 2u8,
4323                                    actual: tag.wire_type() as u8,
4324                                });
4325                            }
4326                            view.name = ::buffa::types::borrow_str(&mut cur)?;
4327                        }
4328                        2u32 => {
4329                            if tag.wire_type()
4330                                != ::buffa::encoding::WireType::LengthDelimited
4331                            {
4332                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4333                                    field_number: 2u32,
4334                                    expected: 2u8,
4335                                    actual: tag.wire_type() as u8,
4336                                });
4337                            }
4338                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
4339                        }
4340                        4u32 => {
4341                            if tag.wire_type()
4342                                != ::buffa::encoding::WireType::LengthDelimited
4343                            {
4344                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4345                                    field_number: 4u32,
4346                                    expected: 2u8,
4347                                    actual: tag.wire_type() as u8,
4348                                });
4349                            }
4350                            view.storage_root = Some(
4351                                ::buffa::types::borrow_str(&mut cur)?,
4352                            );
4353                        }
4354                        5u32 => {
4355                            if tag.wire_type()
4356                                != ::buffa::encoding::WireType::LengthDelimited
4357                            {
4358                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4359                                    field_number: 5u32,
4360                                    expected: 2u8,
4361                                    actual: tag.wire_type() as u8,
4362                                });
4363                            }
4364                            view.provider_name = Some(
4365                                ::buffa::types::borrow_str(&mut cur)?,
4366                            );
4367                        }
4368                        6u32 => {
4369                            if tag.wire_type()
4370                                != ::buffa::encoding::WireType::LengthDelimited
4371                            {
4372                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4373                                    field_number: 6u32,
4374                                    expected: 2u8,
4375                                    actual: tag.wire_type() as u8,
4376                                });
4377                            }
4378                            view.share_name = Some(
4379                                ::buffa::types::borrow_str(&mut cur)?,
4380                            );
4381                        }
4382                        3u32 => {
4383                            if tag.wire_type()
4384                                != ::buffa::encoding::WireType::LengthDelimited
4385                            {
4386                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4387                                    field_number: 3u32,
4388                                    expected: 2u8,
4389                                    actual: tag.wire_type() as u8,
4390                                });
4391                            }
4392                            let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
4393                            let mut entry_cur: &'a [u8] = entry_bytes;
4394                            let mut key = "";
4395                            let mut val = "";
4396                            while !entry_cur.is_empty() {
4397                                let entry_tag = ::buffa::encoding::Tag::decode(
4398                                    &mut entry_cur,
4399                                )?;
4400                                match entry_tag.field_number() {
4401                                    1 => {
4402                                        if entry_tag.wire_type()
4403                                            != ::buffa::encoding::WireType::LengthDelimited
4404                                        {
4405                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4406                                                field_number: entry_tag.field_number(),
4407                                                expected: 2u8,
4408                                                actual: entry_tag.wire_type() as u8,
4409                                            });
4410                                        }
4411                                        key = ::buffa::types::borrow_str(&mut entry_cur)?;
4412                                    }
4413                                    2 => {
4414                                        if entry_tag.wire_type()
4415                                            != ::buffa::encoding::WireType::LengthDelimited
4416                                        {
4417                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4418                                                field_number: entry_tag.field_number(),
4419                                                expected: 2u8,
4420                                                actual: entry_tag.wire_type() as u8,
4421                                            });
4422                                        }
4423                                        val = ::buffa::types::borrow_str(&mut entry_cur)?;
4424                                    }
4425                                    _ => {
4426                                        ::buffa::encoding::skip_field_depth(
4427                                            entry_tag,
4428                                            &mut entry_cur,
4429                                            depth,
4430                                        )?;
4431                                    }
4432                                }
4433                            }
4434                            view.properties.push(key, val);
4435                        }
4436                        _ => {
4437                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4438                            let span_len = before_tag.len() - cur.len();
4439                            view.__buffa_unknown_fields
4440                                .push_raw(&before_tag[..span_len]);
4441                        }
4442                    }
4443                }
4444                ::core::result::Result::Ok(())
4445            }
4446        }
4447        impl<'a> ::buffa::MessageView<'a> for CreateCatalogRequestView<'a> {
4448            type Owned = super::super::CreateCatalogRequest;
4449            fn decode_view(
4450                buf: &'a [u8],
4451            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4452                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4453            }
4454            fn decode_view_with_limit(
4455                buf: &'a [u8],
4456                depth: u32,
4457            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4458                Self::_decode_depth(buf, depth)
4459            }
4460            fn to_owned_message(&self) -> super::super::CreateCatalogRequest {
4461                self.to_owned_from_source(None)
4462            }
4463            #[allow(clippy::useless_conversion, clippy::needless_update)]
4464            fn to_owned_from_source(
4465                &self,
4466                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4467            ) -> super::super::CreateCatalogRequest {
4468                #[allow(unused_imports)]
4469                use ::buffa::alloc::string::ToString as _;
4470                let _ = __buffa_src;
4471                super::super::CreateCatalogRequest {
4472                    name: self.name.to_string(),
4473                    comment: self.comment.map(|s| s.to_string()),
4474                    properties: self
4475                        .properties
4476                        .iter()
4477                        .map(|(k, v)| (k.to_string(), v.to_string()))
4478                        .collect(),
4479                    storage_root: self.storage_root.map(|s| s.to_string()),
4480                    provider_name: self.provider_name.map(|s| s.to_string()),
4481                    share_name: self.share_name.map(|s| s.to_string()),
4482                    __buffa_unknown_fields: self
4483                        .__buffa_unknown_fields
4484                        .to_owned()
4485                        .unwrap_or_default()
4486                        .into(),
4487                    ..::core::default::Default::default()
4488                }
4489            }
4490        }
4491        impl<'a> ::buffa::ViewEncode<'a> for CreateCatalogRequestView<'a> {
4492            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4493            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4494                #[allow(unused_imports)]
4495                use ::buffa::Enumeration as _;
4496                let mut size = 0u32;
4497                if !self.name.is_empty() {
4498                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4499                }
4500                if let Some(ref v) = self.comment {
4501                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4502                }
4503                #[allow(clippy::for_kv_map)]
4504                for (k, v) in &self.properties {
4505                    let entry_size: u32 = 1u32
4506                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
4507                        + ::buffa::types::string_encoded_len(v) as u32;
4508                    size
4509                        += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
4510                            + entry_size;
4511                }
4512                if let Some(ref v) = self.storage_root {
4513                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4514                }
4515                if let Some(ref v) = self.provider_name {
4516                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4517                }
4518                if let Some(ref v) = self.share_name {
4519                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4520                }
4521                size += self.__buffa_unknown_fields.encoded_len() as u32;
4522                size
4523            }
4524            #[allow(clippy::needless_borrow)]
4525            fn write_to(
4526                &self,
4527                _cache: &mut ::buffa::SizeCache,
4528                buf: &mut impl ::buffa::bytes::BufMut,
4529            ) {
4530                #[allow(unused_imports)]
4531                use ::buffa::Enumeration as _;
4532                if !self.name.is_empty() {
4533                    ::buffa::encoding::Tag::new(
4534                            1u32,
4535                            ::buffa::encoding::WireType::LengthDelimited,
4536                        )
4537                        .encode(buf);
4538                    ::buffa::types::encode_string(&self.name, buf);
4539                }
4540                if let Some(ref v) = self.comment {
4541                    ::buffa::encoding::Tag::new(
4542                            2u32,
4543                            ::buffa::encoding::WireType::LengthDelimited,
4544                        )
4545                        .encode(buf);
4546                    ::buffa::types::encode_string(v, buf);
4547                }
4548                for (k, v) in &self.properties {
4549                    let entry_size: u32 = 1u32
4550                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
4551                        + ::buffa::types::string_encoded_len(v) as u32;
4552                    ::buffa::encoding::Tag::new(
4553                            3u32,
4554                            ::buffa::encoding::WireType::LengthDelimited,
4555                        )
4556                        .encode(buf);
4557                    ::buffa::encoding::encode_varint(entry_size as u64, buf);
4558                    ::buffa::encoding::Tag::new(
4559                            1u32,
4560                            ::buffa::encoding::WireType::LengthDelimited,
4561                        )
4562                        .encode(buf);
4563                    ::buffa::types::encode_string(k, buf);
4564                    ::buffa::encoding::Tag::new(
4565                            2u32,
4566                            ::buffa::encoding::WireType::LengthDelimited,
4567                        )
4568                        .encode(buf);
4569                    ::buffa::types::encode_string(v, buf);
4570                }
4571                if let Some(ref v) = self.storage_root {
4572                    ::buffa::encoding::Tag::new(
4573                            4u32,
4574                            ::buffa::encoding::WireType::LengthDelimited,
4575                        )
4576                        .encode(buf);
4577                    ::buffa::types::encode_string(v, buf);
4578                }
4579                if let Some(ref v) = self.provider_name {
4580                    ::buffa::encoding::Tag::new(
4581                            5u32,
4582                            ::buffa::encoding::WireType::LengthDelimited,
4583                        )
4584                        .encode(buf);
4585                    ::buffa::types::encode_string(v, buf);
4586                }
4587                if let Some(ref v) = self.share_name {
4588                    ::buffa::encoding::Tag::new(
4589                            6u32,
4590                            ::buffa::encoding::WireType::LengthDelimited,
4591                        )
4592                        .encode(buf);
4593                    ::buffa::types::encode_string(v, buf);
4594                }
4595                self.__buffa_unknown_fields.write_to(buf);
4596            }
4597        }
4598        /// Serializes this view as protobuf JSON.
4599        ///
4600        /// Implicit-presence fields with default values are omitted, `required`
4601        /// fields are always emitted, explicit-presence (`optional`) fields are
4602        /// emitted only when set, bytes fields are base64-encoded, and enum
4603        /// values are their proto name strings.
4604        ///
4605        /// This impl uses `serialize_map(None)` because the number of emitted
4606        /// fields depends on default-omission rules; serializers that require
4607        /// known map lengths (e.g. `bincode`) will return a runtime error.
4608        /// Use the owned message type for those formats.
4609        impl<'__a> ::serde::Serialize for CreateCatalogRequestView<'__a> {
4610            fn serialize<__S: ::serde::Serializer>(
4611                &self,
4612                __s: __S,
4613            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4614                use ::serde::ser::SerializeMap as _;
4615                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4616                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
4617                    __map.serialize_entry("name", self.name)?;
4618                }
4619                if let ::core::option::Option::Some(__v) = self.comment {
4620                    __map.serialize_entry("comment", __v)?;
4621                }
4622                if !self.properties.is_empty() {
4623                    struct _WM<'__a, '__x>(
4624                        &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
4625                    );
4626                    impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
4627                        fn serialize<__S: ::serde::Serializer>(
4628                            &self,
4629                            __s: __S,
4630                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
4631                            use ::serde::ser::SerializeMap as _;
4632                            let mut __m = __s
4633                                .serialize_map(::core::option::Option::Some(self.0.len()))?;
4634                            for (k, v) in self.0.iter_unique() {
4635                                __m.serialize_entry(k, v)?;
4636                            }
4637                            __m.end()
4638                        }
4639                    }
4640                    __map.serialize_entry("properties", &_WM(&self.properties))?;
4641                }
4642                if let ::core::option::Option::Some(__v) = self.storage_root {
4643                    __map.serialize_entry("storage_root", __v)?;
4644                }
4645                if let ::core::option::Option::Some(__v) = self.provider_name {
4646                    __map.serialize_entry("provider_name", __v)?;
4647                }
4648                if let ::core::option::Option::Some(__v) = self.share_name {
4649                    __map.serialize_entry("share_name", __v)?;
4650                }
4651                __map.end()
4652            }
4653        }
4654        impl<'a> ::buffa::MessageName for CreateCatalogRequestView<'a> {
4655            const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
4656            const NAME: &'static str = "CreateCatalogRequest";
4657            const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.CreateCatalogRequest";
4658            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.CreateCatalogRequest";
4659        }
4660        impl<'v> ::buffa::DefaultViewInstance for CreateCatalogRequestView<'v> {
4661            fn default_view_instance<'a>() -> &'a Self
4662            where
4663                Self: 'a,
4664            {
4665                static VALUE: ::buffa::__private::OnceBox<
4666                    CreateCatalogRequestView<'static>,
4667                > = ::buffa::__private::OnceBox::new();
4668                VALUE
4669                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4670                        <CreateCatalogRequestView<'static>>::default(),
4671                    ))
4672            }
4673        }
4674        impl ::buffa::ViewReborrow for CreateCatalogRequestView<'static> {
4675            type Reborrowed<'b> = CreateCatalogRequestView<'b>;
4676            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4677                this
4678            }
4679        }
4680        /** Self-contained, `'static` owned view of a `CreateCatalogRequest` message.
4681
4682 Wraps [`::buffa::OwnedView`]`<`[`CreateCatalogRequestView`]`<'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.
4683
4684 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateCatalogRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4685        #[derive(Clone, Debug)]
4686        pub struct CreateCatalogRequestOwnedView(
4687            ::buffa::OwnedView<CreateCatalogRequestView<'static>>,
4688        );
4689        impl CreateCatalogRequestOwnedView {
4690            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4691            ///
4692            /// The view borrows directly from the buffer's data; the buffer is
4693            /// retained inside the returned handle.
4694            ///
4695            /// # Errors
4696            ///
4697            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4698            /// protobuf data.
4699            pub fn decode(
4700                bytes: ::buffa::bytes::Bytes,
4701            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4702                ::core::result::Result::Ok(
4703                    CreateCatalogRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
4704                )
4705            }
4706            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4707            /// max message size).
4708            ///
4709            /// # Errors
4710            ///
4711            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4712            /// exceeds the configured limits.
4713            pub fn decode_with_options(
4714                bytes: ::buffa::bytes::Bytes,
4715                opts: &::buffa::DecodeOptions,
4716            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4717                ::core::result::Result::Ok(
4718                    CreateCatalogRequestOwnedView(
4719                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4720                    ),
4721                )
4722            }
4723            /// Build from an owned message via an encode → decode round-trip.
4724            ///
4725            /// # Errors
4726            ///
4727            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4728            /// somehow invalid (should not happen for well-formed messages).
4729            pub fn from_owned(
4730                msg: &super::super::CreateCatalogRequest,
4731            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4732                ::core::result::Result::Ok(
4733                    CreateCatalogRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
4734                )
4735            }
4736            /// Borrow the full [`CreateCatalogRequestView`] with its lifetime tied to `&self`.
4737            #[must_use]
4738            pub fn view(&self) -> &CreateCatalogRequestView<'_> {
4739                self.0.reborrow()
4740            }
4741            /// Convert to the owned message type.
4742            #[must_use]
4743            pub fn to_owned_message(&self) -> super::super::CreateCatalogRequest {
4744                self.0.to_owned_message()
4745            }
4746            /// The underlying bytes buffer.
4747            #[must_use]
4748            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4749                self.0.bytes()
4750            }
4751            /// Consume the handle, returning the underlying bytes buffer.
4752            #[must_use]
4753            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4754                self.0.into_bytes()
4755            }
4756            /// Name of catalog.
4757            ///
4758            /// Field 1: `name`
4759            #[must_use]
4760            pub fn name(&self) -> &'_ str {
4761                self.0.reborrow().name
4762            }
4763            /// User-provided free-form text description.
4764            ///
4765            /// Field 2: `comment`
4766            #[must_use]
4767            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
4768                self.0.reborrow().comment
4769            }
4770            /// A map of key-value properties attached to the securable.
4771            ///
4772            /// Field 3: `properties` (map)
4773            #[must_use]
4774            pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
4775                &self.0.reborrow().properties
4776            }
4777            /// Storage root URL for managed tables within catalog.
4778            ///
4779            /// Field 4: `storage_root`
4780            #[must_use]
4781            pub fn storage_root(&self) -> ::core::option::Option<&'_ str> {
4782                self.0.reborrow().storage_root
4783            }
4784            /// The name of delta sharing provider.
4785            ///
4786            /// A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server.
4787            ///
4788            /// Field 5: `provider_name`
4789            #[must_use]
4790            pub fn provider_name(&self) -> ::core::option::Option<&'_ str> {
4791                self.0.reborrow().provider_name
4792            }
4793            /// The name of the share under the share provider.
4794            ///
4795            /// Field 6: `share_name`
4796            #[must_use]
4797            pub fn share_name(&self) -> ::core::option::Option<&'_ str> {
4798                self.0.reborrow().share_name
4799            }
4800        }
4801        impl ::core::convert::From<::buffa::OwnedView<CreateCatalogRequestView<'static>>>
4802        for CreateCatalogRequestOwnedView {
4803            fn from(
4804                inner: ::buffa::OwnedView<CreateCatalogRequestView<'static>>,
4805            ) -> Self {
4806                CreateCatalogRequestOwnedView(inner)
4807            }
4808        }
4809        impl ::core::convert::From<CreateCatalogRequestOwnedView>
4810        for ::buffa::OwnedView<CreateCatalogRequestView<'static>> {
4811            fn from(wrapper: CreateCatalogRequestOwnedView) -> Self {
4812                wrapper.0
4813            }
4814        }
4815        impl ::core::convert::AsRef<
4816            ::buffa::OwnedView<CreateCatalogRequestView<'static>>,
4817        > for CreateCatalogRequestOwnedView {
4818            fn as_ref(&self) -> &::buffa::OwnedView<CreateCatalogRequestView<'static>> {
4819                &self.0
4820            }
4821        }
4822        impl ::buffa::HasMessageView for super::super::CreateCatalogRequest {
4823            type View<'a> = CreateCatalogRequestView<'a>;
4824            type ViewHandle = CreateCatalogRequestOwnedView;
4825        }
4826        impl ::serde::Serialize for CreateCatalogRequestOwnedView {
4827            fn serialize<__S: ::serde::Serializer>(
4828                &self,
4829                __s: __S,
4830            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4831                ::serde::Serialize::serialize(&self.0, __s)
4832            }
4833        }
4834        /// Get a catalog
4835        #[derive(Clone, Debug, Default)]
4836        pub struct GetCatalogRequestView<'a> {
4837            /// Name of catalog.
4838            ///
4839            /// Field 1: `name`
4840            pub name: &'a str,
4841            /// Whether to include catalogs in the response for which the principal can only access selective metadata for
4842            ///
4843            /// Field 2: `include_browse`
4844            pub include_browse: ::core::option::Option<bool>,
4845            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4846        }
4847        impl<'a> GetCatalogRequestView<'a> {
4848            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4849            ///
4850            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4851            /// and by generated sub-message decode arms with `depth - 1`.
4852            ///
4853            /// **Not part of the public API.** Named with a leading underscore to
4854            /// signal that it is for generated-code use only.
4855            #[doc(hidden)]
4856            pub fn _decode_depth(
4857                buf: &'a [u8],
4858                depth: u32,
4859            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4860                let mut view = Self::default();
4861                view._merge_into_view(buf, depth)?;
4862                ::core::result::Result::Ok(view)
4863            }
4864            /// Merge fields from `buf` into this view (proto merge semantics).
4865            ///
4866            /// Repeated fields append; singular fields last-wins; singular
4867            /// MESSAGE fields merge recursively. Used by sub-message decode
4868            /// arms when the same field appears multiple times on the wire.
4869            ///
4870            /// **Not part of the public API.**
4871            #[doc(hidden)]
4872            pub fn _merge_into_view(
4873                &mut self,
4874                buf: &'a [u8],
4875                depth: u32,
4876            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4877                let _ = depth;
4878                #[allow(unused_variables)]
4879                let view = self;
4880                let mut cur: &'a [u8] = buf;
4881                while !cur.is_empty() {
4882                    let before_tag = cur;
4883                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4884                    match tag.field_number() {
4885                        1u32 => {
4886                            if tag.wire_type()
4887                                != ::buffa::encoding::WireType::LengthDelimited
4888                            {
4889                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4890                                    field_number: 1u32,
4891                                    expected: 2u8,
4892                                    actual: tag.wire_type() as u8,
4893                                });
4894                            }
4895                            view.name = ::buffa::types::borrow_str(&mut cur)?;
4896                        }
4897                        2u32 => {
4898                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4899                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4900                                    field_number: 2u32,
4901                                    expected: 0u8,
4902                                    actual: tag.wire_type() as u8,
4903                                });
4904                            }
4905                            view.include_browse = Some(
4906                                ::buffa::types::decode_bool(&mut cur)?,
4907                            );
4908                        }
4909                        _ => {
4910                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4911                            let span_len = before_tag.len() - cur.len();
4912                            view.__buffa_unknown_fields
4913                                .push_raw(&before_tag[..span_len]);
4914                        }
4915                    }
4916                }
4917                ::core::result::Result::Ok(())
4918            }
4919        }
4920        impl<'a> ::buffa::MessageView<'a> for GetCatalogRequestView<'a> {
4921            type Owned = super::super::GetCatalogRequest;
4922            fn decode_view(
4923                buf: &'a [u8],
4924            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4925                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4926            }
4927            fn decode_view_with_limit(
4928                buf: &'a [u8],
4929                depth: u32,
4930            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4931                Self::_decode_depth(buf, depth)
4932            }
4933            fn to_owned_message(&self) -> super::super::GetCatalogRequest {
4934                self.to_owned_from_source(None)
4935            }
4936            #[allow(clippy::useless_conversion, clippy::needless_update)]
4937            fn to_owned_from_source(
4938                &self,
4939                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4940            ) -> super::super::GetCatalogRequest {
4941                #[allow(unused_imports)]
4942                use ::buffa::alloc::string::ToString as _;
4943                let _ = __buffa_src;
4944                super::super::GetCatalogRequest {
4945                    name: self.name.to_string(),
4946                    include_browse: self.include_browse,
4947                    __buffa_unknown_fields: self
4948                        .__buffa_unknown_fields
4949                        .to_owned()
4950                        .unwrap_or_default()
4951                        .into(),
4952                    ..::core::default::Default::default()
4953                }
4954            }
4955        }
4956        impl<'a> ::buffa::ViewEncode<'a> for GetCatalogRequestView<'a> {
4957            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4958            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4959                #[allow(unused_imports)]
4960                use ::buffa::Enumeration as _;
4961                let mut size = 0u32;
4962                if !self.name.is_empty() {
4963                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4964                }
4965                if self.include_browse.is_some() {
4966                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4967                }
4968                size += self.__buffa_unknown_fields.encoded_len() as u32;
4969                size
4970            }
4971            #[allow(clippy::needless_borrow)]
4972            fn write_to(
4973                &self,
4974                _cache: &mut ::buffa::SizeCache,
4975                buf: &mut impl ::buffa::bytes::BufMut,
4976            ) {
4977                #[allow(unused_imports)]
4978                use ::buffa::Enumeration as _;
4979                if !self.name.is_empty() {
4980                    ::buffa::encoding::Tag::new(
4981                            1u32,
4982                            ::buffa::encoding::WireType::LengthDelimited,
4983                        )
4984                        .encode(buf);
4985                    ::buffa::types::encode_string(&self.name, buf);
4986                }
4987                if let Some(v) = self.include_browse {
4988                    ::buffa::encoding::Tag::new(
4989                            2u32,
4990                            ::buffa::encoding::WireType::Varint,
4991                        )
4992                        .encode(buf);
4993                    ::buffa::types::encode_bool(v, buf);
4994                }
4995                self.__buffa_unknown_fields.write_to(buf);
4996            }
4997        }
4998        /// Serializes this view as protobuf JSON.
4999        ///
5000        /// Implicit-presence fields with default values are omitted, `required`
5001        /// fields are always emitted, explicit-presence (`optional`) fields are
5002        /// emitted only when set, bytes fields are base64-encoded, and enum
5003        /// values are their proto name strings.
5004        ///
5005        /// This impl uses `serialize_map(None)` because the number of emitted
5006        /// fields depends on default-omission rules; serializers that require
5007        /// known map lengths (e.g. `bincode`) will return a runtime error.
5008        /// Use the owned message type for those formats.
5009        impl<'__a> ::serde::Serialize for GetCatalogRequestView<'__a> {
5010            fn serialize<__S: ::serde::Serializer>(
5011                &self,
5012                __s: __S,
5013            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5014                use ::serde::ser::SerializeMap as _;
5015                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5016                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
5017                    __map.serialize_entry("name", self.name)?;
5018                }
5019                if let ::core::option::Option::Some(__v) = self.include_browse {
5020                    __map.serialize_entry("include_browse", &__v)?;
5021                }
5022                __map.end()
5023            }
5024        }
5025        impl<'a> ::buffa::MessageName for GetCatalogRequestView<'a> {
5026            const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
5027            const NAME: &'static str = "GetCatalogRequest";
5028            const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.GetCatalogRequest";
5029            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.GetCatalogRequest";
5030        }
5031        impl<'v> ::buffa::DefaultViewInstance for GetCatalogRequestView<'v> {
5032            fn default_view_instance<'a>() -> &'a Self
5033            where
5034                Self: 'a,
5035            {
5036                static VALUE: ::buffa::__private::OnceBox<
5037                    GetCatalogRequestView<'static>,
5038                > = ::buffa::__private::OnceBox::new();
5039                VALUE
5040                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5041                        <GetCatalogRequestView<'static>>::default(),
5042                    ))
5043            }
5044        }
5045        impl ::buffa::ViewReborrow for GetCatalogRequestView<'static> {
5046            type Reborrowed<'b> = GetCatalogRequestView<'b>;
5047            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5048                this
5049            }
5050        }
5051        /** Self-contained, `'static` owned view of a `GetCatalogRequest` message.
5052
5053 Wraps [`::buffa::OwnedView`]`<`[`GetCatalogRequestView`]`<'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.
5054
5055 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetCatalogRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5056        #[derive(Clone, Debug)]
5057        pub struct GetCatalogRequestOwnedView(
5058            ::buffa::OwnedView<GetCatalogRequestView<'static>>,
5059        );
5060        impl GetCatalogRequestOwnedView {
5061            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5062            ///
5063            /// The view borrows directly from the buffer's data; the buffer is
5064            /// retained inside the returned handle.
5065            ///
5066            /// # Errors
5067            ///
5068            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5069            /// protobuf data.
5070            pub fn decode(
5071                bytes: ::buffa::bytes::Bytes,
5072            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5073                ::core::result::Result::Ok(
5074                    GetCatalogRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
5075                )
5076            }
5077            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5078            /// max message size).
5079            ///
5080            /// # Errors
5081            ///
5082            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5083            /// exceeds the configured limits.
5084            pub fn decode_with_options(
5085                bytes: ::buffa::bytes::Bytes,
5086                opts: &::buffa::DecodeOptions,
5087            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5088                ::core::result::Result::Ok(
5089                    GetCatalogRequestOwnedView(
5090                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5091                    ),
5092                )
5093            }
5094            /// Build from an owned message via an encode → decode round-trip.
5095            ///
5096            /// # Errors
5097            ///
5098            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5099            /// somehow invalid (should not happen for well-formed messages).
5100            pub fn from_owned(
5101                msg: &super::super::GetCatalogRequest,
5102            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5103                ::core::result::Result::Ok(
5104                    GetCatalogRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
5105                )
5106            }
5107            /// Borrow the full [`GetCatalogRequestView`] with its lifetime tied to `&self`.
5108            #[must_use]
5109            pub fn view(&self) -> &GetCatalogRequestView<'_> {
5110                self.0.reborrow()
5111            }
5112            /// Convert to the owned message type.
5113            #[must_use]
5114            pub fn to_owned_message(&self) -> super::super::GetCatalogRequest {
5115                self.0.to_owned_message()
5116            }
5117            /// The underlying bytes buffer.
5118            #[must_use]
5119            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5120                self.0.bytes()
5121            }
5122            /// Consume the handle, returning the underlying bytes buffer.
5123            #[must_use]
5124            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5125                self.0.into_bytes()
5126            }
5127            /// Name of catalog.
5128            ///
5129            /// Field 1: `name`
5130            #[must_use]
5131            pub fn name(&self) -> &'_ str {
5132                self.0.reborrow().name
5133            }
5134            /// Whether to include catalogs in the response for which the principal can only access selective metadata for
5135            ///
5136            /// Field 2: `include_browse`
5137            #[must_use]
5138            pub fn include_browse(&self) -> ::core::option::Option<bool> {
5139                self.0.reborrow().include_browse
5140            }
5141        }
5142        impl ::core::convert::From<::buffa::OwnedView<GetCatalogRequestView<'static>>>
5143        for GetCatalogRequestOwnedView {
5144            fn from(inner: ::buffa::OwnedView<GetCatalogRequestView<'static>>) -> Self {
5145                GetCatalogRequestOwnedView(inner)
5146            }
5147        }
5148        impl ::core::convert::From<GetCatalogRequestOwnedView>
5149        for ::buffa::OwnedView<GetCatalogRequestView<'static>> {
5150            fn from(wrapper: GetCatalogRequestOwnedView) -> Self {
5151                wrapper.0
5152            }
5153        }
5154        impl ::core::convert::AsRef<::buffa::OwnedView<GetCatalogRequestView<'static>>>
5155        for GetCatalogRequestOwnedView {
5156            fn as_ref(&self) -> &::buffa::OwnedView<GetCatalogRequestView<'static>> {
5157                &self.0
5158            }
5159        }
5160        impl ::buffa::HasMessageView for super::super::GetCatalogRequest {
5161            type View<'a> = GetCatalogRequestView<'a>;
5162            type ViewHandle = GetCatalogRequestOwnedView;
5163        }
5164        impl ::serde::Serialize for GetCatalogRequestOwnedView {
5165            fn serialize<__S: ::serde::Serializer>(
5166                &self,
5167                __s: __S,
5168            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5169                ::serde::Serialize::serialize(&self.0, __s)
5170            }
5171        }
5172        /// Update a catalog
5173        #[derive(Clone, Debug, Default)]
5174        pub struct UpdateCatalogRequestView<'a> {
5175            /// Name of catalog.
5176            ///
5177            /// Field 1: `name`
5178            pub name: &'a str,
5179            /// Username of new owner of catalog.
5180            ///
5181            /// Field 2: `owner`
5182            pub owner: ::core::option::Option<&'a str>,
5183            /// User-provided free-form text description.
5184            ///
5185            /// Field 3: `comment`
5186            pub comment: ::core::option::Option<&'a str>,
5187            /// A map of key-value properties attached to the securable.
5188            ///
5189            /// When provided in update request, the specified properties will override the existing properties.
5190            /// To add and remove properties, one would need to perform a read-modify-write.
5191            ///
5192            /// Field 4: `properties` (map)
5193            pub properties: ::buffa::MapView<'a, &'a str, &'a str>,
5194            /// Name of catalog.
5195            ///
5196            /// Field 5: `new_name`
5197            pub new_name: ::core::option::Option<&'a str>,
5198            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5199        }
5200        impl<'a> UpdateCatalogRequestView<'a> {
5201            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5202            ///
5203            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5204            /// and by generated sub-message decode arms with `depth - 1`.
5205            ///
5206            /// **Not part of the public API.** Named with a leading underscore to
5207            /// signal that it is for generated-code use only.
5208            #[doc(hidden)]
5209            pub fn _decode_depth(
5210                buf: &'a [u8],
5211                depth: u32,
5212            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5213                let mut view = Self::default();
5214                view._merge_into_view(buf, depth)?;
5215                ::core::result::Result::Ok(view)
5216            }
5217            /// Merge fields from `buf` into this view (proto merge semantics).
5218            ///
5219            /// Repeated fields append; singular fields last-wins; singular
5220            /// MESSAGE fields merge recursively. Used by sub-message decode
5221            /// arms when the same field appears multiple times on the wire.
5222            ///
5223            /// **Not part of the public API.**
5224            #[doc(hidden)]
5225            pub fn _merge_into_view(
5226                &mut self,
5227                buf: &'a [u8],
5228                depth: u32,
5229            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5230                let _ = depth;
5231                #[allow(unused_variables)]
5232                let view = self;
5233                let mut cur: &'a [u8] = buf;
5234                while !cur.is_empty() {
5235                    let before_tag = cur;
5236                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5237                    match tag.field_number() {
5238                        1u32 => {
5239                            if tag.wire_type()
5240                                != ::buffa::encoding::WireType::LengthDelimited
5241                            {
5242                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5243                                    field_number: 1u32,
5244                                    expected: 2u8,
5245                                    actual: tag.wire_type() as u8,
5246                                });
5247                            }
5248                            view.name = ::buffa::types::borrow_str(&mut cur)?;
5249                        }
5250                        2u32 => {
5251                            if tag.wire_type()
5252                                != ::buffa::encoding::WireType::LengthDelimited
5253                            {
5254                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5255                                    field_number: 2u32,
5256                                    expected: 2u8,
5257                                    actual: tag.wire_type() as u8,
5258                                });
5259                            }
5260                            view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
5261                        }
5262                        3u32 => {
5263                            if tag.wire_type()
5264                                != ::buffa::encoding::WireType::LengthDelimited
5265                            {
5266                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5267                                    field_number: 3u32,
5268                                    expected: 2u8,
5269                                    actual: tag.wire_type() as u8,
5270                                });
5271                            }
5272                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
5273                        }
5274                        5u32 => {
5275                            if tag.wire_type()
5276                                != ::buffa::encoding::WireType::LengthDelimited
5277                            {
5278                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5279                                    field_number: 5u32,
5280                                    expected: 2u8,
5281                                    actual: tag.wire_type() as u8,
5282                                });
5283                            }
5284                            view.new_name = Some(::buffa::types::borrow_str(&mut cur)?);
5285                        }
5286                        4u32 => {
5287                            if tag.wire_type()
5288                                != ::buffa::encoding::WireType::LengthDelimited
5289                            {
5290                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5291                                    field_number: 4u32,
5292                                    expected: 2u8,
5293                                    actual: tag.wire_type() as u8,
5294                                });
5295                            }
5296                            let entry_bytes = ::buffa::types::borrow_bytes(&mut cur)?;
5297                            let mut entry_cur: &'a [u8] = entry_bytes;
5298                            let mut key = "";
5299                            let mut val = "";
5300                            while !entry_cur.is_empty() {
5301                                let entry_tag = ::buffa::encoding::Tag::decode(
5302                                    &mut entry_cur,
5303                                )?;
5304                                match entry_tag.field_number() {
5305                                    1 => {
5306                                        if entry_tag.wire_type()
5307                                            != ::buffa::encoding::WireType::LengthDelimited
5308                                        {
5309                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5310                                                field_number: entry_tag.field_number(),
5311                                                expected: 2u8,
5312                                                actual: entry_tag.wire_type() as u8,
5313                                            });
5314                                        }
5315                                        key = ::buffa::types::borrow_str(&mut entry_cur)?;
5316                                    }
5317                                    2 => {
5318                                        if entry_tag.wire_type()
5319                                            != ::buffa::encoding::WireType::LengthDelimited
5320                                        {
5321                                            return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5322                                                field_number: entry_tag.field_number(),
5323                                                expected: 2u8,
5324                                                actual: entry_tag.wire_type() as u8,
5325                                            });
5326                                        }
5327                                        val = ::buffa::types::borrow_str(&mut entry_cur)?;
5328                                    }
5329                                    _ => {
5330                                        ::buffa::encoding::skip_field_depth(
5331                                            entry_tag,
5332                                            &mut entry_cur,
5333                                            depth,
5334                                        )?;
5335                                    }
5336                                }
5337                            }
5338                            view.properties.push(key, val);
5339                        }
5340                        _ => {
5341                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5342                            let span_len = before_tag.len() - cur.len();
5343                            view.__buffa_unknown_fields
5344                                .push_raw(&before_tag[..span_len]);
5345                        }
5346                    }
5347                }
5348                ::core::result::Result::Ok(())
5349            }
5350        }
5351        impl<'a> ::buffa::MessageView<'a> for UpdateCatalogRequestView<'a> {
5352            type Owned = super::super::UpdateCatalogRequest;
5353            fn decode_view(
5354                buf: &'a [u8],
5355            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5356                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5357            }
5358            fn decode_view_with_limit(
5359                buf: &'a [u8],
5360                depth: u32,
5361            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5362                Self::_decode_depth(buf, depth)
5363            }
5364            fn to_owned_message(&self) -> super::super::UpdateCatalogRequest {
5365                self.to_owned_from_source(None)
5366            }
5367            #[allow(clippy::useless_conversion, clippy::needless_update)]
5368            fn to_owned_from_source(
5369                &self,
5370                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5371            ) -> super::super::UpdateCatalogRequest {
5372                #[allow(unused_imports)]
5373                use ::buffa::alloc::string::ToString as _;
5374                let _ = __buffa_src;
5375                super::super::UpdateCatalogRequest {
5376                    name: self.name.to_string(),
5377                    owner: self.owner.map(|s| s.to_string()),
5378                    comment: self.comment.map(|s| s.to_string()),
5379                    properties: self
5380                        .properties
5381                        .iter()
5382                        .map(|(k, v)| (k.to_string(), v.to_string()))
5383                        .collect(),
5384                    new_name: self.new_name.map(|s| s.to_string()),
5385                    __buffa_unknown_fields: self
5386                        .__buffa_unknown_fields
5387                        .to_owned()
5388                        .unwrap_or_default()
5389                        .into(),
5390                    ..::core::default::Default::default()
5391                }
5392            }
5393        }
5394        impl<'a> ::buffa::ViewEncode<'a> for UpdateCatalogRequestView<'a> {
5395            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5396            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5397                #[allow(unused_imports)]
5398                use ::buffa::Enumeration as _;
5399                let mut size = 0u32;
5400                if !self.name.is_empty() {
5401                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
5402                }
5403                if let Some(ref v) = self.owner {
5404                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5405                }
5406                if let Some(ref v) = self.comment {
5407                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5408                }
5409                #[allow(clippy::for_kv_map)]
5410                for (k, v) in &self.properties {
5411                    let entry_size: u32 = 1u32
5412                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
5413                        + ::buffa::types::string_encoded_len(v) as u32;
5414                    size
5415                        += 1u32 + ::buffa::encoding::varint_len(entry_size as u64) as u32
5416                            + entry_size;
5417                }
5418                if let Some(ref v) = self.new_name {
5419                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5420                }
5421                size += self.__buffa_unknown_fields.encoded_len() as u32;
5422                size
5423            }
5424            #[allow(clippy::needless_borrow)]
5425            fn write_to(
5426                &self,
5427                _cache: &mut ::buffa::SizeCache,
5428                buf: &mut impl ::buffa::bytes::BufMut,
5429            ) {
5430                #[allow(unused_imports)]
5431                use ::buffa::Enumeration as _;
5432                if !self.name.is_empty() {
5433                    ::buffa::encoding::Tag::new(
5434                            1u32,
5435                            ::buffa::encoding::WireType::LengthDelimited,
5436                        )
5437                        .encode(buf);
5438                    ::buffa::types::encode_string(&self.name, buf);
5439                }
5440                if let Some(ref v) = self.owner {
5441                    ::buffa::encoding::Tag::new(
5442                            2u32,
5443                            ::buffa::encoding::WireType::LengthDelimited,
5444                        )
5445                        .encode(buf);
5446                    ::buffa::types::encode_string(v, buf);
5447                }
5448                if let Some(ref v) = self.comment {
5449                    ::buffa::encoding::Tag::new(
5450                            3u32,
5451                            ::buffa::encoding::WireType::LengthDelimited,
5452                        )
5453                        .encode(buf);
5454                    ::buffa::types::encode_string(v, buf);
5455                }
5456                for (k, v) in &self.properties {
5457                    let entry_size: u32 = 1u32
5458                        + ::buffa::types::string_encoded_len(k) as u32 + 1u32
5459                        + ::buffa::types::string_encoded_len(v) as u32;
5460                    ::buffa::encoding::Tag::new(
5461                            4u32,
5462                            ::buffa::encoding::WireType::LengthDelimited,
5463                        )
5464                        .encode(buf);
5465                    ::buffa::encoding::encode_varint(entry_size as u64, buf);
5466                    ::buffa::encoding::Tag::new(
5467                            1u32,
5468                            ::buffa::encoding::WireType::LengthDelimited,
5469                        )
5470                        .encode(buf);
5471                    ::buffa::types::encode_string(k, buf);
5472                    ::buffa::encoding::Tag::new(
5473                            2u32,
5474                            ::buffa::encoding::WireType::LengthDelimited,
5475                        )
5476                        .encode(buf);
5477                    ::buffa::types::encode_string(v, buf);
5478                }
5479                if let Some(ref v) = self.new_name {
5480                    ::buffa::encoding::Tag::new(
5481                            5u32,
5482                            ::buffa::encoding::WireType::LengthDelimited,
5483                        )
5484                        .encode(buf);
5485                    ::buffa::types::encode_string(v, buf);
5486                }
5487                self.__buffa_unknown_fields.write_to(buf);
5488            }
5489        }
5490        /// Serializes this view as protobuf JSON.
5491        ///
5492        /// Implicit-presence fields with default values are omitted, `required`
5493        /// fields are always emitted, explicit-presence (`optional`) fields are
5494        /// emitted only when set, bytes fields are base64-encoded, and enum
5495        /// values are their proto name strings.
5496        ///
5497        /// This impl uses `serialize_map(None)` because the number of emitted
5498        /// fields depends on default-omission rules; serializers that require
5499        /// known map lengths (e.g. `bincode`) will return a runtime error.
5500        /// Use the owned message type for those formats.
5501        impl<'__a> ::serde::Serialize for UpdateCatalogRequestView<'__a> {
5502            fn serialize<__S: ::serde::Serializer>(
5503                &self,
5504                __s: __S,
5505            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5506                use ::serde::ser::SerializeMap as _;
5507                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5508                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
5509                    __map.serialize_entry("name", self.name)?;
5510                }
5511                if let ::core::option::Option::Some(__v) = self.owner {
5512                    __map.serialize_entry("owner", __v)?;
5513                }
5514                if let ::core::option::Option::Some(__v) = self.comment {
5515                    __map.serialize_entry("comment", __v)?;
5516                }
5517                if !self.properties.is_empty() {
5518                    struct _WM<'__a, '__x>(
5519                        &'__x ::buffa::MapView<'__x, &'__a str, &'__a str>,
5520                    );
5521                    impl<'__a> ::serde::Serialize for _WM<'__a, '_> {
5522                        fn serialize<__S: ::serde::Serializer>(
5523                            &self,
5524                            __s: __S,
5525                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
5526                            use ::serde::ser::SerializeMap as _;
5527                            let mut __m = __s
5528                                .serialize_map(::core::option::Option::Some(self.0.len()))?;
5529                            for (k, v) in self.0.iter_unique() {
5530                                __m.serialize_entry(k, v)?;
5531                            }
5532                            __m.end()
5533                        }
5534                    }
5535                    __map.serialize_entry("properties", &_WM(&self.properties))?;
5536                }
5537                if let ::core::option::Option::Some(__v) = self.new_name {
5538                    __map.serialize_entry("new_name", __v)?;
5539                }
5540                __map.end()
5541            }
5542        }
5543        impl<'a> ::buffa::MessageName for UpdateCatalogRequestView<'a> {
5544            const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
5545            const NAME: &'static str = "UpdateCatalogRequest";
5546            const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.UpdateCatalogRequest";
5547            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.UpdateCatalogRequest";
5548        }
5549        impl<'v> ::buffa::DefaultViewInstance for UpdateCatalogRequestView<'v> {
5550            fn default_view_instance<'a>() -> &'a Self
5551            where
5552                Self: 'a,
5553            {
5554                static VALUE: ::buffa::__private::OnceBox<
5555                    UpdateCatalogRequestView<'static>,
5556                > = ::buffa::__private::OnceBox::new();
5557                VALUE
5558                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5559                        <UpdateCatalogRequestView<'static>>::default(),
5560                    ))
5561            }
5562        }
5563        impl ::buffa::ViewReborrow for UpdateCatalogRequestView<'static> {
5564            type Reborrowed<'b> = UpdateCatalogRequestView<'b>;
5565            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5566                this
5567            }
5568        }
5569        /** Self-contained, `'static` owned view of a `UpdateCatalogRequest` message.
5570
5571 Wraps [`::buffa::OwnedView`]`<`[`UpdateCatalogRequestView`]`<'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.
5572
5573 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdateCatalogRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5574        #[derive(Clone, Debug)]
5575        pub struct UpdateCatalogRequestOwnedView(
5576            ::buffa::OwnedView<UpdateCatalogRequestView<'static>>,
5577        );
5578        impl UpdateCatalogRequestOwnedView {
5579            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5580            ///
5581            /// The view borrows directly from the buffer's data; the buffer is
5582            /// retained inside the returned handle.
5583            ///
5584            /// # Errors
5585            ///
5586            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5587            /// protobuf data.
5588            pub fn decode(
5589                bytes: ::buffa::bytes::Bytes,
5590            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5591                ::core::result::Result::Ok(
5592                    UpdateCatalogRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
5593                )
5594            }
5595            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5596            /// max message size).
5597            ///
5598            /// # Errors
5599            ///
5600            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5601            /// exceeds the configured limits.
5602            pub fn decode_with_options(
5603                bytes: ::buffa::bytes::Bytes,
5604                opts: &::buffa::DecodeOptions,
5605            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5606                ::core::result::Result::Ok(
5607                    UpdateCatalogRequestOwnedView(
5608                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5609                    ),
5610                )
5611            }
5612            /// Build from an owned message via an encode → decode round-trip.
5613            ///
5614            /// # Errors
5615            ///
5616            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5617            /// somehow invalid (should not happen for well-formed messages).
5618            pub fn from_owned(
5619                msg: &super::super::UpdateCatalogRequest,
5620            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5621                ::core::result::Result::Ok(
5622                    UpdateCatalogRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
5623                )
5624            }
5625            /// Borrow the full [`UpdateCatalogRequestView`] with its lifetime tied to `&self`.
5626            #[must_use]
5627            pub fn view(&self) -> &UpdateCatalogRequestView<'_> {
5628                self.0.reborrow()
5629            }
5630            /// Convert to the owned message type.
5631            #[must_use]
5632            pub fn to_owned_message(&self) -> super::super::UpdateCatalogRequest {
5633                self.0.to_owned_message()
5634            }
5635            /// The underlying bytes buffer.
5636            #[must_use]
5637            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5638                self.0.bytes()
5639            }
5640            /// Consume the handle, returning the underlying bytes buffer.
5641            #[must_use]
5642            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5643                self.0.into_bytes()
5644            }
5645            /// Name of catalog.
5646            ///
5647            /// Field 1: `name`
5648            #[must_use]
5649            pub fn name(&self) -> &'_ str {
5650                self.0.reborrow().name
5651            }
5652            /// Username of new owner of catalog.
5653            ///
5654            /// Field 2: `owner`
5655            #[must_use]
5656            pub fn owner(&self) -> ::core::option::Option<&'_ str> {
5657                self.0.reborrow().owner
5658            }
5659            /// User-provided free-form text description.
5660            ///
5661            /// Field 3: `comment`
5662            #[must_use]
5663            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
5664                self.0.reborrow().comment
5665            }
5666            /// A map of key-value properties attached to the securable.
5667            ///
5668            /// When provided in update request, the specified properties will override the existing properties.
5669            /// To add and remove properties, one would need to perform a read-modify-write.
5670            ///
5671            /// Field 4: `properties` (map)
5672            #[must_use]
5673            pub fn properties(&self) -> &::buffa::MapView<'_, &'_ str, &'_ str> {
5674                &self.0.reborrow().properties
5675            }
5676            /// Name of catalog.
5677            ///
5678            /// Field 5: `new_name`
5679            #[must_use]
5680            pub fn new_name(&self) -> ::core::option::Option<&'_ str> {
5681                self.0.reborrow().new_name
5682            }
5683        }
5684        impl ::core::convert::From<::buffa::OwnedView<UpdateCatalogRequestView<'static>>>
5685        for UpdateCatalogRequestOwnedView {
5686            fn from(
5687                inner: ::buffa::OwnedView<UpdateCatalogRequestView<'static>>,
5688            ) -> Self {
5689                UpdateCatalogRequestOwnedView(inner)
5690            }
5691        }
5692        impl ::core::convert::From<UpdateCatalogRequestOwnedView>
5693        for ::buffa::OwnedView<UpdateCatalogRequestView<'static>> {
5694            fn from(wrapper: UpdateCatalogRequestOwnedView) -> Self {
5695                wrapper.0
5696            }
5697        }
5698        impl ::core::convert::AsRef<
5699            ::buffa::OwnedView<UpdateCatalogRequestView<'static>>,
5700        > for UpdateCatalogRequestOwnedView {
5701            fn as_ref(&self) -> &::buffa::OwnedView<UpdateCatalogRequestView<'static>> {
5702                &self.0
5703            }
5704        }
5705        impl ::buffa::HasMessageView for super::super::UpdateCatalogRequest {
5706            type View<'a> = UpdateCatalogRequestView<'a>;
5707            type ViewHandle = UpdateCatalogRequestOwnedView;
5708        }
5709        impl ::serde::Serialize for UpdateCatalogRequestOwnedView {
5710            fn serialize<__S: ::serde::Serializer>(
5711                &self,
5712                __s: __S,
5713            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5714                ::serde::Serialize::serialize(&self.0, __s)
5715            }
5716        }
5717        /// Delete a catalog
5718        #[derive(Clone, Debug, Default)]
5719        pub struct DeleteCatalogRequestView<'a> {
5720            /// Name of catalog.
5721            ///
5722            /// Field 1: `name`
5723            pub name: &'a str,
5724            /// Force deletion even if the catalog is not empty.
5725            ///
5726            /// Field 2: `force`
5727            pub force: ::core::option::Option<bool>,
5728            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5729        }
5730        impl<'a> DeleteCatalogRequestView<'a> {
5731            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5732            ///
5733            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5734            /// and by generated sub-message decode arms with `depth - 1`.
5735            ///
5736            /// **Not part of the public API.** Named with a leading underscore to
5737            /// signal that it is for generated-code use only.
5738            #[doc(hidden)]
5739            pub fn _decode_depth(
5740                buf: &'a [u8],
5741                depth: u32,
5742            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5743                let mut view = Self::default();
5744                view._merge_into_view(buf, depth)?;
5745                ::core::result::Result::Ok(view)
5746            }
5747            /// Merge fields from `buf` into this view (proto merge semantics).
5748            ///
5749            /// Repeated fields append; singular fields last-wins; singular
5750            /// MESSAGE fields merge recursively. Used by sub-message decode
5751            /// arms when the same field appears multiple times on the wire.
5752            ///
5753            /// **Not part of the public API.**
5754            #[doc(hidden)]
5755            pub fn _merge_into_view(
5756                &mut self,
5757                buf: &'a [u8],
5758                depth: u32,
5759            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5760                let _ = depth;
5761                #[allow(unused_variables)]
5762                let view = self;
5763                let mut cur: &'a [u8] = buf;
5764                while !cur.is_empty() {
5765                    let before_tag = cur;
5766                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5767                    match tag.field_number() {
5768                        1u32 => {
5769                            if tag.wire_type()
5770                                != ::buffa::encoding::WireType::LengthDelimited
5771                            {
5772                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5773                                    field_number: 1u32,
5774                                    expected: 2u8,
5775                                    actual: tag.wire_type() as u8,
5776                                });
5777                            }
5778                            view.name = ::buffa::types::borrow_str(&mut cur)?;
5779                        }
5780                        2u32 => {
5781                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5782                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5783                                    field_number: 2u32,
5784                                    expected: 0u8,
5785                                    actual: tag.wire_type() as u8,
5786                                });
5787                            }
5788                            view.force = Some(::buffa::types::decode_bool(&mut cur)?);
5789                        }
5790                        _ => {
5791                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5792                            let span_len = before_tag.len() - cur.len();
5793                            view.__buffa_unknown_fields
5794                                .push_raw(&before_tag[..span_len]);
5795                        }
5796                    }
5797                }
5798                ::core::result::Result::Ok(())
5799            }
5800        }
5801        impl<'a> ::buffa::MessageView<'a> for DeleteCatalogRequestView<'a> {
5802            type Owned = super::super::DeleteCatalogRequest;
5803            fn decode_view(
5804                buf: &'a [u8],
5805            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5806                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5807            }
5808            fn decode_view_with_limit(
5809                buf: &'a [u8],
5810                depth: u32,
5811            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5812                Self::_decode_depth(buf, depth)
5813            }
5814            fn to_owned_message(&self) -> super::super::DeleteCatalogRequest {
5815                self.to_owned_from_source(None)
5816            }
5817            #[allow(clippy::useless_conversion, clippy::needless_update)]
5818            fn to_owned_from_source(
5819                &self,
5820                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5821            ) -> super::super::DeleteCatalogRequest {
5822                #[allow(unused_imports)]
5823                use ::buffa::alloc::string::ToString as _;
5824                let _ = __buffa_src;
5825                super::super::DeleteCatalogRequest {
5826                    name: self.name.to_string(),
5827                    force: self.force,
5828                    __buffa_unknown_fields: self
5829                        .__buffa_unknown_fields
5830                        .to_owned()
5831                        .unwrap_or_default()
5832                        .into(),
5833                    ..::core::default::Default::default()
5834                }
5835            }
5836        }
5837        impl<'a> ::buffa::ViewEncode<'a> for DeleteCatalogRequestView<'a> {
5838            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5839            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5840                #[allow(unused_imports)]
5841                use ::buffa::Enumeration as _;
5842                let mut size = 0u32;
5843                if !self.name.is_empty() {
5844                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
5845                }
5846                if self.force.is_some() {
5847                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5848                }
5849                size += self.__buffa_unknown_fields.encoded_len() as u32;
5850                size
5851            }
5852            #[allow(clippy::needless_borrow)]
5853            fn write_to(
5854                &self,
5855                _cache: &mut ::buffa::SizeCache,
5856                buf: &mut impl ::buffa::bytes::BufMut,
5857            ) {
5858                #[allow(unused_imports)]
5859                use ::buffa::Enumeration as _;
5860                if !self.name.is_empty() {
5861                    ::buffa::encoding::Tag::new(
5862                            1u32,
5863                            ::buffa::encoding::WireType::LengthDelimited,
5864                        )
5865                        .encode(buf);
5866                    ::buffa::types::encode_string(&self.name, buf);
5867                }
5868                if let Some(v) = self.force {
5869                    ::buffa::encoding::Tag::new(
5870                            2u32,
5871                            ::buffa::encoding::WireType::Varint,
5872                        )
5873                        .encode(buf);
5874                    ::buffa::types::encode_bool(v, buf);
5875                }
5876                self.__buffa_unknown_fields.write_to(buf);
5877            }
5878        }
5879        /// Serializes this view as protobuf JSON.
5880        ///
5881        /// Implicit-presence fields with default values are omitted, `required`
5882        /// fields are always emitted, explicit-presence (`optional`) fields are
5883        /// emitted only when set, bytes fields are base64-encoded, and enum
5884        /// values are their proto name strings.
5885        ///
5886        /// This impl uses `serialize_map(None)` because the number of emitted
5887        /// fields depends on default-omission rules; serializers that require
5888        /// known map lengths (e.g. `bincode`) will return a runtime error.
5889        /// Use the owned message type for those formats.
5890        impl<'__a> ::serde::Serialize for DeleteCatalogRequestView<'__a> {
5891            fn serialize<__S: ::serde::Serializer>(
5892                &self,
5893                __s: __S,
5894            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5895                use ::serde::ser::SerializeMap as _;
5896                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5897                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
5898                    __map.serialize_entry("name", self.name)?;
5899                }
5900                if let ::core::option::Option::Some(__v) = self.force {
5901                    __map.serialize_entry("force", &__v)?;
5902                }
5903                __map.end()
5904            }
5905        }
5906        impl<'a> ::buffa::MessageName for DeleteCatalogRequestView<'a> {
5907            const PACKAGE: &'static str = "unitycatalog.catalogs.v1";
5908            const NAME: &'static str = "DeleteCatalogRequest";
5909            const FULL_NAME: &'static str = "unitycatalog.catalogs.v1.DeleteCatalogRequest";
5910            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.catalogs.v1.DeleteCatalogRequest";
5911        }
5912        impl<'v> ::buffa::DefaultViewInstance for DeleteCatalogRequestView<'v> {
5913            fn default_view_instance<'a>() -> &'a Self
5914            where
5915                Self: 'a,
5916            {
5917                static VALUE: ::buffa::__private::OnceBox<
5918                    DeleteCatalogRequestView<'static>,
5919                > = ::buffa::__private::OnceBox::new();
5920                VALUE
5921                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5922                        <DeleteCatalogRequestView<'static>>::default(),
5923                    ))
5924            }
5925        }
5926        impl ::buffa::ViewReborrow for DeleteCatalogRequestView<'static> {
5927            type Reborrowed<'b> = DeleteCatalogRequestView<'b>;
5928            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5929                this
5930            }
5931        }
5932        /** Self-contained, `'static` owned view of a `DeleteCatalogRequest` message.
5933
5934 Wraps [`::buffa::OwnedView`]`<`[`DeleteCatalogRequestView`]`<'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.
5935
5936 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DeleteCatalogRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5937        #[derive(Clone, Debug)]
5938        pub struct DeleteCatalogRequestOwnedView(
5939            ::buffa::OwnedView<DeleteCatalogRequestView<'static>>,
5940        );
5941        impl DeleteCatalogRequestOwnedView {
5942            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5943            ///
5944            /// The view borrows directly from the buffer's data; the buffer is
5945            /// retained inside the returned handle.
5946            ///
5947            /// # Errors
5948            ///
5949            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5950            /// protobuf data.
5951            pub fn decode(
5952                bytes: ::buffa::bytes::Bytes,
5953            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5954                ::core::result::Result::Ok(
5955                    DeleteCatalogRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
5956                )
5957            }
5958            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5959            /// max message size).
5960            ///
5961            /// # Errors
5962            ///
5963            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5964            /// exceeds the configured limits.
5965            pub fn decode_with_options(
5966                bytes: ::buffa::bytes::Bytes,
5967                opts: &::buffa::DecodeOptions,
5968            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5969                ::core::result::Result::Ok(
5970                    DeleteCatalogRequestOwnedView(
5971                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5972                    ),
5973                )
5974            }
5975            /// Build from an owned message via an encode → decode round-trip.
5976            ///
5977            /// # Errors
5978            ///
5979            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5980            /// somehow invalid (should not happen for well-formed messages).
5981            pub fn from_owned(
5982                msg: &super::super::DeleteCatalogRequest,
5983            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5984                ::core::result::Result::Ok(
5985                    DeleteCatalogRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
5986                )
5987            }
5988            /// Borrow the full [`DeleteCatalogRequestView`] with its lifetime tied to `&self`.
5989            #[must_use]
5990            pub fn view(&self) -> &DeleteCatalogRequestView<'_> {
5991                self.0.reborrow()
5992            }
5993            /// Convert to the owned message type.
5994            #[must_use]
5995            pub fn to_owned_message(&self) -> super::super::DeleteCatalogRequest {
5996                self.0.to_owned_message()
5997            }
5998            /// The underlying bytes buffer.
5999            #[must_use]
6000            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6001                self.0.bytes()
6002            }
6003            /// Consume the handle, returning the underlying bytes buffer.
6004            #[must_use]
6005            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6006                self.0.into_bytes()
6007            }
6008            /// Name of catalog.
6009            ///
6010            /// Field 1: `name`
6011            #[must_use]
6012            pub fn name(&self) -> &'_ str {
6013                self.0.reborrow().name
6014            }
6015            /// Force deletion even if the catalog is not empty.
6016            ///
6017            /// Field 2: `force`
6018            #[must_use]
6019            pub fn force(&self) -> ::core::option::Option<bool> {
6020                self.0.reborrow().force
6021            }
6022        }
6023        impl ::core::convert::From<::buffa::OwnedView<DeleteCatalogRequestView<'static>>>
6024        for DeleteCatalogRequestOwnedView {
6025            fn from(
6026                inner: ::buffa::OwnedView<DeleteCatalogRequestView<'static>>,
6027            ) -> Self {
6028                DeleteCatalogRequestOwnedView(inner)
6029            }
6030        }
6031        impl ::core::convert::From<DeleteCatalogRequestOwnedView>
6032        for ::buffa::OwnedView<DeleteCatalogRequestView<'static>> {
6033            fn from(wrapper: DeleteCatalogRequestOwnedView) -> Self {
6034                wrapper.0
6035            }
6036        }
6037        impl ::core::convert::AsRef<
6038            ::buffa::OwnedView<DeleteCatalogRequestView<'static>>,
6039        > for DeleteCatalogRequestOwnedView {
6040            fn as_ref(&self) -> &::buffa::OwnedView<DeleteCatalogRequestView<'static>> {
6041                &self.0
6042            }
6043        }
6044        impl ::buffa::HasMessageView for super::super::DeleteCatalogRequest {
6045            type View<'a> = DeleteCatalogRequestView<'a>;
6046            type ViewHandle = DeleteCatalogRequestOwnedView;
6047        }
6048        impl ::serde::Serialize for DeleteCatalogRequestOwnedView {
6049            fn serialize<__S: ::serde::Serializer>(
6050                &self,
6051                __s: __S,
6052            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6053                ::serde::Serialize::serialize(&self.0, __s)
6054            }
6055        }
6056    }
6057    /// Register this package's `Any` type entries and extension entries.
6058    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
6059        reg.register_json_any(super::__CATALOG_JSON_ANY);
6060        reg.register_json_any(super::__LIST_CATALOGS_REQUEST_JSON_ANY);
6061        reg.register_json_any(super::__LIST_CATALOGS_RESPONSE_JSON_ANY);
6062        reg.register_json_any(super::__CREATE_CATALOG_REQUEST_JSON_ANY);
6063        reg.register_json_any(super::__GET_CATALOG_REQUEST_JSON_ANY);
6064        reg.register_json_any(super::__UPDATE_CATALOG_REQUEST_JSON_ANY);
6065        reg.register_json_any(super::__DELETE_CATALOG_REQUEST_JSON_ANY);
6066    }
6067}
6068#[doc(inline)]
6069pub use self::__buffa::view::CatalogView;
6070#[doc(inline)]
6071pub use self::__buffa::view::CatalogOwnedView;
6072#[doc(inline)]
6073pub use self::__buffa::view::ListCatalogsRequestView;
6074#[doc(inline)]
6075pub use self::__buffa::view::ListCatalogsRequestOwnedView;
6076#[doc(inline)]
6077pub use self::__buffa::view::ListCatalogsResponseView;
6078#[doc(inline)]
6079pub use self::__buffa::view::ListCatalogsResponseOwnedView;
6080#[doc(inline)]
6081pub use self::__buffa::view::CreateCatalogRequestView;
6082#[doc(inline)]
6083pub use self::__buffa::view::CreateCatalogRequestOwnedView;
6084#[doc(inline)]
6085pub use self::__buffa::view::GetCatalogRequestView;
6086#[doc(inline)]
6087pub use self::__buffa::view::GetCatalogRequestOwnedView;
6088#[doc(inline)]
6089pub use self::__buffa::view::UpdateCatalogRequestView;
6090#[doc(inline)]
6091pub use self::__buffa::view::UpdateCatalogRequestOwnedView;
6092#[doc(inline)]
6093pub use self::__buffa::view::DeleteCatalogRequestView;
6094#[doc(inline)]
6095pub use self::__buffa::view::DeleteCatalogRequestOwnedView;
6096#[doc(inline)]
6097pub use self::__buffa::register_types;