Skip to main content

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

1// @generated
2// This file is @generated by prost-build.
3/// A provider represents an organization sharing data with this metastore.
4///
5/// A provider is the inbound counterpart of a recipient: it is registered from a
6/// share activation/credential file and is used to access shares offered by an
7/// upstream Delta Sharing server.
8#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct Provider {
11    /// Unique ID of the provider.
12    #[prost(string, optional, tag="100")]
13    pub id: ::core::option::Option<::prost::alloc::string::String>,
14    /// The name of the provider.
15    #[prost(string, tag="1")]
16    pub name: ::prost::alloc::string::String,
17    /// The delta sharing authentication type.
18    #[prost(enumeration="ProviderAuthenticationType", tag="2")]
19    pub authentication_type: i32,
20    /// Username of the provider owner.
21    #[prost(string, optional, tag="3")]
22    pub owner: ::core::option::Option<::prost::alloc::string::String>,
23    /// Description about the provider.
24    #[prost(string, optional, tag="4")]
25    pub comment: ::core::option::Option<::prost::alloc::string::String>,
26    /// The recipient profile (credential file contents) used to connect to the
27    /// sharing server, present only for TOKEN authentication.
28    #[prost(string, optional, tag="5")]
29    pub recipient_profile_str: ::core::option::Option<::prost::alloc::string::String>,
30    /// A map of key-value properties attached to the provider.
31    #[prost(map="string, string", tag="6")]
32    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
33    /// Time at which this provider was created, in epoch milliseconds.
34    #[prost(int64, optional, tag="7")]
35    pub created_at: ::core::option::Option<i64>,
36    /// Username of the creator of the provider.
37    #[prost(string, optional, tag="8")]
38    pub created_by: ::core::option::Option<::prost::alloc::string::String>,
39    /// Time at which this provider was updated, in epoch milliseconds.
40    #[prost(int64, optional, tag="9")]
41    pub updated_at: ::core::option::Option<i64>,
42    /// Username of the provider updater.
43    #[prost(string, optional, tag="10")]
44    pub updated_by: ::core::option::Option<::prost::alloc::string::String>,
45}
46/// The delta sharing authentication type used by a provider.
47#[cfg_attr(feature = "python", ::pyo3::pyclass)]
48#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
49#[repr(i32)]
50pub enum ProviderAuthenticationType {
51    /// No authentication type specified.
52    Unspecified = 0,
53    /// Token-based authentication (open sharing via a credential file).
54    Token = 1,
55    /// OAuth2 client-credentials authentication.
56    OauthClientCredentials = 2,
57}
58impl ProviderAuthenticationType {
59    /// String value of the enum field names used in the ProtoBuf definition.
60    ///
61    /// The values are not transformed in any way and thus are considered stable
62    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
63    pub fn as_str_name(&self) -> &'static str {
64        match self {
65            Self::Unspecified => "PROVIDER_AUTHENTICATION_TYPE_UNSPECIFIED",
66            Self::Token => "TOKEN",
67            Self::OauthClientCredentials => "OAUTH_CLIENT_CREDENTIALS",
68        }
69    }
70    /// Creates an enum from field names used in the ProtoBuf definition.
71    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
72        match value {
73            "PROVIDER_AUTHENTICATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
74            "TOKEN" => Some(Self::Token),
75            "OAUTH_CLIENT_CREDENTIALS" => Some(Self::OauthClientCredentials),
76            _ => None,
77        }
78    }
79}
80/// Request to list providers.
81#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
82#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
83pub struct ListProvidersRequest {
84    /// The maximum number of results per page that should be returned.
85    #[prost(int32, optional, tag="1")]
86    pub max_results: ::core::option::Option<i32>,
87    /// Opaque pagination token to go to next page based on previous query.
88    #[prost(string, optional, tag="2")]
89    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
90}
91/// Response to list providers.
92#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct ListProvidersResponse {
95    /// List of providers.
96    #[prost(message, repeated, tag="1")]
97    pub providers: ::prost::alloc::vec::Vec<Provider>,
98    /// Opaque pagination token to go to next page based on previous query.
99    #[prost(string, optional, tag="2")]
100    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
101}
102/// Creates a new provider
103#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
104#[derive(Clone, PartialEq, ::prost::Message)]
105pub struct CreateProviderRequest {
106    /// Name of the provider.
107    #[prost(string, tag="1")]
108    pub name: ::prost::alloc::string::String,
109    /// The delta sharing authentication type.
110    #[prost(enumeration="ProviderAuthenticationType", tag="2")]
111    pub authentication_type: i32,
112    /// Username of the provider owner.
113    #[prost(string, optional, tag="3")]
114    pub owner: ::core::option::Option<::prost::alloc::string::String>,
115    /// Description about the provider.
116    #[prost(string, optional, tag="4")]
117    pub comment: ::core::option::Option<::prost::alloc::string::String>,
118    /// The recipient profile (credential file contents) used to connect to the
119    /// sharing server, required for TOKEN authentication.
120    #[prost(string, optional, tag="5")]
121    pub recipient_profile_str: ::core::option::Option<::prost::alloc::string::String>,
122    /// Provider properties as map of string key-value pairs.
123    #[prost(map="string, string", tag="6")]
124    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
125}
126/// Get a provider by name.
127#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
128#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
129pub struct GetProviderRequest {
130    /// Name of the provider.
131    #[prost(string, tag="1")]
132    pub name: ::prost::alloc::string::String,
133}
134/// Update a provider
135#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct UpdateProviderRequest {
138    /// Name of the provider.
139    #[prost(string, tag="1")]
140    pub name: ::prost::alloc::string::String,
141    /// New name for the provider.
142    #[prost(string, optional, tag="2")]
143    pub new_name: ::core::option::Option<::prost::alloc::string::String>,
144    /// Username of the provider owner.
145    #[prost(string, optional, tag="3")]
146    pub owner: ::core::option::Option<::prost::alloc::string::String>,
147    /// Description about the provider.
148    #[prost(string, optional, tag="4")]
149    pub comment: ::core::option::Option<::prost::alloc::string::String>,
150    /// The recipient profile (credential file contents) used to connect to the
151    /// sharing server.
152    #[prost(string, optional, tag="5")]
153    pub recipient_profile_str: ::core::option::Option<::prost::alloc::string::String>,
154    /// Provider properties as map of string key-value pairs.
155    ///
156    /// When provided in update request, the specified properties will override the existing properties.
157    /// To add and remove properties, one would need to perform a read-modify-write.
158    #[prost(map="string, string", tag="6")]
159    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
160}
161/// Delete a provider
162#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
163#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
164pub struct DeleteProviderRequest {
165    /// Name of the provider.
166    #[prost(string, tag="1")]
167    pub name: ::prost::alloc::string::String,
168}
169include!("unitycatalog.providers.v1.serde.rs");
170// @@protoc_insertion_point(module)