Skip to main content

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

1// @generated
2// This file is @generated by prost-build.
3/// A catalog is a root-level namespace that contains schemas.
4#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Catalog {
7    /// Name of catalog.
8    #[prost(string, tag="1")]
9    pub name: ::prost::alloc::string::String,
10    /// Unique identifier for the catalog.
11    #[prost(string, optional, tag="2")]
12    pub id: ::core::option::Option<::prost::alloc::string::String>,
13    /// Username of current owner of catalog.
14    #[prost(string, optional, tag="3")]
15    pub owner: ::core::option::Option<::prost::alloc::string::String>,
16    /// User-provided free-form text description.
17    #[prost(string, optional, tag="4")]
18    pub comment: ::core::option::Option<::prost::alloc::string::String>,
19    /// A map of key-value properties attached to the securable.
20    #[prost(map="string, string", tag="5")]
21    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
22    /// Storage root URL for managed tables within catalog.
23    #[prost(string, optional, tag="6")]
24    pub storage_root: ::core::option::Option<::prost::alloc::string::String>,
25    /// The name of delta sharing provider.
26    ///
27    /// A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server.
28    #[prost(string, optional, tag="7")]
29    pub provider_name: ::core::option::Option<::prost::alloc::string::String>,
30    /// The name of the share under the share provider.
31    #[prost(string, optional, tag="8")]
32    pub share_name: ::core::option::Option<::prost::alloc::string::String>,
33    /// The type of the catalog.
34    #[prost(enumeration="CatalogType", optional, tag="9")]
35    pub catalog_type: ::core::option::Option<i32>,
36    /// Storage location URL (full path) for managed storage of the catalog.
37    ///
38    /// A unique path under `storage_root`, used as the managed-storage parent for
39    /// managed tables/volumes whose schema has no storage location of its own.
40    /// Absent when the catalog has no `storage_root`.
41    /// Example: `s3://bucket/ucroot/__unitystorage/catalogs/{catalog_id}`.
42    #[prost(string, optional, tag="10")]
43    pub storage_location: ::core::option::Option<::prost::alloc::string::String>,
44    /// Time at which this catalog was created, in epoch milliseconds.
45    #[prost(int64, optional, tag="1000")]
46    pub created_at: ::core::option::Option<i64>,
47    /// Username of catalog creator.
48    #[prost(string, optional, tag="1001")]
49    pub created_by: ::core::option::Option<::prost::alloc::string::String>,
50    /// Time at which this catalog was last updated, in epoch milliseconds.
51    #[prost(int64, optional, tag="1002")]
52    pub updated_at: ::core::option::Option<i64>,
53    /// Username of user who last modified catalog.
54    #[prost(string, optional, tag="1003")]
55    pub updated_by: ::core::option::Option<::prost::alloc::string::String>,
56    /// Indicates whether the principal is limited to retrieving metadata
57    /// for the associated object through the BROWSE privilege when include_browse
58    /// is enabled in the request.
59    #[prost(bool, optional, tag="1004")]
60    pub browse_only: ::core::option::Option<bool>,
61}
62/// The type of the catalog.
63#[cfg_attr(feature = "python", ::pyo3::pyclass)]
64#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
65#[repr(i32)]
66pub enum CatalogType {
67    /// Unknown catalog type.
68    Unspecified = 0,
69    ManagedCatalog = 1,
70    DeltasharingCatalog = 2,
71    SystemCatalog = 3,
72}
73impl CatalogType {
74    /// String value of the enum field names used in the ProtoBuf definition.
75    ///
76    /// The values are not transformed in any way and thus are considered stable
77    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
78    pub fn as_str_name(&self) -> &'static str {
79        match self {
80            Self::Unspecified => "CATALOG_TYPE_UNSPECIFIED",
81            Self::ManagedCatalog => "MANAGED_CATALOG",
82            Self::DeltasharingCatalog => "DELTASHARING_CATALOG",
83            Self::SystemCatalog => "SYSTEM_CATALOG",
84        }
85    }
86    /// Creates an enum from field names used in the ProtoBuf definition.
87    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
88        match value {
89            "CATALOG_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
90            "MANAGED_CATALOG" => Some(Self::ManagedCatalog),
91            "DELTASHARING_CATALOG" => Some(Self::DeltasharingCatalog),
92            "SYSTEM_CATALOG" => Some(Self::SystemCatalog),
93            _ => None,
94        }
95    }
96}
97/// List catalogs
98#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
99#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
100pub struct ListCatalogsRequest {
101    /// The maximum number of results per page that should be returned.
102    #[prost(int32, optional, tag="2")]
103    pub max_results: ::core::option::Option<i32>,
104    /// Opaque pagination token to go to next page based on previous query.
105    #[prost(string, optional, tag="3")]
106    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
107}
108/// List catalogs response.
109#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct ListCatalogsResponse {
112    /// The catalogs returned.
113    #[prost(message, repeated, tag="1")]
114    pub catalogs: ::prost::alloc::vec::Vec<Catalog>,
115    /// The next_page_token value to include in the next List request.
116    #[prost(string, optional, tag="2")]
117    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
118}
119/// Create a new catalog
120#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
121#[derive(Clone, PartialEq, ::prost::Message)]
122pub struct CreateCatalogRequest {
123    /// Name of catalog.
124    #[prost(string, tag="1")]
125    pub name: ::prost::alloc::string::String,
126    /// User-provided free-form text description.
127    #[prost(string, optional, tag="2")]
128    pub comment: ::core::option::Option<::prost::alloc::string::String>,
129    /// A map of key-value properties attached to the securable.
130    #[prost(map="string, string", tag="3")]
131    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
132    /// Storage root URL for managed tables within catalog.
133    #[prost(string, optional, tag="4")]
134    pub storage_root: ::core::option::Option<::prost::alloc::string::String>,
135    /// The name of delta sharing provider.
136    ///
137    /// A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server.
138    #[prost(string, optional, tag="5")]
139    pub provider_name: ::core::option::Option<::prost::alloc::string::String>,
140    /// The name of the share under the share provider.
141    #[prost(string, optional, tag="6")]
142    pub share_name: ::core::option::Option<::prost::alloc::string::String>,
143}
144/// Get a catalog
145#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
146#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
147pub struct GetCatalogRequest {
148    /// Name of catalog.
149    #[prost(string, tag="1")]
150    pub name: ::prost::alloc::string::String,
151    /// Whether to include catalogs in the response for which the principal can only access selective metadata for
152    #[prost(bool, optional, tag="2")]
153    pub include_browse: ::core::option::Option<bool>,
154}
155/// Update a catalog
156#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct UpdateCatalogRequest {
159    /// Name of catalog.
160    #[prost(string, tag="1")]
161    pub name: ::prost::alloc::string::String,
162    /// Username of new owner of catalog.
163    #[prost(string, optional, tag="2")]
164    pub owner: ::core::option::Option<::prost::alloc::string::String>,
165    /// User-provided free-form text description.
166    #[prost(string, optional, tag="3")]
167    pub comment: ::core::option::Option<::prost::alloc::string::String>,
168    /// A map of key-value properties attached to the securable.
169    ///
170    /// When provided in update request, the specified properties will override the existing properties.
171    /// To add and remove properties, one would need to perform a read-modify-write.
172    #[prost(map="string, string", tag="4")]
173    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
174    /// Name of catalog.
175    #[prost(string, optional, tag="5")]
176    pub new_name: ::core::option::Option<::prost::alloc::string::String>,
177}
178/// Delete a catalog
179#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
180#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
181pub struct DeleteCatalogRequest {
182    /// Name of catalog.
183    #[prost(string, tag="1")]
184    pub name: ::prost::alloc::string::String,
185    /// Force deletion even if the catalog is not empty.
186    #[prost(bool, optional, tag="2")]
187    pub force: ::core::option::Option<bool>,
188}
189include!("unitycatalog.catalogs.v1.serde.rs");
190// @@protoc_insertion_point(module)