Skip to main content

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

1// @generated by buffa-codegen. DO NOT EDIT.
2
3#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
4#[repr(i32)]
5pub enum DataObjectType {
6    /// Unknown data object type.
7    DATA_OBJECT_TYPE_UNSPECIFIED = 0i32,
8    TABLE = 1i32,
9    SCHEMA = 2i32,
10    /// VIEW = 3;
11    ///
12    /// MATERIALIZED_VIEW = 4;
13    ///
14    /// STREAMING_TABLE = 5;
15    ///
16    /// MODEL = 6;
17    ///
18    /// NOTEBOOK_FILE = 7;
19    ///
20    /// FUNCTION = 8;
21    ///
22    /// FEATURE_SPEC = 9;
23    ///
24    /// A Unity Catalog volume shared as a storage-backed asset (Open Sharing).
25    VOLUME = 10i32,
26    /// An agent skill (a directory of SKILL.md + scripts/assets) shared as a
27    /// storage-backed asset on top of a volume (Open Sharing).
28    AGENT_SKILL = 11i32,
29}
30impl DataObjectType {
31    ///Idiomatic alias for [`Self::DATA_OBJECT_TYPE_UNSPECIFIED`]; `Debug` prints the variant name.
32    #[allow(non_upper_case_globals)]
33    pub const DataObjectTypeUnspecified: Self = Self::DATA_OBJECT_TYPE_UNSPECIFIED;
34    ///Idiomatic alias for [`Self::TABLE`]; `Debug` prints the variant name.
35    #[allow(non_upper_case_globals)]
36    pub const Table: Self = Self::TABLE;
37    ///Idiomatic alias for [`Self::SCHEMA`]; `Debug` prints the variant name.
38    #[allow(non_upper_case_globals)]
39    pub const Schema: Self = Self::SCHEMA;
40    ///Idiomatic alias for [`Self::VOLUME`]; `Debug` prints the variant name.
41    #[allow(non_upper_case_globals)]
42    pub const Volume: Self = Self::VOLUME;
43    ///Idiomatic alias for [`Self::AGENT_SKILL`]; `Debug` prints the variant name.
44    #[allow(non_upper_case_globals)]
45    pub const AgentSkill: Self = Self::AGENT_SKILL;
46}
47impl ::core::default::Default for DataObjectType {
48    fn default() -> Self {
49        Self::DATA_OBJECT_TYPE_UNSPECIFIED
50    }
51}
52impl ::serde::Serialize for DataObjectType {
53    fn serialize<S: ::serde::Serializer>(
54        &self,
55        s: S,
56    ) -> ::core::result::Result<S::Ok, S::Error> {
57        s.serialize_str(::buffa::Enumeration::proto_name(self))
58    }
59}
60impl<'de> ::serde::Deserialize<'de> for DataObjectType {
61    fn deserialize<D: ::serde::Deserializer<'de>>(
62        d: D,
63    ) -> ::core::result::Result<Self, D::Error> {
64        struct _V;
65        impl ::serde::de::Visitor<'_> for _V {
66            type Value = DataObjectType;
67            fn expecting(
68                &self,
69                f: &mut ::core::fmt::Formatter<'_>,
70            ) -> ::core::fmt::Result {
71                f.write_str(
72                    concat!(
73                        "a string, integer, or null for ", stringify!(DataObjectType)
74                    ),
75                )
76            }
77            fn visit_str<E: ::serde::de::Error>(
78                self,
79                v: &str,
80            ) -> ::core::result::Result<DataObjectType, E> {
81                <DataObjectType as ::buffa::Enumeration>::from_proto_name(v)
82                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
83            }
84            fn visit_i64<E: ::serde::de::Error>(
85                self,
86                v: i64,
87            ) -> ::core::result::Result<DataObjectType, E> {
88                let v32 = i32::try_from(v)
89                    .map_err(|_| {
90                        ::serde::de::Error::custom(
91                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
92                        )
93                    })?;
94                <DataObjectType as ::buffa::Enumeration>::from_i32(v32)
95                    .ok_or_else(|| {
96                        ::serde::de::Error::custom(
97                            ::buffa::alloc::format!("unknown enum value {v32}"),
98                        )
99                    })
100            }
101            fn visit_u64<E: ::serde::de::Error>(
102                self,
103                v: u64,
104            ) -> ::core::result::Result<DataObjectType, E> {
105                let v32 = i32::try_from(v)
106                    .map_err(|_| {
107                        ::serde::de::Error::custom(
108                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
109                        )
110                    })?;
111                <DataObjectType as ::buffa::Enumeration>::from_i32(v32)
112                    .ok_or_else(|| {
113                        ::serde::de::Error::custom(
114                            ::buffa::alloc::format!("unknown enum value {v32}"),
115                        )
116                    })
117            }
118            fn visit_unit<E: ::serde::de::Error>(
119                self,
120            ) -> ::core::result::Result<DataObjectType, E> {
121                ::core::result::Result::Ok(::core::default::Default::default())
122            }
123        }
124        d.deserialize_any(_V)
125    }
126}
127impl ::buffa::json_helpers::ProtoElemJson for DataObjectType {
128    fn serialize_proto_json<S: ::serde::Serializer>(
129        v: &Self,
130        s: S,
131    ) -> ::core::result::Result<S::Ok, S::Error> {
132        ::serde::Serialize::serialize(v, s)
133    }
134    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
135        d: D,
136    ) -> ::core::result::Result<Self, D::Error> {
137        <Self as ::serde::Deserialize>::deserialize(d)
138    }
139}
140impl ::buffa::Enumeration for DataObjectType {
141    fn from_i32(value: i32) -> ::core::option::Option<Self> {
142        match value {
143            0i32 => ::core::option::Option::Some(Self::DATA_OBJECT_TYPE_UNSPECIFIED),
144            1i32 => ::core::option::Option::Some(Self::TABLE),
145            2i32 => ::core::option::Option::Some(Self::SCHEMA),
146            10i32 => ::core::option::Option::Some(Self::VOLUME),
147            11i32 => ::core::option::Option::Some(Self::AGENT_SKILL),
148            _ => ::core::option::Option::None,
149        }
150    }
151    fn to_i32(&self) -> i32 {
152        *self as i32
153    }
154    fn proto_name(&self) -> &'static str {
155        match self {
156            Self::DATA_OBJECT_TYPE_UNSPECIFIED => "DATA_OBJECT_TYPE_UNSPECIFIED",
157            Self::TABLE => "TABLE",
158            Self::SCHEMA => "SCHEMA",
159            Self::VOLUME => "VOLUME",
160            Self::AGENT_SKILL => "AGENT_SKILL",
161        }
162    }
163    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
164        match name {
165            "DATA_OBJECT_TYPE_UNSPECIFIED" => {
166                ::core::option::Option::Some(Self::DATA_OBJECT_TYPE_UNSPECIFIED)
167            }
168            "TABLE" => ::core::option::Option::Some(Self::TABLE),
169            "SCHEMA" => ::core::option::Option::Some(Self::SCHEMA),
170            "VOLUME" => ::core::option::Option::Some(Self::VOLUME),
171            "AGENT_SKILL" => ::core::option::Option::Some(Self::AGENT_SKILL),
172            _ => ::core::option::Option::None,
173        }
174    }
175    fn values() -> &'static [Self] {
176        &[
177            Self::DATA_OBJECT_TYPE_UNSPECIFIED,
178            Self::TABLE,
179            Self::SCHEMA,
180            Self::VOLUME,
181            Self::AGENT_SKILL,
182        ]
183    }
184}
185#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
186#[repr(i32)]
187pub enum HistoryStatus {
188    /// Data history sharing is disabled.
189    DISABLED = 0i32,
190    /// Data history sharing is enabled.
191    ENABLED = 1i32,
192}
193impl HistoryStatus {
194    ///Idiomatic alias for [`Self::DISABLED`]; `Debug` prints the variant name.
195    #[allow(non_upper_case_globals)]
196    pub const Disabled: Self = Self::DISABLED;
197    ///Idiomatic alias for [`Self::ENABLED`]; `Debug` prints the variant name.
198    #[allow(non_upper_case_globals)]
199    pub const Enabled: Self = Self::ENABLED;
200}
201impl ::core::default::Default for HistoryStatus {
202    fn default() -> Self {
203        Self::DISABLED
204    }
205}
206impl ::serde::Serialize for HistoryStatus {
207    fn serialize<S: ::serde::Serializer>(
208        &self,
209        s: S,
210    ) -> ::core::result::Result<S::Ok, S::Error> {
211        s.serialize_str(::buffa::Enumeration::proto_name(self))
212    }
213}
214impl<'de> ::serde::Deserialize<'de> for HistoryStatus {
215    fn deserialize<D: ::serde::Deserializer<'de>>(
216        d: D,
217    ) -> ::core::result::Result<Self, D::Error> {
218        struct _V;
219        impl ::serde::de::Visitor<'_> for _V {
220            type Value = HistoryStatus;
221            fn expecting(
222                &self,
223                f: &mut ::core::fmt::Formatter<'_>,
224            ) -> ::core::fmt::Result {
225                f.write_str(
226                    concat!("a string, integer, or null for ", stringify!(HistoryStatus)),
227                )
228            }
229            fn visit_str<E: ::serde::de::Error>(
230                self,
231                v: &str,
232            ) -> ::core::result::Result<HistoryStatus, E> {
233                <HistoryStatus as ::buffa::Enumeration>::from_proto_name(v)
234                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
235            }
236            fn visit_i64<E: ::serde::de::Error>(
237                self,
238                v: i64,
239            ) -> ::core::result::Result<HistoryStatus, E> {
240                let v32 = i32::try_from(v)
241                    .map_err(|_| {
242                        ::serde::de::Error::custom(
243                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
244                        )
245                    })?;
246                <HistoryStatus as ::buffa::Enumeration>::from_i32(v32)
247                    .ok_or_else(|| {
248                        ::serde::de::Error::custom(
249                            ::buffa::alloc::format!("unknown enum value {v32}"),
250                        )
251                    })
252            }
253            fn visit_u64<E: ::serde::de::Error>(
254                self,
255                v: u64,
256            ) -> ::core::result::Result<HistoryStatus, E> {
257                let v32 = i32::try_from(v)
258                    .map_err(|_| {
259                        ::serde::de::Error::custom(
260                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
261                        )
262                    })?;
263                <HistoryStatus as ::buffa::Enumeration>::from_i32(v32)
264                    .ok_or_else(|| {
265                        ::serde::de::Error::custom(
266                            ::buffa::alloc::format!("unknown enum value {v32}"),
267                        )
268                    })
269            }
270            fn visit_unit<E: ::serde::de::Error>(
271                self,
272            ) -> ::core::result::Result<HistoryStatus, E> {
273                ::core::result::Result::Ok(::core::default::Default::default())
274            }
275        }
276        d.deserialize_any(_V)
277    }
278}
279impl ::buffa::json_helpers::ProtoElemJson for HistoryStatus {
280    fn serialize_proto_json<S: ::serde::Serializer>(
281        v: &Self,
282        s: S,
283    ) -> ::core::result::Result<S::Ok, S::Error> {
284        ::serde::Serialize::serialize(v, s)
285    }
286    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
287        d: D,
288    ) -> ::core::result::Result<Self, D::Error> {
289        <Self as ::serde::Deserialize>::deserialize(d)
290    }
291}
292impl ::buffa::Enumeration for HistoryStatus {
293    fn from_i32(value: i32) -> ::core::option::Option<Self> {
294        match value {
295            0i32 => ::core::option::Option::Some(Self::DISABLED),
296            1i32 => ::core::option::Option::Some(Self::ENABLED),
297            _ => ::core::option::Option::None,
298        }
299    }
300    fn to_i32(&self) -> i32 {
301        *self as i32
302    }
303    fn proto_name(&self) -> &'static str {
304        match self {
305            Self::DISABLED => "DISABLED",
306            Self::ENABLED => "ENABLED",
307        }
308    }
309    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
310        match name {
311            "DISABLED" => ::core::option::Option::Some(Self::DISABLED),
312            "ENABLED" => ::core::option::Option::Some(Self::ENABLED),
313            _ => ::core::option::Option::None,
314        }
315    }
316    fn values() -> &'static [Self] {
317        &[Self::DISABLED, Self::ENABLED]
318    }
319}
320#[derive(Clone, PartialEq, Default)]
321#[derive(::serde::Serialize, ::serde::Deserialize)]
322#[serde(default)]
323pub struct DataObject {
324    /// A fully qualified name that uniquely identifies a data object.
325    ///
326    /// For example, a table's fully qualified name is in the format of \<catalog\>.\<schema\>.\<table\>,
327    ///
328    /// Field 1: `name`
329    #[serde(
330        rename = "name",
331        with = "::buffa::json_helpers::proto_string",
332        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
333    )]
334    pub name: ::buffa::alloc::string::String,
335    /// Type of the data object.
336    ///
337    /// Field 2: `data_object_type`
338    #[serde(
339        rename = "data_object_type",
340        alias = "dataObjectType",
341        with = "::buffa::json_helpers::proto_enum",
342        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
343    )]
344    pub data_object_type: ::buffa::EnumValue<DataObjectType>,
345    /// The time when this data object is added to the share, in epoch milliseconds.
346    ///
347    /// Field 3: `added_at`
348    #[serde(
349        rename = "added_at",
350        alias = "addedAt",
351        with = "::buffa::json_helpers::opt_int64",
352        skip_serializing_if = "::core::option::Option::is_none"
353    )]
354    pub added_at: ::core::option::Option<i64>,
355    /// Username of the sharer.
356    ///
357    /// Field 4: `added_by`
358    #[serde(
359        rename = "added_by",
360        alias = "addedBy",
361        skip_serializing_if = "::core::option::Option::is_none"
362    )]
363    pub added_by: ::core::option::Option<::buffa::alloc::string::String>,
364    /// A user-provided comment when adding the data object to the share.
365    ///
366    /// Field 5: `comment`
367    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
368    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
369    /// A user-provided new name for the data object within the share.
370    ///
371    /// If this new name is not provided, the object's original name will be used as the shared_as name.
372    /// The shared_as name must be unique within a share.
373    /// For tables, the new name must follow the format of \<schema\>.\<table\>.
374    ///
375    /// Field 6: `shared_as`
376    #[serde(
377        rename = "shared_as",
378        alias = "sharedAs",
379        skip_serializing_if = "::core::option::Option::is_none"
380    )]
381    pub shared_as: ::core::option::Option<::buffa::alloc::string::String>,
382    /// Array of partitions for the shared data.
383    ///
384    /// Field 7: `partitions`
385    #[serde(
386        rename = "partitions",
387        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
388        deserialize_with = "::buffa::json_helpers::null_as_default"
389    )]
390    pub partitions: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
391    /// Whether to enable cdf or indicate if cdf is enabled on the shared object.
392    ///
393    /// Field 8: `enable_cdf`
394    #[serde(
395        rename = "enable_cdf",
396        alias = "enableCdf",
397        skip_serializing_if = "::core::option::Option::is_none"
398    )]
399    pub enable_cdf: ::core::option::Option<bool>,
400    /// Whether to enable or disable sharing of data history. If not specified, the default is DISABLED.
401    ///
402    /// Field 9: `history_data_sharing_status`
403    #[serde(
404        rename = "history_data_sharing_status",
405        alias = "historyDataSharingStatus",
406        with = "::buffa::json_helpers::opt_enum",
407        skip_serializing_if = "::core::option::Option::is_none"
408    )]
409    pub history_data_sharing_status: ::core::option::Option<
410        ::buffa::EnumValue<HistoryStatus>,
411    >,
412    /// The start version associated with the object.
413    ///
414    /// This allows data providers to control the lowest object version that is accessible by clients.
415    /// If specified, clients can query snapshots or changes for versions \>= start_version.
416    /// If not specified, clients can only query starting from the version of the object at the time it was added to the share.
417    ///
418    /// NOTE: The start_version should be \<= the current version of the object.
419    ///
420    /// Field 10: `start_version`
421    #[serde(
422        rename = "start_version",
423        alias = "startVersion",
424        with = "::buffa::json_helpers::opt_int64",
425        skip_serializing_if = "::core::option::Option::is_none"
426    )]
427    pub start_version: ::core::option::Option<i64>,
428    #[serde(skip)]
429    #[doc(hidden)]
430    pub __buffa_unknown_fields: ::buffa::UnknownFields,
431}
432impl ::core::fmt::Debug for DataObject {
433    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
434        f.debug_struct("DataObject")
435            .field("name", &self.name)
436            .field("data_object_type", &self.data_object_type)
437            .field("added_at", &self.added_at)
438            .field("added_by", &self.added_by)
439            .field("comment", &self.comment)
440            .field("shared_as", &self.shared_as)
441            .field("partitions", &self.partitions)
442            .field("enable_cdf", &self.enable_cdf)
443            .field("history_data_sharing_status", &self.history_data_sharing_status)
444            .field("start_version", &self.start_version)
445            .finish()
446    }
447}
448impl DataObject {
449    /// Protobuf type URL for this message, for use with `Any::pack` and
450    /// `Any::unpack_if`.
451    ///
452    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
453    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DataObject";
454}
455impl DataObject {
456    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
457    #[inline]
458    ///Sets [`Self::added_at`] to `Some(value)`, consuming and returning `self`.
459    pub fn with_added_at(mut self, value: i64) -> Self {
460        self.added_at = Some(value);
461        self
462    }
463    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
464    #[inline]
465    ///Sets [`Self::added_by`] to `Some(value)`, consuming and returning `self`.
466    pub fn with_added_by(
467        mut self,
468        value: impl Into<::buffa::alloc::string::String>,
469    ) -> Self {
470        self.added_by = Some(value.into());
471        self
472    }
473    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
474    #[inline]
475    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
476    pub fn with_comment(
477        mut self,
478        value: impl Into<::buffa::alloc::string::String>,
479    ) -> Self {
480        self.comment = Some(value.into());
481        self
482    }
483    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
484    #[inline]
485    ///Sets [`Self::shared_as`] to `Some(value)`, consuming and returning `self`.
486    pub fn with_shared_as(
487        mut self,
488        value: impl Into<::buffa::alloc::string::String>,
489    ) -> Self {
490        self.shared_as = Some(value.into());
491        self
492    }
493    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
494    #[inline]
495    ///Sets [`Self::enable_cdf`] to `Some(value)`, consuming and returning `self`.
496    pub fn with_enable_cdf(mut self, value: bool) -> Self {
497        self.enable_cdf = Some(value);
498        self
499    }
500    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
501    #[inline]
502    ///Sets [`Self::history_data_sharing_status`] to `Some(value)`, consuming and returning `self`.
503    pub fn with_history_data_sharing_status(
504        mut self,
505        value: impl Into<::buffa::EnumValue<HistoryStatus>>,
506    ) -> Self {
507        self.history_data_sharing_status = Some(value.into());
508        self
509    }
510    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
511    #[inline]
512    ///Sets [`Self::start_version`] to `Some(value)`, consuming and returning `self`.
513    pub fn with_start_version(mut self, value: i64) -> Self {
514        self.start_version = Some(value);
515        self
516    }
517}
518impl ::buffa::DefaultInstance for DataObject {
519    fn default_instance() -> &'static Self {
520        static VALUE: ::buffa::__private::OnceBox<DataObject> = ::buffa::__private::OnceBox::new();
521        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
522    }
523}
524impl ::buffa::MessageName for DataObject {
525    const PACKAGE: &'static str = "unitycatalog.shares.v1";
526    const NAME: &'static str = "DataObject";
527    const FULL_NAME: &'static str = "unitycatalog.shares.v1.DataObject";
528    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DataObject";
529}
530impl ::buffa::Message for DataObject {
531    /// Returns the total encoded size in bytes.
532    ///
533    /// The result is a `u32`; the protobuf specification requires all
534    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
535    /// compliant message will never overflow this type.
536    #[allow(clippy::let_and_return)]
537    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
538        #[allow(unused_imports)]
539        use ::buffa::Enumeration as _;
540        let mut size = 0u32;
541        if !self.name.is_empty() {
542            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
543        }
544        {
545            let val = self.data_object_type.to_i32();
546            if val != 0 {
547                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
548            }
549        }
550        if let Some(v) = self.added_at {
551            size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
552        }
553        if let Some(ref v) = self.added_by {
554            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
555        }
556        if let Some(ref v) = self.comment {
557            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
558        }
559        if let Some(ref v) = self.shared_as {
560            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
561        }
562        for v in &self.partitions {
563            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
564        }
565        if self.enable_cdf.is_some() {
566            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
567        }
568        if let Some(ref v) = self.history_data_sharing_status {
569            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
570        }
571        if let Some(v) = self.start_version {
572            size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
573        }
574        size += self.__buffa_unknown_fields.encoded_len() as u32;
575        size
576    }
577    fn write_to(
578        &self,
579        _cache: &mut ::buffa::SizeCache,
580        buf: &mut impl ::buffa::bytes::BufMut,
581    ) {
582        #[allow(unused_imports)]
583        use ::buffa::Enumeration as _;
584        if !self.name.is_empty() {
585            ::buffa::encoding::Tag::new(
586                    1u32,
587                    ::buffa::encoding::WireType::LengthDelimited,
588                )
589                .encode(buf);
590            ::buffa::types::encode_string(&self.name, buf);
591        }
592        {
593            let val = self.data_object_type.to_i32();
594            if val != 0 {
595                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
596                    .encode(buf);
597                ::buffa::types::encode_int32(val, buf);
598            }
599        }
600        if let Some(v) = self.added_at {
601            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
602                .encode(buf);
603            ::buffa::types::encode_int64(v, buf);
604        }
605        if let Some(ref v) = self.added_by {
606            ::buffa::encoding::Tag::new(
607                    4u32,
608                    ::buffa::encoding::WireType::LengthDelimited,
609                )
610                .encode(buf);
611            ::buffa::types::encode_string(v, buf);
612        }
613        if let Some(ref v) = self.comment {
614            ::buffa::encoding::Tag::new(
615                    5u32,
616                    ::buffa::encoding::WireType::LengthDelimited,
617                )
618                .encode(buf);
619            ::buffa::types::encode_string(v, buf);
620        }
621        if let Some(ref v) = self.shared_as {
622            ::buffa::encoding::Tag::new(
623                    6u32,
624                    ::buffa::encoding::WireType::LengthDelimited,
625                )
626                .encode(buf);
627            ::buffa::types::encode_string(v, buf);
628        }
629        for v in &self.partitions {
630            ::buffa::encoding::Tag::new(
631                    7u32,
632                    ::buffa::encoding::WireType::LengthDelimited,
633                )
634                .encode(buf);
635            ::buffa::types::encode_string(v, buf);
636        }
637        if let Some(v) = self.enable_cdf {
638            ::buffa::encoding::Tag::new(8u32, ::buffa::encoding::WireType::Varint)
639                .encode(buf);
640            ::buffa::types::encode_bool(v, buf);
641        }
642        if let Some(ref v) = self.history_data_sharing_status {
643            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
644                .encode(buf);
645            ::buffa::types::encode_int32(v.to_i32(), buf);
646        }
647        if let Some(v) = self.start_version {
648            ::buffa::encoding::Tag::new(10u32, ::buffa::encoding::WireType::Varint)
649                .encode(buf);
650            ::buffa::types::encode_int64(v, buf);
651        }
652        self.__buffa_unknown_fields.write_to(buf);
653    }
654    fn merge_field(
655        &mut self,
656        tag: ::buffa::encoding::Tag,
657        buf: &mut impl ::buffa::bytes::Buf,
658        depth: u32,
659    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
660        #[allow(unused_imports)]
661        use ::buffa::bytes::Buf as _;
662        #[allow(unused_imports)]
663        use ::buffa::Enumeration as _;
664        match tag.field_number() {
665            1u32 => {
666                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
667                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
668                        field_number: 1u32,
669                        expected: 2u8,
670                        actual: tag.wire_type() as u8,
671                    });
672                }
673                ::buffa::types::merge_string(&mut self.name, buf)?;
674            }
675            2u32 => {
676                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
677                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
678                        field_number: 2u32,
679                        expected: 0u8,
680                        actual: tag.wire_type() as u8,
681                    });
682                }
683                self.data_object_type = ::buffa::EnumValue::from(
684                    ::buffa::types::decode_int32(buf)?,
685                );
686            }
687            3u32 => {
688                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
689                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
690                        field_number: 3u32,
691                        expected: 0u8,
692                        actual: tag.wire_type() as u8,
693                    });
694                }
695                self.added_at = ::core::option::Option::Some(
696                    ::buffa::types::decode_int64(buf)?,
697                );
698            }
699            4u32 => {
700                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
701                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
702                        field_number: 4u32,
703                        expected: 2u8,
704                        actual: tag.wire_type() as u8,
705                    });
706                }
707                ::buffa::types::merge_string(
708                    self
709                        .added_by
710                        .get_or_insert_with(::buffa::alloc::string::String::new),
711                    buf,
712                )?;
713            }
714            5u32 => {
715                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
716                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
717                        field_number: 5u32,
718                        expected: 2u8,
719                        actual: tag.wire_type() as u8,
720                    });
721                }
722                ::buffa::types::merge_string(
723                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
724                    buf,
725                )?;
726            }
727            6u32 => {
728                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
729                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
730                        field_number: 6u32,
731                        expected: 2u8,
732                        actual: tag.wire_type() as u8,
733                    });
734                }
735                ::buffa::types::merge_string(
736                    self
737                        .shared_as
738                        .get_or_insert_with(::buffa::alloc::string::String::new),
739                    buf,
740                )?;
741            }
742            7u32 => {
743                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
744                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
745                        field_number: 7u32,
746                        expected: 2u8,
747                        actual: tag.wire_type() as u8,
748                    });
749                }
750                self.partitions.push(::buffa::types::decode_string(buf)?);
751            }
752            8u32 => {
753                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
754                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
755                        field_number: 8u32,
756                        expected: 0u8,
757                        actual: tag.wire_type() as u8,
758                    });
759                }
760                self.enable_cdf = ::core::option::Option::Some(
761                    ::buffa::types::decode_bool(buf)?,
762                );
763            }
764            9u32 => {
765                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
766                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
767                        field_number: 9u32,
768                        expected: 0u8,
769                        actual: tag.wire_type() as u8,
770                    });
771                }
772                self.history_data_sharing_status = ::core::option::Option::Some(
773                    ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?),
774                );
775            }
776            10u32 => {
777                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
778                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
779                        field_number: 10u32,
780                        expected: 0u8,
781                        actual: tag.wire_type() as u8,
782                    });
783                }
784                self.start_version = ::core::option::Option::Some(
785                    ::buffa::types::decode_int64(buf)?,
786                );
787            }
788            _ => {
789                self.__buffa_unknown_fields
790                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
791            }
792        }
793        ::core::result::Result::Ok(())
794    }
795    fn clear(&mut self) {
796        self.name.clear();
797        self.data_object_type = ::buffa::EnumValue::from(0);
798        self.added_at = ::core::option::Option::None;
799        self.added_by = ::core::option::Option::None;
800        self.comment = ::core::option::Option::None;
801        self.shared_as = ::core::option::Option::None;
802        self.partitions.clear();
803        self.enable_cdf = ::core::option::Option::None;
804        self.history_data_sharing_status = ::core::option::Option::None;
805        self.start_version = ::core::option::Option::None;
806        self.__buffa_unknown_fields.clear();
807    }
808}
809impl ::buffa::ExtensionSet for DataObject {
810    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.DataObject";
811    fn unknown_fields(&self) -> &::buffa::UnknownFields {
812        &self.__buffa_unknown_fields
813    }
814    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
815        &mut self.__buffa_unknown_fields
816    }
817}
818impl ::buffa::json_helpers::ProtoElemJson for DataObject {
819    fn serialize_proto_json<S: ::serde::Serializer>(
820        v: &Self,
821        s: S,
822    ) -> ::core::result::Result<S::Ok, S::Error> {
823        ::serde::Serialize::serialize(v, s)
824    }
825    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
826        d: D,
827    ) -> ::core::result::Result<Self, D::Error> {
828        <Self as ::serde::Deserialize>::deserialize(d)
829    }
830}
831#[doc(hidden)]
832pub const __DATA_OBJECT_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
833    type_url: "type.googleapis.com/unitycatalog.shares.v1.DataObject",
834    to_json: ::buffa::type_registry::any_to_json::<DataObject>,
835    from_json: ::buffa::type_registry::any_from_json::<DataObject>,
836    is_wkt: false,
837};
838#[derive(Clone, PartialEq, Default)]
839#[derive(::serde::Serialize, ::serde::Deserialize)]
840#[serde(default)]
841pub struct Share {
842    /// Unique ID of the recipient.
843    ///
844    /// Field 100: `id`
845    #[serde(rename = "id", skip_serializing_if = "::core::option::Option::is_none")]
846    pub id: ::core::option::Option<::buffa::alloc::string::String>,
847    /// Name of the share.
848    ///
849    /// Field 1: `name`
850    #[serde(
851        rename = "name",
852        with = "::buffa::json_helpers::proto_string",
853        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
854    )]
855    pub name: ::buffa::alloc::string::String,
856    /// A list of shared data objects within the share.
857    ///
858    /// Field 6: `objects`
859    #[serde(
860        rename = "objects",
861        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
862        deserialize_with = "::buffa::json_helpers::null_as_default"
863    )]
864    pub objects: ::buffa::alloc::vec::Vec<DataObject>,
865    /// Username of current owner of share.
866    ///
867    /// Field 2: `owner`
868    #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
869    pub owner: ::core::option::Option<::buffa::alloc::string::String>,
870    /// User-provided free-form text description.
871    ///
872    /// Field 3: `comment`
873    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
874    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
875    /// Storage Location URL (full path) for the share.
876    ///
877    /// Field 4: `storage_location`
878    #[serde(
879        rename = "storage_location",
880        alias = "storageLocation",
881        skip_serializing_if = "::core::option::Option::is_none"
882    )]
883    pub storage_location: ::core::option::Option<::buffa::alloc::string::String>,
884    /// Storage root URL for the share.
885    ///
886    /// Field 5: `storage_root`
887    #[serde(
888        rename = "storage_root",
889        alias = "storageRoot",
890        skip_serializing_if = "::core::option::Option::is_none"
891    )]
892    pub storage_root: ::core::option::Option<::buffa::alloc::string::String>,
893    /// Time at which this share was created, in epoch milliseconds.
894    ///
895    /// Field 7: `created_at`
896    #[serde(
897        rename = "created_at",
898        alias = "createdAt",
899        with = "::buffa::json_helpers::opt_int64",
900        skip_serializing_if = "::core::option::Option::is_none"
901    )]
902    pub created_at: ::core::option::Option<i64>,
903    /// Username of the creator of the share.
904    ///
905    /// Field 8: `created_by`
906    #[serde(
907        rename = "created_by",
908        alias = "createdBy",
909        skip_serializing_if = "::core::option::Option::is_none"
910    )]
911    pub created_by: ::core::option::Option<::buffa::alloc::string::String>,
912    /// Time at which this share was updated, in epoch milliseconds.
913    ///
914    /// Field 9: `updated_at`
915    #[serde(
916        rename = "updated_at",
917        alias = "updatedAt",
918        with = "::buffa::json_helpers::opt_int64",
919        skip_serializing_if = "::core::option::Option::is_none"
920    )]
921    pub updated_at: ::core::option::Option<i64>,
922    /// Username of share updater.
923    ///
924    /// Field 10: `updated_by`
925    #[serde(
926        rename = "updated_by",
927        alias = "updatedBy",
928        skip_serializing_if = "::core::option::Option::is_none"
929    )]
930    pub updated_by: ::core::option::Option<::buffa::alloc::string::String>,
931    #[serde(skip)]
932    #[doc(hidden)]
933    pub __buffa_unknown_fields: ::buffa::UnknownFields,
934}
935impl ::core::fmt::Debug for Share {
936    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
937        f.debug_struct("Share")
938            .field("id", &self.id)
939            .field("name", &self.name)
940            .field("objects", &self.objects)
941            .field("owner", &self.owner)
942            .field("comment", &self.comment)
943            .field("storage_location", &self.storage_location)
944            .field("storage_root", &self.storage_root)
945            .field("created_at", &self.created_at)
946            .field("created_by", &self.created_by)
947            .field("updated_at", &self.updated_at)
948            .field("updated_by", &self.updated_by)
949            .finish()
950    }
951}
952impl Share {
953    /// Protobuf type URL for this message, for use with `Any::pack` and
954    /// `Any::unpack_if`.
955    ///
956    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
957    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.Share";
958}
959impl Share {
960    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
961    #[inline]
962    ///Sets [`Self::id`] to `Some(value)`, consuming and returning `self`.
963    pub fn with_id(mut self, value: impl Into<::buffa::alloc::string::String>) -> Self {
964        self.id = Some(value.into());
965        self
966    }
967    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
968    #[inline]
969    ///Sets [`Self::owner`] to `Some(value)`, consuming and returning `self`.
970    pub fn with_owner(
971        mut self,
972        value: impl Into<::buffa::alloc::string::String>,
973    ) -> Self {
974        self.owner = Some(value.into());
975        self
976    }
977    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
978    #[inline]
979    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
980    pub fn with_comment(
981        mut self,
982        value: impl Into<::buffa::alloc::string::String>,
983    ) -> Self {
984        self.comment = Some(value.into());
985        self
986    }
987    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
988    #[inline]
989    ///Sets [`Self::storage_location`] to `Some(value)`, consuming and returning `self`.
990    pub fn with_storage_location(
991        mut self,
992        value: impl Into<::buffa::alloc::string::String>,
993    ) -> Self {
994        self.storage_location = Some(value.into());
995        self
996    }
997    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
998    #[inline]
999    ///Sets [`Self::storage_root`] to `Some(value)`, consuming and returning `self`.
1000    pub fn with_storage_root(
1001        mut self,
1002        value: impl Into<::buffa::alloc::string::String>,
1003    ) -> Self {
1004        self.storage_root = Some(value.into());
1005        self
1006    }
1007    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1008    #[inline]
1009    ///Sets [`Self::created_at`] to `Some(value)`, consuming and returning `self`.
1010    pub fn with_created_at(mut self, value: i64) -> Self {
1011        self.created_at = Some(value);
1012        self
1013    }
1014    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1015    #[inline]
1016    ///Sets [`Self::created_by`] to `Some(value)`, consuming and returning `self`.
1017    pub fn with_created_by(
1018        mut self,
1019        value: impl Into<::buffa::alloc::string::String>,
1020    ) -> Self {
1021        self.created_by = Some(value.into());
1022        self
1023    }
1024    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1025    #[inline]
1026    ///Sets [`Self::updated_at`] to `Some(value)`, consuming and returning `self`.
1027    pub fn with_updated_at(mut self, value: i64) -> Self {
1028        self.updated_at = Some(value);
1029        self
1030    }
1031    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1032    #[inline]
1033    ///Sets [`Self::updated_by`] to `Some(value)`, consuming and returning `self`.
1034    pub fn with_updated_by(
1035        mut self,
1036        value: impl Into<::buffa::alloc::string::String>,
1037    ) -> Self {
1038        self.updated_by = Some(value.into());
1039        self
1040    }
1041}
1042impl ::buffa::DefaultInstance for Share {
1043    fn default_instance() -> &'static Self {
1044        static VALUE: ::buffa::__private::OnceBox<Share> = ::buffa::__private::OnceBox::new();
1045        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1046    }
1047}
1048impl ::buffa::MessageName for Share {
1049    const PACKAGE: &'static str = "unitycatalog.shares.v1";
1050    const NAME: &'static str = "Share";
1051    const FULL_NAME: &'static str = "unitycatalog.shares.v1.Share";
1052    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.Share";
1053}
1054impl ::buffa::Message for Share {
1055    /// Returns the total encoded size in bytes.
1056    ///
1057    /// The result is a `u32`; the protobuf specification requires all
1058    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1059    /// compliant message will never overflow this type.
1060    #[allow(clippy::let_and_return)]
1061    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1062        #[allow(unused_imports)]
1063        use ::buffa::Enumeration as _;
1064        let mut size = 0u32;
1065        if !self.name.is_empty() {
1066            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
1067        }
1068        if let Some(ref v) = self.owner {
1069            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1070        }
1071        if let Some(ref v) = self.comment {
1072            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1073        }
1074        if let Some(ref v) = self.storage_location {
1075            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1076        }
1077        if let Some(ref v) = self.storage_root {
1078            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1079        }
1080        for v in &self.objects {
1081            let __slot = __cache.reserve();
1082            let inner_size = v.compute_size(__cache);
1083            __cache.set(__slot, inner_size);
1084            size
1085                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1086                    + inner_size;
1087        }
1088        if let Some(v) = self.created_at {
1089            size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
1090        }
1091        if let Some(ref v) = self.created_by {
1092            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1093        }
1094        if let Some(v) = self.updated_at {
1095            size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
1096        }
1097        if let Some(ref v) = self.updated_by {
1098            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1099        }
1100        if let Some(ref v) = self.id {
1101            size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
1102        }
1103        size += self.__buffa_unknown_fields.encoded_len() as u32;
1104        size
1105    }
1106    fn write_to(
1107        &self,
1108        __cache: &mut ::buffa::SizeCache,
1109        buf: &mut impl ::buffa::bytes::BufMut,
1110    ) {
1111        #[allow(unused_imports)]
1112        use ::buffa::Enumeration as _;
1113        if !self.name.is_empty() {
1114            ::buffa::encoding::Tag::new(
1115                    1u32,
1116                    ::buffa::encoding::WireType::LengthDelimited,
1117                )
1118                .encode(buf);
1119            ::buffa::types::encode_string(&self.name, buf);
1120        }
1121        if let Some(ref v) = self.owner {
1122            ::buffa::encoding::Tag::new(
1123                    2u32,
1124                    ::buffa::encoding::WireType::LengthDelimited,
1125                )
1126                .encode(buf);
1127            ::buffa::types::encode_string(v, buf);
1128        }
1129        if let Some(ref v) = self.comment {
1130            ::buffa::encoding::Tag::new(
1131                    3u32,
1132                    ::buffa::encoding::WireType::LengthDelimited,
1133                )
1134                .encode(buf);
1135            ::buffa::types::encode_string(v, buf);
1136        }
1137        if let Some(ref v) = self.storage_location {
1138            ::buffa::encoding::Tag::new(
1139                    4u32,
1140                    ::buffa::encoding::WireType::LengthDelimited,
1141                )
1142                .encode(buf);
1143            ::buffa::types::encode_string(v, buf);
1144        }
1145        if let Some(ref v) = self.storage_root {
1146            ::buffa::encoding::Tag::new(
1147                    5u32,
1148                    ::buffa::encoding::WireType::LengthDelimited,
1149                )
1150                .encode(buf);
1151            ::buffa::types::encode_string(v, buf);
1152        }
1153        for v in &self.objects {
1154            ::buffa::encoding::Tag::new(
1155                    6u32,
1156                    ::buffa::encoding::WireType::LengthDelimited,
1157                )
1158                .encode(buf);
1159            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1160            v.write_to(__cache, buf);
1161        }
1162        if let Some(v) = self.created_at {
1163            ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
1164                .encode(buf);
1165            ::buffa::types::encode_int64(v, buf);
1166        }
1167        if let Some(ref v) = self.created_by {
1168            ::buffa::encoding::Tag::new(
1169                    8u32,
1170                    ::buffa::encoding::WireType::LengthDelimited,
1171                )
1172                .encode(buf);
1173            ::buffa::types::encode_string(v, buf);
1174        }
1175        if let Some(v) = self.updated_at {
1176            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
1177                .encode(buf);
1178            ::buffa::types::encode_int64(v, buf);
1179        }
1180        if let Some(ref v) = self.updated_by {
1181            ::buffa::encoding::Tag::new(
1182                    10u32,
1183                    ::buffa::encoding::WireType::LengthDelimited,
1184                )
1185                .encode(buf);
1186            ::buffa::types::encode_string(v, buf);
1187        }
1188        if let Some(ref v) = self.id {
1189            ::buffa::encoding::Tag::new(
1190                    100u32,
1191                    ::buffa::encoding::WireType::LengthDelimited,
1192                )
1193                .encode(buf);
1194            ::buffa::types::encode_string(v, buf);
1195        }
1196        self.__buffa_unknown_fields.write_to(buf);
1197    }
1198    fn merge_field(
1199        &mut self,
1200        tag: ::buffa::encoding::Tag,
1201        buf: &mut impl ::buffa::bytes::Buf,
1202        depth: u32,
1203    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1204        #[allow(unused_imports)]
1205        use ::buffa::bytes::Buf as _;
1206        #[allow(unused_imports)]
1207        use ::buffa::Enumeration as _;
1208        match tag.field_number() {
1209            1u32 => {
1210                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1211                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1212                        field_number: 1u32,
1213                        expected: 2u8,
1214                        actual: tag.wire_type() as u8,
1215                    });
1216                }
1217                ::buffa::types::merge_string(&mut self.name, buf)?;
1218            }
1219            2u32 => {
1220                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1221                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1222                        field_number: 2u32,
1223                        expected: 2u8,
1224                        actual: tag.wire_type() as u8,
1225                    });
1226                }
1227                ::buffa::types::merge_string(
1228                    self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
1229                    buf,
1230                )?;
1231            }
1232            3u32 => {
1233                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1234                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1235                        field_number: 3u32,
1236                        expected: 2u8,
1237                        actual: tag.wire_type() as u8,
1238                    });
1239                }
1240                ::buffa::types::merge_string(
1241                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
1242                    buf,
1243                )?;
1244            }
1245            4u32 => {
1246                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1247                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1248                        field_number: 4u32,
1249                        expected: 2u8,
1250                        actual: tag.wire_type() as u8,
1251                    });
1252                }
1253                ::buffa::types::merge_string(
1254                    self
1255                        .storage_location
1256                        .get_or_insert_with(::buffa::alloc::string::String::new),
1257                    buf,
1258                )?;
1259            }
1260            5u32 => {
1261                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1262                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1263                        field_number: 5u32,
1264                        expected: 2u8,
1265                        actual: tag.wire_type() as u8,
1266                    });
1267                }
1268                ::buffa::types::merge_string(
1269                    self
1270                        .storage_root
1271                        .get_or_insert_with(::buffa::alloc::string::String::new),
1272                    buf,
1273                )?;
1274            }
1275            6u32 => {
1276                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1277                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1278                        field_number: 6u32,
1279                        expected: 2u8,
1280                        actual: tag.wire_type() as u8,
1281                    });
1282                }
1283                let mut elem = ::core::default::Default::default();
1284                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
1285                self.objects.push(elem);
1286            }
1287            7u32 => {
1288                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1289                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1290                        field_number: 7u32,
1291                        expected: 0u8,
1292                        actual: tag.wire_type() as u8,
1293                    });
1294                }
1295                self.created_at = ::core::option::Option::Some(
1296                    ::buffa::types::decode_int64(buf)?,
1297                );
1298            }
1299            8u32 => {
1300                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1301                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1302                        field_number: 8u32,
1303                        expected: 2u8,
1304                        actual: tag.wire_type() as u8,
1305                    });
1306                }
1307                ::buffa::types::merge_string(
1308                    self
1309                        .created_by
1310                        .get_or_insert_with(::buffa::alloc::string::String::new),
1311                    buf,
1312                )?;
1313            }
1314            9u32 => {
1315                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1316                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1317                        field_number: 9u32,
1318                        expected: 0u8,
1319                        actual: tag.wire_type() as u8,
1320                    });
1321                }
1322                self.updated_at = ::core::option::Option::Some(
1323                    ::buffa::types::decode_int64(buf)?,
1324                );
1325            }
1326            10u32 => {
1327                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1328                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1329                        field_number: 10u32,
1330                        expected: 2u8,
1331                        actual: tag.wire_type() as u8,
1332                    });
1333                }
1334                ::buffa::types::merge_string(
1335                    self
1336                        .updated_by
1337                        .get_or_insert_with(::buffa::alloc::string::String::new),
1338                    buf,
1339                )?;
1340            }
1341            100u32 => {
1342                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1343                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1344                        field_number: 100u32,
1345                        expected: 2u8,
1346                        actual: tag.wire_type() as u8,
1347                    });
1348                }
1349                ::buffa::types::merge_string(
1350                    self.id.get_or_insert_with(::buffa::alloc::string::String::new),
1351                    buf,
1352                )?;
1353            }
1354            _ => {
1355                self.__buffa_unknown_fields
1356                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1357            }
1358        }
1359        ::core::result::Result::Ok(())
1360    }
1361    fn clear(&mut self) {
1362        self.name.clear();
1363        self.owner = ::core::option::Option::None;
1364        self.comment = ::core::option::Option::None;
1365        self.storage_location = ::core::option::Option::None;
1366        self.storage_root = ::core::option::Option::None;
1367        self.objects.clear();
1368        self.created_at = ::core::option::Option::None;
1369        self.created_by = ::core::option::Option::None;
1370        self.updated_at = ::core::option::Option::None;
1371        self.updated_by = ::core::option::Option::None;
1372        self.id = ::core::option::Option::None;
1373        self.__buffa_unknown_fields.clear();
1374    }
1375}
1376impl ::buffa::ExtensionSet for Share {
1377    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.Share";
1378    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1379        &self.__buffa_unknown_fields
1380    }
1381    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1382        &mut self.__buffa_unknown_fields
1383    }
1384}
1385impl ::buffa::json_helpers::ProtoElemJson for Share {
1386    fn serialize_proto_json<S: ::serde::Serializer>(
1387        v: &Self,
1388        s: S,
1389    ) -> ::core::result::Result<S::Ok, S::Error> {
1390        ::serde::Serialize::serialize(v, s)
1391    }
1392    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1393        d: D,
1394    ) -> ::core::result::Result<Self, D::Error> {
1395        <Self as ::serde::Deserialize>::deserialize(d)
1396    }
1397}
1398#[doc(hidden)]
1399pub const __SHARE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1400    type_url: "type.googleapis.com/unitycatalog.shares.v1.Share",
1401    to_json: ::buffa::type_registry::any_to_json::<Share>,
1402    from_json: ::buffa::type_registry::any_from_json::<Share>,
1403    is_wkt: false,
1404};
1405#[derive(Clone, PartialEq, Default)]
1406#[derive(::serde::Serialize, ::serde::Deserialize)]
1407#[serde(default)]
1408pub struct PrivilegeAssignment {
1409    /// The principal (user email address or group name).
1410    ///
1411    /// For deleted principals, principal is empty while principal_id is populated.
1412    ///
1413    /// Field 1: `principal`
1414    #[serde(
1415        rename = "principal",
1416        with = "::buffa::json_helpers::proto_string",
1417        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1418    )]
1419    pub principal: ::buffa::alloc::string::String,
1420    /// The privileges assigned to the principal.
1421    ///
1422    /// Field 2: `privileges`
1423    #[serde(
1424        rename = "privileges",
1425        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1426        deserialize_with = "::buffa::json_helpers::null_as_default"
1427    )]
1428    pub privileges: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
1429    #[serde(skip)]
1430    #[doc(hidden)]
1431    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1432}
1433impl ::core::fmt::Debug for PrivilegeAssignment {
1434    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1435        f.debug_struct("PrivilegeAssignment")
1436            .field("principal", &self.principal)
1437            .field("privileges", &self.privileges)
1438            .finish()
1439    }
1440}
1441impl PrivilegeAssignment {
1442    /// Protobuf type URL for this message, for use with `Any::pack` and
1443    /// `Any::unpack_if`.
1444    ///
1445    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1446    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.PrivilegeAssignment";
1447}
1448impl ::buffa::DefaultInstance for PrivilegeAssignment {
1449    fn default_instance() -> &'static Self {
1450        static VALUE: ::buffa::__private::OnceBox<PrivilegeAssignment> = ::buffa::__private::OnceBox::new();
1451        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1452    }
1453}
1454impl ::buffa::MessageName for PrivilegeAssignment {
1455    const PACKAGE: &'static str = "unitycatalog.shares.v1";
1456    const NAME: &'static str = "PrivilegeAssignment";
1457    const FULL_NAME: &'static str = "unitycatalog.shares.v1.PrivilegeAssignment";
1458    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.PrivilegeAssignment";
1459}
1460impl ::buffa::Message for PrivilegeAssignment {
1461    /// Returns the total encoded size in bytes.
1462    ///
1463    /// The result is a `u32`; the protobuf specification requires all
1464    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1465    /// compliant message will never overflow this type.
1466    #[allow(clippy::let_and_return)]
1467    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1468        #[allow(unused_imports)]
1469        use ::buffa::Enumeration as _;
1470        let mut size = 0u32;
1471        if !self.principal.is_empty() {
1472            size += 1u32 + ::buffa::types::string_encoded_len(&self.principal) as u32;
1473        }
1474        for v in &self.privileges {
1475            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1476        }
1477        size += self.__buffa_unknown_fields.encoded_len() as u32;
1478        size
1479    }
1480    fn write_to(
1481        &self,
1482        _cache: &mut ::buffa::SizeCache,
1483        buf: &mut impl ::buffa::bytes::BufMut,
1484    ) {
1485        #[allow(unused_imports)]
1486        use ::buffa::Enumeration as _;
1487        if !self.principal.is_empty() {
1488            ::buffa::encoding::Tag::new(
1489                    1u32,
1490                    ::buffa::encoding::WireType::LengthDelimited,
1491                )
1492                .encode(buf);
1493            ::buffa::types::encode_string(&self.principal, buf);
1494        }
1495        for v in &self.privileges {
1496            ::buffa::encoding::Tag::new(
1497                    2u32,
1498                    ::buffa::encoding::WireType::LengthDelimited,
1499                )
1500                .encode(buf);
1501            ::buffa::types::encode_string(v, buf);
1502        }
1503        self.__buffa_unknown_fields.write_to(buf);
1504    }
1505    fn merge_field(
1506        &mut self,
1507        tag: ::buffa::encoding::Tag,
1508        buf: &mut impl ::buffa::bytes::Buf,
1509        depth: u32,
1510    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1511        #[allow(unused_imports)]
1512        use ::buffa::bytes::Buf as _;
1513        #[allow(unused_imports)]
1514        use ::buffa::Enumeration as _;
1515        match tag.field_number() {
1516            1u32 => {
1517                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1518                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1519                        field_number: 1u32,
1520                        expected: 2u8,
1521                        actual: tag.wire_type() as u8,
1522                    });
1523                }
1524                ::buffa::types::merge_string(&mut self.principal, buf)?;
1525            }
1526            2u32 => {
1527                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1528                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1529                        field_number: 2u32,
1530                        expected: 2u8,
1531                        actual: tag.wire_type() as u8,
1532                    });
1533                }
1534                self.privileges.push(::buffa::types::decode_string(buf)?);
1535            }
1536            _ => {
1537                self.__buffa_unknown_fields
1538                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1539            }
1540        }
1541        ::core::result::Result::Ok(())
1542    }
1543    fn clear(&mut self) {
1544        self.principal.clear();
1545        self.privileges.clear();
1546        self.__buffa_unknown_fields.clear();
1547    }
1548}
1549impl ::buffa::ExtensionSet for PrivilegeAssignment {
1550    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.PrivilegeAssignment";
1551    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1552        &self.__buffa_unknown_fields
1553    }
1554    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1555        &mut self.__buffa_unknown_fields
1556    }
1557}
1558impl ::buffa::json_helpers::ProtoElemJson for PrivilegeAssignment {
1559    fn serialize_proto_json<S: ::serde::Serializer>(
1560        v: &Self,
1561        s: S,
1562    ) -> ::core::result::Result<S::Ok, S::Error> {
1563        ::serde::Serialize::serialize(v, s)
1564    }
1565    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1566        d: D,
1567    ) -> ::core::result::Result<Self, D::Error> {
1568        <Self as ::serde::Deserialize>::deserialize(d)
1569    }
1570}
1571#[doc(hidden)]
1572pub const __PRIVILEGE_ASSIGNMENT_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1573    type_url: "type.googleapis.com/unitycatalog.shares.v1.PrivilegeAssignment",
1574    to_json: ::buffa::type_registry::any_to_json::<PrivilegeAssignment>,
1575    from_json: ::buffa::type_registry::any_from_json::<PrivilegeAssignment>,
1576    is_wkt: false,
1577};
1578#[derive(Clone, PartialEq, Default)]
1579#[derive(::serde::Serialize, ::serde::Deserialize)]
1580#[serde(default)]
1581pub struct PermissionsChange {
1582    /// The principal (user email address or group name).
1583    ///
1584    /// Field 1: `principal`
1585    #[serde(
1586        rename = "principal",
1587        with = "::buffa::json_helpers::proto_string",
1588        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1589    )]
1590    pub principal: ::buffa::alloc::string::String,
1591    /// The set of privileges to add.
1592    ///
1593    /// Field 2: `add`
1594    #[serde(
1595        rename = "add",
1596        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1597        deserialize_with = "::buffa::json_helpers::null_as_default"
1598    )]
1599    pub add: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
1600    /// The set of privileges to remove.
1601    ///
1602    /// Field 3: `remove`
1603    #[serde(
1604        rename = "remove",
1605        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
1606        deserialize_with = "::buffa::json_helpers::null_as_default"
1607    )]
1608    pub remove: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
1609    #[serde(skip)]
1610    #[doc(hidden)]
1611    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1612}
1613impl ::core::fmt::Debug for PermissionsChange {
1614    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1615        f.debug_struct("PermissionsChange")
1616            .field("principal", &self.principal)
1617            .field("add", &self.add)
1618            .field("remove", &self.remove)
1619            .finish()
1620    }
1621}
1622impl PermissionsChange {
1623    /// Protobuf type URL for this message, for use with `Any::pack` and
1624    /// `Any::unpack_if`.
1625    ///
1626    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1627    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.PermissionsChange";
1628}
1629impl ::buffa::DefaultInstance for PermissionsChange {
1630    fn default_instance() -> &'static Self {
1631        static VALUE: ::buffa::__private::OnceBox<PermissionsChange> = ::buffa::__private::OnceBox::new();
1632        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1633    }
1634}
1635impl ::buffa::MessageName for PermissionsChange {
1636    const PACKAGE: &'static str = "unitycatalog.shares.v1";
1637    const NAME: &'static str = "PermissionsChange";
1638    const FULL_NAME: &'static str = "unitycatalog.shares.v1.PermissionsChange";
1639    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.PermissionsChange";
1640}
1641impl ::buffa::Message for PermissionsChange {
1642    /// Returns the total encoded size in bytes.
1643    ///
1644    /// The result is a `u32`; the protobuf specification requires all
1645    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1646    /// compliant message will never overflow this type.
1647    #[allow(clippy::let_and_return)]
1648    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1649        #[allow(unused_imports)]
1650        use ::buffa::Enumeration as _;
1651        let mut size = 0u32;
1652        if !self.principal.is_empty() {
1653            size += 1u32 + ::buffa::types::string_encoded_len(&self.principal) as u32;
1654        }
1655        for v in &self.add {
1656            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1657        }
1658        for v in &self.remove {
1659            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1660        }
1661        size += self.__buffa_unknown_fields.encoded_len() as u32;
1662        size
1663    }
1664    fn write_to(
1665        &self,
1666        _cache: &mut ::buffa::SizeCache,
1667        buf: &mut impl ::buffa::bytes::BufMut,
1668    ) {
1669        #[allow(unused_imports)]
1670        use ::buffa::Enumeration as _;
1671        if !self.principal.is_empty() {
1672            ::buffa::encoding::Tag::new(
1673                    1u32,
1674                    ::buffa::encoding::WireType::LengthDelimited,
1675                )
1676                .encode(buf);
1677            ::buffa::types::encode_string(&self.principal, buf);
1678        }
1679        for v in &self.add {
1680            ::buffa::encoding::Tag::new(
1681                    2u32,
1682                    ::buffa::encoding::WireType::LengthDelimited,
1683                )
1684                .encode(buf);
1685            ::buffa::types::encode_string(v, buf);
1686        }
1687        for v in &self.remove {
1688            ::buffa::encoding::Tag::new(
1689                    3u32,
1690                    ::buffa::encoding::WireType::LengthDelimited,
1691                )
1692                .encode(buf);
1693            ::buffa::types::encode_string(v, buf);
1694        }
1695        self.__buffa_unknown_fields.write_to(buf);
1696    }
1697    fn merge_field(
1698        &mut self,
1699        tag: ::buffa::encoding::Tag,
1700        buf: &mut impl ::buffa::bytes::Buf,
1701        depth: u32,
1702    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1703        #[allow(unused_imports)]
1704        use ::buffa::bytes::Buf as _;
1705        #[allow(unused_imports)]
1706        use ::buffa::Enumeration as _;
1707        match tag.field_number() {
1708            1u32 => {
1709                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1710                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1711                        field_number: 1u32,
1712                        expected: 2u8,
1713                        actual: tag.wire_type() as u8,
1714                    });
1715                }
1716                ::buffa::types::merge_string(&mut self.principal, buf)?;
1717            }
1718            2u32 => {
1719                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1720                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1721                        field_number: 2u32,
1722                        expected: 2u8,
1723                        actual: tag.wire_type() as u8,
1724                    });
1725                }
1726                self.add.push(::buffa::types::decode_string(buf)?);
1727            }
1728            3u32 => {
1729                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1730                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1731                        field_number: 3u32,
1732                        expected: 2u8,
1733                        actual: tag.wire_type() as u8,
1734                    });
1735                }
1736                self.remove.push(::buffa::types::decode_string(buf)?);
1737            }
1738            _ => {
1739                self.__buffa_unknown_fields
1740                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1741            }
1742        }
1743        ::core::result::Result::Ok(())
1744    }
1745    fn clear(&mut self) {
1746        self.principal.clear();
1747        self.add.clear();
1748        self.remove.clear();
1749        self.__buffa_unknown_fields.clear();
1750    }
1751}
1752impl ::buffa::ExtensionSet for PermissionsChange {
1753    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.PermissionsChange";
1754    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1755        &self.__buffa_unknown_fields
1756    }
1757    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1758        &mut self.__buffa_unknown_fields
1759    }
1760}
1761impl ::buffa::json_helpers::ProtoElemJson for PermissionsChange {
1762    fn serialize_proto_json<S: ::serde::Serializer>(
1763        v: &Self,
1764        s: S,
1765    ) -> ::core::result::Result<S::Ok, S::Error> {
1766        ::serde::Serialize::serialize(v, s)
1767    }
1768    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1769        d: D,
1770    ) -> ::core::result::Result<Self, D::Error> {
1771        <Self as ::serde::Deserialize>::deserialize(d)
1772    }
1773}
1774#[doc(hidden)]
1775pub const __PERMISSIONS_CHANGE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1776    type_url: "type.googleapis.com/unitycatalog.shares.v1.PermissionsChange",
1777    to_json: ::buffa::type_registry::any_to_json::<PermissionsChange>,
1778    from_json: ::buffa::type_registry::any_from_json::<PermissionsChange>,
1779    is_wkt: false,
1780};
1781#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1782#[repr(i32)]
1783pub enum Action {
1784    /// Unspecified action.
1785    ACTION_UNSPECIFIED = 0i32,
1786    ADD = 1i32,
1787    REMOVE = 2i32,
1788    UPDATE = 3i32,
1789}
1790impl Action {
1791    ///Idiomatic alias for [`Self::ACTION_UNSPECIFIED`]; `Debug` prints the variant name.
1792    #[allow(non_upper_case_globals)]
1793    pub const ActionUnspecified: Self = Self::ACTION_UNSPECIFIED;
1794    ///Idiomatic alias for [`Self::ADD`]; `Debug` prints the variant name.
1795    #[allow(non_upper_case_globals)]
1796    pub const Add: Self = Self::ADD;
1797    ///Idiomatic alias for [`Self::REMOVE`]; `Debug` prints the variant name.
1798    #[allow(non_upper_case_globals)]
1799    pub const Remove: Self = Self::REMOVE;
1800    ///Idiomatic alias for [`Self::UPDATE`]; `Debug` prints the variant name.
1801    #[allow(non_upper_case_globals)]
1802    pub const Update: Self = Self::UPDATE;
1803}
1804impl ::core::default::Default for Action {
1805    fn default() -> Self {
1806        Self::ACTION_UNSPECIFIED
1807    }
1808}
1809impl ::serde::Serialize for Action {
1810    fn serialize<S: ::serde::Serializer>(
1811        &self,
1812        s: S,
1813    ) -> ::core::result::Result<S::Ok, S::Error> {
1814        s.serialize_str(::buffa::Enumeration::proto_name(self))
1815    }
1816}
1817impl<'de> ::serde::Deserialize<'de> for Action {
1818    fn deserialize<D: ::serde::Deserializer<'de>>(
1819        d: D,
1820    ) -> ::core::result::Result<Self, D::Error> {
1821        struct _V;
1822        impl ::serde::de::Visitor<'_> for _V {
1823            type Value = Action;
1824            fn expecting(
1825                &self,
1826                f: &mut ::core::fmt::Formatter<'_>,
1827            ) -> ::core::fmt::Result {
1828                f.write_str(
1829                    concat!("a string, integer, or null for ", stringify!(Action)),
1830                )
1831            }
1832            fn visit_str<E: ::serde::de::Error>(
1833                self,
1834                v: &str,
1835            ) -> ::core::result::Result<Action, E> {
1836                <Action as ::buffa::Enumeration>::from_proto_name(v)
1837                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1838            }
1839            fn visit_i64<E: ::serde::de::Error>(
1840                self,
1841                v: i64,
1842            ) -> ::core::result::Result<Action, E> {
1843                let v32 = i32::try_from(v)
1844                    .map_err(|_| {
1845                        ::serde::de::Error::custom(
1846                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1847                        )
1848                    })?;
1849                <Action as ::buffa::Enumeration>::from_i32(v32)
1850                    .ok_or_else(|| {
1851                        ::serde::de::Error::custom(
1852                            ::buffa::alloc::format!("unknown enum value {v32}"),
1853                        )
1854                    })
1855            }
1856            fn visit_u64<E: ::serde::de::Error>(
1857                self,
1858                v: u64,
1859            ) -> ::core::result::Result<Action, E> {
1860                let v32 = i32::try_from(v)
1861                    .map_err(|_| {
1862                        ::serde::de::Error::custom(
1863                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
1864                        )
1865                    })?;
1866                <Action as ::buffa::Enumeration>::from_i32(v32)
1867                    .ok_or_else(|| {
1868                        ::serde::de::Error::custom(
1869                            ::buffa::alloc::format!("unknown enum value {v32}"),
1870                        )
1871                    })
1872            }
1873            fn visit_unit<E: ::serde::de::Error>(
1874                self,
1875            ) -> ::core::result::Result<Action, E> {
1876                ::core::result::Result::Ok(::core::default::Default::default())
1877            }
1878        }
1879        d.deserialize_any(_V)
1880    }
1881}
1882impl ::buffa::json_helpers::ProtoElemJson for Action {
1883    fn serialize_proto_json<S: ::serde::Serializer>(
1884        v: &Self,
1885        s: S,
1886    ) -> ::core::result::Result<S::Ok, S::Error> {
1887        ::serde::Serialize::serialize(v, s)
1888    }
1889    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1890        d: D,
1891    ) -> ::core::result::Result<Self, D::Error> {
1892        <Self as ::serde::Deserialize>::deserialize(d)
1893    }
1894}
1895impl ::buffa::Enumeration for Action {
1896    fn from_i32(value: i32) -> ::core::option::Option<Self> {
1897        match value {
1898            0i32 => ::core::option::Option::Some(Self::ACTION_UNSPECIFIED),
1899            1i32 => ::core::option::Option::Some(Self::ADD),
1900            2i32 => ::core::option::Option::Some(Self::REMOVE),
1901            3i32 => ::core::option::Option::Some(Self::UPDATE),
1902            _ => ::core::option::Option::None,
1903        }
1904    }
1905    fn to_i32(&self) -> i32 {
1906        *self as i32
1907    }
1908    fn proto_name(&self) -> &'static str {
1909        match self {
1910            Self::ACTION_UNSPECIFIED => "ACTION_UNSPECIFIED",
1911            Self::ADD => "ADD",
1912            Self::REMOVE => "REMOVE",
1913            Self::UPDATE => "UPDATE",
1914        }
1915    }
1916    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1917        match name {
1918            "ACTION_UNSPECIFIED" => {
1919                ::core::option::Option::Some(Self::ACTION_UNSPECIFIED)
1920            }
1921            "ADD" => ::core::option::Option::Some(Self::ADD),
1922            "REMOVE" => ::core::option::Option::Some(Self::REMOVE),
1923            "UPDATE" => ::core::option::Option::Some(Self::UPDATE),
1924            _ => ::core::option::Option::None,
1925        }
1926    }
1927    fn values() -> &'static [Self] {
1928        &[Self::ACTION_UNSPECIFIED, Self::ADD, Self::REMOVE, Self::UPDATE]
1929    }
1930}
1931/// Request to list shares.
1932#[derive(Clone, PartialEq, Default)]
1933#[derive(::serde::Serialize, ::serde::Deserialize)]
1934#[serde(default)]
1935pub struct ListSharesRequest {
1936    /// The maximum number of results per page that should be returned.
1937    ///
1938    /// Field 1: `max_results`
1939    #[serde(
1940        rename = "max_results",
1941        alias = "maxResults",
1942        with = "::buffa::json_helpers::opt_int32",
1943        skip_serializing_if = "::core::option::Option::is_none"
1944    )]
1945    pub max_results: ::core::option::Option<i32>,
1946    /// Opaque pagination token to go to next page based on previous query.
1947    ///
1948    /// Field 2: `page_token`
1949    #[serde(
1950        rename = "page_token",
1951        alias = "pageToken",
1952        skip_serializing_if = "::core::option::Option::is_none"
1953    )]
1954    pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
1955    #[serde(skip)]
1956    #[doc(hidden)]
1957    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1958}
1959impl ::core::fmt::Debug for ListSharesRequest {
1960    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1961        f.debug_struct("ListSharesRequest")
1962            .field("max_results", &self.max_results)
1963            .field("page_token", &self.page_token)
1964            .finish()
1965    }
1966}
1967impl ListSharesRequest {
1968    /// Protobuf type URL for this message, for use with `Any::pack` and
1969    /// `Any::unpack_if`.
1970    ///
1971    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1972    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.ListSharesRequest";
1973}
1974impl ListSharesRequest {
1975    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1976    #[inline]
1977    ///Sets [`Self::max_results`] to `Some(value)`, consuming and returning `self`.
1978    pub fn with_max_results(mut self, value: i32) -> Self {
1979        self.max_results = Some(value);
1980        self
1981    }
1982    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1983    #[inline]
1984    ///Sets [`Self::page_token`] to `Some(value)`, consuming and returning `self`.
1985    pub fn with_page_token(
1986        mut self,
1987        value: impl Into<::buffa::alloc::string::String>,
1988    ) -> Self {
1989        self.page_token = Some(value.into());
1990        self
1991    }
1992}
1993impl ::buffa::DefaultInstance for ListSharesRequest {
1994    fn default_instance() -> &'static Self {
1995        static VALUE: ::buffa::__private::OnceBox<ListSharesRequest> = ::buffa::__private::OnceBox::new();
1996        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1997    }
1998}
1999impl ::buffa::MessageName for ListSharesRequest {
2000    const PACKAGE: &'static str = "unitycatalog.shares.v1";
2001    const NAME: &'static str = "ListSharesRequest";
2002    const FULL_NAME: &'static str = "unitycatalog.shares.v1.ListSharesRequest";
2003    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.ListSharesRequest";
2004}
2005impl ::buffa::Message for ListSharesRequest {
2006    /// Returns the total encoded size in bytes.
2007    ///
2008    /// The result is a `u32`; the protobuf specification requires all
2009    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2010    /// compliant message will never overflow this type.
2011    #[allow(clippy::let_and_return)]
2012    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2013        #[allow(unused_imports)]
2014        use ::buffa::Enumeration as _;
2015        let mut size = 0u32;
2016        if let Some(v) = self.max_results {
2017            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
2018        }
2019        if let Some(ref v) = self.page_token {
2020            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2021        }
2022        size += self.__buffa_unknown_fields.encoded_len() as u32;
2023        size
2024    }
2025    fn write_to(
2026        &self,
2027        _cache: &mut ::buffa::SizeCache,
2028        buf: &mut impl ::buffa::bytes::BufMut,
2029    ) {
2030        #[allow(unused_imports)]
2031        use ::buffa::Enumeration as _;
2032        if let Some(v) = self.max_results {
2033            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
2034                .encode(buf);
2035            ::buffa::types::encode_int32(v, buf);
2036        }
2037        if let Some(ref v) = self.page_token {
2038            ::buffa::encoding::Tag::new(
2039                    2u32,
2040                    ::buffa::encoding::WireType::LengthDelimited,
2041                )
2042                .encode(buf);
2043            ::buffa::types::encode_string(v, buf);
2044        }
2045        self.__buffa_unknown_fields.write_to(buf);
2046    }
2047    fn merge_field(
2048        &mut self,
2049        tag: ::buffa::encoding::Tag,
2050        buf: &mut impl ::buffa::bytes::Buf,
2051        depth: u32,
2052    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2053        #[allow(unused_imports)]
2054        use ::buffa::bytes::Buf as _;
2055        #[allow(unused_imports)]
2056        use ::buffa::Enumeration as _;
2057        match tag.field_number() {
2058            1u32 => {
2059                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2060                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2061                        field_number: 1u32,
2062                        expected: 0u8,
2063                        actual: tag.wire_type() as u8,
2064                    });
2065                }
2066                self.max_results = ::core::option::Option::Some(
2067                    ::buffa::types::decode_int32(buf)?,
2068                );
2069            }
2070            2u32 => {
2071                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2072                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2073                        field_number: 2u32,
2074                        expected: 2u8,
2075                        actual: tag.wire_type() as u8,
2076                    });
2077                }
2078                ::buffa::types::merge_string(
2079                    self
2080                        .page_token
2081                        .get_or_insert_with(::buffa::alloc::string::String::new),
2082                    buf,
2083                )?;
2084            }
2085            _ => {
2086                self.__buffa_unknown_fields
2087                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2088            }
2089        }
2090        ::core::result::Result::Ok(())
2091    }
2092    fn clear(&mut self) {
2093        self.max_results = ::core::option::Option::None;
2094        self.page_token = ::core::option::Option::None;
2095        self.__buffa_unknown_fields.clear();
2096    }
2097}
2098impl ::buffa::ExtensionSet for ListSharesRequest {
2099    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.ListSharesRequest";
2100    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2101        &self.__buffa_unknown_fields
2102    }
2103    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2104        &mut self.__buffa_unknown_fields
2105    }
2106}
2107impl ::buffa::json_helpers::ProtoElemJson for ListSharesRequest {
2108    fn serialize_proto_json<S: ::serde::Serializer>(
2109        v: &Self,
2110        s: S,
2111    ) -> ::core::result::Result<S::Ok, S::Error> {
2112        ::serde::Serialize::serialize(v, s)
2113    }
2114    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2115        d: D,
2116    ) -> ::core::result::Result<Self, D::Error> {
2117        <Self as ::serde::Deserialize>::deserialize(d)
2118    }
2119}
2120#[doc(hidden)]
2121pub const __LIST_SHARES_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2122    type_url: "type.googleapis.com/unitycatalog.shares.v1.ListSharesRequest",
2123    to_json: ::buffa::type_registry::any_to_json::<ListSharesRequest>,
2124    from_json: ::buffa::type_registry::any_from_json::<ListSharesRequest>,
2125    is_wkt: false,
2126};
2127/// Response to list shares.
2128#[derive(Clone, PartialEq, Default)]
2129#[derive(::serde::Serialize, ::serde::Deserialize)]
2130#[serde(default)]
2131pub struct ListSharesResponse {
2132    /// List of shares.
2133    ///
2134    /// Field 1: `shares`
2135    #[serde(
2136        rename = "shares",
2137        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2138        deserialize_with = "::buffa::json_helpers::null_as_default"
2139    )]
2140    pub shares: ::buffa::alloc::vec::Vec<Share>,
2141    /// Opaque pagination token to go to next page based on previous query.
2142    ///
2143    /// Field 2: `next_page_token`
2144    #[serde(
2145        rename = "next_page_token",
2146        alias = "nextPageToken",
2147        skip_serializing_if = "::core::option::Option::is_none"
2148    )]
2149    pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
2150    #[serde(skip)]
2151    #[doc(hidden)]
2152    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2153}
2154impl ::core::fmt::Debug for ListSharesResponse {
2155    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2156        f.debug_struct("ListSharesResponse")
2157            .field("shares", &self.shares)
2158            .field("next_page_token", &self.next_page_token)
2159            .finish()
2160    }
2161}
2162impl ListSharesResponse {
2163    /// Protobuf type URL for this message, for use with `Any::pack` and
2164    /// `Any::unpack_if`.
2165    ///
2166    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2167    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.ListSharesResponse";
2168}
2169impl ListSharesResponse {
2170    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2171    #[inline]
2172    ///Sets [`Self::next_page_token`] to `Some(value)`, consuming and returning `self`.
2173    pub fn with_next_page_token(
2174        mut self,
2175        value: impl Into<::buffa::alloc::string::String>,
2176    ) -> Self {
2177        self.next_page_token = Some(value.into());
2178        self
2179    }
2180}
2181impl ::buffa::DefaultInstance for ListSharesResponse {
2182    fn default_instance() -> &'static Self {
2183        static VALUE: ::buffa::__private::OnceBox<ListSharesResponse> = ::buffa::__private::OnceBox::new();
2184        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2185    }
2186}
2187impl ::buffa::MessageName for ListSharesResponse {
2188    const PACKAGE: &'static str = "unitycatalog.shares.v1";
2189    const NAME: &'static str = "ListSharesResponse";
2190    const FULL_NAME: &'static str = "unitycatalog.shares.v1.ListSharesResponse";
2191    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.ListSharesResponse";
2192}
2193impl ::buffa::Message for ListSharesResponse {
2194    /// Returns the total encoded size in bytes.
2195    ///
2196    /// The result is a `u32`; the protobuf specification requires all
2197    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2198    /// compliant message will never overflow this type.
2199    #[allow(clippy::let_and_return)]
2200    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2201        #[allow(unused_imports)]
2202        use ::buffa::Enumeration as _;
2203        let mut size = 0u32;
2204        for v in &self.shares {
2205            let __slot = __cache.reserve();
2206            let inner_size = v.compute_size(__cache);
2207            __cache.set(__slot, inner_size);
2208            size
2209                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2210                    + inner_size;
2211        }
2212        if let Some(ref v) = self.next_page_token {
2213            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2214        }
2215        size += self.__buffa_unknown_fields.encoded_len() as u32;
2216        size
2217    }
2218    fn write_to(
2219        &self,
2220        __cache: &mut ::buffa::SizeCache,
2221        buf: &mut impl ::buffa::bytes::BufMut,
2222    ) {
2223        #[allow(unused_imports)]
2224        use ::buffa::Enumeration as _;
2225        for v in &self.shares {
2226            ::buffa::encoding::Tag::new(
2227                    1u32,
2228                    ::buffa::encoding::WireType::LengthDelimited,
2229                )
2230                .encode(buf);
2231            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2232            v.write_to(__cache, buf);
2233        }
2234        if let Some(ref v) = self.next_page_token {
2235            ::buffa::encoding::Tag::new(
2236                    2u32,
2237                    ::buffa::encoding::WireType::LengthDelimited,
2238                )
2239                .encode(buf);
2240            ::buffa::types::encode_string(v, buf);
2241        }
2242        self.__buffa_unknown_fields.write_to(buf);
2243    }
2244    fn merge_field(
2245        &mut self,
2246        tag: ::buffa::encoding::Tag,
2247        buf: &mut impl ::buffa::bytes::Buf,
2248        depth: u32,
2249    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2250        #[allow(unused_imports)]
2251        use ::buffa::bytes::Buf as _;
2252        #[allow(unused_imports)]
2253        use ::buffa::Enumeration as _;
2254        match tag.field_number() {
2255            1u32 => {
2256                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2257                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2258                        field_number: 1u32,
2259                        expected: 2u8,
2260                        actual: tag.wire_type() as u8,
2261                    });
2262                }
2263                let mut elem = ::core::default::Default::default();
2264                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
2265                self.shares.push(elem);
2266            }
2267            2u32 => {
2268                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2269                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2270                        field_number: 2u32,
2271                        expected: 2u8,
2272                        actual: tag.wire_type() as u8,
2273                    });
2274                }
2275                ::buffa::types::merge_string(
2276                    self
2277                        .next_page_token
2278                        .get_or_insert_with(::buffa::alloc::string::String::new),
2279                    buf,
2280                )?;
2281            }
2282            _ => {
2283                self.__buffa_unknown_fields
2284                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2285            }
2286        }
2287        ::core::result::Result::Ok(())
2288    }
2289    fn clear(&mut self) {
2290        self.shares.clear();
2291        self.next_page_token = ::core::option::Option::None;
2292        self.__buffa_unknown_fields.clear();
2293    }
2294}
2295impl ::buffa::ExtensionSet for ListSharesResponse {
2296    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.ListSharesResponse";
2297    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2298        &self.__buffa_unknown_fields
2299    }
2300    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2301        &mut self.__buffa_unknown_fields
2302    }
2303}
2304impl ::buffa::json_helpers::ProtoElemJson for ListSharesResponse {
2305    fn serialize_proto_json<S: ::serde::Serializer>(
2306        v: &Self,
2307        s: S,
2308    ) -> ::core::result::Result<S::Ok, S::Error> {
2309        ::serde::Serialize::serialize(v, s)
2310    }
2311    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2312        d: D,
2313    ) -> ::core::result::Result<Self, D::Error> {
2314        <Self as ::serde::Deserialize>::deserialize(d)
2315    }
2316}
2317#[doc(hidden)]
2318pub const __LIST_SHARES_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2319    type_url: "type.googleapis.com/unitycatalog.shares.v1.ListSharesResponse",
2320    to_json: ::buffa::type_registry::any_to_json::<ListSharesResponse>,
2321    from_json: ::buffa::type_registry::any_from_json::<ListSharesResponse>,
2322    is_wkt: false,
2323};
2324/// Creates a new share for data objects.
2325///
2326/// Data objects can be added after creation with update.
2327/// The caller must be a metastore admin or have the CREATE_SHARE privilege on the metastore.
2328#[derive(Clone, PartialEq, Default)]
2329#[derive(::serde::Serialize, ::serde::Deserialize)]
2330#[serde(default)]
2331pub struct CreateShareRequest {
2332    /// Name of the share.
2333    ///
2334    /// Field 1: `name`
2335    #[serde(
2336        rename = "name",
2337        with = "::buffa::json_helpers::proto_string",
2338        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2339    )]
2340    pub name: ::buffa::alloc::string::String,
2341    /// User-provided free-form text description.
2342    ///
2343    /// Field 2: `comment`
2344    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
2345    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
2346    #[serde(skip)]
2347    #[doc(hidden)]
2348    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2349}
2350impl ::core::fmt::Debug for CreateShareRequest {
2351    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2352        f.debug_struct("CreateShareRequest")
2353            .field("name", &self.name)
2354            .field("comment", &self.comment)
2355            .finish()
2356    }
2357}
2358impl CreateShareRequest {
2359    /// Protobuf type URL for this message, for use with `Any::pack` and
2360    /// `Any::unpack_if`.
2361    ///
2362    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2363    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.CreateShareRequest";
2364}
2365impl CreateShareRequest {
2366    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2367    #[inline]
2368    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
2369    pub fn with_comment(
2370        mut self,
2371        value: impl Into<::buffa::alloc::string::String>,
2372    ) -> Self {
2373        self.comment = Some(value.into());
2374        self
2375    }
2376}
2377impl ::buffa::DefaultInstance for CreateShareRequest {
2378    fn default_instance() -> &'static Self {
2379        static VALUE: ::buffa::__private::OnceBox<CreateShareRequest> = ::buffa::__private::OnceBox::new();
2380        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2381    }
2382}
2383impl ::buffa::MessageName for CreateShareRequest {
2384    const PACKAGE: &'static str = "unitycatalog.shares.v1";
2385    const NAME: &'static str = "CreateShareRequest";
2386    const FULL_NAME: &'static str = "unitycatalog.shares.v1.CreateShareRequest";
2387    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.CreateShareRequest";
2388}
2389impl ::buffa::Message for CreateShareRequest {
2390    /// Returns the total encoded size in bytes.
2391    ///
2392    /// The result is a `u32`; the protobuf specification requires all
2393    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2394    /// compliant message will never overflow this type.
2395    #[allow(clippy::let_and_return)]
2396    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2397        #[allow(unused_imports)]
2398        use ::buffa::Enumeration as _;
2399        let mut size = 0u32;
2400        if !self.name.is_empty() {
2401            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2402        }
2403        if let Some(ref v) = self.comment {
2404            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2405        }
2406        size += self.__buffa_unknown_fields.encoded_len() as u32;
2407        size
2408    }
2409    fn write_to(
2410        &self,
2411        _cache: &mut ::buffa::SizeCache,
2412        buf: &mut impl ::buffa::bytes::BufMut,
2413    ) {
2414        #[allow(unused_imports)]
2415        use ::buffa::Enumeration as _;
2416        if !self.name.is_empty() {
2417            ::buffa::encoding::Tag::new(
2418                    1u32,
2419                    ::buffa::encoding::WireType::LengthDelimited,
2420                )
2421                .encode(buf);
2422            ::buffa::types::encode_string(&self.name, buf);
2423        }
2424        if let Some(ref v) = self.comment {
2425            ::buffa::encoding::Tag::new(
2426                    2u32,
2427                    ::buffa::encoding::WireType::LengthDelimited,
2428                )
2429                .encode(buf);
2430            ::buffa::types::encode_string(v, buf);
2431        }
2432        self.__buffa_unknown_fields.write_to(buf);
2433    }
2434    fn merge_field(
2435        &mut self,
2436        tag: ::buffa::encoding::Tag,
2437        buf: &mut impl ::buffa::bytes::Buf,
2438        depth: u32,
2439    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2440        #[allow(unused_imports)]
2441        use ::buffa::bytes::Buf as _;
2442        #[allow(unused_imports)]
2443        use ::buffa::Enumeration as _;
2444        match tag.field_number() {
2445            1u32 => {
2446                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2447                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2448                        field_number: 1u32,
2449                        expected: 2u8,
2450                        actual: tag.wire_type() as u8,
2451                    });
2452                }
2453                ::buffa::types::merge_string(&mut self.name, buf)?;
2454            }
2455            2u32 => {
2456                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2457                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2458                        field_number: 2u32,
2459                        expected: 2u8,
2460                        actual: tag.wire_type() as u8,
2461                    });
2462                }
2463                ::buffa::types::merge_string(
2464                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
2465                    buf,
2466                )?;
2467            }
2468            _ => {
2469                self.__buffa_unknown_fields
2470                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2471            }
2472        }
2473        ::core::result::Result::Ok(())
2474    }
2475    fn clear(&mut self) {
2476        self.name.clear();
2477        self.comment = ::core::option::Option::None;
2478        self.__buffa_unknown_fields.clear();
2479    }
2480}
2481impl ::buffa::ExtensionSet for CreateShareRequest {
2482    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.CreateShareRequest";
2483    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2484        &self.__buffa_unknown_fields
2485    }
2486    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2487        &mut self.__buffa_unknown_fields
2488    }
2489}
2490impl ::buffa::json_helpers::ProtoElemJson for CreateShareRequest {
2491    fn serialize_proto_json<S: ::serde::Serializer>(
2492        v: &Self,
2493        s: S,
2494    ) -> ::core::result::Result<S::Ok, S::Error> {
2495        ::serde::Serialize::serialize(v, s)
2496    }
2497    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2498        d: D,
2499    ) -> ::core::result::Result<Self, D::Error> {
2500        <Self as ::serde::Deserialize>::deserialize(d)
2501    }
2502}
2503#[doc(hidden)]
2504pub const __CREATE_SHARE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2505    type_url: "type.googleapis.com/unitycatalog.shares.v1.CreateShareRequest",
2506    to_json: ::buffa::type_registry::any_to_json::<CreateShareRequest>,
2507    from_json: ::buffa::type_registry::any_from_json::<CreateShareRequest>,
2508    is_wkt: false,
2509};
2510/// Get a share by name.
2511#[derive(Clone, PartialEq, Default)]
2512#[derive(::serde::Serialize, ::serde::Deserialize)]
2513#[serde(default)]
2514pub struct GetShareRequest {
2515    /// Name of the share.
2516    ///
2517    /// Field 1: `name`
2518    #[serde(
2519        rename = "name",
2520        with = "::buffa::json_helpers::proto_string",
2521        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2522    )]
2523    pub name: ::buffa::alloc::string::String,
2524    /// Query for data to include in the share.
2525    ///
2526    /// Field 2: `include_shared_data`
2527    #[serde(
2528        rename = "include_shared_data",
2529        alias = "includeSharedData",
2530        skip_serializing_if = "::core::option::Option::is_none"
2531    )]
2532    pub include_shared_data: ::core::option::Option<bool>,
2533    #[serde(skip)]
2534    #[doc(hidden)]
2535    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2536}
2537impl ::core::fmt::Debug for GetShareRequest {
2538    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2539        f.debug_struct("GetShareRequest")
2540            .field("name", &self.name)
2541            .field("include_shared_data", &self.include_shared_data)
2542            .finish()
2543    }
2544}
2545impl GetShareRequest {
2546    /// Protobuf type URL for this message, for use with `Any::pack` and
2547    /// `Any::unpack_if`.
2548    ///
2549    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2550    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetShareRequest";
2551}
2552impl GetShareRequest {
2553    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2554    #[inline]
2555    ///Sets [`Self::include_shared_data`] to `Some(value)`, consuming and returning `self`.
2556    pub fn with_include_shared_data(mut self, value: bool) -> Self {
2557        self.include_shared_data = Some(value);
2558        self
2559    }
2560}
2561impl ::buffa::DefaultInstance for GetShareRequest {
2562    fn default_instance() -> &'static Self {
2563        static VALUE: ::buffa::__private::OnceBox<GetShareRequest> = ::buffa::__private::OnceBox::new();
2564        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2565    }
2566}
2567impl ::buffa::MessageName for GetShareRequest {
2568    const PACKAGE: &'static str = "unitycatalog.shares.v1";
2569    const NAME: &'static str = "GetShareRequest";
2570    const FULL_NAME: &'static str = "unitycatalog.shares.v1.GetShareRequest";
2571    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetShareRequest";
2572}
2573impl ::buffa::Message for GetShareRequest {
2574    /// Returns the total encoded size in bytes.
2575    ///
2576    /// The result is a `u32`; the protobuf specification requires all
2577    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2578    /// compliant message will never overflow this type.
2579    #[allow(clippy::let_and_return)]
2580    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2581        #[allow(unused_imports)]
2582        use ::buffa::Enumeration as _;
2583        let mut size = 0u32;
2584        if !self.name.is_empty() {
2585            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2586        }
2587        if self.include_shared_data.is_some() {
2588            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2589        }
2590        size += self.__buffa_unknown_fields.encoded_len() as u32;
2591        size
2592    }
2593    fn write_to(
2594        &self,
2595        _cache: &mut ::buffa::SizeCache,
2596        buf: &mut impl ::buffa::bytes::BufMut,
2597    ) {
2598        #[allow(unused_imports)]
2599        use ::buffa::Enumeration as _;
2600        if !self.name.is_empty() {
2601            ::buffa::encoding::Tag::new(
2602                    1u32,
2603                    ::buffa::encoding::WireType::LengthDelimited,
2604                )
2605                .encode(buf);
2606            ::buffa::types::encode_string(&self.name, buf);
2607        }
2608        if let Some(v) = self.include_shared_data {
2609            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
2610                .encode(buf);
2611            ::buffa::types::encode_bool(v, buf);
2612        }
2613        self.__buffa_unknown_fields.write_to(buf);
2614    }
2615    fn merge_field(
2616        &mut self,
2617        tag: ::buffa::encoding::Tag,
2618        buf: &mut impl ::buffa::bytes::Buf,
2619        depth: u32,
2620    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2621        #[allow(unused_imports)]
2622        use ::buffa::bytes::Buf as _;
2623        #[allow(unused_imports)]
2624        use ::buffa::Enumeration as _;
2625        match tag.field_number() {
2626            1u32 => {
2627                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2628                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2629                        field_number: 1u32,
2630                        expected: 2u8,
2631                        actual: tag.wire_type() as u8,
2632                    });
2633                }
2634                ::buffa::types::merge_string(&mut self.name, buf)?;
2635            }
2636            2u32 => {
2637                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2638                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2639                        field_number: 2u32,
2640                        expected: 0u8,
2641                        actual: tag.wire_type() as u8,
2642                    });
2643                }
2644                self.include_shared_data = ::core::option::Option::Some(
2645                    ::buffa::types::decode_bool(buf)?,
2646                );
2647            }
2648            _ => {
2649                self.__buffa_unknown_fields
2650                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2651            }
2652        }
2653        ::core::result::Result::Ok(())
2654    }
2655    fn clear(&mut self) {
2656        self.name.clear();
2657        self.include_shared_data = ::core::option::Option::None;
2658        self.__buffa_unknown_fields.clear();
2659    }
2660}
2661impl ::buffa::ExtensionSet for GetShareRequest {
2662    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.GetShareRequest";
2663    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2664        &self.__buffa_unknown_fields
2665    }
2666    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2667        &mut self.__buffa_unknown_fields
2668    }
2669}
2670impl ::buffa::json_helpers::ProtoElemJson for GetShareRequest {
2671    fn serialize_proto_json<S: ::serde::Serializer>(
2672        v: &Self,
2673        s: S,
2674    ) -> ::core::result::Result<S::Ok, S::Error> {
2675        ::serde::Serialize::serialize(v, s)
2676    }
2677    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2678        d: D,
2679    ) -> ::core::result::Result<Self, D::Error> {
2680        <Self as ::serde::Deserialize>::deserialize(d)
2681    }
2682}
2683#[doc(hidden)]
2684pub const __GET_SHARE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2685    type_url: "type.googleapis.com/unitycatalog.shares.v1.GetShareRequest",
2686    to_json: ::buffa::type_registry::any_to_json::<GetShareRequest>,
2687    from_json: ::buffa::type_registry::any_from_json::<GetShareRequest>,
2688    is_wkt: false,
2689};
2690/// Data object update.
2691#[derive(Clone, PartialEq, Default)]
2692#[derive(::serde::Serialize, ::serde::Deserialize)]
2693#[serde(default)]
2694pub struct DataObjectUpdate {
2695    /// Name of the share.
2696    ///
2697    /// Field 1: `action`
2698    #[serde(
2699        rename = "action",
2700        with = "::buffa::json_helpers::proto_enum",
2701        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2702    )]
2703    pub action: ::buffa::EnumValue<Action>,
2704    /// User-provided free-form text description.
2705    ///
2706    /// Field 2: `data_object`
2707    #[serde(
2708        rename = "data_object",
2709        alias = "dataObject",
2710        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2711    )]
2712    pub data_object: ::buffa::MessageField<DataObject>,
2713    #[serde(skip)]
2714    #[doc(hidden)]
2715    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2716}
2717impl ::core::fmt::Debug for DataObjectUpdate {
2718    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2719        f.debug_struct("DataObjectUpdate")
2720            .field("action", &self.action)
2721            .field("data_object", &self.data_object)
2722            .finish()
2723    }
2724}
2725impl DataObjectUpdate {
2726    /// Protobuf type URL for this message, for use with `Any::pack` and
2727    /// `Any::unpack_if`.
2728    ///
2729    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2730    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DataObjectUpdate";
2731}
2732impl ::buffa::DefaultInstance for DataObjectUpdate {
2733    fn default_instance() -> &'static Self {
2734        static VALUE: ::buffa::__private::OnceBox<DataObjectUpdate> = ::buffa::__private::OnceBox::new();
2735        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2736    }
2737}
2738impl ::buffa::MessageName for DataObjectUpdate {
2739    const PACKAGE: &'static str = "unitycatalog.shares.v1";
2740    const NAME: &'static str = "DataObjectUpdate";
2741    const FULL_NAME: &'static str = "unitycatalog.shares.v1.DataObjectUpdate";
2742    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DataObjectUpdate";
2743}
2744impl ::buffa::Message for DataObjectUpdate {
2745    /// Returns the total encoded size in bytes.
2746    ///
2747    /// The result is a `u32`; the protobuf specification requires all
2748    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2749    /// compliant message will never overflow this type.
2750    #[allow(clippy::let_and_return)]
2751    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2752        #[allow(unused_imports)]
2753        use ::buffa::Enumeration as _;
2754        let mut size = 0u32;
2755        {
2756            let val = self.action.to_i32();
2757            if val != 0 {
2758                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2759            }
2760        }
2761        if self.data_object.is_set() {
2762            let __slot = __cache.reserve();
2763            let inner_size = self.data_object.compute_size(__cache);
2764            __cache.set(__slot, inner_size);
2765            size
2766                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2767                    + inner_size;
2768        }
2769        size += self.__buffa_unknown_fields.encoded_len() as u32;
2770        size
2771    }
2772    fn write_to(
2773        &self,
2774        __cache: &mut ::buffa::SizeCache,
2775        buf: &mut impl ::buffa::bytes::BufMut,
2776    ) {
2777        #[allow(unused_imports)]
2778        use ::buffa::Enumeration as _;
2779        {
2780            let val = self.action.to_i32();
2781            if val != 0 {
2782                ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
2783                    .encode(buf);
2784                ::buffa::types::encode_int32(val, buf);
2785            }
2786        }
2787        if self.data_object.is_set() {
2788            ::buffa::encoding::Tag::new(
2789                    2u32,
2790                    ::buffa::encoding::WireType::LengthDelimited,
2791                )
2792                .encode(buf);
2793            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2794            self.data_object.write_to(__cache, buf);
2795        }
2796        self.__buffa_unknown_fields.write_to(buf);
2797    }
2798    fn merge_field(
2799        &mut self,
2800        tag: ::buffa::encoding::Tag,
2801        buf: &mut impl ::buffa::bytes::Buf,
2802        depth: u32,
2803    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2804        #[allow(unused_imports)]
2805        use ::buffa::bytes::Buf as _;
2806        #[allow(unused_imports)]
2807        use ::buffa::Enumeration as _;
2808        match tag.field_number() {
2809            1u32 => {
2810                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2811                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2812                        field_number: 1u32,
2813                        expected: 0u8,
2814                        actual: tag.wire_type() as u8,
2815                    });
2816                }
2817                self.action = ::buffa::EnumValue::from(
2818                    ::buffa::types::decode_int32(buf)?,
2819                );
2820            }
2821            2u32 => {
2822                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2823                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2824                        field_number: 2u32,
2825                        expected: 2u8,
2826                        actual: tag.wire_type() as u8,
2827                    });
2828                }
2829                ::buffa::Message::merge_length_delimited(
2830                    self.data_object.get_or_insert_default(),
2831                    buf,
2832                    depth,
2833                )?;
2834            }
2835            _ => {
2836                self.__buffa_unknown_fields
2837                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2838            }
2839        }
2840        ::core::result::Result::Ok(())
2841    }
2842    fn clear(&mut self) {
2843        self.action = ::buffa::EnumValue::from(0);
2844        self.data_object = ::buffa::MessageField::none();
2845        self.__buffa_unknown_fields.clear();
2846    }
2847}
2848impl ::buffa::ExtensionSet for DataObjectUpdate {
2849    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.DataObjectUpdate";
2850    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2851        &self.__buffa_unknown_fields
2852    }
2853    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2854        &mut self.__buffa_unknown_fields
2855    }
2856}
2857impl ::buffa::json_helpers::ProtoElemJson for DataObjectUpdate {
2858    fn serialize_proto_json<S: ::serde::Serializer>(
2859        v: &Self,
2860        s: S,
2861    ) -> ::core::result::Result<S::Ok, S::Error> {
2862        ::serde::Serialize::serialize(v, s)
2863    }
2864    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2865        d: D,
2866    ) -> ::core::result::Result<Self, D::Error> {
2867        <Self as ::serde::Deserialize>::deserialize(d)
2868    }
2869}
2870#[doc(hidden)]
2871pub const __DATA_OBJECT_UPDATE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2872    type_url: "type.googleapis.com/unitycatalog.shares.v1.DataObjectUpdate",
2873    to_json: ::buffa::type_registry::any_to_json::<DataObjectUpdate>,
2874    from_json: ::buffa::type_registry::any_from_json::<DataObjectUpdate>,
2875    is_wkt: false,
2876};
2877/// Update a share.
2878///
2879/// The caller must be a metastore admin or have the UPDATE_SHARE privilege on the metastore.
2880#[derive(Clone, PartialEq, Default)]
2881#[derive(::serde::Serialize, ::serde::Deserialize)]
2882#[serde(default)]
2883pub struct UpdateShareRequest {
2884    /// Name of the share.
2885    ///
2886    /// Field 1: `name`
2887    #[serde(
2888        rename = "name",
2889        with = "::buffa::json_helpers::proto_string",
2890        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2891    )]
2892    pub name: ::buffa::alloc::string::String,
2893    /// Array of shared data object updates.
2894    ///
2895    /// Field 2: `updates`
2896    #[serde(
2897        rename = "updates",
2898        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2899        deserialize_with = "::buffa::json_helpers::null_as_default"
2900    )]
2901    pub updates: ::buffa::alloc::vec::Vec<DataObjectUpdate>,
2902    /// A new name for the share.
2903    ///
2904    /// Field 3: `new_name`
2905    #[serde(
2906        rename = "new_name",
2907        alias = "newName",
2908        skip_serializing_if = "::core::option::Option::is_none"
2909    )]
2910    pub new_name: ::core::option::Option<::buffa::alloc::string::String>,
2911    /// Owner of the share.
2912    ///
2913    /// Field 4: `owner`
2914    #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
2915    pub owner: ::core::option::Option<::buffa::alloc::string::String>,
2916    /// User-provided free-form text description.
2917    ///
2918    /// Field 5: `comment`
2919    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
2920    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
2921    #[serde(skip)]
2922    #[doc(hidden)]
2923    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2924}
2925impl ::core::fmt::Debug for UpdateShareRequest {
2926    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2927        f.debug_struct("UpdateShareRequest")
2928            .field("name", &self.name)
2929            .field("updates", &self.updates)
2930            .field("new_name", &self.new_name)
2931            .field("owner", &self.owner)
2932            .field("comment", &self.comment)
2933            .finish()
2934    }
2935}
2936impl UpdateShareRequest {
2937    /// Protobuf type URL for this message, for use with `Any::pack` and
2938    /// `Any::unpack_if`.
2939    ///
2940    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2941    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdateShareRequest";
2942}
2943impl UpdateShareRequest {
2944    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2945    #[inline]
2946    ///Sets [`Self::new_name`] to `Some(value)`, consuming and returning `self`.
2947    pub fn with_new_name(
2948        mut self,
2949        value: impl Into<::buffa::alloc::string::String>,
2950    ) -> Self {
2951        self.new_name = Some(value.into());
2952        self
2953    }
2954    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2955    #[inline]
2956    ///Sets [`Self::owner`] to `Some(value)`, consuming and returning `self`.
2957    pub fn with_owner(
2958        mut self,
2959        value: impl Into<::buffa::alloc::string::String>,
2960    ) -> Self {
2961        self.owner = Some(value.into());
2962        self
2963    }
2964    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2965    #[inline]
2966    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
2967    pub fn with_comment(
2968        mut self,
2969        value: impl Into<::buffa::alloc::string::String>,
2970    ) -> Self {
2971        self.comment = Some(value.into());
2972        self
2973    }
2974}
2975impl ::buffa::DefaultInstance for UpdateShareRequest {
2976    fn default_instance() -> &'static Self {
2977        static VALUE: ::buffa::__private::OnceBox<UpdateShareRequest> = ::buffa::__private::OnceBox::new();
2978        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2979    }
2980}
2981impl ::buffa::MessageName for UpdateShareRequest {
2982    const PACKAGE: &'static str = "unitycatalog.shares.v1";
2983    const NAME: &'static str = "UpdateShareRequest";
2984    const FULL_NAME: &'static str = "unitycatalog.shares.v1.UpdateShareRequest";
2985    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdateShareRequest";
2986}
2987impl ::buffa::Message for UpdateShareRequest {
2988    /// Returns the total encoded size in bytes.
2989    ///
2990    /// The result is a `u32`; the protobuf specification requires all
2991    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2992    /// compliant message will never overflow this type.
2993    #[allow(clippy::let_and_return)]
2994    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2995        #[allow(unused_imports)]
2996        use ::buffa::Enumeration as _;
2997        let mut size = 0u32;
2998        if !self.name.is_empty() {
2999            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
3000        }
3001        for v in &self.updates {
3002            let __slot = __cache.reserve();
3003            let inner_size = v.compute_size(__cache);
3004            __cache.set(__slot, inner_size);
3005            size
3006                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3007                    + inner_size;
3008        }
3009        if let Some(ref v) = self.new_name {
3010            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3011        }
3012        if let Some(ref v) = self.owner {
3013            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3014        }
3015        if let Some(ref v) = self.comment {
3016            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3017        }
3018        size += self.__buffa_unknown_fields.encoded_len() as u32;
3019        size
3020    }
3021    fn write_to(
3022        &self,
3023        __cache: &mut ::buffa::SizeCache,
3024        buf: &mut impl ::buffa::bytes::BufMut,
3025    ) {
3026        #[allow(unused_imports)]
3027        use ::buffa::Enumeration as _;
3028        if !self.name.is_empty() {
3029            ::buffa::encoding::Tag::new(
3030                    1u32,
3031                    ::buffa::encoding::WireType::LengthDelimited,
3032                )
3033                .encode(buf);
3034            ::buffa::types::encode_string(&self.name, buf);
3035        }
3036        for v in &self.updates {
3037            ::buffa::encoding::Tag::new(
3038                    2u32,
3039                    ::buffa::encoding::WireType::LengthDelimited,
3040                )
3041                .encode(buf);
3042            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3043            v.write_to(__cache, buf);
3044        }
3045        if let Some(ref v) = self.new_name {
3046            ::buffa::encoding::Tag::new(
3047                    3u32,
3048                    ::buffa::encoding::WireType::LengthDelimited,
3049                )
3050                .encode(buf);
3051            ::buffa::types::encode_string(v, buf);
3052        }
3053        if let Some(ref v) = self.owner {
3054            ::buffa::encoding::Tag::new(
3055                    4u32,
3056                    ::buffa::encoding::WireType::LengthDelimited,
3057                )
3058                .encode(buf);
3059            ::buffa::types::encode_string(v, buf);
3060        }
3061        if let Some(ref v) = self.comment {
3062            ::buffa::encoding::Tag::new(
3063                    5u32,
3064                    ::buffa::encoding::WireType::LengthDelimited,
3065                )
3066                .encode(buf);
3067            ::buffa::types::encode_string(v, buf);
3068        }
3069        self.__buffa_unknown_fields.write_to(buf);
3070    }
3071    fn merge_field(
3072        &mut self,
3073        tag: ::buffa::encoding::Tag,
3074        buf: &mut impl ::buffa::bytes::Buf,
3075        depth: u32,
3076    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3077        #[allow(unused_imports)]
3078        use ::buffa::bytes::Buf as _;
3079        #[allow(unused_imports)]
3080        use ::buffa::Enumeration as _;
3081        match tag.field_number() {
3082            1u32 => {
3083                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3084                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3085                        field_number: 1u32,
3086                        expected: 2u8,
3087                        actual: tag.wire_type() as u8,
3088                    });
3089                }
3090                ::buffa::types::merge_string(&mut self.name, buf)?;
3091            }
3092            2u32 => {
3093                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3094                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3095                        field_number: 2u32,
3096                        expected: 2u8,
3097                        actual: tag.wire_type() as u8,
3098                    });
3099                }
3100                let mut elem = ::core::default::Default::default();
3101                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3102                self.updates.push(elem);
3103            }
3104            3u32 => {
3105                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3106                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3107                        field_number: 3u32,
3108                        expected: 2u8,
3109                        actual: tag.wire_type() as u8,
3110                    });
3111                }
3112                ::buffa::types::merge_string(
3113                    self
3114                        .new_name
3115                        .get_or_insert_with(::buffa::alloc::string::String::new),
3116                    buf,
3117                )?;
3118            }
3119            4u32 => {
3120                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3121                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3122                        field_number: 4u32,
3123                        expected: 2u8,
3124                        actual: tag.wire_type() as u8,
3125                    });
3126                }
3127                ::buffa::types::merge_string(
3128                    self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
3129                    buf,
3130                )?;
3131            }
3132            5u32 => {
3133                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3134                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3135                        field_number: 5u32,
3136                        expected: 2u8,
3137                        actual: tag.wire_type() as u8,
3138                    });
3139                }
3140                ::buffa::types::merge_string(
3141                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
3142                    buf,
3143                )?;
3144            }
3145            _ => {
3146                self.__buffa_unknown_fields
3147                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3148            }
3149        }
3150        ::core::result::Result::Ok(())
3151    }
3152    fn clear(&mut self) {
3153        self.name.clear();
3154        self.updates.clear();
3155        self.new_name = ::core::option::Option::None;
3156        self.owner = ::core::option::Option::None;
3157        self.comment = ::core::option::Option::None;
3158        self.__buffa_unknown_fields.clear();
3159    }
3160}
3161impl ::buffa::ExtensionSet for UpdateShareRequest {
3162    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.UpdateShareRequest";
3163    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3164        &self.__buffa_unknown_fields
3165    }
3166    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3167        &mut self.__buffa_unknown_fields
3168    }
3169}
3170impl ::buffa::json_helpers::ProtoElemJson for UpdateShareRequest {
3171    fn serialize_proto_json<S: ::serde::Serializer>(
3172        v: &Self,
3173        s: S,
3174    ) -> ::core::result::Result<S::Ok, S::Error> {
3175        ::serde::Serialize::serialize(v, s)
3176    }
3177    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3178        d: D,
3179    ) -> ::core::result::Result<Self, D::Error> {
3180        <Self as ::serde::Deserialize>::deserialize(d)
3181    }
3182}
3183#[doc(hidden)]
3184pub const __UPDATE_SHARE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3185    type_url: "type.googleapis.com/unitycatalog.shares.v1.UpdateShareRequest",
3186    to_json: ::buffa::type_registry::any_to_json::<UpdateShareRequest>,
3187    from_json: ::buffa::type_registry::any_from_json::<UpdateShareRequest>,
3188    is_wkt: false,
3189};
3190/// Delete a share.
3191///
3192/// The caller must be a metastore admin or have the DELETE_SHARE privilege on the metastore.
3193#[derive(Clone, PartialEq, Default)]
3194#[derive(::serde::Serialize, ::serde::Deserialize)]
3195#[serde(default)]
3196pub struct DeleteShareRequest {
3197    /// Name of the share.
3198    ///
3199    /// Field 1: `name`
3200    #[serde(
3201        rename = "name",
3202        with = "::buffa::json_helpers::proto_string",
3203        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3204    )]
3205    pub name: ::buffa::alloc::string::String,
3206    #[serde(skip)]
3207    #[doc(hidden)]
3208    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3209}
3210impl ::core::fmt::Debug for DeleteShareRequest {
3211    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3212        f.debug_struct("DeleteShareRequest").field("name", &self.name).finish()
3213    }
3214}
3215impl DeleteShareRequest {
3216    /// Protobuf type URL for this message, for use with `Any::pack` and
3217    /// `Any::unpack_if`.
3218    ///
3219    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3220    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DeleteShareRequest";
3221}
3222impl ::buffa::DefaultInstance for DeleteShareRequest {
3223    fn default_instance() -> &'static Self {
3224        static VALUE: ::buffa::__private::OnceBox<DeleteShareRequest> = ::buffa::__private::OnceBox::new();
3225        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3226    }
3227}
3228impl ::buffa::MessageName for DeleteShareRequest {
3229    const PACKAGE: &'static str = "unitycatalog.shares.v1";
3230    const NAME: &'static str = "DeleteShareRequest";
3231    const FULL_NAME: &'static str = "unitycatalog.shares.v1.DeleteShareRequest";
3232    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DeleteShareRequest";
3233}
3234impl ::buffa::Message for DeleteShareRequest {
3235    /// Returns the total encoded size in bytes.
3236    ///
3237    /// The result is a `u32`; the protobuf specification requires all
3238    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3239    /// compliant message will never overflow this type.
3240    #[allow(clippy::let_and_return)]
3241    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3242        #[allow(unused_imports)]
3243        use ::buffa::Enumeration as _;
3244        let mut size = 0u32;
3245        if !self.name.is_empty() {
3246            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
3247        }
3248        size += self.__buffa_unknown_fields.encoded_len() as u32;
3249        size
3250    }
3251    fn write_to(
3252        &self,
3253        _cache: &mut ::buffa::SizeCache,
3254        buf: &mut impl ::buffa::bytes::BufMut,
3255    ) {
3256        #[allow(unused_imports)]
3257        use ::buffa::Enumeration as _;
3258        if !self.name.is_empty() {
3259            ::buffa::encoding::Tag::new(
3260                    1u32,
3261                    ::buffa::encoding::WireType::LengthDelimited,
3262                )
3263                .encode(buf);
3264            ::buffa::types::encode_string(&self.name, buf);
3265        }
3266        self.__buffa_unknown_fields.write_to(buf);
3267    }
3268    fn merge_field(
3269        &mut self,
3270        tag: ::buffa::encoding::Tag,
3271        buf: &mut impl ::buffa::bytes::Buf,
3272        depth: u32,
3273    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3274        #[allow(unused_imports)]
3275        use ::buffa::bytes::Buf as _;
3276        #[allow(unused_imports)]
3277        use ::buffa::Enumeration as _;
3278        match tag.field_number() {
3279            1u32 => {
3280                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3281                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3282                        field_number: 1u32,
3283                        expected: 2u8,
3284                        actual: tag.wire_type() as u8,
3285                    });
3286                }
3287                ::buffa::types::merge_string(&mut self.name, buf)?;
3288            }
3289            _ => {
3290                self.__buffa_unknown_fields
3291                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3292            }
3293        }
3294        ::core::result::Result::Ok(())
3295    }
3296    fn clear(&mut self) {
3297        self.name.clear();
3298        self.__buffa_unknown_fields.clear();
3299    }
3300}
3301impl ::buffa::ExtensionSet for DeleteShareRequest {
3302    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.DeleteShareRequest";
3303    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3304        &self.__buffa_unknown_fields
3305    }
3306    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3307        &mut self.__buffa_unknown_fields
3308    }
3309}
3310impl ::buffa::json_helpers::ProtoElemJson for DeleteShareRequest {
3311    fn serialize_proto_json<S: ::serde::Serializer>(
3312        v: &Self,
3313        s: S,
3314    ) -> ::core::result::Result<S::Ok, S::Error> {
3315        ::serde::Serialize::serialize(v, s)
3316    }
3317    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3318        d: D,
3319    ) -> ::core::result::Result<Self, D::Error> {
3320        <Self as ::serde::Deserialize>::deserialize(d)
3321    }
3322}
3323#[doc(hidden)]
3324pub const __DELETE_SHARE_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3325    type_url: "type.googleapis.com/unitycatalog.shares.v1.DeleteShareRequest",
3326    to_json: ::buffa::type_registry::any_to_json::<DeleteShareRequest>,
3327    from_json: ::buffa::type_registry::any_from_json::<DeleteShareRequest>,
3328    is_wkt: false,
3329};
3330/// Get permissions for a data share.
3331#[derive(Clone, PartialEq, Default)]
3332#[derive(::serde::Serialize, ::serde::Deserialize)]
3333#[serde(default)]
3334pub struct GetPermissionsRequest {
3335    /// Name of the share.
3336    ///
3337    /// Field 1: `name`
3338    #[serde(
3339        rename = "name",
3340        with = "::buffa::json_helpers::proto_string",
3341        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3342    )]
3343    pub name: ::buffa::alloc::string::String,
3344    /// The maximum number of results per page that should be returned.
3345    ///
3346    /// Field 2: `max_results`
3347    #[serde(
3348        rename = "max_results",
3349        alias = "maxResults",
3350        with = "::buffa::json_helpers::opt_int32",
3351        skip_serializing_if = "::core::option::Option::is_none"
3352    )]
3353    pub max_results: ::core::option::Option<i32>,
3354    /// Opaque pagination token to go to next page based on previous query.
3355    ///
3356    /// Field 3: `page_token`
3357    #[serde(
3358        rename = "page_token",
3359        alias = "pageToken",
3360        skip_serializing_if = "::core::option::Option::is_none"
3361    )]
3362    pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
3363    #[serde(skip)]
3364    #[doc(hidden)]
3365    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3366}
3367impl ::core::fmt::Debug for GetPermissionsRequest {
3368    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3369        f.debug_struct("GetPermissionsRequest")
3370            .field("name", &self.name)
3371            .field("max_results", &self.max_results)
3372            .field("page_token", &self.page_token)
3373            .finish()
3374    }
3375}
3376impl GetPermissionsRequest {
3377    /// Protobuf type URL for this message, for use with `Any::pack` and
3378    /// `Any::unpack_if`.
3379    ///
3380    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3381    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetPermissionsRequest";
3382}
3383impl GetPermissionsRequest {
3384    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3385    #[inline]
3386    ///Sets [`Self::max_results`] to `Some(value)`, consuming and returning `self`.
3387    pub fn with_max_results(mut self, value: i32) -> Self {
3388        self.max_results = Some(value);
3389        self
3390    }
3391    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3392    #[inline]
3393    ///Sets [`Self::page_token`] to `Some(value)`, consuming and returning `self`.
3394    pub fn with_page_token(
3395        mut self,
3396        value: impl Into<::buffa::alloc::string::String>,
3397    ) -> Self {
3398        self.page_token = Some(value.into());
3399        self
3400    }
3401}
3402impl ::buffa::DefaultInstance for GetPermissionsRequest {
3403    fn default_instance() -> &'static Self {
3404        static VALUE: ::buffa::__private::OnceBox<GetPermissionsRequest> = ::buffa::__private::OnceBox::new();
3405        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3406    }
3407}
3408impl ::buffa::MessageName for GetPermissionsRequest {
3409    const PACKAGE: &'static str = "unitycatalog.shares.v1";
3410    const NAME: &'static str = "GetPermissionsRequest";
3411    const FULL_NAME: &'static str = "unitycatalog.shares.v1.GetPermissionsRequest";
3412    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetPermissionsRequest";
3413}
3414impl ::buffa::Message for GetPermissionsRequest {
3415    /// Returns the total encoded size in bytes.
3416    ///
3417    /// The result is a `u32`; the protobuf specification requires all
3418    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3419    /// compliant message will never overflow this type.
3420    #[allow(clippy::let_and_return)]
3421    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3422        #[allow(unused_imports)]
3423        use ::buffa::Enumeration as _;
3424        let mut size = 0u32;
3425        if !self.name.is_empty() {
3426            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
3427        }
3428        if let Some(v) = self.max_results {
3429            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
3430        }
3431        if let Some(ref v) = self.page_token {
3432            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3433        }
3434        size += self.__buffa_unknown_fields.encoded_len() as u32;
3435        size
3436    }
3437    fn write_to(
3438        &self,
3439        _cache: &mut ::buffa::SizeCache,
3440        buf: &mut impl ::buffa::bytes::BufMut,
3441    ) {
3442        #[allow(unused_imports)]
3443        use ::buffa::Enumeration as _;
3444        if !self.name.is_empty() {
3445            ::buffa::encoding::Tag::new(
3446                    1u32,
3447                    ::buffa::encoding::WireType::LengthDelimited,
3448                )
3449                .encode(buf);
3450            ::buffa::types::encode_string(&self.name, buf);
3451        }
3452        if let Some(v) = self.max_results {
3453            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
3454                .encode(buf);
3455            ::buffa::types::encode_int32(v, buf);
3456        }
3457        if let Some(ref v) = self.page_token {
3458            ::buffa::encoding::Tag::new(
3459                    3u32,
3460                    ::buffa::encoding::WireType::LengthDelimited,
3461                )
3462                .encode(buf);
3463            ::buffa::types::encode_string(v, buf);
3464        }
3465        self.__buffa_unknown_fields.write_to(buf);
3466    }
3467    fn merge_field(
3468        &mut self,
3469        tag: ::buffa::encoding::Tag,
3470        buf: &mut impl ::buffa::bytes::Buf,
3471        depth: u32,
3472    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3473        #[allow(unused_imports)]
3474        use ::buffa::bytes::Buf as _;
3475        #[allow(unused_imports)]
3476        use ::buffa::Enumeration as _;
3477        match tag.field_number() {
3478            1u32 => {
3479                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3480                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3481                        field_number: 1u32,
3482                        expected: 2u8,
3483                        actual: tag.wire_type() as u8,
3484                    });
3485                }
3486                ::buffa::types::merge_string(&mut self.name, buf)?;
3487            }
3488            2u32 => {
3489                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3490                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3491                        field_number: 2u32,
3492                        expected: 0u8,
3493                        actual: tag.wire_type() as u8,
3494                    });
3495                }
3496                self.max_results = ::core::option::Option::Some(
3497                    ::buffa::types::decode_int32(buf)?,
3498                );
3499            }
3500            3u32 => {
3501                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3502                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3503                        field_number: 3u32,
3504                        expected: 2u8,
3505                        actual: tag.wire_type() as u8,
3506                    });
3507                }
3508                ::buffa::types::merge_string(
3509                    self
3510                        .page_token
3511                        .get_or_insert_with(::buffa::alloc::string::String::new),
3512                    buf,
3513                )?;
3514            }
3515            _ => {
3516                self.__buffa_unknown_fields
3517                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3518            }
3519        }
3520        ::core::result::Result::Ok(())
3521    }
3522    fn clear(&mut self) {
3523        self.name.clear();
3524        self.max_results = ::core::option::Option::None;
3525        self.page_token = ::core::option::Option::None;
3526        self.__buffa_unknown_fields.clear();
3527    }
3528}
3529impl ::buffa::ExtensionSet for GetPermissionsRequest {
3530    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.GetPermissionsRequest";
3531    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3532        &self.__buffa_unknown_fields
3533    }
3534    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3535        &mut self.__buffa_unknown_fields
3536    }
3537}
3538impl ::buffa::json_helpers::ProtoElemJson for GetPermissionsRequest {
3539    fn serialize_proto_json<S: ::serde::Serializer>(
3540        v: &Self,
3541        s: S,
3542    ) -> ::core::result::Result<S::Ok, S::Error> {
3543        ::serde::Serialize::serialize(v, s)
3544    }
3545    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3546        d: D,
3547    ) -> ::core::result::Result<Self, D::Error> {
3548        <Self as ::serde::Deserialize>::deserialize(d)
3549    }
3550}
3551#[doc(hidden)]
3552pub const __GET_PERMISSIONS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3553    type_url: "type.googleapis.com/unitycatalog.shares.v1.GetPermissionsRequest",
3554    to_json: ::buffa::type_registry::any_to_json::<GetPermissionsRequest>,
3555    from_json: ::buffa::type_registry::any_from_json::<GetPermissionsRequest>,
3556    is_wkt: false,
3557};
3558/// Response to list shares.
3559#[derive(Clone, PartialEq, Default)]
3560#[derive(::serde::Serialize, ::serde::Deserialize)]
3561#[serde(default)]
3562pub struct GetPermissionsResponse {
3563    /// The privileges assigned to each principal
3564    ///
3565    /// Field 1: `privilege_assignments`
3566    #[serde(
3567        rename = "privilege_assignments",
3568        alias = "privilegeAssignments",
3569        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3570        deserialize_with = "::buffa::json_helpers::null_as_default"
3571    )]
3572    pub privilege_assignments: ::buffa::alloc::vec::Vec<PrivilegeAssignment>,
3573    /// Opaque pagination token to go to next page based on previous query.
3574    ///
3575    /// Field 2: `next_page_token`
3576    #[serde(
3577        rename = "next_page_token",
3578        alias = "nextPageToken",
3579        skip_serializing_if = "::core::option::Option::is_none"
3580    )]
3581    pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
3582    #[serde(skip)]
3583    #[doc(hidden)]
3584    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3585}
3586impl ::core::fmt::Debug for GetPermissionsResponse {
3587    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3588        f.debug_struct("GetPermissionsResponse")
3589            .field("privilege_assignments", &self.privilege_assignments)
3590            .field("next_page_token", &self.next_page_token)
3591            .finish()
3592    }
3593}
3594impl GetPermissionsResponse {
3595    /// Protobuf type URL for this message, for use with `Any::pack` and
3596    /// `Any::unpack_if`.
3597    ///
3598    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3599    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetPermissionsResponse";
3600}
3601impl GetPermissionsResponse {
3602    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3603    #[inline]
3604    ///Sets [`Self::next_page_token`] to `Some(value)`, consuming and returning `self`.
3605    pub fn with_next_page_token(
3606        mut self,
3607        value: impl Into<::buffa::alloc::string::String>,
3608    ) -> Self {
3609        self.next_page_token = Some(value.into());
3610        self
3611    }
3612}
3613impl ::buffa::DefaultInstance for GetPermissionsResponse {
3614    fn default_instance() -> &'static Self {
3615        static VALUE: ::buffa::__private::OnceBox<GetPermissionsResponse> = ::buffa::__private::OnceBox::new();
3616        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3617    }
3618}
3619impl ::buffa::MessageName for GetPermissionsResponse {
3620    const PACKAGE: &'static str = "unitycatalog.shares.v1";
3621    const NAME: &'static str = "GetPermissionsResponse";
3622    const FULL_NAME: &'static str = "unitycatalog.shares.v1.GetPermissionsResponse";
3623    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetPermissionsResponse";
3624}
3625impl ::buffa::Message for GetPermissionsResponse {
3626    /// Returns the total encoded size in bytes.
3627    ///
3628    /// The result is a `u32`; the protobuf specification requires all
3629    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3630    /// compliant message will never overflow this type.
3631    #[allow(clippy::let_and_return)]
3632    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3633        #[allow(unused_imports)]
3634        use ::buffa::Enumeration as _;
3635        let mut size = 0u32;
3636        for v in &self.privilege_assignments {
3637            let __slot = __cache.reserve();
3638            let inner_size = v.compute_size(__cache);
3639            __cache.set(__slot, inner_size);
3640            size
3641                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3642                    + inner_size;
3643        }
3644        if let Some(ref v) = self.next_page_token {
3645            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3646        }
3647        size += self.__buffa_unknown_fields.encoded_len() as u32;
3648        size
3649    }
3650    fn write_to(
3651        &self,
3652        __cache: &mut ::buffa::SizeCache,
3653        buf: &mut impl ::buffa::bytes::BufMut,
3654    ) {
3655        #[allow(unused_imports)]
3656        use ::buffa::Enumeration as _;
3657        for v in &self.privilege_assignments {
3658            ::buffa::encoding::Tag::new(
3659                    1u32,
3660                    ::buffa::encoding::WireType::LengthDelimited,
3661                )
3662                .encode(buf);
3663            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3664            v.write_to(__cache, buf);
3665        }
3666        if let Some(ref v) = self.next_page_token {
3667            ::buffa::encoding::Tag::new(
3668                    2u32,
3669                    ::buffa::encoding::WireType::LengthDelimited,
3670                )
3671                .encode(buf);
3672            ::buffa::types::encode_string(v, buf);
3673        }
3674        self.__buffa_unknown_fields.write_to(buf);
3675    }
3676    fn merge_field(
3677        &mut self,
3678        tag: ::buffa::encoding::Tag,
3679        buf: &mut impl ::buffa::bytes::Buf,
3680        depth: u32,
3681    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3682        #[allow(unused_imports)]
3683        use ::buffa::bytes::Buf as _;
3684        #[allow(unused_imports)]
3685        use ::buffa::Enumeration as _;
3686        match tag.field_number() {
3687            1u32 => {
3688                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3689                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3690                        field_number: 1u32,
3691                        expected: 2u8,
3692                        actual: tag.wire_type() as u8,
3693                    });
3694                }
3695                let mut elem = ::core::default::Default::default();
3696                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3697                self.privilege_assignments.push(elem);
3698            }
3699            2u32 => {
3700                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3701                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3702                        field_number: 2u32,
3703                        expected: 2u8,
3704                        actual: tag.wire_type() as u8,
3705                    });
3706                }
3707                ::buffa::types::merge_string(
3708                    self
3709                        .next_page_token
3710                        .get_or_insert_with(::buffa::alloc::string::String::new),
3711                    buf,
3712                )?;
3713            }
3714            _ => {
3715                self.__buffa_unknown_fields
3716                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3717            }
3718        }
3719        ::core::result::Result::Ok(())
3720    }
3721    fn clear(&mut self) {
3722        self.privilege_assignments.clear();
3723        self.next_page_token = ::core::option::Option::None;
3724        self.__buffa_unknown_fields.clear();
3725    }
3726}
3727impl ::buffa::ExtensionSet for GetPermissionsResponse {
3728    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.GetPermissionsResponse";
3729    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3730        &self.__buffa_unknown_fields
3731    }
3732    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3733        &mut self.__buffa_unknown_fields
3734    }
3735}
3736impl ::buffa::json_helpers::ProtoElemJson for GetPermissionsResponse {
3737    fn serialize_proto_json<S: ::serde::Serializer>(
3738        v: &Self,
3739        s: S,
3740    ) -> ::core::result::Result<S::Ok, S::Error> {
3741        ::serde::Serialize::serialize(v, s)
3742    }
3743    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3744        d: D,
3745    ) -> ::core::result::Result<Self, D::Error> {
3746        <Self as ::serde::Deserialize>::deserialize(d)
3747    }
3748}
3749#[doc(hidden)]
3750pub const __GET_PERMISSIONS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3751    type_url: "type.googleapis.com/unitycatalog.shares.v1.GetPermissionsResponse",
3752    to_json: ::buffa::type_registry::any_to_json::<GetPermissionsResponse>,
3753    from_json: ::buffa::type_registry::any_from_json::<GetPermissionsResponse>,
3754    is_wkt: false,
3755};
3756#[derive(Clone, PartialEq, Default)]
3757#[derive(::serde::Serialize, ::serde::Deserialize)]
3758#[serde(default)]
3759pub struct UpdatePermissionsRequest {
3760    /// Name of the share.
3761    ///
3762    /// Field 1: `name`
3763    #[serde(
3764        rename = "name",
3765        with = "::buffa::json_helpers::proto_string",
3766        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3767    )]
3768    pub name: ::buffa::alloc::string::String,
3769    /// Array of permissions change objects.
3770    ///
3771    /// Field 2: `changes`
3772    #[serde(
3773        rename = "changes",
3774        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3775        deserialize_with = "::buffa::json_helpers::null_as_default"
3776    )]
3777    pub changes: ::buffa::alloc::vec::Vec<PermissionsChange>,
3778    /// Whether to return the latest permissions list of the share in the response.
3779    ///
3780    /// Field 3: `omit_permissions_list`
3781    #[serde(
3782        rename = "omit_permissions_list",
3783        alias = "omitPermissionsList",
3784        skip_serializing_if = "::core::option::Option::is_none"
3785    )]
3786    pub omit_permissions_list: ::core::option::Option<bool>,
3787    #[serde(skip)]
3788    #[doc(hidden)]
3789    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3790}
3791impl ::core::fmt::Debug for UpdatePermissionsRequest {
3792    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3793        f.debug_struct("UpdatePermissionsRequest")
3794            .field("name", &self.name)
3795            .field("changes", &self.changes)
3796            .field("omit_permissions_list", &self.omit_permissions_list)
3797            .finish()
3798    }
3799}
3800impl UpdatePermissionsRequest {
3801    /// Protobuf type URL for this message, for use with `Any::pack` and
3802    /// `Any::unpack_if`.
3803    ///
3804    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3805    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdatePermissionsRequest";
3806}
3807impl UpdatePermissionsRequest {
3808    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3809    #[inline]
3810    ///Sets [`Self::omit_permissions_list`] to `Some(value)`, consuming and returning `self`.
3811    pub fn with_omit_permissions_list(mut self, value: bool) -> Self {
3812        self.omit_permissions_list = Some(value);
3813        self
3814    }
3815}
3816impl ::buffa::DefaultInstance for UpdatePermissionsRequest {
3817    fn default_instance() -> &'static Self {
3818        static VALUE: ::buffa::__private::OnceBox<UpdatePermissionsRequest> = ::buffa::__private::OnceBox::new();
3819        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3820    }
3821}
3822impl ::buffa::MessageName for UpdatePermissionsRequest {
3823    const PACKAGE: &'static str = "unitycatalog.shares.v1";
3824    const NAME: &'static str = "UpdatePermissionsRequest";
3825    const FULL_NAME: &'static str = "unitycatalog.shares.v1.UpdatePermissionsRequest";
3826    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdatePermissionsRequest";
3827}
3828impl ::buffa::Message for UpdatePermissionsRequest {
3829    /// Returns the total encoded size in bytes.
3830    ///
3831    /// The result is a `u32`; the protobuf specification requires all
3832    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3833    /// compliant message will never overflow this type.
3834    #[allow(clippy::let_and_return)]
3835    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3836        #[allow(unused_imports)]
3837        use ::buffa::Enumeration as _;
3838        let mut size = 0u32;
3839        if !self.name.is_empty() {
3840            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
3841        }
3842        for v in &self.changes {
3843            let __slot = __cache.reserve();
3844            let inner_size = v.compute_size(__cache);
3845            __cache.set(__slot, inner_size);
3846            size
3847                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3848                    + inner_size;
3849        }
3850        if self.omit_permissions_list.is_some() {
3851            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3852        }
3853        size += self.__buffa_unknown_fields.encoded_len() as u32;
3854        size
3855    }
3856    fn write_to(
3857        &self,
3858        __cache: &mut ::buffa::SizeCache,
3859        buf: &mut impl ::buffa::bytes::BufMut,
3860    ) {
3861        #[allow(unused_imports)]
3862        use ::buffa::Enumeration as _;
3863        if !self.name.is_empty() {
3864            ::buffa::encoding::Tag::new(
3865                    1u32,
3866                    ::buffa::encoding::WireType::LengthDelimited,
3867                )
3868                .encode(buf);
3869            ::buffa::types::encode_string(&self.name, buf);
3870        }
3871        for v in &self.changes {
3872            ::buffa::encoding::Tag::new(
3873                    2u32,
3874                    ::buffa::encoding::WireType::LengthDelimited,
3875                )
3876                .encode(buf);
3877            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3878            v.write_to(__cache, buf);
3879        }
3880        if let Some(v) = self.omit_permissions_list {
3881            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
3882                .encode(buf);
3883            ::buffa::types::encode_bool(v, buf);
3884        }
3885        self.__buffa_unknown_fields.write_to(buf);
3886    }
3887    fn merge_field(
3888        &mut self,
3889        tag: ::buffa::encoding::Tag,
3890        buf: &mut impl ::buffa::bytes::Buf,
3891        depth: u32,
3892    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3893        #[allow(unused_imports)]
3894        use ::buffa::bytes::Buf as _;
3895        #[allow(unused_imports)]
3896        use ::buffa::Enumeration as _;
3897        match tag.field_number() {
3898            1u32 => {
3899                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3900                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3901                        field_number: 1u32,
3902                        expected: 2u8,
3903                        actual: tag.wire_type() as u8,
3904                    });
3905                }
3906                ::buffa::types::merge_string(&mut self.name, buf)?;
3907            }
3908            2u32 => {
3909                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3910                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3911                        field_number: 2u32,
3912                        expected: 2u8,
3913                        actual: tag.wire_type() as u8,
3914                    });
3915                }
3916                let mut elem = ::core::default::Default::default();
3917                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
3918                self.changes.push(elem);
3919            }
3920            3u32 => {
3921                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3922                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3923                        field_number: 3u32,
3924                        expected: 0u8,
3925                        actual: tag.wire_type() as u8,
3926                    });
3927                }
3928                self.omit_permissions_list = ::core::option::Option::Some(
3929                    ::buffa::types::decode_bool(buf)?,
3930                );
3931            }
3932            _ => {
3933                self.__buffa_unknown_fields
3934                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3935            }
3936        }
3937        ::core::result::Result::Ok(())
3938    }
3939    fn clear(&mut self) {
3940        self.name.clear();
3941        self.changes.clear();
3942        self.omit_permissions_list = ::core::option::Option::None;
3943        self.__buffa_unknown_fields.clear();
3944    }
3945}
3946impl ::buffa::ExtensionSet for UpdatePermissionsRequest {
3947    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.UpdatePermissionsRequest";
3948    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3949        &self.__buffa_unknown_fields
3950    }
3951    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3952        &mut self.__buffa_unknown_fields
3953    }
3954}
3955impl ::buffa::json_helpers::ProtoElemJson for UpdatePermissionsRequest {
3956    fn serialize_proto_json<S: ::serde::Serializer>(
3957        v: &Self,
3958        s: S,
3959    ) -> ::core::result::Result<S::Ok, S::Error> {
3960        ::serde::Serialize::serialize(v, s)
3961    }
3962    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3963        d: D,
3964    ) -> ::core::result::Result<Self, D::Error> {
3965        <Self as ::serde::Deserialize>::deserialize(d)
3966    }
3967}
3968#[doc(hidden)]
3969pub const __UPDATE_PERMISSIONS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3970    type_url: "type.googleapis.com/unitycatalog.shares.v1.UpdatePermissionsRequest",
3971    to_json: ::buffa::type_registry::any_to_json::<UpdatePermissionsRequest>,
3972    from_json: ::buffa::type_registry::any_from_json::<UpdatePermissionsRequest>,
3973    is_wkt: false,
3974};
3975#[derive(Clone, PartialEq, Default)]
3976#[derive(::serde::Serialize, ::serde::Deserialize)]
3977#[serde(default)]
3978pub struct UpdatePermissionsResponse {
3979    /// The privileges assigned to each principal
3980    ///
3981    /// Field 1: `privilege_assignments`
3982    #[serde(
3983        rename = "privilege_assignments",
3984        alias = "privilegeAssignments",
3985        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3986        deserialize_with = "::buffa::json_helpers::null_as_default"
3987    )]
3988    pub privilege_assignments: ::buffa::alloc::vec::Vec<PrivilegeAssignment>,
3989    #[serde(skip)]
3990    #[doc(hidden)]
3991    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3992}
3993impl ::core::fmt::Debug for UpdatePermissionsResponse {
3994    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3995        f.debug_struct("UpdatePermissionsResponse")
3996            .field("privilege_assignments", &self.privilege_assignments)
3997            .finish()
3998    }
3999}
4000impl UpdatePermissionsResponse {
4001    /// Protobuf type URL for this message, for use with `Any::pack` and
4002    /// `Any::unpack_if`.
4003    ///
4004    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4005    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdatePermissionsResponse";
4006}
4007impl ::buffa::DefaultInstance for UpdatePermissionsResponse {
4008    fn default_instance() -> &'static Self {
4009        static VALUE: ::buffa::__private::OnceBox<UpdatePermissionsResponse> = ::buffa::__private::OnceBox::new();
4010        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4011    }
4012}
4013impl ::buffa::MessageName for UpdatePermissionsResponse {
4014    const PACKAGE: &'static str = "unitycatalog.shares.v1";
4015    const NAME: &'static str = "UpdatePermissionsResponse";
4016    const FULL_NAME: &'static str = "unitycatalog.shares.v1.UpdatePermissionsResponse";
4017    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdatePermissionsResponse";
4018}
4019impl ::buffa::Message for UpdatePermissionsResponse {
4020    /// Returns the total encoded size in bytes.
4021    ///
4022    /// The result is a `u32`; the protobuf specification requires all
4023    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4024    /// compliant message will never overflow this type.
4025    #[allow(clippy::let_and_return)]
4026    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4027        #[allow(unused_imports)]
4028        use ::buffa::Enumeration as _;
4029        let mut size = 0u32;
4030        for v in &self.privilege_assignments {
4031            let __slot = __cache.reserve();
4032            let inner_size = v.compute_size(__cache);
4033            __cache.set(__slot, inner_size);
4034            size
4035                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4036                    + inner_size;
4037        }
4038        size += self.__buffa_unknown_fields.encoded_len() as u32;
4039        size
4040    }
4041    fn write_to(
4042        &self,
4043        __cache: &mut ::buffa::SizeCache,
4044        buf: &mut impl ::buffa::bytes::BufMut,
4045    ) {
4046        #[allow(unused_imports)]
4047        use ::buffa::Enumeration as _;
4048        for v in &self.privilege_assignments {
4049            ::buffa::encoding::Tag::new(
4050                    1u32,
4051                    ::buffa::encoding::WireType::LengthDelimited,
4052                )
4053                .encode(buf);
4054            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
4055            v.write_to(__cache, buf);
4056        }
4057        self.__buffa_unknown_fields.write_to(buf);
4058    }
4059    fn merge_field(
4060        &mut self,
4061        tag: ::buffa::encoding::Tag,
4062        buf: &mut impl ::buffa::bytes::Buf,
4063        depth: u32,
4064    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4065        #[allow(unused_imports)]
4066        use ::buffa::bytes::Buf as _;
4067        #[allow(unused_imports)]
4068        use ::buffa::Enumeration as _;
4069        match tag.field_number() {
4070            1u32 => {
4071                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4072                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4073                        field_number: 1u32,
4074                        expected: 2u8,
4075                        actual: tag.wire_type() as u8,
4076                    });
4077                }
4078                let mut elem = ::core::default::Default::default();
4079                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
4080                self.privilege_assignments.push(elem);
4081            }
4082            _ => {
4083                self.__buffa_unknown_fields
4084                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4085            }
4086        }
4087        ::core::result::Result::Ok(())
4088    }
4089    fn clear(&mut self) {
4090        self.privilege_assignments.clear();
4091        self.__buffa_unknown_fields.clear();
4092    }
4093}
4094impl ::buffa::ExtensionSet for UpdatePermissionsResponse {
4095    const PROTO_FQN: &'static str = "unitycatalog.shares.v1.UpdatePermissionsResponse";
4096    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4097        &self.__buffa_unknown_fields
4098    }
4099    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4100        &mut self.__buffa_unknown_fields
4101    }
4102}
4103impl ::buffa::json_helpers::ProtoElemJson for UpdatePermissionsResponse {
4104    fn serialize_proto_json<S: ::serde::Serializer>(
4105        v: &Self,
4106        s: S,
4107    ) -> ::core::result::Result<S::Ok, S::Error> {
4108        ::serde::Serialize::serialize(v, s)
4109    }
4110    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4111        d: D,
4112    ) -> ::core::result::Result<Self, D::Error> {
4113        <Self as ::serde::Deserialize>::deserialize(d)
4114    }
4115}
4116#[doc(hidden)]
4117pub const __UPDATE_PERMISSIONS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4118    type_url: "type.googleapis.com/unitycatalog.shares.v1.UpdatePermissionsResponse",
4119    to_json: ::buffa::type_registry::any_to_json::<UpdatePermissionsResponse>,
4120    from_json: ::buffa::type_registry::any_from_json::<UpdatePermissionsResponse>,
4121    is_wkt: false,
4122};
4123#[allow(
4124    non_camel_case_types,
4125    dead_code,
4126    unused_imports,
4127    unused_qualifications,
4128    clippy::derivable_impls,
4129    clippy::match_single_binding,
4130    clippy::uninlined_format_args,
4131    clippy::doc_lazy_continuation,
4132    clippy::module_inception
4133)]
4134pub mod __buffa {
4135    #[allow(unused_imports)]
4136    use super::*;
4137    pub mod view {
4138        #[allow(unused_imports)]
4139        use super::*;
4140        #[derive(Clone, Debug, Default)]
4141        pub struct DataObjectView<'a> {
4142            /// A fully qualified name that uniquely identifies a data object.
4143            ///
4144            /// For example, a table's fully qualified name is in the format of \<catalog\>.\<schema\>.\<table\>,
4145            ///
4146            /// Field 1: `name`
4147            pub name: &'a str,
4148            /// Type of the data object.
4149            ///
4150            /// Field 2: `data_object_type`
4151            pub data_object_type: ::buffa::EnumValue<super::super::DataObjectType>,
4152            /// The time when this data object is added to the share, in epoch milliseconds.
4153            ///
4154            /// Field 3: `added_at`
4155            pub added_at: ::core::option::Option<i64>,
4156            /// Username of the sharer.
4157            ///
4158            /// Field 4: `added_by`
4159            pub added_by: ::core::option::Option<&'a str>,
4160            /// A user-provided comment when adding the data object to the share.
4161            ///
4162            /// Field 5: `comment`
4163            pub comment: ::core::option::Option<&'a str>,
4164            /// A user-provided new name for the data object within the share.
4165            ///
4166            /// If this new name is not provided, the object's original name will be used as the shared_as name.
4167            /// The shared_as name must be unique within a share.
4168            /// For tables, the new name must follow the format of \<schema\>.\<table\>.
4169            ///
4170            /// Field 6: `shared_as`
4171            pub shared_as: ::core::option::Option<&'a str>,
4172            /// Array of partitions for the shared data.
4173            ///
4174            /// Field 7: `partitions`
4175            pub partitions: ::buffa::RepeatedView<'a, &'a str>,
4176            /// Whether to enable cdf or indicate if cdf is enabled on the shared object.
4177            ///
4178            /// Field 8: `enable_cdf`
4179            pub enable_cdf: ::core::option::Option<bool>,
4180            /// Whether to enable or disable sharing of data history. If not specified, the default is DISABLED.
4181            ///
4182            /// Field 9: `history_data_sharing_status`
4183            pub history_data_sharing_status: ::core::option::Option<
4184                ::buffa::EnumValue<super::super::HistoryStatus>,
4185            >,
4186            /// The start version associated with the object.
4187            ///
4188            /// This allows data providers to control the lowest object version that is accessible by clients.
4189            /// If specified, clients can query snapshots or changes for versions \>= start_version.
4190            /// If not specified, clients can only query starting from the version of the object at the time it was added to the share.
4191            ///
4192            /// NOTE: The start_version should be \<= the current version of the object.
4193            ///
4194            /// Field 10: `start_version`
4195            pub start_version: ::core::option::Option<i64>,
4196            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4197        }
4198        impl<'a> DataObjectView<'a> {
4199            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4200            ///
4201            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4202            /// and by generated sub-message decode arms with `depth - 1`.
4203            ///
4204            /// **Not part of the public API.** Named with a leading underscore to
4205            /// signal that it is for generated-code use only.
4206            #[doc(hidden)]
4207            pub fn _decode_depth(
4208                buf: &'a [u8],
4209                depth: u32,
4210            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4211                let mut view = Self::default();
4212                view._merge_into_view(buf, depth)?;
4213                ::core::result::Result::Ok(view)
4214            }
4215            /// Merge fields from `buf` into this view (proto merge semantics).
4216            ///
4217            /// Repeated fields append; singular fields last-wins; singular
4218            /// MESSAGE fields merge recursively. Used by sub-message decode
4219            /// arms when the same field appears multiple times on the wire.
4220            ///
4221            /// **Not part of the public API.**
4222            #[doc(hidden)]
4223            pub fn _merge_into_view(
4224                &mut self,
4225                buf: &'a [u8],
4226                depth: u32,
4227            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4228                let _ = depth;
4229                #[allow(unused_variables)]
4230                let view = self;
4231                let mut cur: &'a [u8] = buf;
4232                while !cur.is_empty() {
4233                    let before_tag = cur;
4234                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4235                    match tag.field_number() {
4236                        1u32 => {
4237                            if tag.wire_type()
4238                                != ::buffa::encoding::WireType::LengthDelimited
4239                            {
4240                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4241                                    field_number: 1u32,
4242                                    expected: 2u8,
4243                                    actual: tag.wire_type() as u8,
4244                                });
4245                            }
4246                            view.name = ::buffa::types::borrow_str(&mut cur)?;
4247                        }
4248                        2u32 => {
4249                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4250                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4251                                    field_number: 2u32,
4252                                    expected: 0u8,
4253                                    actual: tag.wire_type() as u8,
4254                                });
4255                            }
4256                            view.data_object_type = ::buffa::EnumValue::from(
4257                                ::buffa::types::decode_int32(&mut cur)?,
4258                            );
4259                        }
4260                        3u32 => {
4261                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4262                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4263                                    field_number: 3u32,
4264                                    expected: 0u8,
4265                                    actual: tag.wire_type() as u8,
4266                                });
4267                            }
4268                            view.added_at = Some(
4269                                ::buffa::types::decode_int64(&mut cur)?,
4270                            );
4271                        }
4272                        4u32 => {
4273                            if tag.wire_type()
4274                                != ::buffa::encoding::WireType::LengthDelimited
4275                            {
4276                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4277                                    field_number: 4u32,
4278                                    expected: 2u8,
4279                                    actual: tag.wire_type() as u8,
4280                                });
4281                            }
4282                            view.added_by = Some(::buffa::types::borrow_str(&mut cur)?);
4283                        }
4284                        5u32 => {
4285                            if tag.wire_type()
4286                                != ::buffa::encoding::WireType::LengthDelimited
4287                            {
4288                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4289                                    field_number: 5u32,
4290                                    expected: 2u8,
4291                                    actual: tag.wire_type() as u8,
4292                                });
4293                            }
4294                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
4295                        }
4296                        6u32 => {
4297                            if tag.wire_type()
4298                                != ::buffa::encoding::WireType::LengthDelimited
4299                            {
4300                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4301                                    field_number: 6u32,
4302                                    expected: 2u8,
4303                                    actual: tag.wire_type() as u8,
4304                                });
4305                            }
4306                            view.shared_as = Some(::buffa::types::borrow_str(&mut cur)?);
4307                        }
4308                        8u32 => {
4309                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4310                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4311                                    field_number: 8u32,
4312                                    expected: 0u8,
4313                                    actual: tag.wire_type() as u8,
4314                                });
4315                            }
4316                            view.enable_cdf = Some(
4317                                ::buffa::types::decode_bool(&mut cur)?,
4318                            );
4319                        }
4320                        9u32 => {
4321                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4322                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4323                                    field_number: 9u32,
4324                                    expected: 0u8,
4325                                    actual: tag.wire_type() as u8,
4326                                });
4327                            }
4328                            view.history_data_sharing_status = Some(
4329                                ::buffa::EnumValue::from(
4330                                    ::buffa::types::decode_int32(&mut cur)?,
4331                                ),
4332                            );
4333                        }
4334                        10u32 => {
4335                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4336                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4337                                    field_number: 10u32,
4338                                    expected: 0u8,
4339                                    actual: tag.wire_type() as u8,
4340                                });
4341                            }
4342                            view.start_version = Some(
4343                                ::buffa::types::decode_int64(&mut cur)?,
4344                            );
4345                        }
4346                        7u32 => {
4347                            if tag.wire_type()
4348                                != ::buffa::encoding::WireType::LengthDelimited
4349                            {
4350                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4351                                    field_number: 7u32,
4352                                    expected: 2u8,
4353                                    actual: tag.wire_type() as u8,
4354                                });
4355                            }
4356                            view.partitions.push(::buffa::types::borrow_str(&mut cur)?);
4357                        }
4358                        _ => {
4359                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4360                            let span_len = before_tag.len() - cur.len();
4361                            view.__buffa_unknown_fields
4362                                .push_raw(&before_tag[..span_len]);
4363                        }
4364                    }
4365                }
4366                ::core::result::Result::Ok(())
4367            }
4368        }
4369        impl<'a> ::buffa::MessageView<'a> for DataObjectView<'a> {
4370            type Owned = super::super::DataObject;
4371            fn decode_view(
4372                buf: &'a [u8],
4373            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4374                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4375            }
4376            fn decode_view_with_limit(
4377                buf: &'a [u8],
4378                depth: u32,
4379            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4380                Self::_decode_depth(buf, depth)
4381            }
4382            fn to_owned_message(&self) -> super::super::DataObject {
4383                self.to_owned_from_source(None)
4384            }
4385            #[allow(clippy::useless_conversion, clippy::needless_update)]
4386            fn to_owned_from_source(
4387                &self,
4388                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4389            ) -> super::super::DataObject {
4390                #[allow(unused_imports)]
4391                use ::buffa::alloc::string::ToString as _;
4392                let _ = __buffa_src;
4393                super::super::DataObject {
4394                    name: self.name.to_string(),
4395                    data_object_type: self.data_object_type,
4396                    added_at: self.added_at,
4397                    added_by: self.added_by.map(|s| s.to_string()),
4398                    comment: self.comment.map(|s| s.to_string()),
4399                    shared_as: self.shared_as.map(|s| s.to_string()),
4400                    partitions: self.partitions.iter().map(|s| s.to_string()).collect(),
4401                    enable_cdf: self.enable_cdf,
4402                    history_data_sharing_status: self.history_data_sharing_status,
4403                    start_version: self.start_version,
4404                    __buffa_unknown_fields: self
4405                        .__buffa_unknown_fields
4406                        .to_owned()
4407                        .unwrap_or_default()
4408                        .into(),
4409                    ..::core::default::Default::default()
4410                }
4411            }
4412        }
4413        impl<'a> ::buffa::ViewEncode<'a> for DataObjectView<'a> {
4414            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4415            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4416                #[allow(unused_imports)]
4417                use ::buffa::Enumeration as _;
4418                let mut size = 0u32;
4419                if !self.name.is_empty() {
4420                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4421                }
4422                {
4423                    let val = self.data_object_type.to_i32();
4424                    if val != 0 {
4425                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4426                    }
4427                }
4428                if let Some(v) = self.added_at {
4429                    size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
4430                }
4431                if let Some(ref v) = self.added_by {
4432                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4433                }
4434                if let Some(ref v) = self.comment {
4435                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4436                }
4437                if let Some(ref v) = self.shared_as {
4438                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4439                }
4440                for v in &self.partitions {
4441                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4442                }
4443                if self.enable_cdf.is_some() {
4444                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4445                }
4446                if let Some(ref v) = self.history_data_sharing_status {
4447                    size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
4448                }
4449                if let Some(v) = self.start_version {
4450                    size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
4451                }
4452                size += self.__buffa_unknown_fields.encoded_len() as u32;
4453                size
4454            }
4455            #[allow(clippy::needless_borrow)]
4456            fn write_to(
4457                &self,
4458                _cache: &mut ::buffa::SizeCache,
4459                buf: &mut impl ::buffa::bytes::BufMut,
4460            ) {
4461                #[allow(unused_imports)]
4462                use ::buffa::Enumeration as _;
4463                if !self.name.is_empty() {
4464                    ::buffa::encoding::Tag::new(
4465                            1u32,
4466                            ::buffa::encoding::WireType::LengthDelimited,
4467                        )
4468                        .encode(buf);
4469                    ::buffa::types::encode_string(&self.name, buf);
4470                }
4471                {
4472                    let val = self.data_object_type.to_i32();
4473                    if val != 0 {
4474                        ::buffa::encoding::Tag::new(
4475                                2u32,
4476                                ::buffa::encoding::WireType::Varint,
4477                            )
4478                            .encode(buf);
4479                        ::buffa::types::encode_int32(val, buf);
4480                    }
4481                }
4482                if let Some(v) = self.added_at {
4483                    ::buffa::encoding::Tag::new(
4484                            3u32,
4485                            ::buffa::encoding::WireType::Varint,
4486                        )
4487                        .encode(buf);
4488                    ::buffa::types::encode_int64(v, buf);
4489                }
4490                if let Some(ref v) = self.added_by {
4491                    ::buffa::encoding::Tag::new(
4492                            4u32,
4493                            ::buffa::encoding::WireType::LengthDelimited,
4494                        )
4495                        .encode(buf);
4496                    ::buffa::types::encode_string(v, buf);
4497                }
4498                if let Some(ref v) = self.comment {
4499                    ::buffa::encoding::Tag::new(
4500                            5u32,
4501                            ::buffa::encoding::WireType::LengthDelimited,
4502                        )
4503                        .encode(buf);
4504                    ::buffa::types::encode_string(v, buf);
4505                }
4506                if let Some(ref v) = self.shared_as {
4507                    ::buffa::encoding::Tag::new(
4508                            6u32,
4509                            ::buffa::encoding::WireType::LengthDelimited,
4510                        )
4511                        .encode(buf);
4512                    ::buffa::types::encode_string(v, buf);
4513                }
4514                for v in &self.partitions {
4515                    ::buffa::encoding::Tag::new(
4516                            7u32,
4517                            ::buffa::encoding::WireType::LengthDelimited,
4518                        )
4519                        .encode(buf);
4520                    ::buffa::types::encode_string(v, buf);
4521                }
4522                if let Some(v) = self.enable_cdf {
4523                    ::buffa::encoding::Tag::new(
4524                            8u32,
4525                            ::buffa::encoding::WireType::Varint,
4526                        )
4527                        .encode(buf);
4528                    ::buffa::types::encode_bool(v, buf);
4529                }
4530                if let Some(ref v) = self.history_data_sharing_status {
4531                    ::buffa::encoding::Tag::new(
4532                            9u32,
4533                            ::buffa::encoding::WireType::Varint,
4534                        )
4535                        .encode(buf);
4536                    ::buffa::types::encode_int32(v.to_i32(), buf);
4537                }
4538                if let Some(v) = self.start_version {
4539                    ::buffa::encoding::Tag::new(
4540                            10u32,
4541                            ::buffa::encoding::WireType::Varint,
4542                        )
4543                        .encode(buf);
4544                    ::buffa::types::encode_int64(v, buf);
4545                }
4546                self.__buffa_unknown_fields.write_to(buf);
4547            }
4548        }
4549        /// Serializes this view as protobuf JSON.
4550        ///
4551        /// Implicit-presence fields with default values are omitted, `required`
4552        /// fields are always emitted, explicit-presence (`optional`) fields are
4553        /// emitted only when set, bytes fields are base64-encoded, and enum
4554        /// values are their proto name strings.
4555        ///
4556        /// This impl uses `serialize_map(None)` because the number of emitted
4557        /// fields depends on default-omission rules; serializers that require
4558        /// known map lengths (e.g. `bincode`) will return a runtime error.
4559        /// Use the owned message type for those formats.
4560        impl<'__a> ::serde::Serialize for DataObjectView<'__a> {
4561            fn serialize<__S: ::serde::Serializer>(
4562                &self,
4563                __s: __S,
4564            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4565                use ::serde::ser::SerializeMap as _;
4566                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4567                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
4568                    __map.serialize_entry("name", self.name)?;
4569                }
4570                if !::buffa::json_helpers::skip_if::is_default_enum_value(
4571                    &self.data_object_type,
4572                ) {
4573                    __map.serialize_entry("data_object_type", &self.data_object_type)?;
4574                }
4575                if let ::core::option::Option::Some(__v) = self.added_at {
4576                    struct _W(i64);
4577                    impl ::serde::Serialize for _W {
4578                        fn serialize<__S: ::serde::Serializer>(
4579                            &self,
4580                            __s: __S,
4581                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
4582                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
4583                        }
4584                    }
4585                    __map.serialize_entry("added_at", &_W(__v))?;
4586                }
4587                if let ::core::option::Option::Some(__v) = self.added_by {
4588                    __map.serialize_entry("added_by", __v)?;
4589                }
4590                if let ::core::option::Option::Some(__v) = self.comment {
4591                    __map.serialize_entry("comment", __v)?;
4592                }
4593                if let ::core::option::Option::Some(__v) = self.shared_as {
4594                    __map.serialize_entry("shared_as", __v)?;
4595                }
4596                if !self.partitions.is_empty() {
4597                    __map.serialize_entry("partitions", &*self.partitions)?;
4598                }
4599                if let ::core::option::Option::Some(__v) = self.enable_cdf {
4600                    __map.serialize_entry("enable_cdf", &__v)?;
4601                }
4602                if let ::core::option::Option::Some(ref __v) = self
4603                    .history_data_sharing_status
4604                {
4605                    __map.serialize_entry("history_data_sharing_status", __v)?;
4606                }
4607                if let ::core::option::Option::Some(__v) = self.start_version {
4608                    struct _W(i64);
4609                    impl ::serde::Serialize for _W {
4610                        fn serialize<__S: ::serde::Serializer>(
4611                            &self,
4612                            __s: __S,
4613                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
4614                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
4615                        }
4616                    }
4617                    __map.serialize_entry("start_version", &_W(__v))?;
4618                }
4619                __map.end()
4620            }
4621        }
4622        impl<'a> ::buffa::MessageName for DataObjectView<'a> {
4623            const PACKAGE: &'static str = "unitycatalog.shares.v1";
4624            const NAME: &'static str = "DataObject";
4625            const FULL_NAME: &'static str = "unitycatalog.shares.v1.DataObject";
4626            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DataObject";
4627        }
4628        impl<'v> ::buffa::DefaultViewInstance for DataObjectView<'v> {
4629            fn default_view_instance<'a>() -> &'a Self
4630            where
4631                Self: 'a,
4632            {
4633                static VALUE: ::buffa::__private::OnceBox<DataObjectView<'static>> = ::buffa::__private::OnceBox::new();
4634                VALUE
4635                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4636                        <DataObjectView<'static>>::default(),
4637                    ))
4638            }
4639        }
4640        impl ::buffa::ViewReborrow for DataObjectView<'static> {
4641            type Reborrowed<'b> = DataObjectView<'b>;
4642            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4643                this
4644            }
4645        }
4646        /** Self-contained, `'static` owned view of a `DataObject` message.
4647
4648 Wraps [`::buffa::OwnedView`]`<`[`DataObjectView`]`<'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.
4649
4650 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DataObjectView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4651        #[derive(Clone, Debug)]
4652        pub struct DataObjectOwnedView(::buffa::OwnedView<DataObjectView<'static>>);
4653        impl DataObjectOwnedView {
4654            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4655            ///
4656            /// The view borrows directly from the buffer's data; the buffer is
4657            /// retained inside the returned handle.
4658            ///
4659            /// # Errors
4660            ///
4661            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4662            /// protobuf data.
4663            pub fn decode(
4664                bytes: ::buffa::bytes::Bytes,
4665            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4666                ::core::result::Result::Ok(
4667                    DataObjectOwnedView(::buffa::OwnedView::decode(bytes)?),
4668                )
4669            }
4670            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4671            /// max message size).
4672            ///
4673            /// # Errors
4674            ///
4675            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4676            /// exceeds the configured limits.
4677            pub fn decode_with_options(
4678                bytes: ::buffa::bytes::Bytes,
4679                opts: &::buffa::DecodeOptions,
4680            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4681                ::core::result::Result::Ok(
4682                    DataObjectOwnedView(
4683                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4684                    ),
4685                )
4686            }
4687            /// Build from an owned message via an encode → decode round-trip.
4688            ///
4689            /// # Errors
4690            ///
4691            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4692            /// somehow invalid (should not happen for well-formed messages).
4693            pub fn from_owned(
4694                msg: &super::super::DataObject,
4695            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4696                ::core::result::Result::Ok(
4697                    DataObjectOwnedView(::buffa::OwnedView::from_owned(msg)?),
4698                )
4699            }
4700            /// Borrow the full [`DataObjectView`] with its lifetime tied to `&self`.
4701            #[must_use]
4702            pub fn view(&self) -> &DataObjectView<'_> {
4703                self.0.reborrow()
4704            }
4705            /// Convert to the owned message type.
4706            #[must_use]
4707            pub fn to_owned_message(&self) -> super::super::DataObject {
4708                self.0.to_owned_message()
4709            }
4710            /// The underlying bytes buffer.
4711            #[must_use]
4712            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4713                self.0.bytes()
4714            }
4715            /// Consume the handle, returning the underlying bytes buffer.
4716            #[must_use]
4717            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4718                self.0.into_bytes()
4719            }
4720            /// A fully qualified name that uniquely identifies a data object.
4721            ///
4722            /// For example, a table's fully qualified name is in the format of \<catalog\>.\<schema\>.\<table\>,
4723            ///
4724            /// Field 1: `name`
4725            #[must_use]
4726            pub fn name(&self) -> &'_ str {
4727                self.0.reborrow().name
4728            }
4729            /// Type of the data object.
4730            ///
4731            /// Field 2: `data_object_type`
4732            #[must_use]
4733            pub fn data_object_type(
4734                &self,
4735            ) -> ::buffa::EnumValue<super::super::DataObjectType> {
4736                self.0.reborrow().data_object_type
4737            }
4738            /// The time when this data object is added to the share, in epoch milliseconds.
4739            ///
4740            /// Field 3: `added_at`
4741            #[must_use]
4742            pub fn added_at(&self) -> ::core::option::Option<i64> {
4743                self.0.reborrow().added_at
4744            }
4745            /// Username of the sharer.
4746            ///
4747            /// Field 4: `added_by`
4748            #[must_use]
4749            pub fn added_by(&self) -> ::core::option::Option<&'_ str> {
4750                self.0.reborrow().added_by
4751            }
4752            /// A user-provided comment when adding the data object to the share.
4753            ///
4754            /// Field 5: `comment`
4755            #[must_use]
4756            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
4757                self.0.reborrow().comment
4758            }
4759            /// A user-provided new name for the data object within the share.
4760            ///
4761            /// If this new name is not provided, the object's original name will be used as the shared_as name.
4762            /// The shared_as name must be unique within a share.
4763            /// For tables, the new name must follow the format of \<schema\>.\<table\>.
4764            ///
4765            /// Field 6: `shared_as`
4766            #[must_use]
4767            pub fn shared_as(&self) -> ::core::option::Option<&'_ str> {
4768                self.0.reborrow().shared_as
4769            }
4770            /// Array of partitions for the shared data.
4771            ///
4772            /// Field 7: `partitions`
4773            #[must_use]
4774            pub fn partitions(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
4775                &self.0.reborrow().partitions
4776            }
4777            /// Whether to enable cdf or indicate if cdf is enabled on the shared object.
4778            ///
4779            /// Field 8: `enable_cdf`
4780            #[must_use]
4781            pub fn enable_cdf(&self) -> ::core::option::Option<bool> {
4782                self.0.reborrow().enable_cdf
4783            }
4784            /// Whether to enable or disable sharing of data history. If not specified, the default is DISABLED.
4785            ///
4786            /// Field 9: `history_data_sharing_status`
4787            #[must_use]
4788            pub fn history_data_sharing_status(
4789                &self,
4790            ) -> ::core::option::Option<
4791                ::buffa::EnumValue<super::super::HistoryStatus>,
4792            > {
4793                self.0.reborrow().history_data_sharing_status
4794            }
4795            /// The start version associated with the object.
4796            ///
4797            /// This allows data providers to control the lowest object version that is accessible by clients.
4798            /// If specified, clients can query snapshots or changes for versions \>= start_version.
4799            /// If not specified, clients can only query starting from the version of the object at the time it was added to the share.
4800            ///
4801            /// NOTE: The start_version should be \<= the current version of the object.
4802            ///
4803            /// Field 10: `start_version`
4804            #[must_use]
4805            pub fn start_version(&self) -> ::core::option::Option<i64> {
4806                self.0.reborrow().start_version
4807            }
4808        }
4809        impl ::core::convert::From<::buffa::OwnedView<DataObjectView<'static>>>
4810        for DataObjectOwnedView {
4811            fn from(inner: ::buffa::OwnedView<DataObjectView<'static>>) -> Self {
4812                DataObjectOwnedView(inner)
4813            }
4814        }
4815        impl ::core::convert::From<DataObjectOwnedView>
4816        for ::buffa::OwnedView<DataObjectView<'static>> {
4817            fn from(wrapper: DataObjectOwnedView) -> Self {
4818                wrapper.0
4819            }
4820        }
4821        impl ::core::convert::AsRef<::buffa::OwnedView<DataObjectView<'static>>>
4822        for DataObjectOwnedView {
4823            fn as_ref(&self) -> &::buffa::OwnedView<DataObjectView<'static>> {
4824                &self.0
4825            }
4826        }
4827        impl ::buffa::HasMessageView for super::super::DataObject {
4828            type View<'a> = DataObjectView<'a>;
4829            type ViewHandle = DataObjectOwnedView;
4830        }
4831        impl ::serde::Serialize for DataObjectOwnedView {
4832            fn serialize<__S: ::serde::Serializer>(
4833                &self,
4834                __s: __S,
4835            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4836                ::serde::Serialize::serialize(&self.0, __s)
4837            }
4838        }
4839        #[derive(Clone, Debug, Default)]
4840        pub struct ShareView<'a> {
4841            /// Unique ID of the recipient.
4842            ///
4843            /// Field 100: `id`
4844            pub id: ::core::option::Option<&'a str>,
4845            /// Name of the share.
4846            ///
4847            /// Field 1: `name`
4848            pub name: &'a str,
4849            /// A list of shared data objects within the share.
4850            ///
4851            /// Field 6: `objects`
4852            pub objects: ::buffa::RepeatedView<
4853                'a,
4854                super::super::__buffa::view::DataObjectView<'a>,
4855            >,
4856            /// Username of current owner of share.
4857            ///
4858            /// Field 2: `owner`
4859            pub owner: ::core::option::Option<&'a str>,
4860            /// User-provided free-form text description.
4861            ///
4862            /// Field 3: `comment`
4863            pub comment: ::core::option::Option<&'a str>,
4864            /// Storage Location URL (full path) for the share.
4865            ///
4866            /// Field 4: `storage_location`
4867            pub storage_location: ::core::option::Option<&'a str>,
4868            /// Storage root URL for the share.
4869            ///
4870            /// Field 5: `storage_root`
4871            pub storage_root: ::core::option::Option<&'a str>,
4872            /// Time at which this share was created, in epoch milliseconds.
4873            ///
4874            /// Field 7: `created_at`
4875            pub created_at: ::core::option::Option<i64>,
4876            /// Username of the creator of the share.
4877            ///
4878            /// Field 8: `created_by`
4879            pub created_by: ::core::option::Option<&'a str>,
4880            /// Time at which this share was updated, in epoch milliseconds.
4881            ///
4882            /// Field 9: `updated_at`
4883            pub updated_at: ::core::option::Option<i64>,
4884            /// Username of share updater.
4885            ///
4886            /// Field 10: `updated_by`
4887            pub updated_by: ::core::option::Option<&'a str>,
4888            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4889        }
4890        impl<'a> ShareView<'a> {
4891            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4892            ///
4893            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4894            /// and by generated sub-message decode arms with `depth - 1`.
4895            ///
4896            /// **Not part of the public API.** Named with a leading underscore to
4897            /// signal that it is for generated-code use only.
4898            #[doc(hidden)]
4899            pub fn _decode_depth(
4900                buf: &'a [u8],
4901                depth: u32,
4902            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4903                let mut view = Self::default();
4904                view._merge_into_view(buf, depth)?;
4905                ::core::result::Result::Ok(view)
4906            }
4907            /// Merge fields from `buf` into this view (proto merge semantics).
4908            ///
4909            /// Repeated fields append; singular fields last-wins; singular
4910            /// MESSAGE fields merge recursively. Used by sub-message decode
4911            /// arms when the same field appears multiple times on the wire.
4912            ///
4913            /// **Not part of the public API.**
4914            #[doc(hidden)]
4915            pub fn _merge_into_view(
4916                &mut self,
4917                buf: &'a [u8],
4918                depth: u32,
4919            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4920                let _ = depth;
4921                #[allow(unused_variables)]
4922                let view = self;
4923                let mut cur: &'a [u8] = buf;
4924                while !cur.is_empty() {
4925                    let before_tag = cur;
4926                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4927                    match tag.field_number() {
4928                        100u32 => {
4929                            if tag.wire_type()
4930                                != ::buffa::encoding::WireType::LengthDelimited
4931                            {
4932                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4933                                    field_number: 100u32,
4934                                    expected: 2u8,
4935                                    actual: tag.wire_type() as u8,
4936                                });
4937                            }
4938                            view.id = Some(::buffa::types::borrow_str(&mut cur)?);
4939                        }
4940                        1u32 => {
4941                            if tag.wire_type()
4942                                != ::buffa::encoding::WireType::LengthDelimited
4943                            {
4944                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4945                                    field_number: 1u32,
4946                                    expected: 2u8,
4947                                    actual: tag.wire_type() as u8,
4948                                });
4949                            }
4950                            view.name = ::buffa::types::borrow_str(&mut cur)?;
4951                        }
4952                        2u32 => {
4953                            if tag.wire_type()
4954                                != ::buffa::encoding::WireType::LengthDelimited
4955                            {
4956                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4957                                    field_number: 2u32,
4958                                    expected: 2u8,
4959                                    actual: tag.wire_type() as u8,
4960                                });
4961                            }
4962                            view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
4963                        }
4964                        3u32 => {
4965                            if tag.wire_type()
4966                                != ::buffa::encoding::WireType::LengthDelimited
4967                            {
4968                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4969                                    field_number: 3u32,
4970                                    expected: 2u8,
4971                                    actual: tag.wire_type() as u8,
4972                                });
4973                            }
4974                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
4975                        }
4976                        4u32 => {
4977                            if tag.wire_type()
4978                                != ::buffa::encoding::WireType::LengthDelimited
4979                            {
4980                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4981                                    field_number: 4u32,
4982                                    expected: 2u8,
4983                                    actual: tag.wire_type() as u8,
4984                                });
4985                            }
4986                            view.storage_location = Some(
4987                                ::buffa::types::borrow_str(&mut cur)?,
4988                            );
4989                        }
4990                        5u32 => {
4991                            if tag.wire_type()
4992                                != ::buffa::encoding::WireType::LengthDelimited
4993                            {
4994                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4995                                    field_number: 5u32,
4996                                    expected: 2u8,
4997                                    actual: tag.wire_type() as u8,
4998                                });
4999                            }
5000                            view.storage_root = Some(
5001                                ::buffa::types::borrow_str(&mut cur)?,
5002                            );
5003                        }
5004                        7u32 => {
5005                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5006                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5007                                    field_number: 7u32,
5008                                    expected: 0u8,
5009                                    actual: tag.wire_type() as u8,
5010                                });
5011                            }
5012                            view.created_at = Some(
5013                                ::buffa::types::decode_int64(&mut cur)?,
5014                            );
5015                        }
5016                        8u32 => {
5017                            if tag.wire_type()
5018                                != ::buffa::encoding::WireType::LengthDelimited
5019                            {
5020                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5021                                    field_number: 8u32,
5022                                    expected: 2u8,
5023                                    actual: tag.wire_type() as u8,
5024                                });
5025                            }
5026                            view.created_by = Some(
5027                                ::buffa::types::borrow_str(&mut cur)?,
5028                            );
5029                        }
5030                        9u32 => {
5031                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5032                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5033                                    field_number: 9u32,
5034                                    expected: 0u8,
5035                                    actual: tag.wire_type() as u8,
5036                                });
5037                            }
5038                            view.updated_at = Some(
5039                                ::buffa::types::decode_int64(&mut cur)?,
5040                            );
5041                        }
5042                        10u32 => {
5043                            if tag.wire_type()
5044                                != ::buffa::encoding::WireType::LengthDelimited
5045                            {
5046                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5047                                    field_number: 10u32,
5048                                    expected: 2u8,
5049                                    actual: tag.wire_type() as u8,
5050                                });
5051                            }
5052                            view.updated_by = Some(
5053                                ::buffa::types::borrow_str(&mut cur)?,
5054                            );
5055                        }
5056                        6u32 => {
5057                            if tag.wire_type()
5058                                != ::buffa::encoding::WireType::LengthDelimited
5059                            {
5060                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5061                                    field_number: 6u32,
5062                                    expected: 2u8,
5063                                    actual: tag.wire_type() as u8,
5064                                });
5065                            }
5066                            if depth == 0 {
5067                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
5068                            }
5069                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5070                            view.objects
5071                                .push(
5072                                    super::super::__buffa::view::DataObjectView::_decode_depth(
5073                                        sub,
5074                                        depth - 1,
5075                                    )?,
5076                                );
5077                        }
5078                        _ => {
5079                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5080                            let span_len = before_tag.len() - cur.len();
5081                            view.__buffa_unknown_fields
5082                                .push_raw(&before_tag[..span_len]);
5083                        }
5084                    }
5085                }
5086                ::core::result::Result::Ok(())
5087            }
5088        }
5089        impl<'a> ::buffa::MessageView<'a> for ShareView<'a> {
5090            type Owned = super::super::Share;
5091            fn decode_view(
5092                buf: &'a [u8],
5093            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5094                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5095            }
5096            fn decode_view_with_limit(
5097                buf: &'a [u8],
5098                depth: u32,
5099            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5100                Self::_decode_depth(buf, depth)
5101            }
5102            fn to_owned_message(&self) -> super::super::Share {
5103                self.to_owned_from_source(None)
5104            }
5105            #[allow(clippy::useless_conversion, clippy::needless_update)]
5106            fn to_owned_from_source(
5107                &self,
5108                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5109            ) -> super::super::Share {
5110                #[allow(unused_imports)]
5111                use ::buffa::alloc::string::ToString as _;
5112                let _ = __buffa_src;
5113                super::super::Share {
5114                    id: self.id.map(|s| s.to_string()),
5115                    name: self.name.to_string(),
5116                    objects: self
5117                        .objects
5118                        .iter()
5119                        .map(|v| v.to_owned_from_source(__buffa_src))
5120                        .collect(),
5121                    owner: self.owner.map(|s| s.to_string()),
5122                    comment: self.comment.map(|s| s.to_string()),
5123                    storage_location: self.storage_location.map(|s| s.to_string()),
5124                    storage_root: self.storage_root.map(|s| s.to_string()),
5125                    created_at: self.created_at,
5126                    created_by: self.created_by.map(|s| s.to_string()),
5127                    updated_at: self.updated_at,
5128                    updated_by: self.updated_by.map(|s| s.to_string()),
5129                    __buffa_unknown_fields: self
5130                        .__buffa_unknown_fields
5131                        .to_owned()
5132                        .unwrap_or_default()
5133                        .into(),
5134                    ..::core::default::Default::default()
5135                }
5136            }
5137        }
5138        impl<'a> ::buffa::ViewEncode<'a> for ShareView<'a> {
5139            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5140            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5141                #[allow(unused_imports)]
5142                use ::buffa::Enumeration as _;
5143                let mut size = 0u32;
5144                if !self.name.is_empty() {
5145                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
5146                }
5147                if let Some(ref v) = self.owner {
5148                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5149                }
5150                if let Some(ref v) = self.comment {
5151                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5152                }
5153                if let Some(ref v) = self.storage_location {
5154                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5155                }
5156                if let Some(ref v) = self.storage_root {
5157                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5158                }
5159                for v in &self.objects {
5160                    let __slot = __cache.reserve();
5161                    let inner_size = v.compute_size(__cache);
5162                    __cache.set(__slot, inner_size);
5163                    size
5164                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5165                            + inner_size;
5166                }
5167                if let Some(v) = self.created_at {
5168                    size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
5169                }
5170                if let Some(ref v) = self.created_by {
5171                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5172                }
5173                if let Some(v) = self.updated_at {
5174                    size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
5175                }
5176                if let Some(ref v) = self.updated_by {
5177                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5178                }
5179                if let Some(ref v) = self.id {
5180                    size += 2u32 + ::buffa::types::string_encoded_len(v) as u32;
5181                }
5182                size += self.__buffa_unknown_fields.encoded_len() as u32;
5183                size
5184            }
5185            #[allow(clippy::needless_borrow)]
5186            fn write_to(
5187                &self,
5188                __cache: &mut ::buffa::SizeCache,
5189                buf: &mut impl ::buffa::bytes::BufMut,
5190            ) {
5191                #[allow(unused_imports)]
5192                use ::buffa::Enumeration as _;
5193                if !self.name.is_empty() {
5194                    ::buffa::encoding::Tag::new(
5195                            1u32,
5196                            ::buffa::encoding::WireType::LengthDelimited,
5197                        )
5198                        .encode(buf);
5199                    ::buffa::types::encode_string(&self.name, buf);
5200                }
5201                if let Some(ref v) = self.owner {
5202                    ::buffa::encoding::Tag::new(
5203                            2u32,
5204                            ::buffa::encoding::WireType::LengthDelimited,
5205                        )
5206                        .encode(buf);
5207                    ::buffa::types::encode_string(v, buf);
5208                }
5209                if let Some(ref v) = self.comment {
5210                    ::buffa::encoding::Tag::new(
5211                            3u32,
5212                            ::buffa::encoding::WireType::LengthDelimited,
5213                        )
5214                        .encode(buf);
5215                    ::buffa::types::encode_string(v, buf);
5216                }
5217                if let Some(ref v) = self.storage_location {
5218                    ::buffa::encoding::Tag::new(
5219                            4u32,
5220                            ::buffa::encoding::WireType::LengthDelimited,
5221                        )
5222                        .encode(buf);
5223                    ::buffa::types::encode_string(v, buf);
5224                }
5225                if let Some(ref v) = self.storage_root {
5226                    ::buffa::encoding::Tag::new(
5227                            5u32,
5228                            ::buffa::encoding::WireType::LengthDelimited,
5229                        )
5230                        .encode(buf);
5231                    ::buffa::types::encode_string(v, buf);
5232                }
5233                for v in &self.objects {
5234                    ::buffa::encoding::Tag::new(
5235                            6u32,
5236                            ::buffa::encoding::WireType::LengthDelimited,
5237                        )
5238                        .encode(buf);
5239                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
5240                    v.write_to(__cache, buf);
5241                }
5242                if let Some(v) = self.created_at {
5243                    ::buffa::encoding::Tag::new(
5244                            7u32,
5245                            ::buffa::encoding::WireType::Varint,
5246                        )
5247                        .encode(buf);
5248                    ::buffa::types::encode_int64(v, buf);
5249                }
5250                if let Some(ref v) = self.created_by {
5251                    ::buffa::encoding::Tag::new(
5252                            8u32,
5253                            ::buffa::encoding::WireType::LengthDelimited,
5254                        )
5255                        .encode(buf);
5256                    ::buffa::types::encode_string(v, buf);
5257                }
5258                if let Some(v) = self.updated_at {
5259                    ::buffa::encoding::Tag::new(
5260                            9u32,
5261                            ::buffa::encoding::WireType::Varint,
5262                        )
5263                        .encode(buf);
5264                    ::buffa::types::encode_int64(v, buf);
5265                }
5266                if let Some(ref v) = self.updated_by {
5267                    ::buffa::encoding::Tag::new(
5268                            10u32,
5269                            ::buffa::encoding::WireType::LengthDelimited,
5270                        )
5271                        .encode(buf);
5272                    ::buffa::types::encode_string(v, buf);
5273                }
5274                if let Some(ref v) = self.id {
5275                    ::buffa::encoding::Tag::new(
5276                            100u32,
5277                            ::buffa::encoding::WireType::LengthDelimited,
5278                        )
5279                        .encode(buf);
5280                    ::buffa::types::encode_string(v, buf);
5281                }
5282                self.__buffa_unknown_fields.write_to(buf);
5283            }
5284        }
5285        /// Serializes this view as protobuf JSON.
5286        ///
5287        /// Implicit-presence fields with default values are omitted, `required`
5288        /// fields are always emitted, explicit-presence (`optional`) fields are
5289        /// emitted only when set, bytes fields are base64-encoded, and enum
5290        /// values are their proto name strings.
5291        ///
5292        /// This impl uses `serialize_map(None)` because the number of emitted
5293        /// fields depends on default-omission rules; serializers that require
5294        /// known map lengths (e.g. `bincode`) will return a runtime error.
5295        /// Use the owned message type for those formats.
5296        impl<'__a> ::serde::Serialize for ShareView<'__a> {
5297            fn serialize<__S: ::serde::Serializer>(
5298                &self,
5299                __s: __S,
5300            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5301                use ::serde::ser::SerializeMap as _;
5302                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5303                if let ::core::option::Option::Some(__v) = self.id {
5304                    __map.serialize_entry("id", __v)?;
5305                }
5306                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
5307                    __map.serialize_entry("name", self.name)?;
5308                }
5309                if !self.objects.is_empty() {
5310                    __map.serialize_entry("objects", &*self.objects)?;
5311                }
5312                if let ::core::option::Option::Some(__v) = self.owner {
5313                    __map.serialize_entry("owner", __v)?;
5314                }
5315                if let ::core::option::Option::Some(__v) = self.comment {
5316                    __map.serialize_entry("comment", __v)?;
5317                }
5318                if let ::core::option::Option::Some(__v) = self.storage_location {
5319                    __map.serialize_entry("storage_location", __v)?;
5320                }
5321                if let ::core::option::Option::Some(__v) = self.storage_root {
5322                    __map.serialize_entry("storage_root", __v)?;
5323                }
5324                if let ::core::option::Option::Some(__v) = self.created_at {
5325                    struct _W(i64);
5326                    impl ::serde::Serialize for _W {
5327                        fn serialize<__S: ::serde::Serializer>(
5328                            &self,
5329                            __s: __S,
5330                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
5331                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
5332                        }
5333                    }
5334                    __map.serialize_entry("created_at", &_W(__v))?;
5335                }
5336                if let ::core::option::Option::Some(__v) = self.created_by {
5337                    __map.serialize_entry("created_by", __v)?;
5338                }
5339                if let ::core::option::Option::Some(__v) = self.updated_at {
5340                    struct _W(i64);
5341                    impl ::serde::Serialize for _W {
5342                        fn serialize<__S: ::serde::Serializer>(
5343                            &self,
5344                            __s: __S,
5345                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
5346                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
5347                        }
5348                    }
5349                    __map.serialize_entry("updated_at", &_W(__v))?;
5350                }
5351                if let ::core::option::Option::Some(__v) = self.updated_by {
5352                    __map.serialize_entry("updated_by", __v)?;
5353                }
5354                __map.end()
5355            }
5356        }
5357        impl<'a> ::buffa::MessageName for ShareView<'a> {
5358            const PACKAGE: &'static str = "unitycatalog.shares.v1";
5359            const NAME: &'static str = "Share";
5360            const FULL_NAME: &'static str = "unitycatalog.shares.v1.Share";
5361            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.Share";
5362        }
5363        impl<'v> ::buffa::DefaultViewInstance for ShareView<'v> {
5364            fn default_view_instance<'a>() -> &'a Self
5365            where
5366                Self: 'a,
5367            {
5368                static VALUE: ::buffa::__private::OnceBox<ShareView<'static>> = ::buffa::__private::OnceBox::new();
5369                VALUE
5370                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5371                        <ShareView<'static>>::default(),
5372                    ))
5373            }
5374        }
5375        impl ::buffa::ViewReborrow for ShareView<'static> {
5376            type Reborrowed<'b> = ShareView<'b>;
5377            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5378                this
5379            }
5380        }
5381        /** Self-contained, `'static` owned view of a `Share` message.
5382
5383 Wraps [`::buffa::OwnedView`]`<`[`ShareView`]`<'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.
5384
5385 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ShareView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5386        #[derive(Clone, Debug)]
5387        pub struct ShareOwnedView(::buffa::OwnedView<ShareView<'static>>);
5388        impl ShareOwnedView {
5389            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5390            ///
5391            /// The view borrows directly from the buffer's data; the buffer is
5392            /// retained inside the returned handle.
5393            ///
5394            /// # Errors
5395            ///
5396            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5397            /// protobuf data.
5398            pub fn decode(
5399                bytes: ::buffa::bytes::Bytes,
5400            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5401                ::core::result::Result::Ok(
5402                    ShareOwnedView(::buffa::OwnedView::decode(bytes)?),
5403                )
5404            }
5405            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5406            /// max message size).
5407            ///
5408            /// # Errors
5409            ///
5410            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5411            /// exceeds the configured limits.
5412            pub fn decode_with_options(
5413                bytes: ::buffa::bytes::Bytes,
5414                opts: &::buffa::DecodeOptions,
5415            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5416                ::core::result::Result::Ok(
5417                    ShareOwnedView(::buffa::OwnedView::decode_with_options(bytes, opts)?),
5418                )
5419            }
5420            /// Build from an owned message via an encode → decode round-trip.
5421            ///
5422            /// # Errors
5423            ///
5424            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5425            /// somehow invalid (should not happen for well-formed messages).
5426            pub fn from_owned(
5427                msg: &super::super::Share,
5428            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5429                ::core::result::Result::Ok(
5430                    ShareOwnedView(::buffa::OwnedView::from_owned(msg)?),
5431                )
5432            }
5433            /// Borrow the full [`ShareView`] with its lifetime tied to `&self`.
5434            #[must_use]
5435            pub fn view(&self) -> &ShareView<'_> {
5436                self.0.reborrow()
5437            }
5438            /// Convert to the owned message type.
5439            #[must_use]
5440            pub fn to_owned_message(&self) -> super::super::Share {
5441                self.0.to_owned_message()
5442            }
5443            /// The underlying bytes buffer.
5444            #[must_use]
5445            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5446                self.0.bytes()
5447            }
5448            /// Consume the handle, returning the underlying bytes buffer.
5449            #[must_use]
5450            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5451                self.0.into_bytes()
5452            }
5453            /// Unique ID of the recipient.
5454            ///
5455            /// Field 100: `id`
5456            #[must_use]
5457            pub fn id(&self) -> ::core::option::Option<&'_ str> {
5458                self.0.reborrow().id
5459            }
5460            /// Name of the share.
5461            ///
5462            /// Field 1: `name`
5463            #[must_use]
5464            pub fn name(&self) -> &'_ str {
5465                self.0.reborrow().name
5466            }
5467            /// A list of shared data objects within the share.
5468            ///
5469            /// Field 6: `objects`
5470            #[must_use]
5471            pub fn objects(
5472                &self,
5473            ) -> &::buffa::RepeatedView<
5474                '_,
5475                super::super::__buffa::view::DataObjectView<'_>,
5476            > {
5477                &self.0.reborrow().objects
5478            }
5479            /// Username of current owner of share.
5480            ///
5481            /// Field 2: `owner`
5482            #[must_use]
5483            pub fn owner(&self) -> ::core::option::Option<&'_ str> {
5484                self.0.reborrow().owner
5485            }
5486            /// User-provided free-form text description.
5487            ///
5488            /// Field 3: `comment`
5489            #[must_use]
5490            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
5491                self.0.reborrow().comment
5492            }
5493            /// Storage Location URL (full path) for the share.
5494            ///
5495            /// Field 4: `storage_location`
5496            #[must_use]
5497            pub fn storage_location(&self) -> ::core::option::Option<&'_ str> {
5498                self.0.reborrow().storage_location
5499            }
5500            /// Storage root URL for the share.
5501            ///
5502            /// Field 5: `storage_root`
5503            #[must_use]
5504            pub fn storage_root(&self) -> ::core::option::Option<&'_ str> {
5505                self.0.reborrow().storage_root
5506            }
5507            /// Time at which this share was created, in epoch milliseconds.
5508            ///
5509            /// Field 7: `created_at`
5510            #[must_use]
5511            pub fn created_at(&self) -> ::core::option::Option<i64> {
5512                self.0.reborrow().created_at
5513            }
5514            /// Username of the creator of the share.
5515            ///
5516            /// Field 8: `created_by`
5517            #[must_use]
5518            pub fn created_by(&self) -> ::core::option::Option<&'_ str> {
5519                self.0.reborrow().created_by
5520            }
5521            /// Time at which this share was updated, in epoch milliseconds.
5522            ///
5523            /// Field 9: `updated_at`
5524            #[must_use]
5525            pub fn updated_at(&self) -> ::core::option::Option<i64> {
5526                self.0.reborrow().updated_at
5527            }
5528            /// Username of share updater.
5529            ///
5530            /// Field 10: `updated_by`
5531            #[must_use]
5532            pub fn updated_by(&self) -> ::core::option::Option<&'_ str> {
5533                self.0.reborrow().updated_by
5534            }
5535        }
5536        impl ::core::convert::From<::buffa::OwnedView<ShareView<'static>>>
5537        for ShareOwnedView {
5538            fn from(inner: ::buffa::OwnedView<ShareView<'static>>) -> Self {
5539                ShareOwnedView(inner)
5540            }
5541        }
5542        impl ::core::convert::From<ShareOwnedView>
5543        for ::buffa::OwnedView<ShareView<'static>> {
5544            fn from(wrapper: ShareOwnedView) -> Self {
5545                wrapper.0
5546            }
5547        }
5548        impl ::core::convert::AsRef<::buffa::OwnedView<ShareView<'static>>>
5549        for ShareOwnedView {
5550            fn as_ref(&self) -> &::buffa::OwnedView<ShareView<'static>> {
5551                &self.0
5552            }
5553        }
5554        impl ::buffa::HasMessageView for super::super::Share {
5555            type View<'a> = ShareView<'a>;
5556            type ViewHandle = ShareOwnedView;
5557        }
5558        impl ::serde::Serialize for ShareOwnedView {
5559            fn serialize<__S: ::serde::Serializer>(
5560                &self,
5561                __s: __S,
5562            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5563                ::serde::Serialize::serialize(&self.0, __s)
5564            }
5565        }
5566        #[derive(Clone, Debug, Default)]
5567        pub struct PrivilegeAssignmentView<'a> {
5568            /// The principal (user email address or group name).
5569            ///
5570            /// For deleted principals, principal is empty while principal_id is populated.
5571            ///
5572            /// Field 1: `principal`
5573            pub principal: &'a str,
5574            /// The privileges assigned to the principal.
5575            ///
5576            /// Field 2: `privileges`
5577            pub privileges: ::buffa::RepeatedView<'a, &'a str>,
5578            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5579        }
5580        impl<'a> PrivilegeAssignmentView<'a> {
5581            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5582            ///
5583            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5584            /// and by generated sub-message decode arms with `depth - 1`.
5585            ///
5586            /// **Not part of the public API.** Named with a leading underscore to
5587            /// signal that it is for generated-code use only.
5588            #[doc(hidden)]
5589            pub fn _decode_depth(
5590                buf: &'a [u8],
5591                depth: u32,
5592            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5593                let mut view = Self::default();
5594                view._merge_into_view(buf, depth)?;
5595                ::core::result::Result::Ok(view)
5596            }
5597            /// Merge fields from `buf` into this view (proto merge semantics).
5598            ///
5599            /// Repeated fields append; singular fields last-wins; singular
5600            /// MESSAGE fields merge recursively. Used by sub-message decode
5601            /// arms when the same field appears multiple times on the wire.
5602            ///
5603            /// **Not part of the public API.**
5604            #[doc(hidden)]
5605            pub fn _merge_into_view(
5606                &mut self,
5607                buf: &'a [u8],
5608                depth: u32,
5609            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5610                let _ = depth;
5611                #[allow(unused_variables)]
5612                let view = self;
5613                let mut cur: &'a [u8] = buf;
5614                while !cur.is_empty() {
5615                    let before_tag = cur;
5616                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5617                    match tag.field_number() {
5618                        1u32 => {
5619                            if tag.wire_type()
5620                                != ::buffa::encoding::WireType::LengthDelimited
5621                            {
5622                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5623                                    field_number: 1u32,
5624                                    expected: 2u8,
5625                                    actual: tag.wire_type() as u8,
5626                                });
5627                            }
5628                            view.principal = ::buffa::types::borrow_str(&mut cur)?;
5629                        }
5630                        2u32 => {
5631                            if tag.wire_type()
5632                                != ::buffa::encoding::WireType::LengthDelimited
5633                            {
5634                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5635                                    field_number: 2u32,
5636                                    expected: 2u8,
5637                                    actual: tag.wire_type() as u8,
5638                                });
5639                            }
5640                            view.privileges.push(::buffa::types::borrow_str(&mut cur)?);
5641                        }
5642                        _ => {
5643                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5644                            let span_len = before_tag.len() - cur.len();
5645                            view.__buffa_unknown_fields
5646                                .push_raw(&before_tag[..span_len]);
5647                        }
5648                    }
5649                }
5650                ::core::result::Result::Ok(())
5651            }
5652        }
5653        impl<'a> ::buffa::MessageView<'a> for PrivilegeAssignmentView<'a> {
5654            type Owned = super::super::PrivilegeAssignment;
5655            fn decode_view(
5656                buf: &'a [u8],
5657            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5658                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5659            }
5660            fn decode_view_with_limit(
5661                buf: &'a [u8],
5662                depth: u32,
5663            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5664                Self::_decode_depth(buf, depth)
5665            }
5666            fn to_owned_message(&self) -> super::super::PrivilegeAssignment {
5667                self.to_owned_from_source(None)
5668            }
5669            #[allow(clippy::useless_conversion, clippy::needless_update)]
5670            fn to_owned_from_source(
5671                &self,
5672                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5673            ) -> super::super::PrivilegeAssignment {
5674                #[allow(unused_imports)]
5675                use ::buffa::alloc::string::ToString as _;
5676                let _ = __buffa_src;
5677                super::super::PrivilegeAssignment {
5678                    principal: self.principal.to_string(),
5679                    privileges: self.privileges.iter().map(|s| s.to_string()).collect(),
5680                    __buffa_unknown_fields: self
5681                        .__buffa_unknown_fields
5682                        .to_owned()
5683                        .unwrap_or_default()
5684                        .into(),
5685                    ..::core::default::Default::default()
5686                }
5687            }
5688        }
5689        impl<'a> ::buffa::ViewEncode<'a> for PrivilegeAssignmentView<'a> {
5690            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5691            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5692                #[allow(unused_imports)]
5693                use ::buffa::Enumeration as _;
5694                let mut size = 0u32;
5695                if !self.principal.is_empty() {
5696                    size
5697                        += 1u32
5698                            + ::buffa::types::string_encoded_len(&self.principal) as u32;
5699                }
5700                for v in &self.privileges {
5701                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5702                }
5703                size += self.__buffa_unknown_fields.encoded_len() as u32;
5704                size
5705            }
5706            #[allow(clippy::needless_borrow)]
5707            fn write_to(
5708                &self,
5709                _cache: &mut ::buffa::SizeCache,
5710                buf: &mut impl ::buffa::bytes::BufMut,
5711            ) {
5712                #[allow(unused_imports)]
5713                use ::buffa::Enumeration as _;
5714                if !self.principal.is_empty() {
5715                    ::buffa::encoding::Tag::new(
5716                            1u32,
5717                            ::buffa::encoding::WireType::LengthDelimited,
5718                        )
5719                        .encode(buf);
5720                    ::buffa::types::encode_string(&self.principal, buf);
5721                }
5722                for v in &self.privileges {
5723                    ::buffa::encoding::Tag::new(
5724                            2u32,
5725                            ::buffa::encoding::WireType::LengthDelimited,
5726                        )
5727                        .encode(buf);
5728                    ::buffa::types::encode_string(v, buf);
5729                }
5730                self.__buffa_unknown_fields.write_to(buf);
5731            }
5732        }
5733        /// Serializes this view as protobuf JSON.
5734        ///
5735        /// Implicit-presence fields with default values are omitted, `required`
5736        /// fields are always emitted, explicit-presence (`optional`) fields are
5737        /// emitted only when set, bytes fields are base64-encoded, and enum
5738        /// values are their proto name strings.
5739        ///
5740        /// This impl uses `serialize_map(None)` because the number of emitted
5741        /// fields depends on default-omission rules; serializers that require
5742        /// known map lengths (e.g. `bincode`) will return a runtime error.
5743        /// Use the owned message type for those formats.
5744        impl<'__a> ::serde::Serialize for PrivilegeAssignmentView<'__a> {
5745            fn serialize<__S: ::serde::Serializer>(
5746                &self,
5747                __s: __S,
5748            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5749                use ::serde::ser::SerializeMap as _;
5750                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5751                if !::buffa::json_helpers::skip_if::is_empty_str(self.principal) {
5752                    __map.serialize_entry("principal", self.principal)?;
5753                }
5754                if !self.privileges.is_empty() {
5755                    __map.serialize_entry("privileges", &*self.privileges)?;
5756                }
5757                __map.end()
5758            }
5759        }
5760        impl<'a> ::buffa::MessageName for PrivilegeAssignmentView<'a> {
5761            const PACKAGE: &'static str = "unitycatalog.shares.v1";
5762            const NAME: &'static str = "PrivilegeAssignment";
5763            const FULL_NAME: &'static str = "unitycatalog.shares.v1.PrivilegeAssignment";
5764            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.PrivilegeAssignment";
5765        }
5766        impl<'v> ::buffa::DefaultViewInstance for PrivilegeAssignmentView<'v> {
5767            fn default_view_instance<'a>() -> &'a Self
5768            where
5769                Self: 'a,
5770            {
5771                static VALUE: ::buffa::__private::OnceBox<
5772                    PrivilegeAssignmentView<'static>,
5773                > = ::buffa::__private::OnceBox::new();
5774                VALUE
5775                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5776                        <PrivilegeAssignmentView<'static>>::default(),
5777                    ))
5778            }
5779        }
5780        impl ::buffa::ViewReborrow for PrivilegeAssignmentView<'static> {
5781            type Reborrowed<'b> = PrivilegeAssignmentView<'b>;
5782            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5783                this
5784            }
5785        }
5786        /** Self-contained, `'static` owned view of a `PrivilegeAssignment` message.
5787
5788 Wraps [`::buffa::OwnedView`]`<`[`PrivilegeAssignmentView`]`<'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.
5789
5790 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`PrivilegeAssignmentView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5791        #[derive(Clone, Debug)]
5792        pub struct PrivilegeAssignmentOwnedView(
5793            ::buffa::OwnedView<PrivilegeAssignmentView<'static>>,
5794        );
5795        impl PrivilegeAssignmentOwnedView {
5796            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5797            ///
5798            /// The view borrows directly from the buffer's data; the buffer is
5799            /// retained inside the returned handle.
5800            ///
5801            /// # Errors
5802            ///
5803            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5804            /// protobuf data.
5805            pub fn decode(
5806                bytes: ::buffa::bytes::Bytes,
5807            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5808                ::core::result::Result::Ok(
5809                    PrivilegeAssignmentOwnedView(::buffa::OwnedView::decode(bytes)?),
5810                )
5811            }
5812            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5813            /// max message size).
5814            ///
5815            /// # Errors
5816            ///
5817            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5818            /// exceeds the configured limits.
5819            pub fn decode_with_options(
5820                bytes: ::buffa::bytes::Bytes,
5821                opts: &::buffa::DecodeOptions,
5822            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5823                ::core::result::Result::Ok(
5824                    PrivilegeAssignmentOwnedView(
5825                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5826                    ),
5827                )
5828            }
5829            /// Build from an owned message via an encode → decode round-trip.
5830            ///
5831            /// # Errors
5832            ///
5833            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5834            /// somehow invalid (should not happen for well-formed messages).
5835            pub fn from_owned(
5836                msg: &super::super::PrivilegeAssignment,
5837            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5838                ::core::result::Result::Ok(
5839                    PrivilegeAssignmentOwnedView(::buffa::OwnedView::from_owned(msg)?),
5840                )
5841            }
5842            /// Borrow the full [`PrivilegeAssignmentView`] with its lifetime tied to `&self`.
5843            #[must_use]
5844            pub fn view(&self) -> &PrivilegeAssignmentView<'_> {
5845                self.0.reborrow()
5846            }
5847            /// Convert to the owned message type.
5848            #[must_use]
5849            pub fn to_owned_message(&self) -> super::super::PrivilegeAssignment {
5850                self.0.to_owned_message()
5851            }
5852            /// The underlying bytes buffer.
5853            #[must_use]
5854            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5855                self.0.bytes()
5856            }
5857            /// Consume the handle, returning the underlying bytes buffer.
5858            #[must_use]
5859            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5860                self.0.into_bytes()
5861            }
5862            /// The principal (user email address or group name).
5863            ///
5864            /// For deleted principals, principal is empty while principal_id is populated.
5865            ///
5866            /// Field 1: `principal`
5867            #[must_use]
5868            pub fn principal(&self) -> &'_ str {
5869                self.0.reborrow().principal
5870            }
5871            /// The privileges assigned to the principal.
5872            ///
5873            /// Field 2: `privileges`
5874            #[must_use]
5875            pub fn privileges(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
5876                &self.0.reborrow().privileges
5877            }
5878        }
5879        impl ::core::convert::From<::buffa::OwnedView<PrivilegeAssignmentView<'static>>>
5880        for PrivilegeAssignmentOwnedView {
5881            fn from(
5882                inner: ::buffa::OwnedView<PrivilegeAssignmentView<'static>>,
5883            ) -> Self {
5884                PrivilegeAssignmentOwnedView(inner)
5885            }
5886        }
5887        impl ::core::convert::From<PrivilegeAssignmentOwnedView>
5888        for ::buffa::OwnedView<PrivilegeAssignmentView<'static>> {
5889            fn from(wrapper: PrivilegeAssignmentOwnedView) -> Self {
5890                wrapper.0
5891            }
5892        }
5893        impl ::core::convert::AsRef<::buffa::OwnedView<PrivilegeAssignmentView<'static>>>
5894        for PrivilegeAssignmentOwnedView {
5895            fn as_ref(&self) -> &::buffa::OwnedView<PrivilegeAssignmentView<'static>> {
5896                &self.0
5897            }
5898        }
5899        impl ::buffa::HasMessageView for super::super::PrivilegeAssignment {
5900            type View<'a> = PrivilegeAssignmentView<'a>;
5901            type ViewHandle = PrivilegeAssignmentOwnedView;
5902        }
5903        impl ::serde::Serialize for PrivilegeAssignmentOwnedView {
5904            fn serialize<__S: ::serde::Serializer>(
5905                &self,
5906                __s: __S,
5907            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5908                ::serde::Serialize::serialize(&self.0, __s)
5909            }
5910        }
5911        #[derive(Clone, Debug, Default)]
5912        pub struct PermissionsChangeView<'a> {
5913            /// The principal (user email address or group name).
5914            ///
5915            /// Field 1: `principal`
5916            pub principal: &'a str,
5917            /// The set of privileges to add.
5918            ///
5919            /// Field 2: `add`
5920            pub add: ::buffa::RepeatedView<'a, &'a str>,
5921            /// The set of privileges to remove.
5922            ///
5923            /// Field 3: `remove`
5924            pub remove: ::buffa::RepeatedView<'a, &'a str>,
5925            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5926        }
5927        impl<'a> PermissionsChangeView<'a> {
5928            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5929            ///
5930            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5931            /// and by generated sub-message decode arms with `depth - 1`.
5932            ///
5933            /// **Not part of the public API.** Named with a leading underscore to
5934            /// signal that it is for generated-code use only.
5935            #[doc(hidden)]
5936            pub fn _decode_depth(
5937                buf: &'a [u8],
5938                depth: u32,
5939            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5940                let mut view = Self::default();
5941                view._merge_into_view(buf, depth)?;
5942                ::core::result::Result::Ok(view)
5943            }
5944            /// Merge fields from `buf` into this view (proto merge semantics).
5945            ///
5946            /// Repeated fields append; singular fields last-wins; singular
5947            /// MESSAGE fields merge recursively. Used by sub-message decode
5948            /// arms when the same field appears multiple times on the wire.
5949            ///
5950            /// **Not part of the public API.**
5951            #[doc(hidden)]
5952            pub fn _merge_into_view(
5953                &mut self,
5954                buf: &'a [u8],
5955                depth: u32,
5956            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5957                let _ = depth;
5958                #[allow(unused_variables)]
5959                let view = self;
5960                let mut cur: &'a [u8] = buf;
5961                while !cur.is_empty() {
5962                    let before_tag = cur;
5963                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5964                    match tag.field_number() {
5965                        1u32 => {
5966                            if tag.wire_type()
5967                                != ::buffa::encoding::WireType::LengthDelimited
5968                            {
5969                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5970                                    field_number: 1u32,
5971                                    expected: 2u8,
5972                                    actual: tag.wire_type() as u8,
5973                                });
5974                            }
5975                            view.principal = ::buffa::types::borrow_str(&mut cur)?;
5976                        }
5977                        2u32 => {
5978                            if tag.wire_type()
5979                                != ::buffa::encoding::WireType::LengthDelimited
5980                            {
5981                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5982                                    field_number: 2u32,
5983                                    expected: 2u8,
5984                                    actual: tag.wire_type() as u8,
5985                                });
5986                            }
5987                            view.add.push(::buffa::types::borrow_str(&mut cur)?);
5988                        }
5989                        3u32 => {
5990                            if tag.wire_type()
5991                                != ::buffa::encoding::WireType::LengthDelimited
5992                            {
5993                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5994                                    field_number: 3u32,
5995                                    expected: 2u8,
5996                                    actual: tag.wire_type() as u8,
5997                                });
5998                            }
5999                            view.remove.push(::buffa::types::borrow_str(&mut cur)?);
6000                        }
6001                        _ => {
6002                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6003                            let span_len = before_tag.len() - cur.len();
6004                            view.__buffa_unknown_fields
6005                                .push_raw(&before_tag[..span_len]);
6006                        }
6007                    }
6008                }
6009                ::core::result::Result::Ok(())
6010            }
6011        }
6012        impl<'a> ::buffa::MessageView<'a> for PermissionsChangeView<'a> {
6013            type Owned = super::super::PermissionsChange;
6014            fn decode_view(
6015                buf: &'a [u8],
6016            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6017                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6018            }
6019            fn decode_view_with_limit(
6020                buf: &'a [u8],
6021                depth: u32,
6022            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6023                Self::_decode_depth(buf, depth)
6024            }
6025            fn to_owned_message(&self) -> super::super::PermissionsChange {
6026                self.to_owned_from_source(None)
6027            }
6028            #[allow(clippy::useless_conversion, clippy::needless_update)]
6029            fn to_owned_from_source(
6030                &self,
6031                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6032            ) -> super::super::PermissionsChange {
6033                #[allow(unused_imports)]
6034                use ::buffa::alloc::string::ToString as _;
6035                let _ = __buffa_src;
6036                super::super::PermissionsChange {
6037                    principal: self.principal.to_string(),
6038                    add: self.add.iter().map(|s| s.to_string()).collect(),
6039                    remove: self.remove.iter().map(|s| s.to_string()).collect(),
6040                    __buffa_unknown_fields: self
6041                        .__buffa_unknown_fields
6042                        .to_owned()
6043                        .unwrap_or_default()
6044                        .into(),
6045                    ..::core::default::Default::default()
6046                }
6047            }
6048        }
6049        impl<'a> ::buffa::ViewEncode<'a> for PermissionsChangeView<'a> {
6050            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6051            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6052                #[allow(unused_imports)]
6053                use ::buffa::Enumeration as _;
6054                let mut size = 0u32;
6055                if !self.principal.is_empty() {
6056                    size
6057                        += 1u32
6058                            + ::buffa::types::string_encoded_len(&self.principal) as u32;
6059                }
6060                for v in &self.add {
6061                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6062                }
6063                for v in &self.remove {
6064                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6065                }
6066                size += self.__buffa_unknown_fields.encoded_len() as u32;
6067                size
6068            }
6069            #[allow(clippy::needless_borrow)]
6070            fn write_to(
6071                &self,
6072                _cache: &mut ::buffa::SizeCache,
6073                buf: &mut impl ::buffa::bytes::BufMut,
6074            ) {
6075                #[allow(unused_imports)]
6076                use ::buffa::Enumeration as _;
6077                if !self.principal.is_empty() {
6078                    ::buffa::encoding::Tag::new(
6079                            1u32,
6080                            ::buffa::encoding::WireType::LengthDelimited,
6081                        )
6082                        .encode(buf);
6083                    ::buffa::types::encode_string(&self.principal, buf);
6084                }
6085                for v in &self.add {
6086                    ::buffa::encoding::Tag::new(
6087                            2u32,
6088                            ::buffa::encoding::WireType::LengthDelimited,
6089                        )
6090                        .encode(buf);
6091                    ::buffa::types::encode_string(v, buf);
6092                }
6093                for v in &self.remove {
6094                    ::buffa::encoding::Tag::new(
6095                            3u32,
6096                            ::buffa::encoding::WireType::LengthDelimited,
6097                        )
6098                        .encode(buf);
6099                    ::buffa::types::encode_string(v, buf);
6100                }
6101                self.__buffa_unknown_fields.write_to(buf);
6102            }
6103        }
6104        /// Serializes this view as protobuf JSON.
6105        ///
6106        /// Implicit-presence fields with default values are omitted, `required`
6107        /// fields are always emitted, explicit-presence (`optional`) fields are
6108        /// emitted only when set, bytes fields are base64-encoded, and enum
6109        /// values are their proto name strings.
6110        ///
6111        /// This impl uses `serialize_map(None)` because the number of emitted
6112        /// fields depends on default-omission rules; serializers that require
6113        /// known map lengths (e.g. `bincode`) will return a runtime error.
6114        /// Use the owned message type for those formats.
6115        impl<'__a> ::serde::Serialize for PermissionsChangeView<'__a> {
6116            fn serialize<__S: ::serde::Serializer>(
6117                &self,
6118                __s: __S,
6119            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6120                use ::serde::ser::SerializeMap as _;
6121                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6122                if !::buffa::json_helpers::skip_if::is_empty_str(self.principal) {
6123                    __map.serialize_entry("principal", self.principal)?;
6124                }
6125                if !self.add.is_empty() {
6126                    __map.serialize_entry("add", &*self.add)?;
6127                }
6128                if !self.remove.is_empty() {
6129                    __map.serialize_entry("remove", &*self.remove)?;
6130                }
6131                __map.end()
6132            }
6133        }
6134        impl<'a> ::buffa::MessageName for PermissionsChangeView<'a> {
6135            const PACKAGE: &'static str = "unitycatalog.shares.v1";
6136            const NAME: &'static str = "PermissionsChange";
6137            const FULL_NAME: &'static str = "unitycatalog.shares.v1.PermissionsChange";
6138            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.PermissionsChange";
6139        }
6140        impl<'v> ::buffa::DefaultViewInstance for PermissionsChangeView<'v> {
6141            fn default_view_instance<'a>() -> &'a Self
6142            where
6143                Self: 'a,
6144            {
6145                static VALUE: ::buffa::__private::OnceBox<
6146                    PermissionsChangeView<'static>,
6147                > = ::buffa::__private::OnceBox::new();
6148                VALUE
6149                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6150                        <PermissionsChangeView<'static>>::default(),
6151                    ))
6152            }
6153        }
6154        impl ::buffa::ViewReborrow for PermissionsChangeView<'static> {
6155            type Reborrowed<'b> = PermissionsChangeView<'b>;
6156            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6157                this
6158            }
6159        }
6160        /** Self-contained, `'static` owned view of a `PermissionsChange` message.
6161
6162 Wraps [`::buffa::OwnedView`]`<`[`PermissionsChangeView`]`<'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.
6163
6164 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`PermissionsChangeView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6165        #[derive(Clone, Debug)]
6166        pub struct PermissionsChangeOwnedView(
6167            ::buffa::OwnedView<PermissionsChangeView<'static>>,
6168        );
6169        impl PermissionsChangeOwnedView {
6170            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6171            ///
6172            /// The view borrows directly from the buffer's data; the buffer is
6173            /// retained inside the returned handle.
6174            ///
6175            /// # Errors
6176            ///
6177            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6178            /// protobuf data.
6179            pub fn decode(
6180                bytes: ::buffa::bytes::Bytes,
6181            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6182                ::core::result::Result::Ok(
6183                    PermissionsChangeOwnedView(::buffa::OwnedView::decode(bytes)?),
6184                )
6185            }
6186            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6187            /// max message size).
6188            ///
6189            /// # Errors
6190            ///
6191            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6192            /// exceeds the configured limits.
6193            pub fn decode_with_options(
6194                bytes: ::buffa::bytes::Bytes,
6195                opts: &::buffa::DecodeOptions,
6196            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6197                ::core::result::Result::Ok(
6198                    PermissionsChangeOwnedView(
6199                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6200                    ),
6201                )
6202            }
6203            /// Build from an owned message via an encode → decode round-trip.
6204            ///
6205            /// # Errors
6206            ///
6207            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6208            /// somehow invalid (should not happen for well-formed messages).
6209            pub fn from_owned(
6210                msg: &super::super::PermissionsChange,
6211            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6212                ::core::result::Result::Ok(
6213                    PermissionsChangeOwnedView(::buffa::OwnedView::from_owned(msg)?),
6214                )
6215            }
6216            /// Borrow the full [`PermissionsChangeView`] with its lifetime tied to `&self`.
6217            #[must_use]
6218            pub fn view(&self) -> &PermissionsChangeView<'_> {
6219                self.0.reborrow()
6220            }
6221            /// Convert to the owned message type.
6222            #[must_use]
6223            pub fn to_owned_message(&self) -> super::super::PermissionsChange {
6224                self.0.to_owned_message()
6225            }
6226            /// The underlying bytes buffer.
6227            #[must_use]
6228            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6229                self.0.bytes()
6230            }
6231            /// Consume the handle, returning the underlying bytes buffer.
6232            #[must_use]
6233            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6234                self.0.into_bytes()
6235            }
6236            /// The principal (user email address or group name).
6237            ///
6238            /// Field 1: `principal`
6239            #[must_use]
6240            pub fn principal(&self) -> &'_ str {
6241                self.0.reborrow().principal
6242            }
6243            /// The set of privileges to add.
6244            ///
6245            /// Field 2: `add`
6246            #[must_use]
6247            pub fn add(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
6248                &self.0.reborrow().add
6249            }
6250            /// The set of privileges to remove.
6251            ///
6252            /// Field 3: `remove`
6253            #[must_use]
6254            pub fn remove(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
6255                &self.0.reborrow().remove
6256            }
6257        }
6258        impl ::core::convert::From<::buffa::OwnedView<PermissionsChangeView<'static>>>
6259        for PermissionsChangeOwnedView {
6260            fn from(inner: ::buffa::OwnedView<PermissionsChangeView<'static>>) -> Self {
6261                PermissionsChangeOwnedView(inner)
6262            }
6263        }
6264        impl ::core::convert::From<PermissionsChangeOwnedView>
6265        for ::buffa::OwnedView<PermissionsChangeView<'static>> {
6266            fn from(wrapper: PermissionsChangeOwnedView) -> Self {
6267                wrapper.0
6268            }
6269        }
6270        impl ::core::convert::AsRef<::buffa::OwnedView<PermissionsChangeView<'static>>>
6271        for PermissionsChangeOwnedView {
6272            fn as_ref(&self) -> &::buffa::OwnedView<PermissionsChangeView<'static>> {
6273                &self.0
6274            }
6275        }
6276        impl ::buffa::HasMessageView for super::super::PermissionsChange {
6277            type View<'a> = PermissionsChangeView<'a>;
6278            type ViewHandle = PermissionsChangeOwnedView;
6279        }
6280        impl ::serde::Serialize for PermissionsChangeOwnedView {
6281            fn serialize<__S: ::serde::Serializer>(
6282                &self,
6283                __s: __S,
6284            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6285                ::serde::Serialize::serialize(&self.0, __s)
6286            }
6287        }
6288        /// Request to list shares.
6289        #[derive(Clone, Debug, Default)]
6290        pub struct ListSharesRequestView<'a> {
6291            /// The maximum number of results per page that should be returned.
6292            ///
6293            /// Field 1: `max_results`
6294            pub max_results: ::core::option::Option<i32>,
6295            /// Opaque pagination token to go to next page based on previous query.
6296            ///
6297            /// Field 2: `page_token`
6298            pub page_token: ::core::option::Option<&'a str>,
6299            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6300        }
6301        impl<'a> ListSharesRequestView<'a> {
6302            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
6303            ///
6304            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
6305            /// and by generated sub-message decode arms with `depth - 1`.
6306            ///
6307            /// **Not part of the public API.** Named with a leading underscore to
6308            /// signal that it is for generated-code use only.
6309            #[doc(hidden)]
6310            pub fn _decode_depth(
6311                buf: &'a [u8],
6312                depth: u32,
6313            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6314                let mut view = Self::default();
6315                view._merge_into_view(buf, depth)?;
6316                ::core::result::Result::Ok(view)
6317            }
6318            /// Merge fields from `buf` into this view (proto merge semantics).
6319            ///
6320            /// Repeated fields append; singular fields last-wins; singular
6321            /// MESSAGE fields merge recursively. Used by sub-message decode
6322            /// arms when the same field appears multiple times on the wire.
6323            ///
6324            /// **Not part of the public API.**
6325            #[doc(hidden)]
6326            pub fn _merge_into_view(
6327                &mut self,
6328                buf: &'a [u8],
6329                depth: u32,
6330            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6331                let _ = depth;
6332                #[allow(unused_variables)]
6333                let view = self;
6334                let mut cur: &'a [u8] = buf;
6335                while !cur.is_empty() {
6336                    let before_tag = cur;
6337                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6338                    match tag.field_number() {
6339                        1u32 => {
6340                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6341                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6342                                    field_number: 1u32,
6343                                    expected: 0u8,
6344                                    actual: tag.wire_type() as u8,
6345                                });
6346                            }
6347                            view.max_results = Some(
6348                                ::buffa::types::decode_int32(&mut cur)?,
6349                            );
6350                        }
6351                        2u32 => {
6352                            if tag.wire_type()
6353                                != ::buffa::encoding::WireType::LengthDelimited
6354                            {
6355                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6356                                    field_number: 2u32,
6357                                    expected: 2u8,
6358                                    actual: tag.wire_type() as u8,
6359                                });
6360                            }
6361                            view.page_token = Some(
6362                                ::buffa::types::borrow_str(&mut cur)?,
6363                            );
6364                        }
6365                        _ => {
6366                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6367                            let span_len = before_tag.len() - cur.len();
6368                            view.__buffa_unknown_fields
6369                                .push_raw(&before_tag[..span_len]);
6370                        }
6371                    }
6372                }
6373                ::core::result::Result::Ok(())
6374            }
6375        }
6376        impl<'a> ::buffa::MessageView<'a> for ListSharesRequestView<'a> {
6377            type Owned = super::super::ListSharesRequest;
6378            fn decode_view(
6379                buf: &'a [u8],
6380            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6381                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6382            }
6383            fn decode_view_with_limit(
6384                buf: &'a [u8],
6385                depth: u32,
6386            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6387                Self::_decode_depth(buf, depth)
6388            }
6389            fn to_owned_message(&self) -> super::super::ListSharesRequest {
6390                self.to_owned_from_source(None)
6391            }
6392            #[allow(clippy::useless_conversion, clippy::needless_update)]
6393            fn to_owned_from_source(
6394                &self,
6395                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6396            ) -> super::super::ListSharesRequest {
6397                #[allow(unused_imports)]
6398                use ::buffa::alloc::string::ToString as _;
6399                let _ = __buffa_src;
6400                super::super::ListSharesRequest {
6401                    max_results: self.max_results,
6402                    page_token: self.page_token.map(|s| s.to_string()),
6403                    __buffa_unknown_fields: self
6404                        .__buffa_unknown_fields
6405                        .to_owned()
6406                        .unwrap_or_default()
6407                        .into(),
6408                    ..::core::default::Default::default()
6409                }
6410            }
6411        }
6412        impl<'a> ::buffa::ViewEncode<'a> for ListSharesRequestView<'a> {
6413            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6414            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6415                #[allow(unused_imports)]
6416                use ::buffa::Enumeration as _;
6417                let mut size = 0u32;
6418                if let Some(v) = self.max_results {
6419                    size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
6420                }
6421                if let Some(ref v) = self.page_token {
6422                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6423                }
6424                size += self.__buffa_unknown_fields.encoded_len() as u32;
6425                size
6426            }
6427            #[allow(clippy::needless_borrow)]
6428            fn write_to(
6429                &self,
6430                _cache: &mut ::buffa::SizeCache,
6431                buf: &mut impl ::buffa::bytes::BufMut,
6432            ) {
6433                #[allow(unused_imports)]
6434                use ::buffa::Enumeration as _;
6435                if let Some(v) = self.max_results {
6436                    ::buffa::encoding::Tag::new(
6437                            1u32,
6438                            ::buffa::encoding::WireType::Varint,
6439                        )
6440                        .encode(buf);
6441                    ::buffa::types::encode_int32(v, buf);
6442                }
6443                if let Some(ref v) = self.page_token {
6444                    ::buffa::encoding::Tag::new(
6445                            2u32,
6446                            ::buffa::encoding::WireType::LengthDelimited,
6447                        )
6448                        .encode(buf);
6449                    ::buffa::types::encode_string(v, buf);
6450                }
6451                self.__buffa_unknown_fields.write_to(buf);
6452            }
6453        }
6454        /// Serializes this view as protobuf JSON.
6455        ///
6456        /// Implicit-presence fields with default values are omitted, `required`
6457        /// fields are always emitted, explicit-presence (`optional`) fields are
6458        /// emitted only when set, bytes fields are base64-encoded, and enum
6459        /// values are their proto name strings.
6460        ///
6461        /// This impl uses `serialize_map(None)` because the number of emitted
6462        /// fields depends on default-omission rules; serializers that require
6463        /// known map lengths (e.g. `bincode`) will return a runtime error.
6464        /// Use the owned message type for those formats.
6465        impl<'__a> ::serde::Serialize for ListSharesRequestView<'__a> {
6466            fn serialize<__S: ::serde::Serializer>(
6467                &self,
6468                __s: __S,
6469            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6470                use ::serde::ser::SerializeMap as _;
6471                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6472                if let ::core::option::Option::Some(__v) = self.max_results {
6473                    struct _W(i32);
6474                    impl ::serde::Serialize for _W {
6475                        fn serialize<__S: ::serde::Serializer>(
6476                            &self,
6477                            __s: __S,
6478                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
6479                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
6480                        }
6481                    }
6482                    __map.serialize_entry("max_results", &_W(__v))?;
6483                }
6484                if let ::core::option::Option::Some(__v) = self.page_token {
6485                    __map.serialize_entry("page_token", __v)?;
6486                }
6487                __map.end()
6488            }
6489        }
6490        impl<'a> ::buffa::MessageName for ListSharesRequestView<'a> {
6491            const PACKAGE: &'static str = "unitycatalog.shares.v1";
6492            const NAME: &'static str = "ListSharesRequest";
6493            const FULL_NAME: &'static str = "unitycatalog.shares.v1.ListSharesRequest";
6494            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.ListSharesRequest";
6495        }
6496        impl<'v> ::buffa::DefaultViewInstance for ListSharesRequestView<'v> {
6497            fn default_view_instance<'a>() -> &'a Self
6498            where
6499                Self: 'a,
6500            {
6501                static VALUE: ::buffa::__private::OnceBox<
6502                    ListSharesRequestView<'static>,
6503                > = ::buffa::__private::OnceBox::new();
6504                VALUE
6505                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6506                        <ListSharesRequestView<'static>>::default(),
6507                    ))
6508            }
6509        }
6510        impl ::buffa::ViewReborrow for ListSharesRequestView<'static> {
6511            type Reborrowed<'b> = ListSharesRequestView<'b>;
6512            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6513                this
6514            }
6515        }
6516        /** Self-contained, `'static` owned view of a `ListSharesRequest` message.
6517
6518 Wraps [`::buffa::OwnedView`]`<`[`ListSharesRequestView`]`<'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.
6519
6520 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListSharesRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6521        #[derive(Clone, Debug)]
6522        pub struct ListSharesRequestOwnedView(
6523            ::buffa::OwnedView<ListSharesRequestView<'static>>,
6524        );
6525        impl ListSharesRequestOwnedView {
6526            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6527            ///
6528            /// The view borrows directly from the buffer's data; the buffer is
6529            /// retained inside the returned handle.
6530            ///
6531            /// # Errors
6532            ///
6533            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6534            /// protobuf data.
6535            pub fn decode(
6536                bytes: ::buffa::bytes::Bytes,
6537            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6538                ::core::result::Result::Ok(
6539                    ListSharesRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
6540                )
6541            }
6542            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6543            /// max message size).
6544            ///
6545            /// # Errors
6546            ///
6547            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6548            /// exceeds the configured limits.
6549            pub fn decode_with_options(
6550                bytes: ::buffa::bytes::Bytes,
6551                opts: &::buffa::DecodeOptions,
6552            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6553                ::core::result::Result::Ok(
6554                    ListSharesRequestOwnedView(
6555                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6556                    ),
6557                )
6558            }
6559            /// Build from an owned message via an encode → decode round-trip.
6560            ///
6561            /// # Errors
6562            ///
6563            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6564            /// somehow invalid (should not happen for well-formed messages).
6565            pub fn from_owned(
6566                msg: &super::super::ListSharesRequest,
6567            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6568                ::core::result::Result::Ok(
6569                    ListSharesRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
6570                )
6571            }
6572            /// Borrow the full [`ListSharesRequestView`] with its lifetime tied to `&self`.
6573            #[must_use]
6574            pub fn view(&self) -> &ListSharesRequestView<'_> {
6575                self.0.reborrow()
6576            }
6577            /// Convert to the owned message type.
6578            #[must_use]
6579            pub fn to_owned_message(&self) -> super::super::ListSharesRequest {
6580                self.0.to_owned_message()
6581            }
6582            /// The underlying bytes buffer.
6583            #[must_use]
6584            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6585                self.0.bytes()
6586            }
6587            /// Consume the handle, returning the underlying bytes buffer.
6588            #[must_use]
6589            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6590                self.0.into_bytes()
6591            }
6592            /// The maximum number of results per page that should be returned.
6593            ///
6594            /// Field 1: `max_results`
6595            #[must_use]
6596            pub fn max_results(&self) -> ::core::option::Option<i32> {
6597                self.0.reborrow().max_results
6598            }
6599            /// Opaque pagination token to go to next page based on previous query.
6600            ///
6601            /// Field 2: `page_token`
6602            #[must_use]
6603            pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
6604                self.0.reborrow().page_token
6605            }
6606        }
6607        impl ::core::convert::From<::buffa::OwnedView<ListSharesRequestView<'static>>>
6608        for ListSharesRequestOwnedView {
6609            fn from(inner: ::buffa::OwnedView<ListSharesRequestView<'static>>) -> Self {
6610                ListSharesRequestOwnedView(inner)
6611            }
6612        }
6613        impl ::core::convert::From<ListSharesRequestOwnedView>
6614        for ::buffa::OwnedView<ListSharesRequestView<'static>> {
6615            fn from(wrapper: ListSharesRequestOwnedView) -> Self {
6616                wrapper.0
6617            }
6618        }
6619        impl ::core::convert::AsRef<::buffa::OwnedView<ListSharesRequestView<'static>>>
6620        for ListSharesRequestOwnedView {
6621            fn as_ref(&self) -> &::buffa::OwnedView<ListSharesRequestView<'static>> {
6622                &self.0
6623            }
6624        }
6625        impl ::buffa::HasMessageView for super::super::ListSharesRequest {
6626            type View<'a> = ListSharesRequestView<'a>;
6627            type ViewHandle = ListSharesRequestOwnedView;
6628        }
6629        impl ::serde::Serialize for ListSharesRequestOwnedView {
6630            fn serialize<__S: ::serde::Serializer>(
6631                &self,
6632                __s: __S,
6633            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6634                ::serde::Serialize::serialize(&self.0, __s)
6635            }
6636        }
6637        /// Response to list shares.
6638        #[derive(Clone, Debug, Default)]
6639        pub struct ListSharesResponseView<'a> {
6640            /// List of shares.
6641            ///
6642            /// Field 1: `shares`
6643            pub shares: ::buffa::RepeatedView<
6644                'a,
6645                super::super::__buffa::view::ShareView<'a>,
6646            >,
6647            /// Opaque pagination token to go to next page based on previous query.
6648            ///
6649            /// Field 2: `next_page_token`
6650            pub next_page_token: ::core::option::Option<&'a str>,
6651            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6652        }
6653        impl<'a> ListSharesResponseView<'a> {
6654            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
6655            ///
6656            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
6657            /// and by generated sub-message decode arms with `depth - 1`.
6658            ///
6659            /// **Not part of the public API.** Named with a leading underscore to
6660            /// signal that it is for generated-code use only.
6661            #[doc(hidden)]
6662            pub fn _decode_depth(
6663                buf: &'a [u8],
6664                depth: u32,
6665            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6666                let mut view = Self::default();
6667                view._merge_into_view(buf, depth)?;
6668                ::core::result::Result::Ok(view)
6669            }
6670            /// Merge fields from `buf` into this view (proto merge semantics).
6671            ///
6672            /// Repeated fields append; singular fields last-wins; singular
6673            /// MESSAGE fields merge recursively. Used by sub-message decode
6674            /// arms when the same field appears multiple times on the wire.
6675            ///
6676            /// **Not part of the public API.**
6677            #[doc(hidden)]
6678            pub fn _merge_into_view(
6679                &mut self,
6680                buf: &'a [u8],
6681                depth: u32,
6682            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6683                let _ = depth;
6684                #[allow(unused_variables)]
6685                let view = self;
6686                let mut cur: &'a [u8] = buf;
6687                while !cur.is_empty() {
6688                    let before_tag = cur;
6689                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6690                    match tag.field_number() {
6691                        2u32 => {
6692                            if tag.wire_type()
6693                                != ::buffa::encoding::WireType::LengthDelimited
6694                            {
6695                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6696                                    field_number: 2u32,
6697                                    expected: 2u8,
6698                                    actual: tag.wire_type() as u8,
6699                                });
6700                            }
6701                            view.next_page_token = Some(
6702                                ::buffa::types::borrow_str(&mut cur)?,
6703                            );
6704                        }
6705                        1u32 => {
6706                            if tag.wire_type()
6707                                != ::buffa::encoding::WireType::LengthDelimited
6708                            {
6709                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6710                                    field_number: 1u32,
6711                                    expected: 2u8,
6712                                    actual: tag.wire_type() as u8,
6713                                });
6714                            }
6715                            if depth == 0 {
6716                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
6717                            }
6718                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
6719                            view.shares
6720                                .push(
6721                                    super::super::__buffa::view::ShareView::_decode_depth(
6722                                        sub,
6723                                        depth - 1,
6724                                    )?,
6725                                );
6726                        }
6727                        _ => {
6728                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6729                            let span_len = before_tag.len() - cur.len();
6730                            view.__buffa_unknown_fields
6731                                .push_raw(&before_tag[..span_len]);
6732                        }
6733                    }
6734                }
6735                ::core::result::Result::Ok(())
6736            }
6737        }
6738        impl<'a> ::buffa::MessageView<'a> for ListSharesResponseView<'a> {
6739            type Owned = super::super::ListSharesResponse;
6740            fn decode_view(
6741                buf: &'a [u8],
6742            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6743                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6744            }
6745            fn decode_view_with_limit(
6746                buf: &'a [u8],
6747                depth: u32,
6748            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6749                Self::_decode_depth(buf, depth)
6750            }
6751            fn to_owned_message(&self) -> super::super::ListSharesResponse {
6752                self.to_owned_from_source(None)
6753            }
6754            #[allow(clippy::useless_conversion, clippy::needless_update)]
6755            fn to_owned_from_source(
6756                &self,
6757                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6758            ) -> super::super::ListSharesResponse {
6759                #[allow(unused_imports)]
6760                use ::buffa::alloc::string::ToString as _;
6761                let _ = __buffa_src;
6762                super::super::ListSharesResponse {
6763                    shares: self
6764                        .shares
6765                        .iter()
6766                        .map(|v| v.to_owned_from_source(__buffa_src))
6767                        .collect(),
6768                    next_page_token: self.next_page_token.map(|s| s.to_string()),
6769                    __buffa_unknown_fields: self
6770                        .__buffa_unknown_fields
6771                        .to_owned()
6772                        .unwrap_or_default()
6773                        .into(),
6774                    ..::core::default::Default::default()
6775                }
6776            }
6777        }
6778        impl<'a> ::buffa::ViewEncode<'a> for ListSharesResponseView<'a> {
6779            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6780            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6781                #[allow(unused_imports)]
6782                use ::buffa::Enumeration as _;
6783                let mut size = 0u32;
6784                for v in &self.shares {
6785                    let __slot = __cache.reserve();
6786                    let inner_size = v.compute_size(__cache);
6787                    __cache.set(__slot, inner_size);
6788                    size
6789                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6790                            + inner_size;
6791                }
6792                if let Some(ref v) = self.next_page_token {
6793                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6794                }
6795                size += self.__buffa_unknown_fields.encoded_len() as u32;
6796                size
6797            }
6798            #[allow(clippy::needless_borrow)]
6799            fn write_to(
6800                &self,
6801                __cache: &mut ::buffa::SizeCache,
6802                buf: &mut impl ::buffa::bytes::BufMut,
6803            ) {
6804                #[allow(unused_imports)]
6805                use ::buffa::Enumeration as _;
6806                for v in &self.shares {
6807                    ::buffa::encoding::Tag::new(
6808                            1u32,
6809                            ::buffa::encoding::WireType::LengthDelimited,
6810                        )
6811                        .encode(buf);
6812                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
6813                    v.write_to(__cache, buf);
6814                }
6815                if let Some(ref v) = self.next_page_token {
6816                    ::buffa::encoding::Tag::new(
6817                            2u32,
6818                            ::buffa::encoding::WireType::LengthDelimited,
6819                        )
6820                        .encode(buf);
6821                    ::buffa::types::encode_string(v, buf);
6822                }
6823                self.__buffa_unknown_fields.write_to(buf);
6824            }
6825        }
6826        /// Serializes this view as protobuf JSON.
6827        ///
6828        /// Implicit-presence fields with default values are omitted, `required`
6829        /// fields are always emitted, explicit-presence (`optional`) fields are
6830        /// emitted only when set, bytes fields are base64-encoded, and enum
6831        /// values are their proto name strings.
6832        ///
6833        /// This impl uses `serialize_map(None)` because the number of emitted
6834        /// fields depends on default-omission rules; serializers that require
6835        /// known map lengths (e.g. `bincode`) will return a runtime error.
6836        /// Use the owned message type for those formats.
6837        impl<'__a> ::serde::Serialize for ListSharesResponseView<'__a> {
6838            fn serialize<__S: ::serde::Serializer>(
6839                &self,
6840                __s: __S,
6841            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6842                use ::serde::ser::SerializeMap as _;
6843                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6844                if !self.shares.is_empty() {
6845                    __map.serialize_entry("shares", &*self.shares)?;
6846                }
6847                if let ::core::option::Option::Some(__v) = self.next_page_token {
6848                    __map.serialize_entry("next_page_token", __v)?;
6849                }
6850                __map.end()
6851            }
6852        }
6853        impl<'a> ::buffa::MessageName for ListSharesResponseView<'a> {
6854            const PACKAGE: &'static str = "unitycatalog.shares.v1";
6855            const NAME: &'static str = "ListSharesResponse";
6856            const FULL_NAME: &'static str = "unitycatalog.shares.v1.ListSharesResponse";
6857            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.ListSharesResponse";
6858        }
6859        impl<'v> ::buffa::DefaultViewInstance for ListSharesResponseView<'v> {
6860            fn default_view_instance<'a>() -> &'a Self
6861            where
6862                Self: 'a,
6863            {
6864                static VALUE: ::buffa::__private::OnceBox<
6865                    ListSharesResponseView<'static>,
6866                > = ::buffa::__private::OnceBox::new();
6867                VALUE
6868                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6869                        <ListSharesResponseView<'static>>::default(),
6870                    ))
6871            }
6872        }
6873        impl ::buffa::ViewReborrow for ListSharesResponseView<'static> {
6874            type Reborrowed<'b> = ListSharesResponseView<'b>;
6875            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6876                this
6877            }
6878        }
6879        /** Self-contained, `'static` owned view of a `ListSharesResponse` message.
6880
6881 Wraps [`::buffa::OwnedView`]`<`[`ListSharesResponseView`]`<'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.
6882
6883 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListSharesResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6884        #[derive(Clone, Debug)]
6885        pub struct ListSharesResponseOwnedView(
6886            ::buffa::OwnedView<ListSharesResponseView<'static>>,
6887        );
6888        impl ListSharesResponseOwnedView {
6889            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6890            ///
6891            /// The view borrows directly from the buffer's data; the buffer is
6892            /// retained inside the returned handle.
6893            ///
6894            /// # Errors
6895            ///
6896            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6897            /// protobuf data.
6898            pub fn decode(
6899                bytes: ::buffa::bytes::Bytes,
6900            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6901                ::core::result::Result::Ok(
6902                    ListSharesResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
6903                )
6904            }
6905            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6906            /// max message size).
6907            ///
6908            /// # Errors
6909            ///
6910            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6911            /// exceeds the configured limits.
6912            pub fn decode_with_options(
6913                bytes: ::buffa::bytes::Bytes,
6914                opts: &::buffa::DecodeOptions,
6915            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6916                ::core::result::Result::Ok(
6917                    ListSharesResponseOwnedView(
6918                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6919                    ),
6920                )
6921            }
6922            /// Build from an owned message via an encode → decode round-trip.
6923            ///
6924            /// # Errors
6925            ///
6926            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6927            /// somehow invalid (should not happen for well-formed messages).
6928            pub fn from_owned(
6929                msg: &super::super::ListSharesResponse,
6930            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6931                ::core::result::Result::Ok(
6932                    ListSharesResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
6933                )
6934            }
6935            /// Borrow the full [`ListSharesResponseView`] with its lifetime tied to `&self`.
6936            #[must_use]
6937            pub fn view(&self) -> &ListSharesResponseView<'_> {
6938                self.0.reborrow()
6939            }
6940            /// Convert to the owned message type.
6941            #[must_use]
6942            pub fn to_owned_message(&self) -> super::super::ListSharesResponse {
6943                self.0.to_owned_message()
6944            }
6945            /// The underlying bytes buffer.
6946            #[must_use]
6947            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6948                self.0.bytes()
6949            }
6950            /// Consume the handle, returning the underlying bytes buffer.
6951            #[must_use]
6952            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6953                self.0.into_bytes()
6954            }
6955            /// List of shares.
6956            ///
6957            /// Field 1: `shares`
6958            #[must_use]
6959            pub fn shares(
6960                &self,
6961            ) -> &::buffa::RepeatedView<'_, super::super::__buffa::view::ShareView<'_>> {
6962                &self.0.reborrow().shares
6963            }
6964            /// Opaque pagination token to go to next page based on previous query.
6965            ///
6966            /// Field 2: `next_page_token`
6967            #[must_use]
6968            pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
6969                self.0.reborrow().next_page_token
6970            }
6971        }
6972        impl ::core::convert::From<::buffa::OwnedView<ListSharesResponseView<'static>>>
6973        for ListSharesResponseOwnedView {
6974            fn from(inner: ::buffa::OwnedView<ListSharesResponseView<'static>>) -> Self {
6975                ListSharesResponseOwnedView(inner)
6976            }
6977        }
6978        impl ::core::convert::From<ListSharesResponseOwnedView>
6979        for ::buffa::OwnedView<ListSharesResponseView<'static>> {
6980            fn from(wrapper: ListSharesResponseOwnedView) -> Self {
6981                wrapper.0
6982            }
6983        }
6984        impl ::core::convert::AsRef<::buffa::OwnedView<ListSharesResponseView<'static>>>
6985        for ListSharesResponseOwnedView {
6986            fn as_ref(&self) -> &::buffa::OwnedView<ListSharesResponseView<'static>> {
6987                &self.0
6988            }
6989        }
6990        impl ::buffa::HasMessageView for super::super::ListSharesResponse {
6991            type View<'a> = ListSharesResponseView<'a>;
6992            type ViewHandle = ListSharesResponseOwnedView;
6993        }
6994        impl ::serde::Serialize for ListSharesResponseOwnedView {
6995            fn serialize<__S: ::serde::Serializer>(
6996                &self,
6997                __s: __S,
6998            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6999                ::serde::Serialize::serialize(&self.0, __s)
7000            }
7001        }
7002        /// Creates a new share for data objects.
7003        ///
7004        /// Data objects can be added after creation with update.
7005        /// The caller must be a metastore admin or have the CREATE_SHARE privilege on the metastore.
7006        #[derive(Clone, Debug, Default)]
7007        pub struct CreateShareRequestView<'a> {
7008            /// Name of the share.
7009            ///
7010            /// Field 1: `name`
7011            pub name: &'a str,
7012            /// User-provided free-form text description.
7013            ///
7014            /// Field 2: `comment`
7015            pub comment: ::core::option::Option<&'a str>,
7016            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7017        }
7018        impl<'a> CreateShareRequestView<'a> {
7019            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
7020            ///
7021            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
7022            /// and by generated sub-message decode arms with `depth - 1`.
7023            ///
7024            /// **Not part of the public API.** Named with a leading underscore to
7025            /// signal that it is for generated-code use only.
7026            #[doc(hidden)]
7027            pub fn _decode_depth(
7028                buf: &'a [u8],
7029                depth: u32,
7030            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7031                let mut view = Self::default();
7032                view._merge_into_view(buf, depth)?;
7033                ::core::result::Result::Ok(view)
7034            }
7035            /// Merge fields from `buf` into this view (proto merge semantics).
7036            ///
7037            /// Repeated fields append; singular fields last-wins; singular
7038            /// MESSAGE fields merge recursively. Used by sub-message decode
7039            /// arms when the same field appears multiple times on the wire.
7040            ///
7041            /// **Not part of the public API.**
7042            #[doc(hidden)]
7043            pub fn _merge_into_view(
7044                &mut self,
7045                buf: &'a [u8],
7046                depth: u32,
7047            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7048                let _ = depth;
7049                #[allow(unused_variables)]
7050                let view = self;
7051                let mut cur: &'a [u8] = buf;
7052                while !cur.is_empty() {
7053                    let before_tag = cur;
7054                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
7055                    match tag.field_number() {
7056                        1u32 => {
7057                            if tag.wire_type()
7058                                != ::buffa::encoding::WireType::LengthDelimited
7059                            {
7060                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7061                                    field_number: 1u32,
7062                                    expected: 2u8,
7063                                    actual: tag.wire_type() as u8,
7064                                });
7065                            }
7066                            view.name = ::buffa::types::borrow_str(&mut cur)?;
7067                        }
7068                        2u32 => {
7069                            if tag.wire_type()
7070                                != ::buffa::encoding::WireType::LengthDelimited
7071                            {
7072                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7073                                    field_number: 2u32,
7074                                    expected: 2u8,
7075                                    actual: tag.wire_type() as u8,
7076                                });
7077                            }
7078                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
7079                        }
7080                        _ => {
7081                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
7082                            let span_len = before_tag.len() - cur.len();
7083                            view.__buffa_unknown_fields
7084                                .push_raw(&before_tag[..span_len]);
7085                        }
7086                    }
7087                }
7088                ::core::result::Result::Ok(())
7089            }
7090        }
7091        impl<'a> ::buffa::MessageView<'a> for CreateShareRequestView<'a> {
7092            type Owned = super::super::CreateShareRequest;
7093            fn decode_view(
7094                buf: &'a [u8],
7095            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7096                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
7097            }
7098            fn decode_view_with_limit(
7099                buf: &'a [u8],
7100                depth: u32,
7101            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7102                Self::_decode_depth(buf, depth)
7103            }
7104            fn to_owned_message(&self) -> super::super::CreateShareRequest {
7105                self.to_owned_from_source(None)
7106            }
7107            #[allow(clippy::useless_conversion, clippy::needless_update)]
7108            fn to_owned_from_source(
7109                &self,
7110                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7111            ) -> super::super::CreateShareRequest {
7112                #[allow(unused_imports)]
7113                use ::buffa::alloc::string::ToString as _;
7114                let _ = __buffa_src;
7115                super::super::CreateShareRequest {
7116                    name: self.name.to_string(),
7117                    comment: self.comment.map(|s| s.to_string()),
7118                    __buffa_unknown_fields: self
7119                        .__buffa_unknown_fields
7120                        .to_owned()
7121                        .unwrap_or_default()
7122                        .into(),
7123                    ..::core::default::Default::default()
7124                }
7125            }
7126        }
7127        impl<'a> ::buffa::ViewEncode<'a> for CreateShareRequestView<'a> {
7128            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7129            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7130                #[allow(unused_imports)]
7131                use ::buffa::Enumeration as _;
7132                let mut size = 0u32;
7133                if !self.name.is_empty() {
7134                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
7135                }
7136                if let Some(ref v) = self.comment {
7137                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7138                }
7139                size += self.__buffa_unknown_fields.encoded_len() as u32;
7140                size
7141            }
7142            #[allow(clippy::needless_borrow)]
7143            fn write_to(
7144                &self,
7145                _cache: &mut ::buffa::SizeCache,
7146                buf: &mut impl ::buffa::bytes::BufMut,
7147            ) {
7148                #[allow(unused_imports)]
7149                use ::buffa::Enumeration as _;
7150                if !self.name.is_empty() {
7151                    ::buffa::encoding::Tag::new(
7152                            1u32,
7153                            ::buffa::encoding::WireType::LengthDelimited,
7154                        )
7155                        .encode(buf);
7156                    ::buffa::types::encode_string(&self.name, buf);
7157                }
7158                if let Some(ref v) = self.comment {
7159                    ::buffa::encoding::Tag::new(
7160                            2u32,
7161                            ::buffa::encoding::WireType::LengthDelimited,
7162                        )
7163                        .encode(buf);
7164                    ::buffa::types::encode_string(v, buf);
7165                }
7166                self.__buffa_unknown_fields.write_to(buf);
7167            }
7168        }
7169        /// Serializes this view as protobuf JSON.
7170        ///
7171        /// Implicit-presence fields with default values are omitted, `required`
7172        /// fields are always emitted, explicit-presence (`optional`) fields are
7173        /// emitted only when set, bytes fields are base64-encoded, and enum
7174        /// values are their proto name strings.
7175        ///
7176        /// This impl uses `serialize_map(None)` because the number of emitted
7177        /// fields depends on default-omission rules; serializers that require
7178        /// known map lengths (e.g. `bincode`) will return a runtime error.
7179        /// Use the owned message type for those formats.
7180        impl<'__a> ::serde::Serialize for CreateShareRequestView<'__a> {
7181            fn serialize<__S: ::serde::Serializer>(
7182                &self,
7183                __s: __S,
7184            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7185                use ::serde::ser::SerializeMap as _;
7186                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7187                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
7188                    __map.serialize_entry("name", self.name)?;
7189                }
7190                if let ::core::option::Option::Some(__v) = self.comment {
7191                    __map.serialize_entry("comment", __v)?;
7192                }
7193                __map.end()
7194            }
7195        }
7196        impl<'a> ::buffa::MessageName for CreateShareRequestView<'a> {
7197            const PACKAGE: &'static str = "unitycatalog.shares.v1";
7198            const NAME: &'static str = "CreateShareRequest";
7199            const FULL_NAME: &'static str = "unitycatalog.shares.v1.CreateShareRequest";
7200            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.CreateShareRequest";
7201        }
7202        impl<'v> ::buffa::DefaultViewInstance for CreateShareRequestView<'v> {
7203            fn default_view_instance<'a>() -> &'a Self
7204            where
7205                Self: 'a,
7206            {
7207                static VALUE: ::buffa::__private::OnceBox<
7208                    CreateShareRequestView<'static>,
7209                > = ::buffa::__private::OnceBox::new();
7210                VALUE
7211                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
7212                        <CreateShareRequestView<'static>>::default(),
7213                    ))
7214            }
7215        }
7216        impl ::buffa::ViewReborrow for CreateShareRequestView<'static> {
7217            type Reborrowed<'b> = CreateShareRequestView<'b>;
7218            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
7219                this
7220            }
7221        }
7222        /** Self-contained, `'static` owned view of a `CreateShareRequest` message.
7223
7224 Wraps [`::buffa::OwnedView`]`<`[`CreateShareRequestView`]`<'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.
7225
7226 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateShareRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7227        #[derive(Clone, Debug)]
7228        pub struct CreateShareRequestOwnedView(
7229            ::buffa::OwnedView<CreateShareRequestView<'static>>,
7230        );
7231        impl CreateShareRequestOwnedView {
7232            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7233            ///
7234            /// The view borrows directly from the buffer's data; the buffer is
7235            /// retained inside the returned handle.
7236            ///
7237            /// # Errors
7238            ///
7239            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7240            /// protobuf data.
7241            pub fn decode(
7242                bytes: ::buffa::bytes::Bytes,
7243            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7244                ::core::result::Result::Ok(
7245                    CreateShareRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
7246                )
7247            }
7248            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7249            /// max message size).
7250            ///
7251            /// # Errors
7252            ///
7253            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7254            /// exceeds the configured limits.
7255            pub fn decode_with_options(
7256                bytes: ::buffa::bytes::Bytes,
7257                opts: &::buffa::DecodeOptions,
7258            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7259                ::core::result::Result::Ok(
7260                    CreateShareRequestOwnedView(
7261                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7262                    ),
7263                )
7264            }
7265            /// Build from an owned message via an encode → decode round-trip.
7266            ///
7267            /// # Errors
7268            ///
7269            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7270            /// somehow invalid (should not happen for well-formed messages).
7271            pub fn from_owned(
7272                msg: &super::super::CreateShareRequest,
7273            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7274                ::core::result::Result::Ok(
7275                    CreateShareRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
7276                )
7277            }
7278            /// Borrow the full [`CreateShareRequestView`] with its lifetime tied to `&self`.
7279            #[must_use]
7280            pub fn view(&self) -> &CreateShareRequestView<'_> {
7281                self.0.reborrow()
7282            }
7283            /// Convert to the owned message type.
7284            #[must_use]
7285            pub fn to_owned_message(&self) -> super::super::CreateShareRequest {
7286                self.0.to_owned_message()
7287            }
7288            /// The underlying bytes buffer.
7289            #[must_use]
7290            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7291                self.0.bytes()
7292            }
7293            /// Consume the handle, returning the underlying bytes buffer.
7294            #[must_use]
7295            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7296                self.0.into_bytes()
7297            }
7298            /// Name of the share.
7299            ///
7300            /// Field 1: `name`
7301            #[must_use]
7302            pub fn name(&self) -> &'_ str {
7303                self.0.reborrow().name
7304            }
7305            /// User-provided free-form text description.
7306            ///
7307            /// Field 2: `comment`
7308            #[must_use]
7309            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
7310                self.0.reborrow().comment
7311            }
7312        }
7313        impl ::core::convert::From<::buffa::OwnedView<CreateShareRequestView<'static>>>
7314        for CreateShareRequestOwnedView {
7315            fn from(inner: ::buffa::OwnedView<CreateShareRequestView<'static>>) -> Self {
7316                CreateShareRequestOwnedView(inner)
7317            }
7318        }
7319        impl ::core::convert::From<CreateShareRequestOwnedView>
7320        for ::buffa::OwnedView<CreateShareRequestView<'static>> {
7321            fn from(wrapper: CreateShareRequestOwnedView) -> Self {
7322                wrapper.0
7323            }
7324        }
7325        impl ::core::convert::AsRef<::buffa::OwnedView<CreateShareRequestView<'static>>>
7326        for CreateShareRequestOwnedView {
7327            fn as_ref(&self) -> &::buffa::OwnedView<CreateShareRequestView<'static>> {
7328                &self.0
7329            }
7330        }
7331        impl ::buffa::HasMessageView for super::super::CreateShareRequest {
7332            type View<'a> = CreateShareRequestView<'a>;
7333            type ViewHandle = CreateShareRequestOwnedView;
7334        }
7335        impl ::serde::Serialize for CreateShareRequestOwnedView {
7336            fn serialize<__S: ::serde::Serializer>(
7337                &self,
7338                __s: __S,
7339            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7340                ::serde::Serialize::serialize(&self.0, __s)
7341            }
7342        }
7343        /// Get a share by name.
7344        #[derive(Clone, Debug, Default)]
7345        pub struct GetShareRequestView<'a> {
7346            /// Name of the share.
7347            ///
7348            /// Field 1: `name`
7349            pub name: &'a str,
7350            /// Query for data to include in the share.
7351            ///
7352            /// Field 2: `include_shared_data`
7353            pub include_shared_data: ::core::option::Option<bool>,
7354            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7355        }
7356        impl<'a> GetShareRequestView<'a> {
7357            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
7358            ///
7359            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
7360            /// and by generated sub-message decode arms with `depth - 1`.
7361            ///
7362            /// **Not part of the public API.** Named with a leading underscore to
7363            /// signal that it is for generated-code use only.
7364            #[doc(hidden)]
7365            pub fn _decode_depth(
7366                buf: &'a [u8],
7367                depth: u32,
7368            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7369                let mut view = Self::default();
7370                view._merge_into_view(buf, depth)?;
7371                ::core::result::Result::Ok(view)
7372            }
7373            /// Merge fields from `buf` into this view (proto merge semantics).
7374            ///
7375            /// Repeated fields append; singular fields last-wins; singular
7376            /// MESSAGE fields merge recursively. Used by sub-message decode
7377            /// arms when the same field appears multiple times on the wire.
7378            ///
7379            /// **Not part of the public API.**
7380            #[doc(hidden)]
7381            pub fn _merge_into_view(
7382                &mut self,
7383                buf: &'a [u8],
7384                depth: u32,
7385            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7386                let _ = depth;
7387                #[allow(unused_variables)]
7388                let view = self;
7389                let mut cur: &'a [u8] = buf;
7390                while !cur.is_empty() {
7391                    let before_tag = cur;
7392                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
7393                    match tag.field_number() {
7394                        1u32 => {
7395                            if tag.wire_type()
7396                                != ::buffa::encoding::WireType::LengthDelimited
7397                            {
7398                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7399                                    field_number: 1u32,
7400                                    expected: 2u8,
7401                                    actual: tag.wire_type() as u8,
7402                                });
7403                            }
7404                            view.name = ::buffa::types::borrow_str(&mut cur)?;
7405                        }
7406                        2u32 => {
7407                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7408                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7409                                    field_number: 2u32,
7410                                    expected: 0u8,
7411                                    actual: tag.wire_type() as u8,
7412                                });
7413                            }
7414                            view.include_shared_data = Some(
7415                                ::buffa::types::decode_bool(&mut cur)?,
7416                            );
7417                        }
7418                        _ => {
7419                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
7420                            let span_len = before_tag.len() - cur.len();
7421                            view.__buffa_unknown_fields
7422                                .push_raw(&before_tag[..span_len]);
7423                        }
7424                    }
7425                }
7426                ::core::result::Result::Ok(())
7427            }
7428        }
7429        impl<'a> ::buffa::MessageView<'a> for GetShareRequestView<'a> {
7430            type Owned = super::super::GetShareRequest;
7431            fn decode_view(
7432                buf: &'a [u8],
7433            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7434                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
7435            }
7436            fn decode_view_with_limit(
7437                buf: &'a [u8],
7438                depth: u32,
7439            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7440                Self::_decode_depth(buf, depth)
7441            }
7442            fn to_owned_message(&self) -> super::super::GetShareRequest {
7443                self.to_owned_from_source(None)
7444            }
7445            #[allow(clippy::useless_conversion, clippy::needless_update)]
7446            fn to_owned_from_source(
7447                &self,
7448                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7449            ) -> super::super::GetShareRequest {
7450                #[allow(unused_imports)]
7451                use ::buffa::alloc::string::ToString as _;
7452                let _ = __buffa_src;
7453                super::super::GetShareRequest {
7454                    name: self.name.to_string(),
7455                    include_shared_data: self.include_shared_data,
7456                    __buffa_unknown_fields: self
7457                        .__buffa_unknown_fields
7458                        .to_owned()
7459                        .unwrap_or_default()
7460                        .into(),
7461                    ..::core::default::Default::default()
7462                }
7463            }
7464        }
7465        impl<'a> ::buffa::ViewEncode<'a> for GetShareRequestView<'a> {
7466            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7467            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7468                #[allow(unused_imports)]
7469                use ::buffa::Enumeration as _;
7470                let mut size = 0u32;
7471                if !self.name.is_empty() {
7472                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
7473                }
7474                if self.include_shared_data.is_some() {
7475                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7476                }
7477                size += self.__buffa_unknown_fields.encoded_len() as u32;
7478                size
7479            }
7480            #[allow(clippy::needless_borrow)]
7481            fn write_to(
7482                &self,
7483                _cache: &mut ::buffa::SizeCache,
7484                buf: &mut impl ::buffa::bytes::BufMut,
7485            ) {
7486                #[allow(unused_imports)]
7487                use ::buffa::Enumeration as _;
7488                if !self.name.is_empty() {
7489                    ::buffa::encoding::Tag::new(
7490                            1u32,
7491                            ::buffa::encoding::WireType::LengthDelimited,
7492                        )
7493                        .encode(buf);
7494                    ::buffa::types::encode_string(&self.name, buf);
7495                }
7496                if let Some(v) = self.include_shared_data {
7497                    ::buffa::encoding::Tag::new(
7498                            2u32,
7499                            ::buffa::encoding::WireType::Varint,
7500                        )
7501                        .encode(buf);
7502                    ::buffa::types::encode_bool(v, buf);
7503                }
7504                self.__buffa_unknown_fields.write_to(buf);
7505            }
7506        }
7507        /// Serializes this view as protobuf JSON.
7508        ///
7509        /// Implicit-presence fields with default values are omitted, `required`
7510        /// fields are always emitted, explicit-presence (`optional`) fields are
7511        /// emitted only when set, bytes fields are base64-encoded, and enum
7512        /// values are their proto name strings.
7513        ///
7514        /// This impl uses `serialize_map(None)` because the number of emitted
7515        /// fields depends on default-omission rules; serializers that require
7516        /// known map lengths (e.g. `bincode`) will return a runtime error.
7517        /// Use the owned message type for those formats.
7518        impl<'__a> ::serde::Serialize for GetShareRequestView<'__a> {
7519            fn serialize<__S: ::serde::Serializer>(
7520                &self,
7521                __s: __S,
7522            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7523                use ::serde::ser::SerializeMap as _;
7524                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7525                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
7526                    __map.serialize_entry("name", self.name)?;
7527                }
7528                if let ::core::option::Option::Some(__v) = self.include_shared_data {
7529                    __map.serialize_entry("include_shared_data", &__v)?;
7530                }
7531                __map.end()
7532            }
7533        }
7534        impl<'a> ::buffa::MessageName for GetShareRequestView<'a> {
7535            const PACKAGE: &'static str = "unitycatalog.shares.v1";
7536            const NAME: &'static str = "GetShareRequest";
7537            const FULL_NAME: &'static str = "unitycatalog.shares.v1.GetShareRequest";
7538            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetShareRequest";
7539        }
7540        impl<'v> ::buffa::DefaultViewInstance for GetShareRequestView<'v> {
7541            fn default_view_instance<'a>() -> &'a Self
7542            where
7543                Self: 'a,
7544            {
7545                static VALUE: ::buffa::__private::OnceBox<
7546                    GetShareRequestView<'static>,
7547                > = ::buffa::__private::OnceBox::new();
7548                VALUE
7549                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
7550                        <GetShareRequestView<'static>>::default(),
7551                    ))
7552            }
7553        }
7554        impl ::buffa::ViewReborrow for GetShareRequestView<'static> {
7555            type Reborrowed<'b> = GetShareRequestView<'b>;
7556            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
7557                this
7558            }
7559        }
7560        /** Self-contained, `'static` owned view of a `GetShareRequest` message.
7561
7562 Wraps [`::buffa::OwnedView`]`<`[`GetShareRequestView`]`<'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.
7563
7564 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetShareRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7565        #[derive(Clone, Debug)]
7566        pub struct GetShareRequestOwnedView(
7567            ::buffa::OwnedView<GetShareRequestView<'static>>,
7568        );
7569        impl GetShareRequestOwnedView {
7570            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7571            ///
7572            /// The view borrows directly from the buffer's data; the buffer is
7573            /// retained inside the returned handle.
7574            ///
7575            /// # Errors
7576            ///
7577            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7578            /// protobuf data.
7579            pub fn decode(
7580                bytes: ::buffa::bytes::Bytes,
7581            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7582                ::core::result::Result::Ok(
7583                    GetShareRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
7584                )
7585            }
7586            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7587            /// max message size).
7588            ///
7589            /// # Errors
7590            ///
7591            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7592            /// exceeds the configured limits.
7593            pub fn decode_with_options(
7594                bytes: ::buffa::bytes::Bytes,
7595                opts: &::buffa::DecodeOptions,
7596            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7597                ::core::result::Result::Ok(
7598                    GetShareRequestOwnedView(
7599                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7600                    ),
7601                )
7602            }
7603            /// Build from an owned message via an encode → decode round-trip.
7604            ///
7605            /// # Errors
7606            ///
7607            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7608            /// somehow invalid (should not happen for well-formed messages).
7609            pub fn from_owned(
7610                msg: &super::super::GetShareRequest,
7611            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7612                ::core::result::Result::Ok(
7613                    GetShareRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
7614                )
7615            }
7616            /// Borrow the full [`GetShareRequestView`] with its lifetime tied to `&self`.
7617            #[must_use]
7618            pub fn view(&self) -> &GetShareRequestView<'_> {
7619                self.0.reborrow()
7620            }
7621            /// Convert to the owned message type.
7622            #[must_use]
7623            pub fn to_owned_message(&self) -> super::super::GetShareRequest {
7624                self.0.to_owned_message()
7625            }
7626            /// The underlying bytes buffer.
7627            #[must_use]
7628            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7629                self.0.bytes()
7630            }
7631            /// Consume the handle, returning the underlying bytes buffer.
7632            #[must_use]
7633            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7634                self.0.into_bytes()
7635            }
7636            /// Name of the share.
7637            ///
7638            /// Field 1: `name`
7639            #[must_use]
7640            pub fn name(&self) -> &'_ str {
7641                self.0.reborrow().name
7642            }
7643            /// Query for data to include in the share.
7644            ///
7645            /// Field 2: `include_shared_data`
7646            #[must_use]
7647            pub fn include_shared_data(&self) -> ::core::option::Option<bool> {
7648                self.0.reborrow().include_shared_data
7649            }
7650        }
7651        impl ::core::convert::From<::buffa::OwnedView<GetShareRequestView<'static>>>
7652        for GetShareRequestOwnedView {
7653            fn from(inner: ::buffa::OwnedView<GetShareRequestView<'static>>) -> Self {
7654                GetShareRequestOwnedView(inner)
7655            }
7656        }
7657        impl ::core::convert::From<GetShareRequestOwnedView>
7658        for ::buffa::OwnedView<GetShareRequestView<'static>> {
7659            fn from(wrapper: GetShareRequestOwnedView) -> Self {
7660                wrapper.0
7661            }
7662        }
7663        impl ::core::convert::AsRef<::buffa::OwnedView<GetShareRequestView<'static>>>
7664        for GetShareRequestOwnedView {
7665            fn as_ref(&self) -> &::buffa::OwnedView<GetShareRequestView<'static>> {
7666                &self.0
7667            }
7668        }
7669        impl ::buffa::HasMessageView for super::super::GetShareRequest {
7670            type View<'a> = GetShareRequestView<'a>;
7671            type ViewHandle = GetShareRequestOwnedView;
7672        }
7673        impl ::serde::Serialize for GetShareRequestOwnedView {
7674            fn serialize<__S: ::serde::Serializer>(
7675                &self,
7676                __s: __S,
7677            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7678                ::serde::Serialize::serialize(&self.0, __s)
7679            }
7680        }
7681        /// Data object update.
7682        #[derive(Clone, Debug, Default)]
7683        pub struct DataObjectUpdateView<'a> {
7684            /// Name of the share.
7685            ///
7686            /// Field 1: `action`
7687            pub action: ::buffa::EnumValue<super::super::Action>,
7688            /// User-provided free-form text description.
7689            ///
7690            /// Field 2: `data_object`
7691            pub data_object: ::buffa::MessageFieldView<
7692                super::super::__buffa::view::DataObjectView<'a>,
7693            >,
7694            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7695        }
7696        impl<'a> DataObjectUpdateView<'a> {
7697            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
7698            ///
7699            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
7700            /// and by generated sub-message decode arms with `depth - 1`.
7701            ///
7702            /// **Not part of the public API.** Named with a leading underscore to
7703            /// signal that it is for generated-code use only.
7704            #[doc(hidden)]
7705            pub fn _decode_depth(
7706                buf: &'a [u8],
7707                depth: u32,
7708            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7709                let mut view = Self::default();
7710                view._merge_into_view(buf, depth)?;
7711                ::core::result::Result::Ok(view)
7712            }
7713            /// Merge fields from `buf` into this view (proto merge semantics).
7714            ///
7715            /// Repeated fields append; singular fields last-wins; singular
7716            /// MESSAGE fields merge recursively. Used by sub-message decode
7717            /// arms when the same field appears multiple times on the wire.
7718            ///
7719            /// **Not part of the public API.**
7720            #[doc(hidden)]
7721            pub fn _merge_into_view(
7722                &mut self,
7723                buf: &'a [u8],
7724                depth: u32,
7725            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7726                let _ = depth;
7727                #[allow(unused_variables)]
7728                let view = self;
7729                let mut cur: &'a [u8] = buf;
7730                while !cur.is_empty() {
7731                    let before_tag = cur;
7732                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
7733                    match tag.field_number() {
7734                        1u32 => {
7735                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7736                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7737                                    field_number: 1u32,
7738                                    expected: 0u8,
7739                                    actual: tag.wire_type() as u8,
7740                                });
7741                            }
7742                            view.action = ::buffa::EnumValue::from(
7743                                ::buffa::types::decode_int32(&mut cur)?,
7744                            );
7745                        }
7746                        2u32 => {
7747                            if tag.wire_type()
7748                                != ::buffa::encoding::WireType::LengthDelimited
7749                            {
7750                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7751                                    field_number: 2u32,
7752                                    expected: 2u8,
7753                                    actual: tag.wire_type() as u8,
7754                                });
7755                            }
7756                            if depth == 0 {
7757                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
7758                            }
7759                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7760                            match view.data_object.as_mut() {
7761                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
7762                                None => {
7763                                    view.data_object = ::buffa::MessageFieldView::set(
7764                                        super::super::__buffa::view::DataObjectView::_decode_depth(
7765                                            sub,
7766                                            depth - 1,
7767                                        )?,
7768                                    );
7769                                }
7770                            }
7771                        }
7772                        _ => {
7773                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
7774                            let span_len = before_tag.len() - cur.len();
7775                            view.__buffa_unknown_fields
7776                                .push_raw(&before_tag[..span_len]);
7777                        }
7778                    }
7779                }
7780                ::core::result::Result::Ok(())
7781            }
7782        }
7783        impl<'a> ::buffa::MessageView<'a> for DataObjectUpdateView<'a> {
7784            type Owned = super::super::DataObjectUpdate;
7785            fn decode_view(
7786                buf: &'a [u8],
7787            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7788                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
7789            }
7790            fn decode_view_with_limit(
7791                buf: &'a [u8],
7792                depth: u32,
7793            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7794                Self::_decode_depth(buf, depth)
7795            }
7796            fn to_owned_message(&self) -> super::super::DataObjectUpdate {
7797                self.to_owned_from_source(None)
7798            }
7799            #[allow(clippy::useless_conversion, clippy::needless_update)]
7800            fn to_owned_from_source(
7801                &self,
7802                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7803            ) -> super::super::DataObjectUpdate {
7804                #[allow(unused_imports)]
7805                use ::buffa::alloc::string::ToString as _;
7806                let _ = __buffa_src;
7807                super::super::DataObjectUpdate {
7808                    action: self.action,
7809                    data_object: match self.data_object.as_option() {
7810                        Some(v) => {
7811                            ::buffa::MessageField::<
7812                                super::super::DataObject,
7813                            >::some(v.to_owned_from_source(__buffa_src))
7814                        }
7815                        None => ::buffa::MessageField::none(),
7816                    },
7817                    __buffa_unknown_fields: self
7818                        .__buffa_unknown_fields
7819                        .to_owned()
7820                        .unwrap_or_default()
7821                        .into(),
7822                    ..::core::default::Default::default()
7823                }
7824            }
7825        }
7826        impl<'a> ::buffa::ViewEncode<'a> for DataObjectUpdateView<'a> {
7827            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7828            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7829                #[allow(unused_imports)]
7830                use ::buffa::Enumeration as _;
7831                let mut size = 0u32;
7832                {
7833                    let val = self.action.to_i32();
7834                    if val != 0 {
7835                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7836                    }
7837                }
7838                if self.data_object.is_set() {
7839                    let __slot = __cache.reserve();
7840                    let inner_size = self.data_object.compute_size(__cache);
7841                    __cache.set(__slot, inner_size);
7842                    size
7843                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7844                            + inner_size;
7845                }
7846                size += self.__buffa_unknown_fields.encoded_len() as u32;
7847                size
7848            }
7849            #[allow(clippy::needless_borrow)]
7850            fn write_to(
7851                &self,
7852                __cache: &mut ::buffa::SizeCache,
7853                buf: &mut impl ::buffa::bytes::BufMut,
7854            ) {
7855                #[allow(unused_imports)]
7856                use ::buffa::Enumeration as _;
7857                {
7858                    let val = self.action.to_i32();
7859                    if val != 0 {
7860                        ::buffa::encoding::Tag::new(
7861                                1u32,
7862                                ::buffa::encoding::WireType::Varint,
7863                            )
7864                            .encode(buf);
7865                        ::buffa::types::encode_int32(val, buf);
7866                    }
7867                }
7868                if self.data_object.is_set() {
7869                    ::buffa::encoding::Tag::new(
7870                            2u32,
7871                            ::buffa::encoding::WireType::LengthDelimited,
7872                        )
7873                        .encode(buf);
7874                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7875                    self.data_object.write_to(__cache, buf);
7876                }
7877                self.__buffa_unknown_fields.write_to(buf);
7878            }
7879        }
7880        /// Serializes this view as protobuf JSON.
7881        ///
7882        /// Implicit-presence fields with default values are omitted, `required`
7883        /// fields are always emitted, explicit-presence (`optional`) fields are
7884        /// emitted only when set, bytes fields are base64-encoded, and enum
7885        /// values are their proto name strings.
7886        ///
7887        /// This impl uses `serialize_map(None)` because the number of emitted
7888        /// fields depends on default-omission rules; serializers that require
7889        /// known map lengths (e.g. `bincode`) will return a runtime error.
7890        /// Use the owned message type for those formats.
7891        impl<'__a> ::serde::Serialize for DataObjectUpdateView<'__a> {
7892            fn serialize<__S: ::serde::Serializer>(
7893                &self,
7894                __s: __S,
7895            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7896                use ::serde::ser::SerializeMap as _;
7897                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7898                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.action) {
7899                    __map.serialize_entry("action", &self.action)?;
7900                }
7901                {
7902                    if let ::core::option::Option::Some(__v) = self
7903                        .data_object
7904                        .as_option()
7905                    {
7906                        __map.serialize_entry("data_object", __v)?;
7907                    }
7908                }
7909                __map.end()
7910            }
7911        }
7912        impl<'a> ::buffa::MessageName for DataObjectUpdateView<'a> {
7913            const PACKAGE: &'static str = "unitycatalog.shares.v1";
7914            const NAME: &'static str = "DataObjectUpdate";
7915            const FULL_NAME: &'static str = "unitycatalog.shares.v1.DataObjectUpdate";
7916            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DataObjectUpdate";
7917        }
7918        impl<'v> ::buffa::DefaultViewInstance for DataObjectUpdateView<'v> {
7919            fn default_view_instance<'a>() -> &'a Self
7920            where
7921                Self: 'a,
7922            {
7923                static VALUE: ::buffa::__private::OnceBox<
7924                    DataObjectUpdateView<'static>,
7925                > = ::buffa::__private::OnceBox::new();
7926                VALUE
7927                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
7928                        <DataObjectUpdateView<'static>>::default(),
7929                    ))
7930            }
7931        }
7932        impl ::buffa::ViewReborrow for DataObjectUpdateView<'static> {
7933            type Reborrowed<'b> = DataObjectUpdateView<'b>;
7934            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
7935                this
7936            }
7937        }
7938        /** Self-contained, `'static` owned view of a `DataObjectUpdate` message.
7939
7940 Wraps [`::buffa::OwnedView`]`<`[`DataObjectUpdateView`]`<'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.
7941
7942 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DataObjectUpdateView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7943        #[derive(Clone, Debug)]
7944        pub struct DataObjectUpdateOwnedView(
7945            ::buffa::OwnedView<DataObjectUpdateView<'static>>,
7946        );
7947        impl DataObjectUpdateOwnedView {
7948            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7949            ///
7950            /// The view borrows directly from the buffer's data; the buffer is
7951            /// retained inside the returned handle.
7952            ///
7953            /// # Errors
7954            ///
7955            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7956            /// protobuf data.
7957            pub fn decode(
7958                bytes: ::buffa::bytes::Bytes,
7959            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7960                ::core::result::Result::Ok(
7961                    DataObjectUpdateOwnedView(::buffa::OwnedView::decode(bytes)?),
7962                )
7963            }
7964            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7965            /// max message size).
7966            ///
7967            /// # Errors
7968            ///
7969            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7970            /// exceeds the configured limits.
7971            pub fn decode_with_options(
7972                bytes: ::buffa::bytes::Bytes,
7973                opts: &::buffa::DecodeOptions,
7974            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7975                ::core::result::Result::Ok(
7976                    DataObjectUpdateOwnedView(
7977                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7978                    ),
7979                )
7980            }
7981            /// Build from an owned message via an encode → decode round-trip.
7982            ///
7983            /// # Errors
7984            ///
7985            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7986            /// somehow invalid (should not happen for well-formed messages).
7987            pub fn from_owned(
7988                msg: &super::super::DataObjectUpdate,
7989            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7990                ::core::result::Result::Ok(
7991                    DataObjectUpdateOwnedView(::buffa::OwnedView::from_owned(msg)?),
7992                )
7993            }
7994            /// Borrow the full [`DataObjectUpdateView`] with its lifetime tied to `&self`.
7995            #[must_use]
7996            pub fn view(&self) -> &DataObjectUpdateView<'_> {
7997                self.0.reborrow()
7998            }
7999            /// Convert to the owned message type.
8000            #[must_use]
8001            pub fn to_owned_message(&self) -> super::super::DataObjectUpdate {
8002                self.0.to_owned_message()
8003            }
8004            /// The underlying bytes buffer.
8005            #[must_use]
8006            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8007                self.0.bytes()
8008            }
8009            /// Consume the handle, returning the underlying bytes buffer.
8010            #[must_use]
8011            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8012                self.0.into_bytes()
8013            }
8014            /// Name of the share.
8015            ///
8016            /// Field 1: `action`
8017            #[must_use]
8018            pub fn action(&self) -> ::buffa::EnumValue<super::super::Action> {
8019                self.0.reborrow().action
8020            }
8021            /// User-provided free-form text description.
8022            ///
8023            /// Field 2: `data_object`
8024            #[must_use]
8025            pub fn data_object(
8026                &self,
8027            ) -> &::buffa::MessageFieldView<
8028                super::super::__buffa::view::DataObjectView<'_>,
8029            > {
8030                &self.0.reborrow().data_object
8031            }
8032        }
8033        impl ::core::convert::From<::buffa::OwnedView<DataObjectUpdateView<'static>>>
8034        for DataObjectUpdateOwnedView {
8035            fn from(inner: ::buffa::OwnedView<DataObjectUpdateView<'static>>) -> Self {
8036                DataObjectUpdateOwnedView(inner)
8037            }
8038        }
8039        impl ::core::convert::From<DataObjectUpdateOwnedView>
8040        for ::buffa::OwnedView<DataObjectUpdateView<'static>> {
8041            fn from(wrapper: DataObjectUpdateOwnedView) -> Self {
8042                wrapper.0
8043            }
8044        }
8045        impl ::core::convert::AsRef<::buffa::OwnedView<DataObjectUpdateView<'static>>>
8046        for DataObjectUpdateOwnedView {
8047            fn as_ref(&self) -> &::buffa::OwnedView<DataObjectUpdateView<'static>> {
8048                &self.0
8049            }
8050        }
8051        impl ::buffa::HasMessageView for super::super::DataObjectUpdate {
8052            type View<'a> = DataObjectUpdateView<'a>;
8053            type ViewHandle = DataObjectUpdateOwnedView;
8054        }
8055        impl ::serde::Serialize for DataObjectUpdateOwnedView {
8056            fn serialize<__S: ::serde::Serializer>(
8057                &self,
8058                __s: __S,
8059            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8060                ::serde::Serialize::serialize(&self.0, __s)
8061            }
8062        }
8063        /// Update a share.
8064        ///
8065        /// The caller must be a metastore admin or have the UPDATE_SHARE privilege on the metastore.
8066        #[derive(Clone, Debug, Default)]
8067        pub struct UpdateShareRequestView<'a> {
8068            /// Name of the share.
8069            ///
8070            /// Field 1: `name`
8071            pub name: &'a str,
8072            /// Array of shared data object updates.
8073            ///
8074            /// Field 2: `updates`
8075            pub updates: ::buffa::RepeatedView<
8076                'a,
8077                super::super::__buffa::view::DataObjectUpdateView<'a>,
8078            >,
8079            /// A new name for the share.
8080            ///
8081            /// Field 3: `new_name`
8082            pub new_name: ::core::option::Option<&'a str>,
8083            /// Owner of the share.
8084            ///
8085            /// Field 4: `owner`
8086            pub owner: ::core::option::Option<&'a str>,
8087            /// User-provided free-form text description.
8088            ///
8089            /// Field 5: `comment`
8090            pub comment: ::core::option::Option<&'a str>,
8091            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8092        }
8093        impl<'a> UpdateShareRequestView<'a> {
8094            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
8095            ///
8096            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
8097            /// and by generated sub-message decode arms with `depth - 1`.
8098            ///
8099            /// **Not part of the public API.** Named with a leading underscore to
8100            /// signal that it is for generated-code use only.
8101            #[doc(hidden)]
8102            pub fn _decode_depth(
8103                buf: &'a [u8],
8104                depth: u32,
8105            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8106                let mut view = Self::default();
8107                view._merge_into_view(buf, depth)?;
8108                ::core::result::Result::Ok(view)
8109            }
8110            /// Merge fields from `buf` into this view (proto merge semantics).
8111            ///
8112            /// Repeated fields append; singular fields last-wins; singular
8113            /// MESSAGE fields merge recursively. Used by sub-message decode
8114            /// arms when the same field appears multiple times on the wire.
8115            ///
8116            /// **Not part of the public API.**
8117            #[doc(hidden)]
8118            pub fn _merge_into_view(
8119                &mut self,
8120                buf: &'a [u8],
8121                depth: u32,
8122            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8123                let _ = depth;
8124                #[allow(unused_variables)]
8125                let view = self;
8126                let mut cur: &'a [u8] = buf;
8127                while !cur.is_empty() {
8128                    let before_tag = cur;
8129                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8130                    match tag.field_number() {
8131                        1u32 => {
8132                            if tag.wire_type()
8133                                != ::buffa::encoding::WireType::LengthDelimited
8134                            {
8135                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8136                                    field_number: 1u32,
8137                                    expected: 2u8,
8138                                    actual: tag.wire_type() as u8,
8139                                });
8140                            }
8141                            view.name = ::buffa::types::borrow_str(&mut cur)?;
8142                        }
8143                        3u32 => {
8144                            if tag.wire_type()
8145                                != ::buffa::encoding::WireType::LengthDelimited
8146                            {
8147                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8148                                    field_number: 3u32,
8149                                    expected: 2u8,
8150                                    actual: tag.wire_type() as u8,
8151                                });
8152                            }
8153                            view.new_name = Some(::buffa::types::borrow_str(&mut cur)?);
8154                        }
8155                        4u32 => {
8156                            if tag.wire_type()
8157                                != ::buffa::encoding::WireType::LengthDelimited
8158                            {
8159                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8160                                    field_number: 4u32,
8161                                    expected: 2u8,
8162                                    actual: tag.wire_type() as u8,
8163                                });
8164                            }
8165                            view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
8166                        }
8167                        5u32 => {
8168                            if tag.wire_type()
8169                                != ::buffa::encoding::WireType::LengthDelimited
8170                            {
8171                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8172                                    field_number: 5u32,
8173                                    expected: 2u8,
8174                                    actual: tag.wire_type() as u8,
8175                                });
8176                            }
8177                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
8178                        }
8179                        2u32 => {
8180                            if tag.wire_type()
8181                                != ::buffa::encoding::WireType::LengthDelimited
8182                            {
8183                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8184                                    field_number: 2u32,
8185                                    expected: 2u8,
8186                                    actual: tag.wire_type() as u8,
8187                                });
8188                            }
8189                            if depth == 0 {
8190                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
8191                            }
8192                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8193                            view.updates
8194                                .push(
8195                                    super::super::__buffa::view::DataObjectUpdateView::_decode_depth(
8196                                        sub,
8197                                        depth - 1,
8198                                    )?,
8199                                );
8200                        }
8201                        _ => {
8202                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
8203                            let span_len = before_tag.len() - cur.len();
8204                            view.__buffa_unknown_fields
8205                                .push_raw(&before_tag[..span_len]);
8206                        }
8207                    }
8208                }
8209                ::core::result::Result::Ok(())
8210            }
8211        }
8212        impl<'a> ::buffa::MessageView<'a> for UpdateShareRequestView<'a> {
8213            type Owned = super::super::UpdateShareRequest;
8214            fn decode_view(
8215                buf: &'a [u8],
8216            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8217                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
8218            }
8219            fn decode_view_with_limit(
8220                buf: &'a [u8],
8221                depth: u32,
8222            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8223                Self::_decode_depth(buf, depth)
8224            }
8225            fn to_owned_message(&self) -> super::super::UpdateShareRequest {
8226                self.to_owned_from_source(None)
8227            }
8228            #[allow(clippy::useless_conversion, clippy::needless_update)]
8229            fn to_owned_from_source(
8230                &self,
8231                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8232            ) -> super::super::UpdateShareRequest {
8233                #[allow(unused_imports)]
8234                use ::buffa::alloc::string::ToString as _;
8235                let _ = __buffa_src;
8236                super::super::UpdateShareRequest {
8237                    name: self.name.to_string(),
8238                    updates: self
8239                        .updates
8240                        .iter()
8241                        .map(|v| v.to_owned_from_source(__buffa_src))
8242                        .collect(),
8243                    new_name: self.new_name.map(|s| s.to_string()),
8244                    owner: self.owner.map(|s| s.to_string()),
8245                    comment: self.comment.map(|s| s.to_string()),
8246                    __buffa_unknown_fields: self
8247                        .__buffa_unknown_fields
8248                        .to_owned()
8249                        .unwrap_or_default()
8250                        .into(),
8251                    ..::core::default::Default::default()
8252                }
8253            }
8254        }
8255        impl<'a> ::buffa::ViewEncode<'a> for UpdateShareRequestView<'a> {
8256            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8257            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8258                #[allow(unused_imports)]
8259                use ::buffa::Enumeration as _;
8260                let mut size = 0u32;
8261                if !self.name.is_empty() {
8262                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
8263                }
8264                for v in &self.updates {
8265                    let __slot = __cache.reserve();
8266                    let inner_size = v.compute_size(__cache);
8267                    __cache.set(__slot, inner_size);
8268                    size
8269                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8270                            + inner_size;
8271                }
8272                if let Some(ref v) = self.new_name {
8273                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8274                }
8275                if let Some(ref v) = self.owner {
8276                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8277                }
8278                if let Some(ref v) = self.comment {
8279                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8280                }
8281                size += self.__buffa_unknown_fields.encoded_len() as u32;
8282                size
8283            }
8284            #[allow(clippy::needless_borrow)]
8285            fn write_to(
8286                &self,
8287                __cache: &mut ::buffa::SizeCache,
8288                buf: &mut impl ::buffa::bytes::BufMut,
8289            ) {
8290                #[allow(unused_imports)]
8291                use ::buffa::Enumeration as _;
8292                if !self.name.is_empty() {
8293                    ::buffa::encoding::Tag::new(
8294                            1u32,
8295                            ::buffa::encoding::WireType::LengthDelimited,
8296                        )
8297                        .encode(buf);
8298                    ::buffa::types::encode_string(&self.name, buf);
8299                }
8300                for v in &self.updates {
8301                    ::buffa::encoding::Tag::new(
8302                            2u32,
8303                            ::buffa::encoding::WireType::LengthDelimited,
8304                        )
8305                        .encode(buf);
8306                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
8307                    v.write_to(__cache, buf);
8308                }
8309                if let Some(ref v) = self.new_name {
8310                    ::buffa::encoding::Tag::new(
8311                            3u32,
8312                            ::buffa::encoding::WireType::LengthDelimited,
8313                        )
8314                        .encode(buf);
8315                    ::buffa::types::encode_string(v, buf);
8316                }
8317                if let Some(ref v) = self.owner {
8318                    ::buffa::encoding::Tag::new(
8319                            4u32,
8320                            ::buffa::encoding::WireType::LengthDelimited,
8321                        )
8322                        .encode(buf);
8323                    ::buffa::types::encode_string(v, buf);
8324                }
8325                if let Some(ref v) = self.comment {
8326                    ::buffa::encoding::Tag::new(
8327                            5u32,
8328                            ::buffa::encoding::WireType::LengthDelimited,
8329                        )
8330                        .encode(buf);
8331                    ::buffa::types::encode_string(v, buf);
8332                }
8333                self.__buffa_unknown_fields.write_to(buf);
8334            }
8335        }
8336        /// Serializes this view as protobuf JSON.
8337        ///
8338        /// Implicit-presence fields with default values are omitted, `required`
8339        /// fields are always emitted, explicit-presence (`optional`) fields are
8340        /// emitted only when set, bytes fields are base64-encoded, and enum
8341        /// values are their proto name strings.
8342        ///
8343        /// This impl uses `serialize_map(None)` because the number of emitted
8344        /// fields depends on default-omission rules; serializers that require
8345        /// known map lengths (e.g. `bincode`) will return a runtime error.
8346        /// Use the owned message type for those formats.
8347        impl<'__a> ::serde::Serialize for UpdateShareRequestView<'__a> {
8348            fn serialize<__S: ::serde::Serializer>(
8349                &self,
8350                __s: __S,
8351            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8352                use ::serde::ser::SerializeMap as _;
8353                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8354                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
8355                    __map.serialize_entry("name", self.name)?;
8356                }
8357                if !self.updates.is_empty() {
8358                    __map.serialize_entry("updates", &*self.updates)?;
8359                }
8360                if let ::core::option::Option::Some(__v) = self.new_name {
8361                    __map.serialize_entry("new_name", __v)?;
8362                }
8363                if let ::core::option::Option::Some(__v) = self.owner {
8364                    __map.serialize_entry("owner", __v)?;
8365                }
8366                if let ::core::option::Option::Some(__v) = self.comment {
8367                    __map.serialize_entry("comment", __v)?;
8368                }
8369                __map.end()
8370            }
8371        }
8372        impl<'a> ::buffa::MessageName for UpdateShareRequestView<'a> {
8373            const PACKAGE: &'static str = "unitycatalog.shares.v1";
8374            const NAME: &'static str = "UpdateShareRequest";
8375            const FULL_NAME: &'static str = "unitycatalog.shares.v1.UpdateShareRequest";
8376            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdateShareRequest";
8377        }
8378        impl<'v> ::buffa::DefaultViewInstance for UpdateShareRequestView<'v> {
8379            fn default_view_instance<'a>() -> &'a Self
8380            where
8381                Self: 'a,
8382            {
8383                static VALUE: ::buffa::__private::OnceBox<
8384                    UpdateShareRequestView<'static>,
8385                > = ::buffa::__private::OnceBox::new();
8386                VALUE
8387                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
8388                        <UpdateShareRequestView<'static>>::default(),
8389                    ))
8390            }
8391        }
8392        impl ::buffa::ViewReborrow for UpdateShareRequestView<'static> {
8393            type Reborrowed<'b> = UpdateShareRequestView<'b>;
8394            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
8395                this
8396            }
8397        }
8398        /** Self-contained, `'static` owned view of a `UpdateShareRequest` message.
8399
8400 Wraps [`::buffa::OwnedView`]`<`[`UpdateShareRequestView`]`<'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.
8401
8402 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdateShareRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8403        #[derive(Clone, Debug)]
8404        pub struct UpdateShareRequestOwnedView(
8405            ::buffa::OwnedView<UpdateShareRequestView<'static>>,
8406        );
8407        impl UpdateShareRequestOwnedView {
8408            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8409            ///
8410            /// The view borrows directly from the buffer's data; the buffer is
8411            /// retained inside the returned handle.
8412            ///
8413            /// # Errors
8414            ///
8415            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8416            /// protobuf data.
8417            pub fn decode(
8418                bytes: ::buffa::bytes::Bytes,
8419            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8420                ::core::result::Result::Ok(
8421                    UpdateShareRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
8422                )
8423            }
8424            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8425            /// max message size).
8426            ///
8427            /// # Errors
8428            ///
8429            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8430            /// exceeds the configured limits.
8431            pub fn decode_with_options(
8432                bytes: ::buffa::bytes::Bytes,
8433                opts: &::buffa::DecodeOptions,
8434            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8435                ::core::result::Result::Ok(
8436                    UpdateShareRequestOwnedView(
8437                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8438                    ),
8439                )
8440            }
8441            /// Build from an owned message via an encode → decode round-trip.
8442            ///
8443            /// # Errors
8444            ///
8445            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8446            /// somehow invalid (should not happen for well-formed messages).
8447            pub fn from_owned(
8448                msg: &super::super::UpdateShareRequest,
8449            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8450                ::core::result::Result::Ok(
8451                    UpdateShareRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
8452                )
8453            }
8454            /// Borrow the full [`UpdateShareRequestView`] with its lifetime tied to `&self`.
8455            #[must_use]
8456            pub fn view(&self) -> &UpdateShareRequestView<'_> {
8457                self.0.reborrow()
8458            }
8459            /// Convert to the owned message type.
8460            #[must_use]
8461            pub fn to_owned_message(&self) -> super::super::UpdateShareRequest {
8462                self.0.to_owned_message()
8463            }
8464            /// The underlying bytes buffer.
8465            #[must_use]
8466            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8467                self.0.bytes()
8468            }
8469            /// Consume the handle, returning the underlying bytes buffer.
8470            #[must_use]
8471            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8472                self.0.into_bytes()
8473            }
8474            /// Name of the share.
8475            ///
8476            /// Field 1: `name`
8477            #[must_use]
8478            pub fn name(&self) -> &'_ str {
8479                self.0.reborrow().name
8480            }
8481            /// Array of shared data object updates.
8482            ///
8483            /// Field 2: `updates`
8484            #[must_use]
8485            pub fn updates(
8486                &self,
8487            ) -> &::buffa::RepeatedView<
8488                '_,
8489                super::super::__buffa::view::DataObjectUpdateView<'_>,
8490            > {
8491                &self.0.reborrow().updates
8492            }
8493            /// A new name for the share.
8494            ///
8495            /// Field 3: `new_name`
8496            #[must_use]
8497            pub fn new_name(&self) -> ::core::option::Option<&'_ str> {
8498                self.0.reborrow().new_name
8499            }
8500            /// Owner of the share.
8501            ///
8502            /// Field 4: `owner`
8503            #[must_use]
8504            pub fn owner(&self) -> ::core::option::Option<&'_ str> {
8505                self.0.reborrow().owner
8506            }
8507            /// User-provided free-form text description.
8508            ///
8509            /// Field 5: `comment`
8510            #[must_use]
8511            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
8512                self.0.reborrow().comment
8513            }
8514        }
8515        impl ::core::convert::From<::buffa::OwnedView<UpdateShareRequestView<'static>>>
8516        for UpdateShareRequestOwnedView {
8517            fn from(inner: ::buffa::OwnedView<UpdateShareRequestView<'static>>) -> Self {
8518                UpdateShareRequestOwnedView(inner)
8519            }
8520        }
8521        impl ::core::convert::From<UpdateShareRequestOwnedView>
8522        for ::buffa::OwnedView<UpdateShareRequestView<'static>> {
8523            fn from(wrapper: UpdateShareRequestOwnedView) -> Self {
8524                wrapper.0
8525            }
8526        }
8527        impl ::core::convert::AsRef<::buffa::OwnedView<UpdateShareRequestView<'static>>>
8528        for UpdateShareRequestOwnedView {
8529            fn as_ref(&self) -> &::buffa::OwnedView<UpdateShareRequestView<'static>> {
8530                &self.0
8531            }
8532        }
8533        impl ::buffa::HasMessageView for super::super::UpdateShareRequest {
8534            type View<'a> = UpdateShareRequestView<'a>;
8535            type ViewHandle = UpdateShareRequestOwnedView;
8536        }
8537        impl ::serde::Serialize for UpdateShareRequestOwnedView {
8538            fn serialize<__S: ::serde::Serializer>(
8539                &self,
8540                __s: __S,
8541            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8542                ::serde::Serialize::serialize(&self.0, __s)
8543            }
8544        }
8545        /// Delete a share.
8546        ///
8547        /// The caller must be a metastore admin or have the DELETE_SHARE privilege on the metastore.
8548        #[derive(Clone, Debug, Default)]
8549        pub struct DeleteShareRequestView<'a> {
8550            /// Name of the share.
8551            ///
8552            /// Field 1: `name`
8553            pub name: &'a str,
8554            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8555        }
8556        impl<'a> DeleteShareRequestView<'a> {
8557            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
8558            ///
8559            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
8560            /// and by generated sub-message decode arms with `depth - 1`.
8561            ///
8562            /// **Not part of the public API.** Named with a leading underscore to
8563            /// signal that it is for generated-code use only.
8564            #[doc(hidden)]
8565            pub fn _decode_depth(
8566                buf: &'a [u8],
8567                depth: u32,
8568            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8569                let mut view = Self::default();
8570                view._merge_into_view(buf, depth)?;
8571                ::core::result::Result::Ok(view)
8572            }
8573            /// Merge fields from `buf` into this view (proto merge semantics).
8574            ///
8575            /// Repeated fields append; singular fields last-wins; singular
8576            /// MESSAGE fields merge recursively. Used by sub-message decode
8577            /// arms when the same field appears multiple times on the wire.
8578            ///
8579            /// **Not part of the public API.**
8580            #[doc(hidden)]
8581            pub fn _merge_into_view(
8582                &mut self,
8583                buf: &'a [u8],
8584                depth: u32,
8585            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8586                let _ = depth;
8587                #[allow(unused_variables)]
8588                let view = self;
8589                let mut cur: &'a [u8] = buf;
8590                while !cur.is_empty() {
8591                    let before_tag = cur;
8592                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8593                    match tag.field_number() {
8594                        1u32 => {
8595                            if tag.wire_type()
8596                                != ::buffa::encoding::WireType::LengthDelimited
8597                            {
8598                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8599                                    field_number: 1u32,
8600                                    expected: 2u8,
8601                                    actual: tag.wire_type() as u8,
8602                                });
8603                            }
8604                            view.name = ::buffa::types::borrow_str(&mut cur)?;
8605                        }
8606                        _ => {
8607                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
8608                            let span_len = before_tag.len() - cur.len();
8609                            view.__buffa_unknown_fields
8610                                .push_raw(&before_tag[..span_len]);
8611                        }
8612                    }
8613                }
8614                ::core::result::Result::Ok(())
8615            }
8616        }
8617        impl<'a> ::buffa::MessageView<'a> for DeleteShareRequestView<'a> {
8618            type Owned = super::super::DeleteShareRequest;
8619            fn decode_view(
8620                buf: &'a [u8],
8621            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8622                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
8623            }
8624            fn decode_view_with_limit(
8625                buf: &'a [u8],
8626                depth: u32,
8627            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8628                Self::_decode_depth(buf, depth)
8629            }
8630            fn to_owned_message(&self) -> super::super::DeleteShareRequest {
8631                self.to_owned_from_source(None)
8632            }
8633            #[allow(clippy::useless_conversion, clippy::needless_update)]
8634            fn to_owned_from_source(
8635                &self,
8636                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8637            ) -> super::super::DeleteShareRequest {
8638                #[allow(unused_imports)]
8639                use ::buffa::alloc::string::ToString as _;
8640                let _ = __buffa_src;
8641                super::super::DeleteShareRequest {
8642                    name: self.name.to_string(),
8643                    __buffa_unknown_fields: self
8644                        .__buffa_unknown_fields
8645                        .to_owned()
8646                        .unwrap_or_default()
8647                        .into(),
8648                    ..::core::default::Default::default()
8649                }
8650            }
8651        }
8652        impl<'a> ::buffa::ViewEncode<'a> for DeleteShareRequestView<'a> {
8653            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8654            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8655                #[allow(unused_imports)]
8656                use ::buffa::Enumeration as _;
8657                let mut size = 0u32;
8658                if !self.name.is_empty() {
8659                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
8660                }
8661                size += self.__buffa_unknown_fields.encoded_len() as u32;
8662                size
8663            }
8664            #[allow(clippy::needless_borrow)]
8665            fn write_to(
8666                &self,
8667                _cache: &mut ::buffa::SizeCache,
8668                buf: &mut impl ::buffa::bytes::BufMut,
8669            ) {
8670                #[allow(unused_imports)]
8671                use ::buffa::Enumeration as _;
8672                if !self.name.is_empty() {
8673                    ::buffa::encoding::Tag::new(
8674                            1u32,
8675                            ::buffa::encoding::WireType::LengthDelimited,
8676                        )
8677                        .encode(buf);
8678                    ::buffa::types::encode_string(&self.name, buf);
8679                }
8680                self.__buffa_unknown_fields.write_to(buf);
8681            }
8682        }
8683        /// Serializes this view as protobuf JSON.
8684        ///
8685        /// Implicit-presence fields with default values are omitted, `required`
8686        /// fields are always emitted, explicit-presence (`optional`) fields are
8687        /// emitted only when set, bytes fields are base64-encoded, and enum
8688        /// values are their proto name strings.
8689        ///
8690        /// This impl uses `serialize_map(None)` because the number of emitted
8691        /// fields depends on default-omission rules; serializers that require
8692        /// known map lengths (e.g. `bincode`) will return a runtime error.
8693        /// Use the owned message type for those formats.
8694        impl<'__a> ::serde::Serialize for DeleteShareRequestView<'__a> {
8695            fn serialize<__S: ::serde::Serializer>(
8696                &self,
8697                __s: __S,
8698            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8699                use ::serde::ser::SerializeMap as _;
8700                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8701                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
8702                    __map.serialize_entry("name", self.name)?;
8703                }
8704                __map.end()
8705            }
8706        }
8707        impl<'a> ::buffa::MessageName for DeleteShareRequestView<'a> {
8708            const PACKAGE: &'static str = "unitycatalog.shares.v1";
8709            const NAME: &'static str = "DeleteShareRequest";
8710            const FULL_NAME: &'static str = "unitycatalog.shares.v1.DeleteShareRequest";
8711            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.DeleteShareRequest";
8712        }
8713        impl<'v> ::buffa::DefaultViewInstance for DeleteShareRequestView<'v> {
8714            fn default_view_instance<'a>() -> &'a Self
8715            where
8716                Self: 'a,
8717            {
8718                static VALUE: ::buffa::__private::OnceBox<
8719                    DeleteShareRequestView<'static>,
8720                > = ::buffa::__private::OnceBox::new();
8721                VALUE
8722                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
8723                        <DeleteShareRequestView<'static>>::default(),
8724                    ))
8725            }
8726        }
8727        impl ::buffa::ViewReborrow for DeleteShareRequestView<'static> {
8728            type Reborrowed<'b> = DeleteShareRequestView<'b>;
8729            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
8730                this
8731            }
8732        }
8733        /** Self-contained, `'static` owned view of a `DeleteShareRequest` message.
8734
8735 Wraps [`::buffa::OwnedView`]`<`[`DeleteShareRequestView`]`<'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.
8736
8737 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DeleteShareRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8738        #[derive(Clone, Debug)]
8739        pub struct DeleteShareRequestOwnedView(
8740            ::buffa::OwnedView<DeleteShareRequestView<'static>>,
8741        );
8742        impl DeleteShareRequestOwnedView {
8743            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8744            ///
8745            /// The view borrows directly from the buffer's data; the buffer is
8746            /// retained inside the returned handle.
8747            ///
8748            /// # Errors
8749            ///
8750            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8751            /// protobuf data.
8752            pub fn decode(
8753                bytes: ::buffa::bytes::Bytes,
8754            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8755                ::core::result::Result::Ok(
8756                    DeleteShareRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
8757                )
8758            }
8759            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8760            /// max message size).
8761            ///
8762            /// # Errors
8763            ///
8764            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8765            /// exceeds the configured limits.
8766            pub fn decode_with_options(
8767                bytes: ::buffa::bytes::Bytes,
8768                opts: &::buffa::DecodeOptions,
8769            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8770                ::core::result::Result::Ok(
8771                    DeleteShareRequestOwnedView(
8772                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8773                    ),
8774                )
8775            }
8776            /// Build from an owned message via an encode → decode round-trip.
8777            ///
8778            /// # Errors
8779            ///
8780            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8781            /// somehow invalid (should not happen for well-formed messages).
8782            pub fn from_owned(
8783                msg: &super::super::DeleteShareRequest,
8784            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8785                ::core::result::Result::Ok(
8786                    DeleteShareRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
8787                )
8788            }
8789            /// Borrow the full [`DeleteShareRequestView`] with its lifetime tied to `&self`.
8790            #[must_use]
8791            pub fn view(&self) -> &DeleteShareRequestView<'_> {
8792                self.0.reborrow()
8793            }
8794            /// Convert to the owned message type.
8795            #[must_use]
8796            pub fn to_owned_message(&self) -> super::super::DeleteShareRequest {
8797                self.0.to_owned_message()
8798            }
8799            /// The underlying bytes buffer.
8800            #[must_use]
8801            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8802                self.0.bytes()
8803            }
8804            /// Consume the handle, returning the underlying bytes buffer.
8805            #[must_use]
8806            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8807                self.0.into_bytes()
8808            }
8809            /// Name of the share.
8810            ///
8811            /// Field 1: `name`
8812            #[must_use]
8813            pub fn name(&self) -> &'_ str {
8814                self.0.reborrow().name
8815            }
8816        }
8817        impl ::core::convert::From<::buffa::OwnedView<DeleteShareRequestView<'static>>>
8818        for DeleteShareRequestOwnedView {
8819            fn from(inner: ::buffa::OwnedView<DeleteShareRequestView<'static>>) -> Self {
8820                DeleteShareRequestOwnedView(inner)
8821            }
8822        }
8823        impl ::core::convert::From<DeleteShareRequestOwnedView>
8824        for ::buffa::OwnedView<DeleteShareRequestView<'static>> {
8825            fn from(wrapper: DeleteShareRequestOwnedView) -> Self {
8826                wrapper.0
8827            }
8828        }
8829        impl ::core::convert::AsRef<::buffa::OwnedView<DeleteShareRequestView<'static>>>
8830        for DeleteShareRequestOwnedView {
8831            fn as_ref(&self) -> &::buffa::OwnedView<DeleteShareRequestView<'static>> {
8832                &self.0
8833            }
8834        }
8835        impl ::buffa::HasMessageView for super::super::DeleteShareRequest {
8836            type View<'a> = DeleteShareRequestView<'a>;
8837            type ViewHandle = DeleteShareRequestOwnedView;
8838        }
8839        impl ::serde::Serialize for DeleteShareRequestOwnedView {
8840            fn serialize<__S: ::serde::Serializer>(
8841                &self,
8842                __s: __S,
8843            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8844                ::serde::Serialize::serialize(&self.0, __s)
8845            }
8846        }
8847        /// Get permissions for a data share.
8848        #[derive(Clone, Debug, Default)]
8849        pub struct GetPermissionsRequestView<'a> {
8850            /// Name of the share.
8851            ///
8852            /// Field 1: `name`
8853            pub name: &'a str,
8854            /// The maximum number of results per page that should be returned.
8855            ///
8856            /// Field 2: `max_results`
8857            pub max_results: ::core::option::Option<i32>,
8858            /// Opaque pagination token to go to next page based on previous query.
8859            ///
8860            /// Field 3: `page_token`
8861            pub page_token: ::core::option::Option<&'a str>,
8862            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8863        }
8864        impl<'a> GetPermissionsRequestView<'a> {
8865            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
8866            ///
8867            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
8868            /// and by generated sub-message decode arms with `depth - 1`.
8869            ///
8870            /// **Not part of the public API.** Named with a leading underscore to
8871            /// signal that it is for generated-code use only.
8872            #[doc(hidden)]
8873            pub fn _decode_depth(
8874                buf: &'a [u8],
8875                depth: u32,
8876            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8877                let mut view = Self::default();
8878                view._merge_into_view(buf, depth)?;
8879                ::core::result::Result::Ok(view)
8880            }
8881            /// Merge fields from `buf` into this view (proto merge semantics).
8882            ///
8883            /// Repeated fields append; singular fields last-wins; singular
8884            /// MESSAGE fields merge recursively. Used by sub-message decode
8885            /// arms when the same field appears multiple times on the wire.
8886            ///
8887            /// **Not part of the public API.**
8888            #[doc(hidden)]
8889            pub fn _merge_into_view(
8890                &mut self,
8891                buf: &'a [u8],
8892                depth: u32,
8893            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8894                let _ = depth;
8895                #[allow(unused_variables)]
8896                let view = self;
8897                let mut cur: &'a [u8] = buf;
8898                while !cur.is_empty() {
8899                    let before_tag = cur;
8900                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8901                    match tag.field_number() {
8902                        1u32 => {
8903                            if tag.wire_type()
8904                                != ::buffa::encoding::WireType::LengthDelimited
8905                            {
8906                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8907                                    field_number: 1u32,
8908                                    expected: 2u8,
8909                                    actual: tag.wire_type() as u8,
8910                                });
8911                            }
8912                            view.name = ::buffa::types::borrow_str(&mut cur)?;
8913                        }
8914                        2u32 => {
8915                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8916                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8917                                    field_number: 2u32,
8918                                    expected: 0u8,
8919                                    actual: tag.wire_type() as u8,
8920                                });
8921                            }
8922                            view.max_results = Some(
8923                                ::buffa::types::decode_int32(&mut cur)?,
8924                            );
8925                        }
8926                        3u32 => {
8927                            if tag.wire_type()
8928                                != ::buffa::encoding::WireType::LengthDelimited
8929                            {
8930                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8931                                    field_number: 3u32,
8932                                    expected: 2u8,
8933                                    actual: tag.wire_type() as u8,
8934                                });
8935                            }
8936                            view.page_token = Some(
8937                                ::buffa::types::borrow_str(&mut cur)?,
8938                            );
8939                        }
8940                        _ => {
8941                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
8942                            let span_len = before_tag.len() - cur.len();
8943                            view.__buffa_unknown_fields
8944                                .push_raw(&before_tag[..span_len]);
8945                        }
8946                    }
8947                }
8948                ::core::result::Result::Ok(())
8949            }
8950        }
8951        impl<'a> ::buffa::MessageView<'a> for GetPermissionsRequestView<'a> {
8952            type Owned = super::super::GetPermissionsRequest;
8953            fn decode_view(
8954                buf: &'a [u8],
8955            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8956                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
8957            }
8958            fn decode_view_with_limit(
8959                buf: &'a [u8],
8960                depth: u32,
8961            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8962                Self::_decode_depth(buf, depth)
8963            }
8964            fn to_owned_message(&self) -> super::super::GetPermissionsRequest {
8965                self.to_owned_from_source(None)
8966            }
8967            #[allow(clippy::useless_conversion, clippy::needless_update)]
8968            fn to_owned_from_source(
8969                &self,
8970                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8971            ) -> super::super::GetPermissionsRequest {
8972                #[allow(unused_imports)]
8973                use ::buffa::alloc::string::ToString as _;
8974                let _ = __buffa_src;
8975                super::super::GetPermissionsRequest {
8976                    name: self.name.to_string(),
8977                    max_results: self.max_results,
8978                    page_token: self.page_token.map(|s| s.to_string()),
8979                    __buffa_unknown_fields: self
8980                        .__buffa_unknown_fields
8981                        .to_owned()
8982                        .unwrap_or_default()
8983                        .into(),
8984                    ..::core::default::Default::default()
8985                }
8986            }
8987        }
8988        impl<'a> ::buffa::ViewEncode<'a> for GetPermissionsRequestView<'a> {
8989            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8990            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8991                #[allow(unused_imports)]
8992                use ::buffa::Enumeration as _;
8993                let mut size = 0u32;
8994                if !self.name.is_empty() {
8995                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
8996                }
8997                if let Some(v) = self.max_results {
8998                    size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
8999                }
9000                if let Some(ref v) = self.page_token {
9001                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9002                }
9003                size += self.__buffa_unknown_fields.encoded_len() as u32;
9004                size
9005            }
9006            #[allow(clippy::needless_borrow)]
9007            fn write_to(
9008                &self,
9009                _cache: &mut ::buffa::SizeCache,
9010                buf: &mut impl ::buffa::bytes::BufMut,
9011            ) {
9012                #[allow(unused_imports)]
9013                use ::buffa::Enumeration as _;
9014                if !self.name.is_empty() {
9015                    ::buffa::encoding::Tag::new(
9016                            1u32,
9017                            ::buffa::encoding::WireType::LengthDelimited,
9018                        )
9019                        .encode(buf);
9020                    ::buffa::types::encode_string(&self.name, buf);
9021                }
9022                if let Some(v) = self.max_results {
9023                    ::buffa::encoding::Tag::new(
9024                            2u32,
9025                            ::buffa::encoding::WireType::Varint,
9026                        )
9027                        .encode(buf);
9028                    ::buffa::types::encode_int32(v, buf);
9029                }
9030                if let Some(ref v) = self.page_token {
9031                    ::buffa::encoding::Tag::new(
9032                            3u32,
9033                            ::buffa::encoding::WireType::LengthDelimited,
9034                        )
9035                        .encode(buf);
9036                    ::buffa::types::encode_string(v, buf);
9037                }
9038                self.__buffa_unknown_fields.write_to(buf);
9039            }
9040        }
9041        /// Serializes this view as protobuf JSON.
9042        ///
9043        /// Implicit-presence fields with default values are omitted, `required`
9044        /// fields are always emitted, explicit-presence (`optional`) fields are
9045        /// emitted only when set, bytes fields are base64-encoded, and enum
9046        /// values are their proto name strings.
9047        ///
9048        /// This impl uses `serialize_map(None)` because the number of emitted
9049        /// fields depends on default-omission rules; serializers that require
9050        /// known map lengths (e.g. `bincode`) will return a runtime error.
9051        /// Use the owned message type for those formats.
9052        impl<'__a> ::serde::Serialize for GetPermissionsRequestView<'__a> {
9053            fn serialize<__S: ::serde::Serializer>(
9054                &self,
9055                __s: __S,
9056            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9057                use ::serde::ser::SerializeMap as _;
9058                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9059                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
9060                    __map.serialize_entry("name", self.name)?;
9061                }
9062                if let ::core::option::Option::Some(__v) = self.max_results {
9063                    struct _W(i32);
9064                    impl ::serde::Serialize for _W {
9065                        fn serialize<__S: ::serde::Serializer>(
9066                            &self,
9067                            __s: __S,
9068                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
9069                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
9070                        }
9071                    }
9072                    __map.serialize_entry("max_results", &_W(__v))?;
9073                }
9074                if let ::core::option::Option::Some(__v) = self.page_token {
9075                    __map.serialize_entry("page_token", __v)?;
9076                }
9077                __map.end()
9078            }
9079        }
9080        impl<'a> ::buffa::MessageName for GetPermissionsRequestView<'a> {
9081            const PACKAGE: &'static str = "unitycatalog.shares.v1";
9082            const NAME: &'static str = "GetPermissionsRequest";
9083            const FULL_NAME: &'static str = "unitycatalog.shares.v1.GetPermissionsRequest";
9084            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetPermissionsRequest";
9085        }
9086        impl<'v> ::buffa::DefaultViewInstance for GetPermissionsRequestView<'v> {
9087            fn default_view_instance<'a>() -> &'a Self
9088            where
9089                Self: 'a,
9090            {
9091                static VALUE: ::buffa::__private::OnceBox<
9092                    GetPermissionsRequestView<'static>,
9093                > = ::buffa::__private::OnceBox::new();
9094                VALUE
9095                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9096                        <GetPermissionsRequestView<'static>>::default(),
9097                    ))
9098            }
9099        }
9100        impl ::buffa::ViewReborrow for GetPermissionsRequestView<'static> {
9101            type Reborrowed<'b> = GetPermissionsRequestView<'b>;
9102            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9103                this
9104            }
9105        }
9106        /** Self-contained, `'static` owned view of a `GetPermissionsRequest` message.
9107
9108 Wraps [`::buffa::OwnedView`]`<`[`GetPermissionsRequestView`]`<'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.
9109
9110 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetPermissionsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9111        #[derive(Clone, Debug)]
9112        pub struct GetPermissionsRequestOwnedView(
9113            ::buffa::OwnedView<GetPermissionsRequestView<'static>>,
9114        );
9115        impl GetPermissionsRequestOwnedView {
9116            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9117            ///
9118            /// The view borrows directly from the buffer's data; the buffer is
9119            /// retained inside the returned handle.
9120            ///
9121            /// # Errors
9122            ///
9123            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9124            /// protobuf data.
9125            pub fn decode(
9126                bytes: ::buffa::bytes::Bytes,
9127            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9128                ::core::result::Result::Ok(
9129                    GetPermissionsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9130                )
9131            }
9132            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9133            /// max message size).
9134            ///
9135            /// # Errors
9136            ///
9137            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9138            /// exceeds the configured limits.
9139            pub fn decode_with_options(
9140                bytes: ::buffa::bytes::Bytes,
9141                opts: &::buffa::DecodeOptions,
9142            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9143                ::core::result::Result::Ok(
9144                    GetPermissionsRequestOwnedView(
9145                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9146                    ),
9147                )
9148            }
9149            /// Build from an owned message via an encode → decode round-trip.
9150            ///
9151            /// # Errors
9152            ///
9153            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9154            /// somehow invalid (should not happen for well-formed messages).
9155            pub fn from_owned(
9156                msg: &super::super::GetPermissionsRequest,
9157            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9158                ::core::result::Result::Ok(
9159                    GetPermissionsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9160                )
9161            }
9162            /// Borrow the full [`GetPermissionsRequestView`] with its lifetime tied to `&self`.
9163            #[must_use]
9164            pub fn view(&self) -> &GetPermissionsRequestView<'_> {
9165                self.0.reborrow()
9166            }
9167            /// Convert to the owned message type.
9168            #[must_use]
9169            pub fn to_owned_message(&self) -> super::super::GetPermissionsRequest {
9170                self.0.to_owned_message()
9171            }
9172            /// The underlying bytes buffer.
9173            #[must_use]
9174            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9175                self.0.bytes()
9176            }
9177            /// Consume the handle, returning the underlying bytes buffer.
9178            #[must_use]
9179            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9180                self.0.into_bytes()
9181            }
9182            /// Name of the share.
9183            ///
9184            /// Field 1: `name`
9185            #[must_use]
9186            pub fn name(&self) -> &'_ str {
9187                self.0.reborrow().name
9188            }
9189            /// The maximum number of results per page that should be returned.
9190            ///
9191            /// Field 2: `max_results`
9192            #[must_use]
9193            pub fn max_results(&self) -> ::core::option::Option<i32> {
9194                self.0.reborrow().max_results
9195            }
9196            /// Opaque pagination token to go to next page based on previous query.
9197            ///
9198            /// Field 3: `page_token`
9199            #[must_use]
9200            pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
9201                self.0.reborrow().page_token
9202            }
9203        }
9204        impl ::core::convert::From<
9205            ::buffa::OwnedView<GetPermissionsRequestView<'static>>,
9206        > for GetPermissionsRequestOwnedView {
9207            fn from(
9208                inner: ::buffa::OwnedView<GetPermissionsRequestView<'static>>,
9209            ) -> Self {
9210                GetPermissionsRequestOwnedView(inner)
9211            }
9212        }
9213        impl ::core::convert::From<GetPermissionsRequestOwnedView>
9214        for ::buffa::OwnedView<GetPermissionsRequestView<'static>> {
9215            fn from(wrapper: GetPermissionsRequestOwnedView) -> Self {
9216                wrapper.0
9217            }
9218        }
9219        impl ::core::convert::AsRef<
9220            ::buffa::OwnedView<GetPermissionsRequestView<'static>>,
9221        > for GetPermissionsRequestOwnedView {
9222            fn as_ref(&self) -> &::buffa::OwnedView<GetPermissionsRequestView<'static>> {
9223                &self.0
9224            }
9225        }
9226        impl ::buffa::HasMessageView for super::super::GetPermissionsRequest {
9227            type View<'a> = GetPermissionsRequestView<'a>;
9228            type ViewHandle = GetPermissionsRequestOwnedView;
9229        }
9230        impl ::serde::Serialize for GetPermissionsRequestOwnedView {
9231            fn serialize<__S: ::serde::Serializer>(
9232                &self,
9233                __s: __S,
9234            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9235                ::serde::Serialize::serialize(&self.0, __s)
9236            }
9237        }
9238        /// Response to list shares.
9239        #[derive(Clone, Debug, Default)]
9240        pub struct GetPermissionsResponseView<'a> {
9241            /// The privileges assigned to each principal
9242            ///
9243            /// Field 1: `privilege_assignments`
9244            pub privilege_assignments: ::buffa::RepeatedView<
9245                'a,
9246                super::super::__buffa::view::PrivilegeAssignmentView<'a>,
9247            >,
9248            /// Opaque pagination token to go to next page based on previous query.
9249            ///
9250            /// Field 2: `next_page_token`
9251            pub next_page_token: ::core::option::Option<&'a str>,
9252            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9253        }
9254        impl<'a> GetPermissionsResponseView<'a> {
9255            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9256            ///
9257            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9258            /// and by generated sub-message decode arms with `depth - 1`.
9259            ///
9260            /// **Not part of the public API.** Named with a leading underscore to
9261            /// signal that it is for generated-code use only.
9262            #[doc(hidden)]
9263            pub fn _decode_depth(
9264                buf: &'a [u8],
9265                depth: u32,
9266            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9267                let mut view = Self::default();
9268                view._merge_into_view(buf, depth)?;
9269                ::core::result::Result::Ok(view)
9270            }
9271            /// Merge fields from `buf` into this view (proto merge semantics).
9272            ///
9273            /// Repeated fields append; singular fields last-wins; singular
9274            /// MESSAGE fields merge recursively. Used by sub-message decode
9275            /// arms when the same field appears multiple times on the wire.
9276            ///
9277            /// **Not part of the public API.**
9278            #[doc(hidden)]
9279            pub fn _merge_into_view(
9280                &mut self,
9281                buf: &'a [u8],
9282                depth: u32,
9283            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9284                let _ = depth;
9285                #[allow(unused_variables)]
9286                let view = self;
9287                let mut cur: &'a [u8] = buf;
9288                while !cur.is_empty() {
9289                    let before_tag = cur;
9290                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9291                    match tag.field_number() {
9292                        2u32 => {
9293                            if tag.wire_type()
9294                                != ::buffa::encoding::WireType::LengthDelimited
9295                            {
9296                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9297                                    field_number: 2u32,
9298                                    expected: 2u8,
9299                                    actual: tag.wire_type() as u8,
9300                                });
9301                            }
9302                            view.next_page_token = Some(
9303                                ::buffa::types::borrow_str(&mut cur)?,
9304                            );
9305                        }
9306                        1u32 => {
9307                            if tag.wire_type()
9308                                != ::buffa::encoding::WireType::LengthDelimited
9309                            {
9310                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9311                                    field_number: 1u32,
9312                                    expected: 2u8,
9313                                    actual: tag.wire_type() as u8,
9314                                });
9315                            }
9316                            if depth == 0 {
9317                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
9318                            }
9319                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9320                            view.privilege_assignments
9321                                .push(
9322                                    super::super::__buffa::view::PrivilegeAssignmentView::_decode_depth(
9323                                        sub,
9324                                        depth - 1,
9325                                    )?,
9326                                );
9327                        }
9328                        _ => {
9329                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9330                            let span_len = before_tag.len() - cur.len();
9331                            view.__buffa_unknown_fields
9332                                .push_raw(&before_tag[..span_len]);
9333                        }
9334                    }
9335                }
9336                ::core::result::Result::Ok(())
9337            }
9338        }
9339        impl<'a> ::buffa::MessageView<'a> for GetPermissionsResponseView<'a> {
9340            type Owned = super::super::GetPermissionsResponse;
9341            fn decode_view(
9342                buf: &'a [u8],
9343            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9344                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9345            }
9346            fn decode_view_with_limit(
9347                buf: &'a [u8],
9348                depth: u32,
9349            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9350                Self::_decode_depth(buf, depth)
9351            }
9352            fn to_owned_message(&self) -> super::super::GetPermissionsResponse {
9353                self.to_owned_from_source(None)
9354            }
9355            #[allow(clippy::useless_conversion, clippy::needless_update)]
9356            fn to_owned_from_source(
9357                &self,
9358                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9359            ) -> super::super::GetPermissionsResponse {
9360                #[allow(unused_imports)]
9361                use ::buffa::alloc::string::ToString as _;
9362                let _ = __buffa_src;
9363                super::super::GetPermissionsResponse {
9364                    privilege_assignments: self
9365                        .privilege_assignments
9366                        .iter()
9367                        .map(|v| v.to_owned_from_source(__buffa_src))
9368                        .collect(),
9369                    next_page_token: self.next_page_token.map(|s| s.to_string()),
9370                    __buffa_unknown_fields: self
9371                        .__buffa_unknown_fields
9372                        .to_owned()
9373                        .unwrap_or_default()
9374                        .into(),
9375                    ..::core::default::Default::default()
9376                }
9377            }
9378        }
9379        impl<'a> ::buffa::ViewEncode<'a> for GetPermissionsResponseView<'a> {
9380            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9381            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9382                #[allow(unused_imports)]
9383                use ::buffa::Enumeration as _;
9384                let mut size = 0u32;
9385                for v in &self.privilege_assignments {
9386                    let __slot = __cache.reserve();
9387                    let inner_size = v.compute_size(__cache);
9388                    __cache.set(__slot, inner_size);
9389                    size
9390                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9391                            + inner_size;
9392                }
9393                if let Some(ref v) = self.next_page_token {
9394                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9395                }
9396                size += self.__buffa_unknown_fields.encoded_len() as u32;
9397                size
9398            }
9399            #[allow(clippy::needless_borrow)]
9400            fn write_to(
9401                &self,
9402                __cache: &mut ::buffa::SizeCache,
9403                buf: &mut impl ::buffa::bytes::BufMut,
9404            ) {
9405                #[allow(unused_imports)]
9406                use ::buffa::Enumeration as _;
9407                for v in &self.privilege_assignments {
9408                    ::buffa::encoding::Tag::new(
9409                            1u32,
9410                            ::buffa::encoding::WireType::LengthDelimited,
9411                        )
9412                        .encode(buf);
9413                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9414                    v.write_to(__cache, buf);
9415                }
9416                if let Some(ref v) = self.next_page_token {
9417                    ::buffa::encoding::Tag::new(
9418                            2u32,
9419                            ::buffa::encoding::WireType::LengthDelimited,
9420                        )
9421                        .encode(buf);
9422                    ::buffa::types::encode_string(v, buf);
9423                }
9424                self.__buffa_unknown_fields.write_to(buf);
9425            }
9426        }
9427        /// Serializes this view as protobuf JSON.
9428        ///
9429        /// Implicit-presence fields with default values are omitted, `required`
9430        /// fields are always emitted, explicit-presence (`optional`) fields are
9431        /// emitted only when set, bytes fields are base64-encoded, and enum
9432        /// values are their proto name strings.
9433        ///
9434        /// This impl uses `serialize_map(None)` because the number of emitted
9435        /// fields depends on default-omission rules; serializers that require
9436        /// known map lengths (e.g. `bincode`) will return a runtime error.
9437        /// Use the owned message type for those formats.
9438        impl<'__a> ::serde::Serialize for GetPermissionsResponseView<'__a> {
9439            fn serialize<__S: ::serde::Serializer>(
9440                &self,
9441                __s: __S,
9442            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9443                use ::serde::ser::SerializeMap as _;
9444                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9445                if !self.privilege_assignments.is_empty() {
9446                    __map
9447                        .serialize_entry(
9448                            "privilegeAssignments",
9449                            &*self.privilege_assignments,
9450                        )?;
9451                }
9452                if let ::core::option::Option::Some(__v) = self.next_page_token {
9453                    __map.serialize_entry("next_page_token", __v)?;
9454                }
9455                __map.end()
9456            }
9457        }
9458        impl<'a> ::buffa::MessageName for GetPermissionsResponseView<'a> {
9459            const PACKAGE: &'static str = "unitycatalog.shares.v1";
9460            const NAME: &'static str = "GetPermissionsResponse";
9461            const FULL_NAME: &'static str = "unitycatalog.shares.v1.GetPermissionsResponse";
9462            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.GetPermissionsResponse";
9463        }
9464        impl<'v> ::buffa::DefaultViewInstance for GetPermissionsResponseView<'v> {
9465            fn default_view_instance<'a>() -> &'a Self
9466            where
9467                Self: 'a,
9468            {
9469                static VALUE: ::buffa::__private::OnceBox<
9470                    GetPermissionsResponseView<'static>,
9471                > = ::buffa::__private::OnceBox::new();
9472                VALUE
9473                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9474                        <GetPermissionsResponseView<'static>>::default(),
9475                    ))
9476            }
9477        }
9478        impl ::buffa::ViewReborrow for GetPermissionsResponseView<'static> {
9479            type Reborrowed<'b> = GetPermissionsResponseView<'b>;
9480            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9481                this
9482            }
9483        }
9484        /** Self-contained, `'static` owned view of a `GetPermissionsResponse` message.
9485
9486 Wraps [`::buffa::OwnedView`]`<`[`GetPermissionsResponseView`]`<'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.
9487
9488 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetPermissionsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9489        #[derive(Clone, Debug)]
9490        pub struct GetPermissionsResponseOwnedView(
9491            ::buffa::OwnedView<GetPermissionsResponseView<'static>>,
9492        );
9493        impl GetPermissionsResponseOwnedView {
9494            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9495            ///
9496            /// The view borrows directly from the buffer's data; the buffer is
9497            /// retained inside the returned handle.
9498            ///
9499            /// # Errors
9500            ///
9501            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9502            /// protobuf data.
9503            pub fn decode(
9504                bytes: ::buffa::bytes::Bytes,
9505            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9506                ::core::result::Result::Ok(
9507                    GetPermissionsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
9508                )
9509            }
9510            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9511            /// max message size).
9512            ///
9513            /// # Errors
9514            ///
9515            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9516            /// exceeds the configured limits.
9517            pub fn decode_with_options(
9518                bytes: ::buffa::bytes::Bytes,
9519                opts: &::buffa::DecodeOptions,
9520            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9521                ::core::result::Result::Ok(
9522                    GetPermissionsResponseOwnedView(
9523                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9524                    ),
9525                )
9526            }
9527            /// Build from an owned message via an encode → decode round-trip.
9528            ///
9529            /// # Errors
9530            ///
9531            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9532            /// somehow invalid (should not happen for well-formed messages).
9533            pub fn from_owned(
9534                msg: &super::super::GetPermissionsResponse,
9535            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9536                ::core::result::Result::Ok(
9537                    GetPermissionsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
9538                )
9539            }
9540            /// Borrow the full [`GetPermissionsResponseView`] with its lifetime tied to `&self`.
9541            #[must_use]
9542            pub fn view(&self) -> &GetPermissionsResponseView<'_> {
9543                self.0.reborrow()
9544            }
9545            /// Convert to the owned message type.
9546            #[must_use]
9547            pub fn to_owned_message(&self) -> super::super::GetPermissionsResponse {
9548                self.0.to_owned_message()
9549            }
9550            /// The underlying bytes buffer.
9551            #[must_use]
9552            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9553                self.0.bytes()
9554            }
9555            /// Consume the handle, returning the underlying bytes buffer.
9556            #[must_use]
9557            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9558                self.0.into_bytes()
9559            }
9560            /// The privileges assigned to each principal
9561            ///
9562            /// Field 1: `privilege_assignments`
9563            #[must_use]
9564            pub fn privilege_assignments(
9565                &self,
9566            ) -> &::buffa::RepeatedView<
9567                '_,
9568                super::super::__buffa::view::PrivilegeAssignmentView<'_>,
9569            > {
9570                &self.0.reborrow().privilege_assignments
9571            }
9572            /// Opaque pagination token to go to next page based on previous query.
9573            ///
9574            /// Field 2: `next_page_token`
9575            #[must_use]
9576            pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
9577                self.0.reborrow().next_page_token
9578            }
9579        }
9580        impl ::core::convert::From<
9581            ::buffa::OwnedView<GetPermissionsResponseView<'static>>,
9582        > for GetPermissionsResponseOwnedView {
9583            fn from(
9584                inner: ::buffa::OwnedView<GetPermissionsResponseView<'static>>,
9585            ) -> Self {
9586                GetPermissionsResponseOwnedView(inner)
9587            }
9588        }
9589        impl ::core::convert::From<GetPermissionsResponseOwnedView>
9590        for ::buffa::OwnedView<GetPermissionsResponseView<'static>> {
9591            fn from(wrapper: GetPermissionsResponseOwnedView) -> Self {
9592                wrapper.0
9593            }
9594        }
9595        impl ::core::convert::AsRef<
9596            ::buffa::OwnedView<GetPermissionsResponseView<'static>>,
9597        > for GetPermissionsResponseOwnedView {
9598            fn as_ref(
9599                &self,
9600            ) -> &::buffa::OwnedView<GetPermissionsResponseView<'static>> {
9601                &self.0
9602            }
9603        }
9604        impl ::buffa::HasMessageView for super::super::GetPermissionsResponse {
9605            type View<'a> = GetPermissionsResponseView<'a>;
9606            type ViewHandle = GetPermissionsResponseOwnedView;
9607        }
9608        impl ::serde::Serialize for GetPermissionsResponseOwnedView {
9609            fn serialize<__S: ::serde::Serializer>(
9610                &self,
9611                __s: __S,
9612            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9613                ::serde::Serialize::serialize(&self.0, __s)
9614            }
9615        }
9616        #[derive(Clone, Debug, Default)]
9617        pub struct UpdatePermissionsRequestView<'a> {
9618            /// Name of the share.
9619            ///
9620            /// Field 1: `name`
9621            pub name: &'a str,
9622            /// Array of permissions change objects.
9623            ///
9624            /// Field 2: `changes`
9625            pub changes: ::buffa::RepeatedView<
9626                'a,
9627                super::super::__buffa::view::PermissionsChangeView<'a>,
9628            >,
9629            /// Whether to return the latest permissions list of the share in the response.
9630            ///
9631            /// Field 3: `omit_permissions_list`
9632            pub omit_permissions_list: ::core::option::Option<bool>,
9633            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9634        }
9635        impl<'a> UpdatePermissionsRequestView<'a> {
9636            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9637            ///
9638            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9639            /// and by generated sub-message decode arms with `depth - 1`.
9640            ///
9641            /// **Not part of the public API.** Named with a leading underscore to
9642            /// signal that it is for generated-code use only.
9643            #[doc(hidden)]
9644            pub fn _decode_depth(
9645                buf: &'a [u8],
9646                depth: u32,
9647            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9648                let mut view = Self::default();
9649                view._merge_into_view(buf, depth)?;
9650                ::core::result::Result::Ok(view)
9651            }
9652            /// Merge fields from `buf` into this view (proto merge semantics).
9653            ///
9654            /// Repeated fields append; singular fields last-wins; singular
9655            /// MESSAGE fields merge recursively. Used by sub-message decode
9656            /// arms when the same field appears multiple times on the wire.
9657            ///
9658            /// **Not part of the public API.**
9659            #[doc(hidden)]
9660            pub fn _merge_into_view(
9661                &mut self,
9662                buf: &'a [u8],
9663                depth: u32,
9664            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9665                let _ = depth;
9666                #[allow(unused_variables)]
9667                let view = self;
9668                let mut cur: &'a [u8] = buf;
9669                while !cur.is_empty() {
9670                    let before_tag = cur;
9671                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9672                    match tag.field_number() {
9673                        1u32 => {
9674                            if tag.wire_type()
9675                                != ::buffa::encoding::WireType::LengthDelimited
9676                            {
9677                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9678                                    field_number: 1u32,
9679                                    expected: 2u8,
9680                                    actual: tag.wire_type() as u8,
9681                                });
9682                            }
9683                            view.name = ::buffa::types::borrow_str(&mut cur)?;
9684                        }
9685                        3u32 => {
9686                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
9687                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9688                                    field_number: 3u32,
9689                                    expected: 0u8,
9690                                    actual: tag.wire_type() as u8,
9691                                });
9692                            }
9693                            view.omit_permissions_list = Some(
9694                                ::buffa::types::decode_bool(&mut cur)?,
9695                            );
9696                        }
9697                        2u32 => {
9698                            if tag.wire_type()
9699                                != ::buffa::encoding::WireType::LengthDelimited
9700                            {
9701                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9702                                    field_number: 2u32,
9703                                    expected: 2u8,
9704                                    actual: tag.wire_type() as u8,
9705                                });
9706                            }
9707                            if depth == 0 {
9708                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
9709                            }
9710                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9711                            view.changes
9712                                .push(
9713                                    super::super::__buffa::view::PermissionsChangeView::_decode_depth(
9714                                        sub,
9715                                        depth - 1,
9716                                    )?,
9717                                );
9718                        }
9719                        _ => {
9720                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9721                            let span_len = before_tag.len() - cur.len();
9722                            view.__buffa_unknown_fields
9723                                .push_raw(&before_tag[..span_len]);
9724                        }
9725                    }
9726                }
9727                ::core::result::Result::Ok(())
9728            }
9729        }
9730        impl<'a> ::buffa::MessageView<'a> for UpdatePermissionsRequestView<'a> {
9731            type Owned = super::super::UpdatePermissionsRequest;
9732            fn decode_view(
9733                buf: &'a [u8],
9734            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9735                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9736            }
9737            fn decode_view_with_limit(
9738                buf: &'a [u8],
9739                depth: u32,
9740            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9741                Self::_decode_depth(buf, depth)
9742            }
9743            fn to_owned_message(&self) -> super::super::UpdatePermissionsRequest {
9744                self.to_owned_from_source(None)
9745            }
9746            #[allow(clippy::useless_conversion, clippy::needless_update)]
9747            fn to_owned_from_source(
9748                &self,
9749                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9750            ) -> super::super::UpdatePermissionsRequest {
9751                #[allow(unused_imports)]
9752                use ::buffa::alloc::string::ToString as _;
9753                let _ = __buffa_src;
9754                super::super::UpdatePermissionsRequest {
9755                    name: self.name.to_string(),
9756                    changes: self
9757                        .changes
9758                        .iter()
9759                        .map(|v| v.to_owned_from_source(__buffa_src))
9760                        .collect(),
9761                    omit_permissions_list: self.omit_permissions_list,
9762                    __buffa_unknown_fields: self
9763                        .__buffa_unknown_fields
9764                        .to_owned()
9765                        .unwrap_or_default()
9766                        .into(),
9767                    ..::core::default::Default::default()
9768                }
9769            }
9770        }
9771        impl<'a> ::buffa::ViewEncode<'a> for UpdatePermissionsRequestView<'a> {
9772            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9773            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9774                #[allow(unused_imports)]
9775                use ::buffa::Enumeration as _;
9776                let mut size = 0u32;
9777                if !self.name.is_empty() {
9778                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
9779                }
9780                for v in &self.changes {
9781                    let __slot = __cache.reserve();
9782                    let inner_size = v.compute_size(__cache);
9783                    __cache.set(__slot, inner_size);
9784                    size
9785                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9786                            + inner_size;
9787                }
9788                if self.omit_permissions_list.is_some() {
9789                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
9790                }
9791                size += self.__buffa_unknown_fields.encoded_len() as u32;
9792                size
9793            }
9794            #[allow(clippy::needless_borrow)]
9795            fn write_to(
9796                &self,
9797                __cache: &mut ::buffa::SizeCache,
9798                buf: &mut impl ::buffa::bytes::BufMut,
9799            ) {
9800                #[allow(unused_imports)]
9801                use ::buffa::Enumeration as _;
9802                if !self.name.is_empty() {
9803                    ::buffa::encoding::Tag::new(
9804                            1u32,
9805                            ::buffa::encoding::WireType::LengthDelimited,
9806                        )
9807                        .encode(buf);
9808                    ::buffa::types::encode_string(&self.name, buf);
9809                }
9810                for v in &self.changes {
9811                    ::buffa::encoding::Tag::new(
9812                            2u32,
9813                            ::buffa::encoding::WireType::LengthDelimited,
9814                        )
9815                        .encode(buf);
9816                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9817                    v.write_to(__cache, buf);
9818                }
9819                if let Some(v) = self.omit_permissions_list {
9820                    ::buffa::encoding::Tag::new(
9821                            3u32,
9822                            ::buffa::encoding::WireType::Varint,
9823                        )
9824                        .encode(buf);
9825                    ::buffa::types::encode_bool(v, buf);
9826                }
9827                self.__buffa_unknown_fields.write_to(buf);
9828            }
9829        }
9830        /// Serializes this view as protobuf JSON.
9831        ///
9832        /// Implicit-presence fields with default values are omitted, `required`
9833        /// fields are always emitted, explicit-presence (`optional`) fields are
9834        /// emitted only when set, bytes fields are base64-encoded, and enum
9835        /// values are their proto name strings.
9836        ///
9837        /// This impl uses `serialize_map(None)` because the number of emitted
9838        /// fields depends on default-omission rules; serializers that require
9839        /// known map lengths (e.g. `bincode`) will return a runtime error.
9840        /// Use the owned message type for those formats.
9841        impl<'__a> ::serde::Serialize for UpdatePermissionsRequestView<'__a> {
9842            fn serialize<__S: ::serde::Serializer>(
9843                &self,
9844                __s: __S,
9845            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9846                use ::serde::ser::SerializeMap as _;
9847                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9848                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
9849                    __map.serialize_entry("name", self.name)?;
9850                }
9851                if !self.changes.is_empty() {
9852                    __map.serialize_entry("changes", &*self.changes)?;
9853                }
9854                if let ::core::option::Option::Some(__v) = self.omit_permissions_list {
9855                    __map.serialize_entry("omit_permissions_list", &__v)?;
9856                }
9857                __map.end()
9858            }
9859        }
9860        impl<'a> ::buffa::MessageName for UpdatePermissionsRequestView<'a> {
9861            const PACKAGE: &'static str = "unitycatalog.shares.v1";
9862            const NAME: &'static str = "UpdatePermissionsRequest";
9863            const FULL_NAME: &'static str = "unitycatalog.shares.v1.UpdatePermissionsRequest";
9864            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdatePermissionsRequest";
9865        }
9866        impl<'v> ::buffa::DefaultViewInstance for UpdatePermissionsRequestView<'v> {
9867            fn default_view_instance<'a>() -> &'a Self
9868            where
9869                Self: 'a,
9870            {
9871                static VALUE: ::buffa::__private::OnceBox<
9872                    UpdatePermissionsRequestView<'static>,
9873                > = ::buffa::__private::OnceBox::new();
9874                VALUE
9875                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9876                        <UpdatePermissionsRequestView<'static>>::default(),
9877                    ))
9878            }
9879        }
9880        impl ::buffa::ViewReborrow for UpdatePermissionsRequestView<'static> {
9881            type Reborrowed<'b> = UpdatePermissionsRequestView<'b>;
9882            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9883                this
9884            }
9885        }
9886        /** Self-contained, `'static` owned view of a `UpdatePermissionsRequest` message.
9887
9888 Wraps [`::buffa::OwnedView`]`<`[`UpdatePermissionsRequestView`]`<'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.
9889
9890 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdatePermissionsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9891        #[derive(Clone, Debug)]
9892        pub struct UpdatePermissionsRequestOwnedView(
9893            ::buffa::OwnedView<UpdatePermissionsRequestView<'static>>,
9894        );
9895        impl UpdatePermissionsRequestOwnedView {
9896            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9897            ///
9898            /// The view borrows directly from the buffer's data; the buffer is
9899            /// retained inside the returned handle.
9900            ///
9901            /// # Errors
9902            ///
9903            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9904            /// protobuf data.
9905            pub fn decode(
9906                bytes: ::buffa::bytes::Bytes,
9907            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9908                ::core::result::Result::Ok(
9909                    UpdatePermissionsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9910                )
9911            }
9912            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9913            /// max message size).
9914            ///
9915            /// # Errors
9916            ///
9917            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9918            /// exceeds the configured limits.
9919            pub fn decode_with_options(
9920                bytes: ::buffa::bytes::Bytes,
9921                opts: &::buffa::DecodeOptions,
9922            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9923                ::core::result::Result::Ok(
9924                    UpdatePermissionsRequestOwnedView(
9925                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9926                    ),
9927                )
9928            }
9929            /// Build from an owned message via an encode → decode round-trip.
9930            ///
9931            /// # Errors
9932            ///
9933            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9934            /// somehow invalid (should not happen for well-formed messages).
9935            pub fn from_owned(
9936                msg: &super::super::UpdatePermissionsRequest,
9937            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9938                ::core::result::Result::Ok(
9939                    UpdatePermissionsRequestOwnedView(
9940                        ::buffa::OwnedView::from_owned(msg)?,
9941                    ),
9942                )
9943            }
9944            /// Borrow the full [`UpdatePermissionsRequestView`] with its lifetime tied to `&self`.
9945            #[must_use]
9946            pub fn view(&self) -> &UpdatePermissionsRequestView<'_> {
9947                self.0.reborrow()
9948            }
9949            /// Convert to the owned message type.
9950            #[must_use]
9951            pub fn to_owned_message(&self) -> super::super::UpdatePermissionsRequest {
9952                self.0.to_owned_message()
9953            }
9954            /// The underlying bytes buffer.
9955            #[must_use]
9956            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9957                self.0.bytes()
9958            }
9959            /// Consume the handle, returning the underlying bytes buffer.
9960            #[must_use]
9961            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9962                self.0.into_bytes()
9963            }
9964            /// Name of the share.
9965            ///
9966            /// Field 1: `name`
9967            #[must_use]
9968            pub fn name(&self) -> &'_ str {
9969                self.0.reborrow().name
9970            }
9971            /// Array of permissions change objects.
9972            ///
9973            /// Field 2: `changes`
9974            #[must_use]
9975            pub fn changes(
9976                &self,
9977            ) -> &::buffa::RepeatedView<
9978                '_,
9979                super::super::__buffa::view::PermissionsChangeView<'_>,
9980            > {
9981                &self.0.reborrow().changes
9982            }
9983            /// Whether to return the latest permissions list of the share in the response.
9984            ///
9985            /// Field 3: `omit_permissions_list`
9986            #[must_use]
9987            pub fn omit_permissions_list(&self) -> ::core::option::Option<bool> {
9988                self.0.reborrow().omit_permissions_list
9989            }
9990        }
9991        impl ::core::convert::From<
9992            ::buffa::OwnedView<UpdatePermissionsRequestView<'static>>,
9993        > for UpdatePermissionsRequestOwnedView {
9994            fn from(
9995                inner: ::buffa::OwnedView<UpdatePermissionsRequestView<'static>>,
9996            ) -> Self {
9997                UpdatePermissionsRequestOwnedView(inner)
9998            }
9999        }
10000        impl ::core::convert::From<UpdatePermissionsRequestOwnedView>
10001        for ::buffa::OwnedView<UpdatePermissionsRequestView<'static>> {
10002            fn from(wrapper: UpdatePermissionsRequestOwnedView) -> Self {
10003                wrapper.0
10004            }
10005        }
10006        impl ::core::convert::AsRef<
10007            ::buffa::OwnedView<UpdatePermissionsRequestView<'static>>,
10008        > for UpdatePermissionsRequestOwnedView {
10009            fn as_ref(
10010                &self,
10011            ) -> &::buffa::OwnedView<UpdatePermissionsRequestView<'static>> {
10012                &self.0
10013            }
10014        }
10015        impl ::buffa::HasMessageView for super::super::UpdatePermissionsRequest {
10016            type View<'a> = UpdatePermissionsRequestView<'a>;
10017            type ViewHandle = UpdatePermissionsRequestOwnedView;
10018        }
10019        impl ::serde::Serialize for UpdatePermissionsRequestOwnedView {
10020            fn serialize<__S: ::serde::Serializer>(
10021                &self,
10022                __s: __S,
10023            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10024                ::serde::Serialize::serialize(&self.0, __s)
10025            }
10026        }
10027        #[derive(Clone, Debug, Default)]
10028        pub struct UpdatePermissionsResponseView<'a> {
10029            /// The privileges assigned to each principal
10030            ///
10031            /// Field 1: `privilege_assignments`
10032            pub privilege_assignments: ::buffa::RepeatedView<
10033                'a,
10034                super::super::__buffa::view::PrivilegeAssignmentView<'a>,
10035            >,
10036            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10037        }
10038        impl<'a> UpdatePermissionsResponseView<'a> {
10039            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
10040            ///
10041            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
10042            /// and by generated sub-message decode arms with `depth - 1`.
10043            ///
10044            /// **Not part of the public API.** Named with a leading underscore to
10045            /// signal that it is for generated-code use only.
10046            #[doc(hidden)]
10047            pub fn _decode_depth(
10048                buf: &'a [u8],
10049                depth: u32,
10050            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10051                let mut view = Self::default();
10052                view._merge_into_view(buf, depth)?;
10053                ::core::result::Result::Ok(view)
10054            }
10055            /// Merge fields from `buf` into this view (proto merge semantics).
10056            ///
10057            /// Repeated fields append; singular fields last-wins; singular
10058            /// MESSAGE fields merge recursively. Used by sub-message decode
10059            /// arms when the same field appears multiple times on the wire.
10060            ///
10061            /// **Not part of the public API.**
10062            #[doc(hidden)]
10063            pub fn _merge_into_view(
10064                &mut self,
10065                buf: &'a [u8],
10066                depth: u32,
10067            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
10068                let _ = depth;
10069                #[allow(unused_variables)]
10070                let view = self;
10071                let mut cur: &'a [u8] = buf;
10072                while !cur.is_empty() {
10073                    let before_tag = cur;
10074                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
10075                    match tag.field_number() {
10076                        1u32 => {
10077                            if tag.wire_type()
10078                                != ::buffa::encoding::WireType::LengthDelimited
10079                            {
10080                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10081                                    field_number: 1u32,
10082                                    expected: 2u8,
10083                                    actual: tag.wire_type() as u8,
10084                                });
10085                            }
10086                            if depth == 0 {
10087                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10088                            }
10089                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10090                            view.privilege_assignments
10091                                .push(
10092                                    super::super::__buffa::view::PrivilegeAssignmentView::_decode_depth(
10093                                        sub,
10094                                        depth - 1,
10095                                    )?,
10096                                );
10097                        }
10098                        _ => {
10099                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
10100                            let span_len = before_tag.len() - cur.len();
10101                            view.__buffa_unknown_fields
10102                                .push_raw(&before_tag[..span_len]);
10103                        }
10104                    }
10105                }
10106                ::core::result::Result::Ok(())
10107            }
10108        }
10109        impl<'a> ::buffa::MessageView<'a> for UpdatePermissionsResponseView<'a> {
10110            type Owned = super::super::UpdatePermissionsResponse;
10111            fn decode_view(
10112                buf: &'a [u8],
10113            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10114                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
10115            }
10116            fn decode_view_with_limit(
10117                buf: &'a [u8],
10118                depth: u32,
10119            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10120                Self::_decode_depth(buf, depth)
10121            }
10122            fn to_owned_message(&self) -> super::super::UpdatePermissionsResponse {
10123                self.to_owned_from_source(None)
10124            }
10125            #[allow(clippy::useless_conversion, clippy::needless_update)]
10126            fn to_owned_from_source(
10127                &self,
10128                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10129            ) -> super::super::UpdatePermissionsResponse {
10130                #[allow(unused_imports)]
10131                use ::buffa::alloc::string::ToString as _;
10132                let _ = __buffa_src;
10133                super::super::UpdatePermissionsResponse {
10134                    privilege_assignments: self
10135                        .privilege_assignments
10136                        .iter()
10137                        .map(|v| v.to_owned_from_source(__buffa_src))
10138                        .collect(),
10139                    __buffa_unknown_fields: self
10140                        .__buffa_unknown_fields
10141                        .to_owned()
10142                        .unwrap_or_default()
10143                        .into(),
10144                    ..::core::default::Default::default()
10145                }
10146            }
10147        }
10148        impl<'a> ::buffa::ViewEncode<'a> for UpdatePermissionsResponseView<'a> {
10149            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10150            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10151                #[allow(unused_imports)]
10152                use ::buffa::Enumeration as _;
10153                let mut size = 0u32;
10154                for v in &self.privilege_assignments {
10155                    let __slot = __cache.reserve();
10156                    let inner_size = v.compute_size(__cache);
10157                    __cache.set(__slot, inner_size);
10158                    size
10159                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10160                            + inner_size;
10161                }
10162                size += self.__buffa_unknown_fields.encoded_len() as u32;
10163                size
10164            }
10165            #[allow(clippy::needless_borrow)]
10166            fn write_to(
10167                &self,
10168                __cache: &mut ::buffa::SizeCache,
10169                buf: &mut impl ::buffa::bytes::BufMut,
10170            ) {
10171                #[allow(unused_imports)]
10172                use ::buffa::Enumeration as _;
10173                for v in &self.privilege_assignments {
10174                    ::buffa::encoding::Tag::new(
10175                            1u32,
10176                            ::buffa::encoding::WireType::LengthDelimited,
10177                        )
10178                        .encode(buf);
10179                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
10180                    v.write_to(__cache, buf);
10181                }
10182                self.__buffa_unknown_fields.write_to(buf);
10183            }
10184        }
10185        /// Serializes this view as protobuf JSON.
10186        ///
10187        /// Implicit-presence fields with default values are omitted, `required`
10188        /// fields are always emitted, explicit-presence (`optional`) fields are
10189        /// emitted only when set, bytes fields are base64-encoded, and enum
10190        /// values are their proto name strings.
10191        ///
10192        /// This impl uses `serialize_map(None)` because the number of emitted
10193        /// fields depends on default-omission rules; serializers that require
10194        /// known map lengths (e.g. `bincode`) will return a runtime error.
10195        /// Use the owned message type for those formats.
10196        impl<'__a> ::serde::Serialize for UpdatePermissionsResponseView<'__a> {
10197            fn serialize<__S: ::serde::Serializer>(
10198                &self,
10199                __s: __S,
10200            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10201                use ::serde::ser::SerializeMap as _;
10202                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10203                if !self.privilege_assignments.is_empty() {
10204                    __map
10205                        .serialize_entry(
10206                            "privilegeAssignments",
10207                            &*self.privilege_assignments,
10208                        )?;
10209                }
10210                __map.end()
10211            }
10212        }
10213        impl<'a> ::buffa::MessageName for UpdatePermissionsResponseView<'a> {
10214            const PACKAGE: &'static str = "unitycatalog.shares.v1";
10215            const NAME: &'static str = "UpdatePermissionsResponse";
10216            const FULL_NAME: &'static str = "unitycatalog.shares.v1.UpdatePermissionsResponse";
10217            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.shares.v1.UpdatePermissionsResponse";
10218        }
10219        impl<'v> ::buffa::DefaultViewInstance for UpdatePermissionsResponseView<'v> {
10220            fn default_view_instance<'a>() -> &'a Self
10221            where
10222                Self: 'a,
10223            {
10224                static VALUE: ::buffa::__private::OnceBox<
10225                    UpdatePermissionsResponseView<'static>,
10226                > = ::buffa::__private::OnceBox::new();
10227                VALUE
10228                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
10229                        <UpdatePermissionsResponseView<'static>>::default(),
10230                    ))
10231            }
10232        }
10233        impl ::buffa::ViewReborrow for UpdatePermissionsResponseView<'static> {
10234            type Reborrowed<'b> = UpdatePermissionsResponseView<'b>;
10235            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
10236                this
10237            }
10238        }
10239        /** Self-contained, `'static` owned view of a `UpdatePermissionsResponse` message.
10240
10241 Wraps [`::buffa::OwnedView`]`<`[`UpdatePermissionsResponseView`]`<'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.
10242
10243 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdatePermissionsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10244        #[derive(Clone, Debug)]
10245        pub struct UpdatePermissionsResponseOwnedView(
10246            ::buffa::OwnedView<UpdatePermissionsResponseView<'static>>,
10247        );
10248        impl UpdatePermissionsResponseOwnedView {
10249            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10250            ///
10251            /// The view borrows directly from the buffer's data; the buffer is
10252            /// retained inside the returned handle.
10253            ///
10254            /// # Errors
10255            ///
10256            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10257            /// protobuf data.
10258            pub fn decode(
10259                bytes: ::buffa::bytes::Bytes,
10260            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10261                ::core::result::Result::Ok(
10262                    UpdatePermissionsResponseOwnedView(
10263                        ::buffa::OwnedView::decode(bytes)?,
10264                    ),
10265                )
10266            }
10267            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10268            /// max message size).
10269            ///
10270            /// # Errors
10271            ///
10272            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10273            /// exceeds the configured limits.
10274            pub fn decode_with_options(
10275                bytes: ::buffa::bytes::Bytes,
10276                opts: &::buffa::DecodeOptions,
10277            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10278                ::core::result::Result::Ok(
10279                    UpdatePermissionsResponseOwnedView(
10280                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10281                    ),
10282                )
10283            }
10284            /// Build from an owned message via an encode → decode round-trip.
10285            ///
10286            /// # Errors
10287            ///
10288            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10289            /// somehow invalid (should not happen for well-formed messages).
10290            pub fn from_owned(
10291                msg: &super::super::UpdatePermissionsResponse,
10292            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10293                ::core::result::Result::Ok(
10294                    UpdatePermissionsResponseOwnedView(
10295                        ::buffa::OwnedView::from_owned(msg)?,
10296                    ),
10297                )
10298            }
10299            /// Borrow the full [`UpdatePermissionsResponseView`] with its lifetime tied to `&self`.
10300            #[must_use]
10301            pub fn view(&self) -> &UpdatePermissionsResponseView<'_> {
10302                self.0.reborrow()
10303            }
10304            /// Convert to the owned message type.
10305            #[must_use]
10306            pub fn to_owned_message(&self) -> super::super::UpdatePermissionsResponse {
10307                self.0.to_owned_message()
10308            }
10309            /// The underlying bytes buffer.
10310            #[must_use]
10311            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10312                self.0.bytes()
10313            }
10314            /// Consume the handle, returning the underlying bytes buffer.
10315            #[must_use]
10316            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10317                self.0.into_bytes()
10318            }
10319            /// The privileges assigned to each principal
10320            ///
10321            /// Field 1: `privilege_assignments`
10322            #[must_use]
10323            pub fn privilege_assignments(
10324                &self,
10325            ) -> &::buffa::RepeatedView<
10326                '_,
10327                super::super::__buffa::view::PrivilegeAssignmentView<'_>,
10328            > {
10329                &self.0.reborrow().privilege_assignments
10330            }
10331        }
10332        impl ::core::convert::From<
10333            ::buffa::OwnedView<UpdatePermissionsResponseView<'static>>,
10334        > for UpdatePermissionsResponseOwnedView {
10335            fn from(
10336                inner: ::buffa::OwnedView<UpdatePermissionsResponseView<'static>>,
10337            ) -> Self {
10338                UpdatePermissionsResponseOwnedView(inner)
10339            }
10340        }
10341        impl ::core::convert::From<UpdatePermissionsResponseOwnedView>
10342        for ::buffa::OwnedView<UpdatePermissionsResponseView<'static>> {
10343            fn from(wrapper: UpdatePermissionsResponseOwnedView) -> Self {
10344                wrapper.0
10345            }
10346        }
10347        impl ::core::convert::AsRef<
10348            ::buffa::OwnedView<UpdatePermissionsResponseView<'static>>,
10349        > for UpdatePermissionsResponseOwnedView {
10350            fn as_ref(
10351                &self,
10352            ) -> &::buffa::OwnedView<UpdatePermissionsResponseView<'static>> {
10353                &self.0
10354            }
10355        }
10356        impl ::buffa::HasMessageView for super::super::UpdatePermissionsResponse {
10357            type View<'a> = UpdatePermissionsResponseView<'a>;
10358            type ViewHandle = UpdatePermissionsResponseOwnedView;
10359        }
10360        impl ::serde::Serialize for UpdatePermissionsResponseOwnedView {
10361            fn serialize<__S: ::serde::Serializer>(
10362                &self,
10363                __s: __S,
10364            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10365                ::serde::Serialize::serialize(&self.0, __s)
10366            }
10367        }
10368    }
10369    /// Register this package's `Any` type entries and extension entries.
10370    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
10371        reg.register_json_any(super::__DATA_OBJECT_JSON_ANY);
10372        reg.register_json_any(super::__SHARE_JSON_ANY);
10373        reg.register_json_any(super::__PRIVILEGE_ASSIGNMENT_JSON_ANY);
10374        reg.register_json_any(super::__PERMISSIONS_CHANGE_JSON_ANY);
10375        reg.register_json_any(super::__LIST_SHARES_REQUEST_JSON_ANY);
10376        reg.register_json_any(super::__LIST_SHARES_RESPONSE_JSON_ANY);
10377        reg.register_json_any(super::__CREATE_SHARE_REQUEST_JSON_ANY);
10378        reg.register_json_any(super::__GET_SHARE_REQUEST_JSON_ANY);
10379        reg.register_json_any(super::__DATA_OBJECT_UPDATE_JSON_ANY);
10380        reg.register_json_any(super::__UPDATE_SHARE_REQUEST_JSON_ANY);
10381        reg.register_json_any(super::__DELETE_SHARE_REQUEST_JSON_ANY);
10382        reg.register_json_any(super::__GET_PERMISSIONS_REQUEST_JSON_ANY);
10383        reg.register_json_any(super::__GET_PERMISSIONS_RESPONSE_JSON_ANY);
10384        reg.register_json_any(super::__UPDATE_PERMISSIONS_REQUEST_JSON_ANY);
10385        reg.register_json_any(super::__UPDATE_PERMISSIONS_RESPONSE_JSON_ANY);
10386    }
10387}
10388#[doc(inline)]
10389pub use self::__buffa::view::DataObjectView;
10390#[doc(inline)]
10391pub use self::__buffa::view::DataObjectOwnedView;
10392#[doc(inline)]
10393pub use self::__buffa::view::ShareView;
10394#[doc(inline)]
10395pub use self::__buffa::view::ShareOwnedView;
10396#[doc(inline)]
10397pub use self::__buffa::view::PrivilegeAssignmentView;
10398#[doc(inline)]
10399pub use self::__buffa::view::PrivilegeAssignmentOwnedView;
10400#[doc(inline)]
10401pub use self::__buffa::view::PermissionsChangeView;
10402#[doc(inline)]
10403pub use self::__buffa::view::PermissionsChangeOwnedView;
10404#[doc(inline)]
10405pub use self::__buffa::view::ListSharesRequestView;
10406#[doc(inline)]
10407pub use self::__buffa::view::ListSharesRequestOwnedView;
10408#[doc(inline)]
10409pub use self::__buffa::view::ListSharesResponseView;
10410#[doc(inline)]
10411pub use self::__buffa::view::ListSharesResponseOwnedView;
10412#[doc(inline)]
10413pub use self::__buffa::view::CreateShareRequestView;
10414#[doc(inline)]
10415pub use self::__buffa::view::CreateShareRequestOwnedView;
10416#[doc(inline)]
10417pub use self::__buffa::view::GetShareRequestView;
10418#[doc(inline)]
10419pub use self::__buffa::view::GetShareRequestOwnedView;
10420#[doc(inline)]
10421pub use self::__buffa::view::DataObjectUpdateView;
10422#[doc(inline)]
10423pub use self::__buffa::view::DataObjectUpdateOwnedView;
10424#[doc(inline)]
10425pub use self::__buffa::view::UpdateShareRequestView;
10426#[doc(inline)]
10427pub use self::__buffa::view::UpdateShareRequestOwnedView;
10428#[doc(inline)]
10429pub use self::__buffa::view::DeleteShareRequestView;
10430#[doc(inline)]
10431pub use self::__buffa::view::DeleteShareRequestOwnedView;
10432#[doc(inline)]
10433pub use self::__buffa::view::GetPermissionsRequestView;
10434#[doc(inline)]
10435pub use self::__buffa::view::GetPermissionsRequestOwnedView;
10436#[doc(inline)]
10437pub use self::__buffa::view::GetPermissionsResponseView;
10438#[doc(inline)]
10439pub use self::__buffa::view::GetPermissionsResponseOwnedView;
10440#[doc(inline)]
10441pub use self::__buffa::view::UpdatePermissionsRequestView;
10442#[doc(inline)]
10443pub use self::__buffa::view::UpdatePermissionsRequestOwnedView;
10444#[doc(inline)]
10445pub use self::__buffa::view::UpdatePermissionsResponseView;
10446#[doc(inline)]
10447pub use self::__buffa::view::UpdatePermissionsResponseOwnedView;
10448#[doc(inline)]
10449pub use self::__buffa::register_types;