Skip to main content

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