Skip to main content

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

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// The purpose of a credential.
4#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5#[repr(i32)]
6pub enum Purpose {
7    PURPOSE_UNSPECIFIED = 0i32,
8    /// The credential is used to access external storage locations.
9    STORAGE = 1i32,
10    /// The credential is used to access external services.
11    SERVICE = 2i32,
12}
13impl Purpose {
14    ///Idiomatic alias for [`Self::PURPOSE_UNSPECIFIED`]; `Debug` prints the variant name.
15    #[allow(non_upper_case_globals)]
16    pub const PurposeUnspecified: Self = Self::PURPOSE_UNSPECIFIED;
17    ///Idiomatic alias for [`Self::STORAGE`]; `Debug` prints the variant name.
18    #[allow(non_upper_case_globals)]
19    pub const Storage: Self = Self::STORAGE;
20    ///Idiomatic alias for [`Self::SERVICE`]; `Debug` prints the variant name.
21    #[allow(non_upper_case_globals)]
22    pub const Service: Self = Self::SERVICE;
23}
24impl ::core::default::Default for Purpose {
25    fn default() -> Self {
26        Self::PURPOSE_UNSPECIFIED
27    }
28}
29impl ::serde::Serialize for Purpose {
30    fn serialize<S: ::serde::Serializer>(
31        &self,
32        s: S,
33    ) -> ::core::result::Result<S::Ok, S::Error> {
34        s.serialize_str(::buffa::Enumeration::proto_name(self))
35    }
36}
37impl<'de> ::serde::Deserialize<'de> for Purpose {
38    fn deserialize<D: ::serde::Deserializer<'de>>(
39        d: D,
40    ) -> ::core::result::Result<Self, D::Error> {
41        struct _V;
42        impl ::serde::de::Visitor<'_> for _V {
43            type Value = Purpose;
44            fn expecting(
45                &self,
46                f: &mut ::core::fmt::Formatter<'_>,
47            ) -> ::core::fmt::Result {
48                f.write_str(
49                    concat!("a string, integer, or null for ", stringify!(Purpose)),
50                )
51            }
52            fn visit_str<E: ::serde::de::Error>(
53                self,
54                v: &str,
55            ) -> ::core::result::Result<Purpose, E> {
56                <Purpose as ::buffa::Enumeration>::from_proto_name(v)
57                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
58            }
59            fn visit_i64<E: ::serde::de::Error>(
60                self,
61                v: i64,
62            ) -> ::core::result::Result<Purpose, E> {
63                let v32 = i32::try_from(v)
64                    .map_err(|_| {
65                        ::serde::de::Error::custom(
66                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
67                        )
68                    })?;
69                <Purpose as ::buffa::Enumeration>::from_i32(v32)
70                    .ok_or_else(|| {
71                        ::serde::de::Error::custom(
72                            ::buffa::alloc::format!("unknown enum value {v32}"),
73                        )
74                    })
75            }
76            fn visit_u64<E: ::serde::de::Error>(
77                self,
78                v: u64,
79            ) -> ::core::result::Result<Purpose, E> {
80                let v32 = i32::try_from(v)
81                    .map_err(|_| {
82                        ::serde::de::Error::custom(
83                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
84                        )
85                    })?;
86                <Purpose as ::buffa::Enumeration>::from_i32(v32)
87                    .ok_or_else(|| {
88                        ::serde::de::Error::custom(
89                            ::buffa::alloc::format!("unknown enum value {v32}"),
90                        )
91                    })
92            }
93            fn visit_unit<E: ::serde::de::Error>(
94                self,
95            ) -> ::core::result::Result<Purpose, E> {
96                ::core::result::Result::Ok(::core::default::Default::default())
97            }
98        }
99        d.deserialize_any(_V)
100    }
101}
102impl ::buffa::json_helpers::ProtoElemJson for Purpose {
103    fn serialize_proto_json<S: ::serde::Serializer>(
104        v: &Self,
105        s: S,
106    ) -> ::core::result::Result<S::Ok, S::Error> {
107        ::serde::Serialize::serialize(v, s)
108    }
109    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
110        d: D,
111    ) -> ::core::result::Result<Self, D::Error> {
112        <Self as ::serde::Deserialize>::deserialize(d)
113    }
114}
115impl ::buffa::Enumeration for Purpose {
116    fn from_i32(value: i32) -> ::core::option::Option<Self> {
117        match value {
118            0i32 => ::core::option::Option::Some(Self::PURPOSE_UNSPECIFIED),
119            1i32 => ::core::option::Option::Some(Self::STORAGE),
120            2i32 => ::core::option::Option::Some(Self::SERVICE),
121            _ => ::core::option::Option::None,
122        }
123    }
124    fn to_i32(&self) -> i32 {
125        *self as i32
126    }
127    fn proto_name(&self) -> &'static str {
128        match self {
129            Self::PURPOSE_UNSPECIFIED => "PURPOSE_UNSPECIFIED",
130            Self::STORAGE => "STORAGE",
131            Self::SERVICE => "SERVICE",
132        }
133    }
134    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
135        match name {
136            "PURPOSE_UNSPECIFIED" => {
137                ::core::option::Option::Some(Self::PURPOSE_UNSPECIFIED)
138            }
139            "STORAGE" => ::core::option::Option::Some(Self::STORAGE),
140            "SERVICE" => ::core::option::Option::Some(Self::SERVICE),
141            _ => ::core::option::Option::None,
142        }
143    }
144    fn values() -> &'static [Self] {
145        &[Self::PURPOSE_UNSPECIFIED, Self::STORAGE, Self::SERVICE]
146    }
147}
148/// The Azure service principal configuration.
149#[derive(Clone, PartialEq, Default)]
150#[derive(::serde::Serialize)]
151#[serde(default)]
152pub struct AzureServicePrincipal {
153    /// The directory ID corresponding to the Azure Active Directory (AAD) tenant of the application.
154    ///
155    /// Field 1: `directory_id`
156    #[serde(
157        rename = "directory_id",
158        alias = "directoryId",
159        with = "::buffa::json_helpers::proto_string",
160        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
161    )]
162    pub directory_id: ::buffa::alloc::string::String,
163    /// The application ID of the application registration within the referenced AAD tenant.
164    ///
165    /// Field 2: `application_id`
166    #[serde(
167        rename = "application_id",
168        alias = "applicationId",
169        with = "::buffa::json_helpers::proto_string",
170        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
171    )]
172    pub application_id: ::buffa::alloc::string::String,
173    #[serde(flatten)]
174    pub credential: ::core::option::Option<
175        __buffa::oneof::azure_service_principal::Credential,
176    >,
177    #[serde(skip)]
178    #[doc(hidden)]
179    pub __buffa_unknown_fields: ::buffa::UnknownFields,
180}
181impl ::core::fmt::Debug for AzureServicePrincipal {
182    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
183        f.debug_struct("AzureServicePrincipal")
184            .field("directory_id", &self.directory_id)
185            .field("application_id", &self.application_id)
186            .field("credential", &self.credential)
187            .finish()
188    }
189}
190impl AzureServicePrincipal {
191    /// Protobuf type URL for this message, for use with `Any::pack` and
192    /// `Any::unpack_if`.
193    ///
194    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
195    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureServicePrincipal";
196}
197impl ::buffa::DefaultInstance for AzureServicePrincipal {
198    fn default_instance() -> &'static Self {
199        static VALUE: ::buffa::__private::OnceBox<AzureServicePrincipal> = ::buffa::__private::OnceBox::new();
200        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
201    }
202}
203impl ::buffa::MessageName for AzureServicePrincipal {
204    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
205    const NAME: &'static str = "AzureServicePrincipal";
206    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AzureServicePrincipal";
207    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureServicePrincipal";
208}
209impl ::buffa::Message for AzureServicePrincipal {
210    /// Returns the total encoded size in bytes.
211    ///
212    /// The result is a `u32`; the protobuf specification requires all
213    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
214    /// compliant message will never overflow this type.
215    #[allow(clippy::let_and_return)]
216    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
217        #[allow(unused_imports)]
218        use ::buffa::Enumeration as _;
219        let mut size = 0u32;
220        if !self.directory_id.is_empty() {
221            size += 1u32 + ::buffa::types::string_encoded_len(&self.directory_id) as u32;
222        }
223        if !self.application_id.is_empty() {
224            size
225                += 1u32
226                    + ::buffa::types::string_encoded_len(&self.application_id) as u32;
227        }
228        if let ::core::option::Option::Some(ref v) = self.credential {
229            match v {
230                __buffa::oneof::azure_service_principal::Credential::ClientSecret(x) => {
231                    size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
232                }
233                __buffa::oneof::azure_service_principal::Credential::FederatedTokenFile(
234                    x,
235                ) => {
236                    size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
237                }
238            }
239        }
240        size += self.__buffa_unknown_fields.encoded_len() as u32;
241        size
242    }
243    fn write_to(
244        &self,
245        _cache: &mut ::buffa::SizeCache,
246        buf: &mut impl ::buffa::bytes::BufMut,
247    ) {
248        #[allow(unused_imports)]
249        use ::buffa::Enumeration as _;
250        if !self.directory_id.is_empty() {
251            ::buffa::encoding::Tag::new(
252                    1u32,
253                    ::buffa::encoding::WireType::LengthDelimited,
254                )
255                .encode(buf);
256            ::buffa::types::encode_string(&self.directory_id, buf);
257        }
258        if !self.application_id.is_empty() {
259            ::buffa::encoding::Tag::new(
260                    2u32,
261                    ::buffa::encoding::WireType::LengthDelimited,
262                )
263                .encode(buf);
264            ::buffa::types::encode_string(&self.application_id, buf);
265        }
266        if let ::core::option::Option::Some(ref v) = self.credential {
267            match v {
268                __buffa::oneof::azure_service_principal::Credential::ClientSecret(x) => {
269                    ::buffa::encoding::Tag::new(
270                            3u32,
271                            ::buffa::encoding::WireType::LengthDelimited,
272                        )
273                        .encode(buf);
274                    ::buffa::types::encode_string(x, buf);
275                }
276                __buffa::oneof::azure_service_principal::Credential::FederatedTokenFile(
277                    x,
278                ) => {
279                    ::buffa::encoding::Tag::new(
280                            5u32,
281                            ::buffa::encoding::WireType::LengthDelimited,
282                        )
283                        .encode(buf);
284                    ::buffa::types::encode_string(x, buf);
285                }
286            }
287        }
288        self.__buffa_unknown_fields.write_to(buf);
289    }
290    fn merge_field(
291        &mut self,
292        tag: ::buffa::encoding::Tag,
293        buf: &mut impl ::buffa::bytes::Buf,
294        depth: u32,
295    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
296        #[allow(unused_imports)]
297        use ::buffa::bytes::Buf as _;
298        #[allow(unused_imports)]
299        use ::buffa::Enumeration as _;
300        match tag.field_number() {
301            1u32 => {
302                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
303                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
304                        field_number: 1u32,
305                        expected: 2u8,
306                        actual: tag.wire_type() as u8,
307                    });
308                }
309                ::buffa::types::merge_string(&mut self.directory_id, buf)?;
310            }
311            2u32 => {
312                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
313                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
314                        field_number: 2u32,
315                        expected: 2u8,
316                        actual: tag.wire_type() as u8,
317                    });
318                }
319                ::buffa::types::merge_string(&mut self.application_id, buf)?;
320            }
321            3u32 => {
322                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
323                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
324                        field_number: 3u32,
325                        expected: 2u8,
326                        actual: tag.wire_type() as u8,
327                    });
328                }
329                self.credential = ::core::option::Option::Some(
330                    __buffa::oneof::azure_service_principal::Credential::ClientSecret(
331                        ::buffa::types::decode_string(buf)?,
332                    ),
333                );
334            }
335            5u32 => {
336                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
337                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
338                        field_number: 5u32,
339                        expected: 2u8,
340                        actual: tag.wire_type() as u8,
341                    });
342                }
343                self.credential = ::core::option::Option::Some(
344                    __buffa::oneof::azure_service_principal::Credential::FederatedTokenFile(
345                        ::buffa::types::decode_string(buf)?,
346                    ),
347                );
348            }
349            _ => {
350                self.__buffa_unknown_fields
351                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
352            }
353        }
354        ::core::result::Result::Ok(())
355    }
356    fn clear(&mut self) {
357        self.directory_id.clear();
358        self.application_id.clear();
359        self.credential = ::core::option::Option::None;
360        self.__buffa_unknown_fields.clear();
361    }
362}
363impl ::buffa::ExtensionSet for AzureServicePrincipal {
364    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.AzureServicePrincipal";
365    fn unknown_fields(&self) -> &::buffa::UnknownFields {
366        &self.__buffa_unknown_fields
367    }
368    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
369        &mut self.__buffa_unknown_fields
370    }
371}
372impl<'de> serde::Deserialize<'de> for AzureServicePrincipal {
373    fn deserialize<D: serde::Deserializer<'de>>(
374        d: D,
375    ) -> ::core::result::Result<Self, D::Error> {
376        struct _V;
377        impl<'de> serde::de::Visitor<'de> for _V {
378            type Value = AzureServicePrincipal;
379            fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
380                f.write_str("struct AzureServicePrincipal")
381            }
382            #[allow(clippy::field_reassign_with_default)]
383            fn visit_map<A: serde::de::MapAccess<'de>>(
384                self,
385                mut map: A,
386            ) -> ::core::result::Result<AzureServicePrincipal, A::Error> {
387                let mut __f_directory_id: ::core::option::Option<
388                    ::buffa::alloc::string::String,
389                > = None;
390                let mut __f_application_id: ::core::option::Option<
391                    ::buffa::alloc::string::String,
392                > = None;
393                let mut __oneof_credential: ::core::option::Option<
394                    __buffa::oneof::azure_service_principal::Credential,
395                > = None;
396                while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
397                    match key.as_str() {
398                        "directoryId" | "directory_id" => {
399                            __f_directory_id = Some({
400                                struct _S;
401                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
402                                    type Value = ::buffa::alloc::string::String;
403                                    fn deserialize<D: serde::Deserializer<'de>>(
404                                        self,
405                                        d: D,
406                                    ) -> ::core::result::Result<
407                                        ::buffa::alloc::string::String,
408                                        D::Error,
409                                    > {
410                                        ::buffa::json_helpers::proto_string::deserialize(d)
411                                    }
412                                }
413                                map.next_value_seed(_S)?
414                            });
415                        }
416                        "applicationId" | "application_id" => {
417                            __f_application_id = Some({
418                                struct _S;
419                                impl<'de> serde::de::DeserializeSeed<'de> for _S {
420                                    type Value = ::buffa::alloc::string::String;
421                                    fn deserialize<D: serde::Deserializer<'de>>(
422                                        self,
423                                        d: D,
424                                    ) -> ::core::result::Result<
425                                        ::buffa::alloc::string::String,
426                                        D::Error,
427                                    > {
428                                        ::buffa::json_helpers::proto_string::deserialize(d)
429                                    }
430                                }
431                                map.next_value_seed(_S)?
432                            });
433                        }
434                        "clientSecret" | "client_secret" => {
435                            let v: ::core::option::Option<
436                                ::buffa::alloc::string::String,
437                            > = map
438                                .next_value_seed(
439                                    ::buffa::json_helpers::NullableDeserializeSeed(
440                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
441                                            ::buffa::alloc::string::String,
442                                        >::new(),
443                                    ),
444                                )?;
445                            if let Some(v) = v {
446                                if __oneof_credential.is_some() {
447                                    return Err(
448                                        serde::de::Error::custom(
449                                            "multiple oneof fields set for 'credential'",
450                                        ),
451                                    );
452                                }
453                                __oneof_credential = Some(
454                                    __buffa::oneof::azure_service_principal::Credential::ClientSecret(
455                                        v,
456                                    ),
457                                );
458                            }
459                        }
460                        "federatedTokenFile" | "federated_token_file" => {
461                            let v: ::core::option::Option<
462                                ::buffa::alloc::string::String,
463                            > = map
464                                .next_value_seed(
465                                    ::buffa::json_helpers::NullableDeserializeSeed(
466                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
467                                            ::buffa::alloc::string::String,
468                                        >::new(),
469                                    ),
470                                )?;
471                            if let Some(v) = v {
472                                if __oneof_credential.is_some() {
473                                    return Err(
474                                        serde::de::Error::custom(
475                                            "multiple oneof fields set for 'credential'",
476                                        ),
477                                    );
478                                }
479                                __oneof_credential = Some(
480                                    __buffa::oneof::azure_service_principal::Credential::FederatedTokenFile(
481                                        v,
482                                    ),
483                                );
484                            }
485                        }
486                        _ => {
487                            map.next_value::<serde::de::IgnoredAny>()?;
488                        }
489                    }
490                }
491                let mut __r = <AzureServicePrincipal as ::core::default::Default>::default();
492                if let ::core::option::Option::Some(v) = __f_directory_id {
493                    __r.directory_id = v;
494                }
495                if let ::core::option::Option::Some(v) = __f_application_id {
496                    __r.application_id = v;
497                }
498                __r.credential = __oneof_credential;
499                Ok(__r)
500            }
501        }
502        d.deserialize_map(_V)
503    }
504}
505impl ::buffa::json_helpers::ProtoElemJson for AzureServicePrincipal {
506    fn serialize_proto_json<S: ::serde::Serializer>(
507        v: &Self,
508        s: S,
509    ) -> ::core::result::Result<S::Ok, S::Error> {
510        ::serde::Serialize::serialize(v, s)
511    }
512    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
513        d: D,
514    ) -> ::core::result::Result<Self, D::Error> {
515        <Self as ::serde::Deserialize>::deserialize(d)
516    }
517}
518#[doc(hidden)]
519pub const __AZURE_SERVICE_PRINCIPAL_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
520    type_url: "type.googleapis.com/unitycatalog.credentials.v1.AzureServicePrincipal",
521    to_json: ::buffa::type_registry::any_to_json::<AzureServicePrincipal>,
522    from_json: ::buffa::type_registry::any_from_json::<AzureServicePrincipal>,
523    is_wkt: false,
524};
525pub mod azure_service_principal {
526    #[allow(unused_imports)]
527    use super::*;
528    #[doc(inline)]
529    pub use super::__buffa::oneof::azure_service_principal::Credential;
530    #[doc(inline)]
531    pub use super::__buffa::view::oneof::azure_service_principal::Credential as CredentialView;
532}
533/// The Azure managed identity configuration.
534#[derive(Clone, PartialEq, Default)]
535#[derive(::serde::Serialize, ::serde::Deserialize)]
536#[serde(default)]
537pub struct AzureManagedIdentity {
538    /// The Azure resource ID of the Azure Databricks Access Connector.
539    /// Use the format /subscriptions/{guid}/resourceGroups/{rg-name}/providers/
540    /// Microsoft.Databricks/accessConnectors/{connector-name}.
541    ///
542    /// Field 1: `access_connector_id`
543    #[serde(
544        rename = "access_connector_id",
545        alias = "accessConnectorId",
546        with = "::buffa::json_helpers::proto_string",
547        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
548    )]
549    pub access_connector_id: ::buffa::alloc::string::String,
550    /// The Databricks internal ID that represents this managed identity.
551    ///
552    /// Field 2: `credential_id`
553    #[serde(
554        rename = "credential_id",
555        alias = "credentialId",
556        skip_serializing_if = "::core::option::Option::is_none"
557    )]
558    pub credential_id: ::core::option::Option<::buffa::alloc::string::String>,
559    /// The Azure resource ID of the managed identity.
560    /// Use the format /subscriptions/{guid}/resourceGroups/{rg-name}/providers/
561    /// Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}.
562    /// This is only available for user-assigned identities. For system-assigned
563    /// identities, the access_connector_id is used to identify the identity.
564    /// If this field is not provided, then the system-assigned identity of the
565    /// Access Connector is used.
566    ///
567    /// Field 3: `managed_identity_id`
568    #[serde(
569        rename = "managed_identity_id",
570        alias = "managedIdentityId",
571        skip_serializing_if = "::core::option::Option::is_none"
572    )]
573    pub managed_identity_id: ::core::option::Option<::buffa::alloc::string::String>,
574    #[serde(skip)]
575    #[doc(hidden)]
576    pub __buffa_unknown_fields: ::buffa::UnknownFields,
577}
578impl ::core::fmt::Debug for AzureManagedIdentity {
579    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
580        f.debug_struct("AzureManagedIdentity")
581            .field("access_connector_id", &self.access_connector_id)
582            .field("credential_id", &self.credential_id)
583            .field("managed_identity_id", &self.managed_identity_id)
584            .finish()
585    }
586}
587impl AzureManagedIdentity {
588    /// Protobuf type URL for this message, for use with `Any::pack` and
589    /// `Any::unpack_if`.
590    ///
591    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
592    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureManagedIdentity";
593}
594impl AzureManagedIdentity {
595    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
596    #[inline]
597    ///Sets [`Self::credential_id`] to `Some(value)`, consuming and returning `self`.
598    pub fn with_credential_id(
599        mut self,
600        value: impl Into<::buffa::alloc::string::String>,
601    ) -> Self {
602        self.credential_id = Some(value.into());
603        self
604    }
605    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
606    #[inline]
607    ///Sets [`Self::managed_identity_id`] to `Some(value)`, consuming and returning `self`.
608    pub fn with_managed_identity_id(
609        mut self,
610        value: impl Into<::buffa::alloc::string::String>,
611    ) -> Self {
612        self.managed_identity_id = Some(value.into());
613        self
614    }
615}
616impl ::buffa::DefaultInstance for AzureManagedIdentity {
617    fn default_instance() -> &'static Self {
618        static VALUE: ::buffa::__private::OnceBox<AzureManagedIdentity> = ::buffa::__private::OnceBox::new();
619        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
620    }
621}
622impl ::buffa::MessageName for AzureManagedIdentity {
623    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
624    const NAME: &'static str = "AzureManagedIdentity";
625    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AzureManagedIdentity";
626    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureManagedIdentity";
627}
628impl ::buffa::Message for AzureManagedIdentity {
629    /// Returns the total encoded size in bytes.
630    ///
631    /// The result is a `u32`; the protobuf specification requires all
632    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
633    /// compliant message will never overflow this type.
634    #[allow(clippy::let_and_return)]
635    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
636        #[allow(unused_imports)]
637        use ::buffa::Enumeration as _;
638        let mut size = 0u32;
639        if !self.access_connector_id.is_empty() {
640            size
641                += 1u32
642                    + ::buffa::types::string_encoded_len(&self.access_connector_id)
643                        as u32;
644        }
645        if let Some(ref v) = self.credential_id {
646            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
647        }
648        if let Some(ref v) = self.managed_identity_id {
649            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
650        }
651        size += self.__buffa_unknown_fields.encoded_len() as u32;
652        size
653    }
654    fn write_to(
655        &self,
656        _cache: &mut ::buffa::SizeCache,
657        buf: &mut impl ::buffa::bytes::BufMut,
658    ) {
659        #[allow(unused_imports)]
660        use ::buffa::Enumeration as _;
661        if !self.access_connector_id.is_empty() {
662            ::buffa::encoding::Tag::new(
663                    1u32,
664                    ::buffa::encoding::WireType::LengthDelimited,
665                )
666                .encode(buf);
667            ::buffa::types::encode_string(&self.access_connector_id, buf);
668        }
669        if let Some(ref v) = self.credential_id {
670            ::buffa::encoding::Tag::new(
671                    2u32,
672                    ::buffa::encoding::WireType::LengthDelimited,
673                )
674                .encode(buf);
675            ::buffa::types::encode_string(v, buf);
676        }
677        if let Some(ref v) = self.managed_identity_id {
678            ::buffa::encoding::Tag::new(
679                    3u32,
680                    ::buffa::encoding::WireType::LengthDelimited,
681                )
682                .encode(buf);
683            ::buffa::types::encode_string(v, buf);
684        }
685        self.__buffa_unknown_fields.write_to(buf);
686    }
687    fn merge_field(
688        &mut self,
689        tag: ::buffa::encoding::Tag,
690        buf: &mut impl ::buffa::bytes::Buf,
691        depth: u32,
692    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
693        #[allow(unused_imports)]
694        use ::buffa::bytes::Buf as _;
695        #[allow(unused_imports)]
696        use ::buffa::Enumeration as _;
697        match tag.field_number() {
698            1u32 => {
699                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
700                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
701                        field_number: 1u32,
702                        expected: 2u8,
703                        actual: tag.wire_type() as u8,
704                    });
705                }
706                ::buffa::types::merge_string(&mut self.access_connector_id, buf)?;
707            }
708            2u32 => {
709                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
710                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
711                        field_number: 2u32,
712                        expected: 2u8,
713                        actual: tag.wire_type() as u8,
714                    });
715                }
716                ::buffa::types::merge_string(
717                    self
718                        .credential_id
719                        .get_or_insert_with(::buffa::alloc::string::String::new),
720                    buf,
721                )?;
722            }
723            3u32 => {
724                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
725                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
726                        field_number: 3u32,
727                        expected: 2u8,
728                        actual: tag.wire_type() as u8,
729                    });
730                }
731                ::buffa::types::merge_string(
732                    self
733                        .managed_identity_id
734                        .get_or_insert_with(::buffa::alloc::string::String::new),
735                    buf,
736                )?;
737            }
738            _ => {
739                self.__buffa_unknown_fields
740                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
741            }
742        }
743        ::core::result::Result::Ok(())
744    }
745    fn clear(&mut self) {
746        self.access_connector_id.clear();
747        self.credential_id = ::core::option::Option::None;
748        self.managed_identity_id = ::core::option::Option::None;
749        self.__buffa_unknown_fields.clear();
750    }
751}
752impl ::buffa::ExtensionSet for AzureManagedIdentity {
753    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.AzureManagedIdentity";
754    fn unknown_fields(&self) -> &::buffa::UnknownFields {
755        &self.__buffa_unknown_fields
756    }
757    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
758        &mut self.__buffa_unknown_fields
759    }
760}
761impl ::buffa::json_helpers::ProtoElemJson for AzureManagedIdentity {
762    fn serialize_proto_json<S: ::serde::Serializer>(
763        v: &Self,
764        s: S,
765    ) -> ::core::result::Result<S::Ok, S::Error> {
766        ::serde::Serialize::serialize(v, s)
767    }
768    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
769        d: D,
770    ) -> ::core::result::Result<Self, D::Error> {
771        <Self as ::serde::Deserialize>::deserialize(d)
772    }
773}
774#[doc(hidden)]
775pub const __AZURE_MANAGED_IDENTITY_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
776    type_url: "type.googleapis.com/unitycatalog.credentials.v1.AzureManagedIdentity",
777    to_json: ::buffa::type_registry::any_to_json::<AzureManagedIdentity>,
778    from_json: ::buffa::type_registry::any_from_json::<AzureManagedIdentity>,
779    is_wkt: false,
780};
781/// The Azure storage key configuration.
782#[derive(Clone, PartialEq, Default)]
783#[derive(::serde::Serialize, ::serde::Deserialize)]
784#[serde(default)]
785pub struct AzureStorageKey {
786    /// The name of the storage account.
787    ///
788    /// Field 1: `account_name`
789    #[serde(
790        rename = "account_name",
791        alias = "accountName",
792        with = "::buffa::json_helpers::proto_string",
793        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
794    )]
795    pub account_name: ::buffa::alloc::string::String,
796    /// The account key of the storage account.
797    ///
798    /// Field 2: `account_key`
799    #[serde(
800        rename = "account_key",
801        alias = "accountKey",
802        with = "::buffa::json_helpers::proto_string",
803        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
804    )]
805    pub account_key: ::buffa::alloc::string::String,
806    #[serde(skip)]
807    #[doc(hidden)]
808    pub __buffa_unknown_fields: ::buffa::UnknownFields,
809}
810impl ::core::fmt::Debug for AzureStorageKey {
811    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
812        f.debug_struct("AzureStorageKey")
813            .field("account_name", &self.account_name)
814            .field("account_key", &self.account_key)
815            .finish()
816    }
817}
818impl AzureStorageKey {
819    /// Protobuf type URL for this message, for use with `Any::pack` and
820    /// `Any::unpack_if`.
821    ///
822    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
823    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureStorageKey";
824}
825impl ::buffa::DefaultInstance for AzureStorageKey {
826    fn default_instance() -> &'static Self {
827        static VALUE: ::buffa::__private::OnceBox<AzureStorageKey> = ::buffa::__private::OnceBox::new();
828        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
829    }
830}
831impl ::buffa::MessageName for AzureStorageKey {
832    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
833    const NAME: &'static str = "AzureStorageKey";
834    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AzureStorageKey";
835    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureStorageKey";
836}
837impl ::buffa::Message for AzureStorageKey {
838    /// Returns the total encoded size in bytes.
839    ///
840    /// The result is a `u32`; the protobuf specification requires all
841    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
842    /// compliant message will never overflow this type.
843    #[allow(clippy::let_and_return)]
844    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
845        #[allow(unused_imports)]
846        use ::buffa::Enumeration as _;
847        let mut size = 0u32;
848        if !self.account_name.is_empty() {
849            size += 1u32 + ::buffa::types::string_encoded_len(&self.account_name) as u32;
850        }
851        if !self.account_key.is_empty() {
852            size += 1u32 + ::buffa::types::string_encoded_len(&self.account_key) as u32;
853        }
854        size += self.__buffa_unknown_fields.encoded_len() as u32;
855        size
856    }
857    fn write_to(
858        &self,
859        _cache: &mut ::buffa::SizeCache,
860        buf: &mut impl ::buffa::bytes::BufMut,
861    ) {
862        #[allow(unused_imports)]
863        use ::buffa::Enumeration as _;
864        if !self.account_name.is_empty() {
865            ::buffa::encoding::Tag::new(
866                    1u32,
867                    ::buffa::encoding::WireType::LengthDelimited,
868                )
869                .encode(buf);
870            ::buffa::types::encode_string(&self.account_name, buf);
871        }
872        if !self.account_key.is_empty() {
873            ::buffa::encoding::Tag::new(
874                    2u32,
875                    ::buffa::encoding::WireType::LengthDelimited,
876                )
877                .encode(buf);
878            ::buffa::types::encode_string(&self.account_key, buf);
879        }
880        self.__buffa_unknown_fields.write_to(buf);
881    }
882    fn merge_field(
883        &mut self,
884        tag: ::buffa::encoding::Tag,
885        buf: &mut impl ::buffa::bytes::Buf,
886        depth: u32,
887    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
888        #[allow(unused_imports)]
889        use ::buffa::bytes::Buf as _;
890        #[allow(unused_imports)]
891        use ::buffa::Enumeration as _;
892        match tag.field_number() {
893            1u32 => {
894                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
895                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
896                        field_number: 1u32,
897                        expected: 2u8,
898                        actual: tag.wire_type() as u8,
899                    });
900                }
901                ::buffa::types::merge_string(&mut self.account_name, buf)?;
902            }
903            2u32 => {
904                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
905                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
906                        field_number: 2u32,
907                        expected: 2u8,
908                        actual: tag.wire_type() as u8,
909                    });
910                }
911                ::buffa::types::merge_string(&mut self.account_key, buf)?;
912            }
913            _ => {
914                self.__buffa_unknown_fields
915                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
916            }
917        }
918        ::core::result::Result::Ok(())
919    }
920    fn clear(&mut self) {
921        self.account_name.clear();
922        self.account_key.clear();
923        self.__buffa_unknown_fields.clear();
924    }
925}
926impl ::buffa::ExtensionSet for AzureStorageKey {
927    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.AzureStorageKey";
928    fn unknown_fields(&self) -> &::buffa::UnknownFields {
929        &self.__buffa_unknown_fields
930    }
931    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
932        &mut self.__buffa_unknown_fields
933    }
934}
935impl ::buffa::json_helpers::ProtoElemJson for AzureStorageKey {
936    fn serialize_proto_json<S: ::serde::Serializer>(
937        v: &Self,
938        s: S,
939    ) -> ::core::result::Result<S::Ok, S::Error> {
940        ::serde::Serialize::serialize(v, s)
941    }
942    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
943        d: D,
944    ) -> ::core::result::Result<Self, D::Error> {
945        <Self as ::serde::Deserialize>::deserialize(d)
946    }
947}
948#[doc(hidden)]
949pub const __AZURE_STORAGE_KEY_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
950    type_url: "type.googleapis.com/unitycatalog.credentials.v1.AzureStorageKey",
951    to_json: ::buffa::type_registry::any_to_json::<AzureStorageKey>,
952    from_json: ::buffa::type_registry::any_from_json::<AzureStorageKey>,
953    is_wkt: false,
954};
955/// The AWS IAM role configuration used server-side to call STS AssumeRole.
956///
957/// This is an internal configuration type, not exposed in the public API response.
958/// It stores the static credentials (or ambient credential fallback) used to
959/// authorize the STS:AssumeRole call when vending temporary credentials.
960#[derive(Clone, PartialEq, Default)]
961#[derive(::serde::Serialize, ::serde::Deserialize)]
962#[serde(default)]
963pub struct AwsIamRoleConfig {
964    /// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials.
965    ///
966    /// Field 1: `role_arn`
967    #[serde(
968        rename = "role_arn",
969        alias = "roleArn",
970        with = "::buffa::json_helpers::proto_string",
971        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
972    )]
973    pub role_arn: ::buffa::alloc::string::String,
974    /// The AWS region where STS calls are made. Defaults to "us-east-1" if absent.
975    ///
976    /// Field 2: `region`
977    #[serde(rename = "region", skip_serializing_if = "::core::option::Option::is_none")]
978    pub region: ::core::option::Option<::buffa::alloc::string::String>,
979    /// AWS access key ID used to authorize the STS AssumeRole call.
980    ///
981    /// When set together with secret_access_key, these static credentials are used
982    /// as the base identity to call STS:AssumeRole. When omitted, the server falls
983    /// back to ambient credentials (instance profile, ECS task role, WebIdentity, etc.).
984    ///
985    /// Field 3: `access_key_id`
986    #[serde(
987        rename = "access_key_id",
988        alias = "accessKeyId",
989        skip_serializing_if = "::core::option::Option::is_none"
990    )]
991    pub access_key_id: ::core::option::Option<::buffa::alloc::string::String>,
992    /// AWS secret access key paired with access_key_id.
993    ///
994    /// Field 4: `secret_access_key`
995    #[serde(
996        rename = "secret_access_key",
997        alias = "secretAccessKey",
998        skip_serializing_if = "::core::option::Option::is_none"
999    )]
1000    pub secret_access_key: ::core::option::Option<::buffa::alloc::string::String>,
1001    /// Optional AWS session token for temporary base credentials (e.g. when the
1002    /// caller itself holds STS-vended credentials as the base identity).
1003    ///
1004    /// Field 5: `session_token`
1005    #[serde(
1006        rename = "session_token",
1007        alias = "sessionToken",
1008        skip_serializing_if = "::core::option::Option::is_none"
1009    )]
1010    pub session_token: ::core::option::Option<::buffa::alloc::string::String>,
1011    #[serde(skip)]
1012    #[doc(hidden)]
1013    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1014}
1015impl ::core::fmt::Debug for AwsIamRoleConfig {
1016    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1017        f.debug_struct("AwsIamRoleConfig")
1018            .field("role_arn", &self.role_arn)
1019            .field("region", &self.region)
1020            .field("access_key_id", &self.access_key_id)
1021            .field("secret_access_key", &self.secret_access_key)
1022            .field("session_token", &self.session_token)
1023            .finish()
1024    }
1025}
1026impl AwsIamRoleConfig {
1027    /// Protobuf type URL for this message, for use with `Any::pack` and
1028    /// `Any::unpack_if`.
1029    ///
1030    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1031    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AwsIamRoleConfig";
1032}
1033impl AwsIamRoleConfig {
1034    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1035    #[inline]
1036    ///Sets [`Self::region`] to `Some(value)`, consuming and returning `self`.
1037    pub fn with_region(
1038        mut self,
1039        value: impl Into<::buffa::alloc::string::String>,
1040    ) -> Self {
1041        self.region = Some(value.into());
1042        self
1043    }
1044    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1045    #[inline]
1046    ///Sets [`Self::access_key_id`] to `Some(value)`, consuming and returning `self`.
1047    pub fn with_access_key_id(
1048        mut self,
1049        value: impl Into<::buffa::alloc::string::String>,
1050    ) -> Self {
1051        self.access_key_id = Some(value.into());
1052        self
1053    }
1054    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1055    #[inline]
1056    ///Sets [`Self::secret_access_key`] to `Some(value)`, consuming and returning `self`.
1057    pub fn with_secret_access_key(
1058        mut self,
1059        value: impl Into<::buffa::alloc::string::String>,
1060    ) -> Self {
1061        self.secret_access_key = Some(value.into());
1062        self
1063    }
1064    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1065    #[inline]
1066    ///Sets [`Self::session_token`] to `Some(value)`, consuming and returning `self`.
1067    pub fn with_session_token(
1068        mut self,
1069        value: impl Into<::buffa::alloc::string::String>,
1070    ) -> Self {
1071        self.session_token = Some(value.into());
1072        self
1073    }
1074}
1075impl ::buffa::DefaultInstance for AwsIamRoleConfig {
1076    fn default_instance() -> &'static Self {
1077        static VALUE: ::buffa::__private::OnceBox<AwsIamRoleConfig> = ::buffa::__private::OnceBox::new();
1078        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1079    }
1080}
1081impl ::buffa::MessageName for AwsIamRoleConfig {
1082    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
1083    const NAME: &'static str = "AwsIamRoleConfig";
1084    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AwsIamRoleConfig";
1085    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AwsIamRoleConfig";
1086}
1087impl ::buffa::Message for AwsIamRoleConfig {
1088    /// Returns the total encoded size in bytes.
1089    ///
1090    /// The result is a `u32`; the protobuf specification requires all
1091    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1092    /// compliant message will never overflow this type.
1093    #[allow(clippy::let_and_return)]
1094    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1095        #[allow(unused_imports)]
1096        use ::buffa::Enumeration as _;
1097        let mut size = 0u32;
1098        if !self.role_arn.is_empty() {
1099            size += 1u32 + ::buffa::types::string_encoded_len(&self.role_arn) as u32;
1100        }
1101        if let Some(ref v) = self.region {
1102            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1103        }
1104        if let Some(ref v) = self.access_key_id {
1105            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1106        }
1107        if let Some(ref v) = self.secret_access_key {
1108            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1109        }
1110        if let Some(ref v) = self.session_token {
1111            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1112        }
1113        size += self.__buffa_unknown_fields.encoded_len() as u32;
1114        size
1115    }
1116    fn write_to(
1117        &self,
1118        _cache: &mut ::buffa::SizeCache,
1119        buf: &mut impl ::buffa::bytes::BufMut,
1120    ) {
1121        #[allow(unused_imports)]
1122        use ::buffa::Enumeration as _;
1123        if !self.role_arn.is_empty() {
1124            ::buffa::encoding::Tag::new(
1125                    1u32,
1126                    ::buffa::encoding::WireType::LengthDelimited,
1127                )
1128                .encode(buf);
1129            ::buffa::types::encode_string(&self.role_arn, buf);
1130        }
1131        if let Some(ref v) = self.region {
1132            ::buffa::encoding::Tag::new(
1133                    2u32,
1134                    ::buffa::encoding::WireType::LengthDelimited,
1135                )
1136                .encode(buf);
1137            ::buffa::types::encode_string(v, buf);
1138        }
1139        if let Some(ref v) = self.access_key_id {
1140            ::buffa::encoding::Tag::new(
1141                    3u32,
1142                    ::buffa::encoding::WireType::LengthDelimited,
1143                )
1144                .encode(buf);
1145            ::buffa::types::encode_string(v, buf);
1146        }
1147        if let Some(ref v) = self.secret_access_key {
1148            ::buffa::encoding::Tag::new(
1149                    4u32,
1150                    ::buffa::encoding::WireType::LengthDelimited,
1151                )
1152                .encode(buf);
1153            ::buffa::types::encode_string(v, buf);
1154        }
1155        if let Some(ref v) = self.session_token {
1156            ::buffa::encoding::Tag::new(
1157                    5u32,
1158                    ::buffa::encoding::WireType::LengthDelimited,
1159                )
1160                .encode(buf);
1161            ::buffa::types::encode_string(v, buf);
1162        }
1163        self.__buffa_unknown_fields.write_to(buf);
1164    }
1165    fn merge_field(
1166        &mut self,
1167        tag: ::buffa::encoding::Tag,
1168        buf: &mut impl ::buffa::bytes::Buf,
1169        depth: u32,
1170    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1171        #[allow(unused_imports)]
1172        use ::buffa::bytes::Buf as _;
1173        #[allow(unused_imports)]
1174        use ::buffa::Enumeration as _;
1175        match tag.field_number() {
1176            1u32 => {
1177                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1178                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1179                        field_number: 1u32,
1180                        expected: 2u8,
1181                        actual: tag.wire_type() as u8,
1182                    });
1183                }
1184                ::buffa::types::merge_string(&mut self.role_arn, buf)?;
1185            }
1186            2u32 => {
1187                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1188                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1189                        field_number: 2u32,
1190                        expected: 2u8,
1191                        actual: tag.wire_type() as u8,
1192                    });
1193                }
1194                ::buffa::types::merge_string(
1195                    self.region.get_or_insert_with(::buffa::alloc::string::String::new),
1196                    buf,
1197                )?;
1198            }
1199            3u32 => {
1200                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1201                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1202                        field_number: 3u32,
1203                        expected: 2u8,
1204                        actual: tag.wire_type() as u8,
1205                    });
1206                }
1207                ::buffa::types::merge_string(
1208                    self
1209                        .access_key_id
1210                        .get_or_insert_with(::buffa::alloc::string::String::new),
1211                    buf,
1212                )?;
1213            }
1214            4u32 => {
1215                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1216                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1217                        field_number: 4u32,
1218                        expected: 2u8,
1219                        actual: tag.wire_type() as u8,
1220                    });
1221                }
1222                ::buffa::types::merge_string(
1223                    self
1224                        .secret_access_key
1225                        .get_or_insert_with(::buffa::alloc::string::String::new),
1226                    buf,
1227                )?;
1228            }
1229            5u32 => {
1230                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1231                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1232                        field_number: 5u32,
1233                        expected: 2u8,
1234                        actual: tag.wire_type() as u8,
1235                    });
1236                }
1237                ::buffa::types::merge_string(
1238                    self
1239                        .session_token
1240                        .get_or_insert_with(::buffa::alloc::string::String::new),
1241                    buf,
1242                )?;
1243            }
1244            _ => {
1245                self.__buffa_unknown_fields
1246                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1247            }
1248        }
1249        ::core::result::Result::Ok(())
1250    }
1251    fn clear(&mut self) {
1252        self.role_arn.clear();
1253        self.region = ::core::option::Option::None;
1254        self.access_key_id = ::core::option::Option::None;
1255        self.secret_access_key = ::core::option::Option::None;
1256        self.session_token = ::core::option::Option::None;
1257        self.__buffa_unknown_fields.clear();
1258    }
1259}
1260impl ::buffa::ExtensionSet for AwsIamRoleConfig {
1261    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.AwsIamRoleConfig";
1262    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1263        &self.__buffa_unknown_fields
1264    }
1265    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1266        &mut self.__buffa_unknown_fields
1267    }
1268}
1269impl ::buffa::json_helpers::ProtoElemJson for AwsIamRoleConfig {
1270    fn serialize_proto_json<S: ::serde::Serializer>(
1271        v: &Self,
1272        s: S,
1273    ) -> ::core::result::Result<S::Ok, S::Error> {
1274        ::serde::Serialize::serialize(v, s)
1275    }
1276    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1277        d: D,
1278    ) -> ::core::result::Result<Self, D::Error> {
1279        <Self as ::serde::Deserialize>::deserialize(d)
1280    }
1281}
1282#[doc(hidden)]
1283pub const __AWS_IAM_ROLE_CONFIG_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1284    type_url: "type.googleapis.com/unitycatalog.credentials.v1.AwsIamRoleConfig",
1285    to_json: ::buffa::type_registry::any_to_json::<AwsIamRoleConfig>,
1286    from_json: ::buffa::type_registry::any_from_json::<AwsIamRoleConfig>,
1287    is_wkt: false,
1288};
1289/// The AWS IAM role configuration returned in credential responses.
1290#[derive(Clone, PartialEq, Default)]
1291#[derive(::serde::Serialize, ::serde::Deserialize)]
1292#[serde(default)]
1293pub struct AwsIamRole {
1294    /// The external ID used in role assumption to prevent the confused deputy problem.
1295    ///
1296    /// Field 1: `external_id`
1297    #[serde(
1298        rename = "external_id",
1299        alias = "externalId",
1300        with = "::buffa::json_helpers::proto_string",
1301        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1302    )]
1303    pub external_id: ::buffa::alloc::string::String,
1304    /// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials.
1305    ///
1306    /// Field 2: `role_arn`
1307    #[serde(
1308        rename = "role_arn",
1309        alias = "roleArn",
1310        with = "::buffa::json_helpers::proto_string",
1311        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1312    )]
1313    pub role_arn: ::buffa::alloc::string::String,
1314    /// The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks.
1315    /// This is the identity that is going to assume the AWS IAM role.
1316    ///
1317    /// Field 3: `unity_catalog_iam_arn`
1318    #[serde(
1319        rename = "unity_catalog_iam_arn",
1320        alias = "unityCatalogIamArn",
1321        with = "::buffa::json_helpers::proto_string",
1322        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1323    )]
1324    pub unity_catalog_iam_arn: ::buffa::alloc::string::String,
1325    #[serde(skip)]
1326    #[doc(hidden)]
1327    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1328}
1329impl ::core::fmt::Debug for AwsIamRole {
1330    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1331        f.debug_struct("AwsIamRole")
1332            .field("external_id", &self.external_id)
1333            .field("role_arn", &self.role_arn)
1334            .field("unity_catalog_iam_arn", &self.unity_catalog_iam_arn)
1335            .finish()
1336    }
1337}
1338impl AwsIamRole {
1339    /// Protobuf type URL for this message, for use with `Any::pack` and
1340    /// `Any::unpack_if`.
1341    ///
1342    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1343    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AwsIamRole";
1344}
1345impl ::buffa::DefaultInstance for AwsIamRole {
1346    fn default_instance() -> &'static Self {
1347        static VALUE: ::buffa::__private::OnceBox<AwsIamRole> = ::buffa::__private::OnceBox::new();
1348        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1349    }
1350}
1351impl ::buffa::MessageName for AwsIamRole {
1352    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
1353    const NAME: &'static str = "AwsIamRole";
1354    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AwsIamRole";
1355    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AwsIamRole";
1356}
1357impl ::buffa::Message for AwsIamRole {
1358    /// Returns the total encoded size in bytes.
1359    ///
1360    /// The result is a `u32`; the protobuf specification requires all
1361    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1362    /// compliant message will never overflow this type.
1363    #[allow(clippy::let_and_return)]
1364    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1365        #[allow(unused_imports)]
1366        use ::buffa::Enumeration as _;
1367        let mut size = 0u32;
1368        if !self.external_id.is_empty() {
1369            size += 1u32 + ::buffa::types::string_encoded_len(&self.external_id) as u32;
1370        }
1371        if !self.role_arn.is_empty() {
1372            size += 1u32 + ::buffa::types::string_encoded_len(&self.role_arn) as u32;
1373        }
1374        if !self.unity_catalog_iam_arn.is_empty() {
1375            size
1376                += 1u32
1377                    + ::buffa::types::string_encoded_len(&self.unity_catalog_iam_arn)
1378                        as u32;
1379        }
1380        size += self.__buffa_unknown_fields.encoded_len() as u32;
1381        size
1382    }
1383    fn write_to(
1384        &self,
1385        _cache: &mut ::buffa::SizeCache,
1386        buf: &mut impl ::buffa::bytes::BufMut,
1387    ) {
1388        #[allow(unused_imports)]
1389        use ::buffa::Enumeration as _;
1390        if !self.external_id.is_empty() {
1391            ::buffa::encoding::Tag::new(
1392                    1u32,
1393                    ::buffa::encoding::WireType::LengthDelimited,
1394                )
1395                .encode(buf);
1396            ::buffa::types::encode_string(&self.external_id, buf);
1397        }
1398        if !self.role_arn.is_empty() {
1399            ::buffa::encoding::Tag::new(
1400                    2u32,
1401                    ::buffa::encoding::WireType::LengthDelimited,
1402                )
1403                .encode(buf);
1404            ::buffa::types::encode_string(&self.role_arn, buf);
1405        }
1406        if !self.unity_catalog_iam_arn.is_empty() {
1407            ::buffa::encoding::Tag::new(
1408                    3u32,
1409                    ::buffa::encoding::WireType::LengthDelimited,
1410                )
1411                .encode(buf);
1412            ::buffa::types::encode_string(&self.unity_catalog_iam_arn, buf);
1413        }
1414        self.__buffa_unknown_fields.write_to(buf);
1415    }
1416    fn merge_field(
1417        &mut self,
1418        tag: ::buffa::encoding::Tag,
1419        buf: &mut impl ::buffa::bytes::Buf,
1420        depth: u32,
1421    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1422        #[allow(unused_imports)]
1423        use ::buffa::bytes::Buf as _;
1424        #[allow(unused_imports)]
1425        use ::buffa::Enumeration as _;
1426        match tag.field_number() {
1427            1u32 => {
1428                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1429                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1430                        field_number: 1u32,
1431                        expected: 2u8,
1432                        actual: tag.wire_type() as u8,
1433                    });
1434                }
1435                ::buffa::types::merge_string(&mut self.external_id, buf)?;
1436            }
1437            2u32 => {
1438                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1439                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1440                        field_number: 2u32,
1441                        expected: 2u8,
1442                        actual: tag.wire_type() as u8,
1443                    });
1444                }
1445                ::buffa::types::merge_string(&mut self.role_arn, buf)?;
1446            }
1447            3u32 => {
1448                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1449                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1450                        field_number: 3u32,
1451                        expected: 2u8,
1452                        actual: tag.wire_type() as u8,
1453                    });
1454                }
1455                ::buffa::types::merge_string(&mut self.unity_catalog_iam_arn, buf)?;
1456            }
1457            _ => {
1458                self.__buffa_unknown_fields
1459                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1460            }
1461        }
1462        ::core::result::Result::Ok(())
1463    }
1464    fn clear(&mut self) {
1465        self.external_id.clear();
1466        self.role_arn.clear();
1467        self.unity_catalog_iam_arn.clear();
1468        self.__buffa_unknown_fields.clear();
1469    }
1470}
1471impl ::buffa::ExtensionSet for AwsIamRole {
1472    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.AwsIamRole";
1473    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1474        &self.__buffa_unknown_fields
1475    }
1476    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1477        &mut self.__buffa_unknown_fields
1478    }
1479}
1480impl ::buffa::json_helpers::ProtoElemJson for AwsIamRole {
1481    fn serialize_proto_json<S: ::serde::Serializer>(
1482        v: &Self,
1483        s: S,
1484    ) -> ::core::result::Result<S::Ok, S::Error> {
1485        ::serde::Serialize::serialize(v, s)
1486    }
1487    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1488        d: D,
1489    ) -> ::core::result::Result<Self, D::Error> {
1490        <Self as ::serde::Deserialize>::deserialize(d)
1491    }
1492}
1493#[doc(hidden)]
1494pub const __AWS_IAM_ROLE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1495    type_url: "type.googleapis.com/unitycatalog.credentials.v1.AwsIamRole",
1496    to_json: ::buffa::type_registry::any_to_json::<AwsIamRole>,
1497    from_json: ::buffa::type_registry::any_from_json::<AwsIamRole>,
1498    is_wkt: false,
1499};
1500/// The Databricks managed GCP service account configuration.
1501#[derive(Clone, PartialEq, Default)]
1502#[derive(::serde::Serialize, ::serde::Deserialize)]
1503#[serde(default)]
1504pub struct DatabricksGcpServiceAccount {
1505    /// The Databricks internal ID that represents this managed identity.
1506    ///
1507    /// Field 1: `credential_id`
1508    #[serde(
1509        rename = "credential_id",
1510        alias = "credentialId",
1511        skip_serializing_if = "::core::option::Option::is_none"
1512    )]
1513    pub credential_id: ::core::option::Option<::buffa::alloc::string::String>,
1514    /// The email of the service account.
1515    ///
1516    /// Field 2: `email`
1517    #[serde(rename = "email", skip_serializing_if = "::core::option::Option::is_none")]
1518    pub email: ::core::option::Option<::buffa::alloc::string::String>,
1519    /// The ID that represents the private key for this Service Account.
1520    ///
1521    /// Field 3: `private_key_id`
1522    #[serde(
1523        rename = "private_key_id",
1524        alias = "privateKeyId",
1525        skip_serializing_if = "::core::option::Option::is_none"
1526    )]
1527    pub private_key_id: ::core::option::Option<::buffa::alloc::string::String>,
1528    #[serde(skip)]
1529    #[doc(hidden)]
1530    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1531}
1532impl ::core::fmt::Debug for DatabricksGcpServiceAccount {
1533    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1534        f.debug_struct("DatabricksGcpServiceAccount")
1535            .field("credential_id", &self.credential_id)
1536            .field("email", &self.email)
1537            .field("private_key_id", &self.private_key_id)
1538            .finish()
1539    }
1540}
1541impl DatabricksGcpServiceAccount {
1542    /// Protobuf type URL for this message, for use with `Any::pack` and
1543    /// `Any::unpack_if`.
1544    ///
1545    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1546    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.DatabricksGcpServiceAccount";
1547}
1548impl DatabricksGcpServiceAccount {
1549    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1550    #[inline]
1551    ///Sets [`Self::credential_id`] to `Some(value)`, consuming and returning `self`.
1552    pub fn with_credential_id(
1553        mut self,
1554        value: impl Into<::buffa::alloc::string::String>,
1555    ) -> Self {
1556        self.credential_id = Some(value.into());
1557        self
1558    }
1559    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1560    #[inline]
1561    ///Sets [`Self::email`] to `Some(value)`, consuming and returning `self`.
1562    pub fn with_email(
1563        mut self,
1564        value: impl Into<::buffa::alloc::string::String>,
1565    ) -> Self {
1566        self.email = Some(value.into());
1567        self
1568    }
1569    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1570    #[inline]
1571    ///Sets [`Self::private_key_id`] to `Some(value)`, consuming and returning `self`.
1572    pub fn with_private_key_id(
1573        mut self,
1574        value: impl Into<::buffa::alloc::string::String>,
1575    ) -> Self {
1576        self.private_key_id = Some(value.into());
1577        self
1578    }
1579}
1580impl ::buffa::DefaultInstance for DatabricksGcpServiceAccount {
1581    fn default_instance() -> &'static Self {
1582        static VALUE: ::buffa::__private::OnceBox<DatabricksGcpServiceAccount> = ::buffa::__private::OnceBox::new();
1583        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
1584    }
1585}
1586impl ::buffa::MessageName for DatabricksGcpServiceAccount {
1587    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
1588    const NAME: &'static str = "DatabricksGcpServiceAccount";
1589    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.DatabricksGcpServiceAccount";
1590    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.DatabricksGcpServiceAccount";
1591}
1592impl ::buffa::Message for DatabricksGcpServiceAccount {
1593    /// Returns the total encoded size in bytes.
1594    ///
1595    /// The result is a `u32`; the protobuf specification requires all
1596    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1597    /// compliant message will never overflow this type.
1598    #[allow(clippy::let_and_return)]
1599    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1600        #[allow(unused_imports)]
1601        use ::buffa::Enumeration as _;
1602        let mut size = 0u32;
1603        if let Some(ref v) = self.credential_id {
1604            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1605        }
1606        if let Some(ref v) = self.email {
1607            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1608        }
1609        if let Some(ref v) = self.private_key_id {
1610            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
1611        }
1612        size += self.__buffa_unknown_fields.encoded_len() as u32;
1613        size
1614    }
1615    fn write_to(
1616        &self,
1617        _cache: &mut ::buffa::SizeCache,
1618        buf: &mut impl ::buffa::bytes::BufMut,
1619    ) {
1620        #[allow(unused_imports)]
1621        use ::buffa::Enumeration as _;
1622        if let Some(ref v) = self.credential_id {
1623            ::buffa::encoding::Tag::new(
1624                    1u32,
1625                    ::buffa::encoding::WireType::LengthDelimited,
1626                )
1627                .encode(buf);
1628            ::buffa::types::encode_string(v, buf);
1629        }
1630        if let Some(ref v) = self.email {
1631            ::buffa::encoding::Tag::new(
1632                    2u32,
1633                    ::buffa::encoding::WireType::LengthDelimited,
1634                )
1635                .encode(buf);
1636            ::buffa::types::encode_string(v, buf);
1637        }
1638        if let Some(ref v) = self.private_key_id {
1639            ::buffa::encoding::Tag::new(
1640                    3u32,
1641                    ::buffa::encoding::WireType::LengthDelimited,
1642                )
1643                .encode(buf);
1644            ::buffa::types::encode_string(v, buf);
1645        }
1646        self.__buffa_unknown_fields.write_to(buf);
1647    }
1648    fn merge_field(
1649        &mut self,
1650        tag: ::buffa::encoding::Tag,
1651        buf: &mut impl ::buffa::bytes::Buf,
1652        depth: u32,
1653    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1654        #[allow(unused_imports)]
1655        use ::buffa::bytes::Buf as _;
1656        #[allow(unused_imports)]
1657        use ::buffa::Enumeration as _;
1658        match tag.field_number() {
1659            1u32 => {
1660                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1661                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1662                        field_number: 1u32,
1663                        expected: 2u8,
1664                        actual: tag.wire_type() as u8,
1665                    });
1666                }
1667                ::buffa::types::merge_string(
1668                    self
1669                        .credential_id
1670                        .get_or_insert_with(::buffa::alloc::string::String::new),
1671                    buf,
1672                )?;
1673            }
1674            2u32 => {
1675                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1676                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1677                        field_number: 2u32,
1678                        expected: 2u8,
1679                        actual: tag.wire_type() as u8,
1680                    });
1681                }
1682                ::buffa::types::merge_string(
1683                    self.email.get_or_insert_with(::buffa::alloc::string::String::new),
1684                    buf,
1685                )?;
1686            }
1687            3u32 => {
1688                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
1689                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
1690                        field_number: 3u32,
1691                        expected: 2u8,
1692                        actual: tag.wire_type() as u8,
1693                    });
1694                }
1695                ::buffa::types::merge_string(
1696                    self
1697                        .private_key_id
1698                        .get_or_insert_with(::buffa::alloc::string::String::new),
1699                    buf,
1700                )?;
1701            }
1702            _ => {
1703                self.__buffa_unknown_fields
1704                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
1705            }
1706        }
1707        ::core::result::Result::Ok(())
1708    }
1709    fn clear(&mut self) {
1710        self.credential_id = ::core::option::Option::None;
1711        self.email = ::core::option::Option::None;
1712        self.private_key_id = ::core::option::Option::None;
1713        self.__buffa_unknown_fields.clear();
1714    }
1715}
1716impl ::buffa::ExtensionSet for DatabricksGcpServiceAccount {
1717    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.DatabricksGcpServiceAccount";
1718    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1719        &self.__buffa_unknown_fields
1720    }
1721    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1722        &mut self.__buffa_unknown_fields
1723    }
1724}
1725impl ::buffa::json_helpers::ProtoElemJson for DatabricksGcpServiceAccount {
1726    fn serialize_proto_json<S: ::serde::Serializer>(
1727        v: &Self,
1728        s: S,
1729    ) -> ::core::result::Result<S::Ok, S::Error> {
1730        ::serde::Serialize::serialize(v, s)
1731    }
1732    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1733        d: D,
1734    ) -> ::core::result::Result<Self, D::Error> {
1735        <Self as ::serde::Deserialize>::deserialize(d)
1736    }
1737}
1738#[doc(hidden)]
1739pub const __DATABRICKS_GCP_SERVICE_ACCOUNT_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1740    type_url: "type.googleapis.com/unitycatalog.credentials.v1.DatabricksGcpServiceAccount",
1741    to_json: ::buffa::type_registry::any_to_json::<DatabricksGcpServiceAccount>,
1742    from_json: ::buffa::type_registry::any_from_json::<DatabricksGcpServiceAccount>,
1743    is_wkt: false,
1744};
1745/// A credential used to access external data sources or services.
1746#[derive(Clone, PartialEq, Default)]
1747#[derive(::serde::Serialize, ::serde::Deserialize)]
1748#[serde(default)]
1749pub struct Credential {
1750    /// The credential name.
1751    ///
1752    /// The name must be unique among storage and service credentials within the metastore.
1753    ///
1754    /// Field 1: `name`
1755    #[serde(
1756        rename = "name",
1757        with = "::buffa::json_helpers::proto_string",
1758        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1759    )]
1760    pub name: ::buffa::alloc::string::String,
1761    /// The unique identifier of the credential.
1762    ///
1763    /// Field 2: `id`
1764    #[serde(rename = "id", skip_serializing_if = "::core::option::Option::is_none")]
1765    pub id: ::core::option::Option<::buffa::alloc::string::String>,
1766    /// Indicates the purpose of the credential.
1767    ///
1768    /// Field 3: `purpose`
1769    #[serde(
1770        rename = "purpose",
1771        with = "::buffa::json_helpers::proto_enum",
1772        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1773    )]
1774    pub purpose: ::buffa::EnumValue<Purpose>,
1775    /// Whether the credential is usable only for read operations.
1776    ///
1777    /// Only applicable when purpose is STORAGE.
1778    ///
1779    /// Field 4: `read_only`
1780    #[serde(
1781        rename = "read_only",
1782        alias = "readOnly",
1783        with = "::buffa::json_helpers::proto_bool",
1784        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
1785    )]
1786    pub read_only: bool,
1787    /// Comment associated with the credential.
1788    ///
1789    /// Field 5: `comment`
1790    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
1791    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
1792    /// Username of current owner of credential.
1793    ///
1794    /// Field 6: `owner`
1795    #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
1796    pub owner: ::core::option::Option<::buffa::alloc::string::String>,
1797    /// Time at which this credential was created, in epoch milliseconds.
1798    ///
1799    /// Field 7: `created_at`
1800    #[serde(
1801        rename = "created_at",
1802        alias = "createdAt",
1803        with = "::buffa::json_helpers::opt_int64",
1804        skip_serializing_if = "::core::option::Option::is_none"
1805    )]
1806    pub created_at: ::core::option::Option<i64>,
1807    /// Username of credential creator.
1808    ///
1809    /// Field 8: `created_by`
1810    #[serde(
1811        rename = "created_by",
1812        alias = "createdBy",
1813        skip_serializing_if = "::core::option::Option::is_none"
1814    )]
1815    pub created_by: ::core::option::Option<::buffa::alloc::string::String>,
1816    /// Time at which this credential was last modified, in epoch milliseconds.
1817    ///
1818    /// Field 9: `updated_at`
1819    #[serde(
1820        rename = "updated_at",
1821        alias = "updatedAt",
1822        with = "::buffa::json_helpers::opt_int64",
1823        skip_serializing_if = "::core::option::Option::is_none"
1824    )]
1825    pub updated_at: ::core::option::Option<i64>,
1826    /// Username of user who last modified the credential.
1827    ///
1828    /// Field 10: `updated_by`
1829    #[serde(
1830        rename = "updated_by",
1831        alias = "updatedBy",
1832        skip_serializing_if = "::core::option::Option::is_none"
1833    )]
1834    pub updated_by: ::core::option::Option<::buffa::alloc::string::String>,
1835    /// Whether this credential is the current metastore's root storage credential.
1836    ///
1837    /// Only applicable when purpose is STORAGE.
1838    ///
1839    /// Field 11: `used_for_managed_storage`
1840    #[serde(
1841        rename = "used_for_managed_storage",
1842        alias = "usedForManagedStorage",
1843        with = "::buffa::json_helpers::proto_bool",
1844        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
1845    )]
1846    pub used_for_managed_storage: bool,
1847    /// The full name of the credential.
1848    ///
1849    /// Field 12: `full_name`
1850    #[serde(
1851        rename = "full_name",
1852        alias = "fullName",
1853        with = "::buffa::json_helpers::proto_string",
1854        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1855    )]
1856    pub full_name: ::buffa::alloc::string::String,
1857    /// The Azure service principal configuration.
1858    ///
1859    /// Sealed into the object's inline sensitive blob (envelope-encrypted, redacted
1860    /// from ordinary reads) rather than stored in the searchable properties.
1861    ///
1862    /// Field 100: `azure_service_principal`
1863    #[serde(
1864        rename = "azure_service_principal",
1865        alias = "azureServicePrincipal",
1866        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1867    )]
1868    pub azure_service_principal: ::buffa::MessageField<AzureServicePrincipal>,
1869    /// The Azure managed identity configuration.
1870    ///
1871    /// Field 101: `azure_managed_identity`
1872    #[serde(
1873        rename = "azure_managed_identity",
1874        alias = "azureManagedIdentity",
1875        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1876    )]
1877    pub azure_managed_identity: ::buffa::MessageField<AzureManagedIdentity>,
1878    /// The Azure storage key configuration.
1879    ///
1880    /// Field 102: `azure_storage_key`
1881    #[serde(
1882        rename = "azure_storage_key",
1883        alias = "azureStorageKey",
1884        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1885    )]
1886    pub azure_storage_key: ::buffa::MessageField<AzureStorageKey>,
1887    /// The AWS IAM role configuration.
1888    ///
1889    /// Field 103: `aws_iam_role`
1890    #[serde(
1891        rename = "aws_iam_role",
1892        alias = "awsIamRole",
1893        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1894    )]
1895    pub aws_iam_role: ::buffa::MessageField<AwsIamRoleConfig>,
1896    /// The Databricks managed GCP service account configuration.
1897    ///
1898    /// Field 104: `databricks_gcp_service_account`
1899    #[serde(
1900        rename = "databricks_gcp_service_account",
1901        alias = "databricksGcpServiceAccount",
1902        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1903    )]
1904    pub databricks_gcp_service_account: ::buffa::MessageField<
1905        DatabricksGcpServiceAccount,
1906    >,
1907    #[serde(skip)]
1908    #[doc(hidden)]
1909    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1910}
1911impl ::core::fmt::Debug for Credential {
1912    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1913        f.debug_struct("Credential")
1914            .field("name", &self.name)
1915            .field("id", &self.id)
1916            .field("purpose", &self.purpose)
1917            .field("read_only", &self.read_only)
1918            .field("comment", &self.comment)
1919            .field("owner", &self.owner)
1920            .field("created_at", &self.created_at)
1921            .field("created_by", &self.created_by)
1922            .field("updated_at", &self.updated_at)
1923            .field("updated_by", &self.updated_by)
1924            .field("used_for_managed_storage", &self.used_for_managed_storage)
1925            .field("full_name", &self.full_name)
1926            .field("azure_service_principal", &self.azure_service_principal)
1927            .field("azure_managed_identity", &self.azure_managed_identity)
1928            .field("azure_storage_key", &self.azure_storage_key)
1929            .field("aws_iam_role", &self.aws_iam_role)
1930            .field(
1931                "databricks_gcp_service_account",
1932                &self.databricks_gcp_service_account,
1933            )
1934            .finish()
1935    }
1936}
1937impl Credential {
1938    /// Protobuf type URL for this message, for use with `Any::pack` and
1939    /// `Any::unpack_if`.
1940    ///
1941    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1942    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.Credential";
1943}
1944impl Credential {
1945    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1946    #[inline]
1947    ///Sets [`Self::id`] to `Some(value)`, consuming and returning `self`.
1948    pub fn with_id(mut self, value: impl Into<::buffa::alloc::string::String>) -> Self {
1949        self.id = Some(value.into());
1950        self
1951    }
1952    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1953    #[inline]
1954    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
1955    pub fn with_comment(
1956        mut self,
1957        value: impl Into<::buffa::alloc::string::String>,
1958    ) -> Self {
1959        self.comment = Some(value.into());
1960        self
1961    }
1962    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1963    #[inline]
1964    ///Sets [`Self::owner`] to `Some(value)`, consuming and returning `self`.
1965    pub fn with_owner(
1966        mut self,
1967        value: impl Into<::buffa::alloc::string::String>,
1968    ) -> Self {
1969        self.owner = Some(value.into());
1970        self
1971    }
1972    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1973    #[inline]
1974    ///Sets [`Self::created_at`] to `Some(value)`, consuming and returning `self`.
1975    pub fn with_created_at(mut self, value: i64) -> Self {
1976        self.created_at = Some(value);
1977        self
1978    }
1979    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1980    #[inline]
1981    ///Sets [`Self::created_by`] to `Some(value)`, consuming and returning `self`.
1982    pub fn with_created_by(
1983        mut self,
1984        value: impl Into<::buffa::alloc::string::String>,
1985    ) -> Self {
1986        self.created_by = Some(value.into());
1987        self
1988    }
1989    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1990    #[inline]
1991    ///Sets [`Self::updated_at`] to `Some(value)`, consuming and returning `self`.
1992    pub fn with_updated_at(mut self, value: i64) -> Self {
1993        self.updated_at = Some(value);
1994        self
1995    }
1996    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
1997    #[inline]
1998    ///Sets [`Self::updated_by`] to `Some(value)`, consuming and returning `self`.
1999    pub fn with_updated_by(
2000        mut self,
2001        value: impl Into<::buffa::alloc::string::String>,
2002    ) -> Self {
2003        self.updated_by = Some(value.into());
2004        self
2005    }
2006}
2007impl ::buffa::DefaultInstance for Credential {
2008    fn default_instance() -> &'static Self {
2009        static VALUE: ::buffa::__private::OnceBox<Credential> = ::buffa::__private::OnceBox::new();
2010        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2011    }
2012}
2013impl ::buffa::MessageName for Credential {
2014    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
2015    const NAME: &'static str = "Credential";
2016    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.Credential";
2017    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.Credential";
2018}
2019impl ::buffa::Message for Credential {
2020    /// Returns the total encoded size in bytes.
2021    ///
2022    /// The result is a `u32`; the protobuf specification requires all
2023    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2024    /// compliant message will never overflow this type.
2025    #[allow(clippy::let_and_return)]
2026    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2027        #[allow(unused_imports)]
2028        use ::buffa::Enumeration as _;
2029        let mut size = 0u32;
2030        if !self.name.is_empty() {
2031            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
2032        }
2033        if let Some(ref v) = self.id {
2034            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2035        }
2036        {
2037            let val = self.purpose.to_i32();
2038            if val != 0 {
2039                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2040            }
2041        }
2042        if self.read_only {
2043            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2044        }
2045        if let Some(ref v) = self.comment {
2046            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2047        }
2048        if let Some(ref v) = self.owner {
2049            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2050        }
2051        if let Some(v) = self.created_at {
2052            size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
2053        }
2054        if let Some(ref v) = self.created_by {
2055            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2056        }
2057        if let Some(v) = self.updated_at {
2058            size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
2059        }
2060        if let Some(ref v) = self.updated_by {
2061            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2062        }
2063        if self.used_for_managed_storage {
2064            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
2065        }
2066        if !self.full_name.is_empty() {
2067            size += 1u32 + ::buffa::types::string_encoded_len(&self.full_name) as u32;
2068        }
2069        if self.azure_service_principal.is_set() {
2070            let __slot = __cache.reserve();
2071            let inner_size = self.azure_service_principal.compute_size(__cache);
2072            __cache.set(__slot, inner_size);
2073            size
2074                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2075                    + inner_size;
2076        }
2077        if self.azure_managed_identity.is_set() {
2078            let __slot = __cache.reserve();
2079            let inner_size = self.azure_managed_identity.compute_size(__cache);
2080            __cache.set(__slot, inner_size);
2081            size
2082                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2083                    + inner_size;
2084        }
2085        if self.azure_storage_key.is_set() {
2086            let __slot = __cache.reserve();
2087            let inner_size = self.azure_storage_key.compute_size(__cache);
2088            __cache.set(__slot, inner_size);
2089            size
2090                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2091                    + inner_size;
2092        }
2093        if self.aws_iam_role.is_set() {
2094            let __slot = __cache.reserve();
2095            let inner_size = self.aws_iam_role.compute_size(__cache);
2096            __cache.set(__slot, inner_size);
2097            size
2098                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2099                    + inner_size;
2100        }
2101        if self.databricks_gcp_service_account.is_set() {
2102            let __slot = __cache.reserve();
2103            let inner_size = self.databricks_gcp_service_account.compute_size(__cache);
2104            __cache.set(__slot, inner_size);
2105            size
2106                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2107                    + inner_size;
2108        }
2109        size += self.__buffa_unknown_fields.encoded_len() as u32;
2110        size
2111    }
2112    fn write_to(
2113        &self,
2114        __cache: &mut ::buffa::SizeCache,
2115        buf: &mut impl ::buffa::bytes::BufMut,
2116    ) {
2117        #[allow(unused_imports)]
2118        use ::buffa::Enumeration as _;
2119        if !self.name.is_empty() {
2120            ::buffa::encoding::Tag::new(
2121                    1u32,
2122                    ::buffa::encoding::WireType::LengthDelimited,
2123                )
2124                .encode(buf);
2125            ::buffa::types::encode_string(&self.name, buf);
2126        }
2127        if let Some(ref v) = self.id {
2128            ::buffa::encoding::Tag::new(
2129                    2u32,
2130                    ::buffa::encoding::WireType::LengthDelimited,
2131                )
2132                .encode(buf);
2133            ::buffa::types::encode_string(v, buf);
2134        }
2135        {
2136            let val = self.purpose.to_i32();
2137            if val != 0 {
2138                ::buffa::encoding::Tag::new(3u32, ::buffa::encoding::WireType::Varint)
2139                    .encode(buf);
2140                ::buffa::types::encode_int32(val, buf);
2141            }
2142        }
2143        if self.read_only {
2144            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
2145                .encode(buf);
2146            ::buffa::types::encode_bool(self.read_only, buf);
2147        }
2148        if let Some(ref v) = self.comment {
2149            ::buffa::encoding::Tag::new(
2150                    5u32,
2151                    ::buffa::encoding::WireType::LengthDelimited,
2152                )
2153                .encode(buf);
2154            ::buffa::types::encode_string(v, buf);
2155        }
2156        if let Some(ref v) = self.owner {
2157            ::buffa::encoding::Tag::new(
2158                    6u32,
2159                    ::buffa::encoding::WireType::LengthDelimited,
2160                )
2161                .encode(buf);
2162            ::buffa::types::encode_string(v, buf);
2163        }
2164        if let Some(v) = self.created_at {
2165            ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
2166                .encode(buf);
2167            ::buffa::types::encode_int64(v, buf);
2168        }
2169        if let Some(ref v) = self.created_by {
2170            ::buffa::encoding::Tag::new(
2171                    8u32,
2172                    ::buffa::encoding::WireType::LengthDelimited,
2173                )
2174                .encode(buf);
2175            ::buffa::types::encode_string(v, buf);
2176        }
2177        if let Some(v) = self.updated_at {
2178            ::buffa::encoding::Tag::new(9u32, ::buffa::encoding::WireType::Varint)
2179                .encode(buf);
2180            ::buffa::types::encode_int64(v, buf);
2181        }
2182        if let Some(ref v) = self.updated_by {
2183            ::buffa::encoding::Tag::new(
2184                    10u32,
2185                    ::buffa::encoding::WireType::LengthDelimited,
2186                )
2187                .encode(buf);
2188            ::buffa::types::encode_string(v, buf);
2189        }
2190        if self.used_for_managed_storage {
2191            ::buffa::encoding::Tag::new(11u32, ::buffa::encoding::WireType::Varint)
2192                .encode(buf);
2193            ::buffa::types::encode_bool(self.used_for_managed_storage, buf);
2194        }
2195        if !self.full_name.is_empty() {
2196            ::buffa::encoding::Tag::new(
2197                    12u32,
2198                    ::buffa::encoding::WireType::LengthDelimited,
2199                )
2200                .encode(buf);
2201            ::buffa::types::encode_string(&self.full_name, buf);
2202        }
2203        if self.azure_service_principal.is_set() {
2204            ::buffa::encoding::Tag::new(
2205                    100u32,
2206                    ::buffa::encoding::WireType::LengthDelimited,
2207                )
2208                .encode(buf);
2209            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2210            self.azure_service_principal.write_to(__cache, buf);
2211        }
2212        if self.azure_managed_identity.is_set() {
2213            ::buffa::encoding::Tag::new(
2214                    101u32,
2215                    ::buffa::encoding::WireType::LengthDelimited,
2216                )
2217                .encode(buf);
2218            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2219            self.azure_managed_identity.write_to(__cache, buf);
2220        }
2221        if self.azure_storage_key.is_set() {
2222            ::buffa::encoding::Tag::new(
2223                    102u32,
2224                    ::buffa::encoding::WireType::LengthDelimited,
2225                )
2226                .encode(buf);
2227            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2228            self.azure_storage_key.write_to(__cache, buf);
2229        }
2230        if self.aws_iam_role.is_set() {
2231            ::buffa::encoding::Tag::new(
2232                    103u32,
2233                    ::buffa::encoding::WireType::LengthDelimited,
2234                )
2235                .encode(buf);
2236            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2237            self.aws_iam_role.write_to(__cache, buf);
2238        }
2239        if self.databricks_gcp_service_account.is_set() {
2240            ::buffa::encoding::Tag::new(
2241                    104u32,
2242                    ::buffa::encoding::WireType::LengthDelimited,
2243                )
2244                .encode(buf);
2245            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2246            self.databricks_gcp_service_account.write_to(__cache, buf);
2247        }
2248        self.__buffa_unknown_fields.write_to(buf);
2249    }
2250    fn merge_field(
2251        &mut self,
2252        tag: ::buffa::encoding::Tag,
2253        buf: &mut impl ::buffa::bytes::Buf,
2254        depth: u32,
2255    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2256        #[allow(unused_imports)]
2257        use ::buffa::bytes::Buf as _;
2258        #[allow(unused_imports)]
2259        use ::buffa::Enumeration as _;
2260        match tag.field_number() {
2261            1u32 => {
2262                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2263                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2264                        field_number: 1u32,
2265                        expected: 2u8,
2266                        actual: tag.wire_type() as u8,
2267                    });
2268                }
2269                ::buffa::types::merge_string(&mut self.name, buf)?;
2270            }
2271            2u32 => {
2272                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2273                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2274                        field_number: 2u32,
2275                        expected: 2u8,
2276                        actual: tag.wire_type() as u8,
2277                    });
2278                }
2279                ::buffa::types::merge_string(
2280                    self.id.get_or_insert_with(::buffa::alloc::string::String::new),
2281                    buf,
2282                )?;
2283            }
2284            3u32 => {
2285                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2286                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2287                        field_number: 3u32,
2288                        expected: 0u8,
2289                        actual: tag.wire_type() as u8,
2290                    });
2291                }
2292                self.purpose = ::buffa::EnumValue::from(
2293                    ::buffa::types::decode_int32(buf)?,
2294                );
2295            }
2296            4u32 => {
2297                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2298                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2299                        field_number: 4u32,
2300                        expected: 0u8,
2301                        actual: tag.wire_type() as u8,
2302                    });
2303                }
2304                self.read_only = ::buffa::types::decode_bool(buf)?;
2305            }
2306            5u32 => {
2307                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2308                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2309                        field_number: 5u32,
2310                        expected: 2u8,
2311                        actual: tag.wire_type() as u8,
2312                    });
2313                }
2314                ::buffa::types::merge_string(
2315                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
2316                    buf,
2317                )?;
2318            }
2319            6u32 => {
2320                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2321                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2322                        field_number: 6u32,
2323                        expected: 2u8,
2324                        actual: tag.wire_type() as u8,
2325                    });
2326                }
2327                ::buffa::types::merge_string(
2328                    self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
2329                    buf,
2330                )?;
2331            }
2332            7u32 => {
2333                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2334                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2335                        field_number: 7u32,
2336                        expected: 0u8,
2337                        actual: tag.wire_type() as u8,
2338                    });
2339                }
2340                self.created_at = ::core::option::Option::Some(
2341                    ::buffa::types::decode_int64(buf)?,
2342                );
2343            }
2344            8u32 => {
2345                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2346                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2347                        field_number: 8u32,
2348                        expected: 2u8,
2349                        actual: tag.wire_type() as u8,
2350                    });
2351                }
2352                ::buffa::types::merge_string(
2353                    self
2354                        .created_by
2355                        .get_or_insert_with(::buffa::alloc::string::String::new),
2356                    buf,
2357                )?;
2358            }
2359            9u32 => {
2360                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2361                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2362                        field_number: 9u32,
2363                        expected: 0u8,
2364                        actual: tag.wire_type() as u8,
2365                    });
2366                }
2367                self.updated_at = ::core::option::Option::Some(
2368                    ::buffa::types::decode_int64(buf)?,
2369                );
2370            }
2371            10u32 => {
2372                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2373                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2374                        field_number: 10u32,
2375                        expected: 2u8,
2376                        actual: tag.wire_type() as u8,
2377                    });
2378                }
2379                ::buffa::types::merge_string(
2380                    self
2381                        .updated_by
2382                        .get_or_insert_with(::buffa::alloc::string::String::new),
2383                    buf,
2384                )?;
2385            }
2386            11u32 => {
2387                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2388                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2389                        field_number: 11u32,
2390                        expected: 0u8,
2391                        actual: tag.wire_type() as u8,
2392                    });
2393                }
2394                self.used_for_managed_storage = ::buffa::types::decode_bool(buf)?;
2395            }
2396            12u32 => {
2397                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2398                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2399                        field_number: 12u32,
2400                        expected: 2u8,
2401                        actual: tag.wire_type() as u8,
2402                    });
2403                }
2404                ::buffa::types::merge_string(&mut self.full_name, buf)?;
2405            }
2406            100u32 => {
2407                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2408                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2409                        field_number: 100u32,
2410                        expected: 2u8,
2411                        actual: tag.wire_type() as u8,
2412                    });
2413                }
2414                ::buffa::Message::merge_length_delimited(
2415                    self.azure_service_principal.get_or_insert_default(),
2416                    buf,
2417                    depth,
2418                )?;
2419            }
2420            101u32 => {
2421                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2422                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2423                        field_number: 101u32,
2424                        expected: 2u8,
2425                        actual: tag.wire_type() as u8,
2426                    });
2427                }
2428                ::buffa::Message::merge_length_delimited(
2429                    self.azure_managed_identity.get_or_insert_default(),
2430                    buf,
2431                    depth,
2432                )?;
2433            }
2434            102u32 => {
2435                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2436                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2437                        field_number: 102u32,
2438                        expected: 2u8,
2439                        actual: tag.wire_type() as u8,
2440                    });
2441                }
2442                ::buffa::Message::merge_length_delimited(
2443                    self.azure_storage_key.get_or_insert_default(),
2444                    buf,
2445                    depth,
2446                )?;
2447            }
2448            103u32 => {
2449                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2450                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2451                        field_number: 103u32,
2452                        expected: 2u8,
2453                        actual: tag.wire_type() as u8,
2454                    });
2455                }
2456                ::buffa::Message::merge_length_delimited(
2457                    self.aws_iam_role.get_or_insert_default(),
2458                    buf,
2459                    depth,
2460                )?;
2461            }
2462            104u32 => {
2463                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2464                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2465                        field_number: 104u32,
2466                        expected: 2u8,
2467                        actual: tag.wire_type() as u8,
2468                    });
2469                }
2470                ::buffa::Message::merge_length_delimited(
2471                    self.databricks_gcp_service_account.get_or_insert_default(),
2472                    buf,
2473                    depth,
2474                )?;
2475            }
2476            _ => {
2477                self.__buffa_unknown_fields
2478                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2479            }
2480        }
2481        ::core::result::Result::Ok(())
2482    }
2483    fn clear(&mut self) {
2484        self.name.clear();
2485        self.id = ::core::option::Option::None;
2486        self.purpose = ::buffa::EnumValue::from(0);
2487        self.read_only = false;
2488        self.comment = ::core::option::Option::None;
2489        self.owner = ::core::option::Option::None;
2490        self.created_at = ::core::option::Option::None;
2491        self.created_by = ::core::option::Option::None;
2492        self.updated_at = ::core::option::Option::None;
2493        self.updated_by = ::core::option::Option::None;
2494        self.used_for_managed_storage = false;
2495        self.full_name.clear();
2496        self.azure_service_principal = ::buffa::MessageField::none();
2497        self.azure_managed_identity = ::buffa::MessageField::none();
2498        self.azure_storage_key = ::buffa::MessageField::none();
2499        self.aws_iam_role = ::buffa::MessageField::none();
2500        self.databricks_gcp_service_account = ::buffa::MessageField::none();
2501        self.__buffa_unknown_fields.clear();
2502    }
2503}
2504impl ::buffa::ExtensionSet for Credential {
2505    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.Credential";
2506    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2507        &self.__buffa_unknown_fields
2508    }
2509    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2510        &mut self.__buffa_unknown_fields
2511    }
2512}
2513impl ::buffa::json_helpers::ProtoElemJson for Credential {
2514    fn serialize_proto_json<S: ::serde::Serializer>(
2515        v: &Self,
2516        s: S,
2517    ) -> ::core::result::Result<S::Ok, S::Error> {
2518        ::serde::Serialize::serialize(v, s)
2519    }
2520    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2521        d: D,
2522    ) -> ::core::result::Result<Self, D::Error> {
2523        <Self as ::serde::Deserialize>::deserialize(d)
2524    }
2525}
2526#[doc(hidden)]
2527pub const __CREDENTIAL_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2528    type_url: "type.googleapis.com/unitycatalog.credentials.v1.Credential",
2529    to_json: ::buffa::type_registry::any_to_json::<Credential>,
2530    from_json: ::buffa::type_registry::any_from_json::<Credential>,
2531    is_wkt: false,
2532};
2533#[derive(Clone, PartialEq, Default)]
2534#[derive(::serde::Serialize, ::serde::Deserialize)]
2535#[serde(default)]
2536pub struct ListCredentialsRequest {
2537    /// Return only credentials for the specified purpose.
2538    ///
2539    /// Field 1: `purpose`
2540    #[serde(
2541        rename = "purpose",
2542        with = "::buffa::json_helpers::opt_enum",
2543        skip_serializing_if = "::core::option::Option::is_none"
2544    )]
2545    pub purpose: ::core::option::Option<::buffa::EnumValue<Purpose>>,
2546    /// The maximum number of results per page that should be returned.
2547    ///
2548    /// Field 2: `max_results`
2549    #[serde(
2550        rename = "max_results",
2551        alias = "maxResults",
2552        with = "::buffa::json_helpers::opt_int32",
2553        skip_serializing_if = "::core::option::Option::is_none"
2554    )]
2555    pub max_results: ::core::option::Option<i32>,
2556    /// Opaque pagination token to go to next page based on previous query.
2557    ///
2558    /// Field 3: `page_token`
2559    #[serde(
2560        rename = "page_token",
2561        alias = "pageToken",
2562        skip_serializing_if = "::core::option::Option::is_none"
2563    )]
2564    pub page_token: ::core::option::Option<::buffa::alloc::string::String>,
2565    #[serde(skip)]
2566    #[doc(hidden)]
2567    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2568}
2569impl ::core::fmt::Debug for ListCredentialsRequest {
2570    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2571        f.debug_struct("ListCredentialsRequest")
2572            .field("purpose", &self.purpose)
2573            .field("max_results", &self.max_results)
2574            .field("page_token", &self.page_token)
2575            .finish()
2576    }
2577}
2578impl ListCredentialsRequest {
2579    /// Protobuf type URL for this message, for use with `Any::pack` and
2580    /// `Any::unpack_if`.
2581    ///
2582    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2583    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.ListCredentialsRequest";
2584}
2585impl ListCredentialsRequest {
2586    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2587    #[inline]
2588    ///Sets [`Self::purpose`] to `Some(value)`, consuming and returning `self`.
2589    pub fn with_purpose(
2590        mut self,
2591        value: impl Into<::buffa::EnumValue<Purpose>>,
2592    ) -> Self {
2593        self.purpose = Some(value.into());
2594        self
2595    }
2596    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2597    #[inline]
2598    ///Sets [`Self::max_results`] to `Some(value)`, consuming and returning `self`.
2599    pub fn with_max_results(mut self, value: i32) -> Self {
2600        self.max_results = Some(value);
2601        self
2602    }
2603    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2604    #[inline]
2605    ///Sets [`Self::page_token`] to `Some(value)`, consuming and returning `self`.
2606    pub fn with_page_token(
2607        mut self,
2608        value: impl Into<::buffa::alloc::string::String>,
2609    ) -> Self {
2610        self.page_token = Some(value.into());
2611        self
2612    }
2613}
2614impl ::buffa::DefaultInstance for ListCredentialsRequest {
2615    fn default_instance() -> &'static Self {
2616        static VALUE: ::buffa::__private::OnceBox<ListCredentialsRequest> = ::buffa::__private::OnceBox::new();
2617        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2618    }
2619}
2620impl ::buffa::MessageName for ListCredentialsRequest {
2621    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
2622    const NAME: &'static str = "ListCredentialsRequest";
2623    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.ListCredentialsRequest";
2624    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.ListCredentialsRequest";
2625}
2626impl ::buffa::Message for ListCredentialsRequest {
2627    /// Returns the total encoded size in bytes.
2628    ///
2629    /// The result is a `u32`; the protobuf specification requires all
2630    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2631    /// compliant message will never overflow this type.
2632    #[allow(clippy::let_and_return)]
2633    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2634        #[allow(unused_imports)]
2635        use ::buffa::Enumeration as _;
2636        let mut size = 0u32;
2637        if let Some(ref v) = self.purpose {
2638            size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
2639        }
2640        if let Some(v) = self.max_results {
2641            size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
2642        }
2643        if let Some(ref v) = self.page_token {
2644            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2645        }
2646        size += self.__buffa_unknown_fields.encoded_len() as u32;
2647        size
2648    }
2649    fn write_to(
2650        &self,
2651        _cache: &mut ::buffa::SizeCache,
2652        buf: &mut impl ::buffa::bytes::BufMut,
2653    ) {
2654        #[allow(unused_imports)]
2655        use ::buffa::Enumeration as _;
2656        if let Some(ref v) = self.purpose {
2657            ::buffa::encoding::Tag::new(1u32, ::buffa::encoding::WireType::Varint)
2658                .encode(buf);
2659            ::buffa::types::encode_int32(v.to_i32(), buf);
2660        }
2661        if let Some(v) = self.max_results {
2662            ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
2663                .encode(buf);
2664            ::buffa::types::encode_int32(v, buf);
2665        }
2666        if let Some(ref v) = self.page_token {
2667            ::buffa::encoding::Tag::new(
2668                    3u32,
2669                    ::buffa::encoding::WireType::LengthDelimited,
2670                )
2671                .encode(buf);
2672            ::buffa::types::encode_string(v, buf);
2673        }
2674        self.__buffa_unknown_fields.write_to(buf);
2675    }
2676    fn merge_field(
2677        &mut self,
2678        tag: ::buffa::encoding::Tag,
2679        buf: &mut impl ::buffa::bytes::Buf,
2680        depth: u32,
2681    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2682        #[allow(unused_imports)]
2683        use ::buffa::bytes::Buf as _;
2684        #[allow(unused_imports)]
2685        use ::buffa::Enumeration as _;
2686        match tag.field_number() {
2687            1u32 => {
2688                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2689                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2690                        field_number: 1u32,
2691                        expected: 0u8,
2692                        actual: tag.wire_type() as u8,
2693                    });
2694                }
2695                self.purpose = ::core::option::Option::Some(
2696                    ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?),
2697                );
2698            }
2699            2u32 => {
2700                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
2701                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2702                        field_number: 2u32,
2703                        expected: 0u8,
2704                        actual: tag.wire_type() as u8,
2705                    });
2706                }
2707                self.max_results = ::core::option::Option::Some(
2708                    ::buffa::types::decode_int32(buf)?,
2709                );
2710            }
2711            3u32 => {
2712                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2713                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2714                        field_number: 3u32,
2715                        expected: 2u8,
2716                        actual: tag.wire_type() as u8,
2717                    });
2718                }
2719                ::buffa::types::merge_string(
2720                    self
2721                        .page_token
2722                        .get_or_insert_with(::buffa::alloc::string::String::new),
2723                    buf,
2724                )?;
2725            }
2726            _ => {
2727                self.__buffa_unknown_fields
2728                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2729            }
2730        }
2731        ::core::result::Result::Ok(())
2732    }
2733    fn clear(&mut self) {
2734        self.purpose = ::core::option::Option::None;
2735        self.max_results = ::core::option::Option::None;
2736        self.page_token = ::core::option::Option::None;
2737        self.__buffa_unknown_fields.clear();
2738    }
2739}
2740impl ::buffa::ExtensionSet for ListCredentialsRequest {
2741    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.ListCredentialsRequest";
2742    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2743        &self.__buffa_unknown_fields
2744    }
2745    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2746        &mut self.__buffa_unknown_fields
2747    }
2748}
2749impl ::buffa::json_helpers::ProtoElemJson for ListCredentialsRequest {
2750    fn serialize_proto_json<S: ::serde::Serializer>(
2751        v: &Self,
2752        s: S,
2753    ) -> ::core::result::Result<S::Ok, S::Error> {
2754        ::serde::Serialize::serialize(v, s)
2755    }
2756    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2757        d: D,
2758    ) -> ::core::result::Result<Self, D::Error> {
2759        <Self as ::serde::Deserialize>::deserialize(d)
2760    }
2761}
2762#[doc(hidden)]
2763pub const __LIST_CREDENTIALS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2764    type_url: "type.googleapis.com/unitycatalog.credentials.v1.ListCredentialsRequest",
2765    to_json: ::buffa::type_registry::any_to_json::<ListCredentialsRequest>,
2766    from_json: ::buffa::type_registry::any_from_json::<ListCredentialsRequest>,
2767    is_wkt: false,
2768};
2769#[derive(Clone, PartialEq, Default)]
2770#[derive(::serde::Serialize, ::serde::Deserialize)]
2771#[serde(default)]
2772pub struct ListCredentialsResponse {
2773    /// The credentials returned.
2774    ///
2775    /// Field 1: `credentials`
2776    #[serde(
2777        rename = "credentials",
2778        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2779        deserialize_with = "::buffa::json_helpers::null_as_default"
2780    )]
2781    pub credentials: ::buffa::alloc::vec::Vec<Credential>,
2782    /// The next_page_token value to include in the next List request.
2783    ///
2784    /// Field 2: `next_page_token`
2785    #[serde(
2786        rename = "next_page_token",
2787        alias = "nextPageToken",
2788        skip_serializing_if = "::core::option::Option::is_none"
2789    )]
2790    pub next_page_token: ::core::option::Option<::buffa::alloc::string::String>,
2791    #[serde(skip)]
2792    #[doc(hidden)]
2793    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2794}
2795impl ::core::fmt::Debug for ListCredentialsResponse {
2796    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2797        f.debug_struct("ListCredentialsResponse")
2798            .field("credentials", &self.credentials)
2799            .field("next_page_token", &self.next_page_token)
2800            .finish()
2801    }
2802}
2803impl ListCredentialsResponse {
2804    /// Protobuf type URL for this message, for use with `Any::pack` and
2805    /// `Any::unpack_if`.
2806    ///
2807    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2808    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.ListCredentialsResponse";
2809}
2810impl ListCredentialsResponse {
2811    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
2812    #[inline]
2813    ///Sets [`Self::next_page_token`] to `Some(value)`, consuming and returning `self`.
2814    pub fn with_next_page_token(
2815        mut self,
2816        value: impl Into<::buffa::alloc::string::String>,
2817    ) -> Self {
2818        self.next_page_token = Some(value.into());
2819        self
2820    }
2821}
2822impl ::buffa::DefaultInstance for ListCredentialsResponse {
2823    fn default_instance() -> &'static Self {
2824        static VALUE: ::buffa::__private::OnceBox<ListCredentialsResponse> = ::buffa::__private::OnceBox::new();
2825        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
2826    }
2827}
2828impl ::buffa::MessageName for ListCredentialsResponse {
2829    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
2830    const NAME: &'static str = "ListCredentialsResponse";
2831    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.ListCredentialsResponse";
2832    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.ListCredentialsResponse";
2833}
2834impl ::buffa::Message for ListCredentialsResponse {
2835    /// Returns the total encoded size in bytes.
2836    ///
2837    /// The result is a `u32`; the protobuf specification requires all
2838    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2839    /// compliant message will never overflow this type.
2840    #[allow(clippy::let_and_return)]
2841    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2842        #[allow(unused_imports)]
2843        use ::buffa::Enumeration as _;
2844        let mut size = 0u32;
2845        for v in &self.credentials {
2846            let __slot = __cache.reserve();
2847            let inner_size = v.compute_size(__cache);
2848            __cache.set(__slot, inner_size);
2849            size
2850                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2851                    + inner_size;
2852        }
2853        if let Some(ref v) = self.next_page_token {
2854            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
2855        }
2856        size += self.__buffa_unknown_fields.encoded_len() as u32;
2857        size
2858    }
2859    fn write_to(
2860        &self,
2861        __cache: &mut ::buffa::SizeCache,
2862        buf: &mut impl ::buffa::bytes::BufMut,
2863    ) {
2864        #[allow(unused_imports)]
2865        use ::buffa::Enumeration as _;
2866        for v in &self.credentials {
2867            ::buffa::encoding::Tag::new(
2868                    1u32,
2869                    ::buffa::encoding::WireType::LengthDelimited,
2870                )
2871                .encode(buf);
2872            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
2873            v.write_to(__cache, buf);
2874        }
2875        if let Some(ref v) = self.next_page_token {
2876            ::buffa::encoding::Tag::new(
2877                    2u32,
2878                    ::buffa::encoding::WireType::LengthDelimited,
2879                )
2880                .encode(buf);
2881            ::buffa::types::encode_string(v, buf);
2882        }
2883        self.__buffa_unknown_fields.write_to(buf);
2884    }
2885    fn merge_field(
2886        &mut self,
2887        tag: ::buffa::encoding::Tag,
2888        buf: &mut impl ::buffa::bytes::Buf,
2889        depth: u32,
2890    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2891        #[allow(unused_imports)]
2892        use ::buffa::bytes::Buf as _;
2893        #[allow(unused_imports)]
2894        use ::buffa::Enumeration as _;
2895        match tag.field_number() {
2896            1u32 => {
2897                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2898                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2899                        field_number: 1u32,
2900                        expected: 2u8,
2901                        actual: tag.wire_type() as u8,
2902                    });
2903                }
2904                let mut elem = ::core::default::Default::default();
2905                ::buffa::Message::merge_length_delimited(&mut elem, buf, depth)?;
2906                self.credentials.push(elem);
2907            }
2908            2u32 => {
2909                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
2910                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
2911                        field_number: 2u32,
2912                        expected: 2u8,
2913                        actual: tag.wire_type() as u8,
2914                    });
2915                }
2916                ::buffa::types::merge_string(
2917                    self
2918                        .next_page_token
2919                        .get_or_insert_with(::buffa::alloc::string::String::new),
2920                    buf,
2921                )?;
2922            }
2923            _ => {
2924                self.__buffa_unknown_fields
2925                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
2926            }
2927        }
2928        ::core::result::Result::Ok(())
2929    }
2930    fn clear(&mut self) {
2931        self.credentials.clear();
2932        self.next_page_token = ::core::option::Option::None;
2933        self.__buffa_unknown_fields.clear();
2934    }
2935}
2936impl ::buffa::ExtensionSet for ListCredentialsResponse {
2937    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.ListCredentialsResponse";
2938    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2939        &self.__buffa_unknown_fields
2940    }
2941    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2942        &mut self.__buffa_unknown_fields
2943    }
2944}
2945impl ::buffa::json_helpers::ProtoElemJson for ListCredentialsResponse {
2946    fn serialize_proto_json<S: ::serde::Serializer>(
2947        v: &Self,
2948        s: S,
2949    ) -> ::core::result::Result<S::Ok, S::Error> {
2950        ::serde::Serialize::serialize(v, s)
2951    }
2952    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2953        d: D,
2954    ) -> ::core::result::Result<Self, D::Error> {
2955        <Self as ::serde::Deserialize>::deserialize(d)
2956    }
2957}
2958#[doc(hidden)]
2959pub const __LIST_CREDENTIALS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2960    type_url: "type.googleapis.com/unitycatalog.credentials.v1.ListCredentialsResponse",
2961    to_json: ::buffa::type_registry::any_to_json::<ListCredentialsResponse>,
2962    from_json: ::buffa::type_registry::any_from_json::<ListCredentialsResponse>,
2963    is_wkt: false,
2964};
2965/// Create a new credential.
2966#[derive(Clone, PartialEq, Default)]
2967#[derive(::serde::Serialize, ::serde::Deserialize)]
2968#[serde(default)]
2969pub struct CreateCredentialRequest {
2970    /// The credential name. The name must be unique among storage and service credentials within the metastore.
2971    ///
2972    /// Field 1: `name`
2973    #[serde(
2974        rename = "name",
2975        with = "::buffa::json_helpers::proto_string",
2976        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2977    )]
2978    pub name: ::buffa::alloc::string::String,
2979    /// Indicates the purpose of the credential.
2980    ///
2981    /// Field 2: `purpose`
2982    #[serde(
2983        rename = "purpose",
2984        with = "::buffa::json_helpers::proto_enum",
2985        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2986    )]
2987    pub purpose: ::buffa::EnumValue<Purpose>,
2988    /// Comment associated with the credential.
2989    ///
2990    /// Field 3: `comment`
2991    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
2992    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
2993    /// Whether the credential is usable only for read operations. Only applicable when purpose is STORAGE.
2994    ///
2995    /// Field 4: `read_only`
2996    #[serde(
2997        rename = "read_only",
2998        alias = "readOnly",
2999        skip_serializing_if = "::core::option::Option::is_none"
3000    )]
3001    pub read_only: ::core::option::Option<bool>,
3002    /// Optional. Supplying true to this argument skips validation of the created set of credentials.
3003    ///
3004    /// Field 5: `skip_validation`
3005    #[serde(
3006        rename = "skip_validation",
3007        alias = "skipValidation",
3008        skip_serializing_if = "::core::option::Option::is_none"
3009    )]
3010    pub skip_validation: ::core::option::Option<bool>,
3011    /// The Azure service principal configuration.
3012    ///
3013    /// Field 100: `azure_service_principal`
3014    #[serde(
3015        rename = "azure_service_principal",
3016        alias = "azureServicePrincipal",
3017        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3018    )]
3019    pub azure_service_principal: ::buffa::MessageField<AzureServicePrincipal>,
3020    /// The Azure managed identity configuration.
3021    ///
3022    /// Field 101: `azure_managed_identity`
3023    #[serde(
3024        rename = "azure_managed_identity",
3025        alias = "azureManagedIdentity",
3026        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3027    )]
3028    pub azure_managed_identity: ::buffa::MessageField<AzureManagedIdentity>,
3029    /// The Azure storage key configuration.
3030    ///
3031    /// Field 102: `azure_storage_key`
3032    #[serde(
3033        rename = "azure_storage_key",
3034        alias = "azureStorageKey",
3035        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3036    )]
3037    pub azure_storage_key: ::buffa::MessageField<AzureStorageKey>,
3038    /// The AWS IAM role configuration.
3039    ///
3040    /// Field 103: `aws_iam_role`
3041    #[serde(
3042        rename = "aws_iam_role",
3043        alias = "awsIamRole",
3044        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3045    )]
3046    pub aws_iam_role: ::buffa::MessageField<AwsIamRoleConfig>,
3047    /// The Databricks managed GCP service account configuration.
3048    ///
3049    /// Field 104: `databricks_gcp_service_account`
3050    #[serde(
3051        rename = "databricks_gcp_service_account",
3052        alias = "databricksGcpServiceAccount",
3053        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3054    )]
3055    pub databricks_gcp_service_account: ::buffa::MessageField<
3056        DatabricksGcpServiceAccount,
3057    >,
3058    #[serde(skip)]
3059    #[doc(hidden)]
3060    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3061}
3062impl ::core::fmt::Debug for CreateCredentialRequest {
3063    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3064        f.debug_struct("CreateCredentialRequest")
3065            .field("name", &self.name)
3066            .field("purpose", &self.purpose)
3067            .field("comment", &self.comment)
3068            .field("read_only", &self.read_only)
3069            .field("skip_validation", &self.skip_validation)
3070            .field("azure_service_principal", &self.azure_service_principal)
3071            .field("azure_managed_identity", &self.azure_managed_identity)
3072            .field("azure_storage_key", &self.azure_storage_key)
3073            .field("aws_iam_role", &self.aws_iam_role)
3074            .field(
3075                "databricks_gcp_service_account",
3076                &self.databricks_gcp_service_account,
3077            )
3078            .finish()
3079    }
3080}
3081impl CreateCredentialRequest {
3082    /// Protobuf type URL for this message, for use with `Any::pack` and
3083    /// `Any::unpack_if`.
3084    ///
3085    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3086    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.CreateCredentialRequest";
3087}
3088impl CreateCredentialRequest {
3089    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3090    #[inline]
3091    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
3092    pub fn with_comment(
3093        mut self,
3094        value: impl Into<::buffa::alloc::string::String>,
3095    ) -> Self {
3096        self.comment = Some(value.into());
3097        self
3098    }
3099    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3100    #[inline]
3101    ///Sets [`Self::read_only`] to `Some(value)`, consuming and returning `self`.
3102    pub fn with_read_only(mut self, value: bool) -> Self {
3103        self.read_only = Some(value);
3104        self
3105    }
3106    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3107    #[inline]
3108    ///Sets [`Self::skip_validation`] to `Some(value)`, consuming and returning `self`.
3109    pub fn with_skip_validation(mut self, value: bool) -> Self {
3110        self.skip_validation = Some(value);
3111        self
3112    }
3113}
3114impl ::buffa::DefaultInstance for CreateCredentialRequest {
3115    fn default_instance() -> &'static Self {
3116        static VALUE: ::buffa::__private::OnceBox<CreateCredentialRequest> = ::buffa::__private::OnceBox::new();
3117        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3118    }
3119}
3120impl ::buffa::MessageName for CreateCredentialRequest {
3121    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
3122    const NAME: &'static str = "CreateCredentialRequest";
3123    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.CreateCredentialRequest";
3124    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.CreateCredentialRequest";
3125}
3126impl ::buffa::Message for CreateCredentialRequest {
3127    /// Returns the total encoded size in bytes.
3128    ///
3129    /// The result is a `u32`; the protobuf specification requires all
3130    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3131    /// compliant message will never overflow this type.
3132    #[allow(clippy::let_and_return)]
3133    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3134        #[allow(unused_imports)]
3135        use ::buffa::Enumeration as _;
3136        let mut size = 0u32;
3137        if !self.name.is_empty() {
3138            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
3139        }
3140        {
3141            let val = self.purpose.to_i32();
3142            if val != 0 {
3143                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3144            }
3145        }
3146        if let Some(ref v) = self.comment {
3147            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3148        }
3149        if self.read_only.is_some() {
3150            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3151        }
3152        if self.skip_validation.is_some() {
3153            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3154        }
3155        if self.azure_service_principal.is_set() {
3156            let __slot = __cache.reserve();
3157            let inner_size = self.azure_service_principal.compute_size(__cache);
3158            __cache.set(__slot, inner_size);
3159            size
3160                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3161                    + inner_size;
3162        }
3163        if self.azure_managed_identity.is_set() {
3164            let __slot = __cache.reserve();
3165            let inner_size = self.azure_managed_identity.compute_size(__cache);
3166            __cache.set(__slot, inner_size);
3167            size
3168                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3169                    + inner_size;
3170        }
3171        if self.azure_storage_key.is_set() {
3172            let __slot = __cache.reserve();
3173            let inner_size = self.azure_storage_key.compute_size(__cache);
3174            __cache.set(__slot, inner_size);
3175            size
3176                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3177                    + inner_size;
3178        }
3179        if self.aws_iam_role.is_set() {
3180            let __slot = __cache.reserve();
3181            let inner_size = self.aws_iam_role.compute_size(__cache);
3182            __cache.set(__slot, inner_size);
3183            size
3184                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3185                    + inner_size;
3186        }
3187        if self.databricks_gcp_service_account.is_set() {
3188            let __slot = __cache.reserve();
3189            let inner_size = self.databricks_gcp_service_account.compute_size(__cache);
3190            __cache.set(__slot, inner_size);
3191            size
3192                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3193                    + inner_size;
3194        }
3195        size += self.__buffa_unknown_fields.encoded_len() as u32;
3196        size
3197    }
3198    fn write_to(
3199        &self,
3200        __cache: &mut ::buffa::SizeCache,
3201        buf: &mut impl ::buffa::bytes::BufMut,
3202    ) {
3203        #[allow(unused_imports)]
3204        use ::buffa::Enumeration as _;
3205        if !self.name.is_empty() {
3206            ::buffa::encoding::Tag::new(
3207                    1u32,
3208                    ::buffa::encoding::WireType::LengthDelimited,
3209                )
3210                .encode(buf);
3211            ::buffa::types::encode_string(&self.name, buf);
3212        }
3213        {
3214            let val = self.purpose.to_i32();
3215            if val != 0 {
3216                ::buffa::encoding::Tag::new(2u32, ::buffa::encoding::WireType::Varint)
3217                    .encode(buf);
3218                ::buffa::types::encode_int32(val, buf);
3219            }
3220        }
3221        if let Some(ref v) = self.comment {
3222            ::buffa::encoding::Tag::new(
3223                    3u32,
3224                    ::buffa::encoding::WireType::LengthDelimited,
3225                )
3226                .encode(buf);
3227            ::buffa::types::encode_string(v, buf);
3228        }
3229        if let Some(v) = self.read_only {
3230            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
3231                .encode(buf);
3232            ::buffa::types::encode_bool(v, buf);
3233        }
3234        if let Some(v) = self.skip_validation {
3235            ::buffa::encoding::Tag::new(5u32, ::buffa::encoding::WireType::Varint)
3236                .encode(buf);
3237            ::buffa::types::encode_bool(v, buf);
3238        }
3239        if self.azure_service_principal.is_set() {
3240            ::buffa::encoding::Tag::new(
3241                    100u32,
3242                    ::buffa::encoding::WireType::LengthDelimited,
3243                )
3244                .encode(buf);
3245            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3246            self.azure_service_principal.write_to(__cache, buf);
3247        }
3248        if self.azure_managed_identity.is_set() {
3249            ::buffa::encoding::Tag::new(
3250                    101u32,
3251                    ::buffa::encoding::WireType::LengthDelimited,
3252                )
3253                .encode(buf);
3254            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3255            self.azure_managed_identity.write_to(__cache, buf);
3256        }
3257        if self.azure_storage_key.is_set() {
3258            ::buffa::encoding::Tag::new(
3259                    102u32,
3260                    ::buffa::encoding::WireType::LengthDelimited,
3261                )
3262                .encode(buf);
3263            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3264            self.azure_storage_key.write_to(__cache, buf);
3265        }
3266        if self.aws_iam_role.is_set() {
3267            ::buffa::encoding::Tag::new(
3268                    103u32,
3269                    ::buffa::encoding::WireType::LengthDelimited,
3270                )
3271                .encode(buf);
3272            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3273            self.aws_iam_role.write_to(__cache, buf);
3274        }
3275        if self.databricks_gcp_service_account.is_set() {
3276            ::buffa::encoding::Tag::new(
3277                    104u32,
3278                    ::buffa::encoding::WireType::LengthDelimited,
3279                )
3280                .encode(buf);
3281            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3282            self.databricks_gcp_service_account.write_to(__cache, buf);
3283        }
3284        self.__buffa_unknown_fields.write_to(buf);
3285    }
3286    fn merge_field(
3287        &mut self,
3288        tag: ::buffa::encoding::Tag,
3289        buf: &mut impl ::buffa::bytes::Buf,
3290        depth: u32,
3291    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3292        #[allow(unused_imports)]
3293        use ::buffa::bytes::Buf as _;
3294        #[allow(unused_imports)]
3295        use ::buffa::Enumeration as _;
3296        match tag.field_number() {
3297            1u32 => {
3298                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3299                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3300                        field_number: 1u32,
3301                        expected: 2u8,
3302                        actual: tag.wire_type() as u8,
3303                    });
3304                }
3305                ::buffa::types::merge_string(&mut self.name, buf)?;
3306            }
3307            2u32 => {
3308                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3309                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3310                        field_number: 2u32,
3311                        expected: 0u8,
3312                        actual: tag.wire_type() as u8,
3313                    });
3314                }
3315                self.purpose = ::buffa::EnumValue::from(
3316                    ::buffa::types::decode_int32(buf)?,
3317                );
3318            }
3319            3u32 => {
3320                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3321                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3322                        field_number: 3u32,
3323                        expected: 2u8,
3324                        actual: tag.wire_type() as u8,
3325                    });
3326                }
3327                ::buffa::types::merge_string(
3328                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
3329                    buf,
3330                )?;
3331            }
3332            4u32 => {
3333                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3334                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3335                        field_number: 4u32,
3336                        expected: 0u8,
3337                        actual: tag.wire_type() as u8,
3338                    });
3339                }
3340                self.read_only = ::core::option::Option::Some(
3341                    ::buffa::types::decode_bool(buf)?,
3342                );
3343            }
3344            5u32 => {
3345                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
3346                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3347                        field_number: 5u32,
3348                        expected: 0u8,
3349                        actual: tag.wire_type() as u8,
3350                    });
3351                }
3352                self.skip_validation = ::core::option::Option::Some(
3353                    ::buffa::types::decode_bool(buf)?,
3354                );
3355            }
3356            100u32 => {
3357                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3358                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3359                        field_number: 100u32,
3360                        expected: 2u8,
3361                        actual: tag.wire_type() as u8,
3362                    });
3363                }
3364                ::buffa::Message::merge_length_delimited(
3365                    self.azure_service_principal.get_or_insert_default(),
3366                    buf,
3367                    depth,
3368                )?;
3369            }
3370            101u32 => {
3371                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3372                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3373                        field_number: 101u32,
3374                        expected: 2u8,
3375                        actual: tag.wire_type() as u8,
3376                    });
3377                }
3378                ::buffa::Message::merge_length_delimited(
3379                    self.azure_managed_identity.get_or_insert_default(),
3380                    buf,
3381                    depth,
3382                )?;
3383            }
3384            102u32 => {
3385                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3386                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3387                        field_number: 102u32,
3388                        expected: 2u8,
3389                        actual: tag.wire_type() as u8,
3390                    });
3391                }
3392                ::buffa::Message::merge_length_delimited(
3393                    self.azure_storage_key.get_or_insert_default(),
3394                    buf,
3395                    depth,
3396                )?;
3397            }
3398            103u32 => {
3399                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3400                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3401                        field_number: 103u32,
3402                        expected: 2u8,
3403                        actual: tag.wire_type() as u8,
3404                    });
3405                }
3406                ::buffa::Message::merge_length_delimited(
3407                    self.aws_iam_role.get_or_insert_default(),
3408                    buf,
3409                    depth,
3410                )?;
3411            }
3412            104u32 => {
3413                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3414                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3415                        field_number: 104u32,
3416                        expected: 2u8,
3417                        actual: tag.wire_type() as u8,
3418                    });
3419                }
3420                ::buffa::Message::merge_length_delimited(
3421                    self.databricks_gcp_service_account.get_or_insert_default(),
3422                    buf,
3423                    depth,
3424                )?;
3425            }
3426            _ => {
3427                self.__buffa_unknown_fields
3428                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3429            }
3430        }
3431        ::core::result::Result::Ok(())
3432    }
3433    fn clear(&mut self) {
3434        self.name.clear();
3435        self.purpose = ::buffa::EnumValue::from(0);
3436        self.comment = ::core::option::Option::None;
3437        self.read_only = ::core::option::Option::None;
3438        self.skip_validation = ::core::option::Option::None;
3439        self.azure_service_principal = ::buffa::MessageField::none();
3440        self.azure_managed_identity = ::buffa::MessageField::none();
3441        self.azure_storage_key = ::buffa::MessageField::none();
3442        self.aws_iam_role = ::buffa::MessageField::none();
3443        self.databricks_gcp_service_account = ::buffa::MessageField::none();
3444        self.__buffa_unknown_fields.clear();
3445    }
3446}
3447impl ::buffa::ExtensionSet for CreateCredentialRequest {
3448    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.CreateCredentialRequest";
3449    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3450        &self.__buffa_unknown_fields
3451    }
3452    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3453        &mut self.__buffa_unknown_fields
3454    }
3455}
3456impl ::buffa::json_helpers::ProtoElemJson for CreateCredentialRequest {
3457    fn serialize_proto_json<S: ::serde::Serializer>(
3458        v: &Self,
3459        s: S,
3460    ) -> ::core::result::Result<S::Ok, S::Error> {
3461        ::serde::Serialize::serialize(v, s)
3462    }
3463    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3464        d: D,
3465    ) -> ::core::result::Result<Self, D::Error> {
3466        <Self as ::serde::Deserialize>::deserialize(d)
3467    }
3468}
3469#[doc(hidden)]
3470pub const __CREATE_CREDENTIAL_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3471    type_url: "type.googleapis.com/unitycatalog.credentials.v1.CreateCredentialRequest",
3472    to_json: ::buffa::type_registry::any_to_json::<CreateCredentialRequest>,
3473    from_json: ::buffa::type_registry::any_from_json::<CreateCredentialRequest>,
3474    is_wkt: false,
3475};
3476/// Get a credential.
3477#[derive(Clone, PartialEq, Default)]
3478#[derive(::serde::Serialize, ::serde::Deserialize)]
3479#[serde(default)]
3480pub struct GetCredentialRequest {
3481    /// Name of credential.
3482    ///
3483    /// Field 1: `name`
3484    #[serde(
3485        rename = "name",
3486        with = "::buffa::json_helpers::proto_string",
3487        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3488    )]
3489    pub name: ::buffa::alloc::string::String,
3490    #[serde(skip)]
3491    #[doc(hidden)]
3492    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3493}
3494impl ::core::fmt::Debug for GetCredentialRequest {
3495    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3496        f.debug_struct("GetCredentialRequest").field("name", &self.name).finish()
3497    }
3498}
3499impl GetCredentialRequest {
3500    /// Protobuf type URL for this message, for use with `Any::pack` and
3501    /// `Any::unpack_if`.
3502    ///
3503    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3504    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.GetCredentialRequest";
3505}
3506impl ::buffa::DefaultInstance for GetCredentialRequest {
3507    fn default_instance() -> &'static Self {
3508        static VALUE: ::buffa::__private::OnceBox<GetCredentialRequest> = ::buffa::__private::OnceBox::new();
3509        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3510    }
3511}
3512impl ::buffa::MessageName for GetCredentialRequest {
3513    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
3514    const NAME: &'static str = "GetCredentialRequest";
3515    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.GetCredentialRequest";
3516    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.GetCredentialRequest";
3517}
3518impl ::buffa::Message for GetCredentialRequest {
3519    /// Returns the total encoded size in bytes.
3520    ///
3521    /// The result is a `u32`; the protobuf specification requires all
3522    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3523    /// compliant message will never overflow this type.
3524    #[allow(clippy::let_and_return)]
3525    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3526        #[allow(unused_imports)]
3527        use ::buffa::Enumeration as _;
3528        let mut size = 0u32;
3529        if !self.name.is_empty() {
3530            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
3531        }
3532        size += self.__buffa_unknown_fields.encoded_len() as u32;
3533        size
3534    }
3535    fn write_to(
3536        &self,
3537        _cache: &mut ::buffa::SizeCache,
3538        buf: &mut impl ::buffa::bytes::BufMut,
3539    ) {
3540        #[allow(unused_imports)]
3541        use ::buffa::Enumeration as _;
3542        if !self.name.is_empty() {
3543            ::buffa::encoding::Tag::new(
3544                    1u32,
3545                    ::buffa::encoding::WireType::LengthDelimited,
3546                )
3547                .encode(buf);
3548            ::buffa::types::encode_string(&self.name, buf);
3549        }
3550        self.__buffa_unknown_fields.write_to(buf);
3551    }
3552    fn merge_field(
3553        &mut self,
3554        tag: ::buffa::encoding::Tag,
3555        buf: &mut impl ::buffa::bytes::Buf,
3556        depth: u32,
3557    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3558        #[allow(unused_imports)]
3559        use ::buffa::bytes::Buf as _;
3560        #[allow(unused_imports)]
3561        use ::buffa::Enumeration as _;
3562        match tag.field_number() {
3563            1u32 => {
3564                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
3565                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
3566                        field_number: 1u32,
3567                        expected: 2u8,
3568                        actual: tag.wire_type() as u8,
3569                    });
3570                }
3571                ::buffa::types::merge_string(&mut self.name, buf)?;
3572            }
3573            _ => {
3574                self.__buffa_unknown_fields
3575                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
3576            }
3577        }
3578        ::core::result::Result::Ok(())
3579    }
3580    fn clear(&mut self) {
3581        self.name.clear();
3582        self.__buffa_unknown_fields.clear();
3583    }
3584}
3585impl ::buffa::ExtensionSet for GetCredentialRequest {
3586    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.GetCredentialRequest";
3587    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3588        &self.__buffa_unknown_fields
3589    }
3590    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3591        &mut self.__buffa_unknown_fields
3592    }
3593}
3594impl ::buffa::json_helpers::ProtoElemJson for GetCredentialRequest {
3595    fn serialize_proto_json<S: ::serde::Serializer>(
3596        v: &Self,
3597        s: S,
3598    ) -> ::core::result::Result<S::Ok, S::Error> {
3599        ::serde::Serialize::serialize(v, s)
3600    }
3601    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3602        d: D,
3603    ) -> ::core::result::Result<Self, D::Error> {
3604        <Self as ::serde::Deserialize>::deserialize(d)
3605    }
3606}
3607#[doc(hidden)]
3608pub const __GET_CREDENTIAL_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3609    type_url: "type.googleapis.com/unitycatalog.credentials.v1.GetCredentialRequest",
3610    to_json: ::buffa::type_registry::any_to_json::<GetCredentialRequest>,
3611    from_json: ::buffa::type_registry::any_from_json::<GetCredentialRequest>,
3612    is_wkt: false,
3613};
3614/// Update a credential.
3615#[derive(Clone, PartialEq, Default)]
3616#[derive(::serde::Serialize, ::serde::Deserialize)]
3617#[serde(default)]
3618pub struct UpdateCredentialRequest {
3619    /// Name of credential.
3620    ///
3621    /// Field 1: `name`
3622    #[serde(
3623        rename = "name",
3624        with = "::buffa::json_helpers::proto_string",
3625        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3626    )]
3627    pub name: ::buffa::alloc::string::String,
3628    /// New name of the credential.
3629    ///
3630    /// Field 2: `new_name`
3631    #[serde(
3632        rename = "new_name",
3633        alias = "newName",
3634        skip_serializing_if = "::core::option::Option::is_none"
3635    )]
3636    pub new_name: ::core::option::Option<::buffa::alloc::string::String>,
3637    /// Comment associated with the credential.
3638    ///
3639    /// Field 3: `comment`
3640    #[serde(rename = "comment", skip_serializing_if = "::core::option::Option::is_none")]
3641    pub comment: ::core::option::Option<::buffa::alloc::string::String>,
3642    /// Whether the credential is usable only for read operations. Only applicable when purpose is STORAGE.
3643    ///
3644    /// Field 4: `read_only`
3645    #[serde(
3646        rename = "read_only",
3647        alias = "readOnly",
3648        skip_serializing_if = "::core::option::Option::is_none"
3649    )]
3650    pub read_only: ::core::option::Option<bool>,
3651    /// Username of current owner of credential.
3652    ///
3653    /// Field 5: `owner`
3654    #[serde(rename = "owner", skip_serializing_if = "::core::option::Option::is_none")]
3655    pub owner: ::core::option::Option<::buffa::alloc::string::String>,
3656    /// Supply true to this argument to skip validation of the updated credential.
3657    ///
3658    /// Field 6: `skip_validation`
3659    #[serde(
3660        rename = "skip_validation",
3661        alias = "skipValidation",
3662        skip_serializing_if = "::core::option::Option::is_none"
3663    )]
3664    pub skip_validation: ::core::option::Option<bool>,
3665    /// Force an update even if there are dependent services (when purpose is SERVICE)
3666    /// or dependent external locations and external tables (when purpose is STORAGE).
3667    ///
3668    /// Field 7: `force`
3669    #[serde(rename = "force", skip_serializing_if = "::core::option::Option::is_none")]
3670    pub force: ::core::option::Option<bool>,
3671    /// The Azure service principal configuration.
3672    ///
3673    /// Field 100: `azure_service_principal`
3674    #[serde(
3675        rename = "azure_service_principal",
3676        alias = "azureServicePrincipal",
3677        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3678    )]
3679    pub azure_service_principal: ::buffa::MessageField<AzureServicePrincipal>,
3680    /// The Azure managed identity configuration.
3681    ///
3682    /// Field 101: `azure_managed_identity`
3683    #[serde(
3684        rename = "azure_managed_identity",
3685        alias = "azureManagedIdentity",
3686        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3687    )]
3688    pub azure_managed_identity: ::buffa::MessageField<AzureManagedIdentity>,
3689    /// The Azure storage key configuration.
3690    ///
3691    /// Field 102: `azure_storage_key`
3692    #[serde(
3693        rename = "azure_storage_key",
3694        alias = "azureStorageKey",
3695        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3696    )]
3697    pub azure_storage_key: ::buffa::MessageField<AzureStorageKey>,
3698    /// The AWS IAM role configuration.
3699    ///
3700    /// Field 103: `aws_iam_role`
3701    #[serde(
3702        rename = "aws_iam_role",
3703        alias = "awsIamRole",
3704        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3705    )]
3706    pub aws_iam_role: ::buffa::MessageField<AwsIamRoleConfig>,
3707    /// The Databricks managed GCP service account configuration.
3708    ///
3709    /// Field 104: `databricks_gcp_service_account`
3710    #[serde(
3711        rename = "databricks_gcp_service_account",
3712        alias = "databricksGcpServiceAccount",
3713        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
3714    )]
3715    pub databricks_gcp_service_account: ::buffa::MessageField<
3716        DatabricksGcpServiceAccount,
3717    >,
3718    #[serde(skip)]
3719    #[doc(hidden)]
3720    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3721}
3722impl ::core::fmt::Debug for UpdateCredentialRequest {
3723    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3724        f.debug_struct("UpdateCredentialRequest")
3725            .field("name", &self.name)
3726            .field("new_name", &self.new_name)
3727            .field("comment", &self.comment)
3728            .field("read_only", &self.read_only)
3729            .field("owner", &self.owner)
3730            .field("skip_validation", &self.skip_validation)
3731            .field("force", &self.force)
3732            .field("azure_service_principal", &self.azure_service_principal)
3733            .field("azure_managed_identity", &self.azure_managed_identity)
3734            .field("azure_storage_key", &self.azure_storage_key)
3735            .field("aws_iam_role", &self.aws_iam_role)
3736            .field(
3737                "databricks_gcp_service_account",
3738                &self.databricks_gcp_service_account,
3739            )
3740            .finish()
3741    }
3742}
3743impl UpdateCredentialRequest {
3744    /// Protobuf type URL for this message, for use with `Any::pack` and
3745    /// `Any::unpack_if`.
3746    ///
3747    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3748    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.UpdateCredentialRequest";
3749}
3750impl UpdateCredentialRequest {
3751    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3752    #[inline]
3753    ///Sets [`Self::new_name`] to `Some(value)`, consuming and returning `self`.
3754    pub fn with_new_name(
3755        mut self,
3756        value: impl Into<::buffa::alloc::string::String>,
3757    ) -> Self {
3758        self.new_name = Some(value.into());
3759        self
3760    }
3761    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3762    #[inline]
3763    ///Sets [`Self::comment`] to `Some(value)`, consuming and returning `self`.
3764    pub fn with_comment(
3765        mut self,
3766        value: impl Into<::buffa::alloc::string::String>,
3767    ) -> Self {
3768        self.comment = Some(value.into());
3769        self
3770    }
3771    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3772    #[inline]
3773    ///Sets [`Self::read_only`] to `Some(value)`, consuming and returning `self`.
3774    pub fn with_read_only(mut self, value: bool) -> Self {
3775        self.read_only = Some(value);
3776        self
3777    }
3778    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3779    #[inline]
3780    ///Sets [`Self::owner`] to `Some(value)`, consuming and returning `self`.
3781    pub fn with_owner(
3782        mut self,
3783        value: impl Into<::buffa::alloc::string::String>,
3784    ) -> Self {
3785        self.owner = Some(value.into());
3786        self
3787    }
3788    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3789    #[inline]
3790    ///Sets [`Self::skip_validation`] to `Some(value)`, consuming and returning `self`.
3791    pub fn with_skip_validation(mut self, value: bool) -> Self {
3792        self.skip_validation = Some(value);
3793        self
3794    }
3795    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
3796    #[inline]
3797    ///Sets [`Self::force`] to `Some(value)`, consuming and returning `self`.
3798    pub fn with_force(mut self, value: bool) -> Self {
3799        self.force = Some(value);
3800        self
3801    }
3802}
3803impl ::buffa::DefaultInstance for UpdateCredentialRequest {
3804    fn default_instance() -> &'static Self {
3805        static VALUE: ::buffa::__private::OnceBox<UpdateCredentialRequest> = ::buffa::__private::OnceBox::new();
3806        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
3807    }
3808}
3809impl ::buffa::MessageName for UpdateCredentialRequest {
3810    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
3811    const NAME: &'static str = "UpdateCredentialRequest";
3812    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.UpdateCredentialRequest";
3813    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.UpdateCredentialRequest";
3814}
3815impl ::buffa::Message for UpdateCredentialRequest {
3816    /// Returns the total encoded size in bytes.
3817    ///
3818    /// The result is a `u32`; the protobuf specification requires all
3819    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3820    /// compliant message will never overflow this type.
3821    #[allow(clippy::let_and_return)]
3822    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
3823        #[allow(unused_imports)]
3824        use ::buffa::Enumeration as _;
3825        let mut size = 0u32;
3826        if !self.name.is_empty() {
3827            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
3828        }
3829        if let Some(ref v) = self.new_name {
3830            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3831        }
3832        if let Some(ref v) = self.comment {
3833            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3834        }
3835        if self.read_only.is_some() {
3836            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3837        }
3838        if let Some(ref v) = self.owner {
3839            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
3840        }
3841        if self.skip_validation.is_some() {
3842            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3843        }
3844        if self.force.is_some() {
3845            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3846        }
3847        if self.azure_service_principal.is_set() {
3848            let __slot = __cache.reserve();
3849            let inner_size = self.azure_service_principal.compute_size(__cache);
3850            __cache.set(__slot, inner_size);
3851            size
3852                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3853                    + inner_size;
3854        }
3855        if self.azure_managed_identity.is_set() {
3856            let __slot = __cache.reserve();
3857            let inner_size = self.azure_managed_identity.compute_size(__cache);
3858            __cache.set(__slot, inner_size);
3859            size
3860                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3861                    + inner_size;
3862        }
3863        if self.azure_storage_key.is_set() {
3864            let __slot = __cache.reserve();
3865            let inner_size = self.azure_storage_key.compute_size(__cache);
3866            __cache.set(__slot, inner_size);
3867            size
3868                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3869                    + inner_size;
3870        }
3871        if self.aws_iam_role.is_set() {
3872            let __slot = __cache.reserve();
3873            let inner_size = self.aws_iam_role.compute_size(__cache);
3874            __cache.set(__slot, inner_size);
3875            size
3876                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3877                    + inner_size;
3878        }
3879        if self.databricks_gcp_service_account.is_set() {
3880            let __slot = __cache.reserve();
3881            let inner_size = self.databricks_gcp_service_account.compute_size(__cache);
3882            __cache.set(__slot, inner_size);
3883            size
3884                += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
3885                    + inner_size;
3886        }
3887        size += self.__buffa_unknown_fields.encoded_len() as u32;
3888        size
3889    }
3890    fn write_to(
3891        &self,
3892        __cache: &mut ::buffa::SizeCache,
3893        buf: &mut impl ::buffa::bytes::BufMut,
3894    ) {
3895        #[allow(unused_imports)]
3896        use ::buffa::Enumeration as _;
3897        if !self.name.is_empty() {
3898            ::buffa::encoding::Tag::new(
3899                    1u32,
3900                    ::buffa::encoding::WireType::LengthDelimited,
3901                )
3902                .encode(buf);
3903            ::buffa::types::encode_string(&self.name, buf);
3904        }
3905        if let Some(ref v) = self.new_name {
3906            ::buffa::encoding::Tag::new(
3907                    2u32,
3908                    ::buffa::encoding::WireType::LengthDelimited,
3909                )
3910                .encode(buf);
3911            ::buffa::types::encode_string(v, buf);
3912        }
3913        if let Some(ref v) = self.comment {
3914            ::buffa::encoding::Tag::new(
3915                    3u32,
3916                    ::buffa::encoding::WireType::LengthDelimited,
3917                )
3918                .encode(buf);
3919            ::buffa::types::encode_string(v, buf);
3920        }
3921        if let Some(v) = self.read_only {
3922            ::buffa::encoding::Tag::new(4u32, ::buffa::encoding::WireType::Varint)
3923                .encode(buf);
3924            ::buffa::types::encode_bool(v, buf);
3925        }
3926        if let Some(ref v) = self.owner {
3927            ::buffa::encoding::Tag::new(
3928                    5u32,
3929                    ::buffa::encoding::WireType::LengthDelimited,
3930                )
3931                .encode(buf);
3932            ::buffa::types::encode_string(v, buf);
3933        }
3934        if let Some(v) = self.skip_validation {
3935            ::buffa::encoding::Tag::new(6u32, ::buffa::encoding::WireType::Varint)
3936                .encode(buf);
3937            ::buffa::types::encode_bool(v, buf);
3938        }
3939        if let Some(v) = self.force {
3940            ::buffa::encoding::Tag::new(7u32, ::buffa::encoding::WireType::Varint)
3941                .encode(buf);
3942            ::buffa::types::encode_bool(v, buf);
3943        }
3944        if self.azure_service_principal.is_set() {
3945            ::buffa::encoding::Tag::new(
3946                    100u32,
3947                    ::buffa::encoding::WireType::LengthDelimited,
3948                )
3949                .encode(buf);
3950            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3951            self.azure_service_principal.write_to(__cache, buf);
3952        }
3953        if self.azure_managed_identity.is_set() {
3954            ::buffa::encoding::Tag::new(
3955                    101u32,
3956                    ::buffa::encoding::WireType::LengthDelimited,
3957                )
3958                .encode(buf);
3959            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3960            self.azure_managed_identity.write_to(__cache, buf);
3961        }
3962        if self.azure_storage_key.is_set() {
3963            ::buffa::encoding::Tag::new(
3964                    102u32,
3965                    ::buffa::encoding::WireType::LengthDelimited,
3966                )
3967                .encode(buf);
3968            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3969            self.azure_storage_key.write_to(__cache, buf);
3970        }
3971        if self.aws_iam_role.is_set() {
3972            ::buffa::encoding::Tag::new(
3973                    103u32,
3974                    ::buffa::encoding::WireType::LengthDelimited,
3975                )
3976                .encode(buf);
3977            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3978            self.aws_iam_role.write_to(__cache, buf);
3979        }
3980        if self.databricks_gcp_service_account.is_set() {
3981            ::buffa::encoding::Tag::new(
3982                    104u32,
3983                    ::buffa::encoding::WireType::LengthDelimited,
3984                )
3985                .encode(buf);
3986            ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
3987            self.databricks_gcp_service_account.write_to(__cache, buf);
3988        }
3989        self.__buffa_unknown_fields.write_to(buf);
3990    }
3991    fn merge_field(
3992        &mut self,
3993        tag: ::buffa::encoding::Tag,
3994        buf: &mut impl ::buffa::bytes::Buf,
3995        depth: u32,
3996    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3997        #[allow(unused_imports)]
3998        use ::buffa::bytes::Buf as _;
3999        #[allow(unused_imports)]
4000        use ::buffa::Enumeration as _;
4001        match tag.field_number() {
4002            1u32 => {
4003                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4004                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4005                        field_number: 1u32,
4006                        expected: 2u8,
4007                        actual: tag.wire_type() as u8,
4008                    });
4009                }
4010                ::buffa::types::merge_string(&mut self.name, buf)?;
4011            }
4012            2u32 => {
4013                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4014                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4015                        field_number: 2u32,
4016                        expected: 2u8,
4017                        actual: tag.wire_type() as u8,
4018                    });
4019                }
4020                ::buffa::types::merge_string(
4021                    self
4022                        .new_name
4023                        .get_or_insert_with(::buffa::alloc::string::String::new),
4024                    buf,
4025                )?;
4026            }
4027            3u32 => {
4028                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4029                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4030                        field_number: 3u32,
4031                        expected: 2u8,
4032                        actual: tag.wire_type() as u8,
4033                    });
4034                }
4035                ::buffa::types::merge_string(
4036                    self.comment.get_or_insert_with(::buffa::alloc::string::String::new),
4037                    buf,
4038                )?;
4039            }
4040            4u32 => {
4041                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4042                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4043                        field_number: 4u32,
4044                        expected: 0u8,
4045                        actual: tag.wire_type() as u8,
4046                    });
4047                }
4048                self.read_only = ::core::option::Option::Some(
4049                    ::buffa::types::decode_bool(buf)?,
4050                );
4051            }
4052            5u32 => {
4053                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4054                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4055                        field_number: 5u32,
4056                        expected: 2u8,
4057                        actual: tag.wire_type() as u8,
4058                    });
4059                }
4060                ::buffa::types::merge_string(
4061                    self.owner.get_or_insert_with(::buffa::alloc::string::String::new),
4062                    buf,
4063                )?;
4064            }
4065            6u32 => {
4066                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4067                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4068                        field_number: 6u32,
4069                        expected: 0u8,
4070                        actual: tag.wire_type() as u8,
4071                    });
4072                }
4073                self.skip_validation = ::core::option::Option::Some(
4074                    ::buffa::types::decode_bool(buf)?,
4075                );
4076            }
4077            7u32 => {
4078                if tag.wire_type() != ::buffa::encoding::WireType::Varint {
4079                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4080                        field_number: 7u32,
4081                        expected: 0u8,
4082                        actual: tag.wire_type() as u8,
4083                    });
4084                }
4085                self.force = ::core::option::Option::Some(
4086                    ::buffa::types::decode_bool(buf)?,
4087                );
4088            }
4089            100u32 => {
4090                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4091                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4092                        field_number: 100u32,
4093                        expected: 2u8,
4094                        actual: tag.wire_type() as u8,
4095                    });
4096                }
4097                ::buffa::Message::merge_length_delimited(
4098                    self.azure_service_principal.get_or_insert_default(),
4099                    buf,
4100                    depth,
4101                )?;
4102            }
4103            101u32 => {
4104                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4105                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4106                        field_number: 101u32,
4107                        expected: 2u8,
4108                        actual: tag.wire_type() as u8,
4109                    });
4110                }
4111                ::buffa::Message::merge_length_delimited(
4112                    self.azure_managed_identity.get_or_insert_default(),
4113                    buf,
4114                    depth,
4115                )?;
4116            }
4117            102u32 => {
4118                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4119                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4120                        field_number: 102u32,
4121                        expected: 2u8,
4122                        actual: tag.wire_type() as u8,
4123                    });
4124                }
4125                ::buffa::Message::merge_length_delimited(
4126                    self.azure_storage_key.get_or_insert_default(),
4127                    buf,
4128                    depth,
4129                )?;
4130            }
4131            103u32 => {
4132                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4133                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4134                        field_number: 103u32,
4135                        expected: 2u8,
4136                        actual: tag.wire_type() as u8,
4137                    });
4138                }
4139                ::buffa::Message::merge_length_delimited(
4140                    self.aws_iam_role.get_or_insert_default(),
4141                    buf,
4142                    depth,
4143                )?;
4144            }
4145            104u32 => {
4146                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4147                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4148                        field_number: 104u32,
4149                        expected: 2u8,
4150                        actual: tag.wire_type() as u8,
4151                    });
4152                }
4153                ::buffa::Message::merge_length_delimited(
4154                    self.databricks_gcp_service_account.get_or_insert_default(),
4155                    buf,
4156                    depth,
4157                )?;
4158            }
4159            _ => {
4160                self.__buffa_unknown_fields
4161                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4162            }
4163        }
4164        ::core::result::Result::Ok(())
4165    }
4166    fn clear(&mut self) {
4167        self.name.clear();
4168        self.new_name = ::core::option::Option::None;
4169        self.comment = ::core::option::Option::None;
4170        self.read_only = ::core::option::Option::None;
4171        self.owner = ::core::option::Option::None;
4172        self.skip_validation = ::core::option::Option::None;
4173        self.force = ::core::option::Option::None;
4174        self.azure_service_principal = ::buffa::MessageField::none();
4175        self.azure_managed_identity = ::buffa::MessageField::none();
4176        self.azure_storage_key = ::buffa::MessageField::none();
4177        self.aws_iam_role = ::buffa::MessageField::none();
4178        self.databricks_gcp_service_account = ::buffa::MessageField::none();
4179        self.__buffa_unknown_fields.clear();
4180    }
4181}
4182impl ::buffa::ExtensionSet for UpdateCredentialRequest {
4183    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.UpdateCredentialRequest";
4184    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4185        &self.__buffa_unknown_fields
4186    }
4187    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4188        &mut self.__buffa_unknown_fields
4189    }
4190}
4191impl ::buffa::json_helpers::ProtoElemJson for UpdateCredentialRequest {
4192    fn serialize_proto_json<S: ::serde::Serializer>(
4193        v: &Self,
4194        s: S,
4195    ) -> ::core::result::Result<S::Ok, S::Error> {
4196        ::serde::Serialize::serialize(v, s)
4197    }
4198    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4199        d: D,
4200    ) -> ::core::result::Result<Self, D::Error> {
4201        <Self as ::serde::Deserialize>::deserialize(d)
4202    }
4203}
4204#[doc(hidden)]
4205pub const __UPDATE_CREDENTIAL_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4206    type_url: "type.googleapis.com/unitycatalog.credentials.v1.UpdateCredentialRequest",
4207    to_json: ::buffa::type_registry::any_to_json::<UpdateCredentialRequest>,
4208    from_json: ::buffa::type_registry::any_from_json::<UpdateCredentialRequest>,
4209    is_wkt: false,
4210};
4211/// Delete a credential.
4212#[derive(Clone, PartialEq, Default)]
4213#[derive(::serde::Serialize, ::serde::Deserialize)]
4214#[serde(default)]
4215pub struct DeleteCredentialRequest {
4216    /// Name of credential.
4217    ///
4218    /// Field 1: `name`
4219    #[serde(
4220        rename = "name",
4221        with = "::buffa::json_helpers::proto_string",
4222        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4223    )]
4224    pub name: ::buffa::alloc::string::String,
4225    #[serde(skip)]
4226    #[doc(hidden)]
4227    pub __buffa_unknown_fields: ::buffa::UnknownFields,
4228}
4229impl ::core::fmt::Debug for DeleteCredentialRequest {
4230    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4231        f.debug_struct("DeleteCredentialRequest").field("name", &self.name).finish()
4232    }
4233}
4234impl DeleteCredentialRequest {
4235    /// Protobuf type URL for this message, for use with `Any::pack` and
4236    /// `Any::unpack_if`.
4237    ///
4238    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
4239    pub const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.DeleteCredentialRequest";
4240}
4241impl ::buffa::DefaultInstance for DeleteCredentialRequest {
4242    fn default_instance() -> &'static Self {
4243        static VALUE: ::buffa::__private::OnceBox<DeleteCredentialRequest> = ::buffa::__private::OnceBox::new();
4244        VALUE.get_or_init(|| ::buffa::alloc::boxed::Box::new(Self::default()))
4245    }
4246}
4247impl ::buffa::MessageName for DeleteCredentialRequest {
4248    const PACKAGE: &'static str = "unitycatalog.credentials.v1";
4249    const NAME: &'static str = "DeleteCredentialRequest";
4250    const FULL_NAME: &'static str = "unitycatalog.credentials.v1.DeleteCredentialRequest";
4251    const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.DeleteCredentialRequest";
4252}
4253impl ::buffa::Message for DeleteCredentialRequest {
4254    /// Returns the total encoded size in bytes.
4255    ///
4256    /// The result is a `u32`; the protobuf specification requires all
4257    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
4258    /// compliant message will never overflow this type.
4259    #[allow(clippy::let_and_return)]
4260    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4261        #[allow(unused_imports)]
4262        use ::buffa::Enumeration as _;
4263        let mut size = 0u32;
4264        if !self.name.is_empty() {
4265            size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
4266        }
4267        size += self.__buffa_unknown_fields.encoded_len() as u32;
4268        size
4269    }
4270    fn write_to(
4271        &self,
4272        _cache: &mut ::buffa::SizeCache,
4273        buf: &mut impl ::buffa::bytes::BufMut,
4274    ) {
4275        #[allow(unused_imports)]
4276        use ::buffa::Enumeration as _;
4277        if !self.name.is_empty() {
4278            ::buffa::encoding::Tag::new(
4279                    1u32,
4280                    ::buffa::encoding::WireType::LengthDelimited,
4281                )
4282                .encode(buf);
4283            ::buffa::types::encode_string(&self.name, buf);
4284        }
4285        self.__buffa_unknown_fields.write_to(buf);
4286    }
4287    fn merge_field(
4288        &mut self,
4289        tag: ::buffa::encoding::Tag,
4290        buf: &mut impl ::buffa::bytes::Buf,
4291        depth: u32,
4292    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4293        #[allow(unused_imports)]
4294        use ::buffa::bytes::Buf as _;
4295        #[allow(unused_imports)]
4296        use ::buffa::Enumeration as _;
4297        match tag.field_number() {
4298            1u32 => {
4299                if tag.wire_type() != ::buffa::encoding::WireType::LengthDelimited {
4300                    return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4301                        field_number: 1u32,
4302                        expected: 2u8,
4303                        actual: tag.wire_type() as u8,
4304                    });
4305                }
4306                ::buffa::types::merge_string(&mut self.name, buf)?;
4307            }
4308            _ => {
4309                self.__buffa_unknown_fields
4310                    .push(::buffa::encoding::decode_unknown_field(tag, buf, depth)?);
4311            }
4312        }
4313        ::core::result::Result::Ok(())
4314    }
4315    fn clear(&mut self) {
4316        self.name.clear();
4317        self.__buffa_unknown_fields.clear();
4318    }
4319}
4320impl ::buffa::ExtensionSet for DeleteCredentialRequest {
4321    const PROTO_FQN: &'static str = "unitycatalog.credentials.v1.DeleteCredentialRequest";
4322    fn unknown_fields(&self) -> &::buffa::UnknownFields {
4323        &self.__buffa_unknown_fields
4324    }
4325    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4326        &mut self.__buffa_unknown_fields
4327    }
4328}
4329impl ::buffa::json_helpers::ProtoElemJson for DeleteCredentialRequest {
4330    fn serialize_proto_json<S: ::serde::Serializer>(
4331        v: &Self,
4332        s: S,
4333    ) -> ::core::result::Result<S::Ok, S::Error> {
4334        ::serde::Serialize::serialize(v, s)
4335    }
4336    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4337        d: D,
4338    ) -> ::core::result::Result<Self, D::Error> {
4339        <Self as ::serde::Deserialize>::deserialize(d)
4340    }
4341}
4342#[doc(hidden)]
4343pub const __DELETE_CREDENTIAL_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4344    type_url: "type.googleapis.com/unitycatalog.credentials.v1.DeleteCredentialRequest",
4345    to_json: ::buffa::type_registry::any_to_json::<DeleteCredentialRequest>,
4346    from_json: ::buffa::type_registry::any_from_json::<DeleteCredentialRequest>,
4347    is_wkt: false,
4348};
4349#[allow(
4350    non_camel_case_types,
4351    dead_code,
4352    unused_imports,
4353    unused_qualifications,
4354    clippy::derivable_impls,
4355    clippy::match_single_binding,
4356    clippy::uninlined_format_args,
4357    clippy::doc_lazy_continuation,
4358    clippy::module_inception
4359)]
4360pub mod __buffa {
4361    #[allow(unused_imports)]
4362    use super::*;
4363    pub mod view {
4364        #[allow(unused_imports)]
4365        use super::*;
4366        /// The Azure service principal configuration.
4367        #[derive(Clone, Debug, Default)]
4368        pub struct AzureServicePrincipalView<'a> {
4369            /// The directory ID corresponding to the Azure Active Directory (AAD) tenant of the application.
4370            ///
4371            /// Field 1: `directory_id`
4372            pub directory_id: &'a str,
4373            /// The application ID of the application registration within the referenced AAD tenant.
4374            ///
4375            /// Field 2: `application_id`
4376            pub application_id: &'a str,
4377            pub credential: ::core::option::Option<
4378                super::super::__buffa::view::oneof::azure_service_principal::Credential<
4379                    'a,
4380                >,
4381            >,
4382            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4383        }
4384        impl<'a> AzureServicePrincipalView<'a> {
4385            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4386            ///
4387            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4388            /// and by generated sub-message decode arms with `depth - 1`.
4389            ///
4390            /// **Not part of the public API.** Named with a leading underscore to
4391            /// signal that it is for generated-code use only.
4392            #[doc(hidden)]
4393            pub fn _decode_depth(
4394                buf: &'a [u8],
4395                depth: u32,
4396            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4397                let mut view = Self::default();
4398                view._merge_into_view(buf, depth)?;
4399                ::core::result::Result::Ok(view)
4400            }
4401            /// Merge fields from `buf` into this view (proto merge semantics).
4402            ///
4403            /// Repeated fields append; singular fields last-wins; singular
4404            /// MESSAGE fields merge recursively. Used by sub-message decode
4405            /// arms when the same field appears multiple times on the wire.
4406            ///
4407            /// **Not part of the public API.**
4408            #[doc(hidden)]
4409            pub fn _merge_into_view(
4410                &mut self,
4411                buf: &'a [u8],
4412                depth: u32,
4413            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4414                let _ = depth;
4415                #[allow(unused_variables)]
4416                let view = self;
4417                let mut cur: &'a [u8] = buf;
4418                while !cur.is_empty() {
4419                    let before_tag = cur;
4420                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4421                    match tag.field_number() {
4422                        1u32 => {
4423                            if tag.wire_type()
4424                                != ::buffa::encoding::WireType::LengthDelimited
4425                            {
4426                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4427                                    field_number: 1u32,
4428                                    expected: 2u8,
4429                                    actual: tag.wire_type() as u8,
4430                                });
4431                            }
4432                            view.directory_id = ::buffa::types::borrow_str(&mut cur)?;
4433                        }
4434                        2u32 => {
4435                            if tag.wire_type()
4436                                != ::buffa::encoding::WireType::LengthDelimited
4437                            {
4438                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4439                                    field_number: 2u32,
4440                                    expected: 2u8,
4441                                    actual: tag.wire_type() as u8,
4442                                });
4443                            }
4444                            view.application_id = ::buffa::types::borrow_str(&mut cur)?;
4445                        }
4446                        3u32 => {
4447                            if tag.wire_type()
4448                                != ::buffa::encoding::WireType::LengthDelimited
4449                            {
4450                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4451                                    field_number: 3u32,
4452                                    expected: 2u8,
4453                                    actual: tag.wire_type() as u8,
4454                                });
4455                            }
4456                            view.credential = Some(
4457                                super::super::__buffa::view::oneof::azure_service_principal::Credential::ClientSecret(
4458                                    ::buffa::types::borrow_str(&mut cur)?,
4459                                ),
4460                            );
4461                        }
4462                        5u32 => {
4463                            if tag.wire_type()
4464                                != ::buffa::encoding::WireType::LengthDelimited
4465                            {
4466                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4467                                    field_number: 5u32,
4468                                    expected: 2u8,
4469                                    actual: tag.wire_type() as u8,
4470                                });
4471                            }
4472                            view.credential = Some(
4473                                super::super::__buffa::view::oneof::azure_service_principal::Credential::FederatedTokenFile(
4474                                    ::buffa::types::borrow_str(&mut cur)?,
4475                                ),
4476                            );
4477                        }
4478                        _ => {
4479                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4480                            let span_len = before_tag.len() - cur.len();
4481                            view.__buffa_unknown_fields
4482                                .push_raw(&before_tag[..span_len]);
4483                        }
4484                    }
4485                }
4486                ::core::result::Result::Ok(())
4487            }
4488        }
4489        impl<'a> ::buffa::MessageView<'a> for AzureServicePrincipalView<'a> {
4490            type Owned = super::super::AzureServicePrincipal;
4491            fn decode_view(
4492                buf: &'a [u8],
4493            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4494                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4495            }
4496            fn decode_view_with_limit(
4497                buf: &'a [u8],
4498                depth: u32,
4499            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4500                Self::_decode_depth(buf, depth)
4501            }
4502            fn to_owned_message(&self) -> super::super::AzureServicePrincipal {
4503                self.to_owned_from_source(None)
4504            }
4505            #[allow(clippy::useless_conversion, clippy::needless_update)]
4506            fn to_owned_from_source(
4507                &self,
4508                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4509            ) -> super::super::AzureServicePrincipal {
4510                #[allow(unused_imports)]
4511                use ::buffa::alloc::string::ToString as _;
4512                let _ = __buffa_src;
4513                super::super::AzureServicePrincipal {
4514                    directory_id: self.directory_id.to_string(),
4515                    application_id: self.application_id.to_string(),
4516                    credential: self
4517                        .credential
4518                        .as_ref()
4519                        .map(|v| match v {
4520                            super::super::__buffa::view::oneof::azure_service_principal::Credential::ClientSecret(
4521                                v,
4522                            ) => {
4523                                super::super::__buffa::oneof::azure_service_principal::Credential::ClientSecret(
4524                                    v.to_string(),
4525                                )
4526                            }
4527                            super::super::__buffa::view::oneof::azure_service_principal::Credential::FederatedTokenFile(
4528                                v,
4529                            ) => {
4530                                super::super::__buffa::oneof::azure_service_principal::Credential::FederatedTokenFile(
4531                                    v.to_string(),
4532                                )
4533                            }
4534                        }),
4535                    __buffa_unknown_fields: self
4536                        .__buffa_unknown_fields
4537                        .to_owned()
4538                        .unwrap_or_default()
4539                        .into(),
4540                    ..::core::default::Default::default()
4541                }
4542            }
4543        }
4544        impl<'a> ::buffa::ViewEncode<'a> for AzureServicePrincipalView<'a> {
4545            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4546            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4547                #[allow(unused_imports)]
4548                use ::buffa::Enumeration as _;
4549                let mut size = 0u32;
4550                if !self.directory_id.is_empty() {
4551                    size
4552                        += 1u32
4553                            + ::buffa::types::string_encoded_len(&self.directory_id)
4554                                as u32;
4555                }
4556                if !self.application_id.is_empty() {
4557                    size
4558                        += 1u32
4559                            + ::buffa::types::string_encoded_len(&self.application_id)
4560                                as u32;
4561                }
4562                if let ::core::option::Option::Some(ref v) = self.credential {
4563                    match v {
4564                        super::super::__buffa::view::oneof::azure_service_principal::Credential::ClientSecret(
4565                            x,
4566                        ) => {
4567                            size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
4568                        }
4569                        super::super::__buffa::view::oneof::azure_service_principal::Credential::FederatedTokenFile(
4570                            x,
4571                        ) => {
4572                            size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
4573                        }
4574                    }
4575                }
4576                size += self.__buffa_unknown_fields.encoded_len() as u32;
4577                size
4578            }
4579            #[allow(clippy::needless_borrow)]
4580            fn write_to(
4581                &self,
4582                _cache: &mut ::buffa::SizeCache,
4583                buf: &mut impl ::buffa::bytes::BufMut,
4584            ) {
4585                #[allow(unused_imports)]
4586                use ::buffa::Enumeration as _;
4587                if !self.directory_id.is_empty() {
4588                    ::buffa::encoding::Tag::new(
4589                            1u32,
4590                            ::buffa::encoding::WireType::LengthDelimited,
4591                        )
4592                        .encode(buf);
4593                    ::buffa::types::encode_string(&self.directory_id, buf);
4594                }
4595                if !self.application_id.is_empty() {
4596                    ::buffa::encoding::Tag::new(
4597                            2u32,
4598                            ::buffa::encoding::WireType::LengthDelimited,
4599                        )
4600                        .encode(buf);
4601                    ::buffa::types::encode_string(&self.application_id, buf);
4602                }
4603                if let ::core::option::Option::Some(ref v) = self.credential {
4604                    match v {
4605                        super::super::__buffa::view::oneof::azure_service_principal::Credential::ClientSecret(
4606                            x,
4607                        ) => {
4608                            ::buffa::encoding::Tag::new(
4609                                    3u32,
4610                                    ::buffa::encoding::WireType::LengthDelimited,
4611                                )
4612                                .encode(buf);
4613                            ::buffa::types::encode_string(x, buf);
4614                        }
4615                        super::super::__buffa::view::oneof::azure_service_principal::Credential::FederatedTokenFile(
4616                            x,
4617                        ) => {
4618                            ::buffa::encoding::Tag::new(
4619                                    5u32,
4620                                    ::buffa::encoding::WireType::LengthDelimited,
4621                                )
4622                                .encode(buf);
4623                            ::buffa::types::encode_string(x, buf);
4624                        }
4625                    }
4626                }
4627                self.__buffa_unknown_fields.write_to(buf);
4628            }
4629        }
4630        /// Serializes this view as protobuf JSON.
4631        ///
4632        /// Implicit-presence fields with default values are omitted, `required`
4633        /// fields are always emitted, explicit-presence (`optional`) fields are
4634        /// emitted only when set, bytes fields are base64-encoded, and enum
4635        /// values are their proto name strings.
4636        ///
4637        /// This impl uses `serialize_map(None)` because the number of emitted
4638        /// fields depends on default-omission rules; serializers that require
4639        /// known map lengths (e.g. `bincode`) will return a runtime error.
4640        /// Use the owned message type for those formats.
4641        impl<'__a> ::serde::Serialize for AzureServicePrincipalView<'__a> {
4642            fn serialize<__S: ::serde::Serializer>(
4643                &self,
4644                __s: __S,
4645            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4646                use ::serde::ser::SerializeMap as _;
4647                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4648                if !::buffa::json_helpers::skip_if::is_empty_str(self.directory_id) {
4649                    __map.serialize_entry("directory_id", self.directory_id)?;
4650                }
4651                if !::buffa::json_helpers::skip_if::is_empty_str(self.application_id) {
4652                    __map.serialize_entry("application_id", self.application_id)?;
4653                }
4654                if let ::core::option::Option::Some(ref __ov) = self.credential {
4655                    match __ov {
4656                        super::super::__buffa::view::oneof::azure_service_principal::Credential::ClientSecret(
4657                            v,
4658                        ) => {
4659                            __map.serialize_entry("client_secret", v)?;
4660                        }
4661                        super::super::__buffa::view::oneof::azure_service_principal::Credential::FederatedTokenFile(
4662                            v,
4663                        ) => {
4664                            __map.serialize_entry("federated_token_file", v)?;
4665                        }
4666                    }
4667                }
4668                __map.end()
4669            }
4670        }
4671        impl<'a> ::buffa::MessageName for AzureServicePrincipalView<'a> {
4672            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
4673            const NAME: &'static str = "AzureServicePrincipal";
4674            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AzureServicePrincipal";
4675            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureServicePrincipal";
4676        }
4677        impl<'v> ::buffa::DefaultViewInstance for AzureServicePrincipalView<'v> {
4678            fn default_view_instance<'a>() -> &'a Self
4679            where
4680                Self: 'a,
4681            {
4682                static VALUE: ::buffa::__private::OnceBox<
4683                    AzureServicePrincipalView<'static>,
4684                > = ::buffa::__private::OnceBox::new();
4685                VALUE
4686                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
4687                        <AzureServicePrincipalView<'static>>::default(),
4688                    ))
4689            }
4690        }
4691        impl ::buffa::ViewReborrow for AzureServicePrincipalView<'static> {
4692            type Reborrowed<'b> = AzureServicePrincipalView<'b>;
4693            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
4694                this
4695            }
4696        }
4697        /** Self-contained, `'static` owned view of a `AzureServicePrincipal` message.
4698
4699 Wraps [`::buffa::OwnedView`]`<`[`AzureServicePrincipalView`]`<'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.
4700
4701 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AzureServicePrincipalView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4702        #[derive(Clone, Debug)]
4703        pub struct AzureServicePrincipalOwnedView(
4704            ::buffa::OwnedView<AzureServicePrincipalView<'static>>,
4705        );
4706        impl AzureServicePrincipalOwnedView {
4707            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4708            ///
4709            /// The view borrows directly from the buffer's data; the buffer is
4710            /// retained inside the returned handle.
4711            ///
4712            /// # Errors
4713            ///
4714            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4715            /// protobuf data.
4716            pub fn decode(
4717                bytes: ::buffa::bytes::Bytes,
4718            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4719                ::core::result::Result::Ok(
4720                    AzureServicePrincipalOwnedView(::buffa::OwnedView::decode(bytes)?),
4721                )
4722            }
4723            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4724            /// max message size).
4725            ///
4726            /// # Errors
4727            ///
4728            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4729            /// exceeds the configured limits.
4730            pub fn decode_with_options(
4731                bytes: ::buffa::bytes::Bytes,
4732                opts: &::buffa::DecodeOptions,
4733            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4734                ::core::result::Result::Ok(
4735                    AzureServicePrincipalOwnedView(
4736                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4737                    ),
4738                )
4739            }
4740            /// Build from an owned message via an encode → decode round-trip.
4741            ///
4742            /// # Errors
4743            ///
4744            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4745            /// somehow invalid (should not happen for well-formed messages).
4746            pub fn from_owned(
4747                msg: &super::super::AzureServicePrincipal,
4748            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4749                ::core::result::Result::Ok(
4750                    AzureServicePrincipalOwnedView(::buffa::OwnedView::from_owned(msg)?),
4751                )
4752            }
4753            /// Borrow the full [`AzureServicePrincipalView`] with its lifetime tied to `&self`.
4754            #[must_use]
4755            pub fn view(&self) -> &AzureServicePrincipalView<'_> {
4756                self.0.reborrow()
4757            }
4758            /// Convert to the owned message type.
4759            #[must_use]
4760            pub fn to_owned_message(&self) -> super::super::AzureServicePrincipal {
4761                self.0.to_owned_message()
4762            }
4763            /// The underlying bytes buffer.
4764            #[must_use]
4765            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4766                self.0.bytes()
4767            }
4768            /// Consume the handle, returning the underlying bytes buffer.
4769            #[must_use]
4770            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4771                self.0.into_bytes()
4772            }
4773            /// The directory ID corresponding to the Azure Active Directory (AAD) tenant of the application.
4774            ///
4775            /// Field 1: `directory_id`
4776            #[must_use]
4777            pub fn directory_id(&self) -> &'_ str {
4778                self.0.reborrow().directory_id
4779            }
4780            /// The application ID of the application registration within the referenced AAD tenant.
4781            ///
4782            /// Field 2: `application_id`
4783            #[must_use]
4784            pub fn application_id(&self) -> &'_ str {
4785                self.0.reborrow().application_id
4786            }
4787            /// Oneof `credential`.
4788            #[must_use]
4789            pub fn credential(
4790                &self,
4791            ) -> ::core::option::Option<
4792                &super::super::__buffa::view::oneof::azure_service_principal::Credential<
4793                    '_,
4794                >,
4795            > {
4796                self.0.reborrow().credential.as_ref()
4797            }
4798        }
4799        impl ::core::convert::From<
4800            ::buffa::OwnedView<AzureServicePrincipalView<'static>>,
4801        > for AzureServicePrincipalOwnedView {
4802            fn from(
4803                inner: ::buffa::OwnedView<AzureServicePrincipalView<'static>>,
4804            ) -> Self {
4805                AzureServicePrincipalOwnedView(inner)
4806            }
4807        }
4808        impl ::core::convert::From<AzureServicePrincipalOwnedView>
4809        for ::buffa::OwnedView<AzureServicePrincipalView<'static>> {
4810            fn from(wrapper: AzureServicePrincipalOwnedView) -> Self {
4811                wrapper.0
4812            }
4813        }
4814        impl ::core::convert::AsRef<
4815            ::buffa::OwnedView<AzureServicePrincipalView<'static>>,
4816        > for AzureServicePrincipalOwnedView {
4817            fn as_ref(&self) -> &::buffa::OwnedView<AzureServicePrincipalView<'static>> {
4818                &self.0
4819            }
4820        }
4821        impl ::buffa::HasMessageView for super::super::AzureServicePrincipal {
4822            type View<'a> = AzureServicePrincipalView<'a>;
4823            type ViewHandle = AzureServicePrincipalOwnedView;
4824        }
4825        impl ::serde::Serialize for AzureServicePrincipalOwnedView {
4826            fn serialize<__S: ::serde::Serializer>(
4827                &self,
4828                __s: __S,
4829            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4830                ::serde::Serialize::serialize(&self.0, __s)
4831            }
4832        }
4833        /// The Azure managed identity configuration.
4834        #[derive(Clone, Debug, Default)]
4835        pub struct AzureManagedIdentityView<'a> {
4836            /// The Azure resource ID of the Azure Databricks Access Connector.
4837            /// Use the format /subscriptions/{guid}/resourceGroups/{rg-name}/providers/
4838            /// Microsoft.Databricks/accessConnectors/{connector-name}.
4839            ///
4840            /// Field 1: `access_connector_id`
4841            pub access_connector_id: &'a str,
4842            /// The Databricks internal ID that represents this managed identity.
4843            ///
4844            /// Field 2: `credential_id`
4845            pub credential_id: ::core::option::Option<&'a str>,
4846            /// The Azure resource ID of the managed identity.
4847            /// Use the format /subscriptions/{guid}/resourceGroups/{rg-name}/providers/
4848            /// Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}.
4849            /// This is only available for user-assigned identities. For system-assigned
4850            /// identities, the access_connector_id is used to identify the identity.
4851            /// If this field is not provided, then the system-assigned identity of the
4852            /// Access Connector is used.
4853            ///
4854            /// Field 3: `managed_identity_id`
4855            pub managed_identity_id: ::core::option::Option<&'a str>,
4856            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4857        }
4858        impl<'a> AzureManagedIdentityView<'a> {
4859            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
4860            ///
4861            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
4862            /// and by generated sub-message decode arms with `depth - 1`.
4863            ///
4864            /// **Not part of the public API.** Named with a leading underscore to
4865            /// signal that it is for generated-code use only.
4866            #[doc(hidden)]
4867            pub fn _decode_depth(
4868                buf: &'a [u8],
4869                depth: u32,
4870            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4871                let mut view = Self::default();
4872                view._merge_into_view(buf, depth)?;
4873                ::core::result::Result::Ok(view)
4874            }
4875            /// Merge fields from `buf` into this view (proto merge semantics).
4876            ///
4877            /// Repeated fields append; singular fields last-wins; singular
4878            /// MESSAGE fields merge recursively. Used by sub-message decode
4879            /// arms when the same field appears multiple times on the wire.
4880            ///
4881            /// **Not part of the public API.**
4882            #[doc(hidden)]
4883            pub fn _merge_into_view(
4884                &mut self,
4885                buf: &'a [u8],
4886                depth: u32,
4887            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4888                let _ = depth;
4889                #[allow(unused_variables)]
4890                let view = self;
4891                let mut cur: &'a [u8] = buf;
4892                while !cur.is_empty() {
4893                    let before_tag = cur;
4894                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
4895                    match tag.field_number() {
4896                        1u32 => {
4897                            if tag.wire_type()
4898                                != ::buffa::encoding::WireType::LengthDelimited
4899                            {
4900                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4901                                    field_number: 1u32,
4902                                    expected: 2u8,
4903                                    actual: tag.wire_type() as u8,
4904                                });
4905                            }
4906                            view.access_connector_id = ::buffa::types::borrow_str(
4907                                &mut cur,
4908                            )?;
4909                        }
4910                        2u32 => {
4911                            if tag.wire_type()
4912                                != ::buffa::encoding::WireType::LengthDelimited
4913                            {
4914                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4915                                    field_number: 2u32,
4916                                    expected: 2u8,
4917                                    actual: tag.wire_type() as u8,
4918                                });
4919                            }
4920                            view.credential_id = Some(
4921                                ::buffa::types::borrow_str(&mut cur)?,
4922                            );
4923                        }
4924                        3u32 => {
4925                            if tag.wire_type()
4926                                != ::buffa::encoding::WireType::LengthDelimited
4927                            {
4928                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
4929                                    field_number: 3u32,
4930                                    expected: 2u8,
4931                                    actual: tag.wire_type() as u8,
4932                                });
4933                            }
4934                            view.managed_identity_id = Some(
4935                                ::buffa::types::borrow_str(&mut cur)?,
4936                            );
4937                        }
4938                        _ => {
4939                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
4940                            let span_len = before_tag.len() - cur.len();
4941                            view.__buffa_unknown_fields
4942                                .push_raw(&before_tag[..span_len]);
4943                        }
4944                    }
4945                }
4946                ::core::result::Result::Ok(())
4947            }
4948        }
4949        impl<'a> ::buffa::MessageView<'a> for AzureManagedIdentityView<'a> {
4950            type Owned = super::super::AzureManagedIdentity;
4951            fn decode_view(
4952                buf: &'a [u8],
4953            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4954                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
4955            }
4956            fn decode_view_with_limit(
4957                buf: &'a [u8],
4958                depth: u32,
4959            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4960                Self::_decode_depth(buf, depth)
4961            }
4962            fn to_owned_message(&self) -> super::super::AzureManagedIdentity {
4963                self.to_owned_from_source(None)
4964            }
4965            #[allow(clippy::useless_conversion, clippy::needless_update)]
4966            fn to_owned_from_source(
4967                &self,
4968                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4969            ) -> super::super::AzureManagedIdentity {
4970                #[allow(unused_imports)]
4971                use ::buffa::alloc::string::ToString as _;
4972                let _ = __buffa_src;
4973                super::super::AzureManagedIdentity {
4974                    access_connector_id: self.access_connector_id.to_string(),
4975                    credential_id: self.credential_id.map(|s| s.to_string()),
4976                    managed_identity_id: self.managed_identity_id.map(|s| s.to_string()),
4977                    __buffa_unknown_fields: self
4978                        .__buffa_unknown_fields
4979                        .to_owned()
4980                        .unwrap_or_default()
4981                        .into(),
4982                    ..::core::default::Default::default()
4983                }
4984            }
4985        }
4986        impl<'a> ::buffa::ViewEncode<'a> for AzureManagedIdentityView<'a> {
4987            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4988            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4989                #[allow(unused_imports)]
4990                use ::buffa::Enumeration as _;
4991                let mut size = 0u32;
4992                if !self.access_connector_id.is_empty() {
4993                    size
4994                        += 1u32
4995                            + ::buffa::types::string_encoded_len(
4996                                &self.access_connector_id,
4997                            ) as u32;
4998                }
4999                if let Some(ref v) = self.credential_id {
5000                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5001                }
5002                if let Some(ref v) = self.managed_identity_id {
5003                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5004                }
5005                size += self.__buffa_unknown_fields.encoded_len() as u32;
5006                size
5007            }
5008            #[allow(clippy::needless_borrow)]
5009            fn write_to(
5010                &self,
5011                _cache: &mut ::buffa::SizeCache,
5012                buf: &mut impl ::buffa::bytes::BufMut,
5013            ) {
5014                #[allow(unused_imports)]
5015                use ::buffa::Enumeration as _;
5016                if !self.access_connector_id.is_empty() {
5017                    ::buffa::encoding::Tag::new(
5018                            1u32,
5019                            ::buffa::encoding::WireType::LengthDelimited,
5020                        )
5021                        .encode(buf);
5022                    ::buffa::types::encode_string(&self.access_connector_id, buf);
5023                }
5024                if let Some(ref v) = self.credential_id {
5025                    ::buffa::encoding::Tag::new(
5026                            2u32,
5027                            ::buffa::encoding::WireType::LengthDelimited,
5028                        )
5029                        .encode(buf);
5030                    ::buffa::types::encode_string(v, buf);
5031                }
5032                if let Some(ref v) = self.managed_identity_id {
5033                    ::buffa::encoding::Tag::new(
5034                            3u32,
5035                            ::buffa::encoding::WireType::LengthDelimited,
5036                        )
5037                        .encode(buf);
5038                    ::buffa::types::encode_string(v, buf);
5039                }
5040                self.__buffa_unknown_fields.write_to(buf);
5041            }
5042        }
5043        /// Serializes this view as protobuf JSON.
5044        ///
5045        /// Implicit-presence fields with default values are omitted, `required`
5046        /// fields are always emitted, explicit-presence (`optional`) fields are
5047        /// emitted only when set, bytes fields are base64-encoded, and enum
5048        /// values are their proto name strings.
5049        ///
5050        /// This impl uses `serialize_map(None)` because the number of emitted
5051        /// fields depends on default-omission rules; serializers that require
5052        /// known map lengths (e.g. `bincode`) will return a runtime error.
5053        /// Use the owned message type for those formats.
5054        impl<'__a> ::serde::Serialize for AzureManagedIdentityView<'__a> {
5055            fn serialize<__S: ::serde::Serializer>(
5056                &self,
5057                __s: __S,
5058            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5059                use ::serde::ser::SerializeMap as _;
5060                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5061                if !::buffa::json_helpers::skip_if::is_empty_str(
5062                    self.access_connector_id,
5063                ) {
5064                    __map
5065                        .serialize_entry("access_connector_id", self.access_connector_id)?;
5066                }
5067                if let ::core::option::Option::Some(__v) = self.credential_id {
5068                    __map.serialize_entry("credential_id", __v)?;
5069                }
5070                if let ::core::option::Option::Some(__v) = self.managed_identity_id {
5071                    __map.serialize_entry("managed_identity_id", __v)?;
5072                }
5073                __map.end()
5074            }
5075        }
5076        impl<'a> ::buffa::MessageName for AzureManagedIdentityView<'a> {
5077            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
5078            const NAME: &'static str = "AzureManagedIdentity";
5079            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AzureManagedIdentity";
5080            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureManagedIdentity";
5081        }
5082        impl<'v> ::buffa::DefaultViewInstance for AzureManagedIdentityView<'v> {
5083            fn default_view_instance<'a>() -> &'a Self
5084            where
5085                Self: 'a,
5086            {
5087                static VALUE: ::buffa::__private::OnceBox<
5088                    AzureManagedIdentityView<'static>,
5089                > = ::buffa::__private::OnceBox::new();
5090                VALUE
5091                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5092                        <AzureManagedIdentityView<'static>>::default(),
5093                    ))
5094            }
5095        }
5096        impl ::buffa::ViewReborrow for AzureManagedIdentityView<'static> {
5097            type Reborrowed<'b> = AzureManagedIdentityView<'b>;
5098            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5099                this
5100            }
5101        }
5102        /** Self-contained, `'static` owned view of a `AzureManagedIdentity` message.
5103
5104 Wraps [`::buffa::OwnedView`]`<`[`AzureManagedIdentityView`]`<'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.
5105
5106 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AzureManagedIdentityView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5107        #[derive(Clone, Debug)]
5108        pub struct AzureManagedIdentityOwnedView(
5109            ::buffa::OwnedView<AzureManagedIdentityView<'static>>,
5110        );
5111        impl AzureManagedIdentityOwnedView {
5112            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5113            ///
5114            /// The view borrows directly from the buffer's data; the buffer is
5115            /// retained inside the returned handle.
5116            ///
5117            /// # Errors
5118            ///
5119            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5120            /// protobuf data.
5121            pub fn decode(
5122                bytes: ::buffa::bytes::Bytes,
5123            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5124                ::core::result::Result::Ok(
5125                    AzureManagedIdentityOwnedView(::buffa::OwnedView::decode(bytes)?),
5126                )
5127            }
5128            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5129            /// max message size).
5130            ///
5131            /// # Errors
5132            ///
5133            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5134            /// exceeds the configured limits.
5135            pub fn decode_with_options(
5136                bytes: ::buffa::bytes::Bytes,
5137                opts: &::buffa::DecodeOptions,
5138            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5139                ::core::result::Result::Ok(
5140                    AzureManagedIdentityOwnedView(
5141                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5142                    ),
5143                )
5144            }
5145            /// Build from an owned message via an encode → decode round-trip.
5146            ///
5147            /// # Errors
5148            ///
5149            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5150            /// somehow invalid (should not happen for well-formed messages).
5151            pub fn from_owned(
5152                msg: &super::super::AzureManagedIdentity,
5153            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5154                ::core::result::Result::Ok(
5155                    AzureManagedIdentityOwnedView(::buffa::OwnedView::from_owned(msg)?),
5156                )
5157            }
5158            /// Borrow the full [`AzureManagedIdentityView`] with its lifetime tied to `&self`.
5159            #[must_use]
5160            pub fn view(&self) -> &AzureManagedIdentityView<'_> {
5161                self.0.reborrow()
5162            }
5163            /// Convert to the owned message type.
5164            #[must_use]
5165            pub fn to_owned_message(&self) -> super::super::AzureManagedIdentity {
5166                self.0.to_owned_message()
5167            }
5168            /// The underlying bytes buffer.
5169            #[must_use]
5170            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5171                self.0.bytes()
5172            }
5173            /// Consume the handle, returning the underlying bytes buffer.
5174            #[must_use]
5175            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5176                self.0.into_bytes()
5177            }
5178            /// The Azure resource ID of the Azure Databricks Access Connector.
5179            /// Use the format /subscriptions/{guid}/resourceGroups/{rg-name}/providers/
5180            /// Microsoft.Databricks/accessConnectors/{connector-name}.
5181            ///
5182            /// Field 1: `access_connector_id`
5183            #[must_use]
5184            pub fn access_connector_id(&self) -> &'_ str {
5185                self.0.reborrow().access_connector_id
5186            }
5187            /// The Databricks internal ID that represents this managed identity.
5188            ///
5189            /// Field 2: `credential_id`
5190            #[must_use]
5191            pub fn credential_id(&self) -> ::core::option::Option<&'_ str> {
5192                self.0.reborrow().credential_id
5193            }
5194            /// The Azure resource ID of the managed identity.
5195            /// Use the format /subscriptions/{guid}/resourceGroups/{rg-name}/providers/
5196            /// Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}.
5197            /// This is only available for user-assigned identities. For system-assigned
5198            /// identities, the access_connector_id is used to identify the identity.
5199            /// If this field is not provided, then the system-assigned identity of the
5200            /// Access Connector is used.
5201            ///
5202            /// Field 3: `managed_identity_id`
5203            #[must_use]
5204            pub fn managed_identity_id(&self) -> ::core::option::Option<&'_ str> {
5205                self.0.reborrow().managed_identity_id
5206            }
5207        }
5208        impl ::core::convert::From<::buffa::OwnedView<AzureManagedIdentityView<'static>>>
5209        for AzureManagedIdentityOwnedView {
5210            fn from(
5211                inner: ::buffa::OwnedView<AzureManagedIdentityView<'static>>,
5212            ) -> Self {
5213                AzureManagedIdentityOwnedView(inner)
5214            }
5215        }
5216        impl ::core::convert::From<AzureManagedIdentityOwnedView>
5217        for ::buffa::OwnedView<AzureManagedIdentityView<'static>> {
5218            fn from(wrapper: AzureManagedIdentityOwnedView) -> Self {
5219                wrapper.0
5220            }
5221        }
5222        impl ::core::convert::AsRef<
5223            ::buffa::OwnedView<AzureManagedIdentityView<'static>>,
5224        > for AzureManagedIdentityOwnedView {
5225            fn as_ref(&self) -> &::buffa::OwnedView<AzureManagedIdentityView<'static>> {
5226                &self.0
5227            }
5228        }
5229        impl ::buffa::HasMessageView for super::super::AzureManagedIdentity {
5230            type View<'a> = AzureManagedIdentityView<'a>;
5231            type ViewHandle = AzureManagedIdentityOwnedView;
5232        }
5233        impl ::serde::Serialize for AzureManagedIdentityOwnedView {
5234            fn serialize<__S: ::serde::Serializer>(
5235                &self,
5236                __s: __S,
5237            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5238                ::serde::Serialize::serialize(&self.0, __s)
5239            }
5240        }
5241        /// The Azure storage key configuration.
5242        #[derive(Clone, Debug, Default)]
5243        pub struct AzureStorageKeyView<'a> {
5244            /// The name of the storage account.
5245            ///
5246            /// Field 1: `account_name`
5247            pub account_name: &'a str,
5248            /// The account key of the storage account.
5249            ///
5250            /// Field 2: `account_key`
5251            pub account_key: &'a str,
5252            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5253        }
5254        impl<'a> AzureStorageKeyView<'a> {
5255            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5256            ///
5257            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5258            /// and by generated sub-message decode arms with `depth - 1`.
5259            ///
5260            /// **Not part of the public API.** Named with a leading underscore to
5261            /// signal that it is for generated-code use only.
5262            #[doc(hidden)]
5263            pub fn _decode_depth(
5264                buf: &'a [u8],
5265                depth: u32,
5266            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5267                let mut view = Self::default();
5268                view._merge_into_view(buf, depth)?;
5269                ::core::result::Result::Ok(view)
5270            }
5271            /// Merge fields from `buf` into this view (proto merge semantics).
5272            ///
5273            /// Repeated fields append; singular fields last-wins; singular
5274            /// MESSAGE fields merge recursively. Used by sub-message decode
5275            /// arms when the same field appears multiple times on the wire.
5276            ///
5277            /// **Not part of the public API.**
5278            #[doc(hidden)]
5279            pub fn _merge_into_view(
5280                &mut self,
5281                buf: &'a [u8],
5282                depth: u32,
5283            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5284                let _ = depth;
5285                #[allow(unused_variables)]
5286                let view = self;
5287                let mut cur: &'a [u8] = buf;
5288                while !cur.is_empty() {
5289                    let before_tag = cur;
5290                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5291                    match tag.field_number() {
5292                        1u32 => {
5293                            if tag.wire_type()
5294                                != ::buffa::encoding::WireType::LengthDelimited
5295                            {
5296                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5297                                    field_number: 1u32,
5298                                    expected: 2u8,
5299                                    actual: tag.wire_type() as u8,
5300                                });
5301                            }
5302                            view.account_name = ::buffa::types::borrow_str(&mut cur)?;
5303                        }
5304                        2u32 => {
5305                            if tag.wire_type()
5306                                != ::buffa::encoding::WireType::LengthDelimited
5307                            {
5308                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5309                                    field_number: 2u32,
5310                                    expected: 2u8,
5311                                    actual: tag.wire_type() as u8,
5312                                });
5313                            }
5314                            view.account_key = ::buffa::types::borrow_str(&mut cur)?;
5315                        }
5316                        _ => {
5317                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5318                            let span_len = before_tag.len() - cur.len();
5319                            view.__buffa_unknown_fields
5320                                .push_raw(&before_tag[..span_len]);
5321                        }
5322                    }
5323                }
5324                ::core::result::Result::Ok(())
5325            }
5326        }
5327        impl<'a> ::buffa::MessageView<'a> for AzureStorageKeyView<'a> {
5328            type Owned = super::super::AzureStorageKey;
5329            fn decode_view(
5330                buf: &'a [u8],
5331            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5332                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5333            }
5334            fn decode_view_with_limit(
5335                buf: &'a [u8],
5336                depth: u32,
5337            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5338                Self::_decode_depth(buf, depth)
5339            }
5340            fn to_owned_message(&self) -> super::super::AzureStorageKey {
5341                self.to_owned_from_source(None)
5342            }
5343            #[allow(clippy::useless_conversion, clippy::needless_update)]
5344            fn to_owned_from_source(
5345                &self,
5346                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5347            ) -> super::super::AzureStorageKey {
5348                #[allow(unused_imports)]
5349                use ::buffa::alloc::string::ToString as _;
5350                let _ = __buffa_src;
5351                super::super::AzureStorageKey {
5352                    account_name: self.account_name.to_string(),
5353                    account_key: self.account_key.to_string(),
5354                    __buffa_unknown_fields: self
5355                        .__buffa_unknown_fields
5356                        .to_owned()
5357                        .unwrap_or_default()
5358                        .into(),
5359                    ..::core::default::Default::default()
5360                }
5361            }
5362        }
5363        impl<'a> ::buffa::ViewEncode<'a> for AzureStorageKeyView<'a> {
5364            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5365            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5366                #[allow(unused_imports)]
5367                use ::buffa::Enumeration as _;
5368                let mut size = 0u32;
5369                if !self.account_name.is_empty() {
5370                    size
5371                        += 1u32
5372                            + ::buffa::types::string_encoded_len(&self.account_name)
5373                                as u32;
5374                }
5375                if !self.account_key.is_empty() {
5376                    size
5377                        += 1u32
5378                            + ::buffa::types::string_encoded_len(&self.account_key)
5379                                as u32;
5380                }
5381                size += self.__buffa_unknown_fields.encoded_len() as u32;
5382                size
5383            }
5384            #[allow(clippy::needless_borrow)]
5385            fn write_to(
5386                &self,
5387                _cache: &mut ::buffa::SizeCache,
5388                buf: &mut impl ::buffa::bytes::BufMut,
5389            ) {
5390                #[allow(unused_imports)]
5391                use ::buffa::Enumeration as _;
5392                if !self.account_name.is_empty() {
5393                    ::buffa::encoding::Tag::new(
5394                            1u32,
5395                            ::buffa::encoding::WireType::LengthDelimited,
5396                        )
5397                        .encode(buf);
5398                    ::buffa::types::encode_string(&self.account_name, buf);
5399                }
5400                if !self.account_key.is_empty() {
5401                    ::buffa::encoding::Tag::new(
5402                            2u32,
5403                            ::buffa::encoding::WireType::LengthDelimited,
5404                        )
5405                        .encode(buf);
5406                    ::buffa::types::encode_string(&self.account_key, buf);
5407                }
5408                self.__buffa_unknown_fields.write_to(buf);
5409            }
5410        }
5411        /// Serializes this view as protobuf JSON.
5412        ///
5413        /// Implicit-presence fields with default values are omitted, `required`
5414        /// fields are always emitted, explicit-presence (`optional`) fields are
5415        /// emitted only when set, bytes fields are base64-encoded, and enum
5416        /// values are their proto name strings.
5417        ///
5418        /// This impl uses `serialize_map(None)` because the number of emitted
5419        /// fields depends on default-omission rules; serializers that require
5420        /// known map lengths (e.g. `bincode`) will return a runtime error.
5421        /// Use the owned message type for those formats.
5422        impl<'__a> ::serde::Serialize for AzureStorageKeyView<'__a> {
5423            fn serialize<__S: ::serde::Serializer>(
5424                &self,
5425                __s: __S,
5426            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5427                use ::serde::ser::SerializeMap as _;
5428                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5429                if !::buffa::json_helpers::skip_if::is_empty_str(self.account_name) {
5430                    __map.serialize_entry("account_name", self.account_name)?;
5431                }
5432                if !::buffa::json_helpers::skip_if::is_empty_str(self.account_key) {
5433                    __map.serialize_entry("account_key", self.account_key)?;
5434                }
5435                __map.end()
5436            }
5437        }
5438        impl<'a> ::buffa::MessageName for AzureStorageKeyView<'a> {
5439            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
5440            const NAME: &'static str = "AzureStorageKey";
5441            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AzureStorageKey";
5442            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AzureStorageKey";
5443        }
5444        impl<'v> ::buffa::DefaultViewInstance for AzureStorageKeyView<'v> {
5445            fn default_view_instance<'a>() -> &'a Self
5446            where
5447                Self: 'a,
5448            {
5449                static VALUE: ::buffa::__private::OnceBox<
5450                    AzureStorageKeyView<'static>,
5451                > = ::buffa::__private::OnceBox::new();
5452                VALUE
5453                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5454                        <AzureStorageKeyView<'static>>::default(),
5455                    ))
5456            }
5457        }
5458        impl ::buffa::ViewReborrow for AzureStorageKeyView<'static> {
5459            type Reborrowed<'b> = AzureStorageKeyView<'b>;
5460            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5461                this
5462            }
5463        }
5464        /** Self-contained, `'static` owned view of a `AzureStorageKey` message.
5465
5466 Wraps [`::buffa::OwnedView`]`<`[`AzureStorageKeyView`]`<'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.
5467
5468 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AzureStorageKeyView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5469        #[derive(Clone, Debug)]
5470        pub struct AzureStorageKeyOwnedView(
5471            ::buffa::OwnedView<AzureStorageKeyView<'static>>,
5472        );
5473        impl AzureStorageKeyOwnedView {
5474            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5475            ///
5476            /// The view borrows directly from the buffer's data; the buffer is
5477            /// retained inside the returned handle.
5478            ///
5479            /// # Errors
5480            ///
5481            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5482            /// protobuf data.
5483            pub fn decode(
5484                bytes: ::buffa::bytes::Bytes,
5485            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5486                ::core::result::Result::Ok(
5487                    AzureStorageKeyOwnedView(::buffa::OwnedView::decode(bytes)?),
5488                )
5489            }
5490            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5491            /// max message size).
5492            ///
5493            /// # Errors
5494            ///
5495            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5496            /// exceeds the configured limits.
5497            pub fn decode_with_options(
5498                bytes: ::buffa::bytes::Bytes,
5499                opts: &::buffa::DecodeOptions,
5500            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5501                ::core::result::Result::Ok(
5502                    AzureStorageKeyOwnedView(
5503                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5504                    ),
5505                )
5506            }
5507            /// Build from an owned message via an encode → decode round-trip.
5508            ///
5509            /// # Errors
5510            ///
5511            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5512            /// somehow invalid (should not happen for well-formed messages).
5513            pub fn from_owned(
5514                msg: &super::super::AzureStorageKey,
5515            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5516                ::core::result::Result::Ok(
5517                    AzureStorageKeyOwnedView(::buffa::OwnedView::from_owned(msg)?),
5518                )
5519            }
5520            /// Borrow the full [`AzureStorageKeyView`] with its lifetime tied to `&self`.
5521            #[must_use]
5522            pub fn view(&self) -> &AzureStorageKeyView<'_> {
5523                self.0.reborrow()
5524            }
5525            /// Convert to the owned message type.
5526            #[must_use]
5527            pub fn to_owned_message(&self) -> super::super::AzureStorageKey {
5528                self.0.to_owned_message()
5529            }
5530            /// The underlying bytes buffer.
5531            #[must_use]
5532            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5533                self.0.bytes()
5534            }
5535            /// Consume the handle, returning the underlying bytes buffer.
5536            #[must_use]
5537            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5538                self.0.into_bytes()
5539            }
5540            /// The name of the storage account.
5541            ///
5542            /// Field 1: `account_name`
5543            #[must_use]
5544            pub fn account_name(&self) -> &'_ str {
5545                self.0.reborrow().account_name
5546            }
5547            /// The account key of the storage account.
5548            ///
5549            /// Field 2: `account_key`
5550            #[must_use]
5551            pub fn account_key(&self) -> &'_ str {
5552                self.0.reborrow().account_key
5553            }
5554        }
5555        impl ::core::convert::From<::buffa::OwnedView<AzureStorageKeyView<'static>>>
5556        for AzureStorageKeyOwnedView {
5557            fn from(inner: ::buffa::OwnedView<AzureStorageKeyView<'static>>) -> Self {
5558                AzureStorageKeyOwnedView(inner)
5559            }
5560        }
5561        impl ::core::convert::From<AzureStorageKeyOwnedView>
5562        for ::buffa::OwnedView<AzureStorageKeyView<'static>> {
5563            fn from(wrapper: AzureStorageKeyOwnedView) -> Self {
5564                wrapper.0
5565            }
5566        }
5567        impl ::core::convert::AsRef<::buffa::OwnedView<AzureStorageKeyView<'static>>>
5568        for AzureStorageKeyOwnedView {
5569            fn as_ref(&self) -> &::buffa::OwnedView<AzureStorageKeyView<'static>> {
5570                &self.0
5571            }
5572        }
5573        impl ::buffa::HasMessageView for super::super::AzureStorageKey {
5574            type View<'a> = AzureStorageKeyView<'a>;
5575            type ViewHandle = AzureStorageKeyOwnedView;
5576        }
5577        impl ::serde::Serialize for AzureStorageKeyOwnedView {
5578            fn serialize<__S: ::serde::Serializer>(
5579                &self,
5580                __s: __S,
5581            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5582                ::serde::Serialize::serialize(&self.0, __s)
5583            }
5584        }
5585        /// The AWS IAM role configuration used server-side to call STS AssumeRole.
5586        ///
5587        /// This is an internal configuration type, not exposed in the public API response.
5588        /// It stores the static credentials (or ambient credential fallback) used to
5589        /// authorize the STS:AssumeRole call when vending temporary credentials.
5590        #[derive(Clone, Debug, Default)]
5591        pub struct AwsIamRoleConfigView<'a> {
5592            /// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials.
5593            ///
5594            /// Field 1: `role_arn`
5595            pub role_arn: &'a str,
5596            /// The AWS region where STS calls are made. Defaults to "us-east-1" if absent.
5597            ///
5598            /// Field 2: `region`
5599            pub region: ::core::option::Option<&'a str>,
5600            /// AWS access key ID used to authorize the STS AssumeRole call.
5601            ///
5602            /// When set together with secret_access_key, these static credentials are used
5603            /// as the base identity to call STS:AssumeRole. When omitted, the server falls
5604            /// back to ambient credentials (instance profile, ECS task role, WebIdentity, etc.).
5605            ///
5606            /// Field 3: `access_key_id`
5607            pub access_key_id: ::core::option::Option<&'a str>,
5608            /// AWS secret access key paired with access_key_id.
5609            ///
5610            /// Field 4: `secret_access_key`
5611            pub secret_access_key: ::core::option::Option<&'a str>,
5612            /// Optional AWS session token for temporary base credentials (e.g. when the
5613            /// caller itself holds STS-vended credentials as the base identity).
5614            ///
5615            /// Field 5: `session_token`
5616            pub session_token: ::core::option::Option<&'a str>,
5617            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5618        }
5619        impl<'a> AwsIamRoleConfigView<'a> {
5620            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
5621            ///
5622            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
5623            /// and by generated sub-message decode arms with `depth - 1`.
5624            ///
5625            /// **Not part of the public API.** Named with a leading underscore to
5626            /// signal that it is for generated-code use only.
5627            #[doc(hidden)]
5628            pub fn _decode_depth(
5629                buf: &'a [u8],
5630                depth: u32,
5631            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5632                let mut view = Self::default();
5633                view._merge_into_view(buf, depth)?;
5634                ::core::result::Result::Ok(view)
5635            }
5636            /// Merge fields from `buf` into this view (proto merge semantics).
5637            ///
5638            /// Repeated fields append; singular fields last-wins; singular
5639            /// MESSAGE fields merge recursively. Used by sub-message decode
5640            /// arms when the same field appears multiple times on the wire.
5641            ///
5642            /// **Not part of the public API.**
5643            #[doc(hidden)]
5644            pub fn _merge_into_view(
5645                &mut self,
5646                buf: &'a [u8],
5647                depth: u32,
5648            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5649                let _ = depth;
5650                #[allow(unused_variables)]
5651                let view = self;
5652                let mut cur: &'a [u8] = buf;
5653                while !cur.is_empty() {
5654                    let before_tag = cur;
5655                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
5656                    match tag.field_number() {
5657                        1u32 => {
5658                            if tag.wire_type()
5659                                != ::buffa::encoding::WireType::LengthDelimited
5660                            {
5661                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5662                                    field_number: 1u32,
5663                                    expected: 2u8,
5664                                    actual: tag.wire_type() as u8,
5665                                });
5666                            }
5667                            view.role_arn = ::buffa::types::borrow_str(&mut cur)?;
5668                        }
5669                        2u32 => {
5670                            if tag.wire_type()
5671                                != ::buffa::encoding::WireType::LengthDelimited
5672                            {
5673                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5674                                    field_number: 2u32,
5675                                    expected: 2u8,
5676                                    actual: tag.wire_type() as u8,
5677                                });
5678                            }
5679                            view.region = Some(::buffa::types::borrow_str(&mut cur)?);
5680                        }
5681                        3u32 => {
5682                            if tag.wire_type()
5683                                != ::buffa::encoding::WireType::LengthDelimited
5684                            {
5685                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5686                                    field_number: 3u32,
5687                                    expected: 2u8,
5688                                    actual: tag.wire_type() as u8,
5689                                });
5690                            }
5691                            view.access_key_id = Some(
5692                                ::buffa::types::borrow_str(&mut cur)?,
5693                            );
5694                        }
5695                        4u32 => {
5696                            if tag.wire_type()
5697                                != ::buffa::encoding::WireType::LengthDelimited
5698                            {
5699                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5700                                    field_number: 4u32,
5701                                    expected: 2u8,
5702                                    actual: tag.wire_type() as u8,
5703                                });
5704                            }
5705                            view.secret_access_key = Some(
5706                                ::buffa::types::borrow_str(&mut cur)?,
5707                            );
5708                        }
5709                        5u32 => {
5710                            if tag.wire_type()
5711                                != ::buffa::encoding::WireType::LengthDelimited
5712                            {
5713                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
5714                                    field_number: 5u32,
5715                                    expected: 2u8,
5716                                    actual: tag.wire_type() as u8,
5717                                });
5718                            }
5719                            view.session_token = Some(
5720                                ::buffa::types::borrow_str(&mut cur)?,
5721                            );
5722                        }
5723                        _ => {
5724                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
5725                            let span_len = before_tag.len() - cur.len();
5726                            view.__buffa_unknown_fields
5727                                .push_raw(&before_tag[..span_len]);
5728                        }
5729                    }
5730                }
5731                ::core::result::Result::Ok(())
5732            }
5733        }
5734        impl<'a> ::buffa::MessageView<'a> for AwsIamRoleConfigView<'a> {
5735            type Owned = super::super::AwsIamRoleConfig;
5736            fn decode_view(
5737                buf: &'a [u8],
5738            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5739                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
5740            }
5741            fn decode_view_with_limit(
5742                buf: &'a [u8],
5743                depth: u32,
5744            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5745                Self::_decode_depth(buf, depth)
5746            }
5747            fn to_owned_message(&self) -> super::super::AwsIamRoleConfig {
5748                self.to_owned_from_source(None)
5749            }
5750            #[allow(clippy::useless_conversion, clippy::needless_update)]
5751            fn to_owned_from_source(
5752                &self,
5753                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5754            ) -> super::super::AwsIamRoleConfig {
5755                #[allow(unused_imports)]
5756                use ::buffa::alloc::string::ToString as _;
5757                let _ = __buffa_src;
5758                super::super::AwsIamRoleConfig {
5759                    role_arn: self.role_arn.to_string(),
5760                    region: self.region.map(|s| s.to_string()),
5761                    access_key_id: self.access_key_id.map(|s| s.to_string()),
5762                    secret_access_key: self.secret_access_key.map(|s| s.to_string()),
5763                    session_token: self.session_token.map(|s| s.to_string()),
5764                    __buffa_unknown_fields: self
5765                        .__buffa_unknown_fields
5766                        .to_owned()
5767                        .unwrap_or_default()
5768                        .into(),
5769                    ..::core::default::Default::default()
5770                }
5771            }
5772        }
5773        impl<'a> ::buffa::ViewEncode<'a> for AwsIamRoleConfigView<'a> {
5774            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5775            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5776                #[allow(unused_imports)]
5777                use ::buffa::Enumeration as _;
5778                let mut size = 0u32;
5779                if !self.role_arn.is_empty() {
5780                    size
5781                        += 1u32
5782                            + ::buffa::types::string_encoded_len(&self.role_arn) as u32;
5783                }
5784                if let Some(ref v) = self.region {
5785                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5786                }
5787                if let Some(ref v) = self.access_key_id {
5788                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5789                }
5790                if let Some(ref v) = self.secret_access_key {
5791                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5792                }
5793                if let Some(ref v) = self.session_token {
5794                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
5795                }
5796                size += self.__buffa_unknown_fields.encoded_len() as u32;
5797                size
5798            }
5799            #[allow(clippy::needless_borrow)]
5800            fn write_to(
5801                &self,
5802                _cache: &mut ::buffa::SizeCache,
5803                buf: &mut impl ::buffa::bytes::BufMut,
5804            ) {
5805                #[allow(unused_imports)]
5806                use ::buffa::Enumeration as _;
5807                if !self.role_arn.is_empty() {
5808                    ::buffa::encoding::Tag::new(
5809                            1u32,
5810                            ::buffa::encoding::WireType::LengthDelimited,
5811                        )
5812                        .encode(buf);
5813                    ::buffa::types::encode_string(&self.role_arn, buf);
5814                }
5815                if let Some(ref v) = self.region {
5816                    ::buffa::encoding::Tag::new(
5817                            2u32,
5818                            ::buffa::encoding::WireType::LengthDelimited,
5819                        )
5820                        .encode(buf);
5821                    ::buffa::types::encode_string(v, buf);
5822                }
5823                if let Some(ref v) = self.access_key_id {
5824                    ::buffa::encoding::Tag::new(
5825                            3u32,
5826                            ::buffa::encoding::WireType::LengthDelimited,
5827                        )
5828                        .encode(buf);
5829                    ::buffa::types::encode_string(v, buf);
5830                }
5831                if let Some(ref v) = self.secret_access_key {
5832                    ::buffa::encoding::Tag::new(
5833                            4u32,
5834                            ::buffa::encoding::WireType::LengthDelimited,
5835                        )
5836                        .encode(buf);
5837                    ::buffa::types::encode_string(v, buf);
5838                }
5839                if let Some(ref v) = self.session_token {
5840                    ::buffa::encoding::Tag::new(
5841                            5u32,
5842                            ::buffa::encoding::WireType::LengthDelimited,
5843                        )
5844                        .encode(buf);
5845                    ::buffa::types::encode_string(v, buf);
5846                }
5847                self.__buffa_unknown_fields.write_to(buf);
5848            }
5849        }
5850        /// Serializes this view as protobuf JSON.
5851        ///
5852        /// Implicit-presence fields with default values are omitted, `required`
5853        /// fields are always emitted, explicit-presence (`optional`) fields are
5854        /// emitted only when set, bytes fields are base64-encoded, and enum
5855        /// values are their proto name strings.
5856        ///
5857        /// This impl uses `serialize_map(None)` because the number of emitted
5858        /// fields depends on default-omission rules; serializers that require
5859        /// known map lengths (e.g. `bincode`) will return a runtime error.
5860        /// Use the owned message type for those formats.
5861        impl<'__a> ::serde::Serialize for AwsIamRoleConfigView<'__a> {
5862            fn serialize<__S: ::serde::Serializer>(
5863                &self,
5864                __s: __S,
5865            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5866                use ::serde::ser::SerializeMap as _;
5867                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5868                if !::buffa::json_helpers::skip_if::is_empty_str(self.role_arn) {
5869                    __map.serialize_entry("role_arn", self.role_arn)?;
5870                }
5871                if let ::core::option::Option::Some(__v) = self.region {
5872                    __map.serialize_entry("region", __v)?;
5873                }
5874                if let ::core::option::Option::Some(__v) = self.access_key_id {
5875                    __map.serialize_entry("access_key_id", __v)?;
5876                }
5877                if let ::core::option::Option::Some(__v) = self.secret_access_key {
5878                    __map.serialize_entry("secret_access_key", __v)?;
5879                }
5880                if let ::core::option::Option::Some(__v) = self.session_token {
5881                    __map.serialize_entry("session_token", __v)?;
5882                }
5883                __map.end()
5884            }
5885        }
5886        impl<'a> ::buffa::MessageName for AwsIamRoleConfigView<'a> {
5887            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
5888            const NAME: &'static str = "AwsIamRoleConfig";
5889            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AwsIamRoleConfig";
5890            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AwsIamRoleConfig";
5891        }
5892        impl<'v> ::buffa::DefaultViewInstance for AwsIamRoleConfigView<'v> {
5893            fn default_view_instance<'a>() -> &'a Self
5894            where
5895                Self: 'a,
5896            {
5897                static VALUE: ::buffa::__private::OnceBox<
5898                    AwsIamRoleConfigView<'static>,
5899                > = ::buffa::__private::OnceBox::new();
5900                VALUE
5901                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
5902                        <AwsIamRoleConfigView<'static>>::default(),
5903                    ))
5904            }
5905        }
5906        impl ::buffa::ViewReborrow for AwsIamRoleConfigView<'static> {
5907            type Reborrowed<'b> = AwsIamRoleConfigView<'b>;
5908            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
5909                this
5910            }
5911        }
5912        /** Self-contained, `'static` owned view of a `AwsIamRoleConfig` message.
5913
5914 Wraps [`::buffa::OwnedView`]`<`[`AwsIamRoleConfigView`]`<'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.
5915
5916 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AwsIamRoleConfigView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5917        #[derive(Clone, Debug)]
5918        pub struct AwsIamRoleConfigOwnedView(
5919            ::buffa::OwnedView<AwsIamRoleConfigView<'static>>,
5920        );
5921        impl AwsIamRoleConfigOwnedView {
5922            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5923            ///
5924            /// The view borrows directly from the buffer's data; the buffer is
5925            /// retained inside the returned handle.
5926            ///
5927            /// # Errors
5928            ///
5929            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5930            /// protobuf data.
5931            pub fn decode(
5932                bytes: ::buffa::bytes::Bytes,
5933            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5934                ::core::result::Result::Ok(
5935                    AwsIamRoleConfigOwnedView(::buffa::OwnedView::decode(bytes)?),
5936                )
5937            }
5938            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5939            /// max message size).
5940            ///
5941            /// # Errors
5942            ///
5943            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5944            /// exceeds the configured limits.
5945            pub fn decode_with_options(
5946                bytes: ::buffa::bytes::Bytes,
5947                opts: &::buffa::DecodeOptions,
5948            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5949                ::core::result::Result::Ok(
5950                    AwsIamRoleConfigOwnedView(
5951                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5952                    ),
5953                )
5954            }
5955            /// Build from an owned message via an encode → decode round-trip.
5956            ///
5957            /// # Errors
5958            ///
5959            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5960            /// somehow invalid (should not happen for well-formed messages).
5961            pub fn from_owned(
5962                msg: &super::super::AwsIamRoleConfig,
5963            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5964                ::core::result::Result::Ok(
5965                    AwsIamRoleConfigOwnedView(::buffa::OwnedView::from_owned(msg)?),
5966                )
5967            }
5968            /// Borrow the full [`AwsIamRoleConfigView`] with its lifetime tied to `&self`.
5969            #[must_use]
5970            pub fn view(&self) -> &AwsIamRoleConfigView<'_> {
5971                self.0.reborrow()
5972            }
5973            /// Convert to the owned message type.
5974            #[must_use]
5975            pub fn to_owned_message(&self) -> super::super::AwsIamRoleConfig {
5976                self.0.to_owned_message()
5977            }
5978            /// The underlying bytes buffer.
5979            #[must_use]
5980            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5981                self.0.bytes()
5982            }
5983            /// Consume the handle, returning the underlying bytes buffer.
5984            #[must_use]
5985            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5986                self.0.into_bytes()
5987            }
5988            /// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials.
5989            ///
5990            /// Field 1: `role_arn`
5991            #[must_use]
5992            pub fn role_arn(&self) -> &'_ str {
5993                self.0.reborrow().role_arn
5994            }
5995            /// The AWS region where STS calls are made. Defaults to "us-east-1" if absent.
5996            ///
5997            /// Field 2: `region`
5998            #[must_use]
5999            pub fn region(&self) -> ::core::option::Option<&'_ str> {
6000                self.0.reborrow().region
6001            }
6002            /// AWS access key ID used to authorize the STS AssumeRole call.
6003            ///
6004            /// When set together with secret_access_key, these static credentials are used
6005            /// as the base identity to call STS:AssumeRole. When omitted, the server falls
6006            /// back to ambient credentials (instance profile, ECS task role, WebIdentity, etc.).
6007            ///
6008            /// Field 3: `access_key_id`
6009            #[must_use]
6010            pub fn access_key_id(&self) -> ::core::option::Option<&'_ str> {
6011                self.0.reborrow().access_key_id
6012            }
6013            /// AWS secret access key paired with access_key_id.
6014            ///
6015            /// Field 4: `secret_access_key`
6016            #[must_use]
6017            pub fn secret_access_key(&self) -> ::core::option::Option<&'_ str> {
6018                self.0.reborrow().secret_access_key
6019            }
6020            /// Optional AWS session token for temporary base credentials (e.g. when the
6021            /// caller itself holds STS-vended credentials as the base identity).
6022            ///
6023            /// Field 5: `session_token`
6024            #[must_use]
6025            pub fn session_token(&self) -> ::core::option::Option<&'_ str> {
6026                self.0.reborrow().session_token
6027            }
6028        }
6029        impl ::core::convert::From<::buffa::OwnedView<AwsIamRoleConfigView<'static>>>
6030        for AwsIamRoleConfigOwnedView {
6031            fn from(inner: ::buffa::OwnedView<AwsIamRoleConfigView<'static>>) -> Self {
6032                AwsIamRoleConfigOwnedView(inner)
6033            }
6034        }
6035        impl ::core::convert::From<AwsIamRoleConfigOwnedView>
6036        for ::buffa::OwnedView<AwsIamRoleConfigView<'static>> {
6037            fn from(wrapper: AwsIamRoleConfigOwnedView) -> Self {
6038                wrapper.0
6039            }
6040        }
6041        impl ::core::convert::AsRef<::buffa::OwnedView<AwsIamRoleConfigView<'static>>>
6042        for AwsIamRoleConfigOwnedView {
6043            fn as_ref(&self) -> &::buffa::OwnedView<AwsIamRoleConfigView<'static>> {
6044                &self.0
6045            }
6046        }
6047        impl ::buffa::HasMessageView for super::super::AwsIamRoleConfig {
6048            type View<'a> = AwsIamRoleConfigView<'a>;
6049            type ViewHandle = AwsIamRoleConfigOwnedView;
6050        }
6051        impl ::serde::Serialize for AwsIamRoleConfigOwnedView {
6052            fn serialize<__S: ::serde::Serializer>(
6053                &self,
6054                __s: __S,
6055            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6056                ::serde::Serialize::serialize(&self.0, __s)
6057            }
6058        }
6059        /// The AWS IAM role configuration returned in credential responses.
6060        #[derive(Clone, Debug, Default)]
6061        pub struct AwsIamRoleView<'a> {
6062            /// The external ID used in role assumption to prevent the confused deputy problem.
6063            ///
6064            /// Field 1: `external_id`
6065            pub external_id: &'a str,
6066            /// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials.
6067            ///
6068            /// Field 2: `role_arn`
6069            pub role_arn: &'a str,
6070            /// The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks.
6071            /// This is the identity that is going to assume the AWS IAM role.
6072            ///
6073            /// Field 3: `unity_catalog_iam_arn`
6074            pub unity_catalog_iam_arn: &'a str,
6075            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6076        }
6077        impl<'a> AwsIamRoleView<'a> {
6078            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
6079            ///
6080            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
6081            /// and by generated sub-message decode arms with `depth - 1`.
6082            ///
6083            /// **Not part of the public API.** Named with a leading underscore to
6084            /// signal that it is for generated-code use only.
6085            #[doc(hidden)]
6086            pub fn _decode_depth(
6087                buf: &'a [u8],
6088                depth: u32,
6089            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6090                let mut view = Self::default();
6091                view._merge_into_view(buf, depth)?;
6092                ::core::result::Result::Ok(view)
6093            }
6094            /// Merge fields from `buf` into this view (proto merge semantics).
6095            ///
6096            /// Repeated fields append; singular fields last-wins; singular
6097            /// MESSAGE fields merge recursively. Used by sub-message decode
6098            /// arms when the same field appears multiple times on the wire.
6099            ///
6100            /// **Not part of the public API.**
6101            #[doc(hidden)]
6102            pub fn _merge_into_view(
6103                &mut self,
6104                buf: &'a [u8],
6105                depth: u32,
6106            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6107                let _ = depth;
6108                #[allow(unused_variables)]
6109                let view = self;
6110                let mut cur: &'a [u8] = buf;
6111                while !cur.is_empty() {
6112                    let before_tag = cur;
6113                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6114                    match tag.field_number() {
6115                        1u32 => {
6116                            if tag.wire_type()
6117                                != ::buffa::encoding::WireType::LengthDelimited
6118                            {
6119                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6120                                    field_number: 1u32,
6121                                    expected: 2u8,
6122                                    actual: tag.wire_type() as u8,
6123                                });
6124                            }
6125                            view.external_id = ::buffa::types::borrow_str(&mut cur)?;
6126                        }
6127                        2u32 => {
6128                            if tag.wire_type()
6129                                != ::buffa::encoding::WireType::LengthDelimited
6130                            {
6131                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6132                                    field_number: 2u32,
6133                                    expected: 2u8,
6134                                    actual: tag.wire_type() as u8,
6135                                });
6136                            }
6137                            view.role_arn = ::buffa::types::borrow_str(&mut cur)?;
6138                        }
6139                        3u32 => {
6140                            if tag.wire_type()
6141                                != ::buffa::encoding::WireType::LengthDelimited
6142                            {
6143                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6144                                    field_number: 3u32,
6145                                    expected: 2u8,
6146                                    actual: tag.wire_type() as u8,
6147                                });
6148                            }
6149                            view.unity_catalog_iam_arn = ::buffa::types::borrow_str(
6150                                &mut cur,
6151                            )?;
6152                        }
6153                        _ => {
6154                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6155                            let span_len = before_tag.len() - cur.len();
6156                            view.__buffa_unknown_fields
6157                                .push_raw(&before_tag[..span_len]);
6158                        }
6159                    }
6160                }
6161                ::core::result::Result::Ok(())
6162            }
6163        }
6164        impl<'a> ::buffa::MessageView<'a> for AwsIamRoleView<'a> {
6165            type Owned = super::super::AwsIamRole;
6166            fn decode_view(
6167                buf: &'a [u8],
6168            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6169                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6170            }
6171            fn decode_view_with_limit(
6172                buf: &'a [u8],
6173                depth: u32,
6174            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6175                Self::_decode_depth(buf, depth)
6176            }
6177            fn to_owned_message(&self) -> super::super::AwsIamRole {
6178                self.to_owned_from_source(None)
6179            }
6180            #[allow(clippy::useless_conversion, clippy::needless_update)]
6181            fn to_owned_from_source(
6182                &self,
6183                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6184            ) -> super::super::AwsIamRole {
6185                #[allow(unused_imports)]
6186                use ::buffa::alloc::string::ToString as _;
6187                let _ = __buffa_src;
6188                super::super::AwsIamRole {
6189                    external_id: self.external_id.to_string(),
6190                    role_arn: self.role_arn.to_string(),
6191                    unity_catalog_iam_arn: self.unity_catalog_iam_arn.to_string(),
6192                    __buffa_unknown_fields: self
6193                        .__buffa_unknown_fields
6194                        .to_owned()
6195                        .unwrap_or_default()
6196                        .into(),
6197                    ..::core::default::Default::default()
6198                }
6199            }
6200        }
6201        impl<'a> ::buffa::ViewEncode<'a> for AwsIamRoleView<'a> {
6202            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6203            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6204                #[allow(unused_imports)]
6205                use ::buffa::Enumeration as _;
6206                let mut size = 0u32;
6207                if !self.external_id.is_empty() {
6208                    size
6209                        += 1u32
6210                            + ::buffa::types::string_encoded_len(&self.external_id)
6211                                as u32;
6212                }
6213                if !self.role_arn.is_empty() {
6214                    size
6215                        += 1u32
6216                            + ::buffa::types::string_encoded_len(&self.role_arn) as u32;
6217                }
6218                if !self.unity_catalog_iam_arn.is_empty() {
6219                    size
6220                        += 1u32
6221                            + ::buffa::types::string_encoded_len(
6222                                &self.unity_catalog_iam_arn,
6223                            ) as u32;
6224                }
6225                size += self.__buffa_unknown_fields.encoded_len() as u32;
6226                size
6227            }
6228            #[allow(clippy::needless_borrow)]
6229            fn write_to(
6230                &self,
6231                _cache: &mut ::buffa::SizeCache,
6232                buf: &mut impl ::buffa::bytes::BufMut,
6233            ) {
6234                #[allow(unused_imports)]
6235                use ::buffa::Enumeration as _;
6236                if !self.external_id.is_empty() {
6237                    ::buffa::encoding::Tag::new(
6238                            1u32,
6239                            ::buffa::encoding::WireType::LengthDelimited,
6240                        )
6241                        .encode(buf);
6242                    ::buffa::types::encode_string(&self.external_id, buf);
6243                }
6244                if !self.role_arn.is_empty() {
6245                    ::buffa::encoding::Tag::new(
6246                            2u32,
6247                            ::buffa::encoding::WireType::LengthDelimited,
6248                        )
6249                        .encode(buf);
6250                    ::buffa::types::encode_string(&self.role_arn, buf);
6251                }
6252                if !self.unity_catalog_iam_arn.is_empty() {
6253                    ::buffa::encoding::Tag::new(
6254                            3u32,
6255                            ::buffa::encoding::WireType::LengthDelimited,
6256                        )
6257                        .encode(buf);
6258                    ::buffa::types::encode_string(&self.unity_catalog_iam_arn, buf);
6259                }
6260                self.__buffa_unknown_fields.write_to(buf);
6261            }
6262        }
6263        /// Serializes this view as protobuf JSON.
6264        ///
6265        /// Implicit-presence fields with default values are omitted, `required`
6266        /// fields are always emitted, explicit-presence (`optional`) fields are
6267        /// emitted only when set, bytes fields are base64-encoded, and enum
6268        /// values are their proto name strings.
6269        ///
6270        /// This impl uses `serialize_map(None)` because the number of emitted
6271        /// fields depends on default-omission rules; serializers that require
6272        /// known map lengths (e.g. `bincode`) will return a runtime error.
6273        /// Use the owned message type for those formats.
6274        impl<'__a> ::serde::Serialize for AwsIamRoleView<'__a> {
6275            fn serialize<__S: ::serde::Serializer>(
6276                &self,
6277                __s: __S,
6278            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6279                use ::serde::ser::SerializeMap as _;
6280                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6281                if !::buffa::json_helpers::skip_if::is_empty_str(self.external_id) {
6282                    __map.serialize_entry("external_id", self.external_id)?;
6283                }
6284                if !::buffa::json_helpers::skip_if::is_empty_str(self.role_arn) {
6285                    __map.serialize_entry("role_arn", self.role_arn)?;
6286                }
6287                if !::buffa::json_helpers::skip_if::is_empty_str(
6288                    self.unity_catalog_iam_arn,
6289                ) {
6290                    __map
6291                        .serialize_entry(
6292                            "unityCatalogIamArn",
6293                            self.unity_catalog_iam_arn,
6294                        )?;
6295                }
6296                __map.end()
6297            }
6298        }
6299        impl<'a> ::buffa::MessageName for AwsIamRoleView<'a> {
6300            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
6301            const NAME: &'static str = "AwsIamRole";
6302            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.AwsIamRole";
6303            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.AwsIamRole";
6304        }
6305        impl<'v> ::buffa::DefaultViewInstance for AwsIamRoleView<'v> {
6306            fn default_view_instance<'a>() -> &'a Self
6307            where
6308                Self: 'a,
6309            {
6310                static VALUE: ::buffa::__private::OnceBox<AwsIamRoleView<'static>> = ::buffa::__private::OnceBox::new();
6311                VALUE
6312                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6313                        <AwsIamRoleView<'static>>::default(),
6314                    ))
6315            }
6316        }
6317        impl ::buffa::ViewReborrow for AwsIamRoleView<'static> {
6318            type Reborrowed<'b> = AwsIamRoleView<'b>;
6319            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6320                this
6321            }
6322        }
6323        /** Self-contained, `'static` owned view of a `AwsIamRole` message.
6324
6325 Wraps [`::buffa::OwnedView`]`<`[`AwsIamRoleView`]`<'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.
6326
6327 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`AwsIamRoleView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6328        #[derive(Clone, Debug)]
6329        pub struct AwsIamRoleOwnedView(::buffa::OwnedView<AwsIamRoleView<'static>>);
6330        impl AwsIamRoleOwnedView {
6331            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6332            ///
6333            /// The view borrows directly from the buffer's data; the buffer is
6334            /// retained inside the returned handle.
6335            ///
6336            /// # Errors
6337            ///
6338            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6339            /// protobuf data.
6340            pub fn decode(
6341                bytes: ::buffa::bytes::Bytes,
6342            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6343                ::core::result::Result::Ok(
6344                    AwsIamRoleOwnedView(::buffa::OwnedView::decode(bytes)?),
6345                )
6346            }
6347            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6348            /// max message size).
6349            ///
6350            /// # Errors
6351            ///
6352            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6353            /// exceeds the configured limits.
6354            pub fn decode_with_options(
6355                bytes: ::buffa::bytes::Bytes,
6356                opts: &::buffa::DecodeOptions,
6357            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6358                ::core::result::Result::Ok(
6359                    AwsIamRoleOwnedView(
6360                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6361                    ),
6362                )
6363            }
6364            /// Build from an owned message via an encode → decode round-trip.
6365            ///
6366            /// # Errors
6367            ///
6368            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6369            /// somehow invalid (should not happen for well-formed messages).
6370            pub fn from_owned(
6371                msg: &super::super::AwsIamRole,
6372            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6373                ::core::result::Result::Ok(
6374                    AwsIamRoleOwnedView(::buffa::OwnedView::from_owned(msg)?),
6375                )
6376            }
6377            /// Borrow the full [`AwsIamRoleView`] with its lifetime tied to `&self`.
6378            #[must_use]
6379            pub fn view(&self) -> &AwsIamRoleView<'_> {
6380                self.0.reborrow()
6381            }
6382            /// Convert to the owned message type.
6383            #[must_use]
6384            pub fn to_owned_message(&self) -> super::super::AwsIamRole {
6385                self.0.to_owned_message()
6386            }
6387            /// The underlying bytes buffer.
6388            #[must_use]
6389            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6390                self.0.bytes()
6391            }
6392            /// Consume the handle, returning the underlying bytes buffer.
6393            #[must_use]
6394            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6395                self.0.into_bytes()
6396            }
6397            /// The external ID used in role assumption to prevent the confused deputy problem.
6398            ///
6399            /// Field 1: `external_id`
6400            #[must_use]
6401            pub fn external_id(&self) -> &'_ str {
6402                self.0.reborrow().external_id
6403            }
6404            /// The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary credentials.
6405            ///
6406            /// Field 2: `role_arn`
6407            #[must_use]
6408            pub fn role_arn(&self) -> &'_ str {
6409                self.0.reborrow().role_arn
6410            }
6411            /// The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks.
6412            /// This is the identity that is going to assume the AWS IAM role.
6413            ///
6414            /// Field 3: `unity_catalog_iam_arn`
6415            #[must_use]
6416            pub fn unity_catalog_iam_arn(&self) -> &'_ str {
6417                self.0.reborrow().unity_catalog_iam_arn
6418            }
6419        }
6420        impl ::core::convert::From<::buffa::OwnedView<AwsIamRoleView<'static>>>
6421        for AwsIamRoleOwnedView {
6422            fn from(inner: ::buffa::OwnedView<AwsIamRoleView<'static>>) -> Self {
6423                AwsIamRoleOwnedView(inner)
6424            }
6425        }
6426        impl ::core::convert::From<AwsIamRoleOwnedView>
6427        for ::buffa::OwnedView<AwsIamRoleView<'static>> {
6428            fn from(wrapper: AwsIamRoleOwnedView) -> Self {
6429                wrapper.0
6430            }
6431        }
6432        impl ::core::convert::AsRef<::buffa::OwnedView<AwsIamRoleView<'static>>>
6433        for AwsIamRoleOwnedView {
6434            fn as_ref(&self) -> &::buffa::OwnedView<AwsIamRoleView<'static>> {
6435                &self.0
6436            }
6437        }
6438        impl ::buffa::HasMessageView for super::super::AwsIamRole {
6439            type View<'a> = AwsIamRoleView<'a>;
6440            type ViewHandle = AwsIamRoleOwnedView;
6441        }
6442        impl ::serde::Serialize for AwsIamRoleOwnedView {
6443            fn serialize<__S: ::serde::Serializer>(
6444                &self,
6445                __s: __S,
6446            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6447                ::serde::Serialize::serialize(&self.0, __s)
6448            }
6449        }
6450        /// The Databricks managed GCP service account configuration.
6451        #[derive(Clone, Debug, Default)]
6452        pub struct DatabricksGcpServiceAccountView<'a> {
6453            /// The Databricks internal ID that represents this managed identity.
6454            ///
6455            /// Field 1: `credential_id`
6456            pub credential_id: ::core::option::Option<&'a str>,
6457            /// The email of the service account.
6458            ///
6459            /// Field 2: `email`
6460            pub email: ::core::option::Option<&'a str>,
6461            /// The ID that represents the private key for this Service Account.
6462            ///
6463            /// Field 3: `private_key_id`
6464            pub private_key_id: ::core::option::Option<&'a str>,
6465            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6466        }
6467        impl<'a> DatabricksGcpServiceAccountView<'a> {
6468            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
6469            ///
6470            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
6471            /// and by generated sub-message decode arms with `depth - 1`.
6472            ///
6473            /// **Not part of the public API.** Named with a leading underscore to
6474            /// signal that it is for generated-code use only.
6475            #[doc(hidden)]
6476            pub fn _decode_depth(
6477                buf: &'a [u8],
6478                depth: u32,
6479            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6480                let mut view = Self::default();
6481                view._merge_into_view(buf, depth)?;
6482                ::core::result::Result::Ok(view)
6483            }
6484            /// Merge fields from `buf` into this view (proto merge semantics).
6485            ///
6486            /// Repeated fields append; singular fields last-wins; singular
6487            /// MESSAGE fields merge recursively. Used by sub-message decode
6488            /// arms when the same field appears multiple times on the wire.
6489            ///
6490            /// **Not part of the public API.**
6491            #[doc(hidden)]
6492            pub fn _merge_into_view(
6493                &mut self,
6494                buf: &'a [u8],
6495                depth: u32,
6496            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6497                let _ = depth;
6498                #[allow(unused_variables)]
6499                let view = self;
6500                let mut cur: &'a [u8] = buf;
6501                while !cur.is_empty() {
6502                    let before_tag = cur;
6503                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6504                    match tag.field_number() {
6505                        1u32 => {
6506                            if tag.wire_type()
6507                                != ::buffa::encoding::WireType::LengthDelimited
6508                            {
6509                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6510                                    field_number: 1u32,
6511                                    expected: 2u8,
6512                                    actual: tag.wire_type() as u8,
6513                                });
6514                            }
6515                            view.credential_id = Some(
6516                                ::buffa::types::borrow_str(&mut cur)?,
6517                            );
6518                        }
6519                        2u32 => {
6520                            if tag.wire_type()
6521                                != ::buffa::encoding::WireType::LengthDelimited
6522                            {
6523                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6524                                    field_number: 2u32,
6525                                    expected: 2u8,
6526                                    actual: tag.wire_type() as u8,
6527                                });
6528                            }
6529                            view.email = Some(::buffa::types::borrow_str(&mut cur)?);
6530                        }
6531                        3u32 => {
6532                            if tag.wire_type()
6533                                != ::buffa::encoding::WireType::LengthDelimited
6534                            {
6535                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6536                                    field_number: 3u32,
6537                                    expected: 2u8,
6538                                    actual: tag.wire_type() as u8,
6539                                });
6540                            }
6541                            view.private_key_id = Some(
6542                                ::buffa::types::borrow_str(&mut cur)?,
6543                            );
6544                        }
6545                        _ => {
6546                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
6547                            let span_len = before_tag.len() - cur.len();
6548                            view.__buffa_unknown_fields
6549                                .push_raw(&before_tag[..span_len]);
6550                        }
6551                    }
6552                }
6553                ::core::result::Result::Ok(())
6554            }
6555        }
6556        impl<'a> ::buffa::MessageView<'a> for DatabricksGcpServiceAccountView<'a> {
6557            type Owned = super::super::DatabricksGcpServiceAccount;
6558            fn decode_view(
6559                buf: &'a [u8],
6560            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6561                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
6562            }
6563            fn decode_view_with_limit(
6564                buf: &'a [u8],
6565                depth: u32,
6566            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6567                Self::_decode_depth(buf, depth)
6568            }
6569            fn to_owned_message(&self) -> super::super::DatabricksGcpServiceAccount {
6570                self.to_owned_from_source(None)
6571            }
6572            #[allow(clippy::useless_conversion, clippy::needless_update)]
6573            fn to_owned_from_source(
6574                &self,
6575                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6576            ) -> super::super::DatabricksGcpServiceAccount {
6577                #[allow(unused_imports)]
6578                use ::buffa::alloc::string::ToString as _;
6579                let _ = __buffa_src;
6580                super::super::DatabricksGcpServiceAccount {
6581                    credential_id: self.credential_id.map(|s| s.to_string()),
6582                    email: self.email.map(|s| s.to_string()),
6583                    private_key_id: self.private_key_id.map(|s| s.to_string()),
6584                    __buffa_unknown_fields: self
6585                        .__buffa_unknown_fields
6586                        .to_owned()
6587                        .unwrap_or_default()
6588                        .into(),
6589                    ..::core::default::Default::default()
6590                }
6591            }
6592        }
6593        impl<'a> ::buffa::ViewEncode<'a> for DatabricksGcpServiceAccountView<'a> {
6594            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6595            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6596                #[allow(unused_imports)]
6597                use ::buffa::Enumeration as _;
6598                let mut size = 0u32;
6599                if let Some(ref v) = self.credential_id {
6600                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6601                }
6602                if let Some(ref v) = self.email {
6603                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6604                }
6605                if let Some(ref v) = self.private_key_id {
6606                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
6607                }
6608                size += self.__buffa_unknown_fields.encoded_len() as u32;
6609                size
6610            }
6611            #[allow(clippy::needless_borrow)]
6612            fn write_to(
6613                &self,
6614                _cache: &mut ::buffa::SizeCache,
6615                buf: &mut impl ::buffa::bytes::BufMut,
6616            ) {
6617                #[allow(unused_imports)]
6618                use ::buffa::Enumeration as _;
6619                if let Some(ref v) = self.credential_id {
6620                    ::buffa::encoding::Tag::new(
6621                            1u32,
6622                            ::buffa::encoding::WireType::LengthDelimited,
6623                        )
6624                        .encode(buf);
6625                    ::buffa::types::encode_string(v, buf);
6626                }
6627                if let Some(ref v) = self.email {
6628                    ::buffa::encoding::Tag::new(
6629                            2u32,
6630                            ::buffa::encoding::WireType::LengthDelimited,
6631                        )
6632                        .encode(buf);
6633                    ::buffa::types::encode_string(v, buf);
6634                }
6635                if let Some(ref v) = self.private_key_id {
6636                    ::buffa::encoding::Tag::new(
6637                            3u32,
6638                            ::buffa::encoding::WireType::LengthDelimited,
6639                        )
6640                        .encode(buf);
6641                    ::buffa::types::encode_string(v, buf);
6642                }
6643                self.__buffa_unknown_fields.write_to(buf);
6644            }
6645        }
6646        /// Serializes this view as protobuf JSON.
6647        ///
6648        /// Implicit-presence fields with default values are omitted, `required`
6649        /// fields are always emitted, explicit-presence (`optional`) fields are
6650        /// emitted only when set, bytes fields are base64-encoded, and enum
6651        /// values are their proto name strings.
6652        ///
6653        /// This impl uses `serialize_map(None)` because the number of emitted
6654        /// fields depends on default-omission rules; serializers that require
6655        /// known map lengths (e.g. `bincode`) will return a runtime error.
6656        /// Use the owned message type for those formats.
6657        impl<'__a> ::serde::Serialize for DatabricksGcpServiceAccountView<'__a> {
6658            fn serialize<__S: ::serde::Serializer>(
6659                &self,
6660                __s: __S,
6661            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6662                use ::serde::ser::SerializeMap as _;
6663                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6664                if let ::core::option::Option::Some(__v) = self.credential_id {
6665                    __map.serialize_entry("credential_id", __v)?;
6666                }
6667                if let ::core::option::Option::Some(__v) = self.email {
6668                    __map.serialize_entry("email", __v)?;
6669                }
6670                if let ::core::option::Option::Some(__v) = self.private_key_id {
6671                    __map.serialize_entry("private_key_id", __v)?;
6672                }
6673                __map.end()
6674            }
6675        }
6676        impl<'a> ::buffa::MessageName for DatabricksGcpServiceAccountView<'a> {
6677            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
6678            const NAME: &'static str = "DatabricksGcpServiceAccount";
6679            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.DatabricksGcpServiceAccount";
6680            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.DatabricksGcpServiceAccount";
6681        }
6682        impl<'v> ::buffa::DefaultViewInstance for DatabricksGcpServiceAccountView<'v> {
6683            fn default_view_instance<'a>() -> &'a Self
6684            where
6685                Self: 'a,
6686            {
6687                static VALUE: ::buffa::__private::OnceBox<
6688                    DatabricksGcpServiceAccountView<'static>,
6689                > = ::buffa::__private::OnceBox::new();
6690                VALUE
6691                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
6692                        <DatabricksGcpServiceAccountView<'static>>::default(),
6693                    ))
6694            }
6695        }
6696        impl ::buffa::ViewReborrow for DatabricksGcpServiceAccountView<'static> {
6697            type Reborrowed<'b> = DatabricksGcpServiceAccountView<'b>;
6698            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
6699                this
6700            }
6701        }
6702        /** Self-contained, `'static` owned view of a `DatabricksGcpServiceAccount` message.
6703
6704 Wraps [`::buffa::OwnedView`]`<`[`DatabricksGcpServiceAccountView`]`<'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.
6705
6706 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DatabricksGcpServiceAccountView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6707        #[derive(Clone, Debug)]
6708        pub struct DatabricksGcpServiceAccountOwnedView(
6709            ::buffa::OwnedView<DatabricksGcpServiceAccountView<'static>>,
6710        );
6711        impl DatabricksGcpServiceAccountOwnedView {
6712            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6713            ///
6714            /// The view borrows directly from the buffer's data; the buffer is
6715            /// retained inside the returned handle.
6716            ///
6717            /// # Errors
6718            ///
6719            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6720            /// protobuf data.
6721            pub fn decode(
6722                bytes: ::buffa::bytes::Bytes,
6723            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6724                ::core::result::Result::Ok(
6725                    DatabricksGcpServiceAccountOwnedView(
6726                        ::buffa::OwnedView::decode(bytes)?,
6727                    ),
6728                )
6729            }
6730            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6731            /// max message size).
6732            ///
6733            /// # Errors
6734            ///
6735            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6736            /// exceeds the configured limits.
6737            pub fn decode_with_options(
6738                bytes: ::buffa::bytes::Bytes,
6739                opts: &::buffa::DecodeOptions,
6740            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6741                ::core::result::Result::Ok(
6742                    DatabricksGcpServiceAccountOwnedView(
6743                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6744                    ),
6745                )
6746            }
6747            /// Build from an owned message via an encode → decode round-trip.
6748            ///
6749            /// # Errors
6750            ///
6751            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6752            /// somehow invalid (should not happen for well-formed messages).
6753            pub fn from_owned(
6754                msg: &super::super::DatabricksGcpServiceAccount,
6755            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6756                ::core::result::Result::Ok(
6757                    DatabricksGcpServiceAccountOwnedView(
6758                        ::buffa::OwnedView::from_owned(msg)?,
6759                    ),
6760                )
6761            }
6762            /// Borrow the full [`DatabricksGcpServiceAccountView`] with its lifetime tied to `&self`.
6763            #[must_use]
6764            pub fn view(&self) -> &DatabricksGcpServiceAccountView<'_> {
6765                self.0.reborrow()
6766            }
6767            /// Convert to the owned message type.
6768            #[must_use]
6769            pub fn to_owned_message(&self) -> super::super::DatabricksGcpServiceAccount {
6770                self.0.to_owned_message()
6771            }
6772            /// The underlying bytes buffer.
6773            #[must_use]
6774            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6775                self.0.bytes()
6776            }
6777            /// Consume the handle, returning the underlying bytes buffer.
6778            #[must_use]
6779            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6780                self.0.into_bytes()
6781            }
6782            /// The Databricks internal ID that represents this managed identity.
6783            ///
6784            /// Field 1: `credential_id`
6785            #[must_use]
6786            pub fn credential_id(&self) -> ::core::option::Option<&'_ str> {
6787                self.0.reborrow().credential_id
6788            }
6789            /// The email of the service account.
6790            ///
6791            /// Field 2: `email`
6792            #[must_use]
6793            pub fn email(&self) -> ::core::option::Option<&'_ str> {
6794                self.0.reborrow().email
6795            }
6796            /// The ID that represents the private key for this Service Account.
6797            ///
6798            /// Field 3: `private_key_id`
6799            #[must_use]
6800            pub fn private_key_id(&self) -> ::core::option::Option<&'_ str> {
6801                self.0.reborrow().private_key_id
6802            }
6803        }
6804        impl ::core::convert::From<
6805            ::buffa::OwnedView<DatabricksGcpServiceAccountView<'static>>,
6806        > for DatabricksGcpServiceAccountOwnedView {
6807            fn from(
6808                inner: ::buffa::OwnedView<DatabricksGcpServiceAccountView<'static>>,
6809            ) -> Self {
6810                DatabricksGcpServiceAccountOwnedView(inner)
6811            }
6812        }
6813        impl ::core::convert::From<DatabricksGcpServiceAccountOwnedView>
6814        for ::buffa::OwnedView<DatabricksGcpServiceAccountView<'static>> {
6815            fn from(wrapper: DatabricksGcpServiceAccountOwnedView) -> Self {
6816                wrapper.0
6817            }
6818        }
6819        impl ::core::convert::AsRef<
6820            ::buffa::OwnedView<DatabricksGcpServiceAccountView<'static>>,
6821        > for DatabricksGcpServiceAccountOwnedView {
6822            fn as_ref(
6823                &self,
6824            ) -> &::buffa::OwnedView<DatabricksGcpServiceAccountView<'static>> {
6825                &self.0
6826            }
6827        }
6828        impl ::buffa::HasMessageView for super::super::DatabricksGcpServiceAccount {
6829            type View<'a> = DatabricksGcpServiceAccountView<'a>;
6830            type ViewHandle = DatabricksGcpServiceAccountOwnedView;
6831        }
6832        impl ::serde::Serialize for DatabricksGcpServiceAccountOwnedView {
6833            fn serialize<__S: ::serde::Serializer>(
6834                &self,
6835                __s: __S,
6836            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6837                ::serde::Serialize::serialize(&self.0, __s)
6838            }
6839        }
6840        /// A credential used to access external data sources or services.
6841        #[derive(Clone, Debug, Default)]
6842        pub struct CredentialView<'a> {
6843            /// The credential name.
6844            ///
6845            /// The name must be unique among storage and service credentials within the metastore.
6846            ///
6847            /// Field 1: `name`
6848            pub name: &'a str,
6849            /// The unique identifier of the credential.
6850            ///
6851            /// Field 2: `id`
6852            pub id: ::core::option::Option<&'a str>,
6853            /// Indicates the purpose of the credential.
6854            ///
6855            /// Field 3: `purpose`
6856            pub purpose: ::buffa::EnumValue<super::super::Purpose>,
6857            /// Whether the credential is usable only for read operations.
6858            ///
6859            /// Only applicable when purpose is STORAGE.
6860            ///
6861            /// Field 4: `read_only`
6862            pub read_only: bool,
6863            /// Comment associated with the credential.
6864            ///
6865            /// Field 5: `comment`
6866            pub comment: ::core::option::Option<&'a str>,
6867            /// Username of current owner of credential.
6868            ///
6869            /// Field 6: `owner`
6870            pub owner: ::core::option::Option<&'a str>,
6871            /// Time at which this credential was created, in epoch milliseconds.
6872            ///
6873            /// Field 7: `created_at`
6874            pub created_at: ::core::option::Option<i64>,
6875            /// Username of credential creator.
6876            ///
6877            /// Field 8: `created_by`
6878            pub created_by: ::core::option::Option<&'a str>,
6879            /// Time at which this credential was last modified, in epoch milliseconds.
6880            ///
6881            /// Field 9: `updated_at`
6882            pub updated_at: ::core::option::Option<i64>,
6883            /// Username of user who last modified the credential.
6884            ///
6885            /// Field 10: `updated_by`
6886            pub updated_by: ::core::option::Option<&'a str>,
6887            /// Whether this credential is the current metastore's root storage credential.
6888            ///
6889            /// Only applicable when purpose is STORAGE.
6890            ///
6891            /// Field 11: `used_for_managed_storage`
6892            pub used_for_managed_storage: bool,
6893            /// The full name of the credential.
6894            ///
6895            /// Field 12: `full_name`
6896            pub full_name: &'a str,
6897            /// The Azure service principal configuration.
6898            ///
6899            /// Sealed into the object's inline sensitive blob (envelope-encrypted, redacted
6900            /// from ordinary reads) rather than stored in the searchable properties.
6901            ///
6902            /// Field 100: `azure_service_principal`
6903            pub azure_service_principal: ::buffa::MessageFieldView<
6904                super::super::__buffa::view::AzureServicePrincipalView<'a>,
6905            >,
6906            /// The Azure managed identity configuration.
6907            ///
6908            /// Field 101: `azure_managed_identity`
6909            pub azure_managed_identity: ::buffa::MessageFieldView<
6910                super::super::__buffa::view::AzureManagedIdentityView<'a>,
6911            >,
6912            /// The Azure storage key configuration.
6913            ///
6914            /// Field 102: `azure_storage_key`
6915            pub azure_storage_key: ::buffa::MessageFieldView<
6916                super::super::__buffa::view::AzureStorageKeyView<'a>,
6917            >,
6918            /// The AWS IAM role configuration.
6919            ///
6920            /// Field 103: `aws_iam_role`
6921            pub aws_iam_role: ::buffa::MessageFieldView<
6922                super::super::__buffa::view::AwsIamRoleConfigView<'a>,
6923            >,
6924            /// The Databricks managed GCP service account configuration.
6925            ///
6926            /// Field 104: `databricks_gcp_service_account`
6927            pub databricks_gcp_service_account: ::buffa::MessageFieldView<
6928                super::super::__buffa::view::DatabricksGcpServiceAccountView<'a>,
6929            >,
6930            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6931        }
6932        impl<'a> CredentialView<'a> {
6933            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
6934            ///
6935            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
6936            /// and by generated sub-message decode arms with `depth - 1`.
6937            ///
6938            /// **Not part of the public API.** Named with a leading underscore to
6939            /// signal that it is for generated-code use only.
6940            #[doc(hidden)]
6941            pub fn _decode_depth(
6942                buf: &'a [u8],
6943                depth: u32,
6944            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6945                let mut view = Self::default();
6946                view._merge_into_view(buf, depth)?;
6947                ::core::result::Result::Ok(view)
6948            }
6949            /// Merge fields from `buf` into this view (proto merge semantics).
6950            ///
6951            /// Repeated fields append; singular fields last-wins; singular
6952            /// MESSAGE fields merge recursively. Used by sub-message decode
6953            /// arms when the same field appears multiple times on the wire.
6954            ///
6955            /// **Not part of the public API.**
6956            #[doc(hidden)]
6957            pub fn _merge_into_view(
6958                &mut self,
6959                buf: &'a [u8],
6960                depth: u32,
6961            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6962                let _ = depth;
6963                #[allow(unused_variables)]
6964                let view = self;
6965                let mut cur: &'a [u8] = buf;
6966                while !cur.is_empty() {
6967                    let before_tag = cur;
6968                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
6969                    match tag.field_number() {
6970                        1u32 => {
6971                            if tag.wire_type()
6972                                != ::buffa::encoding::WireType::LengthDelimited
6973                            {
6974                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6975                                    field_number: 1u32,
6976                                    expected: 2u8,
6977                                    actual: tag.wire_type() as u8,
6978                                });
6979                            }
6980                            view.name = ::buffa::types::borrow_str(&mut cur)?;
6981                        }
6982                        2u32 => {
6983                            if tag.wire_type()
6984                                != ::buffa::encoding::WireType::LengthDelimited
6985                            {
6986                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6987                                    field_number: 2u32,
6988                                    expected: 2u8,
6989                                    actual: tag.wire_type() as u8,
6990                                });
6991                            }
6992                            view.id = Some(::buffa::types::borrow_str(&mut cur)?);
6993                        }
6994                        3u32 => {
6995                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
6996                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
6997                                    field_number: 3u32,
6998                                    expected: 0u8,
6999                                    actual: tag.wire_type() as u8,
7000                                });
7001                            }
7002                            view.purpose = ::buffa::EnumValue::from(
7003                                ::buffa::types::decode_int32(&mut cur)?,
7004                            );
7005                        }
7006                        4u32 => {
7007                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7008                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7009                                    field_number: 4u32,
7010                                    expected: 0u8,
7011                                    actual: tag.wire_type() as u8,
7012                                });
7013                            }
7014                            view.read_only = ::buffa::types::decode_bool(&mut cur)?;
7015                        }
7016                        5u32 => {
7017                            if tag.wire_type()
7018                                != ::buffa::encoding::WireType::LengthDelimited
7019                            {
7020                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7021                                    field_number: 5u32,
7022                                    expected: 2u8,
7023                                    actual: tag.wire_type() as u8,
7024                                });
7025                            }
7026                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
7027                        }
7028                        6u32 => {
7029                            if tag.wire_type()
7030                                != ::buffa::encoding::WireType::LengthDelimited
7031                            {
7032                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7033                                    field_number: 6u32,
7034                                    expected: 2u8,
7035                                    actual: tag.wire_type() as u8,
7036                                });
7037                            }
7038                            view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
7039                        }
7040                        7u32 => {
7041                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7042                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7043                                    field_number: 7u32,
7044                                    expected: 0u8,
7045                                    actual: tag.wire_type() as u8,
7046                                });
7047                            }
7048                            view.created_at = Some(
7049                                ::buffa::types::decode_int64(&mut cur)?,
7050                            );
7051                        }
7052                        8u32 => {
7053                            if tag.wire_type()
7054                                != ::buffa::encoding::WireType::LengthDelimited
7055                            {
7056                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7057                                    field_number: 8u32,
7058                                    expected: 2u8,
7059                                    actual: tag.wire_type() as u8,
7060                                });
7061                            }
7062                            view.created_by = Some(
7063                                ::buffa::types::borrow_str(&mut cur)?,
7064                            );
7065                        }
7066                        9u32 => {
7067                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7068                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7069                                    field_number: 9u32,
7070                                    expected: 0u8,
7071                                    actual: tag.wire_type() as u8,
7072                                });
7073                            }
7074                            view.updated_at = Some(
7075                                ::buffa::types::decode_int64(&mut cur)?,
7076                            );
7077                        }
7078                        10u32 => {
7079                            if tag.wire_type()
7080                                != ::buffa::encoding::WireType::LengthDelimited
7081                            {
7082                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7083                                    field_number: 10u32,
7084                                    expected: 2u8,
7085                                    actual: tag.wire_type() as u8,
7086                                });
7087                            }
7088                            view.updated_by = Some(
7089                                ::buffa::types::borrow_str(&mut cur)?,
7090                            );
7091                        }
7092                        11u32 => {
7093                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
7094                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7095                                    field_number: 11u32,
7096                                    expected: 0u8,
7097                                    actual: tag.wire_type() as u8,
7098                                });
7099                            }
7100                            view.used_for_managed_storage = ::buffa::types::decode_bool(
7101                                &mut cur,
7102                            )?;
7103                        }
7104                        12u32 => {
7105                            if tag.wire_type()
7106                                != ::buffa::encoding::WireType::LengthDelimited
7107                            {
7108                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7109                                    field_number: 12u32,
7110                                    expected: 2u8,
7111                                    actual: tag.wire_type() as u8,
7112                                });
7113                            }
7114                            view.full_name = ::buffa::types::borrow_str(&mut cur)?;
7115                        }
7116                        100u32 => {
7117                            if tag.wire_type()
7118                                != ::buffa::encoding::WireType::LengthDelimited
7119                            {
7120                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7121                                    field_number: 100u32,
7122                                    expected: 2u8,
7123                                    actual: tag.wire_type() as u8,
7124                                });
7125                            }
7126                            if depth == 0 {
7127                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
7128                            }
7129                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7130                            match view.azure_service_principal.as_mut() {
7131                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
7132                                None => {
7133                                    view.azure_service_principal = ::buffa::MessageFieldView::set(
7134                                        super::super::__buffa::view::AzureServicePrincipalView::_decode_depth(
7135                                            sub,
7136                                            depth - 1,
7137                                        )?,
7138                                    );
7139                                }
7140                            }
7141                        }
7142                        101u32 => {
7143                            if tag.wire_type()
7144                                != ::buffa::encoding::WireType::LengthDelimited
7145                            {
7146                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7147                                    field_number: 101u32,
7148                                    expected: 2u8,
7149                                    actual: tag.wire_type() as u8,
7150                                });
7151                            }
7152                            if depth == 0 {
7153                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
7154                            }
7155                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7156                            match view.azure_managed_identity.as_mut() {
7157                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
7158                                None => {
7159                                    view.azure_managed_identity = ::buffa::MessageFieldView::set(
7160                                        super::super::__buffa::view::AzureManagedIdentityView::_decode_depth(
7161                                            sub,
7162                                            depth - 1,
7163                                        )?,
7164                                    );
7165                                }
7166                            }
7167                        }
7168                        102u32 => {
7169                            if tag.wire_type()
7170                                != ::buffa::encoding::WireType::LengthDelimited
7171                            {
7172                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7173                                    field_number: 102u32,
7174                                    expected: 2u8,
7175                                    actual: tag.wire_type() as u8,
7176                                });
7177                            }
7178                            if depth == 0 {
7179                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
7180                            }
7181                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7182                            match view.azure_storage_key.as_mut() {
7183                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
7184                                None => {
7185                                    view.azure_storage_key = ::buffa::MessageFieldView::set(
7186                                        super::super::__buffa::view::AzureStorageKeyView::_decode_depth(
7187                                            sub,
7188                                            depth - 1,
7189                                        )?,
7190                                    );
7191                                }
7192                            }
7193                        }
7194                        103u32 => {
7195                            if tag.wire_type()
7196                                != ::buffa::encoding::WireType::LengthDelimited
7197                            {
7198                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7199                                    field_number: 103u32,
7200                                    expected: 2u8,
7201                                    actual: tag.wire_type() as u8,
7202                                });
7203                            }
7204                            if depth == 0 {
7205                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
7206                            }
7207                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7208                            match view.aws_iam_role.as_mut() {
7209                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
7210                                None => {
7211                                    view.aws_iam_role = ::buffa::MessageFieldView::set(
7212                                        super::super::__buffa::view::AwsIamRoleConfigView::_decode_depth(
7213                                            sub,
7214                                            depth - 1,
7215                                        )?,
7216                                    );
7217                                }
7218                            }
7219                        }
7220                        104u32 => {
7221                            if tag.wire_type()
7222                                != ::buffa::encoding::WireType::LengthDelimited
7223                            {
7224                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
7225                                    field_number: 104u32,
7226                                    expected: 2u8,
7227                                    actual: tag.wire_type() as u8,
7228                                });
7229                            }
7230                            if depth == 0 {
7231                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
7232                            }
7233                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7234                            match view.databricks_gcp_service_account.as_mut() {
7235                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
7236                                None => {
7237                                    view.databricks_gcp_service_account = ::buffa::MessageFieldView::set(
7238                                        super::super::__buffa::view::DatabricksGcpServiceAccountView::_decode_depth(
7239                                            sub,
7240                                            depth - 1,
7241                                        )?,
7242                                    );
7243                                }
7244                            }
7245                        }
7246                        _ => {
7247                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
7248                            let span_len = before_tag.len() - cur.len();
7249                            view.__buffa_unknown_fields
7250                                .push_raw(&before_tag[..span_len]);
7251                        }
7252                    }
7253                }
7254                ::core::result::Result::Ok(())
7255            }
7256        }
7257        impl<'a> ::buffa::MessageView<'a> for CredentialView<'a> {
7258            type Owned = super::super::Credential;
7259            fn decode_view(
7260                buf: &'a [u8],
7261            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7262                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
7263            }
7264            fn decode_view_with_limit(
7265                buf: &'a [u8],
7266                depth: u32,
7267            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7268                Self::_decode_depth(buf, depth)
7269            }
7270            fn to_owned_message(&self) -> super::super::Credential {
7271                self.to_owned_from_source(None)
7272            }
7273            #[allow(clippy::useless_conversion, clippy::needless_update)]
7274            fn to_owned_from_source(
7275                &self,
7276                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7277            ) -> super::super::Credential {
7278                #[allow(unused_imports)]
7279                use ::buffa::alloc::string::ToString as _;
7280                let _ = __buffa_src;
7281                super::super::Credential {
7282                    name: self.name.to_string(),
7283                    id: self.id.map(|s| s.to_string()),
7284                    purpose: self.purpose,
7285                    read_only: self.read_only,
7286                    comment: self.comment.map(|s| s.to_string()),
7287                    owner: self.owner.map(|s| s.to_string()),
7288                    created_at: self.created_at,
7289                    created_by: self.created_by.map(|s| s.to_string()),
7290                    updated_at: self.updated_at,
7291                    updated_by: self.updated_by.map(|s| s.to_string()),
7292                    used_for_managed_storage: self.used_for_managed_storage,
7293                    full_name: self.full_name.to_string(),
7294                    azure_service_principal: match self
7295                        .azure_service_principal
7296                        .as_option()
7297                    {
7298                        Some(v) => {
7299                            ::buffa::MessageField::<
7300                                super::super::AzureServicePrincipal,
7301                            >::some(v.to_owned_from_source(__buffa_src))
7302                        }
7303                        None => ::buffa::MessageField::none(),
7304                    },
7305                    azure_managed_identity: match self.azure_managed_identity.as_option()
7306                    {
7307                        Some(v) => {
7308                            ::buffa::MessageField::<
7309                                super::super::AzureManagedIdentity,
7310                            >::some(v.to_owned_from_source(__buffa_src))
7311                        }
7312                        None => ::buffa::MessageField::none(),
7313                    },
7314                    azure_storage_key: match self.azure_storage_key.as_option() {
7315                        Some(v) => {
7316                            ::buffa::MessageField::<
7317                                super::super::AzureStorageKey,
7318                            >::some(v.to_owned_from_source(__buffa_src))
7319                        }
7320                        None => ::buffa::MessageField::none(),
7321                    },
7322                    aws_iam_role: match self.aws_iam_role.as_option() {
7323                        Some(v) => {
7324                            ::buffa::MessageField::<
7325                                super::super::AwsIamRoleConfig,
7326                            >::some(v.to_owned_from_source(__buffa_src))
7327                        }
7328                        None => ::buffa::MessageField::none(),
7329                    },
7330                    databricks_gcp_service_account: match self
7331                        .databricks_gcp_service_account
7332                        .as_option()
7333                    {
7334                        Some(v) => {
7335                            ::buffa::MessageField::<
7336                                super::super::DatabricksGcpServiceAccount,
7337                            >::some(v.to_owned_from_source(__buffa_src))
7338                        }
7339                        None => ::buffa::MessageField::none(),
7340                    },
7341                    __buffa_unknown_fields: self
7342                        .__buffa_unknown_fields
7343                        .to_owned()
7344                        .unwrap_or_default()
7345                        .into(),
7346                    ..::core::default::Default::default()
7347                }
7348            }
7349        }
7350        impl<'a> ::buffa::ViewEncode<'a> for CredentialView<'a> {
7351            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7352            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7353                #[allow(unused_imports)]
7354                use ::buffa::Enumeration as _;
7355                let mut size = 0u32;
7356                if !self.name.is_empty() {
7357                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
7358                }
7359                if let Some(ref v) = self.id {
7360                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7361                }
7362                {
7363                    let val = self.purpose.to_i32();
7364                    if val != 0 {
7365                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7366                    }
7367                }
7368                if self.read_only {
7369                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7370                }
7371                if let Some(ref v) = self.comment {
7372                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7373                }
7374                if let Some(ref v) = self.owner {
7375                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7376                }
7377                if let Some(v) = self.created_at {
7378                    size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
7379                }
7380                if let Some(ref v) = self.created_by {
7381                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7382                }
7383                if let Some(v) = self.updated_at {
7384                    size += 1u32 + ::buffa::types::int64_encoded_len(v) as u32;
7385                }
7386                if let Some(ref v) = self.updated_by {
7387                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
7388                }
7389                if self.used_for_managed_storage {
7390                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
7391                }
7392                if !self.full_name.is_empty() {
7393                    size
7394                        += 1u32
7395                            + ::buffa::types::string_encoded_len(&self.full_name) as u32;
7396                }
7397                if self.azure_service_principal.is_set() {
7398                    let __slot = __cache.reserve();
7399                    let inner_size = self.azure_service_principal.compute_size(__cache);
7400                    __cache.set(__slot, inner_size);
7401                    size
7402                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7403                            + inner_size;
7404                }
7405                if self.azure_managed_identity.is_set() {
7406                    let __slot = __cache.reserve();
7407                    let inner_size = self.azure_managed_identity.compute_size(__cache);
7408                    __cache.set(__slot, inner_size);
7409                    size
7410                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7411                            + inner_size;
7412                }
7413                if self.azure_storage_key.is_set() {
7414                    let __slot = __cache.reserve();
7415                    let inner_size = self.azure_storage_key.compute_size(__cache);
7416                    __cache.set(__slot, inner_size);
7417                    size
7418                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7419                            + inner_size;
7420                }
7421                if self.aws_iam_role.is_set() {
7422                    let __slot = __cache.reserve();
7423                    let inner_size = self.aws_iam_role.compute_size(__cache);
7424                    __cache.set(__slot, inner_size);
7425                    size
7426                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7427                            + inner_size;
7428                }
7429                if self.databricks_gcp_service_account.is_set() {
7430                    let __slot = __cache.reserve();
7431                    let inner_size = self
7432                        .databricks_gcp_service_account
7433                        .compute_size(__cache);
7434                    __cache.set(__slot, inner_size);
7435                    size
7436                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7437                            + inner_size;
7438                }
7439                size += self.__buffa_unknown_fields.encoded_len() as u32;
7440                size
7441            }
7442            #[allow(clippy::needless_borrow)]
7443            fn write_to(
7444                &self,
7445                __cache: &mut ::buffa::SizeCache,
7446                buf: &mut impl ::buffa::bytes::BufMut,
7447            ) {
7448                #[allow(unused_imports)]
7449                use ::buffa::Enumeration as _;
7450                if !self.name.is_empty() {
7451                    ::buffa::encoding::Tag::new(
7452                            1u32,
7453                            ::buffa::encoding::WireType::LengthDelimited,
7454                        )
7455                        .encode(buf);
7456                    ::buffa::types::encode_string(&self.name, buf);
7457                }
7458                if let Some(ref v) = self.id {
7459                    ::buffa::encoding::Tag::new(
7460                            2u32,
7461                            ::buffa::encoding::WireType::LengthDelimited,
7462                        )
7463                        .encode(buf);
7464                    ::buffa::types::encode_string(v, buf);
7465                }
7466                {
7467                    let val = self.purpose.to_i32();
7468                    if val != 0 {
7469                        ::buffa::encoding::Tag::new(
7470                                3u32,
7471                                ::buffa::encoding::WireType::Varint,
7472                            )
7473                            .encode(buf);
7474                        ::buffa::types::encode_int32(val, buf);
7475                    }
7476                }
7477                if self.read_only {
7478                    ::buffa::encoding::Tag::new(
7479                            4u32,
7480                            ::buffa::encoding::WireType::Varint,
7481                        )
7482                        .encode(buf);
7483                    ::buffa::types::encode_bool(self.read_only, buf);
7484                }
7485                if let Some(ref v) = self.comment {
7486                    ::buffa::encoding::Tag::new(
7487                            5u32,
7488                            ::buffa::encoding::WireType::LengthDelimited,
7489                        )
7490                        .encode(buf);
7491                    ::buffa::types::encode_string(v, buf);
7492                }
7493                if let Some(ref v) = self.owner {
7494                    ::buffa::encoding::Tag::new(
7495                            6u32,
7496                            ::buffa::encoding::WireType::LengthDelimited,
7497                        )
7498                        .encode(buf);
7499                    ::buffa::types::encode_string(v, buf);
7500                }
7501                if let Some(v) = self.created_at {
7502                    ::buffa::encoding::Tag::new(
7503                            7u32,
7504                            ::buffa::encoding::WireType::Varint,
7505                        )
7506                        .encode(buf);
7507                    ::buffa::types::encode_int64(v, buf);
7508                }
7509                if let Some(ref v) = self.created_by {
7510                    ::buffa::encoding::Tag::new(
7511                            8u32,
7512                            ::buffa::encoding::WireType::LengthDelimited,
7513                        )
7514                        .encode(buf);
7515                    ::buffa::types::encode_string(v, buf);
7516                }
7517                if let Some(v) = self.updated_at {
7518                    ::buffa::encoding::Tag::new(
7519                            9u32,
7520                            ::buffa::encoding::WireType::Varint,
7521                        )
7522                        .encode(buf);
7523                    ::buffa::types::encode_int64(v, buf);
7524                }
7525                if let Some(ref v) = self.updated_by {
7526                    ::buffa::encoding::Tag::new(
7527                            10u32,
7528                            ::buffa::encoding::WireType::LengthDelimited,
7529                        )
7530                        .encode(buf);
7531                    ::buffa::types::encode_string(v, buf);
7532                }
7533                if self.used_for_managed_storage {
7534                    ::buffa::encoding::Tag::new(
7535                            11u32,
7536                            ::buffa::encoding::WireType::Varint,
7537                        )
7538                        .encode(buf);
7539                    ::buffa::types::encode_bool(self.used_for_managed_storage, buf);
7540                }
7541                if !self.full_name.is_empty() {
7542                    ::buffa::encoding::Tag::new(
7543                            12u32,
7544                            ::buffa::encoding::WireType::LengthDelimited,
7545                        )
7546                        .encode(buf);
7547                    ::buffa::types::encode_string(&self.full_name, buf);
7548                }
7549                if self.azure_service_principal.is_set() {
7550                    ::buffa::encoding::Tag::new(
7551                            100u32,
7552                            ::buffa::encoding::WireType::LengthDelimited,
7553                        )
7554                        .encode(buf);
7555                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7556                    self.azure_service_principal.write_to(__cache, buf);
7557                }
7558                if self.azure_managed_identity.is_set() {
7559                    ::buffa::encoding::Tag::new(
7560                            101u32,
7561                            ::buffa::encoding::WireType::LengthDelimited,
7562                        )
7563                        .encode(buf);
7564                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7565                    self.azure_managed_identity.write_to(__cache, buf);
7566                }
7567                if self.azure_storage_key.is_set() {
7568                    ::buffa::encoding::Tag::new(
7569                            102u32,
7570                            ::buffa::encoding::WireType::LengthDelimited,
7571                        )
7572                        .encode(buf);
7573                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7574                    self.azure_storage_key.write_to(__cache, buf);
7575                }
7576                if self.aws_iam_role.is_set() {
7577                    ::buffa::encoding::Tag::new(
7578                            103u32,
7579                            ::buffa::encoding::WireType::LengthDelimited,
7580                        )
7581                        .encode(buf);
7582                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7583                    self.aws_iam_role.write_to(__cache, buf);
7584                }
7585                if self.databricks_gcp_service_account.is_set() {
7586                    ::buffa::encoding::Tag::new(
7587                            104u32,
7588                            ::buffa::encoding::WireType::LengthDelimited,
7589                        )
7590                        .encode(buf);
7591                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
7592                    self.databricks_gcp_service_account.write_to(__cache, buf);
7593                }
7594                self.__buffa_unknown_fields.write_to(buf);
7595            }
7596        }
7597        /// Serializes this view as protobuf JSON.
7598        ///
7599        /// Implicit-presence fields with default values are omitted, `required`
7600        /// fields are always emitted, explicit-presence (`optional`) fields are
7601        /// emitted only when set, bytes fields are base64-encoded, and enum
7602        /// values are their proto name strings.
7603        ///
7604        /// This impl uses `serialize_map(None)` because the number of emitted
7605        /// fields depends on default-omission rules; serializers that require
7606        /// known map lengths (e.g. `bincode`) will return a runtime error.
7607        /// Use the owned message type for those formats.
7608        impl<'__a> ::serde::Serialize for CredentialView<'__a> {
7609            fn serialize<__S: ::serde::Serializer>(
7610                &self,
7611                __s: __S,
7612            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7613                use ::serde::ser::SerializeMap as _;
7614                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7615                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
7616                    __map.serialize_entry("name", self.name)?;
7617                }
7618                if let ::core::option::Option::Some(__v) = self.id {
7619                    __map.serialize_entry("id", __v)?;
7620                }
7621                if !::buffa::json_helpers::skip_if::is_default_enum_value(
7622                    &self.purpose,
7623                ) {
7624                    __map.serialize_entry("purpose", &self.purpose)?;
7625                }
7626                if self.read_only {
7627                    __map.serialize_entry("read_only", &self.read_only)?;
7628                }
7629                if let ::core::option::Option::Some(__v) = self.comment {
7630                    __map.serialize_entry("comment", __v)?;
7631                }
7632                if let ::core::option::Option::Some(__v) = self.owner {
7633                    __map.serialize_entry("owner", __v)?;
7634                }
7635                if let ::core::option::Option::Some(__v) = self.created_at {
7636                    struct _W(i64);
7637                    impl ::serde::Serialize for _W {
7638                        fn serialize<__S: ::serde::Serializer>(
7639                            &self,
7640                            __s: __S,
7641                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
7642                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
7643                        }
7644                    }
7645                    __map.serialize_entry("created_at", &_W(__v))?;
7646                }
7647                if let ::core::option::Option::Some(__v) = self.created_by {
7648                    __map.serialize_entry("created_by", __v)?;
7649                }
7650                if let ::core::option::Option::Some(__v) = self.updated_at {
7651                    struct _W(i64);
7652                    impl ::serde::Serialize for _W {
7653                        fn serialize<__S: ::serde::Serializer>(
7654                            &self,
7655                            __s: __S,
7656                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
7657                            ::buffa::json_helpers::int64::serialize(&self.0, __s)
7658                        }
7659                    }
7660                    __map.serialize_entry("updated_at", &_W(__v))?;
7661                }
7662                if let ::core::option::Option::Some(__v) = self.updated_by {
7663                    __map.serialize_entry("updated_by", __v)?;
7664                }
7665                if self.used_for_managed_storage {
7666                    __map
7667                        .serialize_entry(
7668                            "usedForManagedStorage",
7669                            &self.used_for_managed_storage,
7670                        )?;
7671                }
7672                if !::buffa::json_helpers::skip_if::is_empty_str(self.full_name) {
7673                    __map.serialize_entry("full_name", self.full_name)?;
7674                }
7675                {
7676                    if let ::core::option::Option::Some(__v) = self
7677                        .azure_service_principal
7678                        .as_option()
7679                    {
7680                        __map.serialize_entry("azure_service_principal", __v)?;
7681                    }
7682                }
7683                {
7684                    if let ::core::option::Option::Some(__v) = self
7685                        .azure_managed_identity
7686                        .as_option()
7687                    {
7688                        __map.serialize_entry("azure_managed_identity", __v)?;
7689                    }
7690                }
7691                {
7692                    if let ::core::option::Option::Some(__v) = self
7693                        .azure_storage_key
7694                        .as_option()
7695                    {
7696                        __map.serialize_entry("azure_storage_key", __v)?;
7697                    }
7698                }
7699                {
7700                    if let ::core::option::Option::Some(__v) = self
7701                        .aws_iam_role
7702                        .as_option()
7703                    {
7704                        __map.serialize_entry("aws_iam_role", __v)?;
7705                    }
7706                }
7707                {
7708                    if let ::core::option::Option::Some(__v) = self
7709                        .databricks_gcp_service_account
7710                        .as_option()
7711                    {
7712                        __map.serialize_entry("databricks_gcp_service_account", __v)?;
7713                    }
7714                }
7715                __map.end()
7716            }
7717        }
7718        impl<'a> ::buffa::MessageName for CredentialView<'a> {
7719            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
7720            const NAME: &'static str = "Credential";
7721            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.Credential";
7722            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.Credential";
7723        }
7724        impl<'v> ::buffa::DefaultViewInstance for CredentialView<'v> {
7725            fn default_view_instance<'a>() -> &'a Self
7726            where
7727                Self: 'a,
7728            {
7729                static VALUE: ::buffa::__private::OnceBox<CredentialView<'static>> = ::buffa::__private::OnceBox::new();
7730                VALUE
7731                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
7732                        <CredentialView<'static>>::default(),
7733                    ))
7734            }
7735        }
7736        impl ::buffa::ViewReborrow for CredentialView<'static> {
7737            type Reborrowed<'b> = CredentialView<'b>;
7738            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
7739                this
7740            }
7741        }
7742        /** Self-contained, `'static` owned view of a `Credential` message.
7743
7744 Wraps [`::buffa::OwnedView`]`<`[`CredentialView`]`<'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.
7745
7746 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CredentialView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7747        #[derive(Clone, Debug)]
7748        pub struct CredentialOwnedView(::buffa::OwnedView<CredentialView<'static>>);
7749        impl CredentialOwnedView {
7750            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7751            ///
7752            /// The view borrows directly from the buffer's data; the buffer is
7753            /// retained inside the returned handle.
7754            ///
7755            /// # Errors
7756            ///
7757            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7758            /// protobuf data.
7759            pub fn decode(
7760                bytes: ::buffa::bytes::Bytes,
7761            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7762                ::core::result::Result::Ok(
7763                    CredentialOwnedView(::buffa::OwnedView::decode(bytes)?),
7764                )
7765            }
7766            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7767            /// max message size).
7768            ///
7769            /// # Errors
7770            ///
7771            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7772            /// exceeds the configured limits.
7773            pub fn decode_with_options(
7774                bytes: ::buffa::bytes::Bytes,
7775                opts: &::buffa::DecodeOptions,
7776            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7777                ::core::result::Result::Ok(
7778                    CredentialOwnedView(
7779                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7780                    ),
7781                )
7782            }
7783            /// Build from an owned message via an encode → decode round-trip.
7784            ///
7785            /// # Errors
7786            ///
7787            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7788            /// somehow invalid (should not happen for well-formed messages).
7789            pub fn from_owned(
7790                msg: &super::super::Credential,
7791            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7792                ::core::result::Result::Ok(
7793                    CredentialOwnedView(::buffa::OwnedView::from_owned(msg)?),
7794                )
7795            }
7796            /// Borrow the full [`CredentialView`] with its lifetime tied to `&self`.
7797            #[must_use]
7798            pub fn view(&self) -> &CredentialView<'_> {
7799                self.0.reborrow()
7800            }
7801            /// Convert to the owned message type.
7802            #[must_use]
7803            pub fn to_owned_message(&self) -> super::super::Credential {
7804                self.0.to_owned_message()
7805            }
7806            /// The underlying bytes buffer.
7807            #[must_use]
7808            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7809                self.0.bytes()
7810            }
7811            /// Consume the handle, returning the underlying bytes buffer.
7812            #[must_use]
7813            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7814                self.0.into_bytes()
7815            }
7816            /// The credential name.
7817            ///
7818            /// The name must be unique among storage and service credentials within the metastore.
7819            ///
7820            /// Field 1: `name`
7821            #[must_use]
7822            pub fn name(&self) -> &'_ str {
7823                self.0.reborrow().name
7824            }
7825            /// The unique identifier of the credential.
7826            ///
7827            /// Field 2: `id`
7828            #[must_use]
7829            pub fn id(&self) -> ::core::option::Option<&'_ str> {
7830                self.0.reborrow().id
7831            }
7832            /// Indicates the purpose of the credential.
7833            ///
7834            /// Field 3: `purpose`
7835            #[must_use]
7836            pub fn purpose(&self) -> ::buffa::EnumValue<super::super::Purpose> {
7837                self.0.reborrow().purpose
7838            }
7839            /// Whether the credential is usable only for read operations.
7840            ///
7841            /// Only applicable when purpose is STORAGE.
7842            ///
7843            /// Field 4: `read_only`
7844            #[must_use]
7845            pub fn read_only(&self) -> bool {
7846                self.0.reborrow().read_only
7847            }
7848            /// Comment associated with the credential.
7849            ///
7850            /// Field 5: `comment`
7851            #[must_use]
7852            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
7853                self.0.reborrow().comment
7854            }
7855            /// Username of current owner of credential.
7856            ///
7857            /// Field 6: `owner`
7858            #[must_use]
7859            pub fn owner(&self) -> ::core::option::Option<&'_ str> {
7860                self.0.reborrow().owner
7861            }
7862            /// Time at which this credential was created, in epoch milliseconds.
7863            ///
7864            /// Field 7: `created_at`
7865            #[must_use]
7866            pub fn created_at(&self) -> ::core::option::Option<i64> {
7867                self.0.reborrow().created_at
7868            }
7869            /// Username of credential creator.
7870            ///
7871            /// Field 8: `created_by`
7872            #[must_use]
7873            pub fn created_by(&self) -> ::core::option::Option<&'_ str> {
7874                self.0.reborrow().created_by
7875            }
7876            /// Time at which this credential was last modified, in epoch milliseconds.
7877            ///
7878            /// Field 9: `updated_at`
7879            #[must_use]
7880            pub fn updated_at(&self) -> ::core::option::Option<i64> {
7881                self.0.reborrow().updated_at
7882            }
7883            /// Username of user who last modified the credential.
7884            ///
7885            /// Field 10: `updated_by`
7886            #[must_use]
7887            pub fn updated_by(&self) -> ::core::option::Option<&'_ str> {
7888                self.0.reborrow().updated_by
7889            }
7890            /// Whether this credential is the current metastore's root storage credential.
7891            ///
7892            /// Only applicable when purpose is STORAGE.
7893            ///
7894            /// Field 11: `used_for_managed_storage`
7895            #[must_use]
7896            pub fn used_for_managed_storage(&self) -> bool {
7897                self.0.reborrow().used_for_managed_storage
7898            }
7899            /// The full name of the credential.
7900            ///
7901            /// Field 12: `full_name`
7902            #[must_use]
7903            pub fn full_name(&self) -> &'_ str {
7904                self.0.reborrow().full_name
7905            }
7906            /// The Azure service principal configuration.
7907            ///
7908            /// Sealed into the object's inline sensitive blob (envelope-encrypted, redacted
7909            /// from ordinary reads) rather than stored in the searchable properties.
7910            ///
7911            /// Field 100: `azure_service_principal`
7912            #[must_use]
7913            pub fn azure_service_principal(
7914                &self,
7915            ) -> &::buffa::MessageFieldView<
7916                super::super::__buffa::view::AzureServicePrincipalView<'_>,
7917            > {
7918                &self.0.reborrow().azure_service_principal
7919            }
7920            /// The Azure managed identity configuration.
7921            ///
7922            /// Field 101: `azure_managed_identity`
7923            #[must_use]
7924            pub fn azure_managed_identity(
7925                &self,
7926            ) -> &::buffa::MessageFieldView<
7927                super::super::__buffa::view::AzureManagedIdentityView<'_>,
7928            > {
7929                &self.0.reborrow().azure_managed_identity
7930            }
7931            /// The Azure storage key configuration.
7932            ///
7933            /// Field 102: `azure_storage_key`
7934            #[must_use]
7935            pub fn azure_storage_key(
7936                &self,
7937            ) -> &::buffa::MessageFieldView<
7938                super::super::__buffa::view::AzureStorageKeyView<'_>,
7939            > {
7940                &self.0.reborrow().azure_storage_key
7941            }
7942            /// The AWS IAM role configuration.
7943            ///
7944            /// Field 103: `aws_iam_role`
7945            #[must_use]
7946            pub fn aws_iam_role(
7947                &self,
7948            ) -> &::buffa::MessageFieldView<
7949                super::super::__buffa::view::AwsIamRoleConfigView<'_>,
7950            > {
7951                &self.0.reborrow().aws_iam_role
7952            }
7953            /// The Databricks managed GCP service account configuration.
7954            ///
7955            /// Field 104: `databricks_gcp_service_account`
7956            #[must_use]
7957            pub fn databricks_gcp_service_account(
7958                &self,
7959            ) -> &::buffa::MessageFieldView<
7960                super::super::__buffa::view::DatabricksGcpServiceAccountView<'_>,
7961            > {
7962                &self.0.reborrow().databricks_gcp_service_account
7963            }
7964        }
7965        impl ::core::convert::From<::buffa::OwnedView<CredentialView<'static>>>
7966        for CredentialOwnedView {
7967            fn from(inner: ::buffa::OwnedView<CredentialView<'static>>) -> Self {
7968                CredentialOwnedView(inner)
7969            }
7970        }
7971        impl ::core::convert::From<CredentialOwnedView>
7972        for ::buffa::OwnedView<CredentialView<'static>> {
7973            fn from(wrapper: CredentialOwnedView) -> Self {
7974                wrapper.0
7975            }
7976        }
7977        impl ::core::convert::AsRef<::buffa::OwnedView<CredentialView<'static>>>
7978        for CredentialOwnedView {
7979            fn as_ref(&self) -> &::buffa::OwnedView<CredentialView<'static>> {
7980                &self.0
7981            }
7982        }
7983        impl ::buffa::HasMessageView for super::super::Credential {
7984            type View<'a> = CredentialView<'a>;
7985            type ViewHandle = CredentialOwnedView;
7986        }
7987        impl ::serde::Serialize for CredentialOwnedView {
7988            fn serialize<__S: ::serde::Serializer>(
7989                &self,
7990                __s: __S,
7991            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7992                ::serde::Serialize::serialize(&self.0, __s)
7993            }
7994        }
7995        #[derive(Clone, Debug, Default)]
7996        pub struct ListCredentialsRequestView<'a> {
7997            /// Return only credentials for the specified purpose.
7998            ///
7999            /// Field 1: `purpose`
8000            pub purpose: ::core::option::Option<
8001                ::buffa::EnumValue<super::super::Purpose>,
8002            >,
8003            /// The maximum number of results per page that should be returned.
8004            ///
8005            /// Field 2: `max_results`
8006            pub max_results: ::core::option::Option<i32>,
8007            /// Opaque pagination token to go to next page based on previous query.
8008            ///
8009            /// Field 3: `page_token`
8010            pub page_token: ::core::option::Option<&'a str>,
8011            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8012        }
8013        impl<'a> ListCredentialsRequestView<'a> {
8014            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
8015            ///
8016            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
8017            /// and by generated sub-message decode arms with `depth - 1`.
8018            ///
8019            /// **Not part of the public API.** Named with a leading underscore to
8020            /// signal that it is for generated-code use only.
8021            #[doc(hidden)]
8022            pub fn _decode_depth(
8023                buf: &'a [u8],
8024                depth: u32,
8025            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8026                let mut view = Self::default();
8027                view._merge_into_view(buf, depth)?;
8028                ::core::result::Result::Ok(view)
8029            }
8030            /// Merge fields from `buf` into this view (proto merge semantics).
8031            ///
8032            /// Repeated fields append; singular fields last-wins; singular
8033            /// MESSAGE fields merge recursively. Used by sub-message decode
8034            /// arms when the same field appears multiple times on the wire.
8035            ///
8036            /// **Not part of the public API.**
8037            #[doc(hidden)]
8038            pub fn _merge_into_view(
8039                &mut self,
8040                buf: &'a [u8],
8041                depth: u32,
8042            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8043                let _ = depth;
8044                #[allow(unused_variables)]
8045                let view = self;
8046                let mut cur: &'a [u8] = buf;
8047                while !cur.is_empty() {
8048                    let before_tag = cur;
8049                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8050                    match tag.field_number() {
8051                        1u32 => {
8052                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8053                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8054                                    field_number: 1u32,
8055                                    expected: 0u8,
8056                                    actual: tag.wire_type() as u8,
8057                                });
8058                            }
8059                            view.purpose = Some(
8060                                ::buffa::EnumValue::from(
8061                                    ::buffa::types::decode_int32(&mut cur)?,
8062                                ),
8063                            );
8064                        }
8065                        2u32 => {
8066                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8067                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8068                                    field_number: 2u32,
8069                                    expected: 0u8,
8070                                    actual: tag.wire_type() as u8,
8071                                });
8072                            }
8073                            view.max_results = Some(
8074                                ::buffa::types::decode_int32(&mut cur)?,
8075                            );
8076                        }
8077                        3u32 => {
8078                            if tag.wire_type()
8079                                != ::buffa::encoding::WireType::LengthDelimited
8080                            {
8081                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8082                                    field_number: 3u32,
8083                                    expected: 2u8,
8084                                    actual: tag.wire_type() as u8,
8085                                });
8086                            }
8087                            view.page_token = Some(
8088                                ::buffa::types::borrow_str(&mut cur)?,
8089                            );
8090                        }
8091                        _ => {
8092                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
8093                            let span_len = before_tag.len() - cur.len();
8094                            view.__buffa_unknown_fields
8095                                .push_raw(&before_tag[..span_len]);
8096                        }
8097                    }
8098                }
8099                ::core::result::Result::Ok(())
8100            }
8101        }
8102        impl<'a> ::buffa::MessageView<'a> for ListCredentialsRequestView<'a> {
8103            type Owned = super::super::ListCredentialsRequest;
8104            fn decode_view(
8105                buf: &'a [u8],
8106            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8107                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
8108            }
8109            fn decode_view_with_limit(
8110                buf: &'a [u8],
8111                depth: u32,
8112            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8113                Self::_decode_depth(buf, depth)
8114            }
8115            fn to_owned_message(&self) -> super::super::ListCredentialsRequest {
8116                self.to_owned_from_source(None)
8117            }
8118            #[allow(clippy::useless_conversion, clippy::needless_update)]
8119            fn to_owned_from_source(
8120                &self,
8121                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8122            ) -> super::super::ListCredentialsRequest {
8123                #[allow(unused_imports)]
8124                use ::buffa::alloc::string::ToString as _;
8125                let _ = __buffa_src;
8126                super::super::ListCredentialsRequest {
8127                    purpose: self.purpose,
8128                    max_results: self.max_results,
8129                    page_token: self.page_token.map(|s| s.to_string()),
8130                    __buffa_unknown_fields: self
8131                        .__buffa_unknown_fields
8132                        .to_owned()
8133                        .unwrap_or_default()
8134                        .into(),
8135                    ..::core::default::Default::default()
8136                }
8137            }
8138        }
8139        impl<'a> ::buffa::ViewEncode<'a> for ListCredentialsRequestView<'a> {
8140            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8141            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8142                #[allow(unused_imports)]
8143                use ::buffa::Enumeration as _;
8144                let mut size = 0u32;
8145                if let Some(ref v) = self.purpose {
8146                    size += 1u32 + ::buffa::types::int32_encoded_len(v.to_i32()) as u32;
8147                }
8148                if let Some(v) = self.max_results {
8149                    size += 1u32 + ::buffa::types::int32_encoded_len(v) as u32;
8150                }
8151                if let Some(ref v) = self.page_token {
8152                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8153                }
8154                size += self.__buffa_unknown_fields.encoded_len() as u32;
8155                size
8156            }
8157            #[allow(clippy::needless_borrow)]
8158            fn write_to(
8159                &self,
8160                _cache: &mut ::buffa::SizeCache,
8161                buf: &mut impl ::buffa::bytes::BufMut,
8162            ) {
8163                #[allow(unused_imports)]
8164                use ::buffa::Enumeration as _;
8165                if let Some(ref v) = self.purpose {
8166                    ::buffa::encoding::Tag::new(
8167                            1u32,
8168                            ::buffa::encoding::WireType::Varint,
8169                        )
8170                        .encode(buf);
8171                    ::buffa::types::encode_int32(v.to_i32(), buf);
8172                }
8173                if let Some(v) = self.max_results {
8174                    ::buffa::encoding::Tag::new(
8175                            2u32,
8176                            ::buffa::encoding::WireType::Varint,
8177                        )
8178                        .encode(buf);
8179                    ::buffa::types::encode_int32(v, buf);
8180                }
8181                if let Some(ref v) = self.page_token {
8182                    ::buffa::encoding::Tag::new(
8183                            3u32,
8184                            ::buffa::encoding::WireType::LengthDelimited,
8185                        )
8186                        .encode(buf);
8187                    ::buffa::types::encode_string(v, buf);
8188                }
8189                self.__buffa_unknown_fields.write_to(buf);
8190            }
8191        }
8192        /// Serializes this view as protobuf JSON.
8193        ///
8194        /// Implicit-presence fields with default values are omitted, `required`
8195        /// fields are always emitted, explicit-presence (`optional`) fields are
8196        /// emitted only when set, bytes fields are base64-encoded, and enum
8197        /// values are their proto name strings.
8198        ///
8199        /// This impl uses `serialize_map(None)` because the number of emitted
8200        /// fields depends on default-omission rules; serializers that require
8201        /// known map lengths (e.g. `bincode`) will return a runtime error.
8202        /// Use the owned message type for those formats.
8203        impl<'__a> ::serde::Serialize for ListCredentialsRequestView<'__a> {
8204            fn serialize<__S: ::serde::Serializer>(
8205                &self,
8206                __s: __S,
8207            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8208                use ::serde::ser::SerializeMap as _;
8209                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8210                if let ::core::option::Option::Some(ref __v) = self.purpose {
8211                    __map.serialize_entry("purpose", __v)?;
8212                }
8213                if let ::core::option::Option::Some(__v) = self.max_results {
8214                    struct _W(i32);
8215                    impl ::serde::Serialize for _W {
8216                        fn serialize<__S: ::serde::Serializer>(
8217                            &self,
8218                            __s: __S,
8219                        ) -> ::core::result::Result<__S::Ok, __S::Error> {
8220                            ::buffa::json_helpers::int32::serialize(&self.0, __s)
8221                        }
8222                    }
8223                    __map.serialize_entry("max_results", &_W(__v))?;
8224                }
8225                if let ::core::option::Option::Some(__v) = self.page_token {
8226                    __map.serialize_entry("page_token", __v)?;
8227                }
8228                __map.end()
8229            }
8230        }
8231        impl<'a> ::buffa::MessageName for ListCredentialsRequestView<'a> {
8232            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
8233            const NAME: &'static str = "ListCredentialsRequest";
8234            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.ListCredentialsRequest";
8235            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.ListCredentialsRequest";
8236        }
8237        impl<'v> ::buffa::DefaultViewInstance for ListCredentialsRequestView<'v> {
8238            fn default_view_instance<'a>() -> &'a Self
8239            where
8240                Self: 'a,
8241            {
8242                static VALUE: ::buffa::__private::OnceBox<
8243                    ListCredentialsRequestView<'static>,
8244                > = ::buffa::__private::OnceBox::new();
8245                VALUE
8246                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
8247                        <ListCredentialsRequestView<'static>>::default(),
8248                    ))
8249            }
8250        }
8251        impl ::buffa::ViewReborrow for ListCredentialsRequestView<'static> {
8252            type Reborrowed<'b> = ListCredentialsRequestView<'b>;
8253            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
8254                this
8255            }
8256        }
8257        /** Self-contained, `'static` owned view of a `ListCredentialsRequest` message.
8258
8259 Wraps [`::buffa::OwnedView`]`<`[`ListCredentialsRequestView`]`<'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.
8260
8261 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListCredentialsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8262        #[derive(Clone, Debug)]
8263        pub struct ListCredentialsRequestOwnedView(
8264            ::buffa::OwnedView<ListCredentialsRequestView<'static>>,
8265        );
8266        impl ListCredentialsRequestOwnedView {
8267            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8268            ///
8269            /// The view borrows directly from the buffer's data; the buffer is
8270            /// retained inside the returned handle.
8271            ///
8272            /// # Errors
8273            ///
8274            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8275            /// protobuf data.
8276            pub fn decode(
8277                bytes: ::buffa::bytes::Bytes,
8278            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8279                ::core::result::Result::Ok(
8280                    ListCredentialsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
8281                )
8282            }
8283            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8284            /// max message size).
8285            ///
8286            /// # Errors
8287            ///
8288            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8289            /// exceeds the configured limits.
8290            pub fn decode_with_options(
8291                bytes: ::buffa::bytes::Bytes,
8292                opts: &::buffa::DecodeOptions,
8293            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8294                ::core::result::Result::Ok(
8295                    ListCredentialsRequestOwnedView(
8296                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8297                    ),
8298                )
8299            }
8300            /// Build from an owned message via an encode → decode round-trip.
8301            ///
8302            /// # Errors
8303            ///
8304            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8305            /// somehow invalid (should not happen for well-formed messages).
8306            pub fn from_owned(
8307                msg: &super::super::ListCredentialsRequest,
8308            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8309                ::core::result::Result::Ok(
8310                    ListCredentialsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
8311                )
8312            }
8313            /// Borrow the full [`ListCredentialsRequestView`] with its lifetime tied to `&self`.
8314            #[must_use]
8315            pub fn view(&self) -> &ListCredentialsRequestView<'_> {
8316                self.0.reborrow()
8317            }
8318            /// Convert to the owned message type.
8319            #[must_use]
8320            pub fn to_owned_message(&self) -> super::super::ListCredentialsRequest {
8321                self.0.to_owned_message()
8322            }
8323            /// The underlying bytes buffer.
8324            #[must_use]
8325            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8326                self.0.bytes()
8327            }
8328            /// Consume the handle, returning the underlying bytes buffer.
8329            #[must_use]
8330            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8331                self.0.into_bytes()
8332            }
8333            /// Return only credentials for the specified purpose.
8334            ///
8335            /// Field 1: `purpose`
8336            #[must_use]
8337            pub fn purpose(
8338                &self,
8339            ) -> ::core::option::Option<::buffa::EnumValue<super::super::Purpose>> {
8340                self.0.reborrow().purpose
8341            }
8342            /// The maximum number of results per page that should be returned.
8343            ///
8344            /// Field 2: `max_results`
8345            #[must_use]
8346            pub fn max_results(&self) -> ::core::option::Option<i32> {
8347                self.0.reborrow().max_results
8348            }
8349            /// Opaque pagination token to go to next page based on previous query.
8350            ///
8351            /// Field 3: `page_token`
8352            #[must_use]
8353            pub fn page_token(&self) -> ::core::option::Option<&'_ str> {
8354                self.0.reborrow().page_token
8355            }
8356        }
8357        impl ::core::convert::From<
8358            ::buffa::OwnedView<ListCredentialsRequestView<'static>>,
8359        > for ListCredentialsRequestOwnedView {
8360            fn from(
8361                inner: ::buffa::OwnedView<ListCredentialsRequestView<'static>>,
8362            ) -> Self {
8363                ListCredentialsRequestOwnedView(inner)
8364            }
8365        }
8366        impl ::core::convert::From<ListCredentialsRequestOwnedView>
8367        for ::buffa::OwnedView<ListCredentialsRequestView<'static>> {
8368            fn from(wrapper: ListCredentialsRequestOwnedView) -> Self {
8369                wrapper.0
8370            }
8371        }
8372        impl ::core::convert::AsRef<
8373            ::buffa::OwnedView<ListCredentialsRequestView<'static>>,
8374        > for ListCredentialsRequestOwnedView {
8375            fn as_ref(
8376                &self,
8377            ) -> &::buffa::OwnedView<ListCredentialsRequestView<'static>> {
8378                &self.0
8379            }
8380        }
8381        impl ::buffa::HasMessageView for super::super::ListCredentialsRequest {
8382            type View<'a> = ListCredentialsRequestView<'a>;
8383            type ViewHandle = ListCredentialsRequestOwnedView;
8384        }
8385        impl ::serde::Serialize for ListCredentialsRequestOwnedView {
8386            fn serialize<__S: ::serde::Serializer>(
8387                &self,
8388                __s: __S,
8389            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8390                ::serde::Serialize::serialize(&self.0, __s)
8391            }
8392        }
8393        #[derive(Clone, Debug, Default)]
8394        pub struct ListCredentialsResponseView<'a> {
8395            /// The credentials returned.
8396            ///
8397            /// Field 1: `credentials`
8398            pub credentials: ::buffa::RepeatedView<
8399                'a,
8400                super::super::__buffa::view::CredentialView<'a>,
8401            >,
8402            /// The next_page_token value to include in the next List request.
8403            ///
8404            /// Field 2: `next_page_token`
8405            pub next_page_token: ::core::option::Option<&'a str>,
8406            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8407        }
8408        impl<'a> ListCredentialsResponseView<'a> {
8409            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
8410            ///
8411            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
8412            /// and by generated sub-message decode arms with `depth - 1`.
8413            ///
8414            /// **Not part of the public API.** Named with a leading underscore to
8415            /// signal that it is for generated-code use only.
8416            #[doc(hidden)]
8417            pub fn _decode_depth(
8418                buf: &'a [u8],
8419                depth: u32,
8420            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8421                let mut view = Self::default();
8422                view._merge_into_view(buf, depth)?;
8423                ::core::result::Result::Ok(view)
8424            }
8425            /// Merge fields from `buf` into this view (proto merge semantics).
8426            ///
8427            /// Repeated fields append; singular fields last-wins; singular
8428            /// MESSAGE fields merge recursively. Used by sub-message decode
8429            /// arms when the same field appears multiple times on the wire.
8430            ///
8431            /// **Not part of the public API.**
8432            #[doc(hidden)]
8433            pub fn _merge_into_view(
8434                &mut self,
8435                buf: &'a [u8],
8436                depth: u32,
8437            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8438                let _ = depth;
8439                #[allow(unused_variables)]
8440                let view = self;
8441                let mut cur: &'a [u8] = buf;
8442                while !cur.is_empty() {
8443                    let before_tag = cur;
8444                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8445                    match tag.field_number() {
8446                        2u32 => {
8447                            if tag.wire_type()
8448                                != ::buffa::encoding::WireType::LengthDelimited
8449                            {
8450                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8451                                    field_number: 2u32,
8452                                    expected: 2u8,
8453                                    actual: tag.wire_type() as u8,
8454                                });
8455                            }
8456                            view.next_page_token = Some(
8457                                ::buffa::types::borrow_str(&mut cur)?,
8458                            );
8459                        }
8460                        1u32 => {
8461                            if tag.wire_type()
8462                                != ::buffa::encoding::WireType::LengthDelimited
8463                            {
8464                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8465                                    field_number: 1u32,
8466                                    expected: 2u8,
8467                                    actual: tag.wire_type() as u8,
8468                                });
8469                            }
8470                            if depth == 0 {
8471                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
8472                            }
8473                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8474                            view.credentials
8475                                .push(
8476                                    super::super::__buffa::view::CredentialView::_decode_depth(
8477                                        sub,
8478                                        depth - 1,
8479                                    )?,
8480                                );
8481                        }
8482                        _ => {
8483                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
8484                            let span_len = before_tag.len() - cur.len();
8485                            view.__buffa_unknown_fields
8486                                .push_raw(&before_tag[..span_len]);
8487                        }
8488                    }
8489                }
8490                ::core::result::Result::Ok(())
8491            }
8492        }
8493        impl<'a> ::buffa::MessageView<'a> for ListCredentialsResponseView<'a> {
8494            type Owned = super::super::ListCredentialsResponse;
8495            fn decode_view(
8496                buf: &'a [u8],
8497            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8498                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
8499            }
8500            fn decode_view_with_limit(
8501                buf: &'a [u8],
8502                depth: u32,
8503            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8504                Self::_decode_depth(buf, depth)
8505            }
8506            fn to_owned_message(&self) -> super::super::ListCredentialsResponse {
8507                self.to_owned_from_source(None)
8508            }
8509            #[allow(clippy::useless_conversion, clippy::needless_update)]
8510            fn to_owned_from_source(
8511                &self,
8512                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8513            ) -> super::super::ListCredentialsResponse {
8514                #[allow(unused_imports)]
8515                use ::buffa::alloc::string::ToString as _;
8516                let _ = __buffa_src;
8517                super::super::ListCredentialsResponse {
8518                    credentials: self
8519                        .credentials
8520                        .iter()
8521                        .map(|v| v.to_owned_from_source(__buffa_src))
8522                        .collect(),
8523                    next_page_token: self.next_page_token.map(|s| s.to_string()),
8524                    __buffa_unknown_fields: self
8525                        .__buffa_unknown_fields
8526                        .to_owned()
8527                        .unwrap_or_default()
8528                        .into(),
8529                    ..::core::default::Default::default()
8530                }
8531            }
8532        }
8533        impl<'a> ::buffa::ViewEncode<'a> for ListCredentialsResponseView<'a> {
8534            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8535            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8536                #[allow(unused_imports)]
8537                use ::buffa::Enumeration as _;
8538                let mut size = 0u32;
8539                for v in &self.credentials {
8540                    let __slot = __cache.reserve();
8541                    let inner_size = v.compute_size(__cache);
8542                    __cache.set(__slot, inner_size);
8543                    size
8544                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8545                            + inner_size;
8546                }
8547                if let Some(ref v) = self.next_page_token {
8548                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
8549                }
8550                size += self.__buffa_unknown_fields.encoded_len() as u32;
8551                size
8552            }
8553            #[allow(clippy::needless_borrow)]
8554            fn write_to(
8555                &self,
8556                __cache: &mut ::buffa::SizeCache,
8557                buf: &mut impl ::buffa::bytes::BufMut,
8558            ) {
8559                #[allow(unused_imports)]
8560                use ::buffa::Enumeration as _;
8561                for v in &self.credentials {
8562                    ::buffa::encoding::Tag::new(
8563                            1u32,
8564                            ::buffa::encoding::WireType::LengthDelimited,
8565                        )
8566                        .encode(buf);
8567                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
8568                    v.write_to(__cache, buf);
8569                }
8570                if let Some(ref v) = self.next_page_token {
8571                    ::buffa::encoding::Tag::new(
8572                            2u32,
8573                            ::buffa::encoding::WireType::LengthDelimited,
8574                        )
8575                        .encode(buf);
8576                    ::buffa::types::encode_string(v, buf);
8577                }
8578                self.__buffa_unknown_fields.write_to(buf);
8579            }
8580        }
8581        /// Serializes this view as protobuf JSON.
8582        ///
8583        /// Implicit-presence fields with default values are omitted, `required`
8584        /// fields are always emitted, explicit-presence (`optional`) fields are
8585        /// emitted only when set, bytes fields are base64-encoded, and enum
8586        /// values are their proto name strings.
8587        ///
8588        /// This impl uses `serialize_map(None)` because the number of emitted
8589        /// fields depends on default-omission rules; serializers that require
8590        /// known map lengths (e.g. `bincode`) will return a runtime error.
8591        /// Use the owned message type for those formats.
8592        impl<'__a> ::serde::Serialize for ListCredentialsResponseView<'__a> {
8593            fn serialize<__S: ::serde::Serializer>(
8594                &self,
8595                __s: __S,
8596            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8597                use ::serde::ser::SerializeMap as _;
8598                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8599                if !self.credentials.is_empty() {
8600                    __map.serialize_entry("credentials", &*self.credentials)?;
8601                }
8602                if let ::core::option::Option::Some(__v) = self.next_page_token {
8603                    __map.serialize_entry("next_page_token", __v)?;
8604                }
8605                __map.end()
8606            }
8607        }
8608        impl<'a> ::buffa::MessageName for ListCredentialsResponseView<'a> {
8609            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
8610            const NAME: &'static str = "ListCredentialsResponse";
8611            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.ListCredentialsResponse";
8612            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.ListCredentialsResponse";
8613        }
8614        impl<'v> ::buffa::DefaultViewInstance for ListCredentialsResponseView<'v> {
8615            fn default_view_instance<'a>() -> &'a Self
8616            where
8617                Self: 'a,
8618            {
8619                static VALUE: ::buffa::__private::OnceBox<
8620                    ListCredentialsResponseView<'static>,
8621                > = ::buffa::__private::OnceBox::new();
8622                VALUE
8623                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
8624                        <ListCredentialsResponseView<'static>>::default(),
8625                    ))
8626            }
8627        }
8628        impl ::buffa::ViewReborrow for ListCredentialsResponseView<'static> {
8629            type Reborrowed<'b> = ListCredentialsResponseView<'b>;
8630            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
8631                this
8632            }
8633        }
8634        /** Self-contained, `'static` owned view of a `ListCredentialsResponse` message.
8635
8636 Wraps [`::buffa::OwnedView`]`<`[`ListCredentialsResponseView`]`<'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.
8637
8638 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ListCredentialsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8639        #[derive(Clone, Debug)]
8640        pub struct ListCredentialsResponseOwnedView(
8641            ::buffa::OwnedView<ListCredentialsResponseView<'static>>,
8642        );
8643        impl ListCredentialsResponseOwnedView {
8644            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8645            ///
8646            /// The view borrows directly from the buffer's data; the buffer is
8647            /// retained inside the returned handle.
8648            ///
8649            /// # Errors
8650            ///
8651            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8652            /// protobuf data.
8653            pub fn decode(
8654                bytes: ::buffa::bytes::Bytes,
8655            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8656                ::core::result::Result::Ok(
8657                    ListCredentialsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
8658                )
8659            }
8660            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8661            /// max message size).
8662            ///
8663            /// # Errors
8664            ///
8665            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8666            /// exceeds the configured limits.
8667            pub fn decode_with_options(
8668                bytes: ::buffa::bytes::Bytes,
8669                opts: &::buffa::DecodeOptions,
8670            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8671                ::core::result::Result::Ok(
8672                    ListCredentialsResponseOwnedView(
8673                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8674                    ),
8675                )
8676            }
8677            /// Build from an owned message via an encode → decode round-trip.
8678            ///
8679            /// # Errors
8680            ///
8681            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8682            /// somehow invalid (should not happen for well-formed messages).
8683            pub fn from_owned(
8684                msg: &super::super::ListCredentialsResponse,
8685            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8686                ::core::result::Result::Ok(
8687                    ListCredentialsResponseOwnedView(
8688                        ::buffa::OwnedView::from_owned(msg)?,
8689                    ),
8690                )
8691            }
8692            /// Borrow the full [`ListCredentialsResponseView`] with its lifetime tied to `&self`.
8693            #[must_use]
8694            pub fn view(&self) -> &ListCredentialsResponseView<'_> {
8695                self.0.reborrow()
8696            }
8697            /// Convert to the owned message type.
8698            #[must_use]
8699            pub fn to_owned_message(&self) -> super::super::ListCredentialsResponse {
8700                self.0.to_owned_message()
8701            }
8702            /// The underlying bytes buffer.
8703            #[must_use]
8704            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8705                self.0.bytes()
8706            }
8707            /// Consume the handle, returning the underlying bytes buffer.
8708            #[must_use]
8709            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8710                self.0.into_bytes()
8711            }
8712            /// The credentials returned.
8713            ///
8714            /// Field 1: `credentials`
8715            #[must_use]
8716            pub fn credentials(
8717                &self,
8718            ) -> &::buffa::RepeatedView<
8719                '_,
8720                super::super::__buffa::view::CredentialView<'_>,
8721            > {
8722                &self.0.reborrow().credentials
8723            }
8724            /// The next_page_token value to include in the next List request.
8725            ///
8726            /// Field 2: `next_page_token`
8727            #[must_use]
8728            pub fn next_page_token(&self) -> ::core::option::Option<&'_ str> {
8729                self.0.reborrow().next_page_token
8730            }
8731        }
8732        impl ::core::convert::From<
8733            ::buffa::OwnedView<ListCredentialsResponseView<'static>>,
8734        > for ListCredentialsResponseOwnedView {
8735            fn from(
8736                inner: ::buffa::OwnedView<ListCredentialsResponseView<'static>>,
8737            ) -> Self {
8738                ListCredentialsResponseOwnedView(inner)
8739            }
8740        }
8741        impl ::core::convert::From<ListCredentialsResponseOwnedView>
8742        for ::buffa::OwnedView<ListCredentialsResponseView<'static>> {
8743            fn from(wrapper: ListCredentialsResponseOwnedView) -> Self {
8744                wrapper.0
8745            }
8746        }
8747        impl ::core::convert::AsRef<
8748            ::buffa::OwnedView<ListCredentialsResponseView<'static>>,
8749        > for ListCredentialsResponseOwnedView {
8750            fn as_ref(
8751                &self,
8752            ) -> &::buffa::OwnedView<ListCredentialsResponseView<'static>> {
8753                &self.0
8754            }
8755        }
8756        impl ::buffa::HasMessageView for super::super::ListCredentialsResponse {
8757            type View<'a> = ListCredentialsResponseView<'a>;
8758            type ViewHandle = ListCredentialsResponseOwnedView;
8759        }
8760        impl ::serde::Serialize for ListCredentialsResponseOwnedView {
8761            fn serialize<__S: ::serde::Serializer>(
8762                &self,
8763                __s: __S,
8764            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8765                ::serde::Serialize::serialize(&self.0, __s)
8766            }
8767        }
8768        /// Create a new credential.
8769        #[derive(Clone, Debug, Default)]
8770        pub struct CreateCredentialRequestView<'a> {
8771            /// The credential name. The name must be unique among storage and service credentials within the metastore.
8772            ///
8773            /// Field 1: `name`
8774            pub name: &'a str,
8775            /// Indicates the purpose of the credential.
8776            ///
8777            /// Field 2: `purpose`
8778            pub purpose: ::buffa::EnumValue<super::super::Purpose>,
8779            /// Comment associated with the credential.
8780            ///
8781            /// Field 3: `comment`
8782            pub comment: ::core::option::Option<&'a str>,
8783            /// Whether the credential is usable only for read operations. Only applicable when purpose is STORAGE.
8784            ///
8785            /// Field 4: `read_only`
8786            pub read_only: ::core::option::Option<bool>,
8787            /// Optional. Supplying true to this argument skips validation of the created set of credentials.
8788            ///
8789            /// Field 5: `skip_validation`
8790            pub skip_validation: ::core::option::Option<bool>,
8791            /// The Azure service principal configuration.
8792            ///
8793            /// Field 100: `azure_service_principal`
8794            pub azure_service_principal: ::buffa::MessageFieldView<
8795                super::super::__buffa::view::AzureServicePrincipalView<'a>,
8796            >,
8797            /// The Azure managed identity configuration.
8798            ///
8799            /// Field 101: `azure_managed_identity`
8800            pub azure_managed_identity: ::buffa::MessageFieldView<
8801                super::super::__buffa::view::AzureManagedIdentityView<'a>,
8802            >,
8803            /// The Azure storage key configuration.
8804            ///
8805            /// Field 102: `azure_storage_key`
8806            pub azure_storage_key: ::buffa::MessageFieldView<
8807                super::super::__buffa::view::AzureStorageKeyView<'a>,
8808            >,
8809            /// The AWS IAM role configuration.
8810            ///
8811            /// Field 103: `aws_iam_role`
8812            pub aws_iam_role: ::buffa::MessageFieldView<
8813                super::super::__buffa::view::AwsIamRoleConfigView<'a>,
8814            >,
8815            /// The Databricks managed GCP service account configuration.
8816            ///
8817            /// Field 104: `databricks_gcp_service_account`
8818            pub databricks_gcp_service_account: ::buffa::MessageFieldView<
8819                super::super::__buffa::view::DatabricksGcpServiceAccountView<'a>,
8820            >,
8821            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8822        }
8823        impl<'a> CreateCredentialRequestView<'a> {
8824            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
8825            ///
8826            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
8827            /// and by generated sub-message decode arms with `depth - 1`.
8828            ///
8829            /// **Not part of the public API.** Named with a leading underscore to
8830            /// signal that it is for generated-code use only.
8831            #[doc(hidden)]
8832            pub fn _decode_depth(
8833                buf: &'a [u8],
8834                depth: u32,
8835            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8836                let mut view = Self::default();
8837                view._merge_into_view(buf, depth)?;
8838                ::core::result::Result::Ok(view)
8839            }
8840            /// Merge fields from `buf` into this view (proto merge semantics).
8841            ///
8842            /// Repeated fields append; singular fields last-wins; singular
8843            /// MESSAGE fields merge recursively. Used by sub-message decode
8844            /// arms when the same field appears multiple times on the wire.
8845            ///
8846            /// **Not part of the public API.**
8847            #[doc(hidden)]
8848            pub fn _merge_into_view(
8849                &mut self,
8850                buf: &'a [u8],
8851                depth: u32,
8852            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8853                let _ = depth;
8854                #[allow(unused_variables)]
8855                let view = self;
8856                let mut cur: &'a [u8] = buf;
8857                while !cur.is_empty() {
8858                    let before_tag = cur;
8859                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
8860                    match tag.field_number() {
8861                        1u32 => {
8862                            if tag.wire_type()
8863                                != ::buffa::encoding::WireType::LengthDelimited
8864                            {
8865                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8866                                    field_number: 1u32,
8867                                    expected: 2u8,
8868                                    actual: tag.wire_type() as u8,
8869                                });
8870                            }
8871                            view.name = ::buffa::types::borrow_str(&mut cur)?;
8872                        }
8873                        2u32 => {
8874                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8875                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8876                                    field_number: 2u32,
8877                                    expected: 0u8,
8878                                    actual: tag.wire_type() as u8,
8879                                });
8880                            }
8881                            view.purpose = ::buffa::EnumValue::from(
8882                                ::buffa::types::decode_int32(&mut cur)?,
8883                            );
8884                        }
8885                        3u32 => {
8886                            if tag.wire_type()
8887                                != ::buffa::encoding::WireType::LengthDelimited
8888                            {
8889                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8890                                    field_number: 3u32,
8891                                    expected: 2u8,
8892                                    actual: tag.wire_type() as u8,
8893                                });
8894                            }
8895                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
8896                        }
8897                        4u32 => {
8898                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8899                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8900                                    field_number: 4u32,
8901                                    expected: 0u8,
8902                                    actual: tag.wire_type() as u8,
8903                                });
8904                            }
8905                            view.read_only = Some(
8906                                ::buffa::types::decode_bool(&mut cur)?,
8907                            );
8908                        }
8909                        5u32 => {
8910                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
8911                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8912                                    field_number: 5u32,
8913                                    expected: 0u8,
8914                                    actual: tag.wire_type() as u8,
8915                                });
8916                            }
8917                            view.skip_validation = Some(
8918                                ::buffa::types::decode_bool(&mut cur)?,
8919                            );
8920                        }
8921                        100u32 => {
8922                            if tag.wire_type()
8923                                != ::buffa::encoding::WireType::LengthDelimited
8924                            {
8925                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8926                                    field_number: 100u32,
8927                                    expected: 2u8,
8928                                    actual: tag.wire_type() as u8,
8929                                });
8930                            }
8931                            if depth == 0 {
8932                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
8933                            }
8934                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8935                            match view.azure_service_principal.as_mut() {
8936                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
8937                                None => {
8938                                    view.azure_service_principal = ::buffa::MessageFieldView::set(
8939                                        super::super::__buffa::view::AzureServicePrincipalView::_decode_depth(
8940                                            sub,
8941                                            depth - 1,
8942                                        )?,
8943                                    );
8944                                }
8945                            }
8946                        }
8947                        101u32 => {
8948                            if tag.wire_type()
8949                                != ::buffa::encoding::WireType::LengthDelimited
8950                            {
8951                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8952                                    field_number: 101u32,
8953                                    expected: 2u8,
8954                                    actual: tag.wire_type() as u8,
8955                                });
8956                            }
8957                            if depth == 0 {
8958                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
8959                            }
8960                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8961                            match view.azure_managed_identity.as_mut() {
8962                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
8963                                None => {
8964                                    view.azure_managed_identity = ::buffa::MessageFieldView::set(
8965                                        super::super::__buffa::view::AzureManagedIdentityView::_decode_depth(
8966                                            sub,
8967                                            depth - 1,
8968                                        )?,
8969                                    );
8970                                }
8971                            }
8972                        }
8973                        102u32 => {
8974                            if tag.wire_type()
8975                                != ::buffa::encoding::WireType::LengthDelimited
8976                            {
8977                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
8978                                    field_number: 102u32,
8979                                    expected: 2u8,
8980                                    actual: tag.wire_type() as u8,
8981                                });
8982                            }
8983                            if depth == 0 {
8984                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
8985                            }
8986                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8987                            match view.azure_storage_key.as_mut() {
8988                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
8989                                None => {
8990                                    view.azure_storage_key = ::buffa::MessageFieldView::set(
8991                                        super::super::__buffa::view::AzureStorageKeyView::_decode_depth(
8992                                            sub,
8993                                            depth - 1,
8994                                        )?,
8995                                    );
8996                                }
8997                            }
8998                        }
8999                        103u32 => {
9000                            if tag.wire_type()
9001                                != ::buffa::encoding::WireType::LengthDelimited
9002                            {
9003                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9004                                    field_number: 103u32,
9005                                    expected: 2u8,
9006                                    actual: tag.wire_type() as u8,
9007                                });
9008                            }
9009                            if depth == 0 {
9010                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
9011                            }
9012                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9013                            match view.aws_iam_role.as_mut() {
9014                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
9015                                None => {
9016                                    view.aws_iam_role = ::buffa::MessageFieldView::set(
9017                                        super::super::__buffa::view::AwsIamRoleConfigView::_decode_depth(
9018                                            sub,
9019                                            depth - 1,
9020                                        )?,
9021                                    );
9022                                }
9023                            }
9024                        }
9025                        104u32 => {
9026                            if tag.wire_type()
9027                                != ::buffa::encoding::WireType::LengthDelimited
9028                            {
9029                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9030                                    field_number: 104u32,
9031                                    expected: 2u8,
9032                                    actual: tag.wire_type() as u8,
9033                                });
9034                            }
9035                            if depth == 0 {
9036                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
9037                            }
9038                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9039                            match view.databricks_gcp_service_account.as_mut() {
9040                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
9041                                None => {
9042                                    view.databricks_gcp_service_account = ::buffa::MessageFieldView::set(
9043                                        super::super::__buffa::view::DatabricksGcpServiceAccountView::_decode_depth(
9044                                            sub,
9045                                            depth - 1,
9046                                        )?,
9047                                    );
9048                                }
9049                            }
9050                        }
9051                        _ => {
9052                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9053                            let span_len = before_tag.len() - cur.len();
9054                            view.__buffa_unknown_fields
9055                                .push_raw(&before_tag[..span_len]);
9056                        }
9057                    }
9058                }
9059                ::core::result::Result::Ok(())
9060            }
9061        }
9062        impl<'a> ::buffa::MessageView<'a> for CreateCredentialRequestView<'a> {
9063            type Owned = super::super::CreateCredentialRequest;
9064            fn decode_view(
9065                buf: &'a [u8],
9066            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9067                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9068            }
9069            fn decode_view_with_limit(
9070                buf: &'a [u8],
9071                depth: u32,
9072            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9073                Self::_decode_depth(buf, depth)
9074            }
9075            fn to_owned_message(&self) -> super::super::CreateCredentialRequest {
9076                self.to_owned_from_source(None)
9077            }
9078            #[allow(clippy::useless_conversion, clippy::needless_update)]
9079            fn to_owned_from_source(
9080                &self,
9081                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9082            ) -> super::super::CreateCredentialRequest {
9083                #[allow(unused_imports)]
9084                use ::buffa::alloc::string::ToString as _;
9085                let _ = __buffa_src;
9086                super::super::CreateCredentialRequest {
9087                    name: self.name.to_string(),
9088                    purpose: self.purpose,
9089                    comment: self.comment.map(|s| s.to_string()),
9090                    read_only: self.read_only,
9091                    skip_validation: self.skip_validation,
9092                    azure_service_principal: match self
9093                        .azure_service_principal
9094                        .as_option()
9095                    {
9096                        Some(v) => {
9097                            ::buffa::MessageField::<
9098                                super::super::AzureServicePrincipal,
9099                            >::some(v.to_owned_from_source(__buffa_src))
9100                        }
9101                        None => ::buffa::MessageField::none(),
9102                    },
9103                    azure_managed_identity: match self.azure_managed_identity.as_option()
9104                    {
9105                        Some(v) => {
9106                            ::buffa::MessageField::<
9107                                super::super::AzureManagedIdentity,
9108                            >::some(v.to_owned_from_source(__buffa_src))
9109                        }
9110                        None => ::buffa::MessageField::none(),
9111                    },
9112                    azure_storage_key: match self.azure_storage_key.as_option() {
9113                        Some(v) => {
9114                            ::buffa::MessageField::<
9115                                super::super::AzureStorageKey,
9116                            >::some(v.to_owned_from_source(__buffa_src))
9117                        }
9118                        None => ::buffa::MessageField::none(),
9119                    },
9120                    aws_iam_role: match self.aws_iam_role.as_option() {
9121                        Some(v) => {
9122                            ::buffa::MessageField::<
9123                                super::super::AwsIamRoleConfig,
9124                            >::some(v.to_owned_from_source(__buffa_src))
9125                        }
9126                        None => ::buffa::MessageField::none(),
9127                    },
9128                    databricks_gcp_service_account: match self
9129                        .databricks_gcp_service_account
9130                        .as_option()
9131                    {
9132                        Some(v) => {
9133                            ::buffa::MessageField::<
9134                                super::super::DatabricksGcpServiceAccount,
9135                            >::some(v.to_owned_from_source(__buffa_src))
9136                        }
9137                        None => ::buffa::MessageField::none(),
9138                    },
9139                    __buffa_unknown_fields: self
9140                        .__buffa_unknown_fields
9141                        .to_owned()
9142                        .unwrap_or_default()
9143                        .into(),
9144                    ..::core::default::Default::default()
9145                }
9146            }
9147        }
9148        impl<'a> ::buffa::ViewEncode<'a> for CreateCredentialRequestView<'a> {
9149            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9150            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9151                #[allow(unused_imports)]
9152                use ::buffa::Enumeration as _;
9153                let mut size = 0u32;
9154                if !self.name.is_empty() {
9155                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
9156                }
9157                {
9158                    let val = self.purpose.to_i32();
9159                    if val != 0 {
9160                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
9161                    }
9162                }
9163                if let Some(ref v) = self.comment {
9164                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
9165                }
9166                if self.read_only.is_some() {
9167                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
9168                }
9169                if self.skip_validation.is_some() {
9170                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
9171                }
9172                if self.azure_service_principal.is_set() {
9173                    let __slot = __cache.reserve();
9174                    let inner_size = self.azure_service_principal.compute_size(__cache);
9175                    __cache.set(__slot, inner_size);
9176                    size
9177                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9178                            + inner_size;
9179                }
9180                if self.azure_managed_identity.is_set() {
9181                    let __slot = __cache.reserve();
9182                    let inner_size = self.azure_managed_identity.compute_size(__cache);
9183                    __cache.set(__slot, inner_size);
9184                    size
9185                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9186                            + inner_size;
9187                }
9188                if self.azure_storage_key.is_set() {
9189                    let __slot = __cache.reserve();
9190                    let inner_size = self.azure_storage_key.compute_size(__cache);
9191                    __cache.set(__slot, inner_size);
9192                    size
9193                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9194                            + inner_size;
9195                }
9196                if self.aws_iam_role.is_set() {
9197                    let __slot = __cache.reserve();
9198                    let inner_size = self.aws_iam_role.compute_size(__cache);
9199                    __cache.set(__slot, inner_size);
9200                    size
9201                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9202                            + inner_size;
9203                }
9204                if self.databricks_gcp_service_account.is_set() {
9205                    let __slot = __cache.reserve();
9206                    let inner_size = self
9207                        .databricks_gcp_service_account
9208                        .compute_size(__cache);
9209                    __cache.set(__slot, inner_size);
9210                    size
9211                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9212                            + inner_size;
9213                }
9214                size += self.__buffa_unknown_fields.encoded_len() as u32;
9215                size
9216            }
9217            #[allow(clippy::needless_borrow)]
9218            fn write_to(
9219                &self,
9220                __cache: &mut ::buffa::SizeCache,
9221                buf: &mut impl ::buffa::bytes::BufMut,
9222            ) {
9223                #[allow(unused_imports)]
9224                use ::buffa::Enumeration as _;
9225                if !self.name.is_empty() {
9226                    ::buffa::encoding::Tag::new(
9227                            1u32,
9228                            ::buffa::encoding::WireType::LengthDelimited,
9229                        )
9230                        .encode(buf);
9231                    ::buffa::types::encode_string(&self.name, buf);
9232                }
9233                {
9234                    let val = self.purpose.to_i32();
9235                    if val != 0 {
9236                        ::buffa::encoding::Tag::new(
9237                                2u32,
9238                                ::buffa::encoding::WireType::Varint,
9239                            )
9240                            .encode(buf);
9241                        ::buffa::types::encode_int32(val, buf);
9242                    }
9243                }
9244                if let Some(ref v) = self.comment {
9245                    ::buffa::encoding::Tag::new(
9246                            3u32,
9247                            ::buffa::encoding::WireType::LengthDelimited,
9248                        )
9249                        .encode(buf);
9250                    ::buffa::types::encode_string(v, buf);
9251                }
9252                if let Some(v) = self.read_only {
9253                    ::buffa::encoding::Tag::new(
9254                            4u32,
9255                            ::buffa::encoding::WireType::Varint,
9256                        )
9257                        .encode(buf);
9258                    ::buffa::types::encode_bool(v, buf);
9259                }
9260                if let Some(v) = self.skip_validation {
9261                    ::buffa::encoding::Tag::new(
9262                            5u32,
9263                            ::buffa::encoding::WireType::Varint,
9264                        )
9265                        .encode(buf);
9266                    ::buffa::types::encode_bool(v, buf);
9267                }
9268                if self.azure_service_principal.is_set() {
9269                    ::buffa::encoding::Tag::new(
9270                            100u32,
9271                            ::buffa::encoding::WireType::LengthDelimited,
9272                        )
9273                        .encode(buf);
9274                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9275                    self.azure_service_principal.write_to(__cache, buf);
9276                }
9277                if self.azure_managed_identity.is_set() {
9278                    ::buffa::encoding::Tag::new(
9279                            101u32,
9280                            ::buffa::encoding::WireType::LengthDelimited,
9281                        )
9282                        .encode(buf);
9283                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9284                    self.azure_managed_identity.write_to(__cache, buf);
9285                }
9286                if self.azure_storage_key.is_set() {
9287                    ::buffa::encoding::Tag::new(
9288                            102u32,
9289                            ::buffa::encoding::WireType::LengthDelimited,
9290                        )
9291                        .encode(buf);
9292                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9293                    self.azure_storage_key.write_to(__cache, buf);
9294                }
9295                if self.aws_iam_role.is_set() {
9296                    ::buffa::encoding::Tag::new(
9297                            103u32,
9298                            ::buffa::encoding::WireType::LengthDelimited,
9299                        )
9300                        .encode(buf);
9301                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9302                    self.aws_iam_role.write_to(__cache, buf);
9303                }
9304                if self.databricks_gcp_service_account.is_set() {
9305                    ::buffa::encoding::Tag::new(
9306                            104u32,
9307                            ::buffa::encoding::WireType::LengthDelimited,
9308                        )
9309                        .encode(buf);
9310                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
9311                    self.databricks_gcp_service_account.write_to(__cache, buf);
9312                }
9313                self.__buffa_unknown_fields.write_to(buf);
9314            }
9315        }
9316        /// Serializes this view as protobuf JSON.
9317        ///
9318        /// Implicit-presence fields with default values are omitted, `required`
9319        /// fields are always emitted, explicit-presence (`optional`) fields are
9320        /// emitted only when set, bytes fields are base64-encoded, and enum
9321        /// values are their proto name strings.
9322        ///
9323        /// This impl uses `serialize_map(None)` because the number of emitted
9324        /// fields depends on default-omission rules; serializers that require
9325        /// known map lengths (e.g. `bincode`) will return a runtime error.
9326        /// Use the owned message type for those formats.
9327        impl<'__a> ::serde::Serialize for CreateCredentialRequestView<'__a> {
9328            fn serialize<__S: ::serde::Serializer>(
9329                &self,
9330                __s: __S,
9331            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9332                use ::serde::ser::SerializeMap as _;
9333                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9334                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
9335                    __map.serialize_entry("name", self.name)?;
9336                }
9337                if !::buffa::json_helpers::skip_if::is_default_enum_value(
9338                    &self.purpose,
9339                ) {
9340                    __map.serialize_entry("purpose", &self.purpose)?;
9341                }
9342                if let ::core::option::Option::Some(__v) = self.comment {
9343                    __map.serialize_entry("comment", __v)?;
9344                }
9345                if let ::core::option::Option::Some(__v) = self.read_only {
9346                    __map.serialize_entry("read_only", &__v)?;
9347                }
9348                if let ::core::option::Option::Some(__v) = self.skip_validation {
9349                    __map.serialize_entry("skip_validation", &__v)?;
9350                }
9351                {
9352                    if let ::core::option::Option::Some(__v) = self
9353                        .azure_service_principal
9354                        .as_option()
9355                    {
9356                        __map.serialize_entry("azure_service_principal", __v)?;
9357                    }
9358                }
9359                {
9360                    if let ::core::option::Option::Some(__v) = self
9361                        .azure_managed_identity
9362                        .as_option()
9363                    {
9364                        __map.serialize_entry("azure_managed_identity", __v)?;
9365                    }
9366                }
9367                {
9368                    if let ::core::option::Option::Some(__v) = self
9369                        .azure_storage_key
9370                        .as_option()
9371                    {
9372                        __map.serialize_entry("azure_storage_key", __v)?;
9373                    }
9374                }
9375                {
9376                    if let ::core::option::Option::Some(__v) = self
9377                        .aws_iam_role
9378                        .as_option()
9379                    {
9380                        __map.serialize_entry("aws_iam_role", __v)?;
9381                    }
9382                }
9383                {
9384                    if let ::core::option::Option::Some(__v) = self
9385                        .databricks_gcp_service_account
9386                        .as_option()
9387                    {
9388                        __map.serialize_entry("databricks_gcp_service_account", __v)?;
9389                    }
9390                }
9391                __map.end()
9392            }
9393        }
9394        impl<'a> ::buffa::MessageName for CreateCredentialRequestView<'a> {
9395            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
9396            const NAME: &'static str = "CreateCredentialRequest";
9397            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.CreateCredentialRequest";
9398            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.CreateCredentialRequest";
9399        }
9400        impl<'v> ::buffa::DefaultViewInstance for CreateCredentialRequestView<'v> {
9401            fn default_view_instance<'a>() -> &'a Self
9402            where
9403                Self: 'a,
9404            {
9405                static VALUE: ::buffa::__private::OnceBox<
9406                    CreateCredentialRequestView<'static>,
9407                > = ::buffa::__private::OnceBox::new();
9408                VALUE
9409                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9410                        <CreateCredentialRequestView<'static>>::default(),
9411                    ))
9412            }
9413        }
9414        impl ::buffa::ViewReborrow for CreateCredentialRequestView<'static> {
9415            type Reborrowed<'b> = CreateCredentialRequestView<'b>;
9416            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9417                this
9418            }
9419        }
9420        /** Self-contained, `'static` owned view of a `CreateCredentialRequest` message.
9421
9422 Wraps [`::buffa::OwnedView`]`<`[`CreateCredentialRequestView`]`<'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.
9423
9424 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateCredentialRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9425        #[derive(Clone, Debug)]
9426        pub struct CreateCredentialRequestOwnedView(
9427            ::buffa::OwnedView<CreateCredentialRequestView<'static>>,
9428        );
9429        impl CreateCredentialRequestOwnedView {
9430            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9431            ///
9432            /// The view borrows directly from the buffer's data; the buffer is
9433            /// retained inside the returned handle.
9434            ///
9435            /// # Errors
9436            ///
9437            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9438            /// protobuf data.
9439            pub fn decode(
9440                bytes: ::buffa::bytes::Bytes,
9441            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9442                ::core::result::Result::Ok(
9443                    CreateCredentialRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9444                )
9445            }
9446            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9447            /// max message size).
9448            ///
9449            /// # Errors
9450            ///
9451            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9452            /// exceeds the configured limits.
9453            pub fn decode_with_options(
9454                bytes: ::buffa::bytes::Bytes,
9455                opts: &::buffa::DecodeOptions,
9456            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9457                ::core::result::Result::Ok(
9458                    CreateCredentialRequestOwnedView(
9459                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9460                    ),
9461                )
9462            }
9463            /// Build from an owned message via an encode → decode round-trip.
9464            ///
9465            /// # Errors
9466            ///
9467            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9468            /// somehow invalid (should not happen for well-formed messages).
9469            pub fn from_owned(
9470                msg: &super::super::CreateCredentialRequest,
9471            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9472                ::core::result::Result::Ok(
9473                    CreateCredentialRequestOwnedView(
9474                        ::buffa::OwnedView::from_owned(msg)?,
9475                    ),
9476                )
9477            }
9478            /// Borrow the full [`CreateCredentialRequestView`] with its lifetime tied to `&self`.
9479            #[must_use]
9480            pub fn view(&self) -> &CreateCredentialRequestView<'_> {
9481                self.0.reborrow()
9482            }
9483            /// Convert to the owned message type.
9484            #[must_use]
9485            pub fn to_owned_message(&self) -> super::super::CreateCredentialRequest {
9486                self.0.to_owned_message()
9487            }
9488            /// The underlying bytes buffer.
9489            #[must_use]
9490            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9491                self.0.bytes()
9492            }
9493            /// Consume the handle, returning the underlying bytes buffer.
9494            #[must_use]
9495            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9496                self.0.into_bytes()
9497            }
9498            /// The credential name. The name must be unique among storage and service credentials within the metastore.
9499            ///
9500            /// Field 1: `name`
9501            #[must_use]
9502            pub fn name(&self) -> &'_ str {
9503                self.0.reborrow().name
9504            }
9505            /// Indicates the purpose of the credential.
9506            ///
9507            /// Field 2: `purpose`
9508            #[must_use]
9509            pub fn purpose(&self) -> ::buffa::EnumValue<super::super::Purpose> {
9510                self.0.reborrow().purpose
9511            }
9512            /// Comment associated with the credential.
9513            ///
9514            /// Field 3: `comment`
9515            #[must_use]
9516            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
9517                self.0.reborrow().comment
9518            }
9519            /// Whether the credential is usable only for read operations. Only applicable when purpose is STORAGE.
9520            ///
9521            /// Field 4: `read_only`
9522            #[must_use]
9523            pub fn read_only(&self) -> ::core::option::Option<bool> {
9524                self.0.reborrow().read_only
9525            }
9526            /// Optional. Supplying true to this argument skips validation of the created set of credentials.
9527            ///
9528            /// Field 5: `skip_validation`
9529            #[must_use]
9530            pub fn skip_validation(&self) -> ::core::option::Option<bool> {
9531                self.0.reborrow().skip_validation
9532            }
9533            /// The Azure service principal configuration.
9534            ///
9535            /// Field 100: `azure_service_principal`
9536            #[must_use]
9537            pub fn azure_service_principal(
9538                &self,
9539            ) -> &::buffa::MessageFieldView<
9540                super::super::__buffa::view::AzureServicePrincipalView<'_>,
9541            > {
9542                &self.0.reborrow().azure_service_principal
9543            }
9544            /// The Azure managed identity configuration.
9545            ///
9546            /// Field 101: `azure_managed_identity`
9547            #[must_use]
9548            pub fn azure_managed_identity(
9549                &self,
9550            ) -> &::buffa::MessageFieldView<
9551                super::super::__buffa::view::AzureManagedIdentityView<'_>,
9552            > {
9553                &self.0.reborrow().azure_managed_identity
9554            }
9555            /// The Azure storage key configuration.
9556            ///
9557            /// Field 102: `azure_storage_key`
9558            #[must_use]
9559            pub fn azure_storage_key(
9560                &self,
9561            ) -> &::buffa::MessageFieldView<
9562                super::super::__buffa::view::AzureStorageKeyView<'_>,
9563            > {
9564                &self.0.reborrow().azure_storage_key
9565            }
9566            /// The AWS IAM role configuration.
9567            ///
9568            /// Field 103: `aws_iam_role`
9569            #[must_use]
9570            pub fn aws_iam_role(
9571                &self,
9572            ) -> &::buffa::MessageFieldView<
9573                super::super::__buffa::view::AwsIamRoleConfigView<'_>,
9574            > {
9575                &self.0.reborrow().aws_iam_role
9576            }
9577            /// The Databricks managed GCP service account configuration.
9578            ///
9579            /// Field 104: `databricks_gcp_service_account`
9580            #[must_use]
9581            pub fn databricks_gcp_service_account(
9582                &self,
9583            ) -> &::buffa::MessageFieldView<
9584                super::super::__buffa::view::DatabricksGcpServiceAccountView<'_>,
9585            > {
9586                &self.0.reborrow().databricks_gcp_service_account
9587            }
9588        }
9589        impl ::core::convert::From<
9590            ::buffa::OwnedView<CreateCredentialRequestView<'static>>,
9591        > for CreateCredentialRequestOwnedView {
9592            fn from(
9593                inner: ::buffa::OwnedView<CreateCredentialRequestView<'static>>,
9594            ) -> Self {
9595                CreateCredentialRequestOwnedView(inner)
9596            }
9597        }
9598        impl ::core::convert::From<CreateCredentialRequestOwnedView>
9599        for ::buffa::OwnedView<CreateCredentialRequestView<'static>> {
9600            fn from(wrapper: CreateCredentialRequestOwnedView) -> Self {
9601                wrapper.0
9602            }
9603        }
9604        impl ::core::convert::AsRef<
9605            ::buffa::OwnedView<CreateCredentialRequestView<'static>>,
9606        > for CreateCredentialRequestOwnedView {
9607            fn as_ref(
9608                &self,
9609            ) -> &::buffa::OwnedView<CreateCredentialRequestView<'static>> {
9610                &self.0
9611            }
9612        }
9613        impl ::buffa::HasMessageView for super::super::CreateCredentialRequest {
9614            type View<'a> = CreateCredentialRequestView<'a>;
9615            type ViewHandle = CreateCredentialRequestOwnedView;
9616        }
9617        impl ::serde::Serialize for CreateCredentialRequestOwnedView {
9618            fn serialize<__S: ::serde::Serializer>(
9619                &self,
9620                __s: __S,
9621            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9622                ::serde::Serialize::serialize(&self.0, __s)
9623            }
9624        }
9625        /// Get a credential.
9626        #[derive(Clone, Debug, Default)]
9627        pub struct GetCredentialRequestView<'a> {
9628            /// Name of credential.
9629            ///
9630            /// Field 1: `name`
9631            pub name: &'a str,
9632            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9633        }
9634        impl<'a> GetCredentialRequestView<'a> {
9635            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9636            ///
9637            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9638            /// and by generated sub-message decode arms with `depth - 1`.
9639            ///
9640            /// **Not part of the public API.** Named with a leading underscore to
9641            /// signal that it is for generated-code use only.
9642            #[doc(hidden)]
9643            pub fn _decode_depth(
9644                buf: &'a [u8],
9645                depth: u32,
9646            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9647                let mut view = Self::default();
9648                view._merge_into_view(buf, depth)?;
9649                ::core::result::Result::Ok(view)
9650            }
9651            /// Merge fields from `buf` into this view (proto merge semantics).
9652            ///
9653            /// Repeated fields append; singular fields last-wins; singular
9654            /// MESSAGE fields merge recursively. Used by sub-message decode
9655            /// arms when the same field appears multiple times on the wire.
9656            ///
9657            /// **Not part of the public API.**
9658            #[doc(hidden)]
9659            pub fn _merge_into_view(
9660                &mut self,
9661                buf: &'a [u8],
9662                depth: u32,
9663            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
9664                let _ = depth;
9665                #[allow(unused_variables)]
9666                let view = self;
9667                let mut cur: &'a [u8] = buf;
9668                while !cur.is_empty() {
9669                    let before_tag = cur;
9670                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
9671                    match tag.field_number() {
9672                        1u32 => {
9673                            if tag.wire_type()
9674                                != ::buffa::encoding::WireType::LengthDelimited
9675                            {
9676                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
9677                                    field_number: 1u32,
9678                                    expected: 2u8,
9679                                    actual: tag.wire_type() as u8,
9680                                });
9681                            }
9682                            view.name = ::buffa::types::borrow_str(&mut cur)?;
9683                        }
9684                        _ => {
9685                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
9686                            let span_len = before_tag.len() - cur.len();
9687                            view.__buffa_unknown_fields
9688                                .push_raw(&before_tag[..span_len]);
9689                        }
9690                    }
9691                }
9692                ::core::result::Result::Ok(())
9693            }
9694        }
9695        impl<'a> ::buffa::MessageView<'a> for GetCredentialRequestView<'a> {
9696            type Owned = super::super::GetCredentialRequest;
9697            fn decode_view(
9698                buf: &'a [u8],
9699            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9700                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
9701            }
9702            fn decode_view_with_limit(
9703                buf: &'a [u8],
9704                depth: u32,
9705            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9706                Self::_decode_depth(buf, depth)
9707            }
9708            fn to_owned_message(&self) -> super::super::GetCredentialRequest {
9709                self.to_owned_from_source(None)
9710            }
9711            #[allow(clippy::useless_conversion, clippy::needless_update)]
9712            fn to_owned_from_source(
9713                &self,
9714                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9715            ) -> super::super::GetCredentialRequest {
9716                #[allow(unused_imports)]
9717                use ::buffa::alloc::string::ToString as _;
9718                let _ = __buffa_src;
9719                super::super::GetCredentialRequest {
9720                    name: self.name.to_string(),
9721                    __buffa_unknown_fields: self
9722                        .__buffa_unknown_fields
9723                        .to_owned()
9724                        .unwrap_or_default()
9725                        .into(),
9726                    ..::core::default::Default::default()
9727                }
9728            }
9729        }
9730        impl<'a> ::buffa::ViewEncode<'a> for GetCredentialRequestView<'a> {
9731            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9732            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9733                #[allow(unused_imports)]
9734                use ::buffa::Enumeration as _;
9735                let mut size = 0u32;
9736                if !self.name.is_empty() {
9737                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
9738                }
9739                size += self.__buffa_unknown_fields.encoded_len() as u32;
9740                size
9741            }
9742            #[allow(clippy::needless_borrow)]
9743            fn write_to(
9744                &self,
9745                _cache: &mut ::buffa::SizeCache,
9746                buf: &mut impl ::buffa::bytes::BufMut,
9747            ) {
9748                #[allow(unused_imports)]
9749                use ::buffa::Enumeration as _;
9750                if !self.name.is_empty() {
9751                    ::buffa::encoding::Tag::new(
9752                            1u32,
9753                            ::buffa::encoding::WireType::LengthDelimited,
9754                        )
9755                        .encode(buf);
9756                    ::buffa::types::encode_string(&self.name, buf);
9757                }
9758                self.__buffa_unknown_fields.write_to(buf);
9759            }
9760        }
9761        /// Serializes this view as protobuf JSON.
9762        ///
9763        /// Implicit-presence fields with default values are omitted, `required`
9764        /// fields are always emitted, explicit-presence (`optional`) fields are
9765        /// emitted only when set, bytes fields are base64-encoded, and enum
9766        /// values are their proto name strings.
9767        ///
9768        /// This impl uses `serialize_map(None)` because the number of emitted
9769        /// fields depends on default-omission rules; serializers that require
9770        /// known map lengths (e.g. `bincode`) will return a runtime error.
9771        /// Use the owned message type for those formats.
9772        impl<'__a> ::serde::Serialize for GetCredentialRequestView<'__a> {
9773            fn serialize<__S: ::serde::Serializer>(
9774                &self,
9775                __s: __S,
9776            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9777                use ::serde::ser::SerializeMap as _;
9778                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9779                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
9780                    __map.serialize_entry("name", self.name)?;
9781                }
9782                __map.end()
9783            }
9784        }
9785        impl<'a> ::buffa::MessageName for GetCredentialRequestView<'a> {
9786            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
9787            const NAME: &'static str = "GetCredentialRequest";
9788            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.GetCredentialRequest";
9789            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.GetCredentialRequest";
9790        }
9791        impl<'v> ::buffa::DefaultViewInstance for GetCredentialRequestView<'v> {
9792            fn default_view_instance<'a>() -> &'a Self
9793            where
9794                Self: 'a,
9795            {
9796                static VALUE: ::buffa::__private::OnceBox<
9797                    GetCredentialRequestView<'static>,
9798                > = ::buffa::__private::OnceBox::new();
9799                VALUE
9800                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
9801                        <GetCredentialRequestView<'static>>::default(),
9802                    ))
9803            }
9804        }
9805        impl ::buffa::ViewReborrow for GetCredentialRequestView<'static> {
9806            type Reborrowed<'b> = GetCredentialRequestView<'b>;
9807            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
9808                this
9809            }
9810        }
9811        /** Self-contained, `'static` owned view of a `GetCredentialRequest` message.
9812
9813 Wraps [`::buffa::OwnedView`]`<`[`GetCredentialRequestView`]`<'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.
9814
9815 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetCredentialRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9816        #[derive(Clone, Debug)]
9817        pub struct GetCredentialRequestOwnedView(
9818            ::buffa::OwnedView<GetCredentialRequestView<'static>>,
9819        );
9820        impl GetCredentialRequestOwnedView {
9821            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9822            ///
9823            /// The view borrows directly from the buffer's data; the buffer is
9824            /// retained inside the returned handle.
9825            ///
9826            /// # Errors
9827            ///
9828            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9829            /// protobuf data.
9830            pub fn decode(
9831                bytes: ::buffa::bytes::Bytes,
9832            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9833                ::core::result::Result::Ok(
9834                    GetCredentialRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9835                )
9836            }
9837            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9838            /// max message size).
9839            ///
9840            /// # Errors
9841            ///
9842            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9843            /// exceeds the configured limits.
9844            pub fn decode_with_options(
9845                bytes: ::buffa::bytes::Bytes,
9846                opts: &::buffa::DecodeOptions,
9847            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9848                ::core::result::Result::Ok(
9849                    GetCredentialRequestOwnedView(
9850                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9851                    ),
9852                )
9853            }
9854            /// Build from an owned message via an encode → decode round-trip.
9855            ///
9856            /// # Errors
9857            ///
9858            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9859            /// somehow invalid (should not happen for well-formed messages).
9860            pub fn from_owned(
9861                msg: &super::super::GetCredentialRequest,
9862            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9863                ::core::result::Result::Ok(
9864                    GetCredentialRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9865                )
9866            }
9867            /// Borrow the full [`GetCredentialRequestView`] with its lifetime tied to `&self`.
9868            #[must_use]
9869            pub fn view(&self) -> &GetCredentialRequestView<'_> {
9870                self.0.reborrow()
9871            }
9872            /// Convert to the owned message type.
9873            #[must_use]
9874            pub fn to_owned_message(&self) -> super::super::GetCredentialRequest {
9875                self.0.to_owned_message()
9876            }
9877            /// The underlying bytes buffer.
9878            #[must_use]
9879            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9880                self.0.bytes()
9881            }
9882            /// Consume the handle, returning the underlying bytes buffer.
9883            #[must_use]
9884            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9885                self.0.into_bytes()
9886            }
9887            /// Name of credential.
9888            ///
9889            /// Field 1: `name`
9890            #[must_use]
9891            pub fn name(&self) -> &'_ str {
9892                self.0.reborrow().name
9893            }
9894        }
9895        impl ::core::convert::From<::buffa::OwnedView<GetCredentialRequestView<'static>>>
9896        for GetCredentialRequestOwnedView {
9897            fn from(
9898                inner: ::buffa::OwnedView<GetCredentialRequestView<'static>>,
9899            ) -> Self {
9900                GetCredentialRequestOwnedView(inner)
9901            }
9902        }
9903        impl ::core::convert::From<GetCredentialRequestOwnedView>
9904        for ::buffa::OwnedView<GetCredentialRequestView<'static>> {
9905            fn from(wrapper: GetCredentialRequestOwnedView) -> Self {
9906                wrapper.0
9907            }
9908        }
9909        impl ::core::convert::AsRef<
9910            ::buffa::OwnedView<GetCredentialRequestView<'static>>,
9911        > for GetCredentialRequestOwnedView {
9912            fn as_ref(&self) -> &::buffa::OwnedView<GetCredentialRequestView<'static>> {
9913                &self.0
9914            }
9915        }
9916        impl ::buffa::HasMessageView for super::super::GetCredentialRequest {
9917            type View<'a> = GetCredentialRequestView<'a>;
9918            type ViewHandle = GetCredentialRequestOwnedView;
9919        }
9920        impl ::serde::Serialize for GetCredentialRequestOwnedView {
9921            fn serialize<__S: ::serde::Serializer>(
9922                &self,
9923                __s: __S,
9924            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9925                ::serde::Serialize::serialize(&self.0, __s)
9926            }
9927        }
9928        /// Update a credential.
9929        #[derive(Clone, Debug, Default)]
9930        pub struct UpdateCredentialRequestView<'a> {
9931            /// Name of credential.
9932            ///
9933            /// Field 1: `name`
9934            pub name: &'a str,
9935            /// New name of the credential.
9936            ///
9937            /// Field 2: `new_name`
9938            pub new_name: ::core::option::Option<&'a str>,
9939            /// Comment associated with the credential.
9940            ///
9941            /// Field 3: `comment`
9942            pub comment: ::core::option::Option<&'a str>,
9943            /// Whether the credential is usable only for read operations. Only applicable when purpose is STORAGE.
9944            ///
9945            /// Field 4: `read_only`
9946            pub read_only: ::core::option::Option<bool>,
9947            /// Username of current owner of credential.
9948            ///
9949            /// Field 5: `owner`
9950            pub owner: ::core::option::Option<&'a str>,
9951            /// Supply true to this argument to skip validation of the updated credential.
9952            ///
9953            /// Field 6: `skip_validation`
9954            pub skip_validation: ::core::option::Option<bool>,
9955            /// Force an update even if there are dependent services (when purpose is SERVICE)
9956            /// or dependent external locations and external tables (when purpose is STORAGE).
9957            ///
9958            /// Field 7: `force`
9959            pub force: ::core::option::Option<bool>,
9960            /// The Azure service principal configuration.
9961            ///
9962            /// Field 100: `azure_service_principal`
9963            pub azure_service_principal: ::buffa::MessageFieldView<
9964                super::super::__buffa::view::AzureServicePrincipalView<'a>,
9965            >,
9966            /// The Azure managed identity configuration.
9967            ///
9968            /// Field 101: `azure_managed_identity`
9969            pub azure_managed_identity: ::buffa::MessageFieldView<
9970                super::super::__buffa::view::AzureManagedIdentityView<'a>,
9971            >,
9972            /// The Azure storage key configuration.
9973            ///
9974            /// Field 102: `azure_storage_key`
9975            pub azure_storage_key: ::buffa::MessageFieldView<
9976                super::super::__buffa::view::AzureStorageKeyView<'a>,
9977            >,
9978            /// The AWS IAM role configuration.
9979            ///
9980            /// Field 103: `aws_iam_role`
9981            pub aws_iam_role: ::buffa::MessageFieldView<
9982                super::super::__buffa::view::AwsIamRoleConfigView<'a>,
9983            >,
9984            /// The Databricks managed GCP service account configuration.
9985            ///
9986            /// Field 104: `databricks_gcp_service_account`
9987            pub databricks_gcp_service_account: ::buffa::MessageFieldView<
9988                super::super::__buffa::view::DatabricksGcpServiceAccountView<'a>,
9989            >,
9990            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9991        }
9992        impl<'a> UpdateCredentialRequestView<'a> {
9993            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
9994            ///
9995            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
9996            /// and by generated sub-message decode arms with `depth - 1`.
9997            ///
9998            /// **Not part of the public API.** Named with a leading underscore to
9999            /// signal that it is for generated-code use only.
10000            #[doc(hidden)]
10001            pub fn _decode_depth(
10002                buf: &'a [u8],
10003                depth: u32,
10004            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10005                let mut view = Self::default();
10006                view._merge_into_view(buf, depth)?;
10007                ::core::result::Result::Ok(view)
10008            }
10009            /// Merge fields from `buf` into this view (proto merge semantics).
10010            ///
10011            /// Repeated fields append; singular fields last-wins; singular
10012            /// MESSAGE fields merge recursively. Used by sub-message decode
10013            /// arms when the same field appears multiple times on the wire.
10014            ///
10015            /// **Not part of the public API.**
10016            #[doc(hidden)]
10017            pub fn _merge_into_view(
10018                &mut self,
10019                buf: &'a [u8],
10020                depth: u32,
10021            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
10022                let _ = depth;
10023                #[allow(unused_variables)]
10024                let view = self;
10025                let mut cur: &'a [u8] = buf;
10026                while !cur.is_empty() {
10027                    let before_tag = cur;
10028                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
10029                    match tag.field_number() {
10030                        1u32 => {
10031                            if tag.wire_type()
10032                                != ::buffa::encoding::WireType::LengthDelimited
10033                            {
10034                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10035                                    field_number: 1u32,
10036                                    expected: 2u8,
10037                                    actual: tag.wire_type() as u8,
10038                                });
10039                            }
10040                            view.name = ::buffa::types::borrow_str(&mut cur)?;
10041                        }
10042                        2u32 => {
10043                            if tag.wire_type()
10044                                != ::buffa::encoding::WireType::LengthDelimited
10045                            {
10046                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10047                                    field_number: 2u32,
10048                                    expected: 2u8,
10049                                    actual: tag.wire_type() as u8,
10050                                });
10051                            }
10052                            view.new_name = Some(::buffa::types::borrow_str(&mut cur)?);
10053                        }
10054                        3u32 => {
10055                            if tag.wire_type()
10056                                != ::buffa::encoding::WireType::LengthDelimited
10057                            {
10058                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10059                                    field_number: 3u32,
10060                                    expected: 2u8,
10061                                    actual: tag.wire_type() as u8,
10062                                });
10063                            }
10064                            view.comment = Some(::buffa::types::borrow_str(&mut cur)?);
10065                        }
10066                        4u32 => {
10067                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10068                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10069                                    field_number: 4u32,
10070                                    expected: 0u8,
10071                                    actual: tag.wire_type() as u8,
10072                                });
10073                            }
10074                            view.read_only = Some(
10075                                ::buffa::types::decode_bool(&mut cur)?,
10076                            );
10077                        }
10078                        5u32 => {
10079                            if tag.wire_type()
10080                                != ::buffa::encoding::WireType::LengthDelimited
10081                            {
10082                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10083                                    field_number: 5u32,
10084                                    expected: 2u8,
10085                                    actual: tag.wire_type() as u8,
10086                                });
10087                            }
10088                            view.owner = Some(::buffa::types::borrow_str(&mut cur)?);
10089                        }
10090                        6u32 => {
10091                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10092                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10093                                    field_number: 6u32,
10094                                    expected: 0u8,
10095                                    actual: tag.wire_type() as u8,
10096                                });
10097                            }
10098                            view.skip_validation = Some(
10099                                ::buffa::types::decode_bool(&mut cur)?,
10100                            );
10101                        }
10102                        7u32 => {
10103                            if tag.wire_type() != ::buffa::encoding::WireType::Varint {
10104                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10105                                    field_number: 7u32,
10106                                    expected: 0u8,
10107                                    actual: tag.wire_type() as u8,
10108                                });
10109                            }
10110                            view.force = Some(::buffa::types::decode_bool(&mut cur)?);
10111                        }
10112                        100u32 => {
10113                            if tag.wire_type()
10114                                != ::buffa::encoding::WireType::LengthDelimited
10115                            {
10116                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10117                                    field_number: 100u32,
10118                                    expected: 2u8,
10119                                    actual: tag.wire_type() as u8,
10120                                });
10121                            }
10122                            if depth == 0 {
10123                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10124                            }
10125                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10126                            match view.azure_service_principal.as_mut() {
10127                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
10128                                None => {
10129                                    view.azure_service_principal = ::buffa::MessageFieldView::set(
10130                                        super::super::__buffa::view::AzureServicePrincipalView::_decode_depth(
10131                                            sub,
10132                                            depth - 1,
10133                                        )?,
10134                                    );
10135                                }
10136                            }
10137                        }
10138                        101u32 => {
10139                            if tag.wire_type()
10140                                != ::buffa::encoding::WireType::LengthDelimited
10141                            {
10142                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10143                                    field_number: 101u32,
10144                                    expected: 2u8,
10145                                    actual: tag.wire_type() as u8,
10146                                });
10147                            }
10148                            if depth == 0 {
10149                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10150                            }
10151                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10152                            match view.azure_managed_identity.as_mut() {
10153                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
10154                                None => {
10155                                    view.azure_managed_identity = ::buffa::MessageFieldView::set(
10156                                        super::super::__buffa::view::AzureManagedIdentityView::_decode_depth(
10157                                            sub,
10158                                            depth - 1,
10159                                        )?,
10160                                    );
10161                                }
10162                            }
10163                        }
10164                        102u32 => {
10165                            if tag.wire_type()
10166                                != ::buffa::encoding::WireType::LengthDelimited
10167                            {
10168                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10169                                    field_number: 102u32,
10170                                    expected: 2u8,
10171                                    actual: tag.wire_type() as u8,
10172                                });
10173                            }
10174                            if depth == 0 {
10175                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10176                            }
10177                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10178                            match view.azure_storage_key.as_mut() {
10179                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
10180                                None => {
10181                                    view.azure_storage_key = ::buffa::MessageFieldView::set(
10182                                        super::super::__buffa::view::AzureStorageKeyView::_decode_depth(
10183                                            sub,
10184                                            depth - 1,
10185                                        )?,
10186                                    );
10187                                }
10188                            }
10189                        }
10190                        103u32 => {
10191                            if tag.wire_type()
10192                                != ::buffa::encoding::WireType::LengthDelimited
10193                            {
10194                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10195                                    field_number: 103u32,
10196                                    expected: 2u8,
10197                                    actual: tag.wire_type() as u8,
10198                                });
10199                            }
10200                            if depth == 0 {
10201                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10202                            }
10203                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10204                            match view.aws_iam_role.as_mut() {
10205                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
10206                                None => {
10207                                    view.aws_iam_role = ::buffa::MessageFieldView::set(
10208                                        super::super::__buffa::view::AwsIamRoleConfigView::_decode_depth(
10209                                            sub,
10210                                            depth - 1,
10211                                        )?,
10212                                    );
10213                                }
10214                            }
10215                        }
10216                        104u32 => {
10217                            if tag.wire_type()
10218                                != ::buffa::encoding::WireType::LengthDelimited
10219                            {
10220                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10221                                    field_number: 104u32,
10222                                    expected: 2u8,
10223                                    actual: tag.wire_type() as u8,
10224                                });
10225                            }
10226                            if depth == 0 {
10227                                return Err(::buffa::DecodeError::RecursionLimitExceeded);
10228                            }
10229                            let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10230                            match view.databricks_gcp_service_account.as_mut() {
10231                                Some(existing) => existing._merge_into_view(sub, depth - 1)?,
10232                                None => {
10233                                    view.databricks_gcp_service_account = ::buffa::MessageFieldView::set(
10234                                        super::super::__buffa::view::DatabricksGcpServiceAccountView::_decode_depth(
10235                                            sub,
10236                                            depth - 1,
10237                                        )?,
10238                                    );
10239                                }
10240                            }
10241                        }
10242                        _ => {
10243                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
10244                            let span_len = before_tag.len() - cur.len();
10245                            view.__buffa_unknown_fields
10246                                .push_raw(&before_tag[..span_len]);
10247                        }
10248                    }
10249                }
10250                ::core::result::Result::Ok(())
10251            }
10252        }
10253        impl<'a> ::buffa::MessageView<'a> for UpdateCredentialRequestView<'a> {
10254            type Owned = super::super::UpdateCredentialRequest;
10255            fn decode_view(
10256                buf: &'a [u8],
10257            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10258                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
10259            }
10260            fn decode_view_with_limit(
10261                buf: &'a [u8],
10262                depth: u32,
10263            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10264                Self::_decode_depth(buf, depth)
10265            }
10266            fn to_owned_message(&self) -> super::super::UpdateCredentialRequest {
10267                self.to_owned_from_source(None)
10268            }
10269            #[allow(clippy::useless_conversion, clippy::needless_update)]
10270            fn to_owned_from_source(
10271                &self,
10272                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10273            ) -> super::super::UpdateCredentialRequest {
10274                #[allow(unused_imports)]
10275                use ::buffa::alloc::string::ToString as _;
10276                let _ = __buffa_src;
10277                super::super::UpdateCredentialRequest {
10278                    name: self.name.to_string(),
10279                    new_name: self.new_name.map(|s| s.to_string()),
10280                    comment: self.comment.map(|s| s.to_string()),
10281                    read_only: self.read_only,
10282                    owner: self.owner.map(|s| s.to_string()),
10283                    skip_validation: self.skip_validation,
10284                    force: self.force,
10285                    azure_service_principal: match self
10286                        .azure_service_principal
10287                        .as_option()
10288                    {
10289                        Some(v) => {
10290                            ::buffa::MessageField::<
10291                                super::super::AzureServicePrincipal,
10292                            >::some(v.to_owned_from_source(__buffa_src))
10293                        }
10294                        None => ::buffa::MessageField::none(),
10295                    },
10296                    azure_managed_identity: match self.azure_managed_identity.as_option()
10297                    {
10298                        Some(v) => {
10299                            ::buffa::MessageField::<
10300                                super::super::AzureManagedIdentity,
10301                            >::some(v.to_owned_from_source(__buffa_src))
10302                        }
10303                        None => ::buffa::MessageField::none(),
10304                    },
10305                    azure_storage_key: match self.azure_storage_key.as_option() {
10306                        Some(v) => {
10307                            ::buffa::MessageField::<
10308                                super::super::AzureStorageKey,
10309                            >::some(v.to_owned_from_source(__buffa_src))
10310                        }
10311                        None => ::buffa::MessageField::none(),
10312                    },
10313                    aws_iam_role: match self.aws_iam_role.as_option() {
10314                        Some(v) => {
10315                            ::buffa::MessageField::<
10316                                super::super::AwsIamRoleConfig,
10317                            >::some(v.to_owned_from_source(__buffa_src))
10318                        }
10319                        None => ::buffa::MessageField::none(),
10320                    },
10321                    databricks_gcp_service_account: match self
10322                        .databricks_gcp_service_account
10323                        .as_option()
10324                    {
10325                        Some(v) => {
10326                            ::buffa::MessageField::<
10327                                super::super::DatabricksGcpServiceAccount,
10328                            >::some(v.to_owned_from_source(__buffa_src))
10329                        }
10330                        None => ::buffa::MessageField::none(),
10331                    },
10332                    __buffa_unknown_fields: self
10333                        .__buffa_unknown_fields
10334                        .to_owned()
10335                        .unwrap_or_default()
10336                        .into(),
10337                    ..::core::default::Default::default()
10338                }
10339            }
10340        }
10341        impl<'a> ::buffa::ViewEncode<'a> for UpdateCredentialRequestView<'a> {
10342            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10343            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10344                #[allow(unused_imports)]
10345                use ::buffa::Enumeration as _;
10346                let mut size = 0u32;
10347                if !self.name.is_empty() {
10348                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
10349                }
10350                if let Some(ref v) = self.new_name {
10351                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
10352                }
10353                if let Some(ref v) = self.comment {
10354                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
10355                }
10356                if self.read_only.is_some() {
10357                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10358                }
10359                if let Some(ref v) = self.owner {
10360                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
10361                }
10362                if self.skip_validation.is_some() {
10363                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10364                }
10365                if self.force.is_some() {
10366                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
10367                }
10368                if self.azure_service_principal.is_set() {
10369                    let __slot = __cache.reserve();
10370                    let inner_size = self.azure_service_principal.compute_size(__cache);
10371                    __cache.set(__slot, inner_size);
10372                    size
10373                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10374                            + inner_size;
10375                }
10376                if self.azure_managed_identity.is_set() {
10377                    let __slot = __cache.reserve();
10378                    let inner_size = self.azure_managed_identity.compute_size(__cache);
10379                    __cache.set(__slot, inner_size);
10380                    size
10381                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10382                            + inner_size;
10383                }
10384                if self.azure_storage_key.is_set() {
10385                    let __slot = __cache.reserve();
10386                    let inner_size = self.azure_storage_key.compute_size(__cache);
10387                    __cache.set(__slot, inner_size);
10388                    size
10389                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10390                            + inner_size;
10391                }
10392                if self.aws_iam_role.is_set() {
10393                    let __slot = __cache.reserve();
10394                    let inner_size = self.aws_iam_role.compute_size(__cache);
10395                    __cache.set(__slot, inner_size);
10396                    size
10397                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10398                            + inner_size;
10399                }
10400                if self.databricks_gcp_service_account.is_set() {
10401                    let __slot = __cache.reserve();
10402                    let inner_size = self
10403                        .databricks_gcp_service_account
10404                        .compute_size(__cache);
10405                    __cache.set(__slot, inner_size);
10406                    size
10407                        += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10408                            + inner_size;
10409                }
10410                size += self.__buffa_unknown_fields.encoded_len() as u32;
10411                size
10412            }
10413            #[allow(clippy::needless_borrow)]
10414            fn write_to(
10415                &self,
10416                __cache: &mut ::buffa::SizeCache,
10417                buf: &mut impl ::buffa::bytes::BufMut,
10418            ) {
10419                #[allow(unused_imports)]
10420                use ::buffa::Enumeration as _;
10421                if !self.name.is_empty() {
10422                    ::buffa::encoding::Tag::new(
10423                            1u32,
10424                            ::buffa::encoding::WireType::LengthDelimited,
10425                        )
10426                        .encode(buf);
10427                    ::buffa::types::encode_string(&self.name, buf);
10428                }
10429                if let Some(ref v) = self.new_name {
10430                    ::buffa::encoding::Tag::new(
10431                            2u32,
10432                            ::buffa::encoding::WireType::LengthDelimited,
10433                        )
10434                        .encode(buf);
10435                    ::buffa::types::encode_string(v, buf);
10436                }
10437                if let Some(ref v) = self.comment {
10438                    ::buffa::encoding::Tag::new(
10439                            3u32,
10440                            ::buffa::encoding::WireType::LengthDelimited,
10441                        )
10442                        .encode(buf);
10443                    ::buffa::types::encode_string(v, buf);
10444                }
10445                if let Some(v) = self.read_only {
10446                    ::buffa::encoding::Tag::new(
10447                            4u32,
10448                            ::buffa::encoding::WireType::Varint,
10449                        )
10450                        .encode(buf);
10451                    ::buffa::types::encode_bool(v, buf);
10452                }
10453                if let Some(ref v) = self.owner {
10454                    ::buffa::encoding::Tag::new(
10455                            5u32,
10456                            ::buffa::encoding::WireType::LengthDelimited,
10457                        )
10458                        .encode(buf);
10459                    ::buffa::types::encode_string(v, buf);
10460                }
10461                if let Some(v) = self.skip_validation {
10462                    ::buffa::encoding::Tag::new(
10463                            6u32,
10464                            ::buffa::encoding::WireType::Varint,
10465                        )
10466                        .encode(buf);
10467                    ::buffa::types::encode_bool(v, buf);
10468                }
10469                if let Some(v) = self.force {
10470                    ::buffa::encoding::Tag::new(
10471                            7u32,
10472                            ::buffa::encoding::WireType::Varint,
10473                        )
10474                        .encode(buf);
10475                    ::buffa::types::encode_bool(v, buf);
10476                }
10477                if self.azure_service_principal.is_set() {
10478                    ::buffa::encoding::Tag::new(
10479                            100u32,
10480                            ::buffa::encoding::WireType::LengthDelimited,
10481                        )
10482                        .encode(buf);
10483                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
10484                    self.azure_service_principal.write_to(__cache, buf);
10485                }
10486                if self.azure_managed_identity.is_set() {
10487                    ::buffa::encoding::Tag::new(
10488                            101u32,
10489                            ::buffa::encoding::WireType::LengthDelimited,
10490                        )
10491                        .encode(buf);
10492                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
10493                    self.azure_managed_identity.write_to(__cache, buf);
10494                }
10495                if self.azure_storage_key.is_set() {
10496                    ::buffa::encoding::Tag::new(
10497                            102u32,
10498                            ::buffa::encoding::WireType::LengthDelimited,
10499                        )
10500                        .encode(buf);
10501                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
10502                    self.azure_storage_key.write_to(__cache, buf);
10503                }
10504                if self.aws_iam_role.is_set() {
10505                    ::buffa::encoding::Tag::new(
10506                            103u32,
10507                            ::buffa::encoding::WireType::LengthDelimited,
10508                        )
10509                        .encode(buf);
10510                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
10511                    self.aws_iam_role.write_to(__cache, buf);
10512                }
10513                if self.databricks_gcp_service_account.is_set() {
10514                    ::buffa::encoding::Tag::new(
10515                            104u32,
10516                            ::buffa::encoding::WireType::LengthDelimited,
10517                        )
10518                        .encode(buf);
10519                    ::buffa::encoding::encode_varint(__cache.consume_next() as u64, buf);
10520                    self.databricks_gcp_service_account.write_to(__cache, buf);
10521                }
10522                self.__buffa_unknown_fields.write_to(buf);
10523            }
10524        }
10525        /// Serializes this view as protobuf JSON.
10526        ///
10527        /// Implicit-presence fields with default values are omitted, `required`
10528        /// fields are always emitted, explicit-presence (`optional`) fields are
10529        /// emitted only when set, bytes fields are base64-encoded, and enum
10530        /// values are their proto name strings.
10531        ///
10532        /// This impl uses `serialize_map(None)` because the number of emitted
10533        /// fields depends on default-omission rules; serializers that require
10534        /// known map lengths (e.g. `bincode`) will return a runtime error.
10535        /// Use the owned message type for those formats.
10536        impl<'__a> ::serde::Serialize for UpdateCredentialRequestView<'__a> {
10537            fn serialize<__S: ::serde::Serializer>(
10538                &self,
10539                __s: __S,
10540            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10541                use ::serde::ser::SerializeMap as _;
10542                let mut __map = __s.serialize_map(::core::option::Option::None)?;
10543                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
10544                    __map.serialize_entry("name", self.name)?;
10545                }
10546                if let ::core::option::Option::Some(__v) = self.new_name {
10547                    __map.serialize_entry("new_name", __v)?;
10548                }
10549                if let ::core::option::Option::Some(__v) = self.comment {
10550                    __map.serialize_entry("comment", __v)?;
10551                }
10552                if let ::core::option::Option::Some(__v) = self.read_only {
10553                    __map.serialize_entry("read_only", &__v)?;
10554                }
10555                if let ::core::option::Option::Some(__v) = self.owner {
10556                    __map.serialize_entry("owner", __v)?;
10557                }
10558                if let ::core::option::Option::Some(__v) = self.skip_validation {
10559                    __map.serialize_entry("skip_validation", &__v)?;
10560                }
10561                if let ::core::option::Option::Some(__v) = self.force {
10562                    __map.serialize_entry("force", &__v)?;
10563                }
10564                {
10565                    if let ::core::option::Option::Some(__v) = self
10566                        .azure_service_principal
10567                        .as_option()
10568                    {
10569                        __map.serialize_entry("azure_service_principal", __v)?;
10570                    }
10571                }
10572                {
10573                    if let ::core::option::Option::Some(__v) = self
10574                        .azure_managed_identity
10575                        .as_option()
10576                    {
10577                        __map.serialize_entry("azure_managed_identity", __v)?;
10578                    }
10579                }
10580                {
10581                    if let ::core::option::Option::Some(__v) = self
10582                        .azure_storage_key
10583                        .as_option()
10584                    {
10585                        __map.serialize_entry("azure_storage_key", __v)?;
10586                    }
10587                }
10588                {
10589                    if let ::core::option::Option::Some(__v) = self
10590                        .aws_iam_role
10591                        .as_option()
10592                    {
10593                        __map.serialize_entry("aws_iam_role", __v)?;
10594                    }
10595                }
10596                {
10597                    if let ::core::option::Option::Some(__v) = self
10598                        .databricks_gcp_service_account
10599                        .as_option()
10600                    {
10601                        __map.serialize_entry("databricks_gcp_service_account", __v)?;
10602                    }
10603                }
10604                __map.end()
10605            }
10606        }
10607        impl<'a> ::buffa::MessageName for UpdateCredentialRequestView<'a> {
10608            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
10609            const NAME: &'static str = "UpdateCredentialRequest";
10610            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.UpdateCredentialRequest";
10611            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.UpdateCredentialRequest";
10612        }
10613        impl<'v> ::buffa::DefaultViewInstance for UpdateCredentialRequestView<'v> {
10614            fn default_view_instance<'a>() -> &'a Self
10615            where
10616                Self: 'a,
10617            {
10618                static VALUE: ::buffa::__private::OnceBox<
10619                    UpdateCredentialRequestView<'static>,
10620                > = ::buffa::__private::OnceBox::new();
10621                VALUE
10622                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
10623                        <UpdateCredentialRequestView<'static>>::default(),
10624                    ))
10625            }
10626        }
10627        impl ::buffa::ViewReborrow for UpdateCredentialRequestView<'static> {
10628            type Reborrowed<'b> = UpdateCredentialRequestView<'b>;
10629            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
10630                this
10631            }
10632        }
10633        /** Self-contained, `'static` owned view of a `UpdateCredentialRequest` message.
10634
10635 Wraps [`::buffa::OwnedView`]`<`[`UpdateCredentialRequestView`]`<'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.
10636
10637 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`UpdateCredentialRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
10638        #[derive(Clone, Debug)]
10639        pub struct UpdateCredentialRequestOwnedView(
10640            ::buffa::OwnedView<UpdateCredentialRequestView<'static>>,
10641        );
10642        impl UpdateCredentialRequestOwnedView {
10643            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
10644            ///
10645            /// The view borrows directly from the buffer's data; the buffer is
10646            /// retained inside the returned handle.
10647            ///
10648            /// # Errors
10649            ///
10650            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
10651            /// protobuf data.
10652            pub fn decode(
10653                bytes: ::buffa::bytes::Bytes,
10654            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10655                ::core::result::Result::Ok(
10656                    UpdateCredentialRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
10657                )
10658            }
10659            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
10660            /// max message size).
10661            ///
10662            /// # Errors
10663            ///
10664            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
10665            /// exceeds the configured limits.
10666            pub fn decode_with_options(
10667                bytes: ::buffa::bytes::Bytes,
10668                opts: &::buffa::DecodeOptions,
10669            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10670                ::core::result::Result::Ok(
10671                    UpdateCredentialRequestOwnedView(
10672                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10673                    ),
10674                )
10675            }
10676            /// Build from an owned message via an encode → decode round-trip.
10677            ///
10678            /// # Errors
10679            ///
10680            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
10681            /// somehow invalid (should not happen for well-formed messages).
10682            pub fn from_owned(
10683                msg: &super::super::UpdateCredentialRequest,
10684            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10685                ::core::result::Result::Ok(
10686                    UpdateCredentialRequestOwnedView(
10687                        ::buffa::OwnedView::from_owned(msg)?,
10688                    ),
10689                )
10690            }
10691            /// Borrow the full [`UpdateCredentialRequestView`] with its lifetime tied to `&self`.
10692            #[must_use]
10693            pub fn view(&self) -> &UpdateCredentialRequestView<'_> {
10694                self.0.reborrow()
10695            }
10696            /// Convert to the owned message type.
10697            #[must_use]
10698            pub fn to_owned_message(&self) -> super::super::UpdateCredentialRequest {
10699                self.0.to_owned_message()
10700            }
10701            /// The underlying bytes buffer.
10702            #[must_use]
10703            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10704                self.0.bytes()
10705            }
10706            /// Consume the handle, returning the underlying bytes buffer.
10707            #[must_use]
10708            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10709                self.0.into_bytes()
10710            }
10711            /// Name of credential.
10712            ///
10713            /// Field 1: `name`
10714            #[must_use]
10715            pub fn name(&self) -> &'_ str {
10716                self.0.reborrow().name
10717            }
10718            /// New name of the credential.
10719            ///
10720            /// Field 2: `new_name`
10721            #[must_use]
10722            pub fn new_name(&self) -> ::core::option::Option<&'_ str> {
10723                self.0.reborrow().new_name
10724            }
10725            /// Comment associated with the credential.
10726            ///
10727            /// Field 3: `comment`
10728            #[must_use]
10729            pub fn comment(&self) -> ::core::option::Option<&'_ str> {
10730                self.0.reborrow().comment
10731            }
10732            /// Whether the credential is usable only for read operations. Only applicable when purpose is STORAGE.
10733            ///
10734            /// Field 4: `read_only`
10735            #[must_use]
10736            pub fn read_only(&self) -> ::core::option::Option<bool> {
10737                self.0.reborrow().read_only
10738            }
10739            /// Username of current owner of credential.
10740            ///
10741            /// Field 5: `owner`
10742            #[must_use]
10743            pub fn owner(&self) -> ::core::option::Option<&'_ str> {
10744                self.0.reborrow().owner
10745            }
10746            /// Supply true to this argument to skip validation of the updated credential.
10747            ///
10748            /// Field 6: `skip_validation`
10749            #[must_use]
10750            pub fn skip_validation(&self) -> ::core::option::Option<bool> {
10751                self.0.reborrow().skip_validation
10752            }
10753            /// Force an update even if there are dependent services (when purpose is SERVICE)
10754            /// or dependent external locations and external tables (when purpose is STORAGE).
10755            ///
10756            /// Field 7: `force`
10757            #[must_use]
10758            pub fn force(&self) -> ::core::option::Option<bool> {
10759                self.0.reborrow().force
10760            }
10761            /// The Azure service principal configuration.
10762            ///
10763            /// Field 100: `azure_service_principal`
10764            #[must_use]
10765            pub fn azure_service_principal(
10766                &self,
10767            ) -> &::buffa::MessageFieldView<
10768                super::super::__buffa::view::AzureServicePrincipalView<'_>,
10769            > {
10770                &self.0.reborrow().azure_service_principal
10771            }
10772            /// The Azure managed identity configuration.
10773            ///
10774            /// Field 101: `azure_managed_identity`
10775            #[must_use]
10776            pub fn azure_managed_identity(
10777                &self,
10778            ) -> &::buffa::MessageFieldView<
10779                super::super::__buffa::view::AzureManagedIdentityView<'_>,
10780            > {
10781                &self.0.reborrow().azure_managed_identity
10782            }
10783            /// The Azure storage key configuration.
10784            ///
10785            /// Field 102: `azure_storage_key`
10786            #[must_use]
10787            pub fn azure_storage_key(
10788                &self,
10789            ) -> &::buffa::MessageFieldView<
10790                super::super::__buffa::view::AzureStorageKeyView<'_>,
10791            > {
10792                &self.0.reborrow().azure_storage_key
10793            }
10794            /// The AWS IAM role configuration.
10795            ///
10796            /// Field 103: `aws_iam_role`
10797            #[must_use]
10798            pub fn aws_iam_role(
10799                &self,
10800            ) -> &::buffa::MessageFieldView<
10801                super::super::__buffa::view::AwsIamRoleConfigView<'_>,
10802            > {
10803                &self.0.reborrow().aws_iam_role
10804            }
10805            /// The Databricks managed GCP service account configuration.
10806            ///
10807            /// Field 104: `databricks_gcp_service_account`
10808            #[must_use]
10809            pub fn databricks_gcp_service_account(
10810                &self,
10811            ) -> &::buffa::MessageFieldView<
10812                super::super::__buffa::view::DatabricksGcpServiceAccountView<'_>,
10813            > {
10814                &self.0.reborrow().databricks_gcp_service_account
10815            }
10816        }
10817        impl ::core::convert::From<
10818            ::buffa::OwnedView<UpdateCredentialRequestView<'static>>,
10819        > for UpdateCredentialRequestOwnedView {
10820            fn from(
10821                inner: ::buffa::OwnedView<UpdateCredentialRequestView<'static>>,
10822            ) -> Self {
10823                UpdateCredentialRequestOwnedView(inner)
10824            }
10825        }
10826        impl ::core::convert::From<UpdateCredentialRequestOwnedView>
10827        for ::buffa::OwnedView<UpdateCredentialRequestView<'static>> {
10828            fn from(wrapper: UpdateCredentialRequestOwnedView) -> Self {
10829                wrapper.0
10830            }
10831        }
10832        impl ::core::convert::AsRef<
10833            ::buffa::OwnedView<UpdateCredentialRequestView<'static>>,
10834        > for UpdateCredentialRequestOwnedView {
10835            fn as_ref(
10836                &self,
10837            ) -> &::buffa::OwnedView<UpdateCredentialRequestView<'static>> {
10838                &self.0
10839            }
10840        }
10841        impl ::buffa::HasMessageView for super::super::UpdateCredentialRequest {
10842            type View<'a> = UpdateCredentialRequestView<'a>;
10843            type ViewHandle = UpdateCredentialRequestOwnedView;
10844        }
10845        impl ::serde::Serialize for UpdateCredentialRequestOwnedView {
10846            fn serialize<__S: ::serde::Serializer>(
10847                &self,
10848                __s: __S,
10849            ) -> ::core::result::Result<__S::Ok, __S::Error> {
10850                ::serde::Serialize::serialize(&self.0, __s)
10851            }
10852        }
10853        /// Delete a credential.
10854        #[derive(Clone, Debug, Default)]
10855        pub struct DeleteCredentialRequestView<'a> {
10856            /// Name of credential.
10857            ///
10858            /// Field 1: `name`
10859            pub name: &'a str,
10860            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10861        }
10862        impl<'a> DeleteCredentialRequestView<'a> {
10863            /// Decode from `buf`, enforcing a recursion depth limit for nested messages.
10864            ///
10865            /// Called by [`::buffa::MessageView::decode_view`] with [`::buffa::RECURSION_LIMIT`]
10866            /// and by generated sub-message decode arms with `depth - 1`.
10867            ///
10868            /// **Not part of the public API.** Named with a leading underscore to
10869            /// signal that it is for generated-code use only.
10870            #[doc(hidden)]
10871            pub fn _decode_depth(
10872                buf: &'a [u8],
10873                depth: u32,
10874            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10875                let mut view = Self::default();
10876                view._merge_into_view(buf, depth)?;
10877                ::core::result::Result::Ok(view)
10878            }
10879            /// Merge fields from `buf` into this view (proto merge semantics).
10880            ///
10881            /// Repeated fields append; singular fields last-wins; singular
10882            /// MESSAGE fields merge recursively. Used by sub-message decode
10883            /// arms when the same field appears multiple times on the wire.
10884            ///
10885            /// **Not part of the public API.**
10886            #[doc(hidden)]
10887            pub fn _merge_into_view(
10888                &mut self,
10889                buf: &'a [u8],
10890                depth: u32,
10891            ) -> ::core::result::Result<(), ::buffa::DecodeError> {
10892                let _ = depth;
10893                #[allow(unused_variables)]
10894                let view = self;
10895                let mut cur: &'a [u8] = buf;
10896                while !cur.is_empty() {
10897                    let before_tag = cur;
10898                    let tag = ::buffa::encoding::Tag::decode(&mut cur)?;
10899                    match tag.field_number() {
10900                        1u32 => {
10901                            if tag.wire_type()
10902                                != ::buffa::encoding::WireType::LengthDelimited
10903                            {
10904                                return ::core::result::Result::Err(::buffa::DecodeError::WireTypeMismatch {
10905                                    field_number: 1u32,
10906                                    expected: 2u8,
10907                                    actual: tag.wire_type() as u8,
10908                                });
10909                            }
10910                            view.name = ::buffa::types::borrow_str(&mut cur)?;
10911                        }
10912                        _ => {
10913                            ::buffa::encoding::skip_field_depth(tag, &mut cur, depth)?;
10914                            let span_len = before_tag.len() - cur.len();
10915                            view.__buffa_unknown_fields
10916                                .push_raw(&before_tag[..span_len]);
10917                        }
10918                    }
10919                }
10920                ::core::result::Result::Ok(())
10921            }
10922        }
10923        impl<'a> ::buffa::MessageView<'a> for DeleteCredentialRequestView<'a> {
10924            type Owned = super::super::DeleteCredentialRequest;
10925            fn decode_view(
10926                buf: &'a [u8],
10927            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10928                Self::_decode_depth(buf, ::buffa::RECURSION_LIMIT)
10929            }
10930            fn decode_view_with_limit(
10931                buf: &'a [u8],
10932                depth: u32,
10933            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10934                Self::_decode_depth(buf, depth)
10935            }
10936            fn to_owned_message(&self) -> super::super::DeleteCredentialRequest {
10937                self.to_owned_from_source(None)
10938            }
10939            #[allow(clippy::useless_conversion, clippy::needless_update)]
10940            fn to_owned_from_source(
10941                &self,
10942                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10943            ) -> super::super::DeleteCredentialRequest {
10944                #[allow(unused_imports)]
10945                use ::buffa::alloc::string::ToString as _;
10946                let _ = __buffa_src;
10947                super::super::DeleteCredentialRequest {
10948                    name: self.name.to_string(),
10949                    __buffa_unknown_fields: self
10950                        .__buffa_unknown_fields
10951                        .to_owned()
10952                        .unwrap_or_default()
10953                        .into(),
10954                    ..::core::default::Default::default()
10955                }
10956            }
10957        }
10958        impl<'a> ::buffa::ViewEncode<'a> for DeleteCredentialRequestView<'a> {
10959            #[allow(clippy::needless_borrow, clippy::let_and_return)]
10960            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
10961                #[allow(unused_imports)]
10962                use ::buffa::Enumeration as _;
10963                let mut size = 0u32;
10964                if !self.name.is_empty() {
10965                    size += 1u32 + ::buffa::types::string_encoded_len(&self.name) as u32;
10966                }
10967                size += self.__buffa_unknown_fields.encoded_len() as u32;
10968                size
10969            }
10970            #[allow(clippy::needless_borrow)]
10971            fn write_to(
10972                &self,
10973                _cache: &mut ::buffa::SizeCache,
10974                buf: &mut impl ::buffa::bytes::BufMut,
10975            ) {
10976                #[allow(unused_imports)]
10977                use ::buffa::Enumeration as _;
10978                if !self.name.is_empty() {
10979                    ::buffa::encoding::Tag::new(
10980                            1u32,
10981                            ::buffa::encoding::WireType::LengthDelimited,
10982                        )
10983                        .encode(buf);
10984                    ::buffa::types::encode_string(&self.name, buf);
10985                }
10986                self.__buffa_unknown_fields.write_to(buf);
10987            }
10988        }
10989        /// Serializes this view as protobuf JSON.
10990        ///
10991        /// Implicit-presence fields with default values are omitted, `required`
10992        /// fields are always emitted, explicit-presence (`optional`) fields are
10993        /// emitted only when set, bytes fields are base64-encoded, and enum
10994        /// values are their proto name strings.
10995        ///
10996        /// This impl uses `serialize_map(None)` because the number of emitted
10997        /// fields depends on default-omission rules; serializers that require
10998        /// known map lengths (e.g. `bincode`) will return a runtime error.
10999        /// Use the owned message type for those formats.
11000        impl<'__a> ::serde::Serialize for DeleteCredentialRequestView<'__a> {
11001            fn serialize<__S: ::serde::Serializer>(
11002                &self,
11003                __s: __S,
11004            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11005                use ::serde::ser::SerializeMap as _;
11006                let mut __map = __s.serialize_map(::core::option::Option::None)?;
11007                if !::buffa::json_helpers::skip_if::is_empty_str(self.name) {
11008                    __map.serialize_entry("name", self.name)?;
11009                }
11010                __map.end()
11011            }
11012        }
11013        impl<'a> ::buffa::MessageName for DeleteCredentialRequestView<'a> {
11014            const PACKAGE: &'static str = "unitycatalog.credentials.v1";
11015            const NAME: &'static str = "DeleteCredentialRequest";
11016            const FULL_NAME: &'static str = "unitycatalog.credentials.v1.DeleteCredentialRequest";
11017            const TYPE_URL: &'static str = "type.googleapis.com/unitycatalog.credentials.v1.DeleteCredentialRequest";
11018        }
11019        impl<'v> ::buffa::DefaultViewInstance for DeleteCredentialRequestView<'v> {
11020            fn default_view_instance<'a>() -> &'a Self
11021            where
11022                Self: 'a,
11023            {
11024                static VALUE: ::buffa::__private::OnceBox<
11025                    DeleteCredentialRequestView<'static>,
11026                > = ::buffa::__private::OnceBox::new();
11027                VALUE
11028                    .get_or_init(|| ::buffa::alloc::boxed::Box::new(
11029                        <DeleteCredentialRequestView<'static>>::default(),
11030                    ))
11031            }
11032        }
11033        impl ::buffa::ViewReborrow for DeleteCredentialRequestView<'static> {
11034            type Reborrowed<'b> = DeleteCredentialRequestView<'b>;
11035            fn reborrow<'b>(this: &'b Self) -> &'b Self::Reborrowed<'b> {
11036                this
11037            }
11038        }
11039        /** Self-contained, `'static` owned view of a `DeleteCredentialRequest` message.
11040
11041 Wraps [`::buffa::OwnedView`]`<`[`DeleteCredentialRequestView`]`<'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.
11042
11043 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`DeleteCredentialRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
11044        #[derive(Clone, Debug)]
11045        pub struct DeleteCredentialRequestOwnedView(
11046            ::buffa::OwnedView<DeleteCredentialRequestView<'static>>,
11047        );
11048        impl DeleteCredentialRequestOwnedView {
11049            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
11050            ///
11051            /// The view borrows directly from the buffer's data; the buffer is
11052            /// retained inside the returned handle.
11053            ///
11054            /// # Errors
11055            ///
11056            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
11057            /// protobuf data.
11058            pub fn decode(
11059                bytes: ::buffa::bytes::Bytes,
11060            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11061                ::core::result::Result::Ok(
11062                    DeleteCredentialRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
11063                )
11064            }
11065            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
11066            /// max message size).
11067            ///
11068            /// # Errors
11069            ///
11070            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
11071            /// exceeds the configured limits.
11072            pub fn decode_with_options(
11073                bytes: ::buffa::bytes::Bytes,
11074                opts: &::buffa::DecodeOptions,
11075            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11076                ::core::result::Result::Ok(
11077                    DeleteCredentialRequestOwnedView(
11078                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11079                    ),
11080                )
11081            }
11082            /// Build from an owned message via an encode → decode round-trip.
11083            ///
11084            /// # Errors
11085            ///
11086            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
11087            /// somehow invalid (should not happen for well-formed messages).
11088            pub fn from_owned(
11089                msg: &super::super::DeleteCredentialRequest,
11090            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11091                ::core::result::Result::Ok(
11092                    DeleteCredentialRequestOwnedView(
11093                        ::buffa::OwnedView::from_owned(msg)?,
11094                    ),
11095                )
11096            }
11097            /// Borrow the full [`DeleteCredentialRequestView`] with its lifetime tied to `&self`.
11098            #[must_use]
11099            pub fn view(&self) -> &DeleteCredentialRequestView<'_> {
11100                self.0.reborrow()
11101            }
11102            /// Convert to the owned message type.
11103            #[must_use]
11104            pub fn to_owned_message(&self) -> super::super::DeleteCredentialRequest {
11105                self.0.to_owned_message()
11106            }
11107            /// The underlying bytes buffer.
11108            #[must_use]
11109            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11110                self.0.bytes()
11111            }
11112            /// Consume the handle, returning the underlying bytes buffer.
11113            #[must_use]
11114            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11115                self.0.into_bytes()
11116            }
11117            /// Name of credential.
11118            ///
11119            /// Field 1: `name`
11120            #[must_use]
11121            pub fn name(&self) -> &'_ str {
11122                self.0.reborrow().name
11123            }
11124        }
11125        impl ::core::convert::From<
11126            ::buffa::OwnedView<DeleteCredentialRequestView<'static>>,
11127        > for DeleteCredentialRequestOwnedView {
11128            fn from(
11129                inner: ::buffa::OwnedView<DeleteCredentialRequestView<'static>>,
11130            ) -> Self {
11131                DeleteCredentialRequestOwnedView(inner)
11132            }
11133        }
11134        impl ::core::convert::From<DeleteCredentialRequestOwnedView>
11135        for ::buffa::OwnedView<DeleteCredentialRequestView<'static>> {
11136            fn from(wrapper: DeleteCredentialRequestOwnedView) -> Self {
11137                wrapper.0
11138            }
11139        }
11140        impl ::core::convert::AsRef<
11141            ::buffa::OwnedView<DeleteCredentialRequestView<'static>>,
11142        > for DeleteCredentialRequestOwnedView {
11143            fn as_ref(
11144                &self,
11145            ) -> &::buffa::OwnedView<DeleteCredentialRequestView<'static>> {
11146                &self.0
11147            }
11148        }
11149        impl ::buffa::HasMessageView for super::super::DeleteCredentialRequest {
11150            type View<'a> = DeleteCredentialRequestView<'a>;
11151            type ViewHandle = DeleteCredentialRequestOwnedView;
11152        }
11153        impl ::serde::Serialize for DeleteCredentialRequestOwnedView {
11154            fn serialize<__S: ::serde::Serializer>(
11155                &self,
11156                __s: __S,
11157            ) -> ::core::result::Result<__S::Ok, __S::Error> {
11158                ::serde::Serialize::serialize(&self.0, __s)
11159            }
11160        }
11161        pub mod oneof {
11162            #[allow(unused_imports)]
11163            use super::*;
11164            pub mod azure_service_principal {
11165                #[allow(unused_imports)]
11166                use super::*;
11167                #[derive(Clone, Debug)]
11168                pub enum Credential<'a> {
11169                    ClientSecret(&'a str),
11170                    FederatedTokenFile(&'a str),
11171                }
11172            }
11173        }
11174    }
11175    pub mod oneof {
11176        #[allow(unused_imports)]
11177        use super::*;
11178        pub mod azure_service_principal {
11179            #[allow(unused_imports)]
11180            use super::*;
11181            #[derive(Clone, PartialEq, Debug)]
11182            pub enum Credential {
11183                ClientSecret(::buffa::alloc::string::String),
11184                FederatedTokenFile(::buffa::alloc::string::String),
11185            }
11186            impl ::buffa::Oneof for Credential {}
11187            impl serde::Serialize for Credential {
11188                fn serialize<S: serde::Serializer>(
11189                    &self,
11190                    s: S,
11191                ) -> ::core::result::Result<S::Ok, S::Error> {
11192                    use serde::ser::SerializeMap;
11193                    let mut map = s.serialize_map(Some(1))?;
11194                    match self {
11195                        Self::ClientSecret(v) => {
11196                            map.serialize_entry("client_secret", v)?;
11197                        }
11198                        Self::FederatedTokenFile(v) => {
11199                            map.serialize_entry("federated_token_file", v)?;
11200                        }
11201                    }
11202                    map.end()
11203                }
11204            }
11205        }
11206    }
11207    /// Register this package's `Any` type entries and extension entries.
11208    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
11209        reg.register_json_any(super::__AZURE_SERVICE_PRINCIPAL_JSON_ANY);
11210        reg.register_json_any(super::__AZURE_MANAGED_IDENTITY_JSON_ANY);
11211        reg.register_json_any(super::__AZURE_STORAGE_KEY_JSON_ANY);
11212        reg.register_json_any(super::__AWS_IAM_ROLE_CONFIG_JSON_ANY);
11213        reg.register_json_any(super::__AWS_IAM_ROLE_JSON_ANY);
11214        reg.register_json_any(super::__DATABRICKS_GCP_SERVICE_ACCOUNT_JSON_ANY);
11215        reg.register_json_any(super::__CREDENTIAL_JSON_ANY);
11216        reg.register_json_any(super::__LIST_CREDENTIALS_REQUEST_JSON_ANY);
11217        reg.register_json_any(super::__LIST_CREDENTIALS_RESPONSE_JSON_ANY);
11218        reg.register_json_any(super::__CREATE_CREDENTIAL_REQUEST_JSON_ANY);
11219        reg.register_json_any(super::__GET_CREDENTIAL_REQUEST_JSON_ANY);
11220        reg.register_json_any(super::__UPDATE_CREDENTIAL_REQUEST_JSON_ANY);
11221        reg.register_json_any(super::__DELETE_CREDENTIAL_REQUEST_JSON_ANY);
11222    }
11223}
11224#[doc(inline)]
11225pub use self::__buffa::view::AzureServicePrincipalView;
11226#[doc(inline)]
11227pub use self::__buffa::view::AzureServicePrincipalOwnedView;
11228#[doc(inline)]
11229pub use self::__buffa::view::AzureManagedIdentityView;
11230#[doc(inline)]
11231pub use self::__buffa::view::AzureManagedIdentityOwnedView;
11232#[doc(inline)]
11233pub use self::__buffa::view::AzureStorageKeyView;
11234#[doc(inline)]
11235pub use self::__buffa::view::AzureStorageKeyOwnedView;
11236#[doc(inline)]
11237pub use self::__buffa::view::AwsIamRoleConfigView;
11238#[doc(inline)]
11239pub use self::__buffa::view::AwsIamRoleConfigOwnedView;
11240#[doc(inline)]
11241pub use self::__buffa::view::AwsIamRoleView;
11242#[doc(inline)]
11243pub use self::__buffa::view::AwsIamRoleOwnedView;
11244#[doc(inline)]
11245pub use self::__buffa::view::DatabricksGcpServiceAccountView;
11246#[doc(inline)]
11247pub use self::__buffa::view::DatabricksGcpServiceAccountOwnedView;
11248#[doc(inline)]
11249pub use self::__buffa::view::CredentialView;
11250#[doc(inline)]
11251pub use self::__buffa::view::CredentialOwnedView;
11252#[doc(inline)]
11253pub use self::__buffa::view::ListCredentialsRequestView;
11254#[doc(inline)]
11255pub use self::__buffa::view::ListCredentialsRequestOwnedView;
11256#[doc(inline)]
11257pub use self::__buffa::view::ListCredentialsResponseView;
11258#[doc(inline)]
11259pub use self::__buffa::view::ListCredentialsResponseOwnedView;
11260#[doc(inline)]
11261pub use self::__buffa::view::CreateCredentialRequestView;
11262#[doc(inline)]
11263pub use self::__buffa::view::CreateCredentialRequestOwnedView;
11264#[doc(inline)]
11265pub use self::__buffa::view::GetCredentialRequestView;
11266#[doc(inline)]
11267pub use self::__buffa::view::GetCredentialRequestOwnedView;
11268#[doc(inline)]
11269pub use self::__buffa::view::UpdateCredentialRequestView;
11270#[doc(inline)]
11271pub use self::__buffa::view::UpdateCredentialRequestOwnedView;
11272#[doc(inline)]
11273pub use self::__buffa::view::DeleteCredentialRequestView;
11274#[doc(inline)]
11275pub use self::__buffa::view::DeleteCredentialRequestOwnedView;
11276#[doc(inline)]
11277pub use self::__buffa::register_types;