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.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AzureUserDelegationSas {
    /// The signed URI (SAS Token) used to access blob services for a given path
    #[prost(string, tag="1")]
    pub sas_token: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AzureAad {
    /// Opaque token that contains claims that you can use in Azure Active Directory to access cloud services.
    #[prost(string, tag="1")]
    pub aad_token: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct R2TemporaryCredentials {
    /// The access key ID that identifies the temporary credentials.
    #[prost(string, tag="1")]
    pub access_key_id: ::prost::alloc::string::String,
    /// The secret access key associated with the access key.
    #[prost(string, tag="2")]
    pub secret_access_key: ::prost::alloc::string::String,
    /// The generated JWT that users must pass to use the temporary credentials.
    #[prost(string, tag="3")]
    pub session_token: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GcpOauthToken {
    /// The OAuth token used to access Google Cloud services.
    #[prost(string, tag="1")]
    pub oauth_token: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AwsTemporaryCredentials {
    /// The access key ID that identifies the temporary credentials.
    #[prost(string, tag="1")]
    pub access_key_id: ::prost::alloc::string::String,
    /// The Amazon Resource Name (ARN) of the S3 access point for temporary credentials related the external location.
    #[prost(string, tag="2")]
    pub access_point: ::prost::alloc::string::String,
    /// The secret access key that can be used to sign AWS API requests.
    #[prost(string, tag="3")]
    pub secret_access_key: ::prost::alloc::string::String,
    /// The token that users must pass to AWS API to use the temporary credentials.
    #[prost(string, tag="4")]
    pub session_token: ::prost::alloc::string::String,
}
/// The response to the GenerateTemporaryTableCredentialsRequest.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TemporaryCredential {
    /// Server time when the credential will expire, in epoch milliseconds.
    /// The API client is advised to cache the credential given this expiration time.
    #[prost(int64, tag="1")]
    pub expiration_time: i64,
    /// The URL of the storage path accessible by the temporary credential.
    #[prost(string, tag="2")]
    pub url: ::prost::alloc::string::String,
    /// The credentials to access the table.
    #[prost(oneof="temporary_credential::Credentials", tags="100, 101, 102, 103, 104")]
    pub credentials: ::core::option::Option<temporary_credential::Credentials>,
}
/// Nested message and enum types in `TemporaryCredential`.
pub mod temporary_credential {
    /// The credentials to access the table.
    #[cfg_attr(feature = "python", ::pyo3::pyclass)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Credentials {
        /// Credentials for Azure Blob Storage.
        #[prost(message, tag="100")]
        AzureUserDelegationSas(super::AzureUserDelegationSas),
        /// Credentials for Azure Active Directory.
        #[prost(message, tag="101")]
        AzureAad(super::AzureAad),
        /// Credentials for AWS S3.
        #[prost(message, tag="102")]
        AwsTempCredentials(super::AwsTemporaryCredentials),
        /// Credentials for Google Cloud Storage.
        #[prost(message, tag="103")]
        GcpOauthToken(super::GcpOauthToken),
        /// Credentials for R2.
        #[prost(message, tag="104")]
        R2TempCredentials(super::R2TemporaryCredentials),
    }
}
/// Generate a new set of credentials for a table.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenerateTemporaryTableCredentialsRequest {
    /// UUID of the table to read or write.
    #[prost(string, tag="1")]
    pub table_id: ::prost::alloc::string::String,
    /// The operation performed against the table data, either READ or READ_WRITE.
    /// If READ_WRITE is specified, the credentials returned will have write
    /// permissions, otherwise, it will be read only.
    #[prost(enumeration="generate_temporary_table_credentials_request::Operation", tag="2")]
    pub operation: i32,
}
/// Nested message and enum types in `GenerateTemporaryTableCredentialsRequest`.
pub mod generate_temporary_table_credentials_request {
    #[cfg_attr(feature = "python", ::pyo3::pyclass)]
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Operation {
        /// The operation is not specified.
        Unspecified = 0,
        /// The operation is read only.
        Read = 1,
        /// The operation is read and write.
        ReadWrite = 2,
    }
    impl Operation {
        /// 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 => "UNSPECIFIED",
                Self::Read => "READ",
                Self::ReadWrite => "READ_WRITE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNSPECIFIED" => Some(Self::Unspecified),
                "READ" => Some(Self::Read),
                "READ_WRITE" => Some(Self::ReadWrite),
                _ => None,
            }
        }
    }
}
/// Generate a new set of credentials for a volume.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenerateTemporaryVolumeCredentialsRequest {
    /// UUID of the volume to read or write.
    #[prost(string, tag="1")]
    pub volume_id: ::prost::alloc::string::String,
    /// The operation performed against the volume data, either READ_VOLUME or
    /// WRITE_VOLUME. If WRITE_VOLUME is specified, the credentials returned will
    /// have write permissions, otherwise, it will be read only.
    #[prost(enumeration="generate_temporary_volume_credentials_request::Operation", tag="2")]
    pub operation: i32,
}
/// Nested message and enum types in `GenerateTemporaryVolumeCredentialsRequest`.
pub mod generate_temporary_volume_credentials_request {
    #[cfg_attr(feature = "python", ::pyo3::pyclass)]
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Operation {
        /// The operation is not specified.
        Unspecified = 0,
        /// The operation is read only.
        ReadVolume = 1,
        /// The operation is read and write.
        WriteVolume = 2,
    }
    impl Operation {
        /// 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 => "UNSPECIFIED",
                Self::ReadVolume => "READ_VOLUME",
                Self::WriteVolume => "WRITE_VOLUME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNSPECIFIED" => Some(Self::Unspecified),
                "READ_VOLUME" => Some(Self::ReadVolume),
                "WRITE_VOLUME" => Some(Self::WriteVolume),
                _ => None,
            }
        }
    }
}
/// Generate a new set of credentials for a path.
#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenerateTemporaryPathCredentialsRequest {
    /// URL for path-based access.
    #[prost(string, tag="1")]
    pub url: ::prost::alloc::string::String,
    /// The operation being performed on the path.
    #[prost(enumeration="generate_temporary_path_credentials_request::Operation", tag="2")]
    pub operation: i32,
    /// When set to true, the service will not validate that the generated
    /// credentials can perform write operations, therefore no new paths will be
    /// created and the response will not contain valid credentials. Defaults to false.
    #[prost(bool, optional, tag="3")]
    pub dry_run: ::core::option::Option<bool>,
}
/// Nested message and enum types in `GenerateTemporaryPathCredentialsRequest`.
pub mod generate_temporary_path_credentials_request {
    #[cfg_attr(feature = "python", ::pyo3::pyclass)]
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Operation {
        /// The operation is not specified.
        Unspecified = 0,
        /// The operation is read only.
        PathRead = 1,
        /// The operation is read and write.
        PathReadWrite = 2,
        /// The operation creates a table at the path.
        PathCreateTable = 3,
    }
    impl Operation {
        /// 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 => "UNSPECIFIED",
                Self::PathRead => "PATH_READ",
                Self::PathReadWrite => "PATH_READ_WRITE",
                Self::PathCreateTable => "PATH_CREATE_TABLE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNSPECIFIED" => Some(Self::Unspecified),
                "PATH_READ" => Some(Self::PathRead),
                "PATH_READ_WRITE" => Some(Self::PathReadWrite),
                "PATH_CREATE_TABLE" => Some(Self::PathCreateTable),
                _ => None,
            }
        }
    }
}
include!("unitycatalog.temporary_credentials.v1.serde.rs");
// @@protoc_insertion_point(module)