Skip to main content

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

1// @generated
2// This file is @generated by prost-build.
3#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
4#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5pub struct AzureUserDelegationSas {
6    /// The signed URI (SAS Token) used to access blob services for a given path
7    #[prost(string, tag="1")]
8    pub sas_token: ::prost::alloc::string::String,
9}
10#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
11#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12pub struct AzureAad {
13    /// Opaque token that contains claims that you can use in Azure Active Directory to access cloud services.
14    #[prost(string, tag="1")]
15    pub aad_token: ::prost::alloc::string::String,
16}
17#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
18#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
19pub struct R2TemporaryCredentials {
20    /// The access key ID that identifies the temporary credentials.
21    #[prost(string, tag="1")]
22    pub access_key_id: ::prost::alloc::string::String,
23    /// The secret access key associated with the access key.
24    #[prost(string, tag="2")]
25    pub secret_access_key: ::prost::alloc::string::String,
26    /// The generated JWT that users must pass to use the temporary credentials.
27    #[prost(string, tag="3")]
28    pub session_token: ::prost::alloc::string::String,
29}
30#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
31#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
32pub struct GcpOauthToken {
33    /// The OAuth token used to access Google Cloud services.
34    #[prost(string, tag="1")]
35    pub oauth_token: ::prost::alloc::string::String,
36}
37#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
38#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
39pub struct AwsTemporaryCredentials {
40    /// The access key ID that identifies the temporary credentials.
41    #[prost(string, tag="1")]
42    pub access_key_id: ::prost::alloc::string::String,
43    /// The Amazon Resource Name (ARN) of the S3 access point for temporary credentials related the external location.
44    #[prost(string, tag="2")]
45    pub access_point: ::prost::alloc::string::String,
46    /// The secret access key that can be used to sign AWS API requests.
47    #[prost(string, tag="3")]
48    pub secret_access_key: ::prost::alloc::string::String,
49    /// The token that users must pass to AWS API to use the temporary credentials.
50    #[prost(string, tag="4")]
51    pub session_token: ::prost::alloc::string::String,
52}
53/// The response to the GenerateTemporaryTableCredentialsRequest.
54#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
55#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
56pub struct TemporaryCredential {
57    /// Server time when the credential will expire, in epoch milliseconds.
58    /// The API client is advised to cache the credential given this expiration time.
59    #[prost(int64, tag="1")]
60    pub expiration_time: i64,
61    /// The URL of the storage path accessible by the temporary credential.
62    #[prost(string, tag="2")]
63    pub url: ::prost::alloc::string::String,
64    /// The credentials to access the table.
65    #[prost(oneof="temporary_credential::Credentials", tags="100, 101, 102, 103, 104")]
66    pub credentials: ::core::option::Option<temporary_credential::Credentials>,
67}
68/// Nested message and enum types in `TemporaryCredential`.
69pub mod temporary_credential {
70    /// The credentials to access the table.
71    #[cfg_attr(feature = "python", ::pyo3::pyclass)]
72    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
73    pub enum Credentials {
74        /// Credentials for Azure Blob Storage.
75        #[prost(message, tag="100")]
76        AzureUserDelegationSas(super::AzureUserDelegationSas),
77        /// Credentials for Azure Active Directory.
78        #[prost(message, tag="101")]
79        AzureAad(super::AzureAad),
80        /// Credentials for AWS S3.
81        #[prost(message, tag="102")]
82        AwsTempCredentials(super::AwsTemporaryCredentials),
83        /// Credentials for Google Cloud Storage.
84        #[prost(message, tag="103")]
85        GcpOauthToken(super::GcpOauthToken),
86        /// Credentials for R2.
87        #[prost(message, tag="104")]
88        R2TempCredentials(super::R2TemporaryCredentials),
89    }
90}
91/// Generate a new set of credentials for a table.
92#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
93#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
94pub struct GenerateTemporaryTableCredentialsRequest {
95    /// UUID of the table to read or write.
96    #[prost(string, tag="1")]
97    pub table_id: ::prost::alloc::string::String,
98    /// The operation performed against the table data, either READ or READ_WRITE.
99    /// If READ_WRITE is specified, the credentials returned will have write
100    /// permissions, otherwise, it will be read only.
101    #[prost(enumeration="generate_temporary_table_credentials_request::Operation", tag="2")]
102    pub operation: i32,
103}
104/// Nested message and enum types in `GenerateTemporaryTableCredentialsRequest`.
105pub mod generate_temporary_table_credentials_request {
106    #[cfg_attr(feature = "python", ::pyo3::pyclass)]
107    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
108    #[repr(i32)]
109    pub enum Operation {
110        /// The operation is not specified.
111        Unspecified = 0,
112        /// The operation is read only.
113        Read = 1,
114        /// The operation is read and write.
115        ReadWrite = 2,
116    }
117    impl Operation {
118        /// String value of the enum field names used in the ProtoBuf definition.
119        ///
120        /// The values are not transformed in any way and thus are considered stable
121        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
122        pub fn as_str_name(&self) -> &'static str {
123            match self {
124                Self::Unspecified => "UNSPECIFIED",
125                Self::Read => "READ",
126                Self::ReadWrite => "READ_WRITE",
127            }
128        }
129        /// Creates an enum from field names used in the ProtoBuf definition.
130        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
131            match value {
132                "UNSPECIFIED" => Some(Self::Unspecified),
133                "READ" => Some(Self::Read),
134                "READ_WRITE" => Some(Self::ReadWrite),
135                _ => None,
136            }
137        }
138    }
139}
140/// Generate a new set of credentials for a volume.
141#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
142#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
143pub struct GenerateTemporaryVolumeCredentialsRequest {
144    /// UUID of the volume to read or write.
145    #[prost(string, tag="1")]
146    pub volume_id: ::prost::alloc::string::String,
147    /// The operation performed against the volume data, either READ_VOLUME or
148    /// WRITE_VOLUME. If WRITE_VOLUME is specified, the credentials returned will
149    /// have write permissions, otherwise, it will be read only.
150    #[prost(enumeration="generate_temporary_volume_credentials_request::Operation", tag="2")]
151    pub operation: i32,
152}
153/// Nested message and enum types in `GenerateTemporaryVolumeCredentialsRequest`.
154pub mod generate_temporary_volume_credentials_request {
155    #[cfg_attr(feature = "python", ::pyo3::pyclass)]
156    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
157    #[repr(i32)]
158    pub enum Operation {
159        /// The operation is not specified.
160        Unspecified = 0,
161        /// The operation is read only.
162        ReadVolume = 1,
163        /// The operation is read and write.
164        WriteVolume = 2,
165    }
166    impl Operation {
167        /// String value of the enum field names used in the ProtoBuf definition.
168        ///
169        /// The values are not transformed in any way and thus are considered stable
170        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
171        pub fn as_str_name(&self) -> &'static str {
172            match self {
173                Self::Unspecified => "UNSPECIFIED",
174                Self::ReadVolume => "READ_VOLUME",
175                Self::WriteVolume => "WRITE_VOLUME",
176            }
177        }
178        /// Creates an enum from field names used in the ProtoBuf definition.
179        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
180            match value {
181                "UNSPECIFIED" => Some(Self::Unspecified),
182                "READ_VOLUME" => Some(Self::ReadVolume),
183                "WRITE_VOLUME" => Some(Self::WriteVolume),
184                _ => None,
185            }
186        }
187    }
188}
189/// Generate a new set of credentials for a path.
190#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
191#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
192pub struct GenerateTemporaryPathCredentialsRequest {
193    /// URL for path-based access.
194    #[prost(string, tag="1")]
195    pub url: ::prost::alloc::string::String,
196    /// The operation being performed on the path.
197    #[prost(enumeration="generate_temporary_path_credentials_request::Operation", tag="2")]
198    pub operation: i32,
199    /// When set to true, the service will not validate that the generated
200    /// credentials can perform write operations, therefore no new paths will be
201    /// created and the response will not contain valid credentials. Defaults to false.
202    #[prost(bool, optional, tag="3")]
203    pub dry_run: ::core::option::Option<bool>,
204}
205/// Nested message and enum types in `GenerateTemporaryPathCredentialsRequest`.
206pub mod generate_temporary_path_credentials_request {
207    #[cfg_attr(feature = "python", ::pyo3::pyclass)]
208    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
209    #[repr(i32)]
210    pub enum Operation {
211        /// The operation is not specified.
212        Unspecified = 0,
213        /// The operation is read only.
214        PathRead = 1,
215        /// The operation is read and write.
216        PathReadWrite = 2,
217        /// The operation creates a table at the path.
218        PathCreateTable = 3,
219    }
220    impl Operation {
221        /// String value of the enum field names used in the ProtoBuf definition.
222        ///
223        /// The values are not transformed in any way and thus are considered stable
224        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
225        pub fn as_str_name(&self) -> &'static str {
226            match self {
227                Self::Unspecified => "UNSPECIFIED",
228                Self::PathRead => "PATH_READ",
229                Self::PathReadWrite => "PATH_READ_WRITE",
230                Self::PathCreateTable => "PATH_CREATE_TABLE",
231            }
232        }
233        /// Creates an enum from field names used in the ProtoBuf definition.
234        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
235            match value {
236                "UNSPECIFIED" => Some(Self::Unspecified),
237                "PATH_READ" => Some(Self::PathRead),
238                "PATH_READ_WRITE" => Some(Self::PathReadWrite),
239                "PATH_CREATE_TABLE" => Some(Self::PathCreateTable),
240                _ => None,
241            }
242        }
243    }
244}
245include!("unitycatalog.temporary_credentials.v1.serde.rs");
246// @@protoc_insertion_point(module)