olai-uc-common 0.0.2

Shared types, generated Unity Catalog models, and storage/REST abstractions for the Unity Catalog server and client crates.
Documentation
// @generated
// This file is @generated by prost-build.
/// A provider represents an organization sharing data with this metastore.
///
/// A provider is the inbound counterpart of a recipient: it is registered from a
/// share activation/credential file and is used to access shares offered by an
/// upstream Delta Sharing server.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Provider {
    /// Unique ID of the provider.
    #[prost(string, optional, tag="100")]
    pub id: ::core::option::Option<::prost::alloc::string::String>,
    /// The name of the provider.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// The delta sharing authentication type.
    #[prost(enumeration="ProviderAuthenticationType", tag="2")]
    pub authentication_type: i32,
    /// Username of the provider owner.
    #[prost(string, optional, tag="3")]
    pub owner: ::core::option::Option<::prost::alloc::string::String>,
    /// Description about the provider.
    #[prost(string, optional, tag="4")]
    pub comment: ::core::option::Option<::prost::alloc::string::String>,
    /// The recipient profile (credential file contents) used to connect to the
    /// sharing server, present only for TOKEN authentication.
    #[prost(string, optional, tag="5")]
    pub recipient_profile_str: ::core::option::Option<::prost::alloc::string::String>,
    /// A map of key-value properties attached to the provider.
    #[prost(map="string, string", tag="6")]
    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Time at which this provider was created, in epoch milliseconds.
    #[prost(int64, optional, tag="7")]
    pub created_at: ::core::option::Option<i64>,
    /// Username of the creator of the provider.
    #[prost(string, optional, tag="8")]
    pub created_by: ::core::option::Option<::prost::alloc::string::String>,
    /// Time at which this provider was updated, in epoch milliseconds.
    #[prost(int64, optional, tag="9")]
    pub updated_at: ::core::option::Option<i64>,
    /// Username of the provider updater.
    #[prost(string, optional, tag="10")]
    pub updated_by: ::core::option::Option<::prost::alloc::string::String>,
}
/// The delta sharing authentication type used by a provider.
#[cfg_attr(feature = "python", ::pyo3::pyclass)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProviderAuthenticationType {
    /// No authentication type specified.
    Unspecified = 0,
    /// Token-based authentication (open sharing via a credential file).
    Token = 1,
    /// OAuth2 client-credentials authentication.
    OauthClientCredentials = 2,
}
impl ProviderAuthenticationType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "PROVIDER_AUTHENTICATION_TYPE_UNSPECIFIED",
            Self::Token => "TOKEN",
            Self::OauthClientCredentials => "OAUTH_CLIENT_CREDENTIALS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PROVIDER_AUTHENTICATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "TOKEN" => Some(Self::Token),
            "OAUTH_CLIENT_CREDENTIALS" => Some(Self::OauthClientCredentials),
            _ => None,
        }
    }
}
/// Request to list providers.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListProvidersRequest {
    /// The maximum number of results per page that should be returned.
    #[prost(int32, optional, tag="1")]
    pub max_results: ::core::option::Option<i32>,
    /// Opaque pagination token to go to next page based on previous query.
    #[prost(string, optional, tag="2")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// Response to list providers.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProvidersResponse {
    /// List of providers.
    #[prost(message, repeated, tag="1")]
    pub providers: ::prost::alloc::vec::Vec<Provider>,
    /// Opaque pagination token to go to next page based on previous query.
    #[prost(string, optional, tag="2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// Creates a new provider
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProviderRequest {
    /// Name of the provider.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// The delta sharing authentication type.
    #[prost(enumeration="ProviderAuthenticationType", tag="2")]
    pub authentication_type: i32,
    /// Username of the provider owner.
    #[prost(string, optional, tag="3")]
    pub owner: ::core::option::Option<::prost::alloc::string::String>,
    /// Description about the provider.
    #[prost(string, optional, tag="4")]
    pub comment: ::core::option::Option<::prost::alloc::string::String>,
    /// The recipient profile (credential file contents) used to connect to the
    /// sharing server, required for TOKEN authentication.
    #[prost(string, optional, tag="5")]
    pub recipient_profile_str: ::core::option::Option<::prost::alloc::string::String>,
    /// Provider properties as map of string key-value pairs.
    #[prost(map="string, string", tag="6")]
    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Get a provider by name.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetProviderRequest {
    /// Name of the provider.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
}
/// Update a provider
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateProviderRequest {
    /// Name of the provider.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// New name for the provider.
    #[prost(string, optional, tag="2")]
    pub new_name: ::core::option::Option<::prost::alloc::string::String>,
    /// Username of the provider owner.
    #[prost(string, optional, tag="3")]
    pub owner: ::core::option::Option<::prost::alloc::string::String>,
    /// Description about the provider.
    #[prost(string, optional, tag="4")]
    pub comment: ::core::option::Option<::prost::alloc::string::String>,
    /// The recipient profile (credential file contents) used to connect to the
    /// sharing server.
    #[prost(string, optional, tag="5")]
    pub recipient_profile_str: ::core::option::Option<::prost::alloc::string::String>,
    /// Provider properties as map of string key-value pairs.
    ///
    /// When provided in update request, the specified properties will override the existing properties.
    /// To add and remove properties, one would need to perform a read-modify-write.
    #[prost(map="string, string", tag="6")]
    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Delete a provider
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteProviderRequest {
    /// Name of the provider.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
}
include!("unitycatalog.providers.v1.serde.rs");
// @@protoc_insertion_point(module)