Skip to main content

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

1// @generated by buffa-codegen. DO NOT EDIT.
2
3#[derive(Clone, PartialEq, Default)]
4#[derive(::serde::Serialize, ::serde::Deserialize)]
5#[serde(default)]
6pub struct AzureUserDelegationSas {
7    /// The signed URI (SAS Token) used to access blob services for a given path
8    ///
9    /// Field 1: `sas_token`
10    #[serde(
11        rename = "sas_token",
12        alias = "sasToken",
13        with = "::buffa::json_helpers::proto_string",
14        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
15    )]
16    pub sas_token: ::buffa::alloc::string::String,
17    #[serde(skip)]
18    #[doc(hidden)]
19    pub __buffa_unknown_fields: ::buffa::UnknownFields,
20}
21impl ::core::fmt::Debug for AzureUserDelegationSas {
22    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
23        f.debug_struct("AzureUserDelegationSas")
24            .field("sas_token", &self.sas_token)
25            .finish()
26    }
27}
28impl AzureUserDelegationSas {
29    /// Protobuf type URL for this message, for use with `Any::pack` and
30    /// `Any::unpack_if`.
31    ///
32    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
33    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AzureUserDelegationSas";
34}
35impl ::buffa::DefaultInstance for AzureUserDelegationSas {
36    fn default_instance() -> &'static Self {
37        static VALUE: ::buffa::__private::OnceBox<AzureUserDelegationSas> = ::buffa::__private::OnceBox::new();
38        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
39    }
40}
41impl ::buffa::MessageName for AzureUserDelegationSas {
42    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
43    const NAME: &'static str = "AzureUserDelegationSas";
44    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.AzureUserDelegationSas";
45    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AzureUserDelegationSas";
46}
47impl ::buffa::Message for AzureUserDelegationSas {
48    /// Returns the total encoded size in bytes.
49    ///
50    /// The result is a `u32`; the protobuf specification requires all
51    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
52    /// compliant message will never overflow this type.
53    #[allow(clippy::let_and_return)]
54    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
55        #[allow(unused_imports)]
56        use ::buffa::Enumeration as _;
57        let mut size = 0u32;
58        if !self.sas_token.is_empty() {
59            size += 1u32 + ::buffa::types::string_encoded_len(&self.sas_token) as u32;
60        }
61        size += self.__buffa_unknown_fields.encoded_len() as u32;
62        size
63    }
64    fn write_to(
65        &self,
66        _cache: &mut ::buffa::SizeCache,
67        buf: &mut impl ::buffa::bytes::BufMut,
68    ) {
69        #[allow(unused_imports)]
70        use ::buffa::Enumeration as _;
71        if !self.sas_token.is_empty() {
72            ::buffa::encoding::Tag::new(
73                    1u32,
74                    ::buffa::encoding::WireType::LengthDelimited,
75                )
76                .encode(buf);
77            ::buffa::types::encode_string(&self.sas_token, buf);
78        }
79        self.__buffa_unknown_fields.write_to(buf);
80    }
81    fn merge_field(
82        &mut self,
83        tag: ::buffa::encoding::Tag,
84        buf: &mut impl ::buffa::bytes::Buf,
85        depth: u32,
86    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
87        #[allow(unused_imports)]
88        use ::buffa::bytes::Buf as _;
89        #[allow(unused_imports)]
90        use ::buffa::Enumeration as _;
91        match tag.field_number() {
92            1u32 => {
93                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
94                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
95                        field_number: 1u32,
96                        expected: 2u8,
97                        actual: tag.wire_type() as u8,
98                    });
99                }
100                ::buffa::types::merge_string(&mut self.sas_token, buf)?;
101            }
102            _ => {
103                self.__buffa_unknown_fields
104                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
105            }
106        }
107        ::core::result::Result::Ok(())
108    }
109    fn clear(&mut self) {
110        self.sas_token.clear();
111        self.__buffa_unknown_fields.clear();
112    }
113}
114impl ::buffa::ExtensionSet for AzureUserDelegationSas {
115    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.AzureUserDelegationSas";
116    fn unknown_fields(&self) -> &::buffa::UnknownFields {
117        &self.__buffa_unknown_fields
118    }
119    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
120        &mut self.__buffa_unknown_fields
121    }
122}
123impl ::buffa::json_helpers::ProtoElemJson for AzureUserDelegationSas {
124    fn serialize_proto_json<S: ::serde::Serializer>(
125        v: &Self,
126        s: S,
127    ) -> ::core::result::Result<S::Ok, S::Error> {
128        ::serde::Serialize::serialize(v, s)
129    }
130    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
131        d: D,
132    ) -> ::core::result::Result<Self, D::Error> {
133        <Self as ::serde::Deserialize>::deserialize(d)
134    }
135}
136#[doc(hidden)]
137pub const __AZURE_USER_DELEGATION_SAS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
138    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.AzureUserDelegationSas",
139    to_json: ::buffa::type_registry::any_to_json::<AzureUserDelegationSas>,
140    from_json: ::buffa::type_registry::any_from_json::<AzureUserDelegationSas>,
141    is_wkt: false,
142};
143#[derive(Clone, PartialEq, Default)]
144#[derive(::serde::Serialize, ::serde::Deserialize)]
145#[serde(default)]
146pub struct AzureAad {
147    /// Opaque token that contains claims that you can use in Azure Active Directory to access cloud services.
148    ///
149    /// Field 1: `aad_token`
150    #[serde(
151        rename = "aad_token",
152        alias = "aadToken",
153        with = "::buffa::json_helpers::proto_string",
154        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
155    )]
156    pub aad_token: ::buffa::alloc::string::String,
157    #[serde(skip)]
158    #[doc(hidden)]
159    pub __buffa_unknown_fields: ::buffa::UnknownFields,
160}
161impl ::core::fmt::Debug for AzureAad {
162    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
163        f.debug_struct("AzureAad").field("aad_token", &self.aad_token).finish()
164    }
165}
166impl AzureAad {
167    /// Protobuf type URL for this message, for use with `Any::pack` and
168    /// `Any::unpack_if`.
169    ///
170    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
171    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AzureAad";
172}
173impl ::buffa::DefaultInstance for AzureAad {
174    fn default_instance() -> &'static Self {
175        static VALUE: ::buffa::__private::OnceBox<AzureAad> = ::buffa::__private::OnceBox::new();
176        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
177    }
178}
179impl ::buffa::MessageName for AzureAad {
180    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
181    const NAME: &'static str = "AzureAad";
182    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.AzureAad";
183    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AzureAad";
184}
185impl ::buffa::Message for AzureAad {
186    /// Returns the total encoded size in bytes.
187    ///
188    /// The result is a `u32`; the protobuf specification requires all
189    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
190    /// compliant message will never overflow this type.
191    #[allow(clippy::let_and_return)]
192    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
193        #[allow(unused_imports)]
194        use ::buffa::Enumeration as _;
195        let mut size = 0u32;
196        if !self.aad_token.is_empty() {
197            size += 1u32 + ::buffa::types::string_encoded_len(&self.aad_token) as u32;
198        }
199        size += self.__buffa_unknown_fields.encoded_len() as u32;
200        size
201    }
202    fn write_to(
203        &self,
204        _cache: &mut ::buffa::SizeCache,
205        buf: &mut impl ::buffa::bytes::BufMut,
206    ) {
207        #[allow(unused_imports)]
208        use ::buffa::Enumeration as _;
209        if !self.aad_token.is_empty() {
210            ::buffa::encoding::Tag::new(
211                    1u32,
212                    ::buffa::encoding::WireType::LengthDelimited,
213                )
214                .encode(buf);
215            ::buffa::types::encode_string(&self.aad_token, buf);
216        }
217        self.__buffa_unknown_fields.write_to(buf);
218    }
219    fn merge_field(
220        &mut self,
221        tag: ::buffa::encoding::Tag,
222        buf: &mut impl ::buffa::bytes::Buf,
223        depth: u32,
224    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
225        #[allow(unused_imports)]
226        use ::buffa::bytes::Buf as _;
227        #[allow(unused_imports)]
228        use ::buffa::Enumeration as _;
229        match tag.field_number() {
230            1u32 => {
231                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
232                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
233                        field_number: 1u32,
234                        expected: 2u8,
235                        actual: tag.wire_type() as u8,
236                    });
237                }
238                ::buffa::types::merge_string(&mut self.aad_token, buf)?;
239            }
240            _ => {
241                self.__buffa_unknown_fields
242                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
243            }
244        }
245        ::core::result::Result::Ok(())
246    }
247    fn clear(&mut self) {
248        self.aad_token.clear();
249        self.__buffa_unknown_fields.clear();
250    }
251}
252impl ::buffa::ExtensionSet for AzureAad {
253    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.AzureAad";
254    fn unknown_fields(&self) -> &::buffa::UnknownFields {
255        &self.__buffa_unknown_fields
256    }
257    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
258        &mut self.__buffa_unknown_fields
259    }
260}
261impl ::buffa::json_helpers::ProtoElemJson for AzureAad {
262    fn serialize_proto_json<S: ::serde::Serializer>(
263        v: &Self,
264        s: S,
265    ) -> ::core::result::Result<S::Ok, S::Error> {
266        ::serde::Serialize::serialize(v, s)
267    }
268    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
269        d: D,
270    ) -> ::core::result::Result<Self, D::Error> {
271        <Self as ::serde::Deserialize>::deserialize(d)
272    }
273}
274#[doc(hidden)]
275pub const __AZURE_AAD_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
276    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.AzureAad",
277    to_json: ::buffa::type_registry::any_to_json::<AzureAad>,
278    from_json: ::buffa::type_registry::any_from_json::<AzureAad>,
279    is_wkt: false,
280};
281#[derive(Clone, PartialEq, Default)]
282#[derive(::serde::Serialize, ::serde::Deserialize)]
283#[serde(default)]
284pub struct R2TemporaryCredentials {
285    /// The access key ID that identifies the temporary credentials.
286    ///
287    /// Field 1: `access_key_id`
288    #[serde(
289        rename = "access_key_id",
290        alias = "accessKeyId",
291        with = "::buffa::json_helpers::proto_string",
292        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
293    )]
294    pub access_key_id: ::buffa::alloc::string::String,
295    /// The secret access key associated with the access key.
296    ///
297    /// Field 2: `secret_access_key`
298    #[serde(
299        rename = "secret_access_key",
300        alias = "secretAccessKey",
301        with = "::buffa::json_helpers::proto_string",
302        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
303    )]
304    pub secret_access_key: ::buffa::alloc::string::String,
305    /// The generated JWT that users must pass to use the temporary credentials.
306    ///
307    /// Field 3: `session_token`
308    #[serde(
309        rename = "session_token",
310        alias = "sessionToken",
311        with = "::buffa::json_helpers::proto_string",
312        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
313    )]
314    pub session_token: ::buffa::alloc::string::String,
315    #[serde(skip)]
316    #[doc(hidden)]
317    pub __buffa_unknown_fields: ::buffa::UnknownFields,
318}
319impl ::core::fmt::Debug for R2TemporaryCredentials {
320    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
321        f.debug_struct("R2TemporaryCredentials")
322            .field("access_key_id", &self.access_key_id)
323            .field("secret_access_key", &self.secret_access_key)
324            .field("session_token", &self.session_token)
325            .finish()
326    }
327}
328impl R2TemporaryCredentials {
329    /// Protobuf type URL for this message, for use with `Any::pack` and
330    /// `Any::unpack_if`.
331    ///
332    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
333    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.R2TemporaryCredentials";
334}
335impl ::buffa::DefaultInstance for R2TemporaryCredentials {
336    fn default_instance() -> &'static Self {
337        static VALUE: ::buffa::__private::OnceBox<R2TemporaryCredentials> = ::buffa::__private::OnceBox::new();
338        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
339    }
340}
341impl ::buffa::MessageName for R2TemporaryCredentials {
342    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
343    const NAME: &'static str = "R2TemporaryCredentials";
344    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.R2TemporaryCredentials";
345    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.R2TemporaryCredentials";
346}
347impl ::buffa::Message for R2TemporaryCredentials {
348    /// Returns the total encoded size in bytes.
349    ///
350    /// The result is a `u32`; the protobuf specification requires all
351    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
352    /// compliant message will never overflow this type.
353    #[allow(clippy::let_and_return)]
354    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
355        #[allow(unused_imports)]
356        use ::buffa::Enumeration as _;
357        let mut size = 0u32;
358        if !self.access_key_id.is_empty() {
359            size
360                += 1u32 + ::buffa::types::string_encoded_len(&self.access_key_id) as u32;
361        }
362        if !self.secret_access_key.is_empty() {
363            size
364                += 1u32
365                    + ::buffa::types::string_encoded_len(&self.secret_access_key) as u32;
366        }
367        if !self.session_token.is_empty() {
368            size
369                += 1u32 + ::buffa::types::string_encoded_len(&self.session_token) as u32;
370        }
371        size += self.__buffa_unknown_fields.encoded_len() as u32;
372        size
373    }
374    fn write_to(
375        &self,
376        _cache: &mut ::buffa::SizeCache,
377        buf: &mut impl ::buffa::bytes::BufMut,
378    ) {
379        #[allow(unused_imports)]
380        use ::buffa::Enumeration as _;
381        if !self.access_key_id.is_empty() {
382            ::buffa::encoding::Tag::new(
383                    1u32,
384                    ::buffa::encoding::WireType::LengthDelimited,
385                )
386                .encode(buf);
387            ::buffa::types::encode_string(&self.access_key_id, buf);
388        }
389        if !self.secret_access_key.is_empty() {
390            ::buffa::encoding::Tag::new(
391                    2u32,
392                    ::buffa::encoding::WireType::LengthDelimited,
393                )
394                .encode(buf);
395            ::buffa::types::encode_string(&self.secret_access_key, buf);
396        }
397        if !self.session_token.is_empty() {
398            ::buffa::encoding::Tag::new(
399                    3u32,
400                    ::buffa::encoding::WireType::LengthDelimited,
401                )
402                .encode(buf);
403            ::buffa::types::encode_string(&self.session_token, buf);
404        }
405        self.__buffa_unknown_fields.write_to(buf);
406    }
407    fn merge_field(
408        &mut self,
409        tag: ::buffa::encoding::Tag,
410        buf: &mut impl ::buffa::bytes::Buf,
411        depth: u32,
412    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
413        #[allow(unused_imports)]
414        use ::buffa::bytes::Buf as _;
415        #[allow(unused_imports)]
416        use ::buffa::Enumeration as _;
417        match tag.field_number() {
418            1u32 => {
419                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
420                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
421                        field_number: 1u32,
422                        expected: 2u8,
423                        actual: tag.wire_type() as u8,
424                    });
425                }
426                ::buffa::types::merge_string(&mut self.access_key_id, buf)?;
427            }
428            2u32 => {
429                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
430                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
431                        field_number: 2u32,
432                        expected: 2u8,
433                        actual: tag.wire_type() as u8,
434                    });
435                }
436                ::buffa::types::merge_string(&mut self.secret_access_key, buf)?;
437            }
438            3u32 => {
439                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
440                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
441                        field_number: 3u32,
442                        expected: 2u8,
443                        actual: tag.wire_type() as u8,
444                    });
445                }
446                ::buffa::types::merge_string(&mut self.session_token, buf)?;
447            }
448            _ => {
449                self.__buffa_unknown_fields
450                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
451            }
452        }
453        ::core::result::Result::Ok(())
454    }
455    fn clear(&mut self) {
456        self.access_key_id.clear();
457        self.secret_access_key.clear();
458        self.session_token.clear();
459        self.__buffa_unknown_fields.clear();
460    }
461}
462impl ::buffa::ExtensionSet for R2TemporaryCredentials {
463    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.R2TemporaryCredentials";
464    fn unknown_fields(&self) -> &::buffa::UnknownFields {
465        &self.__buffa_unknown_fields
466    }
467    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
468        &mut self.__buffa_unknown_fields
469    }
470}
471impl ::buffa::json_helpers::ProtoElemJson for R2TemporaryCredentials {
472    fn serialize_proto_json<S: ::serde::Serializer>(
473        v: &Self,
474        s: S,
475    ) -> ::core::result::Result<S::Ok, S::Error> {
476        ::serde::Serialize::serialize(v, s)
477    }
478    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
479        d: D,
480    ) -> ::core::result::Result<Self, D::Error> {
481        <Self as ::serde::Deserialize>::deserialize(d)
482    }
483}
484#[doc(hidden)]
485pub const __R2TEMPORARY_CREDENTIALS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
486    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.R2TemporaryCredentials",
487    to_json: ::buffa::type_registry::any_to_json::<R2TemporaryCredentials>,
488    from_json: ::buffa::type_registry::any_from_json::<R2TemporaryCredentials>,
489    is_wkt: false,
490};
491#[derive(Clone, PartialEq, Default)]
492#[derive(::serde::Serialize, ::serde::Deserialize)]
493#[serde(default)]
494pub struct GcpOauthToken {
495    /// The OAuth token used to access Google Cloud services.
496    ///
497    /// Field 1: `oauth_token`
498    #[serde(
499        rename = "oauth_token",
500        alias = "oauthToken",
501        with = "::buffa::json_helpers::proto_string",
502        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
503    )]
504    pub oauth_token: ::buffa::alloc::string::String,
505    #[serde(skip)]
506    #[doc(hidden)]
507    pub __buffa_unknown_fields: ::buffa::UnknownFields,
508}
509impl ::core::fmt::Debug for GcpOauthToken {
510    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
511        f.debug_struct("GcpOauthToken").field("oauth_token", &self.oauth_token).finish()
512    }
513}
514impl GcpOauthToken {
515    /// Protobuf type URL for this message, for use with `Any::pack` and
516    /// `Any::unpack_if`.
517    ///
518    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
519    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GcpOauthToken";
520}
521impl ::buffa::DefaultInstance for GcpOauthToken {
522    fn default_instance() -> &'static Self {
523        static VALUE: ::buffa::__private::OnceBox<GcpOauthToken> = ::buffa::__private::OnceBox::new();
524        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
525    }
526}
527impl ::buffa::MessageName for GcpOauthToken {
528    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
529    const NAME: &'static str = "GcpOauthToken";
530    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GcpOauthToken";
531    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GcpOauthToken";
532}
533impl ::buffa::Message for GcpOauthToken {
534    /// Returns the total encoded size in bytes.
535    ///
536    /// The result is a `u32`; the protobuf specification requires all
537    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
538    /// compliant message will never overflow this type.
539    #[allow(clippy::let_and_return)]
540    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
541        #[allow(unused_imports)]
542        use ::buffa::Enumeration as _;
543        let mut size = 0u32;
544        if !self.oauth_token.is_empty() {
545            size += 1u32 + ::buffa::types::string_encoded_len(&self.oauth_token) as u32;
546        }
547        size += self.__buffa_unknown_fields.encoded_len() as u32;
548        size
549    }
550    fn write_to(
551        &self,
552        _cache: &mut ::buffa::SizeCache,
553        buf: &mut impl ::buffa::bytes::BufMut,
554    ) {
555        #[allow(unused_imports)]
556        use ::buffa::Enumeration as _;
557        if !self.oauth_token.is_empty() {
558            ::buffa::encoding::Tag::new(
559                    1u32,
560                    ::buffa::encoding::WireType::LengthDelimited,
561                )
562                .encode(buf);
563            ::buffa::types::encode_string(&self.oauth_token, buf);
564        }
565        self.__buffa_unknown_fields.write_to(buf);
566    }
567    fn merge_field(
568        &mut self,
569        tag: ::buffa::encoding::Tag,
570        buf: &mut impl ::buffa::bytes::Buf,
571        depth: u32,
572    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
573        #[allow(unused_imports)]
574        use ::buffa::bytes::Buf as _;
575        #[allow(unused_imports)]
576        use ::buffa::Enumeration as _;
577        match tag.field_number() {
578            1u32 => {
579                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
580                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
581                        field_number: 1u32,
582                        expected: 2u8,
583                        actual: tag.wire_type() as u8,
584                    });
585                }
586                ::buffa::types::merge_string(&mut self.oauth_token, buf)?;
587            }
588            _ => {
589                self.__buffa_unknown_fields
590                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
591            }
592        }
593        ::core::result::Result::Ok(())
594    }
595    fn clear(&mut self) {
596        self.oauth_token.clear();
597        self.__buffa_unknown_fields.clear();
598    }
599}
600impl ::buffa::ExtensionSet for GcpOauthToken {
601    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.GcpOauthToken";
602    fn unknown_fields(&self) -> &::buffa::UnknownFields {
603        &self.__buffa_unknown_fields
604    }
605    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
606        &mut self.__buffa_unknown_fields
607    }
608}
609impl ::buffa::json_helpers::ProtoElemJson for GcpOauthToken {
610    fn serialize_proto_json<S: ::serde::Serializer>(
611        v: &Self,
612        s: S,
613    ) -> ::core::result::Result<S::Ok, S::Error> {
614        ::serde::Serialize::serialize(v, s)
615    }
616    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
617        d: D,
618    ) -> ::core::result::Result<Self, D::Error> {
619        <Self as ::serde::Deserialize>::deserialize(d)
620    }
621}
622#[doc(hidden)]
623pub const __GCP_OAUTH_TOKEN_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
624    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.GcpOauthToken",
625    to_json: ::buffa::type_registry::any_to_json::<GcpOauthToken>,
626    from_json: ::buffa::type_registry::any_from_json::<GcpOauthToken>,
627    is_wkt: false,
628};
629#[derive(Clone, PartialEq, Default)]
630#[derive(::serde::Serialize, ::serde::Deserialize)]
631#[serde(default)]
632pub struct AwsTemporaryCredentials {
633    /// The access key ID that identifies the temporary credentials.
634    ///
635    /// Field 1: `access_key_id`
636    #[serde(
637        rename = "access_key_id",
638        alias = "accessKeyId",
639        with = "::buffa::json_helpers::proto_string",
640        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
641    )]
642    pub access_key_id: ::buffa::alloc::string::String,
643    /// The Amazon Resource Name (ARN) of the S3 access point for temporary credentials related the external location.
644    ///
645    /// Field 2: `access_point`
646    #[serde(
647        rename = "access_point",
648        alias = "accessPoint",
649        with = "::buffa::json_helpers::proto_string",
650        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
651    )]
652    pub access_point: ::buffa::alloc::string::String,
653    /// The secret access key that can be used to sign AWS API requests.
654    ///
655    /// Field 3: `secret_access_key`
656    #[serde(
657        rename = "secret_access_key",
658        alias = "secretAccessKey",
659        with = "::buffa::json_helpers::proto_string",
660        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
661    )]
662    pub secret_access_key: ::buffa::alloc::string::String,
663    /// The token that users must pass to AWS API to use the temporary credentials.
664    ///
665    /// Field 4: `session_token`
666    #[serde(
667        rename = "session_token",
668        alias = "sessionToken",
669        with = "::buffa::json_helpers::proto_string",
670        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
671    )]
672    pub session_token: ::buffa::alloc::string::String,
673    #[serde(skip)]
674    #[doc(hidden)]
675    pub __buffa_unknown_fields: ::buffa::UnknownFields,
676}
677impl ::core::fmt::Debug for AwsTemporaryCredentials {
678    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
679        f.debug_struct("AwsTemporaryCredentials")
680            .field("access_key_id", &self.access_key_id)
681            .field("access_point", &self.access_point)
682            .field("secret_access_key", &self.secret_access_key)
683            .field("session_token", &self.session_token)
684            .finish()
685    }
686}
687impl AwsTemporaryCredentials {
688    /// Protobuf type URL for this message, for use with `Any::pack` and
689    /// `Any::unpack_if`.
690    ///
691    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
692    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AwsTemporaryCredentials";
693}
694impl ::buffa::DefaultInstance for AwsTemporaryCredentials {
695    fn default_instance() -> &'static Self {
696        static VALUE: ::buffa::__private::OnceBox<AwsTemporaryCredentials> = ::buffa::__private::OnceBox::new();
697        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
698    }
699}
700impl ::buffa::MessageName for AwsTemporaryCredentials {
701    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
702    const NAME: &'static str = "AwsTemporaryCredentials";
703    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.AwsTemporaryCredentials";
704    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AwsTemporaryCredentials";
705}
706impl ::buffa::Message for AwsTemporaryCredentials {
707    /// Returns the total encoded size in bytes.
708    ///
709    /// The result is a `u32`; the protobuf specification requires all
710    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
711    /// compliant message will never overflow this type.
712    #[allow(clippy::let_and_return)]
713    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
714        #[allow(unused_imports)]
715        use ::buffa::Enumeration as _;
716        let mut size = 0u32;
717        if !self.access_key_id.is_empty() {
718            size
719                += 1u32 + ::buffa::types::string_encoded_len(&self.access_key_id) as u32;
720        }
721        if !self.access_point.is_empty() {
722            size += 1u32 + ::buffa::types::string_encoded_len(&self.access_point) as u32;
723        }
724        if !self.secret_access_key.is_empty() {
725            size
726                += 1u32
727                    + ::buffa::types::string_encoded_len(&self.secret_access_key) as u32;
728        }
729        if !self.session_token.is_empty() {
730            size
731                += 1u32 + ::buffa::types::string_encoded_len(&self.session_token) as u32;
732        }
733        size += self.__buffa_unknown_fields.encoded_len() as u32;
734        size
735    }
736    fn write_to(
737        &self,
738        _cache: &mut ::buffa::SizeCache,
739        buf: &mut impl ::buffa::bytes::BufMut,
740    ) {
741        #[allow(unused_imports)]
742        use ::buffa::Enumeration as _;
743        if !self.access_key_id.is_empty() {
744            ::buffa::encoding::Tag::new(
745                    1u32,
746                    ::buffa::encoding::WireType::LengthDelimited,
747                )
748                .encode(buf);
749            ::buffa::types::encode_string(&self.access_key_id, buf);
750        }
751        if !self.access_point.is_empty() {
752            ::buffa::encoding::Tag::new(
753                    2u32,
754                    ::buffa::encoding::WireType::LengthDelimited,
755                )
756                .encode(buf);
757            ::buffa::types::encode_string(&self.access_point, buf);
758        }
759        if !self.secret_access_key.is_empty() {
760            ::buffa::encoding::Tag::new(
761                    3u32,
762                    ::buffa::encoding::WireType::LengthDelimited,
763                )
764                .encode(buf);
765            ::buffa::types::encode_string(&self.secret_access_key, buf);
766        }
767        if !self.session_token.is_empty() {
768            ::buffa::encoding::Tag::new(
769                    4u32,
770                    ::buffa::encoding::WireType::LengthDelimited,
771                )
772                .encode(buf);
773            ::buffa::types::encode_string(&self.session_token, buf);
774        }
775        self.__buffa_unknown_fields.write_to(buf);
776    }
777    fn merge_field(
778        &mut self,
779        tag: ::buffa::encoding::Tag,
780        buf: &mut impl ::buffa::bytes::Buf,
781        depth: u32,
782    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
783        #[allow(unused_imports)]
784        use ::buffa::bytes::Buf as _;
785        #[allow(unused_imports)]
786        use ::buffa::Enumeration as _;
787        match tag.field_number() {
788            1u32 => {
789                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
790                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
791                        field_number: 1u32,
792                        expected: 2u8,
793                        actual: tag.wire_type() as u8,
794                    });
795                }
796                ::buffa::types::merge_string(&mut self.access_key_id, buf)?;
797            }
798            2u32 => {
799                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
800                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
801                        field_number: 2u32,
802                        expected: 2u8,
803                        actual: tag.wire_type() as u8,
804                    });
805                }
806                ::buffa::types::merge_string(&mut self.access_point, buf)?;
807            }
808            3u32 => {
809                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
810                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
811                        field_number: 3u32,
812                        expected: 2u8,
813                        actual: tag.wire_type() as u8,
814                    });
815                }
816                ::buffa::types::merge_string(&mut self.secret_access_key, buf)?;
817            }
818            4u32 => {
819                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
820                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
821                        field_number: 4u32,
822                        expected: 2u8,
823                        actual: tag.wire_type() as u8,
824                    });
825                }
826                ::buffa::types::merge_string(&mut self.session_token, buf)?;
827            }
828            _ => {
829                self.__buffa_unknown_fields
830                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
831            }
832        }
833        ::core::result::Result::Ok(())
834    }
835    fn clear(&mut self) {
836        self.access_key_id.clear();
837        self.access_point.clear();
838        self.secret_access_key.clear();
839        self.session_token.clear();
840        self.__buffa_unknown_fields.clear();
841    }
842}
843impl ::buffa::ExtensionSet for AwsTemporaryCredentials {
844    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.AwsTemporaryCredentials";
845    fn unknown_fields(&self) -> &::buffa::UnknownFields {
846        &self.__buffa_unknown_fields
847    }
848    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
849        &mut self.__buffa_unknown_fields
850    }
851}
852impl ::buffa::json_helpers::ProtoElemJson for AwsTemporaryCredentials {
853    fn serialize_proto_json<S: ::serde::Serializer>(
854        v: &Self,
855        s: S,
856    ) -> ::core::result::Result<S::Ok, S::Error> {
857        ::serde::Serialize::serialize(v, s)
858    }
859    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
860        d: D,
861    ) -> ::core::result::Result<Self, D::Error> {
862        <Self as ::serde::Deserialize>::deserialize(d)
863    }
864}
865#[doc(hidden)]
866pub const __AWS_TEMPORARY_CREDENTIALS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
867    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.AwsTemporaryCredentials",
868    to_json: ::buffa::type_registry::any_to_json::<AwsTemporaryCredentials>,
869    from_json: ::buffa::type_registry::any_from_json::<AwsTemporaryCredentials>,
870    is_wkt: false,
871};
872/// The response to the GenerateTemporaryTableCredentialsRequest.
873#[derive(Clone, PartialEq, Default)]
874#[derive(::serde::Serialize)]
875#[serde(default)]
876pub struct TemporaryCredential {
877    /// Server time when the credential will expire, in epoch milliseconds.
878    /// The API client is advised to cache the credential given this expiration time.
879    ///
880    /// Field 1: `expiration_time`
881    #[serde(
882        rename = "expiration_time",
883        alias = "expirationTime",
884        with = "::buffa::json_helpers::int64",
885        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i64"
886    )]
887    pub expiration_time: i64,
888    /// The URL of the storage path accessible by the temporary credential.
889    ///
890    /// Field 2: `url`
891    #[serde(
892        rename = "url",
893        with = "::buffa::json_helpers::proto_string",
894        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
895    )]
896    pub url: ::buffa::alloc::string::String,
897    #[serde(flatten)]
898    pub credentials: ::core::option::Option<
899        __buffa::oneof::temporary_credential::Credentials,
900    >,
901    #[serde(skip)]
902    #[doc(hidden)]
903    pub __buffa_unknown_fields: ::buffa::UnknownFields,
904}
905impl ::core::fmt::Debug for TemporaryCredential {
906    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
907        f.debug_struct("TemporaryCredential")
908            .field("expiration_time", &self.expiration_time)
909            .field("url", &self.url)
910            .field("credentials", &self.credentials)
911            .finish()
912    }
913}
914impl TemporaryCredential {
915    /// Protobuf type URL for this message, for use with `Any::pack` and
916    /// `Any::unpack_if`.
917    ///
918    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
919    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.TemporaryCredential";
920}
921impl ::buffa::DefaultInstance for TemporaryCredential {
922    fn default_instance() -> &'static Self {
923        static VALUE: ::buffa::__private::OnceBox<TemporaryCredential> = ::buffa::__private::OnceBox::new();
924        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
925    }
926}
927impl ::buffa::MessageName for TemporaryCredential {
928    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
929    const NAME: &'static str = "TemporaryCredential";
930    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.TemporaryCredential";
931    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.TemporaryCredential";
932}
933impl ::buffa::Message for TemporaryCredential {
934    /// Returns the total encoded size in bytes.
935    ///
936    /// The result is a `u32`; the protobuf specification requires all
937    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
938    /// compliant message will never overflow this type.
939    #[allow(clippy::let_and_return)]
940    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
941        #[allow(unused_imports)]
942        use ::buffa::Enumeration as _;
943        let mut size = 0u32;
944        if self.expiration_time != 0i64 {
945            size
946                += 1u32 + ::buffa::types::int64_encoded_len(self.expiration_time) as u32;
947        }
948        if !self.url.is_empty() {
949            size += 1u32 + ::buffa::types::string_encoded_len(&self.url) as u32;
950        }
951        if let ::core::option::Option::Some(ref v) = self.credentials {
952            match v {
953                __buffa::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
954                    x,
955                ) => {
956                    let __slot = __cache.reserve();
957                    let inner = x.compute_size(__cache);
958                    __cache.set(__slot, inner);
959                    size
960                        += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
961                            + inner;
962                }
963                __buffa::oneof::temporary_credential::Credentials::AzureAad(x) => {
964                    let __slot = __cache.reserve();
965                    let inner = x.compute_size(__cache);
966                    __cache.set(__slot, inner);
967                    size
968                        += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
969                            + inner;
970                }
971                __buffa::oneof::temporary_credential::Credentials::AwsTempCredentials(
972                    x,
973                ) => {
974                    let __slot = __cache.reserve();
975                    let inner = x.compute_size(__cache);
976                    __cache.set(__slot, inner);
977                    size
978                        += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
979                            + inner;
980                }
981                __buffa::oneof::temporary_credential::Credentials::GcpOauthToken(x) => {
982                    let __slot = __cache.reserve();
983                    let inner = x.compute_size(__cache);
984                    __cache.set(__slot, inner);
985                    size
986                        += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
987                            + inner;
988                }
989                __buffa::oneof::temporary_credential::Credentials::R2TempCredentials(
990                    x,
991                ) => {
992                    let __slot = __cache.reserve();
993                    let inner = x.compute_size(__cache);
994                    __cache.set(__slot, inner);
995                    size
996                        += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
997                            + inner;
998                }
999            }
1000        }
1001        size += self.__buffa_unknown_fields.encoded_len() as u32;
1002        size
1003    }
1004    fn write_to(
1005        &self,
1006        __cache: &mut ::buffa::SizeCache,
1007        buf: &mut impl ::buffa::bytes::BufMut,
1008    ) {
1009        #[allow(unused_imports)]
1010        use ::buffa::Enumeration as _;
1011        if self.expiration_time != 0i64 {
1012            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
1013                .encode(buf);
1014            ::buffa::types::encode_int64(self.expiration_time, buf);
1015        }
1016        if !self.url.is_empty() {
1017            ::buffa::encoding::Tag::new(
1018                    2u32,
1019                    ::buffa::encoding::WireType::LengthDelimited,
1020                )
1021                .encode(buf);
1022            ::buffa::types::encode_string(&self.url, buf);
1023        }
1024        if let ::core::option::Option::Some(ref v) = self.credentials {
1025            match v {
1026                __buffa::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
1027                    x,
1028                ) => {
1029                    ::buffa::encoding::Tag::new(
1030                            100u32,
1031                            ::buffa::encoding::WireType::LengthDelimited,
1032                        )
1033                        .encode(buf);
1034                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1035                    x.write_to(__cache, buf);
1036                }
1037                __buffa::oneof::temporary_credential::Credentials::AzureAad(x) => {
1038                    ::buffa::encoding::Tag::new(
1039                            101u32,
1040                            ::buffa::encoding::WireType::LengthDelimited,
1041                        )
1042                        .encode(buf);
1043                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1044                    x.write_to(__cache, buf);
1045                }
1046                __buffa::oneof::temporary_credential::Credentials::AwsTempCredentials(
1047                    x,
1048                ) => {
1049                    ::buffa::encoding::Tag::new(
1050                            102u32,
1051                            ::buffa::encoding::WireType::LengthDelimited,
1052                        )
1053                        .encode(buf);
1054                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1055                    x.write_to(__cache, buf);
1056                }
1057                __buffa::oneof::temporary_credential::Credentials::GcpOauthToken(x) => {
1058                    ::buffa::encoding::Tag::new(
1059                            103u32,
1060                            ::buffa::encoding::WireType::LengthDelimited,
1061                        )
1062                        .encode(buf);
1063                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1064                    x.write_to(__cache, buf);
1065                }
1066                __buffa::oneof::temporary_credential::Credentials::R2TempCredentials(
1067                    x,
1068                ) => {
1069                    ::buffa::encoding::Tag::new(
1070                            104u32,
1071                            ::buffa::encoding::WireType::LengthDelimited,
1072                        )
1073                        .encode(buf);
1074                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
1075                    x.write_to(__cache, buf);
1076                }
1077            }
1078        }
1079        self.__buffa_unknown_fields.write_to(buf);
1080    }
1081    fn merge_field(
1082        &mut self,
1083        tag: ::buffa::encoding::Tag,
1084        buf: &mut impl ::buffa::bytes::Buf,
1085        depth: u32,
1086    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1087        #[allow(unused_imports)]
1088        use ::buffa::bytes::Buf as _;
1089        #[allow(unused_imports)]
1090        use ::buffa::Enumeration as _;
1091        match tag.field_number() {
1092            1u32 => {
1093                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1094                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1095                        field_number: 1u32,
1096                        expected: 0u8,
1097                        actual: tag.wire_type() as u8,
1098                    });
1099                }
1100                self.expiration_time = ::buffa::types::decode_int64(buf)?;
1101            }
1102            2u32 => {
1103                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1104                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1105                        field_number: 2u32,
1106                        expected: 2u8,
1107                        actual: tag.wire_type() as u8,
1108                    });
1109                }
1110                ::buffa::types::merge_string(&mut self.url, buf)?;
1111            }
1112            100u32 => {
1113                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1114                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1115                        field_number: 100u32,
1116                        expected: 2u8,
1117                        actual: tag.wire_type() as u8,
1118                    });
1119                }
1120                if let ::core::option::Option::Some(
1121                    __buffa::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
1122                        ref mut existing,
1123                    ),
1124                ) = self.credentials
1125                {
1126                    ::buffa::Message::merge_length_delimited(
1127                        &mut **existing,
1128                        buf,
1129                        depth,
1130                    )?;
1131                } else {
1132                    let mut val = ::core::default::Default::default();
1133                    ::buffa::Message::merge_length_delimited(&mut val, buf, depth)?;
1134                    self.credentials = ::core::option::Option::Some(
1135                        __buffa::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
1136                            ::buffa::alloc::boxed::Box::new(val),
1137                        ),
1138                    );
1139                }
1140            }
1141            101u32 => {
1142                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1143                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1144                        field_number: 101u32,
1145                        expected: 2u8,
1146                        actual: tag.wire_type() as u8,
1147                    });
1148                }
1149                if let ::core::option::Option::Some(
1150                    __buffa::oneof::temporary_credential::Credentials::AzureAad(
1151                        ref mut existing,
1152                    ),
1153                ) = self.credentials
1154                {
1155                    ::buffa::Message::merge_length_delimited(
1156                        &mut **existing,
1157                        buf,
1158                        depth,
1159                    )?;
1160                } else {
1161                    let mut val = ::core::default::Default::default();
1162                    ::buffa::Message::merge_length_delimited(&mut val, buf, depth)?;
1163                    self.credentials = ::core::option::Option::Some(
1164                        __buffa::oneof::temporary_credential::Credentials::AzureAad(
1165                            ::buffa::alloc::boxed::Box::new(val),
1166                        ),
1167                    );
1168                }
1169            }
1170            102u32 => {
1171                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1172                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1173                        field_number: 102u32,
1174                        expected: 2u8,
1175                        actual: tag.wire_type() as u8,
1176                    });
1177                }
1178                if let ::core::option::Option::Some(
1179                    __buffa::oneof::temporary_credential::Credentials::AwsTempCredentials(
1180                        ref mut existing,
1181                    ),
1182                ) = self.credentials
1183                {
1184                    ::buffa::Message::merge_length_delimited(
1185                        &mut **existing,
1186                        buf,
1187                        depth,
1188                    )?;
1189                } else {
1190                    let mut val = ::core::default::Default::default();
1191                    ::buffa::Message::merge_length_delimited(&mut val, buf, depth)?;
1192                    self.credentials = ::core::option::Option::Some(
1193                        __buffa::oneof::temporary_credential::Credentials::AwsTempCredentials(
1194                            ::buffa::alloc::boxed::Box::new(val),
1195                        ),
1196                    );
1197                }
1198            }
1199            103u32 => {
1200                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1201                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1202                        field_number: 103u32,
1203                        expected: 2u8,
1204                        actual: tag.wire_type() as u8,
1205                    });
1206                }
1207                if let ::core::option::Option::Some(
1208                    __buffa::oneof::temporary_credential::Credentials::GcpOauthToken(
1209                        ref mut existing,
1210                    ),
1211                ) = self.credentials
1212                {
1213                    ::buffa::Message::merge_length_delimited(
1214                        &mut **existing,
1215                        buf,
1216                        depth,
1217                    )?;
1218                } else {
1219                    let mut val = ::core::default::Default::default();
1220                    ::buffa::Message::merge_length_delimited(&mut val, buf, depth)?;
1221                    self.credentials = ::core::option::Option::Some(
1222                        __buffa::oneof::temporary_credential::Credentials::GcpOauthToken(
1223                            ::buffa::alloc::boxed::Box::new(val),
1224                        ),
1225                    );
1226                }
1227            }
1228            104u32 => {
1229                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1230                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1231                        field_number: 104u32,
1232                        expected: 2u8,
1233                        actual: tag.wire_type() as u8,
1234                    });
1235                }
1236                if let ::core::option::Option::Some(
1237                    __buffa::oneof::temporary_credential::Credentials::R2TempCredentials(
1238                        ref mut existing,
1239                    ),
1240                ) = self.credentials
1241                {
1242                    ::buffa::Message::merge_length_delimited(
1243                        &mut **existing,
1244                        buf,
1245                        depth,
1246                    )?;
1247                } else {
1248                    let mut val = ::core::default::Default::default();
1249                    ::buffa::Message::merge_length_delimited(&mut val, buf, depth)?;
1250                    self.credentials = ::core::option::Option::Some(
1251                        __buffa::oneof::temporary_credential::Credentials::R2TempCredentials(
1252                            ::buffa::alloc::boxed::Box::new(val),
1253                        ),
1254                    );
1255                }
1256            }
1257            _ => {
1258                self.__buffa_unknown_fields
1259                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1260            }
1261        }
1262        ::core::result::Result::Ok(())
1263    }
1264    fn clear(&mut self) {
1265        self.expiration_time = 0i64;
1266        self.url.clear();
1267        self.credentials = ::core::option::Option::None;
1268        self.__buffa_unknown_fields.clear();
1269    }
1270}
1271impl ::buffa::ExtensionSet for TemporaryCredential {
1272    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.TemporaryCredential";
1273    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1274        &self.__buffa_unknown_fields
1275    }
1276    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1277        &mut self.__buffa_unknown_fields
1278    }
1279}
1280impl<'de> serde::Deserialize<'de> for TemporaryCredential {
1281    fn deserialize<D: serde::Deserializer<'de>>(
1282        d: D,
1283    ) -> ::core::result::Result<Self, D::Error> {
1284        struct _V;
1285        impl<'de> serde::de::Visitor<'de> for _V {
1286            type Value = TemporaryCredential;
1287            fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1288                f.write_str("struct TemporaryCredential")
1289            }
1290            #[allow(clippy::field_reassign_with_default)]
1291            fn visit_map<A: serde::de::MapAccess<'de>>(
1292                self,
1293                mut map: A,
1294            ) -> ::core::result::Result<TemporaryCredential, A::Error> {
1295                let mut __f_expiration_time: ::core::option::Option<i64> = None;
1296                let mut __f_url: ::core::option::Option<
1297                    ::buffa::alloc::string::String,
1298                > = None;
1299                let mut __oneof_credentials: ::core::option::Option<
1300                    __buffa::oneof::temporary_credential::Credentials,
1301                > = None;
1302                while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
1303                    match key.as_str() {
1304                        "expirationTime" | "expiration_time" => {
1305                            __f_expiration_time = Some({
1306                                struct _S;
1307                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
1308                                    type Value = i64;
1309                                    fn deserialize<D: serde::Deserializer<'de>>(
1310                                        self,
1311                                        d: D,
1312                                    ) -> ::core::result::Result<i64, D::Error> {
1313                                        ::buffa::json_helpers::int64::deserialize(d)
1314                                    }
1315                                }
1316                                map.next_value_seed(_S)?
1317                            });
1318                        }
1319                        "url" => {
1320                            __f_url = Some({
1321                                struct _S;
1322                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
1323                                    type Value = ::buffa::alloc::string::String;
1324                                    fn deserialize<D: serde::Deserializer<'de>>(
1325                                        self,
1326                                        d: D,
1327                                    ) -> ::core::result::Result<
1328                                        ::buffa::alloc::string::String,
1329                                        D::Error,
1330                                    > {
1331                                        ::buffa::json_helpers::proto_string::deserialize(d)
1332                                    }
1333                                }
1334                                map.next_value_seed(_S)?
1335                            });
1336                        }
1337                        "azureUserDelegationSas" | "azure_user_delegation_sas" => {
1338                            let v: ::core::option::Option<AzureUserDelegationSas> = map
1339                                .next_value_seed(
1340                                    ::buffa::json_helpers::NullableDeserializeSeed(
1341                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1342                                            AzureUserDelegationSas,
1343                                        >::new(),
1344                                    ),
1345                                )?;
1346                            if let Some(v) = v {
1347                                if __oneof_credentials.is_some() {
1348                                    return Err(
1349                                        serde::de::Error::custom(
1350                                            "multiple oneof fields set for 'credentials'",
1351                                        ),
1352                                    );
1353                                }
1354                                __oneof_credentials = Some(
1355                                    __buffa::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
1356                                        ::buffa::alloc::boxed::Box::new(v),
1357                                    ),
1358                                );
1359                            }
1360                        }
1361                        "azureAad" | "azure_aad" => {
1362                            let v: ::core::option::Option<AzureAad> = map
1363                                .next_value_seed(
1364                                    ::buffa::json_helpers::NullableDeserializeSeed(
1365                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1366                                            AzureAad,
1367                                        >::new(),
1368                                    ),
1369                                )?;
1370                            if let Some(v) = v {
1371                                if __oneof_credentials.is_some() {
1372                                    return Err(
1373                                        serde::de::Error::custom(
1374                                            "multiple oneof fields set for 'credentials'",
1375                                        ),
1376                                    );
1377                                }
1378                                __oneof_credentials = Some(
1379                                    __buffa::oneof::temporary_credential::Credentials::AzureAad(
1380                                        ::buffa::alloc::boxed::Box::new(v),
1381                                    ),
1382                                );
1383                            }
1384                        }
1385                        "awsTempCredentials" | "aws_temp_credentials" => {
1386                            let v: ::core::option::Option<AwsTemporaryCredentials> = map
1387                                .next_value_seed(
1388                                    ::buffa::json_helpers::NullableDeserializeSeed(
1389                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1390                                            AwsTemporaryCredentials,
1391                                        >::new(),
1392                                    ),
1393                                )?;
1394                            if let Some(v) = v {
1395                                if __oneof_credentials.is_some() {
1396                                    return Err(
1397                                        serde::de::Error::custom(
1398                                            "multiple oneof fields set for 'credentials'",
1399                                        ),
1400                                    );
1401                                }
1402                                __oneof_credentials = Some(
1403                                    __buffa::oneof::temporary_credential::Credentials::AwsTempCredentials(
1404                                        ::buffa::alloc::boxed::Box::new(v),
1405                                    ),
1406                                );
1407                            }
1408                        }
1409                        "gcpOauthToken" | "gcp_oauth_token" => {
1410                            let v: ::core::option::Option<GcpOauthToken> = map
1411                                .next_value_seed(
1412                                    ::buffa::json_helpers::NullableDeserializeSeed(
1413                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1414                                            GcpOauthToken,
1415                                        >::new(),
1416                                    ),
1417                                )?;
1418                            if let Some(v) = v {
1419                                if __oneof_credentials.is_some() {
1420                                    return Err(
1421                                        serde::de::Error::custom(
1422                                            "multiple oneof fields set for 'credentials'",
1423                                        ),
1424                                    );
1425                                }
1426                                __oneof_credentials = Some(
1427                                    __buffa::oneof::temporary_credential::Credentials::GcpOauthToken(
1428                                        ::buffa::alloc::boxed::Box::new(v),
1429                                    ),
1430                                );
1431                            }
1432                        }
1433                        "r2TempCredentials" | "r2_temp_credentials" => {
1434                            let v: ::core::option::Option<R2TemporaryCredentials> = map
1435                                .next_value_seed(
1436                                    ::buffa::json_helpers::NullableDeserializeSeed(
1437                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1438                                            R2TemporaryCredentials,
1439                                        >::new(),
1440                                    ),
1441                                )?;
1442                            if let Some(v) = v {
1443                                if __oneof_credentials.is_some() {
1444                                    return Err(
1445                                        serde::de::Error::custom(
1446                                            "multiple oneof fields set for 'credentials'",
1447                                        ),
1448                                    );
1449                                }
1450                                __oneof_credentials = Some(
1451                                    __buffa::oneof::temporary_credential::Credentials::R2TempCredentials(
1452                                        ::buffa::alloc::boxed::Box::new(v),
1453                                    ),
1454                                );
1455                            }
1456                        }
1457                        _ => {
1458                            map.next_value::<serde::de::IgnoredAny>()?;
1459                        }
1460                    }
1461                }
1462                let mut __r = <TemporaryCredential as ::core::default::Default>::default();
1463                if let ::core::option::Option::Some(v) = __f_expiration_time {
1464                    __r.expiration_time = v;
1465                }
1466                if let ::core::option::Option::Some(v) = __f_url {
1467                    __r.url = v;
1468                }
1469                __r.credentials = __oneof_credentials;
1470                Ok(__r)
1471            }
1472        }
1473        d.deserialize_map(_V)
1474    }
1475}
1476impl ::buffa::json_helpers::ProtoElemJson for TemporaryCredential {
1477    fn serialize_proto_json<S: ::serde::Serializer>(
1478        v: &Self,
1479        s: S,
1480    ) -> ::core::result::Result<S::Ok, S::Error> {
1481        ::serde::Serialize::serialize(v, s)
1482    }
1483    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1484        d: D,
1485    ) -> ::core::result::Result<Self, D::Error> {
1486        <Self as ::serde::Deserialize>::deserialize(d)
1487    }
1488}
1489#[doc(hidden)]
1490pub const __TEMPORARY_CREDENTIAL_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1491    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.TemporaryCredential",
1492    to_json: ::buffa::type_registry::any_to_json::<TemporaryCredential>,
1493    from_json: ::buffa::type_registry::any_from_json::<TemporaryCredential>,
1494    is_wkt: false,
1495};
1496pub mod temporary_credential {
1497    #[allow(unused_imports)]
1498    use super::*;
1499    #[doc(inline)]
1500    pub use super::__buffa::oneof::temporary_credential::Credentials;
1501    #[doc(inline)]
1502    pub use super::__buffa::view::oneof::temporary_credential::Credentials as CredentialsView;
1503}
1504/// Generate a new set of credentials for a table.
1505#[derive(Clone, PartialEq, Default)]
1506#[derive(::serde::Serialize, ::serde::Deserialize)]
1507#[serde(default)]
1508pub struct GenerateTemporaryTableCredentialsRequest {
1509    /// UUID of the table to read or write.
1510    ///
1511    /// Field 1: `table_id`
1512    #[serde(
1513        rename = "table_id",
1514        alias = "tableId",
1515        with = "::buffa::json_helpers::proto_string",
1516        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1517    )]
1518    pub table_id: ::buffa::alloc::string::String,
1519    /// The operation performed against the table data, either READ or READ_WRITE.
1520    /// If READ_WRITE is specified, the credentials returned will have write
1521    /// permissions, otherwise, it will be read only.
1522    ///
1523    /// Field 2: `operation`
1524    #[serde(
1525        rename = "operation",
1526        with = "::buffa::json_helpers::proto_enum",
1527        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1528    )]
1529    pub operation: ::buffa::EnumValue<
1530        generate_temporary_table_credentials_request::Operation,
1531    >,
1532    #[serde(skip)]
1533    #[doc(hidden)]
1534    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1535}
1536impl ::core::fmt::Debug for GenerateTemporaryTableCredentialsRequest {
1537    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1538        f.debug_struct("GenerateTemporaryTableCredentialsRequest")
1539            .field("table_id", &self.table_id)
1540            .field("operation", &self.operation)
1541            .finish()
1542    }
1543}
1544impl GenerateTemporaryTableCredentialsRequest {
1545    /// Protobuf type URL for this message, for use with `Any::pack` and
1546    /// `Any::unpack_if`.
1547    ///
1548    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1549    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryTableCredentialsRequest";
1550}
1551impl ::buffa::DefaultInstance for GenerateTemporaryTableCredentialsRequest {
1552    fn default_instance() -> &'static Self {
1553        static VALUE: ::buffa::__private::OnceBox<
1554            GenerateTemporaryTableCredentialsRequest,
1555        > = ::buffa::__private::OnceBox::new();
1556        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1557    }
1558}
1559impl ::buffa::MessageName for GenerateTemporaryTableCredentialsRequest {
1560    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
1561    const NAME: &'static str = "GenerateTemporaryTableCredentialsRequest";
1562    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryTableCredentialsRequest";
1563    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryTableCredentialsRequest";
1564}
1565impl ::buffa::Message for GenerateTemporaryTableCredentialsRequest {
1566    /// Returns the total encoded size in bytes.
1567    ///
1568    /// The result is a `u32`; the protobuf specification requires all
1569    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1570    /// compliant message will never overflow this type.
1571    #[allow(clippy::let_and_return)]
1572    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1573        #[allow(unused_imports)]
1574        use ::buffa::Enumeration as _;
1575        let mut size = 0u32;
1576        if !self.table_id.is_empty() {
1577            size += 1u32 + ::buffa::types::string_encoded_len(&self.table_id) as u32;
1578        }
1579        {
1580            let val = self.operation.to_i32();
1581            if val != 0 {
1582                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1583            }
1584        }
1585        size += self.__buffa_unknown_fields.encoded_len() as u32;
1586        size
1587    }
1588    fn write_to(
1589        &self,
1590        _cache: &mut ::buffa::SizeCache,
1591        buf: &mut impl ::buffa::bytes::BufMut,
1592    ) {
1593        #[allow(unused_imports)]
1594        use ::buffa::Enumeration as _;
1595        if !self.table_id.is_empty() {
1596            ::buffa::encoding::Tag::new(
1597                    1u32,
1598                    ::buffa::encoding::WireType::LengthDelimited,
1599                )
1600                .encode(buf);
1601            ::buffa::types::encode_string(&self.table_id, buf);
1602        }
1603        {
1604            let val = self.operation.to_i32();
1605            if val != 0 {
1606                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1607                    .encode(buf);
1608                ::buffa::types::encode_int32(val, buf);
1609            }
1610        }
1611        self.__buffa_unknown_fields.write_to(buf);
1612    }
1613    fn merge_field(
1614        &mut self,
1615        tag: ::buffa::encoding::Tag,
1616        buf: &mut impl ::buffa::bytes::Buf,
1617        depth: u32,
1618    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1619        #[allow(unused_imports)]
1620        use ::buffa::bytes::Buf as _;
1621        #[allow(unused_imports)]
1622        use ::buffa::Enumeration as _;
1623        match tag.field_number() {
1624            1u32 => {
1625                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1626                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1627                        field_number: 1u32,
1628                        expected: 2u8,
1629                        actual: tag.wire_type() as u8,
1630                    });
1631                }
1632                ::buffa::types::merge_string(&mut self.table_id, buf)?;
1633            }
1634            2u32 => {
1635                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1636                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1637                        field_number: 2u32,
1638                        expected: 0u8,
1639                        actual: tag.wire_type() as u8,
1640                    });
1641                }
1642                self.operation = ::buffa::EnumValue::from(
1643                    ::buffa::types::decode_int32(buf)?,
1644                );
1645            }
1646            _ => {
1647                self.__buffa_unknown_fields
1648                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1649            }
1650        }
1651        ::core::result::Result::Ok(())
1652    }
1653    fn clear(&mut self) {
1654        self.table_id.clear();
1655        self.operation = ::buffa::EnumValue::from(0);
1656        self.__buffa_unknown_fields.clear();
1657    }
1658}
1659impl ::buffa::ExtensionSet for GenerateTemporaryTableCredentialsRequest {
1660    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryTableCredentialsRequest";
1661    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1662        &self.__buffa_unknown_fields
1663    }
1664    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1665        &mut self.__buffa_unknown_fields
1666    }
1667}
1668impl ::buffa::json_helpers::ProtoElemJson for GenerateTemporaryTableCredentialsRequest {
1669    fn serialize_proto_json<S: ::serde::Serializer>(
1670        v: &Self,
1671        s: S,
1672    ) -> ::core::result::Result<S::Ok, S::Error> {
1673        ::serde::Serialize::serialize(v, s)
1674    }
1675    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1676        d: D,
1677    ) -> ::core::result::Result<Self, D::Error> {
1678        <Self as ::serde::Deserialize>::deserialize(d)
1679    }
1680}
1681#[doc(hidden)]
1682pub const __GENERATE_TEMPORARY_TABLE_CREDENTIALS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1683    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryTableCredentialsRequest",
1684    to_json: ::buffa::type_registry::any_to_json::<
1685        GenerateTemporaryTableCredentialsRequest,
1686    >,
1687    from_json: ::buffa::type_registry::any_from_json::<
1688        GenerateTemporaryTableCredentialsRequest,
1689    >,
1690    is_wkt: false,
1691};
1692pub mod generate_temporary_table_credentials_request {
1693    #[allow(unused_imports)]
1694    use super::*;
1695    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1696    #[repr(i32)]
1697    pub enum Operation {
1698        /// The operation is not specified.
1699        UNSPECIFIED = 0i32,
1700        /// The operation is read only.
1701        READ = 1i32,
1702        /// The operation is read and write.
1703        READ_WRITE = 2i32,
1704    }
1705    impl Operation {
1706        ///Idiomatic alias for [`Self::UNSPECIFIED`]; `Debug` prints the variant name.
1707        #[allow(non_upper_case_globals)]
1708        pub const Unspecified: Self = Self::UNSPECIFIED;
1709        ///Idiomatic alias for [`Self::READ`]; `Debug` prints the variant name.
1710        #[allow(non_upper_case_globals)]
1711        pub const Read: Self = Self::READ;
1712        ///Idiomatic alias for [`Self::READ_WRITE`]; `Debug` prints the variant name.
1713        #[allow(non_upper_case_globals)]
1714        pub const ReadWrite: Self = Self::READ_WRITE;
1715    }
1716    impl ::core::default::Default for Operation {
1717        fn default() -> Self {
1718            Self::UNSPECIFIED
1719        }
1720    }
1721    impl ::serde::Serialize for Operation {
1722        fn serialize<S: ::serde::Serializer>(
1723            &self,
1724            s: S,
1725        ) -> ::core::result::Result<S::Ok, S::Error> {
1726            s.serialize_str(::buffa::Enumeration::proto_name(self))
1727        }
1728    }
1729    impl<'de> ::serde::Deserialize<'de> for Operation {
1730        fn deserialize<D: ::serde::Deserializer<'de>>(
1731            d: D,
1732        ) -> ::core::result::Result<Self, D::Error> {
1733            struct _V;
1734            impl ::serde::de::Visitor<'_> for _V {
1735                type Value = Operation;
1736                fn expecting(
1737                    &self,
1738                    f: &mut ::core::fmt::Formatter<'_>,
1739                ) -> ::core::fmt::Result {
1740                    f.write_str(
1741                        concat!("a string, integer, or null for ", stringify!(Operation)),
1742                    )
1743                }
1744                fn visit_str<E: ::serde::de::Error>(
1745                    self,
1746                    v: &str,
1747                ) -> ::core::result::Result<Operation, E> {
1748                    <Operation as ::buffa::Enumeration>::from_proto_name(v)
1749                        .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1750                }
1751                fn visit_i64<E: ::serde::de::Error>(
1752                    self,
1753                    v: i64,
1754                ) -> ::core::result::Result<Operation, E> {
1755                    let v32 = i32::try_from(v)
1756                        .map_err(|_| {
1757                            ::serde::de::Error::custom(
1758                                ::buffa::alloc::format!("enum value {v} out of i32 range"),
1759                            )
1760                        })?;
1761                    <Operation as ::buffa::Enumeration>::from_i32(v32)
1762                        .ok_or_else(|| {
1763                            ::serde::de::Error::custom(
1764                                ::buffa::alloc::format!("unknown enum value {v32}"),
1765                            )
1766                        })
1767                }
1768                fn visit_u64<E: ::serde::de::Error>(
1769                    self,
1770                    v: u64,
1771                ) -> ::core::result::Result<Operation, E> {
1772                    let v32 = i32::try_from(v)
1773                        .map_err(|_| {
1774                            ::serde::de::Error::custom(
1775                                ::buffa::alloc::format!("enum value {v} out of i32 range"),
1776                            )
1777                        })?;
1778                    <Operation as ::buffa::Enumeration>::from_i32(v32)
1779                        .ok_or_else(|| {
1780                            ::serde::de::Error::custom(
1781                                ::buffa::alloc::format!("unknown enum value {v32}"),
1782                            )
1783                        })
1784                }
1785                fn visit_unit<E: ::serde::de::Error>(
1786                    self,
1787                ) -> ::core::result::Result<Operation, E> {
1788                    ::core::result::Result::Ok(::core::default::Default::default())
1789                }
1790            }
1791            d.deserialize_any(_V)
1792        }
1793    }
1794    impl ::buffa::json_helpers::ProtoElemJson for Operation {
1795        fn serialize_proto_json<S: ::serde::Serializer>(
1796            v: &Self,
1797            s: S,
1798        ) -> ::core::result::Result<S::Ok, S::Error> {
1799            ::serde::Serialize::serialize(v, s)
1800        }
1801        fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1802            d: D,
1803        ) -> ::core::result::Result<Self, D::Error> {
1804            <Self as ::serde::Deserialize>::deserialize(d)
1805        }
1806    }
1807    impl ::buffa::Enumeration for Operation {
1808        fn from_i32(value: i32) -> ::core::option::Option<Self> {
1809            match value {
1810                0i32 => ::core::option::Option::Some(Self::UNSPECIFIED),
1811                1i32 => ::core::option::Option::Some(Self::READ),
1812                2i32 => ::core::option::Option::Some(Self::READ_WRITE),
1813                _ => ::core::option::Option::None,
1814            }
1815        }
1816        fn to_i32(&self) -> i32 {
1817            *self as i32
1818        }
1819        fn proto_name(&self) -> &'static str {
1820            match self {
1821                Self::UNSPECIFIED => "UNSPECIFIED",
1822                Self::READ => "READ",
1823                Self::READ_WRITE => "READ_WRITE",
1824            }
1825        }
1826        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1827            match name {
1828                "UNSPECIFIED" => ::core::option::Option::Some(Self::UNSPECIFIED),
1829                "READ" => ::core::option::Option::Some(Self::READ),
1830                "READ_WRITE" => ::core::option::Option::Some(Self::READ_WRITE),
1831                _ => ::core::option::Option::None,
1832            }
1833        }
1834        fn values() -> &'static [Self] {
1835            &[Self::UNSPECIFIED, Self::READ, Self::READ_WRITE]
1836        }
1837    }
1838}
1839/// Generate a new set of credentials for a volume.
1840#[derive(Clone, PartialEq, Default)]
1841#[derive(::serde::Serialize, ::serde::Deserialize)]
1842#[serde(default)]
1843pub struct GenerateTemporaryVolumeCredentialsRequest {
1844    /// UUID of the volume to read or write.
1845    ///
1846    /// Field 1: `volume_id`
1847    #[serde(
1848        rename = "volume_id",
1849        alias = "volumeId",
1850        with = "::buffa::json_helpers::proto_string",
1851        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1852    )]
1853    pub volume_id: ::buffa::alloc::string::String,
1854    /// The operation performed against the volume data, either READ_VOLUME or
1855    /// WRITE_VOLUME. If WRITE_VOLUME is specified, the credentials returned will
1856    /// have write permissions, otherwise, it will be read only.
1857    ///
1858    /// Field 2: `operation`
1859    #[serde(
1860        rename = "operation",
1861        with = "::buffa::json_helpers::proto_enum",
1862        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1863    )]
1864    pub operation: ::buffa::EnumValue<
1865        generate_temporary_volume_credentials_request::Operation,
1866    >,
1867    #[serde(skip)]
1868    #[doc(hidden)]
1869    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1870}
1871impl ::core::fmt::Debug for GenerateTemporaryVolumeCredentialsRequest {
1872    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1873        f.debug_struct("GenerateTemporaryVolumeCredentialsRequest")
1874            .field("volume_id", &self.volume_id)
1875            .field("operation", &self.operation)
1876            .finish()
1877    }
1878}
1879impl GenerateTemporaryVolumeCredentialsRequest {
1880    /// Protobuf type URL for this message, for use with `Any::pack` and
1881    /// `Any::unpack_if`.
1882    ///
1883    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1884    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryVolumeCredentialsRequest";
1885}
1886impl ::buffa::DefaultInstance for GenerateTemporaryVolumeCredentialsRequest {
1887    fn default_instance() -> &'static Self {
1888        static VALUE: ::buffa::__private::OnceBox<
1889            GenerateTemporaryVolumeCredentialsRequest,
1890        > = ::buffa::__private::OnceBox::new();
1891        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1892    }
1893}
1894impl ::buffa::MessageName for GenerateTemporaryVolumeCredentialsRequest {
1895    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
1896    const NAME: &'static str = "GenerateTemporaryVolumeCredentialsRequest";
1897    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryVolumeCredentialsRequest";
1898    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryVolumeCredentialsRequest";
1899}
1900impl ::buffa::Message for GenerateTemporaryVolumeCredentialsRequest {
1901    /// Returns the total encoded size in bytes.
1902    ///
1903    /// The result is a `u32`; the protobuf specification requires all
1904    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1905    /// compliant message will never overflow this type.
1906    #[allow(clippy::let_and_return)]
1907    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1908        #[allow(unused_imports)]
1909        use ::buffa::Enumeration as _;
1910        let mut size = 0u32;
1911        if !self.volume_id.is_empty() {
1912            size += 1u32 + ::buffa::types::string_encoded_len(&self.volume_id) as u32;
1913        }
1914        {
1915            let val = self.operation.to_i32();
1916            if val != 0 {
1917                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1918            }
1919        }
1920        size += self.__buffa_unknown_fields.encoded_len() as u32;
1921        size
1922    }
1923    fn write_to(
1924        &self,
1925        _cache: &mut ::buffa::SizeCache,
1926        buf: &mut impl ::buffa::bytes::BufMut,
1927    ) {
1928        #[allow(unused_imports)]
1929        use ::buffa::Enumeration as _;
1930        if !self.volume_id.is_empty() {
1931            ::buffa::encoding::Tag::new(
1932                    1u32,
1933                    ::buffa::encoding::WireType::LengthDelimited,
1934                )
1935                .encode(buf);
1936            ::buffa::types::encode_string(&self.volume_id, buf);
1937        }
1938        {
1939            let val = self.operation.to_i32();
1940            if val != 0 {
1941                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
1942                    .encode(buf);
1943                ::buffa::types::encode_int32(val, buf);
1944            }
1945        }
1946        self.__buffa_unknown_fields.write_to(buf);
1947    }
1948    fn merge_field(
1949        &mut self,
1950        tag: ::buffa::encoding::Tag,
1951        buf: &mut impl ::buffa::bytes::Buf,
1952        depth: u32,
1953    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1954        #[allow(unused_imports)]
1955        use ::buffa::bytes::Buf as _;
1956        #[allow(unused_imports)]
1957        use ::buffa::Enumeration as _;
1958        match tag.field_number() {
1959            1u32 => {
1960                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1961                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1962                        field_number: 1u32,
1963                        expected: 2u8,
1964                        actual: tag.wire_type() as u8,
1965                    });
1966                }
1967                ::buffa::types::merge_string(&mut self.volume_id, buf)?;
1968            }
1969            2u32 => {
1970                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
1971                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1972                        field_number: 2u32,
1973                        expected: 0u8,
1974                        actual: tag.wire_type() as u8,
1975                    });
1976                }
1977                self.operation = ::buffa::EnumValue::from(
1978                    ::buffa::types::decode_int32(buf)?,
1979                );
1980            }
1981            _ => {
1982                self.__buffa_unknown_fields
1983                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1984            }
1985        }
1986        ::core::result::Result::Ok(())
1987    }
1988    fn clear(&mut self) {
1989        self.volume_id.clear();
1990        self.operation = ::buffa::EnumValue::from(0);
1991        self.__buffa_unknown_fields.clear();
1992    }
1993}
1994impl ::buffa::ExtensionSet for GenerateTemporaryVolumeCredentialsRequest {
1995    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryVolumeCredentialsRequest";
1996    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1997        &self.__buffa_unknown_fields
1998    }
1999    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2000        &mut self.__buffa_unknown_fields
2001    }
2002}
2003impl ::buffa::json_helpers::ProtoElemJson for GenerateTemporaryVolumeCredentialsRequest {
2004    fn serialize_proto_json<S: ::serde::Serializer>(
2005        v: &Self,
2006        s: S,
2007    ) -> ::core::result::Result<S::Ok, S::Error> {
2008        ::serde::Serialize::serialize(v, s)
2009    }
2010    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2011        d: D,
2012    ) -> ::core::result::Result<Self, D::Error> {
2013        <Self as ::serde::Deserialize>::deserialize(d)
2014    }
2015}
2016#[doc(hidden)]
2017pub const __GENERATE_TEMPORARY_VOLUME_CREDENTIALS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2018    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryVolumeCredentialsRequest",
2019    to_json: ::buffa::type_registry::any_to_json::<
2020        GenerateTemporaryVolumeCredentialsRequest,
2021    >,
2022    from_json: ::buffa::type_registry::any_from_json::<
2023        GenerateTemporaryVolumeCredentialsRequest,
2024    >,
2025    is_wkt: false,
2026};
2027pub mod generate_temporary_volume_credentials_request {
2028    #[allow(unused_imports)]
2029    use super::*;
2030    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2031    #[repr(i32)]
2032    pub enum Operation {
2033        /// The operation is not specified.
2034        UNSPECIFIED = 0i32,
2035        /// The operation is read only.
2036        READ_VOLUME = 1i32,
2037        /// The operation is read and write.
2038        WRITE_VOLUME = 2i32,
2039    }
2040    impl Operation {
2041        ///Idiomatic alias for [`Self::UNSPECIFIED`]; `Debug` prints the variant name.
2042        #[allow(non_upper_case_globals)]
2043        pub const Unspecified: Self = Self::UNSPECIFIED;
2044        ///Idiomatic alias for [`Self::READ_VOLUME`]; `Debug` prints the variant name.
2045        #[allow(non_upper_case_globals)]
2046        pub const ReadVolume: Self = Self::READ_VOLUME;
2047        ///Idiomatic alias for [`Self::WRITE_VOLUME`]; `Debug` prints the variant name.
2048        #[allow(non_upper_case_globals)]
2049        pub const WriteVolume: Self = Self::WRITE_VOLUME;
2050    }
2051    impl ::core::default::Default for Operation {
2052        fn default() -> Self {
2053            Self::UNSPECIFIED
2054        }
2055    }
2056    impl ::serde::Serialize for Operation {
2057        fn serialize<S: ::serde::Serializer>(
2058            &self,
2059            s: S,
2060        ) -> ::core::result::Result<S::Ok, S::Error> {
2061            s.serialize_str(::buffa::Enumeration::proto_name(self))
2062        }
2063    }
2064    impl<'de> ::serde::Deserialize<'de> for Operation {
2065        fn deserialize<D: ::serde::Deserializer<'de>>(
2066            d: D,
2067        ) -> ::core::result::Result<Self, D::Error> {
2068            struct _V;
2069            impl ::serde::de::Visitor<'_> for _V {
2070                type Value = Operation;
2071                fn expecting(
2072                    &self,
2073                    f: &mut ::core::fmt::Formatter<'_>,
2074                ) -> ::core::fmt::Result {
2075                    f.write_str(
2076                        concat!("a string, integer, or null for ", stringify!(Operation)),
2077                    )
2078                }
2079                fn visit_str<E: ::serde::de::Error>(
2080                    self,
2081                    v: &str,
2082                ) -> ::core::result::Result<Operation, E> {
2083                    <Operation as ::buffa::Enumeration>::from_proto_name(v)
2084                        .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2085                }
2086                fn visit_i64<E: ::serde::de::Error>(
2087                    self,
2088                    v: i64,
2089                ) -> ::core::result::Result<Operation, E> {
2090                    let v32 = i32::try_from(v)
2091                        .map_err(|_| {
2092                            ::serde::de::Error::custom(
2093                                ::buffa::alloc::format!("enum value {v} out of i32 range"),
2094                            )
2095                        })?;
2096                    <Operation as ::buffa::Enumeration>::from_i32(v32)
2097                        .ok_or_else(|| {
2098                            ::serde::de::Error::custom(
2099                                ::buffa::alloc::format!("unknown enum value {v32}"),
2100                            )
2101                        })
2102                }
2103                fn visit_u64<E: ::serde::de::Error>(
2104                    self,
2105                    v: u64,
2106                ) -> ::core::result::Result<Operation, E> {
2107                    let v32 = i32::try_from(v)
2108                        .map_err(|_| {
2109                            ::serde::de::Error::custom(
2110                                ::buffa::alloc::format!("enum value {v} out of i32 range"),
2111                            )
2112                        })?;
2113                    <Operation as ::buffa::Enumeration>::from_i32(v32)
2114                        .ok_or_else(|| {
2115                            ::serde::de::Error::custom(
2116                                ::buffa::alloc::format!("unknown enum value {v32}"),
2117                            )
2118                        })
2119                }
2120                fn visit_unit<E: ::serde::de::Error>(
2121                    self,
2122                ) -> ::core::result::Result<Operation, E> {
2123                    ::core::result::Result::Ok(::core::default::Default::default())
2124                }
2125            }
2126            d.deserialize_any(_V)
2127        }
2128    }
2129    impl ::buffa::json_helpers::ProtoElemJson for Operation {
2130        fn serialize_proto_json<S: ::serde::Serializer>(
2131            v: &Self,
2132            s: S,
2133        ) -> ::core::result::Result<S::Ok, S::Error> {
2134            ::serde::Serialize::serialize(v, s)
2135        }
2136        fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2137            d: D,
2138        ) -> ::core::result::Result<Self, D::Error> {
2139            <Self as ::serde::Deserialize>::deserialize(d)
2140        }
2141    }
2142    impl ::buffa::Enumeration for Operation {
2143        fn from_i32(value: i32) -> ::core::option::Option<Self> {
2144            match value {
2145                0i32 => ::core::option::Option::Some(Self::UNSPECIFIED),
2146                1i32 => ::core::option::Option::Some(Self::READ_VOLUME),
2147                2i32 => ::core::option::Option::Some(Self::WRITE_VOLUME),
2148                _ => ::core::option::Option::None,
2149            }
2150        }
2151        fn to_i32(&self) -> i32 {
2152            *self as i32
2153        }
2154        fn proto_name(&self) -> &'static str {
2155            match self {
2156                Self::UNSPECIFIED => "UNSPECIFIED",
2157                Self::READ_VOLUME => "READ_VOLUME",
2158                Self::WRITE_VOLUME => "WRITE_VOLUME",
2159            }
2160        }
2161        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2162            match name {
2163                "UNSPECIFIED" => ::core::option::Option::Some(Self::UNSPECIFIED),
2164                "READ_VOLUME" => ::core::option::Option::Some(Self::READ_VOLUME),
2165                "WRITE_VOLUME" => ::core::option::Option::Some(Self::WRITE_VOLUME),
2166                _ => ::core::option::Option::None,
2167            }
2168        }
2169        fn values() -> &'static [Self] {
2170            &[Self::UNSPECIFIED, Self::READ_VOLUME, Self::WRITE_VOLUME]
2171        }
2172    }
2173}
2174/// Generate a new set of credentials for a path.
2175#[derive(Clone, PartialEq, Default)]
2176#[derive(::serde::Serialize, ::serde::Deserialize)]
2177#[serde(default)]
2178pub struct GenerateTemporaryPathCredentialsRequest {
2179    /// URL for path-based access.
2180    ///
2181    /// Field 1: `url`
2182    #[serde(
2183        rename = "url",
2184        with = "::buffa::json_helpers::proto_string",
2185        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2186    )]
2187    pub url: ::buffa::alloc::string::String,
2188    /// The operation being performed on the path.
2189    ///
2190    /// Field 2: `operation`
2191    #[serde(
2192        rename = "operation",
2193        with = "::buffa::json_helpers::proto_enum",
2194        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2195    )]
2196    pub operation: ::buffa::EnumValue<
2197        generate_temporary_path_credentials_request::Operation,
2198    >,
2199    /// When set to true, the service will not validate that the generated
2200    /// credentials can perform write operations, therefore no new paths will be
2201    /// created and the response will not contain valid credentials. Defaults to false.
2202    ///
2203    /// Field 3: `dry_run`
2204    #[serde(
2205        rename = "dry_run",
2206        alias = "dryRun",
2207        skip_serializing_if = "::core::option::Option::is_none"
2208    )]
2209    pub dry_run: ::core::option::Option<bool>,
2210    #[serde(skip)]
2211    #[doc(hidden)]
2212    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2213}
2214impl ::core::fmt::Debug for GenerateTemporaryPathCredentialsRequest {
2215    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2216        f.debug_struct("GenerateTemporaryPathCredentialsRequest")
2217            .field("url", &self.url)
2218            .field("operation", &self.operation)
2219            .field("dry_run", &self.dry_run)
2220            .finish()
2221    }
2222}
2223impl GenerateTemporaryPathCredentialsRequest {
2224    /// Protobuf type URL for this message, for use with `Any::pack` and
2225    /// `Any::unpack_if`.
2226    ///
2227    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2228    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryPathCredentialsRequest";
2229}
2230impl GenerateTemporaryPathCredentialsRequest {
2231    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2232    #[inline]
2233    ///Sets [`Self::dry_run`] to `Some(value)`, consuming and returning `self`.
2234    pub fn with_dry_run(mut self, value: bool) -> Self {
2235        self.dry_run = Some(value);
2236        self
2237    }
2238}
2239impl ::buffa::DefaultInstance for GenerateTemporaryPathCredentialsRequest {
2240    fn default_instance() -> &'static Self {
2241        static VALUE: ::buffa::__private::OnceBox<
2242            GenerateTemporaryPathCredentialsRequest,
2243        > = ::buffa::__private::OnceBox::new();
2244        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2245    }
2246}
2247impl ::buffa::MessageName for GenerateTemporaryPathCredentialsRequest {
2248    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
2249    const NAME: &'static str = "GenerateTemporaryPathCredentialsRequest";
2250    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryPathCredentialsRequest";
2251    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryPathCredentialsRequest";
2252}
2253impl ::buffa::Message for GenerateTemporaryPathCredentialsRequest {
2254    /// Returns the total encoded size in bytes.
2255    ///
2256    /// The result is a `u32`; the protobuf specification requires all
2257    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2258    /// compliant message will never overflow this type.
2259    #[allow(clippy::let_and_return)]
2260    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2261        #[allow(unused_imports)]
2262        use ::buffa::Enumeration as _;
2263        let mut size = 0u32;
2264        if !self.url.is_empty() {
2265            size += 1u32 + ::buffa::types::string_encoded_len(&self.url) as u32;
2266        }
2267        {
2268            let val = self.operation.to_i32();
2269            if val != 0 {
2270                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2271            }
2272        }
2273        if self.dry_run.is_some() {
2274            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2275        }
2276        size += self.__buffa_unknown_fields.encoded_len() as u32;
2277        size
2278    }
2279    fn write_to(
2280        &self,
2281        _cache: &mut ::buffa::SizeCache,
2282        buf: &mut impl ::buffa::bytes::BufMut,
2283    ) {
2284        #[allow(unused_imports)]
2285        use ::buffa::Enumeration as _;
2286        if !self.url.is_empty() {
2287            ::buffa::encoding::Tag::new(
2288                    1u32,
2289                    ::buffa::encoding::WireType::LengthDelimited,
2290                )
2291                .encode(buf);
2292            ::buffa::types::encode_string(&self.url, buf);
2293        }
2294        {
2295            let val = self.operation.to_i32();
2296            if val != 0 {
2297                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
2298                    .encode(buf);
2299                ::buffa::types::encode_int32(val, buf);
2300            }
2301        }
2302        if let Some(v) = self.dry_run {
2303            ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
2304                .encode(buf);
2305            ::buffa::types::encode_bool(v, buf);
2306        }
2307        self.__buffa_unknown_fields.write_to(buf);
2308    }
2309    fn merge_field(
2310        &mut self,
2311        tag: ::buffa::encoding::Tag,
2312        buf: &mut impl ::buffa::bytes::Buf,
2313        depth: u32,
2314    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2315        #[allow(unused_imports)]
2316        use ::buffa::bytes::Buf as _;
2317        #[allow(unused_imports)]
2318        use ::buffa::Enumeration as _;
2319        match tag.field_number() {
2320            1u32 => {
2321                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2322                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2323                        field_number: 1u32,
2324                        expected: 2u8,
2325                        actual: tag.wire_type() as u8,
2326                    });
2327                }
2328                ::buffa::types::merge_string(&mut self.url, buf)?;
2329            }
2330            2u32 => {
2331                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2332                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2333                        field_number: 2u32,
2334                        expected: 0u8,
2335                        actual: tag.wire_type() as u8,
2336                    });
2337                }
2338                self.operation = ::buffa::EnumValue::from(
2339                    ::buffa::types::decode_int32(buf)?,
2340                );
2341            }
2342            3u32 => {
2343                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2344                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2345                        field_number: 3u32,
2346                        expected: 0u8,
2347                        actual: tag.wire_type() as u8,
2348                    });
2349                }
2350                self.dry_run = ::core::option::Option::Some(
2351                    ::buffa::types::decode_bool(buf)?,
2352                );
2353            }
2354            _ => {
2355                self.__buffa_unknown_fields
2356                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2357            }
2358        }
2359        ::core::result::Result::Ok(())
2360    }
2361    fn clear(&mut self) {
2362        self.url.clear();
2363        self.operation = ::buffa::EnumValue::from(0);
2364        self.dry_run = ::core::option::Option::None;
2365        self.__buffa_unknown_fields.clear();
2366    }
2367}
2368impl ::buffa::ExtensionSet for GenerateTemporaryPathCredentialsRequest {
2369    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryPathCredentialsRequest";
2370    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2371        &self.__buffa_unknown_fields
2372    }
2373    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2374        &mut self.__buffa_unknown_fields
2375    }
2376}
2377impl ::buffa::json_helpers::ProtoElemJson for GenerateTemporaryPathCredentialsRequest {
2378    fn serialize_proto_json<S: ::serde::Serializer>(
2379        v: &Self,
2380        s: S,
2381    ) -> ::core::result::Result<S::Ok, S::Error> {
2382        ::serde::Serialize::serialize(v, s)
2383    }
2384    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2385        d: D,
2386    ) -> ::core::result::Result<Self, D::Error> {
2387        <Self as ::serde::Deserialize>::deserialize(d)
2388    }
2389}
2390#[doc(hidden)]
2391pub const __GENERATE_TEMPORARY_PATH_CREDENTIALS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2392    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryPathCredentialsRequest",
2393    to_json: ::buffa::type_registry::any_to_json::<
2394        GenerateTemporaryPathCredentialsRequest,
2395    >,
2396    from_json: ::buffa::type_registry::any_from_json::<
2397        GenerateTemporaryPathCredentialsRequest,
2398    >,
2399    is_wkt: false,
2400};
2401pub mod generate_temporary_path_credentials_request {
2402    #[allow(unused_imports)]
2403    use super::*;
2404    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2405    #[repr(i32)]
2406    pub enum Operation {
2407        /// The operation is not specified.
2408        UNSPECIFIED = 0i32,
2409        /// The operation is read only.
2410        PATH_READ = 1i32,
2411        /// The operation is read and write.
2412        PATH_READ_WRITE = 2i32,
2413        /// The operation creates a table at the path.
2414        PATH_CREATE_TABLE = 3i32,
2415    }
2416    impl Operation {
2417        ///Idiomatic alias for [`Self::UNSPECIFIED`]; `Debug` prints the variant name.
2418        #[allow(non_upper_case_globals)]
2419        pub const Unspecified: Self = Self::UNSPECIFIED;
2420        ///Idiomatic alias for [`Self::PATH_READ`]; `Debug` prints the variant name.
2421        #[allow(non_upper_case_globals)]
2422        pub const PathRead: Self = Self::PATH_READ;
2423        ///Idiomatic alias for [`Self::PATH_READ_WRITE`]; `Debug` prints the variant name.
2424        #[allow(non_upper_case_globals)]
2425        pub const PathReadWrite: Self = Self::PATH_READ_WRITE;
2426        ///Idiomatic alias for [`Self::PATH_CREATE_TABLE`]; `Debug` prints the variant name.
2427        #[allow(non_upper_case_globals)]
2428        pub const PathCreateTable: Self = Self::PATH_CREATE_TABLE;
2429    }
2430    impl ::core::default::Default for Operation {
2431        fn default() -> Self {
2432            Self::UNSPECIFIED
2433        }
2434    }
2435    impl ::serde::Serialize for Operation {
2436        fn serialize<S: ::serde::Serializer>(
2437            &self,
2438            s: S,
2439        ) -> ::core::result::Result<S::Ok, S::Error> {
2440            s.serialize_str(::buffa::Enumeration::proto_name(self))
2441        }
2442    }
2443    impl<'de> ::serde::Deserialize<'de> for Operation {
2444        fn deserialize<D: ::serde::Deserializer<'de>>(
2445            d: D,
2446        ) -> ::core::result::Result<Self, D::Error> {
2447            struct _V;
2448            impl ::serde::de::Visitor<'_> for _V {
2449                type Value = Operation;
2450                fn expecting(
2451                    &self,
2452                    f: &mut ::core::fmt::Formatter<'_>,
2453                ) -> ::core::fmt::Result {
2454                    f.write_str(
2455                        concat!("a string, integer, or null for ", stringify!(Operation)),
2456                    )
2457                }
2458                fn visit_str<E: ::serde::de::Error>(
2459                    self,
2460                    v: &str,
2461                ) -> ::core::result::Result<Operation, E> {
2462                    <Operation as ::buffa::Enumeration>::from_proto_name(v)
2463                        .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2464                }
2465                fn visit_i64<E: ::serde::de::Error>(
2466                    self,
2467                    v: i64,
2468                ) -> ::core::result::Result<Operation, E> {
2469                    let v32 = i32::try_from(v)
2470                        .map_err(|_| {
2471                            ::serde::de::Error::custom(
2472                                ::buffa::alloc::format!("enum value {v} out of i32 range"),
2473                            )
2474                        })?;
2475                    <Operation as ::buffa::Enumeration>::from_i32(v32)
2476                        .ok_or_else(|| {
2477                            ::serde::de::Error::custom(
2478                                ::buffa::alloc::format!("unknown enum value {v32}"),
2479                            )
2480                        })
2481                }
2482                fn visit_u64<E: ::serde::de::Error>(
2483                    self,
2484                    v: u64,
2485                ) -> ::core::result::Result<Operation, E> {
2486                    let v32 = i32::try_from(v)
2487                        .map_err(|_| {
2488                            ::serde::de::Error::custom(
2489                                ::buffa::alloc::format!("enum value {v} out of i32 range"),
2490                            )
2491                        })?;
2492                    <Operation as ::buffa::Enumeration>::from_i32(v32)
2493                        .ok_or_else(|| {
2494                            ::serde::de::Error::custom(
2495                                ::buffa::alloc::format!("unknown enum value {v32}"),
2496                            )
2497                        })
2498                }
2499                fn visit_unit<E: ::serde::de::Error>(
2500                    self,
2501                ) -> ::core::result::Result<Operation, E> {
2502                    ::core::result::Result::Ok(::core::default::Default::default())
2503                }
2504            }
2505            d.deserialize_any(_V)
2506        }
2507    }
2508    impl ::buffa::json_helpers::ProtoElemJson for Operation {
2509        fn serialize_proto_json<S: ::serde::Serializer>(
2510            v: &Self,
2511            s: S,
2512        ) -> ::core::result::Result<S::Ok, S::Error> {
2513            ::serde::Serialize::serialize(v, s)
2514        }
2515        fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2516            d: D,
2517        ) -> ::core::result::Result<Self, D::Error> {
2518            <Self as ::serde::Deserialize>::deserialize(d)
2519        }
2520    }
2521    impl ::buffa::Enumeration for Operation {
2522        fn from_i32(value: i32) -> ::core::option::Option<Self> {
2523            match value {
2524                0i32 => ::core::option::Option::Some(Self::UNSPECIFIED),
2525                1i32 => ::core::option::Option::Some(Self::PATH_READ),
2526                2i32 => ::core::option::Option::Some(Self::PATH_READ_WRITE),
2527                3i32 => ::core::option::Option::Some(Self::PATH_CREATE_TABLE),
2528                _ => ::core::option::Option::None,
2529            }
2530        }
2531        fn to_i32(&self) -> i32 {
2532            *self as i32
2533        }
2534        fn proto_name(&self) -> &'static str {
2535            match self {
2536                Self::UNSPECIFIED => "UNSPECIFIED",
2537                Self::PATH_READ => "PATH_READ",
2538                Self::PATH_READ_WRITE => "PATH_READ_WRITE",
2539                Self::PATH_CREATE_TABLE => "PATH_CREATE_TABLE",
2540            }
2541        }
2542        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2543            match name {
2544                "UNSPECIFIED" => ::core::option::Option::Some(Self::UNSPECIFIED),
2545                "PATH_READ" => ::core::option::Option::Some(Self::PATH_READ),
2546                "PATH_READ_WRITE" => ::core::option::Option::Some(Self::PATH_READ_WRITE),
2547                "PATH_CREATE_TABLE" => {
2548                    ::core::option::Option::Some(Self::PATH_CREATE_TABLE)
2549                }
2550                _ => ::core::option::Option::None,
2551            }
2552        }
2553        fn values() -> &'static [Self] {
2554            &[
2555                Self::UNSPECIFIED,
2556                Self::PATH_READ,
2557                Self::PATH_READ_WRITE,
2558                Self::PATH_CREATE_TABLE,
2559            ]
2560        }
2561    }
2562}
2563/// Generate a new set of credentials for a model version.
2564#[derive(Clone, PartialEq, Default)]
2565#[derive(::serde::Serialize, ::serde::Deserialize)]
2566#[serde(default)]
2567pub struct GenerateTemporaryModelVersionCredentialsRequest {
2568    /// Name of parent catalog of the model version.
2569    ///
2570    /// Field 1: `catalog_name`
2571    #[serde(
2572        rename = "catalog_name",
2573        alias = "catalogName",
2574        with = "::buffa::json_helpers::proto_string",
2575        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2576    )]
2577    pub catalog_name: ::buffa::alloc::string::String,
2578    /// Name of parent schema of the model version.
2579    ///
2580    /// Field 2: `schema_name`
2581    #[serde(
2582        rename = "schema_name",
2583        alias = "schemaName",
2584        with = "::buffa::json_helpers::proto_string",
2585        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2586    )]
2587    pub schema_name: ::buffa::alloc::string::String,
2588    /// Name of the parent registered model.
2589    ///
2590    /// Field 3: `model_name`
2591    #[serde(
2592        rename = "model_name",
2593        alias = "modelName",
2594        with = "::buffa::json_helpers::proto_string",
2595        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2596    )]
2597    pub model_name: ::buffa::alloc::string::String,
2598    /// The integer version number of the model version.
2599    ///
2600    /// Field 4: `version`
2601    #[serde(
2602        rename = "version",
2603        with = "::buffa::json_helpers::int64",
2604        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_i64"
2605    )]
2606    pub version: i64,
2607    /// The operation performed against the model version data, either
2608    /// READ_MODEL_VERSION or READ_WRITE_MODEL_VERSION. If READ_WRITE_MODEL_VERSION
2609    /// is specified, the credentials returned will have write permissions,
2610    /// otherwise, it will be read only.
2611    ///
2612    /// Field 5: `operation`
2613    #[serde(
2614        rename = "operation",
2615        with = "::buffa::json_helpers::proto_enum",
2616        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2617    )]
2618    pub operation: ::buffa::EnumValue<
2619        generate_temporary_model_version_credentials_request::Operation,
2620    >,
2621    #[serde(skip)]
2622    #[doc(hidden)]
2623    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2624}
2625impl ::core::fmt::Debug for GenerateTemporaryModelVersionCredentialsRequest {
2626    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2627        f.debug_struct("GenerateTemporaryModelVersionCredentialsRequest")
2628            .field("catalog_name", &self.catalog_name)
2629            .field("schema_name", &self.schema_name)
2630            .field("model_name", &self.model_name)
2631            .field("version", &self.version)
2632            .field("operation", &self.operation)
2633            .finish()
2634    }
2635}
2636impl GenerateTemporaryModelVersionCredentialsRequest {
2637    /// Protobuf type URL for this message, for use with `Any::pack` and
2638    /// `Any::unpack_if`.
2639    ///
2640    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2641    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryModelVersionCredentialsRequest";
2642}
2643impl ::buffa::DefaultInstance for GenerateTemporaryModelVersionCredentialsRequest {
2644    fn default_instance() -> &'static Self {
2645        static VALUE: ::buffa::__private::OnceBox<
2646            GenerateTemporaryModelVersionCredentialsRequest,
2647        > = ::buffa::__private::OnceBox::new();
2648        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2649    }
2650}
2651impl ::buffa::MessageName for GenerateTemporaryModelVersionCredentialsRequest {
2652    const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
2653    const NAME: &'static str = "GenerateTemporaryModelVersionCredentialsRequest";
2654    const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryModelVersionCredentialsRequest";
2655    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryModelVersionCredentialsRequest";
2656}
2657impl ::buffa::Message for GenerateTemporaryModelVersionCredentialsRequest {
2658    /// Returns the total encoded size in bytes.
2659    ///
2660    /// The result is a `u32`; the protobuf specification requires all
2661    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2662    /// compliant message will never overflow this type.
2663    #[allow(clippy::let_and_return)]
2664    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2665        #[allow(unused_imports)]
2666        use ::buffa::Enumeration as _;
2667        let mut size = 0u32;
2668        if !self.catalog_name.is_empty() {
2669            size += 1u32 + ::buffa::types::string_encoded_len(&self.catalog_name) as u32;
2670        }
2671        if !self.schema_name.is_empty() {
2672            size += 1u32 + ::buffa::types::string_encoded_len(&self.schema_name) as u32;
2673        }
2674        if !self.model_name.is_empty() {
2675            size += 1u32 + ::buffa::types::string_encoded_len(&self.model_name) as u32;
2676        }
2677        if self.version != 0i64 {
2678            size += 1u32 + ::buffa::types::int64_encoded_len(self.version) as u32;
2679        }
2680        {
2681            let val = self.operation.to_i32();
2682            if val != 0 {
2683                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2684            }
2685        }
2686        size += self.__buffa_unknown_fields.encoded_len() as u32;
2687        size
2688    }
2689    fn write_to(
2690        &self,
2691        _cache: &mut ::buffa::SizeCache,
2692        buf: &mut impl ::buffa::bytes::BufMut,
2693    ) {
2694        #[allow(unused_imports)]
2695        use ::buffa::Enumeration as _;
2696        if !self.catalog_name.is_empty() {
2697            ::buffa::encoding::Tag::new(
2698                    1u32,
2699                    ::buffa::encoding::WireType::LengthDelimited,
2700                )
2701                .encode(buf);
2702            ::buffa::types::encode_string(&self.catalog_name, buf);
2703        }
2704        if !self.schema_name.is_empty() {
2705            ::buffa::encoding::Tag::new(
2706                    2u32,
2707                    ::buffa::encoding::WireType::LengthDelimited,
2708                )
2709                .encode(buf);
2710            ::buffa::types::encode_string(&self.schema_name, buf);
2711        }
2712        if !self.model_name.is_empty() {
2713            ::buffa::encoding::Tag::new(
2714                    3u32,
2715                    ::buffa::encoding::WireType::LengthDelimited,
2716                )
2717                .encode(buf);
2718            ::buffa::types::encode_string(&self.model_name, buf);
2719        }
2720        if self.version != 0i64 {
2721            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
2722                .encode(buf);
2723            ::buffa::types::encode_int64(self.version, buf);
2724        }
2725        {
2726            let val = self.operation.to_i32();
2727            if val != 0 {
2728                ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
2729                    .encode(buf);
2730                ::buffa::types::encode_int32(val, buf);
2731            }
2732        }
2733        self.__buffa_unknown_fields.write_to(buf);
2734    }
2735    fn merge_field(
2736        &mut self,
2737        tag: ::buffa::encoding::Tag,
2738        buf: &mut impl ::buffa::bytes::Buf,
2739        depth: u32,
2740    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2741        #[allow(unused_imports)]
2742        use ::buffa::bytes::Buf as _;
2743        #[allow(unused_imports)]
2744        use ::buffa::Enumeration as _;
2745        match tag.field_number() {
2746            1u32 => {
2747                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2748                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2749                        field_number: 1u32,
2750                        expected: 2u8,
2751                        actual: tag.wire_type() as u8,
2752                    });
2753                }
2754                ::buffa::types::merge_string(&mut self.catalog_name, buf)?;
2755            }
2756            2u32 => {
2757                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2758                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2759                        field_number: 2u32,
2760                        expected: 2u8,
2761                        actual: tag.wire_type() as u8,
2762                    });
2763                }
2764                ::buffa::types::merge_string(&mut self.schema_name, buf)?;
2765            }
2766            3u32 => {
2767                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2768                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2769                        field_number: 3u32,
2770                        expected: 2u8,
2771                        actual: tag.wire_type() as u8,
2772                    });
2773                }
2774                ::buffa::types::merge_string(&mut self.model_name, buf)?;
2775            }
2776            4u32 => {
2777                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2778                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2779                        field_number: 4u32,
2780                        expected: 0u8,
2781                        actual: tag.wire_type() as u8,
2782                    });
2783                }
2784                self.version = ::buffa::types::decode_int64(buf)?;
2785            }
2786            5u32 => {
2787                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2788                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2789                        field_number: 5u32,
2790                        expected: 0u8,
2791                        actual: tag.wire_type() as u8,
2792                    });
2793                }
2794                self.operation = ::buffa::EnumValue::from(
2795                    ::buffa::types::decode_int32(buf)?,
2796                );
2797            }
2798            _ => {
2799                self.__buffa_unknown_fields
2800                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2801            }
2802        }
2803        ::core::result::Result::Ok(())
2804    }
2805    fn clear(&mut self) {
2806        self.catalog_name.clear();
2807        self.schema_name.clear();
2808        self.model_name.clear();
2809        self.version = 0i64;
2810        self.operation = ::buffa::EnumValue::from(0);
2811        self.__buffa_unknown_fields.clear();
2812    }
2813}
2814impl ::buffa::ExtensionSet for GenerateTemporaryModelVersionCredentialsRequest {
2815    const PROTO_FQN: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryModelVersionCredentialsRequest";
2816    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2817        &self.__buffa_unknown_fields
2818    }
2819    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2820        &mut self.__buffa_unknown_fields
2821    }
2822}
2823impl ::buffa::json_helpers::ProtoElemJson
2824for GenerateTemporaryModelVersionCredentialsRequest {
2825    fn serialize_proto_json<S: ::serde::Serializer>(
2826        v: &Self,
2827        s: S,
2828    ) -> ::core::result::Result<S::Ok, S::Error> {
2829        ::serde::Serialize::serialize(v, s)
2830    }
2831    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2832        d: D,
2833    ) -> ::core::result::Result<Self, D::Error> {
2834        <Self as ::serde::Deserialize>::deserialize(d)
2835    }
2836}
2837#[doc(hidden)]
2838pub const __GENERATE_TEMPORARY_MODEL_VERSION_CREDENTIALS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2839    type_url: "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryModelVersionCredentialsRequest",
2840    to_json: ::buffa::type_registry::any_to_json::<
2841        GenerateTemporaryModelVersionCredentialsRequest,
2842    >,
2843    from_json: ::buffa::type_registry::any_from_json::<
2844        GenerateTemporaryModelVersionCredentialsRequest,
2845    >,
2846    is_wkt: false,
2847};
2848pub mod generate_temporary_model_version_credentials_request {
2849    #[allow(unused_imports)]
2850    use super::*;
2851    #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2852    #[repr(i32)]
2853    pub enum Operation {
2854        /// The operation is not specified.
2855        UNSPECIFIED = 0i32,
2856        /// The operation is read only.
2857        READ_MODEL_VERSION = 1i32,
2858        /// The operation is read and write.
2859        READ_WRITE_MODEL_VERSION = 2i32,
2860    }
2861    impl Operation {
2862        ///Idiomatic alias for [`Self::UNSPECIFIED`]; `Debug` prints the variant name.
2863        #[allow(non_upper_case_globals)]
2864        pub const Unspecified: Self = Self::UNSPECIFIED;
2865        ///Idiomatic alias for [`Self::READ_MODEL_VERSION`]; `Debug` prints the variant name.
2866        #[allow(non_upper_case_globals)]
2867        pub const ReadModelVersion: Self = Self::READ_MODEL_VERSION;
2868        ///Idiomatic alias for [`Self::READ_WRITE_MODEL_VERSION`]; `Debug` prints the variant name.
2869        #[allow(non_upper_case_globals)]
2870        pub const ReadWriteModelVersion: Self = Self::READ_WRITE_MODEL_VERSION;
2871    }
2872    impl ::core::default::Default for Operation {
2873        fn default() -> Self {
2874            Self::UNSPECIFIED
2875        }
2876    }
2877    impl ::serde::Serialize for Operation {
2878        fn serialize<S: ::serde::Serializer>(
2879            &self,
2880            s: S,
2881        ) -> ::core::result::Result<S::Ok, S::Error> {
2882            s.serialize_str(::buffa::Enumeration::proto_name(self))
2883        }
2884    }
2885    impl<'de> ::serde::Deserialize<'de> for Operation {
2886        fn deserialize<D: ::serde::Deserializer<'de>>(
2887            d: D,
2888        ) -> ::core::result::Result<Self, D::Error> {
2889            struct _V;
2890            impl ::serde::de::Visitor<'_> for _V {
2891                type Value = Operation;
2892                fn expecting(
2893                    &self,
2894                    f: &mut ::core::fmt::Formatter<'_>,
2895                ) -> ::core::fmt::Result {
2896                    f.write_str(
2897                        concat!("a string, integer, or null for ", stringify!(Operation)),
2898                    )
2899                }
2900                fn visit_str<E: ::serde::de::Error>(
2901                    self,
2902                    v: &str,
2903                ) -> ::core::result::Result<Operation, E> {
2904                    <Operation as ::buffa::Enumeration>::from_proto_name(v)
2905                        .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2906                }
2907                fn visit_i64<E: ::serde::de::Error>(
2908                    self,
2909                    v: i64,
2910                ) -> ::core::result::Result<Operation, E> {
2911                    let v32 = i32::try_from(v)
2912                        .map_err(|_| {
2913                            ::serde::de::Error::custom(
2914                                ::buffa::alloc::format!("enum value {v} out of i32 range"),
2915                            )
2916                        })?;
2917                    <Operation as ::buffa::Enumeration>::from_i32(v32)
2918                        .ok_or_else(|| {
2919                            ::serde::de::Error::custom(
2920                                ::buffa::alloc::format!("unknown enum value {v32}"),
2921                            )
2922                        })
2923                }
2924                fn visit_u64<E: ::serde::de::Error>(
2925                    self,
2926                    v: u64,
2927                ) -> ::core::result::Result<Operation, E> {
2928                    let v32 = i32::try_from(v)
2929                        .map_err(|_| {
2930                            ::serde::de::Error::custom(
2931                                ::buffa::alloc::format!("enum value {v} out of i32 range"),
2932                            )
2933                        })?;
2934                    <Operation as ::buffa::Enumeration>::from_i32(v32)
2935                        .ok_or_else(|| {
2936                            ::serde::de::Error::custom(
2937                                ::buffa::alloc::format!("unknown enum value {v32}"),
2938                            )
2939                        })
2940                }
2941                fn visit_unit<E: ::serde::de::Error>(
2942                    self,
2943                ) -> ::core::result::Result<Operation, E> {
2944                    ::core::result::Result::Ok(::core::default::Default::default())
2945                }
2946            }
2947            d.deserialize_any(_V)
2948        }
2949    }
2950    impl ::buffa::json_helpers::ProtoElemJson for Operation {
2951        fn serialize_proto_json<S: ::serde::Serializer>(
2952            v: &Self,
2953            s: S,
2954        ) -> ::core::result::Result<S::Ok, S::Error> {
2955            ::serde::Serialize::serialize(v, s)
2956        }
2957        fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2958            d: D,
2959        ) -> ::core::result::Result<Self, D::Error> {
2960            <Self as ::serde::Deserialize>::deserialize(d)
2961        }
2962    }
2963    impl ::buffa::Enumeration for Operation {
2964        fn from_i32(value: i32) -> ::core::option::Option<Self> {
2965            match value {
2966                0i32 => ::core::option::Option::Some(Self::UNSPECIFIED),
2967                1i32 => ::core::option::Option::Some(Self::READ_MODEL_VERSION),
2968                2i32 => ::core::option::Option::Some(Self::READ_WRITE_MODEL_VERSION),
2969                _ => ::core::option::Option::None,
2970            }
2971        }
2972        fn to_i32(&self) -> i32 {
2973            *self as i32
2974        }
2975        fn proto_name(&self) -> &'static str {
2976            match self {
2977                Self::UNSPECIFIED => "UNSPECIFIED",
2978                Self::READ_MODEL_VERSION => "READ_MODEL_VERSION",
2979                Self::READ_WRITE_MODEL_VERSION => "READ_WRITE_MODEL_VERSION",
2980            }
2981        }
2982        fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2983            match name {
2984                "UNSPECIFIED" => ::core::option::Option::Some(Self::UNSPECIFIED),
2985                "READ_MODEL_VERSION" => {
2986                    ::core::option::Option::Some(Self::READ_MODEL_VERSION)
2987                }
2988                "READ_WRITE_MODEL_VERSION" => {
2989                    ::core::option::Option::Some(Self::READ_WRITE_MODEL_VERSION)
2990                }
2991                _ => ::core::option::Option::None,
2992            }
2993        }
2994        fn values() -> &'static [Self] {
2995            &[
2996                Self::UNSPECIFIED,
2997                Self::READ_MODEL_VERSION,
2998                Self::READ_WRITE_MODEL_VERSION,
2999            ]
3000        }
3001    }
3002}
3003#[allow(
3004    non_camel_case_types,
3005    dead_code,
3006    unused_imports,
3007    unused_qualifications,
3008    clippy::derivable_impls,
3009    clippy::match_single_binding,
3010    clippy::uninlined_format_args,
3011    clippy::doc_lazy_continuation,
3012    clippy::module_inception
3013)]
3014pub mod __buffa {
3015    #[allow(unused_imports)]
3016    use super::*;
3017    pub mod view {
3018        #[allow(unused_imports)]
3019        use super::*;
3020        #[derive(Clone, Debug, Default)]
3021        pub struct AzureUserDelegationSasView<'a> {
3022            /// The signed URI (SAS Token) used to access blob services for a given path
3023            ///
3024            /// Field 1: `sas_token`
3025            pub sas_token: &'a str,
3026            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3027        }
3028        impl<'a> AzureUserDelegationSasView<'a> {
3029            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
3030            ///
3031            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
3032            /// and by generated sub-message decode arms with `depth - 1`.
3033            ///
3034            /// **Not part of the public API.** Named with a leading underscore to
3035            /// signal that it is for generated-code use only.
3036            #[doc(hidden)]
3037            pub fn _decode_depth(
3038                buf: &'a [u8],
3039                depth: u32,
3040            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3041                let mut view = Self::default();
3042                view._merge_into_view(buf, depth)?;
3043                ::core::result::Result::Ok(view)
3044            }
3045            /// Merge fields from `buf` into this view (proto merge semantics).
3046            ///
3047            /// Repeated fields append; singular fields last-wins; singular
3048            /// MESSAGE fields merge recursively. Used by sub-message decode
3049            /// arms when the same field appears multiple times on the wire.
3050            ///
3051            /// **Not part of the public API.**
3052            #[doc(hidden)]
3053            pub fn _merge_into_view(
3054                &mut self,
3055                buf: &'a [u8],
3056                depth: u32,
3057            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3058                let _ = depth;
3059                #[allow(unused_variables)]
3060                let view = self;
3061                let mut cur: &'a [u8] = buf;
3062                while !cur.is_empty() {
3063                    let before_tag = cur;
3064                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3065                    match tag.field_number() {
3066                        1u32 => {
3067                            if tag.wire_type()
3068                                != ::buffa::encoding::WireType::LengthDelimited
3069                            {
3070                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3071                                    field_number: 1u32,
3072                                    expected: 2u8,
3073                                    actual: tag.wire_type() as u8,
3074                                });
3075                            }
3076                            view.sas_token = ::buffa::types::borrow_str(&mut cur)?;
3077                        }
3078                        _ => {
3079                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3080                            let span_len = before_tag.len() - cur.len();
3081                            view.__buffa_unknown_fields
3082                                .push_raw(&before_tag[..span_len]);
3083                        }
3084                    }
3085                }
3086                ::core::result::Result::Ok(())
3087            }
3088        }
3089        impl<'a> ::buffa::MessageView<'a> for AzureUserDelegationSasView<'a> {
3090            type Owned = super::super::AzureUserDelegationSas;
3091            fn decode_view(
3092                buf: &'a [u8],
3093            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3094                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3095            }
3096            fn decode_view_with_limit(
3097                buf: &'a [u8],
3098                depth: u32,
3099            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3100                Self::_decode_depth(buf, depth)
3101            }
3102            fn to_owned_message(&self) -> super::super::AzureUserDelegationSas {
3103                self.to_owned_from_source(None)
3104            }
3105            #[allow(clippy::useless_conversion, clippy::needless_update)]
3106            fn to_owned_from_source(
3107                &self,
3108                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3109            ) -> super::super::AzureUserDelegationSas {
3110                #[allow(unused_imports)]
3111                use ::buffa::alloc::string::ToString as _;
3112                let _ = __buffa_src;
3113                super::super::AzureUserDelegationSas {
3114                    sas_token: self.sas_token.to_string(),
3115                    __buffa_unknown_fields: self
3116                        .__buffa_unknown_fields
3117                        .to_owned()
3118                        .unwrap_or_default()
3119                        .into(),
3120                    ..::core::default::Default::default()
3121                }
3122            }
3123        }
3124        impl<'a> ::buffa::ViewEncode<'a> for AzureUserDelegationSasView<'a> {
3125            #[allow(clippy::needless_borrow, clippy::let_and_return)]
3126            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3127                #[allow(unused_imports)]
3128                use ::buffa::Enumeration as _;
3129                let mut size = 0u32;
3130                if !self.sas_token.is_empty() {
3131                    size
3132                        += 1u32
3133                            + ::buffa::types::string_encoded_len(&self.sas_token) as u32;
3134                }
3135                size += self.__buffa_unknown_fields.encoded_len() as u32;
3136                size
3137            }
3138            #[allow(clippy::needless_borrow)]
3139            fn write_to(
3140                &self,
3141                _cache: &mut ::buffa::SizeCache,
3142                buf: &mut impl ::buffa::bytes::BufMut,
3143            ) {
3144                #[allow(unused_imports)]
3145                use ::buffa::Enumeration as _;
3146                if !self.sas_token.is_empty() {
3147                    ::buffa::encoding::Tag::new(
3148                            1u32,
3149                            ::buffa::encoding::WireType::LengthDelimited,
3150                        )
3151                        .encode(buf);
3152                    ::buffa::types::encode_string(&self.sas_token, buf);
3153                }
3154                self.__buffa_unknown_fields.write_to(buf);
3155            }
3156        }
3157        /// Serializes this view as protobuf JSON.
3158        ///
3159        /// Implicit-presence fields with default values are omitted, `required`
3160        /// fields are always emitted, explicit-presence (`optional`) fields are
3161        /// emitted only when set, bytes fields are base64-encoded, and enum
3162        /// values are their proto name strings.
3163        ///
3164        /// This impl uses `serialize_map(None)` because the number of emitted
3165        /// fields depends on default-omission rules; serializers that require
3166        /// known map lengths (e.g. `bincode`) will return a runtime error.
3167        /// Use the owned message type for those formats.
3168        impl<'__a> ::serde::Serialize for AzureUserDelegationSasView<'__a> {
3169            fn serialize<__S: ::serde::Serializer>(
3170                &self,
3171                __s: __S,
3172            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3173                use ::serde::ser::SerializeMap as _;
3174                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3175                if !::buffa::json_helpers::skip_if::is_empty_str(self.sas_token) {
3176                    __map.serialize_entry("sas_token", self.sas_token)?;
3177                }
3178                __map.end()
3179            }
3180        }
3181        impl<'a> ::buffa::MessageName for AzureUserDelegationSasView<'a> {
3182            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
3183            const NAME: &'static str = "AzureUserDelegationSas";
3184            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.AzureUserDelegationSas";
3185            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AzureUserDelegationSas";
3186        }
3187        impl<'v> ::buffa::DefaultViewInstance for AzureUserDelegationSasView<'v> {
3188            fn default_view_instance<'a>() -> &'a Self
3189            where
3190                Self: 'a,
3191            {
3192                static VALUE: ::buffa::__private::OnceBox<
3193                    AzureUserDelegationSasView<'static>,
3194                > = ::buffa::__private::OnceBox::new();
3195                VALUE
3196                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3197                        <AzureUserDelegationSasView<'static>>::default(),
3198                    ))
3199            }
3200        }
3201        impl ::buffa::ViewReborrow for AzureUserDelegationSasView<'static> {
3202            type Reborrowed<'b> = AzureUserDelegationSasView<'b>;
3203            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3204                this
3205            }
3206        }
3207        /** Self-contained, `'static` owned view of a `AzureUserDelegationSas` message.
3208
3209 Wraps [`::buffa::OwnedView`]`<`[`AzureUserDelegationSasView`]`<'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.
3210
3211 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AzureUserDelegationSasView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3212        #[derive(Clone, Debug)]
3213        pub struct AzureUserDelegationSasOwnedView(
3214            ::buffa::OwnedView<AzureUserDelegationSasView<'static>>,
3215        );
3216        impl AzureUserDelegationSasOwnedView {
3217            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3218            ///
3219            /// The view borrows directly from the buffer's data; the buffer is
3220            /// retained inside the returned handle.
3221            ///
3222            /// # Errors
3223            ///
3224            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3225            /// protobuf data.
3226            pub fn decode(
3227                bytes: ::buffa::bytes::Bytes,
3228            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3229                ::core::result::Result::Ok(
3230                    AzureUserDelegationSasOwnedView(::buffa::OwnedView::decode(bytes)?),
3231                )
3232            }
3233            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3234            /// max message size).
3235            ///
3236            /// # Errors
3237            ///
3238            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3239            /// exceeds the configured limits.
3240            pub fn decode_with_options(
3241                bytes: ::buffa::bytes::Bytes,
3242                opts: &::buffa::DecodeOptions,
3243            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3244                ::core::result::Result::Ok(
3245                    AzureUserDelegationSasOwnedView(
3246                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3247                    ),
3248                )
3249            }
3250            /// Build from an owned message via an encode → decode round-trip.
3251            ///
3252            /// # Errors
3253            ///
3254            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3255            /// somehow invalid (should not happen for well-formed messages).
3256            pub fn from_owned(
3257                msg: &super::super::AzureUserDelegationSas,
3258            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3259                ::core::result::Result::Ok(
3260                    AzureUserDelegationSasOwnedView(::buffa::OwnedView::from_owned(msg)?),
3261                )
3262            }
3263            /// Borrow the full [`AzureUserDelegationSasView`] with its lifetime tied to `&self`.
3264            #[must_use]
3265            pub fn view(&self) -> &AzureUserDelegationSasView<'_> {
3266                self.0.reborrow()
3267            }
3268            /// Convert to the owned message type.
3269            #[must_use]
3270            pub fn to_owned_message(&self) -> super::super::AzureUserDelegationSas {
3271                self.0.to_owned_message()
3272            }
3273            /// The underlying bytes buffer.
3274            #[must_use]
3275            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3276                self.0.bytes()
3277            }
3278            /// Consume the handle, returning the underlying bytes buffer.
3279            #[must_use]
3280            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3281                self.0.into_bytes()
3282            }
3283            /// The signed URI (SAS Token) used to access blob services for a given path
3284            ///
3285            /// Field 1: `sas_token`
3286            #[must_use]
3287            pub fn sas_token(&self) -> &'_ str {
3288                self.0.reborrow().sas_token
3289            }
3290        }
3291        impl ::core::convert::From<
3292            ::buffa::OwnedView<AzureUserDelegationSasView<'static>>,
3293        > for AzureUserDelegationSasOwnedView {
3294            fn from(
3295                inner: ::buffa::OwnedView<AzureUserDelegationSasView<'static>>,
3296            ) -> Self {
3297                AzureUserDelegationSasOwnedView(inner)
3298            }
3299        }
3300        impl ::core::convert::From<AzureUserDelegationSasOwnedView>
3301        for ::buffa::OwnedView<AzureUserDelegationSasView<'static>> {
3302            fn from(wrapper: AzureUserDelegationSasOwnedView) -> Self {
3303                wrapper.0
3304            }
3305        }
3306        impl ::core::convert::AsRef<
3307            ::buffa::OwnedView<AzureUserDelegationSasView<'static>>,
3308        > for AzureUserDelegationSasOwnedView {
3309            fn as_ref(
3310                &self,
3311            ) -> &::buffa::OwnedView<AzureUserDelegationSasView<'static>> {
3312                &self.0
3313            }
3314        }
3315        impl ::buffa::HasMessageView for super::super::AzureUserDelegationSas {
3316            type View<'a> = AzureUserDelegationSasView<'a>;
3317            type ViewHandle = AzureUserDelegationSasOwnedView;
3318        }
3319        impl ::serde::Serialize for AzureUserDelegationSasOwnedView {
3320            fn serialize<__S: ::serde::Serializer>(
3321                &self,
3322                __s: __S,
3323            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3324                ::serde::Serialize::serialize(&self.0, __s)
3325            }
3326        }
3327        #[derive(Clone, Debug, Default)]
3328        pub struct AzureAadView<'a> {
3329            /// Opaque token that contains claims that you can use in Azure Active Directory to access cloud services.
3330            ///
3331            /// Field 1: `aad_token`
3332            pub aad_token: &'a str,
3333            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3334        }
3335        impl<'a> AzureAadView<'a> {
3336            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
3337            ///
3338            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
3339            /// and by generated sub-message decode arms with `depth - 1`.
3340            ///
3341            /// **Not part of the public API.** Named with a leading underscore to
3342            /// signal that it is for generated-code use only.
3343            #[doc(hidden)]
3344            pub fn _decode_depth(
3345                buf: &'a [u8],
3346                depth: u32,
3347            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3348                let mut view = Self::default();
3349                view._merge_into_view(buf, depth)?;
3350                ::core::result::Result::Ok(view)
3351            }
3352            /// Merge fields from `buf` into this view (proto merge semantics).
3353            ///
3354            /// Repeated fields append; singular fields last-wins; singular
3355            /// MESSAGE fields merge recursively. Used by sub-message decode
3356            /// arms when the same field appears multiple times on the wire.
3357            ///
3358            /// **Not part of the public API.**
3359            #[doc(hidden)]
3360            pub fn _merge_into_view(
3361                &mut self,
3362                buf: &'a [u8],
3363                depth: u32,
3364            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3365                let _ = depth;
3366                #[allow(unused_variables)]
3367                let view = self;
3368                let mut cur: &'a [u8] = buf;
3369                while !cur.is_empty() {
3370                    let before_tag = cur;
3371                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3372                    match tag.field_number() {
3373                        1u32 => {
3374                            if tag.wire_type()
3375                                != ::buffa::encoding::WireType::LengthDelimited
3376                            {
3377                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3378                                    field_number: 1u32,
3379                                    expected: 2u8,
3380                                    actual: tag.wire_type() as u8,
3381                                });
3382                            }
3383                            view.aad_token = ::buffa::types::borrow_str(&mut cur)?;
3384                        }
3385                        _ => {
3386                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3387                            let span_len = before_tag.len() - cur.len();
3388                            view.__buffa_unknown_fields
3389                                .push_raw(&before_tag[..span_len]);
3390                        }
3391                    }
3392                }
3393                ::core::result::Result::Ok(())
3394            }
3395        }
3396        impl<'a> ::buffa::MessageView<'a> for AzureAadView<'a> {
3397            type Owned = super::super::AzureAad;
3398            fn decode_view(
3399                buf: &'a [u8],
3400            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3401                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3402            }
3403            fn decode_view_with_limit(
3404                buf: &'a [u8],
3405                depth: u32,
3406            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3407                Self::_decode_depth(buf, depth)
3408            }
3409            fn to_owned_message(&self) -> super::super::AzureAad {
3410                self.to_owned_from_source(None)
3411            }
3412            #[allow(clippy::useless_conversion, clippy::needless_update)]
3413            fn to_owned_from_source(
3414                &self,
3415                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3416            ) -> super::super::AzureAad {
3417                #[allow(unused_imports)]
3418                use ::buffa::alloc::string::ToString as _;
3419                let _ = __buffa_src;
3420                super::super::AzureAad {
3421                    aad_token: self.aad_token.to_string(),
3422                    __buffa_unknown_fields: self
3423                        .__buffa_unknown_fields
3424                        .to_owned()
3425                        .unwrap_or_default()
3426                        .into(),
3427                    ..::core::default::Default::default()
3428                }
3429            }
3430        }
3431        impl<'a> ::buffa::ViewEncode<'a> for AzureAadView<'a> {
3432            #[allow(clippy::needless_borrow, clippy::let_and_return)]
3433            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3434                #[allow(unused_imports)]
3435                use ::buffa::Enumeration as _;
3436                let mut size = 0u32;
3437                if !self.aad_token.is_empty() {
3438                    size
3439                        += 1u32
3440                            + ::buffa::types::string_encoded_len(&self.aad_token) as u32;
3441                }
3442                size += self.__buffa_unknown_fields.encoded_len() as u32;
3443                size
3444            }
3445            #[allow(clippy::needless_borrow)]
3446            fn write_to(
3447                &self,
3448                _cache: &mut ::buffa::SizeCache,
3449                buf: &mut impl ::buffa::bytes::BufMut,
3450            ) {
3451                #[allow(unused_imports)]
3452                use ::buffa::Enumeration as _;
3453                if !self.aad_token.is_empty() {
3454                    ::buffa::encoding::Tag::new(
3455                            1u32,
3456                            ::buffa::encoding::WireType::LengthDelimited,
3457                        )
3458                        .encode(buf);
3459                    ::buffa::types::encode_string(&self.aad_token, buf);
3460                }
3461                self.__buffa_unknown_fields.write_to(buf);
3462            }
3463        }
3464        /// Serializes this view as protobuf JSON.
3465        ///
3466        /// Implicit-presence fields with default values are omitted, `required`
3467        /// fields are always emitted, explicit-presence (`optional`) fields are
3468        /// emitted only when set, bytes fields are base64-encoded, and enum
3469        /// values are their proto name strings.
3470        ///
3471        /// This impl uses `serialize_map(None)` because the number of emitted
3472        /// fields depends on default-omission rules; serializers that require
3473        /// known map lengths (e.g. `bincode`) will return a runtime error.
3474        /// Use the owned message type for those formats.
3475        impl<'__a> ::serde::Serialize for AzureAadView<'__a> {
3476            fn serialize<__S: ::serde::Serializer>(
3477                &self,
3478                __s: __S,
3479            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3480                use ::serde::ser::SerializeMap as _;
3481                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3482                if !::buffa::json_helpers::skip_if::is_empty_str(self.aad_token) {
3483                    __map.serialize_entry("aad_token", self.aad_token)?;
3484                }
3485                __map.end()
3486            }
3487        }
3488        impl<'a> ::buffa::MessageName for AzureAadView<'a> {
3489            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
3490            const NAME: &'static str = "AzureAad";
3491            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.AzureAad";
3492            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AzureAad";
3493        }
3494        impl<'v> ::buffa::DefaultViewInstance for AzureAadView<'v> {
3495            fn default_view_instance<'a>() -> &'a Self
3496            where
3497                Self: 'a,
3498            {
3499                static VALUE: ::buffa::__private::OnceBox<AzureAadView<'static>> = ::buffa::__private::OnceBox::new();
3500                VALUE
3501                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3502                        <AzureAadView<'static>>::default(),
3503                    ))
3504            }
3505        }
3506        impl ::buffa::ViewReborrow for AzureAadView<'static> {
3507            type Reborrowed<'b> = AzureAadView<'b>;
3508            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3509                this
3510            }
3511        }
3512        /** Self-contained, `'static` owned view of a `AzureAad` message.
3513
3514 Wraps [`::buffa::OwnedView`]`<`[`AzureAadView`]`<'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.
3515
3516 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AzureAadView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3517        #[derive(Clone, Debug)]
3518        pub struct AzureAadOwnedView(::buffa::OwnedView<AzureAadView<'static>>);
3519        impl AzureAadOwnedView {
3520            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3521            ///
3522            /// The view borrows directly from the buffer's data; the buffer is
3523            /// retained inside the returned handle.
3524            ///
3525            /// # Errors
3526            ///
3527            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3528            /// protobuf data.
3529            pub fn decode(
3530                bytes: ::buffa::bytes::Bytes,
3531            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3532                ::core::result::Result::Ok(
3533                    AzureAadOwnedView(::buffa::OwnedView::decode(bytes)?),
3534                )
3535            }
3536            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3537            /// max message size).
3538            ///
3539            /// # Errors
3540            ///
3541            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3542            /// exceeds the configured limits.
3543            pub fn decode_with_options(
3544                bytes: ::buffa::bytes::Bytes,
3545                opts: &::buffa::DecodeOptions,
3546            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3547                ::core::result::Result::Ok(
3548                    AzureAadOwnedView(
3549                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3550                    ),
3551                )
3552            }
3553            /// Build from an owned message via an encode → decode round-trip.
3554            ///
3555            /// # Errors
3556            ///
3557            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3558            /// somehow invalid (should not happen for well-formed messages).
3559            pub fn from_owned(
3560                msg: &super::super::AzureAad,
3561            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3562                ::core::result::Result::Ok(
3563                    AzureAadOwnedView(::buffa::OwnedView::from_owned(msg)?),
3564                )
3565            }
3566            /// Borrow the full [`AzureAadView`] with its lifetime tied to `&self`.
3567            #[must_use]
3568            pub fn view(&self) -> &AzureAadView<'_> {
3569                self.0.reborrow()
3570            }
3571            /// Convert to the owned message type.
3572            #[must_use]
3573            pub fn to_owned_message(&self) -> super::super::AzureAad {
3574                self.0.to_owned_message()
3575            }
3576            /// The underlying bytes buffer.
3577            #[must_use]
3578            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3579                self.0.bytes()
3580            }
3581            /// Consume the handle, returning the underlying bytes buffer.
3582            #[must_use]
3583            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3584                self.0.into_bytes()
3585            }
3586            /// Opaque token that contains claims that you can use in Azure Active Directory to access cloud services.
3587            ///
3588            /// Field 1: `aad_token`
3589            #[must_use]
3590            pub fn aad_token(&self) -> &'_ str {
3591                self.0.reborrow().aad_token
3592            }
3593        }
3594        impl ::core::convert::From<::buffa::OwnedView<AzureAadView<'static>>>
3595        for AzureAadOwnedView {
3596            fn from(inner: ::buffa::OwnedView<AzureAadView<'static>>) -> Self {
3597                AzureAadOwnedView(inner)
3598            }
3599        }
3600        impl ::core::convert::From<AzureAadOwnedView>
3601        for ::buffa::OwnedView<AzureAadView<'static>> {
3602            fn from(wrapper: AzureAadOwnedView) -> Self {
3603                wrapper.0
3604            }
3605        }
3606        impl ::core::convert::AsRef<::buffa::OwnedView<AzureAadView<'static>>>
3607        for AzureAadOwnedView {
3608            fn as_ref(&self) -> &::buffa::OwnedView<AzureAadView<'static>> {
3609                &self.0
3610            }
3611        }
3612        impl ::buffa::HasMessageView for super::super::AzureAad {
3613            type View<'a> = AzureAadView<'a>;
3614            type ViewHandle = AzureAadOwnedView;
3615        }
3616        impl ::serde::Serialize for AzureAadOwnedView {
3617            fn serialize<__S: ::serde::Serializer>(
3618                &self,
3619                __s: __S,
3620            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3621                ::serde::Serialize::serialize(&self.0, __s)
3622            }
3623        }
3624        #[derive(Clone, Debug, Default)]
3625        pub struct R2TemporaryCredentialsView<'a> {
3626            /// The access key ID that identifies the temporary credentials.
3627            ///
3628            /// Field 1: `access_key_id`
3629            pub access_key_id: &'a str,
3630            /// The secret access key associated with the access key.
3631            ///
3632            /// Field 2: `secret_access_key`
3633            pub secret_access_key: &'a str,
3634            /// The generated JWT that users must pass to use the temporary credentials.
3635            ///
3636            /// Field 3: `session_token`
3637            pub session_token: &'a str,
3638            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3639        }
3640        impl<'a> R2TemporaryCredentialsView<'a> {
3641            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
3642            ///
3643            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
3644            /// and by generated sub-message decode arms with `depth - 1`.
3645            ///
3646            /// **Not part of the public API.** Named with a leading underscore to
3647            /// signal that it is for generated-code use only.
3648            #[doc(hidden)]
3649            pub fn _decode_depth(
3650                buf: &'a [u8],
3651                depth: u32,
3652            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3653                let mut view = Self::default();
3654                view._merge_into_view(buf, depth)?;
3655                ::core::result::Result::Ok(view)
3656            }
3657            /// Merge fields from `buf` into this view (proto merge semantics).
3658            ///
3659            /// Repeated fields append; singular fields last-wins; singular
3660            /// MESSAGE fields merge recursively. Used by sub-message decode
3661            /// arms when the same field appears multiple times on the wire.
3662            ///
3663            /// **Not part of the public API.**
3664            #[doc(hidden)]
3665            pub fn _merge_into_view(
3666                &mut self,
3667                buf: &'a [u8],
3668                depth: u32,
3669            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3670                let _ = depth;
3671                #[allow(unused_variables)]
3672                let view = self;
3673                let mut cur: &'a [u8] = buf;
3674                while !cur.is_empty() {
3675                    let before_tag = cur;
3676                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
3677                    match tag.field_number() {
3678                        1u32 => {
3679                            if tag.wire_type()
3680                                != ::buffa::encoding::WireType::LengthDelimited
3681                            {
3682                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3683                                    field_number: 1u32,
3684                                    expected: 2u8,
3685                                    actual: tag.wire_type() as u8,
3686                                });
3687                            }
3688                            view.access_key_id = ::buffa::types::borrow_str(&mut cur)?;
3689                        }
3690                        2u32 => {
3691                            if tag.wire_type()
3692                                != ::buffa::encoding::WireType::LengthDelimited
3693                            {
3694                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3695                                    field_number: 2u32,
3696                                    expected: 2u8,
3697                                    actual: tag.wire_type() as u8,
3698                                });
3699                            }
3700                            view.secret_access_key = ::buffa::types::borrow_str(
3701                                &mut cur,
3702                            )?;
3703                        }
3704                        3u32 => {
3705                            if tag.wire_type()
3706                                != ::buffa::encoding::WireType::LengthDelimited
3707                            {
3708                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3709                                    field_number: 3u32,
3710                                    expected: 2u8,
3711                                    actual: tag.wire_type() as u8,
3712                                });
3713                            }
3714                            view.session_token = ::buffa::types::borrow_str(&mut cur)?;
3715                        }
3716                        _ => {
3717                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
3718                            let span_len = before_tag.len() - cur.len();
3719                            view.__buffa_unknown_fields
3720                                .push_raw(&before_tag[..span_len]);
3721                        }
3722                    }
3723                }
3724                ::core::result::Result::Ok(())
3725            }
3726        }
3727        impl<'a> ::buffa::MessageView<'a> for R2TemporaryCredentialsView<'a> {
3728            type Owned = super::super::R2TemporaryCredentials;
3729            fn decode_view(
3730                buf: &'a [u8],
3731            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3732                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
3733            }
3734            fn decode_view_with_limit(
3735                buf: &'a [u8],
3736                depth: u32,
3737            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3738                Self::_decode_depth(buf, depth)
3739            }
3740            fn to_owned_message(&self) -> super::super::R2TemporaryCredentials {
3741                self.to_owned_from_source(None)
3742            }
3743            #[allow(clippy::useless_conversion, clippy::needless_update)]
3744            fn to_owned_from_source(
3745                &self,
3746                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3747            ) -> super::super::R2TemporaryCredentials {
3748                #[allow(unused_imports)]
3749                use ::buffa::alloc::string::ToString as _;
3750                let _ = __buffa_src;
3751                super::super::R2TemporaryCredentials {
3752                    access_key_id: self.access_key_id.to_string(),
3753                    secret_access_key: self.secret_access_key.to_string(),
3754                    session_token: self.session_token.to_string(),
3755                    __buffa_unknown_fields: self
3756                        .__buffa_unknown_fields
3757                        .to_owned()
3758                        .unwrap_or_default()
3759                        .into(),
3760                    ..::core::default::Default::default()
3761                }
3762            }
3763        }
3764        impl<'a> ::buffa::ViewEncode<'a> for R2TemporaryCredentialsView<'a> {
3765            #[allow(clippy::needless_borrow, clippy::let_and_return)]
3766            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3767                #[allow(unused_imports)]
3768                use ::buffa::Enumeration as _;
3769                let mut size = 0u32;
3770                if !self.access_key_id.is_empty() {
3771                    size
3772                        += 1u32
3773                            + ::buffa::types::string_encoded_len(&self.access_key_id)
3774                                as u32;
3775                }
3776                if !self.secret_access_key.is_empty() {
3777                    size
3778                        += 1u32
3779                            + ::buffa::types::string_encoded_len(&self.secret_access_key)
3780                                as u32;
3781                }
3782                if !self.session_token.is_empty() {
3783                    size
3784                        += 1u32
3785                            + ::buffa::types::string_encoded_len(&self.session_token)
3786                                as u32;
3787                }
3788                size += self.__buffa_unknown_fields.encoded_len() as u32;
3789                size
3790            }
3791            #[allow(clippy::needless_borrow)]
3792            fn write_to(
3793                &self,
3794                _cache: &mut ::buffa::SizeCache,
3795                buf: &mut impl ::buffa::bytes::BufMut,
3796            ) {
3797                #[allow(unused_imports)]
3798                use ::buffa::Enumeration as _;
3799                if !self.access_key_id.is_empty() {
3800                    ::buffa::encoding::Tag::new(
3801                            1u32,
3802                            ::buffa::encoding::WireType::LengthDelimited,
3803                        )
3804                        .encode(buf);
3805                    ::buffa::types::encode_string(&self.access_key_id, buf);
3806                }
3807                if !self.secret_access_key.is_empty() {
3808                    ::buffa::encoding::Tag::new(
3809                            2u32,
3810                            ::buffa::encoding::WireType::LengthDelimited,
3811                        )
3812                        .encode(buf);
3813                    ::buffa::types::encode_string(&self.secret_access_key, buf);
3814                }
3815                if !self.session_token.is_empty() {
3816                    ::buffa::encoding::Tag::new(
3817                            3u32,
3818                            ::buffa::encoding::WireType::LengthDelimited,
3819                        )
3820                        .encode(buf);
3821                    ::buffa::types::encode_string(&self.session_token, buf);
3822                }
3823                self.__buffa_unknown_fields.write_to(buf);
3824            }
3825        }
3826        /// Serializes this view as protobuf JSON.
3827        ///
3828        /// Implicit-presence fields with default values are omitted, `required`
3829        /// fields are always emitted, explicit-presence (`optional`) fields are
3830        /// emitted only when set, bytes fields are base64-encoded, and enum
3831        /// values are their proto name strings.
3832        ///
3833        /// This impl uses `serialize_map(None)` because the number of emitted
3834        /// fields depends on default-omission rules; serializers that require
3835        /// known map lengths (e.g. `bincode`) will return a runtime error.
3836        /// Use the owned message type for those formats.
3837        impl<'__a> ::serde::Serialize for R2TemporaryCredentialsView<'__a> {
3838            fn serialize<__S: ::serde::Serializer>(
3839                &self,
3840                __s: __S,
3841            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3842                use ::serde::ser::SerializeMap as _;
3843                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3844                if !::buffa::json_helpers::skip_if::is_empty_str(self.access_key_id) {
3845                    __map.serialize_entry("access_key_id", self.access_key_id)?;
3846                }
3847                if !::buffa::json_helpers::skip_if::is_empty_str(
3848                    self.secret_access_key,
3849                ) {
3850                    __map.serialize_entry("secret_access_key", self.secret_access_key)?;
3851                }
3852                if !::buffa::json_helpers::skip_if::is_empty_str(self.session_token) {
3853                    __map.serialize_entry("session_token", self.session_token)?;
3854                }
3855                __map.end()
3856            }
3857        }
3858        impl<'a> ::buffa::MessageName for R2TemporaryCredentialsView<'a> {
3859            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
3860            const NAME: &'static str = "R2TemporaryCredentials";
3861            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.R2TemporaryCredentials";
3862            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.R2TemporaryCredentials";
3863        }
3864        impl<'v> ::buffa::DefaultViewInstance for R2TemporaryCredentialsView<'v> {
3865            fn default_view_instance<'a>() -> &'a Self
3866            where
3867                Self: 'a,
3868            {
3869                static VALUE: ::buffa::__private::OnceBox<
3870                    R2TemporaryCredentialsView<'static>,
3871                > = ::buffa::__private::OnceBox::new();
3872                VALUE
3873                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
3874                        <R2TemporaryCredentialsView<'static>>::default(),
3875                    ))
3876            }
3877        }
3878        impl ::buffa::ViewReborrow for R2TemporaryCredentialsView<'static> {
3879            type Reborrowed<'b> = R2TemporaryCredentialsView<'b>;
3880            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
3881                this
3882            }
3883        }
3884        /** Self-contained, `'static` owned view of a `R2TemporaryCredentials` message.
3885
3886 Wraps [`::buffa::OwnedView`]`<`[`R2TemporaryCredentialsView`]`<'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.
3887
3888 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`R2TemporaryCredentialsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3889        #[derive(Clone, Debug)]
3890        pub struct R2TemporaryCredentialsOwnedView(
3891            ::buffa::OwnedView<R2TemporaryCredentialsView<'static>>,
3892        );
3893        impl R2TemporaryCredentialsOwnedView {
3894            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3895            ///
3896            /// The view borrows directly from the buffer's data; the buffer is
3897            /// retained inside the returned handle.
3898            ///
3899            /// # Errors
3900            ///
3901            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3902            /// protobuf data.
3903            pub fn decode(
3904                bytes: ::buffa::bytes::Bytes,
3905            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3906                ::core::result::Result::Ok(
3907                    R2TemporaryCredentialsOwnedView(::buffa::OwnedView::decode(bytes)?),
3908                )
3909            }
3910            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3911            /// max message size).
3912            ///
3913            /// # Errors
3914            ///
3915            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3916            /// exceeds the configured limits.
3917            pub fn decode_with_options(
3918                bytes: ::buffa::bytes::Bytes,
3919                opts: &::buffa::DecodeOptions,
3920            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3921                ::core::result::Result::Ok(
3922                    R2TemporaryCredentialsOwnedView(
3923                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3924                    ),
3925                )
3926            }
3927            /// Build from an owned message via an encode → decode round-trip.
3928            ///
3929            /// # Errors
3930            ///
3931            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3932            /// somehow invalid (should not happen for well-formed messages).
3933            pub fn from_owned(
3934                msg: &super::super::R2TemporaryCredentials,
3935            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3936                ::core::result::Result::Ok(
3937                    R2TemporaryCredentialsOwnedView(::buffa::OwnedView::from_owned(msg)?),
3938                )
3939            }
3940            /// Borrow the full [`R2TemporaryCredentialsView`] with its lifetime tied to `&self`.
3941            #[must_use]
3942            pub fn view(&self) -> &R2TemporaryCredentialsView<'_> {
3943                self.0.reborrow()
3944            }
3945            /// Convert to the owned message type.
3946            #[must_use]
3947            pub fn to_owned_message(&self) -> super::super::R2TemporaryCredentials {
3948                self.0.to_owned_message()
3949            }
3950            /// The underlying bytes buffer.
3951            #[must_use]
3952            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3953                self.0.bytes()
3954            }
3955            /// Consume the handle, returning the underlying bytes buffer.
3956            #[must_use]
3957            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3958                self.0.into_bytes()
3959            }
3960            /// The access key ID that identifies the temporary credentials.
3961            ///
3962            /// Field 1: `access_key_id`
3963            #[must_use]
3964            pub fn access_key_id(&self) -> &'_ str {
3965                self.0.reborrow().access_key_id
3966            }
3967            /// The secret access key associated with the access key.
3968            ///
3969            /// Field 2: `secret_access_key`
3970            #[must_use]
3971            pub fn secret_access_key(&self) -> &'_ str {
3972                self.0.reborrow().secret_access_key
3973            }
3974            /// The generated JWT that users must pass to use the temporary credentials.
3975            ///
3976            /// Field 3: `session_token`
3977            #[must_use]
3978            pub fn session_token(&self) -> &'_ str {
3979                self.0.reborrow().session_token
3980            }
3981        }
3982        impl ::core::convert::From<
3983            ::buffa::OwnedView<R2TemporaryCredentialsView<'static>>,
3984        > for R2TemporaryCredentialsOwnedView {
3985            fn from(
3986                inner: ::buffa::OwnedView<R2TemporaryCredentialsView<'static>>,
3987            ) -> Self {
3988                R2TemporaryCredentialsOwnedView(inner)
3989            }
3990        }
3991        impl ::core::convert::From<R2TemporaryCredentialsOwnedView>
3992        for ::buffa::OwnedView<R2TemporaryCredentialsView<'static>> {
3993            fn from(wrapper: R2TemporaryCredentialsOwnedView) -> Self {
3994                wrapper.0
3995            }
3996        }
3997        impl ::core::convert::AsRef<
3998            ::buffa::OwnedView<R2TemporaryCredentialsView<'static>>,
3999        > for R2TemporaryCredentialsOwnedView {
4000            fn as_ref(
4001                &self,
4002            ) -> &::buffa::OwnedView<R2TemporaryCredentialsView<'static>> {
4003                &self.0
4004            }
4005        }
4006        impl ::buffa::HasMessageView for super::super::R2TemporaryCredentials {
4007            type View<'a> = R2TemporaryCredentialsView<'a>;
4008            type ViewHandle = R2TemporaryCredentialsOwnedView;
4009        }
4010        impl ::serde::Serialize for R2TemporaryCredentialsOwnedView {
4011            fn serialize<__S: ::serde::Serializer>(
4012                &self,
4013                __s: __S,
4014            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4015                ::serde::Serialize::serialize(&self.0, __s)
4016            }
4017        }
4018        #[derive(Clone, Debug, Default)]
4019        pub struct GcpOauthTokenView<'a> {
4020            /// The OAuth token used to access Google Cloud services.
4021            ///
4022            /// Field 1: `oauth_token`
4023            pub oauth_token: &'a str,
4024            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4025        }
4026        impl<'a> GcpOauthTokenView<'a> {
4027            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4028            ///
4029            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4030            /// and by generated sub-message decode arms with `depth - 1`.
4031            ///
4032            /// **Not part of the public API.** Named with a leading underscore to
4033            /// signal that it is for generated-code use only.
4034            #[doc(hidden)]
4035            pub fn _decode_depth(
4036                buf: &'a [u8],
4037                depth: u32,
4038            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4039                let mut view = Self::default();
4040                view._merge_into_view(buf, depth)?;
4041                ::core::result::Result::Ok(view)
4042            }
4043            /// Merge fields from `buf` into this view (proto merge semantics).
4044            ///
4045            /// Repeated fields append; singular fields last-wins; singular
4046            /// MESSAGE fields merge recursively. Used by sub-message decode
4047            /// arms when the same field appears multiple times on the wire.
4048            ///
4049            /// **Not part of the public API.**
4050            #[doc(hidden)]
4051            pub fn _merge_into_view(
4052                &mut self,
4053                buf: &'a [u8],
4054                depth: u32,
4055            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4056                let _ = depth;
4057                #[allow(unused_variables)]
4058                let view = self;
4059                let mut cur: &'a [u8] = buf;
4060                while !cur.is_empty() {
4061                    let before_tag = cur;
4062                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4063                    match tag.field_number() {
4064                        1u32 => {
4065                            if tag.wire_type()
4066                                != ::buffa::encoding::WireType::LengthDelimited
4067                            {
4068                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4069                                    field_number: 1u32,
4070                                    expected: 2u8,
4071                                    actual: tag.wire_type() as u8,
4072                                });
4073                            }
4074                            view.oauth_token = ::buffa::types::borrow_str(&mut cur)?;
4075                        }
4076                        _ => {
4077                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4078                            let span_len = before_tag.len() - cur.len();
4079                            view.__buffa_unknown_fields
4080                                .push_raw(&before_tag[..span_len]);
4081                        }
4082                    }
4083                }
4084                ::core::result::Result::Ok(())
4085            }
4086        }
4087        impl<'a> ::buffa::MessageView<'a> for GcpOauthTokenView<'a> {
4088            type Owned = super::super::GcpOauthToken;
4089            fn decode_view(
4090                buf: &'a [u8],
4091            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4092                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4093            }
4094            fn decode_view_with_limit(
4095                buf: &'a [u8],
4096                depth: u32,
4097            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4098                Self::_decode_depth(buf, depth)
4099            }
4100            fn to_owned_message(&self) -> super::super::GcpOauthToken {
4101                self.to_owned_from_source(None)
4102            }
4103            #[allow(clippy::useless_conversion, clippy::needless_update)]
4104            fn to_owned_from_source(
4105                &self,
4106                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4107            ) -> super::super::GcpOauthToken {
4108                #[allow(unused_imports)]
4109                use ::buffa::alloc::string::ToString as _;
4110                let _ = __buffa_src;
4111                super::super::GcpOauthToken {
4112                    oauth_token: self.oauth_token.to_string(),
4113                    __buffa_unknown_fields: self
4114                        .__buffa_unknown_fields
4115                        .to_owned()
4116                        .unwrap_or_default()
4117                        .into(),
4118                    ..::core::default::Default::default()
4119                }
4120            }
4121        }
4122        impl<'a> ::buffa::ViewEncode<'a> for GcpOauthTokenView<'a> {
4123            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4124            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4125                #[allow(unused_imports)]
4126                use ::buffa::Enumeration as _;
4127                let mut size = 0u32;
4128                if !self.oauth_token.is_empty() {
4129                    size
4130                        += 1u32
4131                            + ::buffa::types::string_encoded_len(&self.oauth_token)
4132                                as u32;
4133                }
4134                size += self.__buffa_unknown_fields.encoded_len() as u32;
4135                size
4136            }
4137            #[allow(clippy::needless_borrow)]
4138            fn write_to(
4139                &self,
4140                _cache: &mut ::buffa::SizeCache,
4141                buf: &mut impl ::buffa::bytes::BufMut,
4142            ) {
4143                #[allow(unused_imports)]
4144                use ::buffa::Enumeration as _;
4145                if !self.oauth_token.is_empty() {
4146                    ::buffa::encoding::Tag::new(
4147                            1u32,
4148                            ::buffa::encoding::WireType::LengthDelimited,
4149                        )
4150                        .encode(buf);
4151                    ::buffa::types::encode_string(&self.oauth_token, buf);
4152                }
4153                self.__buffa_unknown_fields.write_to(buf);
4154            }
4155        }
4156        /// Serializes this view as protobuf JSON.
4157        ///
4158        /// Implicit-presence fields with default values are omitted, `required`
4159        /// fields are always emitted, explicit-presence (`optional`) fields are
4160        /// emitted only when set, bytes fields are base64-encoded, and enum
4161        /// values are their proto name strings.
4162        ///
4163        /// This impl uses `serialize_map(None)` because the number of emitted
4164        /// fields depends on default-omission rules; serializers that require
4165        /// known map lengths (e.g. `bincode`) will return a runtime error.
4166        /// Use the owned message type for those formats.
4167        impl<'__a> ::serde::Serialize for GcpOauthTokenView<'__a> {
4168            fn serialize<__S: ::serde::Serializer>(
4169                &self,
4170                __s: __S,
4171            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4172                use ::serde::ser::SerializeMap as _;
4173                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4174                if !::buffa::json_helpers::skip_if::is_empty_str(self.oauth_token) {
4175                    __map.serialize_entry("oauth_token", self.oauth_token)?;
4176                }
4177                __map.end()
4178            }
4179        }
4180        impl<'a> ::buffa::MessageName for GcpOauthTokenView<'a> {
4181            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
4182            const NAME: &'static str = "GcpOauthToken";
4183            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GcpOauthToken";
4184            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GcpOauthToken";
4185        }
4186        impl<'v> ::buffa::DefaultViewInstance for GcpOauthTokenView<'v> {
4187            fn default_view_instance<'a>() -> &'a Self
4188            where
4189                Self: 'a,
4190            {
4191                static VALUE: ::buffa::__private::OnceBox<GcpOauthTokenView<'static>> = ::buffa::__private::OnceBox::new();
4192                VALUE
4193                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4194                        <GcpOauthTokenView<'static>>::default(),
4195                    ))
4196            }
4197        }
4198        impl ::buffa::ViewReborrow for GcpOauthTokenView<'static> {
4199            type Reborrowed<'b> = GcpOauthTokenView<'b>;
4200            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4201                this
4202            }
4203        }
4204        /** Self-contained, `'static` owned view of a `GcpOauthToken` message.
4205
4206 Wraps [`::buffa::OwnedView`]`<`[`GcpOauthTokenView`]`<'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.
4207
4208 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GcpOauthTokenView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4209        #[derive(Clone, Debug)]
4210        pub struct GcpOauthTokenOwnedView(
4211            ::buffa::OwnedView<GcpOauthTokenView<'static>>,
4212        );
4213        impl GcpOauthTokenOwnedView {
4214            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4215            ///
4216            /// The view borrows directly from the buffer's data; the buffer is
4217            /// retained inside the returned handle.
4218            ///
4219            /// # Errors
4220            ///
4221            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4222            /// protobuf data.
4223            pub fn decode(
4224                bytes: ::buffa::bytes::Bytes,
4225            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4226                ::core::result::Result::Ok(
4227                    GcpOauthTokenOwnedView(::buffa::OwnedView::decode(bytes)?),
4228                )
4229            }
4230            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4231            /// max message size).
4232            ///
4233            /// # Errors
4234            ///
4235            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4236            /// exceeds the configured limits.
4237            pub fn decode_with_options(
4238                bytes: ::buffa::bytes::Bytes,
4239                opts: &::buffa::DecodeOptions,
4240            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4241                ::core::result::Result::Ok(
4242                    GcpOauthTokenOwnedView(
4243                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4244                    ),
4245                )
4246            }
4247            /// Build from an owned message via an encode → decode round-trip.
4248            ///
4249            /// # Errors
4250            ///
4251            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4252            /// somehow invalid (should not happen for well-formed messages).
4253            pub fn from_owned(
4254                msg: &super::super::GcpOauthToken,
4255            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4256                ::core::result::Result::Ok(
4257                    GcpOauthTokenOwnedView(::buffa::OwnedView::from_owned(msg)?),
4258                )
4259            }
4260            /// Borrow the full [`GcpOauthTokenView`] with its lifetime tied to `&self`.
4261            #[must_use]
4262            pub fn view(&self) -> &GcpOauthTokenView<'_> {
4263                self.0.reborrow()
4264            }
4265            /// Convert to the owned message type.
4266            #[must_use]
4267            pub fn to_owned_message(&self) -> super::super::GcpOauthToken {
4268                self.0.to_owned_message()
4269            }
4270            /// The underlying bytes buffer.
4271            #[must_use]
4272            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4273                self.0.bytes()
4274            }
4275            /// Consume the handle, returning the underlying bytes buffer.
4276            #[must_use]
4277            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4278                self.0.into_bytes()
4279            }
4280            /// The OAuth token used to access Google Cloud services.
4281            ///
4282            /// Field 1: `oauth_token`
4283            #[must_use]
4284            pub fn oauth_token(&self) -> &'_ str {
4285                self.0.reborrow().oauth_token
4286            }
4287        }
4288        impl ::core::convert::From<::buffa::OwnedView<GcpOauthTokenView<'static>>>
4289        for GcpOauthTokenOwnedView {
4290            fn from(inner: ::buffa::OwnedView<GcpOauthTokenView<'static>>) -> Self {
4291                GcpOauthTokenOwnedView(inner)
4292            }
4293        }
4294        impl ::core::convert::From<GcpOauthTokenOwnedView>
4295        for ::buffa::OwnedView<GcpOauthTokenView<'static>> {
4296            fn from(wrapper: GcpOauthTokenOwnedView) -> Self {
4297                wrapper.0
4298            }
4299        }
4300        impl ::core::convert::AsRef<::buffa::OwnedView<GcpOauthTokenView<'static>>>
4301        for GcpOauthTokenOwnedView {
4302            fn as_ref(&self) -> &::buffa::OwnedView<GcpOauthTokenView<'static>> {
4303                &self.0
4304            }
4305        }
4306        impl ::buffa::HasMessageView for super::super::GcpOauthToken {
4307            type View<'a> = GcpOauthTokenView<'a>;
4308            type ViewHandle = GcpOauthTokenOwnedView;
4309        }
4310        impl ::serde::Serialize for GcpOauthTokenOwnedView {
4311            fn serialize<__S: ::serde::Serializer>(
4312                &self,
4313                __s: __S,
4314            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4315                ::serde::Serialize::serialize(&self.0, __s)
4316            }
4317        }
4318        #[derive(Clone, Debug, Default)]
4319        pub struct AwsTemporaryCredentialsView<'a> {
4320            /// The access key ID that identifies the temporary credentials.
4321            ///
4322            /// Field 1: `access_key_id`
4323            pub access_key_id: &'a str,
4324            /// The Amazon Resource Name (ARN) of the S3 access point for temporary credentials related the external location.
4325            ///
4326            /// Field 2: `access_point`
4327            pub access_point: &'a str,
4328            /// The secret access key that can be used to sign AWS API requests.
4329            ///
4330            /// Field 3: `secret_access_key`
4331            pub secret_access_key: &'a str,
4332            /// The token that users must pass to AWS API to use the temporary credentials.
4333            ///
4334            /// Field 4: `session_token`
4335            pub session_token: &'a str,
4336            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4337        }
4338        impl<'a> AwsTemporaryCredentialsView<'a> {
4339            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4340            ///
4341            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4342            /// and by generated sub-message decode arms with `depth - 1`.
4343            ///
4344            /// **Not part of the public API.** Named with a leading underscore to
4345            /// signal that it is for generated-code use only.
4346            #[doc(hidden)]
4347            pub fn _decode_depth(
4348                buf: &'a [u8],
4349                depth: u32,
4350            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4351                let mut view = Self::default();
4352                view._merge_into_view(buf, depth)?;
4353                ::core::result::Result::Ok(view)
4354            }
4355            /// Merge fields from `buf` into this view (proto merge semantics).
4356            ///
4357            /// Repeated fields append; singular fields last-wins; singular
4358            /// MESSAGE fields merge recursively. Used by sub-message decode
4359            /// arms when the same field appears multiple times on the wire.
4360            ///
4361            /// **Not part of the public API.**
4362            #[doc(hidden)]
4363            pub fn _merge_into_view(
4364                &mut self,
4365                buf: &'a [u8],
4366                depth: u32,
4367            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4368                let _ = depth;
4369                #[allow(unused_variables)]
4370                let view = self;
4371                let mut cur: &'a [u8] = buf;
4372                while !cur.is_empty() {
4373                    let before_tag = cur;
4374                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4375                    match tag.field_number() {
4376                        1u32 => {
4377                            if tag.wire_type()
4378                                != ::buffa::encoding::WireType::LengthDelimited
4379                            {
4380                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4381                                    field_number: 1u32,
4382                                    expected: 2u8,
4383                                    actual: tag.wire_type() as u8,
4384                                });
4385                            }
4386                            view.access_key_id = ::buffa::types::borrow_str(&mut cur)?;
4387                        }
4388                        2u32 => {
4389                            if tag.wire_type()
4390                                != ::buffa::encoding::WireType::LengthDelimited
4391                            {
4392                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4393                                    field_number: 2u32,
4394                                    expected: 2u8,
4395                                    actual: tag.wire_type() as u8,
4396                                });
4397                            }
4398                            view.access_point = ::buffa::types::borrow_str(&mut cur)?;
4399                        }
4400                        3u32 => {
4401                            if tag.wire_type()
4402                                != ::buffa::encoding::WireType::LengthDelimited
4403                            {
4404                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4405                                    field_number: 3u32,
4406                                    expected: 2u8,
4407                                    actual: tag.wire_type() as u8,
4408                                });
4409                            }
4410                            view.secret_access_key = ::buffa::types::borrow_str(
4411                                &mut cur,
4412                            )?;
4413                        }
4414                        4u32 => {
4415                            if tag.wire_type()
4416                                != ::buffa::encoding::WireType::LengthDelimited
4417                            {
4418                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4419                                    field_number: 4u32,
4420                                    expected: 2u8,
4421                                    actual: tag.wire_type() as u8,
4422                                });
4423                            }
4424                            view.session_token = ::buffa::types::borrow_str(&mut cur)?;
4425                        }
4426                        _ => {
4427                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4428                            let span_len = before_tag.len() - cur.len();
4429                            view.__buffa_unknown_fields
4430                                .push_raw(&before_tag[..span_len]);
4431                        }
4432                    }
4433                }
4434                ::core::result::Result::Ok(())
4435            }
4436        }
4437        impl<'a> ::buffa::MessageView<'a> for AwsTemporaryCredentialsView<'a> {
4438            type Owned = super::super::AwsTemporaryCredentials;
4439            fn decode_view(
4440                buf: &'a [u8],
4441            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4442                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4443            }
4444            fn decode_view_with_limit(
4445                buf: &'a [u8],
4446                depth: u32,
4447            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4448                Self::_decode_depth(buf, depth)
4449            }
4450            fn to_owned_message(&self) -> super::super::AwsTemporaryCredentials {
4451                self.to_owned_from_source(None)
4452            }
4453            #[allow(clippy::useless_conversion, clippy::needless_update)]
4454            fn to_owned_from_source(
4455                &self,
4456                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4457            ) -> super::super::AwsTemporaryCredentials {
4458                #[allow(unused_imports)]
4459                use ::buffa::alloc::string::ToString as _;
4460                let _ = __buffa_src;
4461                super::super::AwsTemporaryCredentials {
4462                    access_key_id: self.access_key_id.to_string(),
4463                    access_point: self.access_point.to_string(),
4464                    secret_access_key: self.secret_access_key.to_string(),
4465                    session_token: self.session_token.to_string(),
4466                    __buffa_unknown_fields: self
4467                        .__buffa_unknown_fields
4468                        .to_owned()
4469                        .unwrap_or_default()
4470                        .into(),
4471                    ..::core::default::Default::default()
4472                }
4473            }
4474        }
4475        impl<'a> ::buffa::ViewEncode<'a> for AwsTemporaryCredentialsView<'a> {
4476            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4477            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4478                #[allow(unused_imports)]
4479                use ::buffa::Enumeration as _;
4480                let mut size = 0u32;
4481                if !self.access_key_id.is_empty() {
4482                    size
4483                        += 1u32
4484                            + ::buffa::types::string_encoded_len(&self.access_key_id)
4485                                as u32;
4486                }
4487                if !self.access_point.is_empty() {
4488                    size
4489                        += 1u32
4490                            + ::buffa::types::string_encoded_len(&self.access_point)
4491                                as u32;
4492                }
4493                if !self.secret_access_key.is_empty() {
4494                    size
4495                        += 1u32
4496                            + ::buffa::types::string_encoded_len(&self.secret_access_key)
4497                                as u32;
4498                }
4499                if !self.session_token.is_empty() {
4500                    size
4501                        += 1u32
4502                            + ::buffa::types::string_encoded_len(&self.session_token)
4503                                as u32;
4504                }
4505                size += self.__buffa_unknown_fields.encoded_len() as u32;
4506                size
4507            }
4508            #[allow(clippy::needless_borrow)]
4509            fn write_to(
4510                &self,
4511                _cache: &mut ::buffa::SizeCache,
4512                buf: &mut impl ::buffa::bytes::BufMut,
4513            ) {
4514                #[allow(unused_imports)]
4515                use ::buffa::Enumeration as _;
4516                if !self.access_key_id.is_empty() {
4517                    ::buffa::encoding::Tag::new(
4518                            1u32,
4519                            ::buffa::encoding::WireType::LengthDelimited,
4520                        )
4521                        .encode(buf);
4522                    ::buffa::types::encode_string(&self.access_key_id, buf);
4523                }
4524                if !self.access_point.is_empty() {
4525                    ::buffa::encoding::Tag::new(
4526                            2u32,
4527                            ::buffa::encoding::WireType::LengthDelimited,
4528                        )
4529                        .encode(buf);
4530                    ::buffa::types::encode_string(&self.access_point, buf);
4531                }
4532                if !self.secret_access_key.is_empty() {
4533                    ::buffa::encoding::Tag::new(
4534                            3u32,
4535                            ::buffa::encoding::WireType::LengthDelimited,
4536                        )
4537                        .encode(buf);
4538                    ::buffa::types::encode_string(&self.secret_access_key, buf);
4539                }
4540                if !self.session_token.is_empty() {
4541                    ::buffa::encoding::Tag::new(
4542                            4u32,
4543                            ::buffa::encoding::WireType::LengthDelimited,
4544                        )
4545                        .encode(buf);
4546                    ::buffa::types::encode_string(&self.session_token, buf);
4547                }
4548                self.__buffa_unknown_fields.write_to(buf);
4549            }
4550        }
4551        /// Serializes this view as protobuf JSON.
4552        ///
4553        /// Implicit-presence fields with default values are omitted, `required`
4554        /// fields are always emitted, explicit-presence (`optional`) fields are
4555        /// emitted only when set, bytes fields are base64-encoded, and enum
4556        /// values are their proto name strings.
4557        ///
4558        /// This impl uses `serialize_map(None)` because the number of emitted
4559        /// fields depends on default-omission rules; serializers that require
4560        /// known map lengths (e.g. `bincode`) will return a runtime error.
4561        /// Use the owned message type for those formats.
4562        impl<'__a> ::serde::Serialize for AwsTemporaryCredentialsView<'__a> {
4563            fn serialize<__S: ::serde::Serializer>(
4564                &self,
4565                __s: __S,
4566            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4567                use ::serde::ser::SerializeMap as _;
4568                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4569                if !::buffa::json_helpers::skip_if::is_empty_str(self.access_key_id) {
4570                    __map.serialize_entry("access_key_id", self.access_key_id)?;
4571                }
4572                if !::buffa::json_helpers::skip_if::is_empty_str(self.access_point) {
4573                    __map.serialize_entry("access_point", self.access_point)?;
4574                }
4575                if !::buffa::json_helpers::skip_if::is_empty_str(
4576                    self.secret_access_key,
4577                ) {
4578                    __map.serialize_entry("secret_access_key", self.secret_access_key)?;
4579                }
4580                if !::buffa::json_helpers::skip_if::is_empty_str(self.session_token) {
4581                    __map.serialize_entry("session_token", self.session_token)?;
4582                }
4583                __map.end()
4584            }
4585        }
4586        impl<'a> ::buffa::MessageName for AwsTemporaryCredentialsView<'a> {
4587            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
4588            const NAME: &'static str = "AwsTemporaryCredentials";
4589            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.AwsTemporaryCredentials";
4590            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.AwsTemporaryCredentials";
4591        }
4592        impl<'v> ::buffa::DefaultViewInstance for AwsTemporaryCredentialsView<'v> {
4593            fn default_view_instance<'a>() -> &'a Self
4594            where
4595                Self: 'a,
4596            {
4597                static VALUE: ::buffa::__private::OnceBox<
4598                    AwsTemporaryCredentialsView<'static>,
4599                > = ::buffa::__private::OnceBox::new();
4600                VALUE
4601                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4602                        <AwsTemporaryCredentialsView<'static>>::default(),
4603                    ))
4604            }
4605        }
4606        impl ::buffa::ViewReborrow for AwsTemporaryCredentialsView<'static> {
4607            type Reborrowed<'b> = AwsTemporaryCredentialsView<'b>;
4608            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4609                this
4610            }
4611        }
4612        /** Self-contained, `'static` owned view of a `AwsTemporaryCredentials` message.
4613
4614 Wraps [`::buffa::OwnedView`]`<`[`AwsTemporaryCredentialsView`]`<'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.
4615
4616 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AwsTemporaryCredentialsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4617        #[derive(Clone, Debug)]
4618        pub struct AwsTemporaryCredentialsOwnedView(
4619            ::buffa::OwnedView<AwsTemporaryCredentialsView<'static>>,
4620        );
4621        impl AwsTemporaryCredentialsOwnedView {
4622            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4623            ///
4624            /// The view borrows directly from the buffer's data; the buffer is
4625            /// retained inside the returned handle.
4626            ///
4627            /// # Errors
4628            ///
4629            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4630            /// protobuf data.
4631            pub fn decode(
4632                bytes: ::buffa::bytes::Bytes,
4633            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4634                ::core::result::Result::Ok(
4635                    AwsTemporaryCredentialsOwnedView(::buffa::OwnedView::decode(bytes)?),
4636                )
4637            }
4638            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4639            /// max message size).
4640            ///
4641            /// # Errors
4642            ///
4643            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4644            /// exceeds the configured limits.
4645            pub fn decode_with_options(
4646                bytes: ::buffa::bytes::Bytes,
4647                opts: &::buffa::DecodeOptions,
4648            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4649                ::core::result::Result::Ok(
4650                    AwsTemporaryCredentialsOwnedView(
4651                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4652                    ),
4653                )
4654            }
4655            /// Build from an owned message via an encode → decode round-trip.
4656            ///
4657            /// # Errors
4658            ///
4659            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4660            /// somehow invalid (should not happen for well-formed messages).
4661            pub fn from_owned(
4662                msg: &super::super::AwsTemporaryCredentials,
4663            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4664                ::core::result::Result::Ok(
4665                    AwsTemporaryCredentialsOwnedView(
4666                        ::buffa::OwnedView::from_owned(msg)?,
4667                    ),
4668                )
4669            }
4670            /// Borrow the full [`AwsTemporaryCredentialsView`] with its lifetime tied to `&self`.
4671            #[must_use]
4672            pub fn view(&self) -> &AwsTemporaryCredentialsView<'_> {
4673                self.0.reborrow()
4674            }
4675            /// Convert to the owned message type.
4676            #[must_use]
4677            pub fn to_owned_message(&self) -> super::super::AwsTemporaryCredentials {
4678                self.0.to_owned_message()
4679            }
4680            /// The underlying bytes buffer.
4681            #[must_use]
4682            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4683                self.0.bytes()
4684            }
4685            /// Consume the handle, returning the underlying bytes buffer.
4686            #[must_use]
4687            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4688                self.0.into_bytes()
4689            }
4690            /// The access key ID that identifies the temporary credentials.
4691            ///
4692            /// Field 1: `access_key_id`
4693            #[must_use]
4694            pub fn access_key_id(&self) -> &'_ str {
4695                self.0.reborrow().access_key_id
4696            }
4697            /// The Amazon Resource Name (ARN) of the S3 access point for temporary credentials related the external location.
4698            ///
4699            /// Field 2: `access_point`
4700            #[must_use]
4701            pub fn access_point(&self) -> &'_ str {
4702                self.0.reborrow().access_point
4703            }
4704            /// The secret access key that can be used to sign AWS API requests.
4705            ///
4706            /// Field 3: `secret_access_key`
4707            #[must_use]
4708            pub fn secret_access_key(&self) -> &'_ str {
4709                self.0.reborrow().secret_access_key
4710            }
4711            /// The token that users must pass to AWS API to use the temporary credentials.
4712            ///
4713            /// Field 4: `session_token`
4714            #[must_use]
4715            pub fn session_token(&self) -> &'_ str {
4716                self.0.reborrow().session_token
4717            }
4718        }
4719        impl ::core::convert::From<
4720            ::buffa::OwnedView<AwsTemporaryCredentialsView<'static>>,
4721        > for AwsTemporaryCredentialsOwnedView {
4722            fn from(
4723                inner: ::buffa::OwnedView<AwsTemporaryCredentialsView<'static>>,
4724            ) -> Self {
4725                AwsTemporaryCredentialsOwnedView(inner)
4726            }
4727        }
4728        impl ::core::convert::From<AwsTemporaryCredentialsOwnedView>
4729        for ::buffa::OwnedView<AwsTemporaryCredentialsView<'static>> {
4730            fn from(wrapper: AwsTemporaryCredentialsOwnedView) -> Self {
4731                wrapper.0
4732            }
4733        }
4734        impl ::core::convert::AsRef<
4735            ::buffa::OwnedView<AwsTemporaryCredentialsView<'static>>,
4736        > for AwsTemporaryCredentialsOwnedView {
4737            fn as_ref(
4738                &self,
4739            ) -> &::buffa::OwnedView<AwsTemporaryCredentialsView<'static>> {
4740                &self.0
4741            }
4742        }
4743        impl ::buffa::HasMessageView for super::super::AwsTemporaryCredentials {
4744            type View<'a> = AwsTemporaryCredentialsView<'a>;
4745            type ViewHandle = AwsTemporaryCredentialsOwnedView;
4746        }
4747        impl ::serde::Serialize for AwsTemporaryCredentialsOwnedView {
4748            fn serialize<__S: ::serde::Serializer>(
4749                &self,
4750                __s: __S,
4751            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4752                ::serde::Serialize::serialize(&self.0, __s)
4753            }
4754        }
4755        /// The response to the GenerateTemporaryTableCredentialsRequest.
4756        #[derive(Clone, Debug, Default)]
4757        pub struct TemporaryCredentialView<'a> {
4758            /// Server time when the credential will expire, in epoch milliseconds.
4759            /// The API client is advised to cache the credential given this expiration time.
4760            ///
4761            /// Field 1: `expiration_time`
4762            pub expiration_time: i64,
4763            /// The URL of the storage path accessible by the temporary credential.
4764            ///
4765            /// Field 2: `url`
4766            pub url: &'a str,
4767            pub credentials: ::core::option::Option<
4768                super::super::__buffa::view::oneof::temporary_credential::Credentials<'a>,
4769            >,
4770            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4771        }
4772        impl<'a> TemporaryCredentialView<'a> {
4773            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4774            ///
4775            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4776            /// and by generated sub-message decode arms with `depth - 1`.
4777            ///
4778            /// **Not part of the public API.** Named with a leading underscore to
4779            /// signal that it is for generated-code use only.
4780            #[doc(hidden)]
4781            pub fn _decode_depth(
4782                buf: &'a [u8],
4783                depth: u32,
4784            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4785                let mut view = Self::default();
4786                view._merge_into_view(buf, depth)?;
4787                ::core::result::Result::Ok(view)
4788            }
4789            /// Merge fields from `buf` into this view (proto merge semantics).
4790            ///
4791            /// Repeated fields append; singular fields last-wins; singular
4792            /// MESSAGE fields merge recursively. Used by sub-message decode
4793            /// arms when the same field appears multiple times on the wire.
4794            ///
4795            /// **Not part of the public API.**
4796            #[doc(hidden)]
4797            pub fn _merge_into_view(
4798                &mut self,
4799                buf: &'a [u8],
4800                depth: u32,
4801            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4802                let _ = depth;
4803                #[allow(unused_variables)]
4804                let view = self;
4805                let mut cur: &'a [u8] = buf;
4806                while !cur.is_empty() {
4807                    let before_tag = cur;
4808                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4809                    match tag.field_number() {
4810                        1u32 => {
4811                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4812                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4813                                    field_number: 1u32,
4814                                    expected: 0u8,
4815                                    actual: tag.wire_type() as u8,
4816                                });
4817                            }
4818                            view.expiration_time = ::buffa::types::decode_int64(
4819                                &mut cur,
4820                            )?;
4821                        }
4822                        2u32 => {
4823                            if tag.wire_type()
4824                                != ::buffa::encoding::WireType::LengthDelimited
4825                            {
4826                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4827                                    field_number: 2u32,
4828                                    expected: 2u8,
4829                                    actual: tag.wire_type() as u8,
4830                                });
4831                            }
4832                            view.url = ::buffa::types::borrow_str(&mut cur)?;
4833                        }
4834                        100u32 => {
4835                            if tag.wire_type()
4836                                != ::buffa::encoding::WireType::LengthDelimited
4837                            {
4838                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4839                                    field_number: 100u32,
4840                                    expected: 2u8,
4841                                    actual: tag.wire_type() as u8,
4842                                });
4843                            }
4844                            if depth == 0 {
4845                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
4846                            }
4847                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4848                            if let Some(
4849                                super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
4850                                    ref mut existing,
4851                                ),
4852                            ) = view.credentials
4853                            {
4854                                existing._merge_into_view(sub, depth - 1)?;
4855                            } else {
4856                                view.credentials = Some(
4857                                    super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
4858                                        ::buffa::alloc::boxed::Box::new(
4859                                            super::super::__buffa::view::AzureUserDelegationSasView::_decode_depth(
4860                                                sub,
4861                                                depth - 1,
4862                                            )?,
4863                                        ),
4864                                    ),
4865                                );
4866                            }
4867                        }
4868                        101u32 => {
4869                            if tag.wire_type()
4870                                != ::buffa::encoding::WireType::LengthDelimited
4871                            {
4872                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4873                                    field_number: 101u32,
4874                                    expected: 2u8,
4875                                    actual: tag.wire_type() as u8,
4876                                });
4877                            }
4878                            if depth == 0 {
4879                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
4880                            }
4881                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4882                            if let Some(
4883                                super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureAad(
4884                                    ref mut existing,
4885                                ),
4886                            ) = view.credentials
4887                            {
4888                                existing._merge_into_view(sub, depth - 1)?;
4889                            } else {
4890                                view.credentials = Some(
4891                                    super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureAad(
4892                                        ::buffa::alloc::boxed::Box::new(
4893                                            super::super::__buffa::view::AzureAadView::_decode_depth(
4894                                                sub,
4895                                                depth - 1,
4896                                            )?,
4897                                        ),
4898                                    ),
4899                                );
4900                            }
4901                        }
4902                        102u32 => {
4903                            if tag.wire_type()
4904                                != ::buffa::encoding::WireType::LengthDelimited
4905                            {
4906                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4907                                    field_number: 102u32,
4908                                    expected: 2u8,
4909                                    actual: tag.wire_type() as u8,
4910                                });
4911                            }
4912                            if depth == 0 {
4913                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
4914                            }
4915                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4916                            if let Some(
4917                                super::super::__buffa::view::oneof::temporary_credential::Credentials::AwsTempCredentials(
4918                                    ref mut existing,
4919                                ),
4920                            ) = view.credentials
4921                            {
4922                                existing._merge_into_view(sub, depth - 1)?;
4923                            } else {
4924                                view.credentials = Some(
4925                                    super::super::__buffa::view::oneof::temporary_credential::Credentials::AwsTempCredentials(
4926                                        ::buffa::alloc::boxed::Box::new(
4927                                            super::super::__buffa::view::AwsTemporaryCredentialsView::_decode_depth(
4928                                                sub,
4929                                                depth - 1,
4930                                            )?,
4931                                        ),
4932                                    ),
4933                                );
4934                            }
4935                        }
4936                        103u32 => {
4937                            if tag.wire_type()
4938                                != ::buffa::encoding::WireType::LengthDelimited
4939                            {
4940                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4941                                    field_number: 103u32,
4942                                    expected: 2u8,
4943                                    actual: tag.wire_type() as u8,
4944                                });
4945                            }
4946                            if depth == 0 {
4947                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
4948                            }
4949                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4950                            if let Some(
4951                                super::super::__buffa::view::oneof::temporary_credential::Credentials::GcpOauthToken(
4952                                    ref mut existing,
4953                                ),
4954                            ) = view.credentials
4955                            {
4956                                existing._merge_into_view(sub, depth - 1)?;
4957                            } else {
4958                                view.credentials = Some(
4959                                    super::super::__buffa::view::oneof::temporary_credential::Credentials::GcpOauthToken(
4960                                        ::buffa::alloc::boxed::Box::new(
4961                                            super::super::__buffa::view::GcpOauthTokenView::_decode_depth(
4962                                                sub,
4963                                                depth - 1,
4964                                            )?,
4965                                        ),
4966                                    ),
4967                                );
4968                            }
4969                        }
4970                        104u32 => {
4971                            if tag.wire_type()
4972                                != ::buffa::encoding::WireType::LengthDelimited
4973                            {
4974                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4975                                    field_number: 104u32,
4976                                    expected: 2u8,
4977                                    actual: tag.wire_type() as u8,
4978                                });
4979                            }
4980                            if depth == 0 {
4981                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
4982                            }
4983                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4984                            if let Some(
4985                                super::super::__buffa::view::oneof::temporary_credential::Credentials::R2TempCredentials(
4986                                    ref mut existing,
4987                                ),
4988                            ) = view.credentials
4989                            {
4990                                existing._merge_into_view(sub, depth - 1)?;
4991                            } else {
4992                                view.credentials = Some(
4993                                    super::super::__buffa::view::oneof::temporary_credential::Credentials::R2TempCredentials(
4994                                        ::buffa::alloc::boxed::Box::new(
4995                                            super::super::__buffa::view::R2TemporaryCredentialsView::_decode_depth(
4996                                                sub,
4997                                                depth - 1,
4998                                            )?,
4999                                        ),
5000                                    ),
5001                                );
5002                            }
5003                        }
5004                        _ => {
5005                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5006                            let span_len = before_tag.len() - cur.len();
5007                            view.__buffa_unknown_fields
5008                                .push_raw(&before_tag[..span_len]);
5009                        }
5010                    }
5011                }
5012                ::core::result::Result::Ok(())
5013            }
5014        }
5015        impl<'a> ::buffa::MessageView<'a> for TemporaryCredentialView<'a> {
5016            type Owned = super::super::TemporaryCredential;
5017            fn decode_view(
5018                buf: &'a [u8],
5019            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5020                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5021            }
5022            fn decode_view_with_limit(
5023                buf: &'a [u8],
5024                depth: u32,
5025            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5026                Self::_decode_depth(buf, depth)
5027            }
5028            fn to_owned_message(&self) -> super::super::TemporaryCredential {
5029                self.to_owned_from_source(None)
5030            }
5031            #[allow(clippy::useless_conversion, clippy::needless_update)]
5032            fn to_owned_from_source(
5033                &self,
5034                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5035            ) -> super::super::TemporaryCredential {
5036                #[allow(unused_imports)]
5037                use ::buffa::alloc::string::ToString as _;
5038                let _ = __buffa_src;
5039                super::super::TemporaryCredential {
5040                    expiration_time: self.expiration_time,
5041                    url: self.url.to_string(),
5042                    credentials: self
5043                        .credentials
5044                        .as_ref()
5045                        .map(|v| match v {
5046                            super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
5047                                v,
5048                            ) => {
5049                                super::super::__buffa::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
5050                                    ::buffa::alloc::boxed::Box::new(
5051                                        v.to_owned_from_source(__buffa_src),
5052                                    ),
5053                                )
5054                            }
5055                            super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureAad(
5056                                v,
5057                            ) => {
5058                                super::super::__buffa::oneof::temporary_credential::Credentials::AzureAad(
5059                                    ::buffa::alloc::boxed::Box::new(
5060                                        v.to_owned_from_source(__buffa_src),
5061                                    ),
5062                                )
5063                            }
5064                            super::super::__buffa::view::oneof::temporary_credential::Credentials::AwsTempCredentials(
5065                                v,
5066                            ) => {
5067                                super::super::__buffa::oneof::temporary_credential::Credentials::AwsTempCredentials(
5068                                    ::buffa::alloc::boxed::Box::new(
5069                                        v.to_owned_from_source(__buffa_src),
5070                                    ),
5071                                )
5072                            }
5073                            super::super::__buffa::view::oneof::temporary_credential::Credentials::GcpOauthToken(
5074                                v,
5075                            ) => {
5076                                super::super::__buffa::oneof::temporary_credential::Credentials::GcpOauthToken(
5077                                    ::buffa::alloc::boxed::Box::new(
5078                                        v.to_owned_from_source(__buffa_src),
5079                                    ),
5080                                )
5081                            }
5082                            super::super::__buffa::view::oneof::temporary_credential::Credentials::R2TempCredentials(
5083                                v,
5084                            ) => {
5085                                super::super::__buffa::oneof::temporary_credential::Credentials::R2TempCredentials(
5086                                    ::buffa::alloc::boxed::Box::new(
5087                                        v.to_owned_from_source(__buffa_src),
5088                                    ),
5089                                )
5090                            }
5091                        }),
5092                    __buffa_unknown_fields: self
5093                        .__buffa_unknown_fields
5094                        .to_owned()
5095                        .unwrap_or_default()
5096                        .into(),
5097                    ..::core::default::Default::default()
5098                }
5099            }
5100        }
5101        impl<'a> ::buffa::ViewEncode<'a> for TemporaryCredentialView<'a> {
5102            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5103            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5104                #[allow(unused_imports)]
5105                use ::buffa::Enumeration as _;
5106                let mut size = 0u32;
5107                if self.expiration_time != 0i64 {
5108                    size
5109                        += 1u32
5110                            + ::buffa::types::int64_encoded_len(self.expiration_time)
5111                                as u32;
5112                }
5113                if !self.url.is_empty() {
5114                    size += 1u32 + ::buffa::types::string_encoded_len(&self.url) as u32;
5115                }
5116                if let ::core::option::Option::Some(ref v) = self.credentials {
5117                    match v {
5118                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
5119                            x,
5120                        ) => {
5121                            let __slot = __cache.reserve();
5122                            let inner = x.compute_size(__cache);
5123                            __cache.set(__slot, inner);
5124                            size
5125                                += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
5126                                    + inner;
5127                        }
5128                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureAad(
5129                            x,
5130                        ) => {
5131                            let __slot = __cache.reserve();
5132                            let inner = x.compute_size(__cache);
5133                            __cache.set(__slot, inner);
5134                            size
5135                                += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
5136                                    + inner;
5137                        }
5138                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AwsTempCredentials(
5139                            x,
5140                        ) => {
5141                            let __slot = __cache.reserve();
5142                            let inner = x.compute_size(__cache);
5143                            __cache.set(__slot, inner);
5144                            size
5145                                += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
5146                                    + inner;
5147                        }
5148                        super::super::__buffa::view::oneof::temporary_credential::Credentials::GcpOauthToken(
5149                            x,
5150                        ) => {
5151                            let __slot = __cache.reserve();
5152                            let inner = x.compute_size(__cache);
5153                            __cache.set(__slot, inner);
5154                            size
5155                                += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
5156                                    + inner;
5157                        }
5158                        super::super::__buffa::view::oneof::temporary_credential::Credentials::R2TempCredentials(
5159                            x,
5160                        ) => {
5161                            let __slot = __cache.reserve();
5162                            let inner = x.compute_size(__cache);
5163                            __cache.set(__slot, inner);
5164                            size
5165                                += 2u32 + ::buffa::encoding::varint_len(inner as u64) as u32
5166                                    + inner;
5167                        }
5168                    }
5169                }
5170                size += self.__buffa_unknown_fields.encoded_len() as u32;
5171                size
5172            }
5173            #[allow(clippy::needless_borrow)]
5174            fn write_to(
5175                &self,
5176                __cache: &mut ::buffa::SizeCache,
5177                buf: &mut impl ::buffa::bytes::BufMut,
5178            ) {
5179                #[allow(unused_imports)]
5180                use ::buffa::Enumeration as _;
5181                if self.expiration_time != 0i64 {
5182                    ::buffa::encoding::Tag::new(
5183                            1u32,
5184                            ::buffa::encoding::WireType::Varint,
5185                        )
5186                        .encode(buf);
5187                    ::buffa::types::encode_int64(self.expiration_time, buf);
5188                }
5189                if !self.url.is_empty() {
5190                    ::buffa::encoding::Tag::new(
5191                            2u32,
5192                            ::buffa::encoding::WireType::LengthDelimited,
5193                        )
5194                        .encode(buf);
5195                    ::buffa::types::encode_string(&self.url, buf);
5196                }
5197                if let ::core::option::Option::Some(ref v) = self.credentials {
5198                    match v {
5199                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
5200                            x,
5201                        ) => {
5202                            ::buffa::encoding::Tag::new(
5203                                    100u32,
5204                                    ::buffa::encoding::WireType::LengthDelimited,
5205                                )
5206                                .encode(buf);
5207                            ::buffa::encoding::encode_varint(
5208                                __cache.consume_next() as u64,
5209                                buf,
5210                            );
5211                            x.write_to(__cache, buf);
5212                        }
5213                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureAad(
5214                            x,
5215                        ) => {
5216                            ::buffa::encoding::Tag::new(
5217                                    101u32,
5218                                    ::buffa::encoding::WireType::LengthDelimited,
5219                                )
5220                                .encode(buf);
5221                            ::buffa::encoding::encode_varint(
5222                                __cache.consume_next() as u64,
5223                                buf,
5224                            );
5225                            x.write_to(__cache, buf);
5226                        }
5227                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AwsTempCredentials(
5228                            x,
5229                        ) => {
5230                            ::buffa::encoding::Tag::new(
5231                                    102u32,
5232                                    ::buffa::encoding::WireType::LengthDelimited,
5233                                )
5234                                .encode(buf);
5235                            ::buffa::encoding::encode_varint(
5236                                __cache.consume_next() as u64,
5237                                buf,
5238                            );
5239                            x.write_to(__cache, buf);
5240                        }
5241                        super::super::__buffa::view::oneof::temporary_credential::Credentials::GcpOauthToken(
5242                            x,
5243                        ) => {
5244                            ::buffa::encoding::Tag::new(
5245                                    103u32,
5246                                    ::buffa::encoding::WireType::LengthDelimited,
5247                                )
5248                                .encode(buf);
5249                            ::buffa::encoding::encode_varint(
5250                                __cache.consume_next() as u64,
5251                                buf,
5252                            );
5253                            x.write_to(__cache, buf);
5254                        }
5255                        super::super::__buffa::view::oneof::temporary_credential::Credentials::R2TempCredentials(
5256                            x,
5257                        ) => {
5258                            ::buffa::encoding::Tag::new(
5259                                    104u32,
5260                                    ::buffa::encoding::WireType::LengthDelimited,
5261                                )
5262                                .encode(buf);
5263                            ::buffa::encoding::encode_varint(
5264                                __cache.consume_next() as u64,
5265                                buf,
5266                            );
5267                            x.write_to(__cache, buf);
5268                        }
5269                    }
5270                }
5271                self.__buffa_unknown_fields.write_to(buf);
5272            }
5273        }
5274        /// Serializes this view as protobuf JSON.
5275        ///
5276        /// Implicit-presence fields with default values are omitted, `required`
5277        /// fields are always emitted, explicit-presence (`optional`) fields are
5278        /// emitted only when set, bytes fields are base64-encoded, and enum
5279        /// values are their proto name strings.
5280        ///
5281        /// This impl uses `serialize_map(None)` because the number of emitted
5282        /// fields depends on default-omission rules; serializers that require
5283        /// known map lengths (e.g. `bincode`) will return a runtime error.
5284        /// Use the owned message type for those formats.
5285        impl<'__a> ::serde::Serialize for TemporaryCredentialView<'__a> {
5286            fn serialize<__S: ::serde::Serializer>(
5287                &self,
5288                __s: __S,
5289            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5290                use ::serde::ser::SerializeMap as _;
5291                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5292                if !::buffa::json_helpers::skip_if::is_zero_i64(&self.expiration_time) {
5293                    struct _W(i64);
5294                    impl ::serde::Serialize for _W {
5295                        fn serialize<__S: ::serde::Serializer>(
5296                            &self,
5297                            __s: __S,
5298                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
5299                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
5300                        }
5301                    }
5302                    __map.serialize_entry("expiration_time", &_W(self.expiration_time))?;
5303                }
5304                if !::buffa::json_helpers::skip_if::is_empty_str(self.url) {
5305                    __map.serialize_entry("url", self.url)?;
5306                }
5307                if let ::core::option::Option::Some(ref __ov) = self.credentials {
5308                    match __ov {
5309                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureUserDelegationSas(
5310                            v,
5311                        ) => {
5312                            __map.serialize_entry("azure_user_delegation_sas", v)?;
5313                        }
5314                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AzureAad(
5315                            v,
5316                        ) => {
5317                            __map.serialize_entry("azure_aad", v)?;
5318                        }
5319                        super::super::__buffa::view::oneof::temporary_credential::Credentials::AwsTempCredentials(
5320                            v,
5321                        ) => {
5322                            __map.serialize_entry("aws_temp_credentials", v)?;
5323                        }
5324                        super::super::__buffa::view::oneof::temporary_credential::Credentials::GcpOauthToken(
5325                            v,
5326                        ) => {
5327                            __map.serialize_entry("gcp_oauth_token", v)?;
5328                        }
5329                        super::super::__buffa::view::oneof::temporary_credential::Credentials::R2TempCredentials(
5330                            v,
5331                        ) => {
5332                            __map.serialize_entry("r2_temp_credentials", v)?;
5333                        }
5334                    }
5335                }
5336                __map.end()
5337            }
5338        }
5339        impl<'a> ::buffa::MessageName for TemporaryCredentialView<'a> {
5340            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
5341            const NAME: &'static str = "TemporaryCredential";
5342            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.TemporaryCredential";
5343            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.TemporaryCredential";
5344        }
5345        impl<'v> ::buffa::DefaultViewInstance for TemporaryCredentialView<'v> {
5346            fn default_view_instance<'a>() -> &'a Self
5347            where
5348                Self: 'a,
5349            {
5350                static VALUE: ::buffa::__private::OnceBox<
5351                    TemporaryCredentialView<'static>,
5352                > = ::buffa::__private::OnceBox::new();
5353                VALUE
5354                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5355                        <TemporaryCredentialView<'static>>::default(),
5356                    ))
5357            }
5358        }
5359        impl ::buffa::ViewReborrow for TemporaryCredentialView<'static> {
5360            type Reborrowed<'b> = TemporaryCredentialView<'b>;
5361            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5362                this
5363            }
5364        }
5365        /** Self-contained, `'static` owned view of a `TemporaryCredential` message.
5366
5367 Wraps [`::buffa::OwnedView`]`<`[`TemporaryCredentialView`]`<'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.
5368
5369 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`TemporaryCredentialView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5370        #[derive(Clone, Debug)]
5371        pub struct TemporaryCredentialOwnedView(
5372            ::buffa::OwnedView<TemporaryCredentialView<'static>>,
5373        );
5374        impl TemporaryCredentialOwnedView {
5375            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5376            ///
5377            /// The view borrows directly from the buffer's data; the buffer is
5378            /// retained inside the returned handle.
5379            ///
5380            /// # Errors
5381            ///
5382            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5383            /// protobuf data.
5384            pub fn decode(
5385                bytes: ::buffa::bytes::Bytes,
5386            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5387                ::core::result::Result::Ok(
5388                    TemporaryCredentialOwnedView(::buffa::OwnedView::decode(bytes)?),
5389                )
5390            }
5391            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5392            /// max message size).
5393            ///
5394            /// # Errors
5395            ///
5396            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5397            /// exceeds the configured limits.
5398            pub fn decode_with_options(
5399                bytes: ::buffa::bytes::Bytes,
5400                opts: &::buffa::DecodeOptions,
5401            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5402                ::core::result::Result::Ok(
5403                    TemporaryCredentialOwnedView(
5404                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5405                    ),
5406                )
5407            }
5408            /// Build from an owned message via an encode → decode round-trip.
5409            ///
5410            /// # Errors
5411            ///
5412            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5413            /// somehow invalid (should not happen for well-formed messages).
5414            pub fn from_owned(
5415                msg: &super::super::TemporaryCredential,
5416            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5417                ::core::result::Result::Ok(
5418                    TemporaryCredentialOwnedView(::buffa::OwnedView::from_owned(msg)?),
5419                )
5420            }
5421            /// Borrow the full [`TemporaryCredentialView`] with its lifetime tied to `&self`.
5422            #[must_use]
5423            pub fn view(&self) -> &TemporaryCredentialView<'_> {
5424                self.0.reborrow()
5425            }
5426            /// Convert to the owned message type.
5427            #[must_use]
5428            pub fn to_owned_message(&self) -> super::super::TemporaryCredential {
5429                self.0.to_owned_message()
5430            }
5431            /// The underlying bytes buffer.
5432            #[must_use]
5433            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5434                self.0.bytes()
5435            }
5436            /// Consume the handle, returning the underlying bytes buffer.
5437            #[must_use]
5438            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5439                self.0.into_bytes()
5440            }
5441            /// Server time when the credential will expire, in epoch milliseconds.
5442            /// The API client is advised to cache the credential given this expiration time.
5443            ///
5444            /// Field 1: `expiration_time`
5445            #[must_use]
5446            pub fn expiration_time(&self) -> i64 {
5447                self.0.reborrow().expiration_time
5448            }
5449            /// The URL of the storage path accessible by the temporary credential.
5450            ///
5451            /// Field 2: `url`
5452            #[must_use]
5453            pub fn url(&self) -> &'_ str {
5454                self.0.reborrow().url
5455            }
5456            /// Oneof `credentials`.
5457            #[must_use]
5458            pub fn credentials(
5459                &self,
5460            ) -> ::core::option::Option<
5461                &super::super::__buffa::view::oneof::temporary_credential::Credentials<
5462                    '_,
5463                >,
5464            > {
5465                self.0.reborrow().credentials.as_ref()
5466            }
5467        }
5468        impl ::core::convert::From<::buffa::OwnedView<TemporaryCredentialView<'static>>>
5469        for TemporaryCredentialOwnedView {
5470            fn from(
5471                inner: ::buffa::OwnedView<TemporaryCredentialView<'static>>,
5472            ) -> Self {
5473                TemporaryCredentialOwnedView(inner)
5474            }
5475        }
5476        impl ::core::convert::From<TemporaryCredentialOwnedView>
5477        for ::buffa::OwnedView<TemporaryCredentialView<'static>> {
5478            fn from(wrapper: TemporaryCredentialOwnedView) -> Self {
5479                wrapper.0
5480            }
5481        }
5482        impl ::core::convert::AsRef<::buffa::OwnedView<TemporaryCredentialView<'static>>>
5483        for TemporaryCredentialOwnedView {
5484            fn as_ref(&self) -> &::buffa::OwnedView<TemporaryCredentialView<'static>> {
5485                &self.0
5486            }
5487        }
5488        impl ::buffa::HasMessageView for super::super::TemporaryCredential {
5489            type View<'a> = TemporaryCredentialView<'a>;
5490            type ViewHandle = TemporaryCredentialOwnedView;
5491        }
5492        impl ::serde::Serialize for TemporaryCredentialOwnedView {
5493            fn serialize<__S: ::serde::Serializer>(
5494                &self,
5495                __s: __S,
5496            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5497                ::serde::Serialize::serialize(&self.0, __s)
5498            }
5499        }
5500        /// Generate a new set of credentials for a table.
5501        #[derive(Clone, Debug, Default)]
5502        pub struct GenerateTemporaryTableCredentialsRequestView<'a> {
5503            /// UUID of the table to read or write.
5504            ///
5505            /// Field 1: `table_id`
5506            pub table_id: &'a str,
5507            /// The operation performed against the table data, either READ or READ_WRITE.
5508            /// If READ_WRITE is specified, the credentials returned will have write
5509            /// permissions, otherwise, it will be read only.
5510            ///
5511            /// Field 2: `operation`
5512            pub operation: ::buffa::EnumValue<
5513                super::super::generate_temporary_table_credentials_request::Operation,
5514            >,
5515            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5516        }
5517        impl<'a> GenerateTemporaryTableCredentialsRequestView<'a> {
5518            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5519            ///
5520            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5521            /// and by generated sub-message decode arms with `depth - 1`.
5522            ///
5523            /// **Not part of the public API.** Named with a leading underscore to
5524            /// signal that it is for generated-code use only.
5525            #[doc(hidden)]
5526            pub fn _decode_depth(
5527                buf: &'a [u8],
5528                depth: u32,
5529            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5530                let mut view = Self::default();
5531                view._merge_into_view(buf, depth)?;
5532                ::core::result::Result::Ok(view)
5533            }
5534            /// Merge fields from `buf` into this view (proto merge semantics).
5535            ///
5536            /// Repeated fields append; singular fields last-wins; singular
5537            /// MESSAGE fields merge recursively. Used by sub-message decode
5538            /// arms when the same field appears multiple times on the wire.
5539            ///
5540            /// **Not part of the public API.**
5541            #[doc(hidden)]
5542            pub fn _merge_into_view(
5543                &mut self,
5544                buf: &'a [u8],
5545                depth: u32,
5546            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5547                let _ = depth;
5548                #[allow(unused_variables)]
5549                let view = self;
5550                let mut cur: &'a [u8] = buf;
5551                while !cur.is_empty() {
5552                    let before_tag = cur;
5553                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5554                    match tag.field_number() {
5555                        1u32 => {
5556                            if tag.wire_type()
5557                                != ::buffa::encoding::WireType::LengthDelimited
5558                            {
5559                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5560                                    field_number: 1u32,
5561                                    expected: 2u8,
5562                                    actual: tag.wire_type() as u8,
5563                                });
5564                            }
5565                            view.table_id = ::buffa::types::borrow_str(&mut cur)?;
5566                        }
5567                        2u32 => {
5568                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5569                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5570                                    field_number: 2u32,
5571                                    expected: 0u8,
5572                                    actual: tag.wire_type() as u8,
5573                                });
5574                            }
5575                            view.operation = ::buffa::EnumValue::from(
5576                                ::buffa::types::decode_int32(&mut cur)?,
5577                            );
5578                        }
5579                        _ => {
5580                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5581                            let span_len = before_tag.len() - cur.len();
5582                            view.__buffa_unknown_fields
5583                                .push_raw(&before_tag[..span_len]);
5584                        }
5585                    }
5586                }
5587                ::core::result::Result::Ok(())
5588            }
5589        }
5590        impl<'a> ::buffa::MessageView<'a>
5591        for GenerateTemporaryTableCredentialsRequestView<'a> {
5592            type Owned = super::super::GenerateTemporaryTableCredentialsRequest;
5593            fn decode_view(
5594                buf: &'a [u8],
5595            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5596                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5597            }
5598            fn decode_view_with_limit(
5599                buf: &'a [u8],
5600                depth: u32,
5601            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5602                Self::_decode_depth(buf, depth)
5603            }
5604            fn to_owned_message(
5605                &self,
5606            ) -> super::super::GenerateTemporaryTableCredentialsRequest {
5607                self.to_owned_from_source(None)
5608            }
5609            #[allow(clippy::useless_conversion, clippy::needless_update)]
5610            fn to_owned_from_source(
5611                &self,
5612                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5613            ) -> super::super::GenerateTemporaryTableCredentialsRequest {
5614                #[allow(unused_imports)]
5615                use ::buffa::alloc::string::ToString as _;
5616                let _ = __buffa_src;
5617                super::super::GenerateTemporaryTableCredentialsRequest {
5618                    table_id: self.table_id.to_string(),
5619                    operation: self.operation,
5620                    __buffa_unknown_fields: self
5621                        .__buffa_unknown_fields
5622                        .to_owned()
5623                        .unwrap_or_default()
5624                        .into(),
5625                    ..::core::default::Default::default()
5626                }
5627            }
5628        }
5629        impl<'a> ::buffa::ViewEncode<'a>
5630        for GenerateTemporaryTableCredentialsRequestView<'a> {
5631            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5632            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5633                #[allow(unused_imports)]
5634                use ::buffa::Enumeration as _;
5635                let mut size = 0u32;
5636                if !self.table_id.is_empty() {
5637                    size
5638                        += 1u32
5639                            + ::buffa::types::string_encoded_len(&self.table_id) as u32;
5640                }
5641                {
5642                    let val = self.operation.to_i32();
5643                    if val != 0 {
5644                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5645                    }
5646                }
5647                size += self.__buffa_unknown_fields.encoded_len() as u32;
5648                size
5649            }
5650            #[allow(clippy::needless_borrow)]
5651            fn write_to(
5652                &self,
5653                _cache: &mut ::buffa::SizeCache,
5654                buf: &mut impl ::buffa::bytes::BufMut,
5655            ) {
5656                #[allow(unused_imports)]
5657                use ::buffa::Enumeration as _;
5658                if !self.table_id.is_empty() {
5659                    ::buffa::encoding::Tag::new(
5660                            1u32,
5661                            ::buffa::encoding::WireType::LengthDelimited,
5662                        )
5663                        .encode(buf);
5664                    ::buffa::types::encode_string(&self.table_id, buf);
5665                }
5666                {
5667                    let val = self.operation.to_i32();
5668                    if val != 0 {
5669                        ::buffa::encoding::Tag::new(
5670                                2u32,
5671                                ::buffa::encoding::WireType::Varint,
5672                            )
5673                            .encode(buf);
5674                        ::buffa::types::encode_int32(val, buf);
5675                    }
5676                }
5677                self.__buffa_unknown_fields.write_to(buf);
5678            }
5679        }
5680        /// Serializes this view as protobuf JSON.
5681        ///
5682        /// Implicit-presence fields with default values are omitted, `required`
5683        /// fields are always emitted, explicit-presence (`optional`) fields are
5684        /// emitted only when set, bytes fields are base64-encoded, and enum
5685        /// values are their proto name strings.
5686        ///
5687        /// This impl uses `serialize_map(None)` because the number of emitted
5688        /// fields depends on default-omission rules; serializers that require
5689        /// known map lengths (e.g. `bincode`) will return a runtime error.
5690        /// Use the owned message type for those formats.
5691        impl<'__a> ::serde::Serialize
5692        for GenerateTemporaryTableCredentialsRequestView<'__a> {
5693            fn serialize<__S: ::serde::Serializer>(
5694                &self,
5695                __s: __S,
5696            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5697                use ::serde::ser::SerializeMap as _;
5698                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5699                if !::buffa::json_helpers::skip_if::is_empty_str(self.table_id) {
5700                    __map.serialize_entry("table_id", self.table_id)?;
5701                }
5702                if !::buffa::json_helpers::skip_if::is_default_enum_value(
5703                    &self.operation,
5704                ) {
5705                    __map.serialize_entry("operation", &self.operation)?;
5706                }
5707                __map.end()
5708            }
5709        }
5710        impl<'a> ::buffa::MessageName
5711        for GenerateTemporaryTableCredentialsRequestView<'a> {
5712            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
5713            const NAME: &'static str = "GenerateTemporaryTableCredentialsRequest";
5714            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryTableCredentialsRequest";
5715            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryTableCredentialsRequest";
5716        }
5717        impl<'v> ::buffa::DefaultViewInstance
5718        for GenerateTemporaryTableCredentialsRequestView<'v> {
5719            fn default_view_instance<'a>() -> &'a Self
5720            where
5721                Self: 'a,
5722            {
5723                static VALUE: ::buffa::__private::OnceBox<
5724                    GenerateTemporaryTableCredentialsRequestView<'static>,
5725                > = ::buffa::__private::OnceBox::new();
5726                VALUE
5727                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5728                        <GenerateTemporaryTableCredentialsRequestView<
5729                            'static,
5730                        >>::default(),
5731                    ))
5732            }
5733        }
5734        impl ::buffa::ViewReborrow
5735        for GenerateTemporaryTableCredentialsRequestView<'static> {
5736            type Reborrowed<'b> = GenerateTemporaryTableCredentialsRequestView<'b>;
5737            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5738                this
5739            }
5740        }
5741        /** Self-contained, `'static` owned view of a `GenerateTemporaryTableCredentialsRequest` message.
5742
5743 Wraps [`::buffa::OwnedView`]`<`[`GenerateTemporaryTableCredentialsRequestView`]`<'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.
5744
5745 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GenerateTemporaryTableCredentialsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5746        #[derive(Clone, Debug)]
5747        pub struct GenerateTemporaryTableCredentialsRequestOwnedView(
5748            ::buffa::OwnedView<GenerateTemporaryTableCredentialsRequestView<'static>>,
5749        );
5750        impl GenerateTemporaryTableCredentialsRequestOwnedView {
5751            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5752            ///
5753            /// The view borrows directly from the buffer's data; the buffer is
5754            /// retained inside the returned handle.
5755            ///
5756            /// # Errors
5757            ///
5758            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5759            /// protobuf data.
5760            pub fn decode(
5761                bytes: ::buffa::bytes::Bytes,
5762            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5763                ::core::result::Result::Ok(
5764                    GenerateTemporaryTableCredentialsRequestOwnedView(
5765                        ::buffa::OwnedView::decode(bytes)?,
5766                    ),
5767                )
5768            }
5769            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5770            /// max message size).
5771            ///
5772            /// # Errors
5773            ///
5774            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5775            /// exceeds the configured limits.
5776            pub fn decode_with_options(
5777                bytes: ::buffa::bytes::Bytes,
5778                opts: &::buffa::DecodeOptions,
5779            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5780                ::core::result::Result::Ok(
5781                    GenerateTemporaryTableCredentialsRequestOwnedView(
5782                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5783                    ),
5784                )
5785            }
5786            /// Build from an owned message via an encode → decode round-trip.
5787            ///
5788            /// # Errors
5789            ///
5790            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5791            /// somehow invalid (should not happen for well-formed messages).
5792            pub fn from_owned(
5793                msg: &super::super::GenerateTemporaryTableCredentialsRequest,
5794            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5795                ::core::result::Result::Ok(
5796                    GenerateTemporaryTableCredentialsRequestOwnedView(
5797                        ::buffa::OwnedView::from_owned(msg)?,
5798                    ),
5799                )
5800            }
5801            /// Borrow the full [`GenerateTemporaryTableCredentialsRequestView`] with its lifetime tied to `&self`.
5802            #[must_use]
5803            pub fn view(&self) -> &GenerateTemporaryTableCredentialsRequestView<'_> {
5804                self.0.reborrow()
5805            }
5806            /// Convert to the owned message type.
5807            #[must_use]
5808            pub fn to_owned_message(
5809                &self,
5810            ) -> super::super::GenerateTemporaryTableCredentialsRequest {
5811                self.0.to_owned_message()
5812            }
5813            /// The underlying bytes buffer.
5814            #[must_use]
5815            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5816                self.0.bytes()
5817            }
5818            /// Consume the handle, returning the underlying bytes buffer.
5819            #[must_use]
5820            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5821                self.0.into_bytes()
5822            }
5823            /// UUID of the table to read or write.
5824            ///
5825            /// Field 1: `table_id`
5826            #[must_use]
5827            pub fn table_id(&self) -> &'_ str {
5828                self.0.reborrow().table_id
5829            }
5830            /// The operation performed against the table data, either READ or READ_WRITE.
5831            /// If READ_WRITE is specified, the credentials returned will have write
5832            /// permissions, otherwise, it will be read only.
5833            ///
5834            /// Field 2: `operation`
5835            #[must_use]
5836            pub fn operation(
5837                &self,
5838            ) -> ::buffa::EnumValue<
5839                super::super::generate_temporary_table_credentials_request::Operation,
5840            > {
5841                self.0.reborrow().operation
5842            }
5843        }
5844        impl ::core::convert::From<
5845            ::buffa::OwnedView<GenerateTemporaryTableCredentialsRequestView<'static>>,
5846        > for GenerateTemporaryTableCredentialsRequestOwnedView {
5847            fn from(
5848                inner: ::buffa::OwnedView<
5849                    GenerateTemporaryTableCredentialsRequestView<'static>,
5850                >,
5851            ) -> Self {
5852                GenerateTemporaryTableCredentialsRequestOwnedView(inner)
5853            }
5854        }
5855        impl ::core::convert::From<GenerateTemporaryTableCredentialsRequestOwnedView>
5856        for ::buffa::OwnedView<GenerateTemporaryTableCredentialsRequestView<'static>> {
5857            fn from(wrapper: GenerateTemporaryTableCredentialsRequestOwnedView) -> Self {
5858                wrapper.0
5859            }
5860        }
5861        impl ::core::convert::AsRef<
5862            ::buffa::OwnedView<GenerateTemporaryTableCredentialsRequestView<'static>>,
5863        > for GenerateTemporaryTableCredentialsRequestOwnedView {
5864            fn as_ref(
5865                &self,
5866            ) -> &::buffa::OwnedView<
5867                GenerateTemporaryTableCredentialsRequestView<'static>,
5868            > {
5869                &self.0
5870            }
5871        }
5872        impl ::buffa::HasMessageView
5873        for super::super::GenerateTemporaryTableCredentialsRequest {
5874            type View<'a> = GenerateTemporaryTableCredentialsRequestView<'a>;
5875            type ViewHandle = GenerateTemporaryTableCredentialsRequestOwnedView;
5876        }
5877        impl ::serde::Serialize for GenerateTemporaryTableCredentialsRequestOwnedView {
5878            fn serialize<__S: ::serde::Serializer>(
5879                &self,
5880                __s: __S,
5881            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5882                ::serde::Serialize::serialize(&self.0, __s)
5883            }
5884        }
5885        /// Generate a new set of credentials for a volume.
5886        #[derive(Clone, Debug, Default)]
5887        pub struct GenerateTemporaryVolumeCredentialsRequestView<'a> {
5888            /// UUID of the volume to read or write.
5889            ///
5890            /// Field 1: `volume_id`
5891            pub volume_id: &'a str,
5892            /// The operation performed against the volume data, either READ_VOLUME or
5893            /// WRITE_VOLUME. If WRITE_VOLUME is specified, the credentials returned will
5894            /// have write permissions, otherwise, it will be read only.
5895            ///
5896            /// Field 2: `operation`
5897            pub operation: ::buffa::EnumValue<
5898                super::super::generate_temporary_volume_credentials_request::Operation,
5899            >,
5900            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5901        }
5902        impl<'a> GenerateTemporaryVolumeCredentialsRequestView<'a> {
5903            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5904            ///
5905            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5906            /// and by generated sub-message decode arms with `depth - 1`.
5907            ///
5908            /// **Not part of the public API.** Named with a leading underscore to
5909            /// signal that it is for generated-code use only.
5910            #[doc(hidden)]
5911            pub fn _decode_depth(
5912                buf: &'a [u8],
5913                depth: u32,
5914            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5915                let mut view = Self::default();
5916                view._merge_into_view(buf, depth)?;
5917                ::core::result::Result::Ok(view)
5918            }
5919            /// Merge fields from `buf` into this view (proto merge semantics).
5920            ///
5921            /// Repeated fields append; singular fields last-wins; singular
5922            /// MESSAGE fields merge recursively. Used by sub-message decode
5923            /// arms when the same field appears multiple times on the wire.
5924            ///
5925            /// **Not part of the public API.**
5926            #[doc(hidden)]
5927            pub fn _merge_into_view(
5928                &mut self,
5929                buf: &'a [u8],
5930                depth: u32,
5931            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5932                let _ = depth;
5933                #[allow(unused_variables)]
5934                let view = self;
5935                let mut cur: &'a [u8] = buf;
5936                while !cur.is_empty() {
5937                    let before_tag = cur;
5938                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5939                    match tag.field_number() {
5940                        1u32 => {
5941                            if tag.wire_type()
5942                                != ::buffa::encoding::WireType::LengthDelimited
5943                            {
5944                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5945                                    field_number: 1u32,
5946                                    expected: 2u8,
5947                                    actual: tag.wire_type() as u8,
5948                                });
5949                            }
5950                            view.volume_id = ::buffa::types::borrow_str(&mut cur)?;
5951                        }
5952                        2u32 => {
5953                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
5954                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5955                                    field_number: 2u32,
5956                                    expected: 0u8,
5957                                    actual: tag.wire_type() as u8,
5958                                });
5959                            }
5960                            view.operation = ::buffa::EnumValue::from(
5961                                ::buffa::types::decode_int32(&mut cur)?,
5962                            );
5963                        }
5964                        _ => {
5965                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5966                            let span_len = before_tag.len() - cur.len();
5967                            view.__buffa_unknown_fields
5968                                .push_raw(&before_tag[..span_len]);
5969                        }
5970                    }
5971                }
5972                ::core::result::Result::Ok(())
5973            }
5974        }
5975        impl<'a> ::buffa::MessageView<'a>
5976        for GenerateTemporaryVolumeCredentialsRequestView<'a> {
5977            type Owned = super::super::GenerateTemporaryVolumeCredentialsRequest;
5978            fn decode_view(
5979                buf: &'a [u8],
5980            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5981                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5982            }
5983            fn decode_view_with_limit(
5984                buf: &'a [u8],
5985                depth: u32,
5986            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5987                Self::_decode_depth(buf, depth)
5988            }
5989            fn to_owned_message(
5990                &self,
5991            ) -> super::super::GenerateTemporaryVolumeCredentialsRequest {
5992                self.to_owned_from_source(None)
5993            }
5994            #[allow(clippy::useless_conversion, clippy::needless_update)]
5995            fn to_owned_from_source(
5996                &self,
5997                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5998            ) -> super::super::GenerateTemporaryVolumeCredentialsRequest {
5999                #[allow(unused_imports)]
6000                use ::buffa::alloc::string::ToString as _;
6001                let _ = __buffa_src;
6002                super::super::GenerateTemporaryVolumeCredentialsRequest {
6003                    volume_id: self.volume_id.to_string(),
6004                    operation: self.operation,
6005                    __buffa_unknown_fields: self
6006                        .__buffa_unknown_fields
6007                        .to_owned()
6008                        .unwrap_or_default()
6009                        .into(),
6010                    ..::core::default::Default::default()
6011                }
6012            }
6013        }
6014        impl<'a> ::buffa::ViewEncode<'a>
6015        for GenerateTemporaryVolumeCredentialsRequestView<'a> {
6016            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6017            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6018                #[allow(unused_imports)]
6019                use ::buffa::Enumeration as _;
6020                let mut size = 0u32;
6021                if !self.volume_id.is_empty() {
6022                    size
6023                        += 1u32
6024                            + ::buffa::types::string_encoded_len(&self.volume_id) as u32;
6025                }
6026                {
6027                    let val = self.operation.to_i32();
6028                    if val != 0 {
6029                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6030                    }
6031                }
6032                size += self.__buffa_unknown_fields.encoded_len() as u32;
6033                size
6034            }
6035            #[allow(clippy::needless_borrow)]
6036            fn write_to(
6037                &self,
6038                _cache: &mut ::buffa::SizeCache,
6039                buf: &mut impl ::buffa::bytes::BufMut,
6040            ) {
6041                #[allow(unused_imports)]
6042                use ::buffa::Enumeration as _;
6043                if !self.volume_id.is_empty() {
6044                    ::buffa::encoding::Tag::new(
6045                            1u32,
6046                            ::buffa::encoding::WireType::LengthDelimited,
6047                        )
6048                        .encode(buf);
6049                    ::buffa::types::encode_string(&self.volume_id, buf);
6050                }
6051                {
6052                    let val = self.operation.to_i32();
6053                    if val != 0 {
6054                        ::buffa::encoding::Tag::new(
6055                                2u32,
6056                                ::buffa::encoding::WireType::Varint,
6057                            )
6058                            .encode(buf);
6059                        ::buffa::types::encode_int32(val, buf);
6060                    }
6061                }
6062                self.__buffa_unknown_fields.write_to(buf);
6063            }
6064        }
6065        /// Serializes this view as protobuf JSON.
6066        ///
6067        /// Implicit-presence fields with default values are omitted, `required`
6068        /// fields are always emitted, explicit-presence (`optional`) fields are
6069        /// emitted only when set, bytes fields are base64-encoded, and enum
6070        /// values are their proto name strings.
6071        ///
6072        /// This impl uses `serialize_map(None)` because the number of emitted
6073        /// fields depends on default-omission rules; serializers that require
6074        /// known map lengths (e.g. `bincode`) will return a runtime error.
6075        /// Use the owned message type for those formats.
6076        impl<'__a> ::serde::Serialize
6077        for GenerateTemporaryVolumeCredentialsRequestView<'__a> {
6078            fn serialize<__S: ::serde::Serializer>(
6079                &self,
6080                __s: __S,
6081            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6082                use ::serde::ser::SerializeMap as _;
6083                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6084                if !::buffa::json_helpers::skip_if::is_empty_str(self.volume_id) {
6085                    __map.serialize_entry("volume_id", self.volume_id)?;
6086                }
6087                if !::buffa::json_helpers::skip_if::is_default_enum_value(
6088                    &self.operation,
6089                ) {
6090                    __map.serialize_entry("operation", &self.operation)?;
6091                }
6092                __map.end()
6093            }
6094        }
6095        impl<'a> ::buffa::MessageName
6096        for GenerateTemporaryVolumeCredentialsRequestView<'a> {
6097            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
6098            const NAME: &'static str = "GenerateTemporaryVolumeCredentialsRequest";
6099            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryVolumeCredentialsRequest";
6100            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryVolumeCredentialsRequest";
6101        }
6102        impl<'v> ::buffa::DefaultViewInstance
6103        for GenerateTemporaryVolumeCredentialsRequestView<'v> {
6104            fn default_view_instance<'a>() -> &'a Self
6105            where
6106                Self: 'a,
6107            {
6108                static VALUE: ::buffa::__private::OnceBox<
6109                    GenerateTemporaryVolumeCredentialsRequestView<'static>,
6110                > = ::buffa::__private::OnceBox::new();
6111                VALUE
6112                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6113                        <GenerateTemporaryVolumeCredentialsRequestView<
6114                            'static,
6115                        >>::default(),
6116                    ))
6117            }
6118        }
6119        impl ::buffa::ViewReborrow
6120        for GenerateTemporaryVolumeCredentialsRequestView<'static> {
6121            type Reborrowed<'b> = GenerateTemporaryVolumeCredentialsRequestView<'b>;
6122            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6123                this
6124            }
6125        }
6126        /** Self-contained, `'static` owned view of a `GenerateTemporaryVolumeCredentialsRequest` message.
6127
6128 Wraps [`::buffa::OwnedView`]`<`[`GenerateTemporaryVolumeCredentialsRequestView`]`<'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.
6129
6130 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GenerateTemporaryVolumeCredentialsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6131        #[derive(Clone, Debug)]
6132        pub struct GenerateTemporaryVolumeCredentialsRequestOwnedView(
6133            ::buffa::OwnedView<GenerateTemporaryVolumeCredentialsRequestView<'static>>,
6134        );
6135        impl GenerateTemporaryVolumeCredentialsRequestOwnedView {
6136            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6137            ///
6138            /// The view borrows directly from the buffer's data; the buffer is
6139            /// retained inside the returned handle.
6140            ///
6141            /// # Errors
6142            ///
6143            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6144            /// protobuf data.
6145            pub fn decode(
6146                bytes: ::buffa::bytes::Bytes,
6147            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6148                ::core::result::Result::Ok(
6149                    GenerateTemporaryVolumeCredentialsRequestOwnedView(
6150                        ::buffa::OwnedView::decode(bytes)?,
6151                    ),
6152                )
6153            }
6154            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6155            /// max message size).
6156            ///
6157            /// # Errors
6158            ///
6159            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6160            /// exceeds the configured limits.
6161            pub fn decode_with_options(
6162                bytes: ::buffa::bytes::Bytes,
6163                opts: &::buffa::DecodeOptions,
6164            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6165                ::core::result::Result::Ok(
6166                    GenerateTemporaryVolumeCredentialsRequestOwnedView(
6167                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6168                    ),
6169                )
6170            }
6171            /// Build from an owned message via an encode → decode round-trip.
6172            ///
6173            /// # Errors
6174            ///
6175            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6176            /// somehow invalid (should not happen for well-formed messages).
6177            pub fn from_owned(
6178                msg: &super::super::GenerateTemporaryVolumeCredentialsRequest,
6179            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6180                ::core::result::Result::Ok(
6181                    GenerateTemporaryVolumeCredentialsRequestOwnedView(
6182                        ::buffa::OwnedView::from_owned(msg)?,
6183                    ),
6184                )
6185            }
6186            /// Borrow the full [`GenerateTemporaryVolumeCredentialsRequestView`] with its lifetime tied to `&self`.
6187            #[must_use]
6188            pub fn view(&self) -> &GenerateTemporaryVolumeCredentialsRequestView<'_> {
6189                self.0.reborrow()
6190            }
6191            /// Convert to the owned message type.
6192            #[must_use]
6193            pub fn to_owned_message(
6194                &self,
6195            ) -> super::super::GenerateTemporaryVolumeCredentialsRequest {
6196                self.0.to_owned_message()
6197            }
6198            /// The underlying bytes buffer.
6199            #[must_use]
6200            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6201                self.0.bytes()
6202            }
6203            /// Consume the handle, returning the underlying bytes buffer.
6204            #[must_use]
6205            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6206                self.0.into_bytes()
6207            }
6208            /// UUID of the volume to read or write.
6209            ///
6210            /// Field 1: `volume_id`
6211            #[must_use]
6212            pub fn volume_id(&self) -> &'_ str {
6213                self.0.reborrow().volume_id
6214            }
6215            /// The operation performed against the volume data, either READ_VOLUME or
6216            /// WRITE_VOLUME. If WRITE_VOLUME is specified, the credentials returned will
6217            /// have write permissions, otherwise, it will be read only.
6218            ///
6219            /// Field 2: `operation`
6220            #[must_use]
6221            pub fn operation(
6222                &self,
6223            ) -> ::buffa::EnumValue<
6224                super::super::generate_temporary_volume_credentials_request::Operation,
6225            > {
6226                self.0.reborrow().operation
6227            }
6228        }
6229        impl ::core::convert::From<
6230            ::buffa::OwnedView<GenerateTemporaryVolumeCredentialsRequestView<'static>>,
6231        > for GenerateTemporaryVolumeCredentialsRequestOwnedView {
6232            fn from(
6233                inner: ::buffa::OwnedView<
6234                    GenerateTemporaryVolumeCredentialsRequestView<'static>,
6235                >,
6236            ) -> Self {
6237                GenerateTemporaryVolumeCredentialsRequestOwnedView(inner)
6238            }
6239        }
6240        impl ::core::convert::From<GenerateTemporaryVolumeCredentialsRequestOwnedView>
6241        for ::buffa::OwnedView<GenerateTemporaryVolumeCredentialsRequestView<'static>> {
6242            fn from(
6243                wrapper: GenerateTemporaryVolumeCredentialsRequestOwnedView,
6244            ) -> Self {
6245                wrapper.0
6246            }
6247        }
6248        impl ::core::convert::AsRef<
6249            ::buffa::OwnedView<GenerateTemporaryVolumeCredentialsRequestView<'static>>,
6250        > for GenerateTemporaryVolumeCredentialsRequestOwnedView {
6251            fn as_ref(
6252                &self,
6253            ) -> &::buffa::OwnedView<
6254                GenerateTemporaryVolumeCredentialsRequestView<'static>,
6255            > {
6256                &self.0
6257            }
6258        }
6259        impl ::buffa::HasMessageView
6260        for super::super::GenerateTemporaryVolumeCredentialsRequest {
6261            type View<'a> = GenerateTemporaryVolumeCredentialsRequestView<'a>;
6262            type ViewHandle = GenerateTemporaryVolumeCredentialsRequestOwnedView;
6263        }
6264        impl ::serde::Serialize for GenerateTemporaryVolumeCredentialsRequestOwnedView {
6265            fn serialize<__S: ::serde::Serializer>(
6266                &self,
6267                __s: __S,
6268            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6269                ::serde::Serialize::serialize(&self.0, __s)
6270            }
6271        }
6272        /// Generate a new set of credentials for a path.
6273        #[derive(Clone, Debug, Default)]
6274        pub struct GenerateTemporaryPathCredentialsRequestView<'a> {
6275            /// URL for path-based access.
6276            ///
6277            /// Field 1: `url`
6278            pub url: &'a str,
6279            /// The operation being performed on the path.
6280            ///
6281            /// Field 2: `operation`
6282            pub operation: ::buffa::EnumValue<
6283                super::super::generate_temporary_path_credentials_request::Operation,
6284            >,
6285            /// When set to true, the service will not validate that the generated
6286            /// credentials can perform write operations, therefore no new paths will be
6287            /// created and the response will not contain valid credentials. Defaults to false.
6288            ///
6289            /// Field 3: `dry_run`
6290            pub dry_run: ::core::option::Option<bool>,
6291            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6292        }
6293        impl<'a> GenerateTemporaryPathCredentialsRequestView<'a> {
6294            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
6295            ///
6296            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
6297            /// and by generated sub-message decode arms with `depth - 1`.
6298            ///
6299            /// **Not part of the public API.** Named with a leading underscore to
6300            /// signal that it is for generated-code use only.
6301            #[doc(hidden)]
6302            pub fn _decode_depth(
6303                buf: &'a [u8],
6304                depth: u32,
6305            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6306                let mut view = Self::default();
6307                view._merge_into_view(buf, depth)?;
6308                ::core::result::Result::Ok(view)
6309            }
6310            /// Merge fields from `buf` into this view (proto merge semantics).
6311            ///
6312            /// Repeated fields append; singular fields last-wins; singular
6313            /// MESSAGE fields merge recursively. Used by sub-message decode
6314            /// arms when the same field appears multiple times on the wire.
6315            ///
6316            /// **Not part of the public API.**
6317            #[doc(hidden)]
6318            pub fn _merge_into_view(
6319                &mut self,
6320                buf: &'a [u8],
6321                depth: u32,
6322            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6323                let _ = depth;
6324                #[allow(unused_variables)]
6325                let view = self;
6326                let mut cur: &'a [u8] = buf;
6327                while !cur.is_empty() {
6328                    let before_tag = cur;
6329                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6330                    match tag.field_number() {
6331                        1u32 => {
6332                            if tag.wire_type()
6333                                != ::buffa::encoding::WireType::LengthDelimited
6334                            {
6335                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6336                                    field_number: 1u32,
6337                                    expected: 2u8,
6338                                    actual: tag.wire_type() as u8,
6339                                });
6340                            }
6341                            view.url = ::buffa::types::borrow_str(&mut cur)?;
6342                        }
6343                        2u32 => {
6344                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6345                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6346                                    field_number: 2u32,
6347                                    expected: 0u8,
6348                                    actual: tag.wire_type() as u8,
6349                                });
6350                            }
6351                            view.operation = ::buffa::EnumValue::from(
6352                                ::buffa::types::decode_int32(&mut cur)?,
6353                            );
6354                        }
6355                        3u32 => {
6356                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6357                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6358                                    field_number: 3u32,
6359                                    expected: 0u8,
6360                                    actual: tag.wire_type() as u8,
6361                                });
6362                            }
6363                            view.dry_run = Some(::buffa::types::decode_bool(&mut cur)?);
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>
6377        for GenerateTemporaryPathCredentialsRequestView<'a> {
6378            type Owned = super::super::GenerateTemporaryPathCredentialsRequest;
6379            fn decode_view(
6380                buf: &'a [u8],
6381            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6382                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6383            }
6384            fn decode_view_with_limit(
6385                buf: &'a [u8],
6386                depth: u32,
6387            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6388                Self::_decode_depth(buf, depth)
6389            }
6390            fn to_owned_message(
6391                &self,
6392            ) -> super::super::GenerateTemporaryPathCredentialsRequest {
6393                self.to_owned_from_source(None)
6394            }
6395            #[allow(clippy::useless_conversion, clippy::needless_update)]
6396            fn to_owned_from_source(
6397                &self,
6398                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6399            ) -> super::super::GenerateTemporaryPathCredentialsRequest {
6400                #[allow(unused_imports)]
6401                use ::buffa::alloc::string::ToString as _;
6402                let _ = __buffa_src;
6403                super::super::GenerateTemporaryPathCredentialsRequest {
6404                    url: self.url.to_string(),
6405                    operation: self.operation,
6406                    dry_run: self.dry_run,
6407                    __buffa_unknown_fields: self
6408                        .__buffa_unknown_fields
6409                        .to_owned()
6410                        .unwrap_or_default()
6411                        .into(),
6412                    ..::core::default::Default::default()
6413                }
6414            }
6415        }
6416        impl<'a> ::buffa::ViewEncode<'a>
6417        for GenerateTemporaryPathCredentialsRequestView<'a> {
6418            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6419            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6420                #[allow(unused_imports)]
6421                use ::buffa::Enumeration as _;
6422                let mut size = 0u32;
6423                if !self.url.is_empty() {
6424                    size += 1u32 + ::buffa::types::string_encoded_len(&self.url) as u32;
6425                }
6426                {
6427                    let val = self.operation.to_i32();
6428                    if val != 0 {
6429                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6430                    }
6431                }
6432                if self.dry_run.is_some() {
6433                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
6434                }
6435                size += self.__buffa_unknown_fields.encoded_len() as u32;
6436                size
6437            }
6438            #[allow(clippy::needless_borrow)]
6439            fn write_to(
6440                &self,
6441                _cache: &mut ::buffa::SizeCache,
6442                buf: &mut impl ::buffa::bytes::BufMut,
6443            ) {
6444                #[allow(unused_imports)]
6445                use ::buffa::Enumeration as _;
6446                if !self.url.is_empty() {
6447                    ::buffa::encoding::Tag::new(
6448                            1u32,
6449                            ::buffa::encoding::WireType::LengthDelimited,
6450                        )
6451                        .encode(buf);
6452                    ::buffa::types::encode_string(&self.url, buf);
6453                }
6454                {
6455                    let val = self.operation.to_i32();
6456                    if val != 0 {
6457                        ::buffa::encoding::Tag::new(
6458                                2u32,
6459                                ::buffa::encoding::WireType::Varint,
6460                            )
6461                            .encode(buf);
6462                        ::buffa::types::encode_int32(val, buf);
6463                    }
6464                }
6465                if let Some(v) = self.dry_run {
6466                    ::buffa::encoding::Tag::new(
6467                            3u32,
6468                            ::buffa::encoding::WireType::Varint,
6469                        )
6470                        .encode(buf);
6471                    ::buffa::types::encode_bool(v, buf);
6472                }
6473                self.__buffa_unknown_fields.write_to(buf);
6474            }
6475        }
6476        /// Serializes this view as protobuf JSON.
6477        ///
6478        /// Implicit-presence fields with default values are omitted, `required`
6479        /// fields are always emitted, explicit-presence (`optional`) fields are
6480        /// emitted only when set, bytes fields are base64-encoded, and enum
6481        /// values are their proto name strings.
6482        ///
6483        /// This impl uses `serialize_map(None)` because the number of emitted
6484        /// fields depends on default-omission rules; serializers that require
6485        /// known map lengths (e.g. `bincode`) will return a runtime error.
6486        /// Use the owned message type for those formats.
6487        impl<'__a> ::serde::Serialize
6488        for GenerateTemporaryPathCredentialsRequestView<'__a> {
6489            fn serialize<__S: ::serde::Serializer>(
6490                &self,
6491                __s: __S,
6492            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6493                use ::serde::ser::SerializeMap as _;
6494                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6495                if !::buffa::json_helpers::skip_if::is_empty_str(self.url) {
6496                    __map.serialize_entry("url", self.url)?;
6497                }
6498                if !::buffa::json_helpers::skip_if::is_default_enum_value(
6499                    &self.operation,
6500                ) {
6501                    __map.serialize_entry("operation", &self.operation)?;
6502                }
6503                if let ::core::option::Option::Some(__v) = self.dry_run {
6504                    __map.serialize_entry("dry_run", &__v)?;
6505                }
6506                __map.end()
6507            }
6508        }
6509        impl<'a> ::buffa::MessageName
6510        for GenerateTemporaryPathCredentialsRequestView<'a> {
6511            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
6512            const NAME: &'static str = "GenerateTemporaryPathCredentialsRequest";
6513            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryPathCredentialsRequest";
6514            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryPathCredentialsRequest";
6515        }
6516        impl<'v> ::buffa::DefaultViewInstance
6517        for GenerateTemporaryPathCredentialsRequestView<'v> {
6518            fn default_view_instance<'a>() -> &'a Self
6519            where
6520                Self: 'a,
6521            {
6522                static VALUE: ::buffa::__private::OnceBox<
6523                    GenerateTemporaryPathCredentialsRequestView<'static>,
6524                > = ::buffa::__private::OnceBox::new();
6525                VALUE
6526                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6527                        <GenerateTemporaryPathCredentialsRequestView<'static>>::default(),
6528                    ))
6529            }
6530        }
6531        impl ::buffa::ViewReborrow
6532        for GenerateTemporaryPathCredentialsRequestView<'static> {
6533            type Reborrowed<'b> = GenerateTemporaryPathCredentialsRequestView<'b>;
6534            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6535                this
6536            }
6537        }
6538        /** Self-contained, `'static` owned view of a `GenerateTemporaryPathCredentialsRequest` message.
6539
6540 Wraps [`::buffa::OwnedView`]`<`[`GenerateTemporaryPathCredentialsRequestView`]`<'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.
6541
6542 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GenerateTemporaryPathCredentialsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6543        #[derive(Clone, Debug)]
6544        pub struct GenerateTemporaryPathCredentialsRequestOwnedView(
6545            ::buffa::OwnedView<GenerateTemporaryPathCredentialsRequestView<'static>>,
6546        );
6547        impl GenerateTemporaryPathCredentialsRequestOwnedView {
6548            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6549            ///
6550            /// The view borrows directly from the buffer's data; the buffer is
6551            /// retained inside the returned handle.
6552            ///
6553            /// # Errors
6554            ///
6555            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6556            /// protobuf data.
6557            pub fn decode(
6558                bytes: ::buffa::bytes::Bytes,
6559            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6560                ::core::result::Result::Ok(
6561                    GenerateTemporaryPathCredentialsRequestOwnedView(
6562                        ::buffa::OwnedView::decode(bytes)?,
6563                    ),
6564                )
6565            }
6566            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6567            /// max message size).
6568            ///
6569            /// # Errors
6570            ///
6571            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6572            /// exceeds the configured limits.
6573            pub fn decode_with_options(
6574                bytes: ::buffa::bytes::Bytes,
6575                opts: &::buffa::DecodeOptions,
6576            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6577                ::core::result::Result::Ok(
6578                    GenerateTemporaryPathCredentialsRequestOwnedView(
6579                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6580                    ),
6581                )
6582            }
6583            /// Build from an owned message via an encode → decode round-trip.
6584            ///
6585            /// # Errors
6586            ///
6587            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6588            /// somehow invalid (should not happen for well-formed messages).
6589            pub fn from_owned(
6590                msg: &super::super::GenerateTemporaryPathCredentialsRequest,
6591            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6592                ::core::result::Result::Ok(
6593                    GenerateTemporaryPathCredentialsRequestOwnedView(
6594                        ::buffa::OwnedView::from_owned(msg)?,
6595                    ),
6596                )
6597            }
6598            /// Borrow the full [`GenerateTemporaryPathCredentialsRequestView`] with its lifetime tied to `&self`.
6599            #[must_use]
6600            pub fn view(&self) -> &GenerateTemporaryPathCredentialsRequestView<'_> {
6601                self.0.reborrow()
6602            }
6603            /// Convert to the owned message type.
6604            #[must_use]
6605            pub fn to_owned_message(
6606                &self,
6607            ) -> super::super::GenerateTemporaryPathCredentialsRequest {
6608                self.0.to_owned_message()
6609            }
6610            /// The underlying bytes buffer.
6611            #[must_use]
6612            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6613                self.0.bytes()
6614            }
6615            /// Consume the handle, returning the underlying bytes buffer.
6616            #[must_use]
6617            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6618                self.0.into_bytes()
6619            }
6620            /// URL for path-based access.
6621            ///
6622            /// Field 1: `url`
6623            #[must_use]
6624            pub fn url(&self) -> &'_ str {
6625                self.0.reborrow().url
6626            }
6627            /// The operation being performed on the path.
6628            ///
6629            /// Field 2: `operation`
6630            #[must_use]
6631            pub fn operation(
6632                &self,
6633            ) -> ::buffa::EnumValue<
6634                super::super::generate_temporary_path_credentials_request::Operation,
6635            > {
6636                self.0.reborrow().operation
6637            }
6638            /// When set to true, the service will not validate that the generated
6639            /// credentials can perform write operations, therefore no new paths will be
6640            /// created and the response will not contain valid credentials. Defaults to false.
6641            ///
6642            /// Field 3: `dry_run`
6643            #[must_use]
6644            pub fn dry_run(&self) -> ::core::option::Option<bool> {
6645                self.0.reborrow().dry_run
6646            }
6647        }
6648        impl ::core::convert::From<
6649            ::buffa::OwnedView<GenerateTemporaryPathCredentialsRequestView<'static>>,
6650        > for GenerateTemporaryPathCredentialsRequestOwnedView {
6651            fn from(
6652                inner: ::buffa::OwnedView<
6653                    GenerateTemporaryPathCredentialsRequestView<'static>,
6654                >,
6655            ) -> Self {
6656                GenerateTemporaryPathCredentialsRequestOwnedView(inner)
6657            }
6658        }
6659        impl ::core::convert::From<GenerateTemporaryPathCredentialsRequestOwnedView>
6660        for ::buffa::OwnedView<GenerateTemporaryPathCredentialsRequestView<'static>> {
6661            fn from(wrapper: GenerateTemporaryPathCredentialsRequestOwnedView) -> Self {
6662                wrapper.0
6663            }
6664        }
6665        impl ::core::convert::AsRef<
6666            ::buffa::OwnedView<GenerateTemporaryPathCredentialsRequestView<'static>>,
6667        > for GenerateTemporaryPathCredentialsRequestOwnedView {
6668            fn as_ref(
6669                &self,
6670            ) -> &::buffa::OwnedView<
6671                GenerateTemporaryPathCredentialsRequestView<'static>,
6672            > {
6673                &self.0
6674            }
6675        }
6676        impl ::buffa::HasMessageView
6677        for super::super::GenerateTemporaryPathCredentialsRequest {
6678            type View<'a> = GenerateTemporaryPathCredentialsRequestView<'a>;
6679            type ViewHandle = GenerateTemporaryPathCredentialsRequestOwnedView;
6680        }
6681        impl ::serde::Serialize for GenerateTemporaryPathCredentialsRequestOwnedView {
6682            fn serialize<__S: ::serde::Serializer>(
6683                &self,
6684                __s: __S,
6685            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6686                ::serde::Serialize::serialize(&self.0, __s)
6687            }
6688        }
6689        /// Generate a new set of credentials for a model version.
6690        #[derive(Clone, Debug, Default)]
6691        pub struct GenerateTemporaryModelVersionCredentialsRequestView<'a> {
6692            /// Name of parent catalog of the model version.
6693            ///
6694            /// Field 1: `catalog_name`
6695            pub catalog_name: &'a str,
6696            /// Name of parent schema of the model version.
6697            ///
6698            /// Field 2: `schema_name`
6699            pub schema_name: &'a str,
6700            /// Name of the parent registered model.
6701            ///
6702            /// Field 3: `model_name`
6703            pub model_name: &'a str,
6704            /// The integer version number of the model version.
6705            ///
6706            /// Field 4: `version`
6707            pub version: i64,
6708            /// The operation performed against the model version data, either
6709            /// READ_MODEL_VERSION or READ_WRITE_MODEL_VERSION. If READ_WRITE_MODEL_VERSION
6710            /// is specified, the credentials returned will have write permissions,
6711            /// otherwise, it will be read only.
6712            ///
6713            /// Field 5: `operation`
6714            pub operation: ::buffa::EnumValue<
6715                super::super::generate_temporary_model_version_credentials_request::Operation,
6716            >,
6717            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6718        }
6719        impl<'a> GenerateTemporaryModelVersionCredentialsRequestView<'a> {
6720            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
6721            ///
6722            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
6723            /// and by generated sub-message decode arms with `depth - 1`.
6724            ///
6725            /// **Not part of the public API.** Named with a leading underscore to
6726            /// signal that it is for generated-code use only.
6727            #[doc(hidden)]
6728            pub fn _decode_depth(
6729                buf: &'a [u8],
6730                depth: u32,
6731            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6732                let mut view = Self::default();
6733                view._merge_into_view(buf, depth)?;
6734                ::core::result::Result::Ok(view)
6735            }
6736            /// Merge fields from `buf` into this view (proto merge semantics).
6737            ///
6738            /// Repeated fields append; singular fields last-wins; singular
6739            /// MESSAGE fields merge recursively. Used by sub-message decode
6740            /// arms when the same field appears multiple times on the wire.
6741            ///
6742            /// **Not part of the public API.**
6743            #[doc(hidden)]
6744            pub fn _merge_into_view(
6745                &mut self,
6746                buf: &'a [u8],
6747                depth: u32,
6748            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6749                let _ = depth;
6750                #[allow(unused_variables)]
6751                let view = self;
6752                let mut cur: &'a [u8] = buf;
6753                while !cur.is_empty() {
6754                    let before_tag = cur;
6755                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6756                    match tag.field_number() {
6757                        1u32 => {
6758                            if tag.wire_type()
6759                                != ::buffa::encoding::WireType::LengthDelimited
6760                            {
6761                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6762                                    field_number: 1u32,
6763                                    expected: 2u8,
6764                                    actual: tag.wire_type() as u8,
6765                                });
6766                            }
6767                            view.catalog_name = ::buffa::types::borrow_str(&mut cur)?;
6768                        }
6769                        2u32 => {
6770                            if tag.wire_type()
6771                                != ::buffa::encoding::WireType::LengthDelimited
6772                            {
6773                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6774                                    field_number: 2u32,
6775                                    expected: 2u8,
6776                                    actual: tag.wire_type() as u8,
6777                                });
6778                            }
6779                            view.schema_name = ::buffa::types::borrow_str(&mut cur)?;
6780                        }
6781                        3u32 => {
6782                            if tag.wire_type()
6783                                != ::buffa::encoding::WireType::LengthDelimited
6784                            {
6785                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6786                                    field_number: 3u32,
6787                                    expected: 2u8,
6788                                    actual: tag.wire_type() as u8,
6789                                });
6790                            }
6791                            view.model_name = ::buffa::types::borrow_str(&mut cur)?;
6792                        }
6793                        4u32 => {
6794                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6795                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6796                                    field_number: 4u32,
6797                                    expected: 0u8,
6798                                    actual: tag.wire_type() as u8,
6799                                });
6800                            }
6801                            view.version = ::buffa::types::decode_int64(&mut cur)?;
6802                        }
6803                        5u32 => {
6804                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6805                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6806                                    field_number: 5u32,
6807                                    expected: 0u8,
6808                                    actual: tag.wire_type() as u8,
6809                                });
6810                            }
6811                            view.operation = ::buffa::EnumValue::from(
6812                                ::buffa::types::decode_int32(&mut cur)?,
6813                            );
6814                        }
6815                        _ => {
6816                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6817                            let span_len = before_tag.len() - cur.len();
6818                            view.__buffa_unknown_fields
6819                                .push_raw(&before_tag[..span_len]);
6820                        }
6821                    }
6822                }
6823                ::core::result::Result::Ok(())
6824            }
6825        }
6826        impl<'a> ::buffa::MessageView<'a>
6827        for GenerateTemporaryModelVersionCredentialsRequestView<'a> {
6828            type Owned = super::super::GenerateTemporaryModelVersionCredentialsRequest;
6829            fn decode_view(
6830                buf: &'a [u8],
6831            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6832                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6833            }
6834            fn decode_view_with_limit(
6835                buf: &'a [u8],
6836                depth: u32,
6837            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6838                Self::_decode_depth(buf, depth)
6839            }
6840            fn to_owned_message(
6841                &self,
6842            ) -> super::super::GenerateTemporaryModelVersionCredentialsRequest {
6843                self.to_owned_from_source(None)
6844            }
6845            #[allow(clippy::useless_conversion, clippy::needless_update)]
6846            fn to_owned_from_source(
6847                &self,
6848                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6849            ) -> super::super::GenerateTemporaryModelVersionCredentialsRequest {
6850                #[allow(unused_imports)]
6851                use ::buffa::alloc::string::ToString as _;
6852                let _ = __buffa_src;
6853                super::super::GenerateTemporaryModelVersionCredentialsRequest {
6854                    catalog_name: self.catalog_name.to_string(),
6855                    schema_name: self.schema_name.to_string(),
6856                    model_name: self.model_name.to_string(),
6857                    version: self.version,
6858                    operation: self.operation,
6859                    __buffa_unknown_fields: self
6860                        .__buffa_unknown_fields
6861                        .to_owned()
6862                        .unwrap_or_default()
6863                        .into(),
6864                    ..::core::default::Default::default()
6865                }
6866            }
6867        }
6868        impl<'a> ::buffa::ViewEncode<'a>
6869        for GenerateTemporaryModelVersionCredentialsRequestView<'a> {
6870            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6871            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6872                #[allow(unused_imports)]
6873                use ::buffa::Enumeration as _;
6874                let mut size = 0u32;
6875                if !self.catalog_name.is_empty() {
6876                    size
6877                        += 1u32
6878                            + ::buffa::types::string_encoded_len(&self.catalog_name)
6879                                as u32;
6880                }
6881                if !self.schema_name.is_empty() {
6882                    size
6883                        += 1u32
6884                            + ::buffa::types::string_encoded_len(&self.schema_name)
6885                                as u32;
6886                }
6887                if !self.model_name.is_empty() {
6888                    size
6889                        += 1u32
6890                            + ::buffa::types::string_encoded_len(&self.model_name)
6891                                as u32;
6892                }
6893                if self.version != 0i64 {
6894                    size
6895                        += 1u32 + ::buffa::types::int64_encoded_len(self.version) as u32;
6896                }
6897                {
6898                    let val = self.operation.to_i32();
6899                    if val != 0 {
6900                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6901                    }
6902                }
6903                size += self.__buffa_unknown_fields.encoded_len() as u32;
6904                size
6905            }
6906            #[allow(clippy::needless_borrow)]
6907            fn write_to(
6908                &self,
6909                _cache: &mut ::buffa::SizeCache,
6910                buf: &mut impl ::buffa::bytes::BufMut,
6911            ) {
6912                #[allow(unused_imports)]
6913                use ::buffa::Enumeration as _;
6914                if !self.catalog_name.is_empty() {
6915                    ::buffa::encoding::Tag::new(
6916                            1u32,
6917                            ::buffa::encoding::WireType::LengthDelimited,
6918                        )
6919                        .encode(buf);
6920                    ::buffa::types::encode_string(&self.catalog_name, buf);
6921                }
6922                if !self.schema_name.is_empty() {
6923                    ::buffa::encoding::Tag::new(
6924                            2u32,
6925                            ::buffa::encoding::WireType::LengthDelimited,
6926                        )
6927                        .encode(buf);
6928                    ::buffa::types::encode_string(&self.schema_name, buf);
6929                }
6930                if !self.model_name.is_empty() {
6931                    ::buffa::encoding::Tag::new(
6932                            3u32,
6933                            ::buffa::encoding::WireType::LengthDelimited,
6934                        )
6935                        .encode(buf);
6936                    ::buffa::types::encode_string(&self.model_name, buf);
6937                }
6938                if self.version != 0i64 {
6939                    ::buffa::encoding::Tag::new(
6940                            4u32,
6941                            ::buffa::encoding::WireType::Varint,
6942                        )
6943                        .encode(buf);
6944                    ::buffa::types::encode_int64(self.version, buf);
6945                }
6946                {
6947                    let val = self.operation.to_i32();
6948                    if val != 0 {
6949                        ::buffa::encoding::Tag::new(
6950                                5u32,
6951                                ::buffa::encoding::WireType::Varint,
6952                            )
6953                            .encode(buf);
6954                        ::buffa::types::encode_int32(val, buf);
6955                    }
6956                }
6957                self.__buffa_unknown_fields.write_to(buf);
6958            }
6959        }
6960        /// Serializes this view as protobuf JSON.
6961        ///
6962        /// Implicit-presence fields with default values are omitted, `required`
6963        /// fields are always emitted, explicit-presence (`optional`) fields are
6964        /// emitted only when set, bytes fields are base64-encoded, and enum
6965        /// values are their proto name strings.
6966        ///
6967        /// This impl uses `serialize_map(None)` because the number of emitted
6968        /// fields depends on default-omission rules; serializers that require
6969        /// known map lengths (e.g. `bincode`) will return a runtime error.
6970        /// Use the owned message type for those formats.
6971        impl<'__a> ::serde::Serialize
6972        for GenerateTemporaryModelVersionCredentialsRequestView<'__a> {
6973            fn serialize<__S: ::serde::Serializer>(
6974                &self,
6975                __s: __S,
6976            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6977                use ::serde::ser::SerializeMap as _;
6978                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6979                if !::buffa::json_helpers::skip_if::is_empty_str(self.catalog_name) {
6980                    __map.serialize_entry("catalog_name", self.catalog_name)?;
6981                }
6982                if !::buffa::json_helpers::skip_if::is_empty_str(self.schema_name) {
6983                    __map.serialize_entry("schema_name", self.schema_name)?;
6984                }
6985                if !::buffa::json_helpers::skip_if::is_empty_str(self.model_name) {
6986                    __map.serialize_entry("model_name", self.model_name)?;
6987                }
6988                if !::buffa::json_helpers::skip_if::is_zero_i64(&self.version) {
6989                    struct _W(i64);
6990                    impl ::serde::Serialize for _W {
6991                        fn serialize<__S: ::serde::Serializer>(
6992                            &self,
6993                            __s: __S,
6994                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
6995                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
6996                        }
6997                    }
6998                    __map.serialize_entry("version", &_W(self.version))?;
6999                }
7000                if !::buffa::json_helpers::skip_if::is_default_enum_value(
7001                    &self.operation,
7002                ) {
7003                    __map.serialize_entry("operation", &self.operation)?;
7004                }
7005                __map.end()
7006            }
7007        }
7008        impl<'a> ::buffa::MessageName
7009        for GenerateTemporaryModelVersionCredentialsRequestView<'a> {
7010            const PACKAGE: &'static str = "unitycatalog.temporary_credentials.v1";
7011            const NAME: &'static str = "GenerateTemporaryModelVersionCredentialsRequest";
7012            const FULL_NAME: &'static str = "unitycatalog.temporary_credentials.v1.GenerateTemporaryModelVersionCredentialsRequest";
7013            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.temporary_credentials.v1.GenerateTemporaryModelVersionCredentialsRequest";
7014        }
7015        impl<'v> ::buffa::DefaultViewInstance
7016        for GenerateTemporaryModelVersionCredentialsRequestView<'v> {
7017            fn default_view_instance<'a>() -> &'a Self
7018            where
7019                Self: 'a,
7020            {
7021                static VALUE: ::buffa::__private::OnceBox<
7022                    GenerateTemporaryModelVersionCredentialsRequestView<'static>,
7023                > = ::buffa::__private::OnceBox::new();
7024                VALUE
7025                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
7026                        <GenerateTemporaryModelVersionCredentialsRequestView<
7027                            'static,
7028                        >>::default(),
7029                    ))
7030            }
7031        }
7032        impl ::buffa::ViewReborrow
7033        for GenerateTemporaryModelVersionCredentialsRequestView<'static> {
7034            type Reborrowed<'b> = GenerateTemporaryModelVersionCredentialsRequestView<
7035                'b,
7036            >;
7037            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
7038                this
7039            }
7040        }
7041        /** Self-contained, `'static` owned view of a `GenerateTemporaryModelVersionCredentialsRequest` message.
7042
7043 Wraps [`::buffa::OwnedView`]`<`[`GenerateTemporaryModelVersionCredentialsRequestView`]`<'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.
7044
7045 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GenerateTemporaryModelVersionCredentialsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7046        #[derive(Clone, Debug)]
7047        pub struct GenerateTemporaryModelVersionCredentialsRequestOwnedView(
7048            ::buffa::OwnedView<
7049                GenerateTemporaryModelVersionCredentialsRequestView<'static>,
7050            >,
7051        );
7052        impl GenerateTemporaryModelVersionCredentialsRequestOwnedView {
7053            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7054            ///
7055            /// The view borrows directly from the buffer's data; the buffer is
7056            /// retained inside the returned handle.
7057            ///
7058            /// # Errors
7059            ///
7060            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7061            /// protobuf data.
7062            pub fn decode(
7063                bytes: ::buffa::bytes::Bytes,
7064            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7065                ::core::result::Result::Ok(
7066                    GenerateTemporaryModelVersionCredentialsRequestOwnedView(
7067                        ::buffa::OwnedView::decode(bytes)?,
7068                    ),
7069                )
7070            }
7071            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7072            /// max message size).
7073            ///
7074            /// # Errors
7075            ///
7076            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7077            /// exceeds the configured limits.
7078            pub fn decode_with_options(
7079                bytes: ::buffa::bytes::Bytes,
7080                opts: &::buffa::DecodeOptions,
7081            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7082                ::core::result::Result::Ok(
7083                    GenerateTemporaryModelVersionCredentialsRequestOwnedView(
7084                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7085                    ),
7086                )
7087            }
7088            /// Build from an owned message via an encode → decode round-trip.
7089            ///
7090            /// # Errors
7091            ///
7092            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7093            /// somehow invalid (should not happen for well-formed messages).
7094            pub fn from_owned(
7095                msg: &super::super::GenerateTemporaryModelVersionCredentialsRequest,
7096            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7097                ::core::result::Result::Ok(
7098                    GenerateTemporaryModelVersionCredentialsRequestOwnedView(
7099                        ::buffa::OwnedView::from_owned(msg)?,
7100                    ),
7101                )
7102            }
7103            /// Borrow the full [`GenerateTemporaryModelVersionCredentialsRequestView`] with its lifetime tied to `&self`.
7104            #[must_use]
7105            pub fn view(
7106                &self,
7107            ) -> &GenerateTemporaryModelVersionCredentialsRequestView<'_> {
7108                self.0.reborrow()
7109            }
7110            /// Convert to the owned message type.
7111            #[must_use]
7112            pub fn to_owned_message(
7113                &self,
7114            ) -> super::super::GenerateTemporaryModelVersionCredentialsRequest {
7115                self.0.to_owned_message()
7116            }
7117            /// The underlying bytes buffer.
7118            #[must_use]
7119            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7120                self.0.bytes()
7121            }
7122            /// Consume the handle, returning the underlying bytes buffer.
7123            #[must_use]
7124            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7125                self.0.into_bytes()
7126            }
7127            /// Name of parent catalog of the model version.
7128            ///
7129            /// Field 1: `catalog_name`
7130            #[must_use]
7131            pub fn catalog_name(&self) -> &'_ str {
7132                self.0.reborrow().catalog_name
7133            }
7134            /// Name of parent schema of the model version.
7135            ///
7136            /// Field 2: `schema_name`
7137            #[must_use]
7138            pub fn schema_name(&self) -> &'_ str {
7139                self.0.reborrow().schema_name
7140            }
7141            /// Name of the parent registered model.
7142            ///
7143            /// Field 3: `model_name`
7144            #[must_use]
7145            pub fn model_name(&self) -> &'_ str {
7146                self.0.reborrow().model_name
7147            }
7148            /// The integer version number of the model version.
7149            ///
7150            /// Field 4: `version`
7151            #[must_use]
7152            pub fn version(&self) -> i64 {
7153                self.0.reborrow().version
7154            }
7155            /// The operation performed against the model version data, either
7156            /// READ_MODEL_VERSION or READ_WRITE_MODEL_VERSION. If READ_WRITE_MODEL_VERSION
7157            /// is specified, the credentials returned will have write permissions,
7158            /// otherwise, it will be read only.
7159            ///
7160            /// Field 5: `operation`
7161            #[must_use]
7162            pub fn operation(
7163                &self,
7164            ) -> ::buffa::EnumValue<
7165                super::super::generate_temporary_model_version_credentials_request::Operation,
7166            > {
7167                self.0.reborrow().operation
7168            }
7169        }
7170        impl ::core::convert::From<
7171            ::buffa::OwnedView<
7172                GenerateTemporaryModelVersionCredentialsRequestView<'static>,
7173            >,
7174        > for GenerateTemporaryModelVersionCredentialsRequestOwnedView {
7175            fn from(
7176                inner: ::buffa::OwnedView<
7177                    GenerateTemporaryModelVersionCredentialsRequestView<'static>,
7178                >,
7179            ) -> Self {
7180                GenerateTemporaryModelVersionCredentialsRequestOwnedView(inner)
7181            }
7182        }
7183        impl ::core::convert::From<
7184            GenerateTemporaryModelVersionCredentialsRequestOwnedView,
7185        >
7186        for ::buffa::OwnedView<
7187            GenerateTemporaryModelVersionCredentialsRequestView<'static>,
7188        > {
7189            fn from(
7190                wrapper: GenerateTemporaryModelVersionCredentialsRequestOwnedView,
7191            ) -> Self {
7192                wrapper.0
7193            }
7194        }
7195        impl ::core::convert::AsRef<
7196            ::buffa::OwnedView<
7197                GenerateTemporaryModelVersionCredentialsRequestView<'static>,
7198            >,
7199        > for GenerateTemporaryModelVersionCredentialsRequestOwnedView {
7200            fn as_ref(
7201                &self,
7202            ) -> &::buffa::OwnedView<
7203                GenerateTemporaryModelVersionCredentialsRequestView<'static>,
7204            > {
7205                &self.0
7206            }
7207        }
7208        impl ::buffa::HasMessageView
7209        for super::super::GenerateTemporaryModelVersionCredentialsRequest {
7210            type View<'a> = GenerateTemporaryModelVersionCredentialsRequestView<'a>;
7211            type ViewHandle = GenerateTemporaryModelVersionCredentialsRequestOwnedView;
7212        }
7213        impl ::serde::Serialize
7214        for GenerateTemporaryModelVersionCredentialsRequestOwnedView {
7215            fn serialize<__S: ::serde::Serializer>(
7216                &self,
7217                __s: __S,
7218            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7219                ::serde::Serialize::serialize(&self.0, __s)
7220            }
7221        }
7222        pub mod oneof {
7223            #[allow(unused_imports)]
7224            use super::*;
7225            pub mod temporary_credential {
7226                #[allow(unused_imports)]
7227                use super::*;
7228                #[derive(Clone, Debug)]
7229                pub enum Credentials<'a> {
7230                    AzureUserDelegationSas(
7231                        ::buffa::alloc::boxed::Box<
7232                            super::super::super::super::__buffa::view::AzureUserDelegationSasView<
7233                                'a,
7234                            >,
7235                        >,
7236                    ),
7237                    AzureAad(
7238                        ::buffa::alloc::boxed::Box<
7239                            super::super::super::super::__buffa::view::AzureAadView<'a>,
7240                        >,
7241                    ),
7242                    AwsTempCredentials(
7243                        ::buffa::alloc::boxed::Box<
7244                            super::super::super::super::__buffa::view::AwsTemporaryCredentialsView<
7245                                'a,
7246                            >,
7247                        >,
7248                    ),
7249                    GcpOauthToken(
7250                        ::buffa::alloc::boxed::Box<
7251                            super::super::super::super::__buffa::view::GcpOauthTokenView<
7252                                'a,
7253                            >,
7254                        >,
7255                    ),
7256                    R2TempCredentials(
7257                        ::buffa::alloc::boxed::Box<
7258                            super::super::super::super::__buffa::view::R2TemporaryCredentialsView<
7259                                'a,
7260                            >,
7261                        >,
7262                    ),
7263                }
7264            }
7265        }
7266    }
7267    pub mod oneof {
7268        #[allow(unused_imports)]
7269        use super::*;
7270        pub mod temporary_credential {
7271            #[allow(unused_imports)]
7272            use super::*;
7273            /// The credentials to access the table.
7274            #[derive(Clone, PartialEq, Debug)]
7275            pub enum Credentials {
7276                AzureUserDelegationSas(
7277                    ::buffa::alloc::boxed::Box<
7278                        super::super::super::AzureUserDelegationSas,
7279                    >,
7280                ),
7281                AzureAad(::buffa::alloc::boxed::Box<super::super::super::AzureAad>),
7282                AwsTempCredentials(
7283                    ::buffa::alloc::boxed::Box<
7284                        super::super::super::AwsTemporaryCredentials,
7285                    >,
7286                ),
7287                GcpOauthToken(
7288                    ::buffa::alloc::boxed::Box<super::super::super::GcpOauthToken>,
7289                ),
7290                R2TempCredentials(
7291                    ::buffa::alloc::boxed::Box<
7292                        super::super::super::R2TemporaryCredentials,
7293                    >,
7294                ),
7295            }
7296            impl ::buffa::Oneof for Credentials {}
7297            impl From<super::super::super::AzureUserDelegationSas> for Credentials {
7298                fn from(v: super::super::super::AzureUserDelegationSas) -> Self {
7299                    Self::AzureUserDelegationSas(::buffa::alloc::boxed::Box::new(v))
7300                }
7301            }
7302            impl From<super::super::super::AzureUserDelegationSas>
7303            for ::core::option::Option<Credentials> {
7304                fn from(v: super::super::super::AzureUserDelegationSas) -> Self {
7305                    Self::Some(Credentials::from(v))
7306                }
7307            }
7308            impl From<super::super::super::AzureAad> for Credentials {
7309                fn from(v: super::super::super::AzureAad) -> Self {
7310                    Self::AzureAad(::buffa::alloc::boxed::Box::new(v))
7311                }
7312            }
7313            impl From<super::super::super::AzureAad>
7314            for ::core::option::Option<Credentials> {
7315                fn from(v: super::super::super::AzureAad) -> Self {
7316                    Self::Some(Credentials::from(v))
7317                }
7318            }
7319            impl From<super::super::super::AwsTemporaryCredentials> for Credentials {
7320                fn from(v: super::super::super::AwsTemporaryCredentials) -> Self {
7321                    Self::AwsTempCredentials(::buffa::alloc::boxed::Box::new(v))
7322                }
7323            }
7324            impl From<super::super::super::AwsTemporaryCredentials>
7325            for ::core::option::Option<Credentials> {
7326                fn from(v: super::super::super::AwsTemporaryCredentials) -> Self {
7327                    Self::Some(Credentials::from(v))
7328                }
7329            }
7330            impl From<super::super::super::GcpOauthToken> for Credentials {
7331                fn from(v: super::super::super::GcpOauthToken) -> Self {
7332                    Self::GcpOauthToken(::buffa::alloc::boxed::Box::new(v))
7333                }
7334            }
7335            impl From<super::super::super::GcpOauthToken>
7336            for ::core::option::Option<Credentials> {
7337                fn from(v: super::super::super::GcpOauthToken) -> Self {
7338                    Self::Some(Credentials::from(v))
7339                }
7340            }
7341            impl From<super::super::super::R2TemporaryCredentials> for Credentials {
7342                fn from(v: super::super::super::R2TemporaryCredentials) -> Self {
7343                    Self::R2TempCredentials(::buffa::alloc::boxed::Box::new(v))
7344                }
7345            }
7346            impl From<super::super::super::R2TemporaryCredentials>
7347            for ::core::option::Option<Credentials> {
7348                fn from(v: super::super::super::R2TemporaryCredentials) -> Self {
7349                    Self::Some(Credentials::from(v))
7350                }
7351            }
7352            impl serde::Serialize for Credentials {
7353                fn serialize<S: serde::Serializer>(
7354                    &self,
7355                    s: S,
7356                ) -> ::core::result::Result<S::Ok, S::Error> {
7357                    use serde::ser::SerializeMap;
7358                    let mut map = s.serialize_map(Some(1))?;
7359                    match self {
7360                        Self::AzureUserDelegationSas(v) => {
7361                            map.serialize_entry("azure_user_delegation_sas", v)?;
7362                        }
7363                        Self::AzureAad(v) => {
7364                            map.serialize_entry("azure_aad", v)?;
7365                        }
7366                        Self::AwsTempCredentials(v) => {
7367                            map.serialize_entry("aws_temp_credentials", v)?;
7368                        }
7369                        Self::GcpOauthToken(v) => {
7370                            map.serialize_entry("gcp_oauth_token", v)?;
7371                        }
7372                        Self::R2TempCredentials(v) => {
7373                            map.serialize_entry("r2_temp_credentials", v)?;
7374                        }
7375                    }
7376                    map.end()
7377                }
7378            }
7379        }
7380    }
7381    /// Register this package's `Any` type entries and extension entries.
7382    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
7383        reg.register_json_any(super::__AZURE_USER_DELEGATION_SAS_JSON_ANY);
7384        reg.register_json_any(super::__AZURE_AAD_JSON_ANY);
7385        reg.register_json_any(super::__R2TEMPORARY_CREDENTIALS_JSON_ANY);
7386        reg.register_json_any(super::__GCP_OAUTH_TOKEN_JSON_ANY);
7387        reg.register_json_any(super::__AWS_TEMPORARY_CREDENTIALS_JSON_ANY);
7388        reg.register_json_any(super::__TEMPORARY_CREDENTIAL_JSON_ANY);
7389        reg.register_json_any(
7390            super::__GENERATE_TEMPORARY_TABLE_CREDENTIALS_REQUEST_JSON_ANY,
7391        );
7392        reg.register_json_any(
7393            super::__GENERATE_TEMPORARY_VOLUME_CREDENTIALS_REQUEST_JSON_ANY,
7394        );
7395        reg.register_json_any(
7396            super::__GENERATE_TEMPORARY_PATH_CREDENTIALS_REQUEST_JSON_ANY,
7397        );
7398        reg.register_json_any(
7399            super::__GENERATE_TEMPORARY_MODEL_VERSION_CREDENTIALS_REQUEST_JSON_ANY,
7400        );
7401    }
7402}
7403#[doc(inline)]
7404pub use self::__buffa::view::AzureUserDelegationSasView;
7405#[doc(inline)]
7406pub use self::__buffa::view::AzureUserDelegationSasOwnedView;
7407#[doc(inline)]
7408pub use self::__buffa::view::AzureAadView;
7409#[doc(inline)]
7410pub use self::__buffa::view::AzureAadOwnedView;
7411#[doc(inline)]
7412pub use self::__buffa::view::R2TemporaryCredentialsView;
7413#[doc(inline)]
7414pub use self::__buffa::view::R2TemporaryCredentialsOwnedView;
7415#[doc(inline)]
7416pub use self::__buffa::view::GcpOauthTokenView;
7417#[doc(inline)]
7418pub use self::__buffa::view::GcpOauthTokenOwnedView;
7419#[doc(inline)]
7420pub use self::__buffa::view::AwsTemporaryCredentialsView;
7421#[doc(inline)]
7422pub use self::__buffa::view::AwsTemporaryCredentialsOwnedView;
7423#[doc(inline)]
7424pub use self::__buffa::view::TemporaryCredentialView;
7425#[doc(inline)]
7426pub use self::__buffa::view::TemporaryCredentialOwnedView;
7427#[doc(inline)]
7428pub use self::__buffa::view::GenerateTemporaryTableCredentialsRequestView;
7429#[doc(inline)]
7430pub use self::__buffa::view::GenerateTemporaryTableCredentialsRequestOwnedView;
7431#[doc(inline)]
7432pub use self::__buffa::view::GenerateTemporaryVolumeCredentialsRequestView;
7433#[doc(inline)]
7434pub use self::__buffa::view::GenerateTemporaryVolumeCredentialsRequestOwnedView;
7435#[doc(inline)]
7436pub use self::__buffa::view::GenerateTemporaryPathCredentialsRequestView;
7437#[doc(inline)]
7438pub use self::__buffa::view::GenerateTemporaryPathCredentialsRequestOwnedView;
7439#[doc(inline)]
7440pub use self::__buffa::view::GenerateTemporaryModelVersionCredentialsRequestView;
7441#[doc(inline)]
7442pub use self::__buffa::view::GenerateTemporaryModelVersionCredentialsRequestOwnedView;
7443#[doc(inline)]
7444pub use self::__buffa::register_types;