Skip to main content

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

1// @generated
2// This file is @generated by prost-build.
3/// A schema is a namespace within a catalog that contains tables.
4#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Schema {
7    /// Name of schema, relative to parent catalog.
8    #[prost(string, tag="1")]
9    pub name: ::prost::alloc::string::String,
10    /// Name of parent catalog.
11    #[prost(string, tag="2")]
12    pub catalog_name: ::prost::alloc::string::String,
13    /// Full name of schema, in form of catalog_name.schema_name.
14    #[prost(string, tag="3")]
15    pub full_name: ::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    /// Username of current owner of schema.
23    #[prost(string, optional, tag="6")]
24    pub owner: ::core::option::Option<::prost::alloc::string::String>,
25    /// Time at which this schema was created, in epoch milliseconds.
26    #[prost(int64, optional, tag="7")]
27    pub created_at: ::core::option::Option<i64>,
28    /// Username of schema creator.
29    #[prost(string, optional, tag="8")]
30    pub created_by: ::core::option::Option<::prost::alloc::string::String>,
31    /// Time at which this schema was last updated, in epoch milliseconds.
32    #[prost(int64, optional, tag="9")]
33    pub updated_at: ::core::option::Option<i64>,
34    /// Username of user who last modified schema.
35    #[prost(string, optional, tag="10")]
36    pub updated_by: ::core::option::Option<::prost::alloc::string::String>,
37    /// Unique identifier for the schema.
38    #[prost(string, optional, tag="11")]
39    pub schema_id: ::core::option::Option<::prost::alloc::string::String>,
40    /// Storage root URL for managed storage location of the schema.
41    ///
42    /// Can be set when creating a schema. When set, managed tables/volumes created
43    /// in this schema are rooted here; otherwise the parent catalog's storage
44    /// location is used. Example: `s3://bucket/ucroot`.
45    #[prost(string, optional, tag="12")]
46    pub storage_root: ::core::option::Option<::prost::alloc::string::String>,
47    /// Storage location URL (full path) for managed storage of the schema.
48    ///
49    /// A unique path under `storage_root`. Absent when the schema has no
50    /// `storage_root`, in which case managed securables fall back to the parent
51    /// catalog's storage location.
52    /// Example: `s3://bucket/ucroot/__unitystorage/schemas/{schema_id}`.
53    #[prost(string, optional, tag="13")]
54    pub storage_location: ::core::option::Option<::prost::alloc::string::String>,
55}
56/// List Schemas in a catalog
57#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
58#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
59pub struct ListSchemasRequest {
60    /// Name of parent catalog.
61    #[prost(string, tag="1")]
62    pub catalog_name: ::prost::alloc::string::String,
63    /// The maximum number of results per page that should be returned.
64    #[prost(int32, optional, tag="2")]
65    pub max_results: ::core::option::Option<i32>,
66    /// Opaque pagination token to go to next page based on previous query.
67    #[prost(string, optional, tag="3")]
68    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
69    /// Whether to include schemas in the response for which the principal can only access selective metadata for
70    #[prost(bool, optional, tag="4")]
71    pub include_browse: ::core::option::Option<bool>,
72}
73/// List Schemas response.
74#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct ListSchemasResponse {
77    /// The schemas returned.
78    #[prost(message, repeated, tag="1")]
79    pub schemas: ::prost::alloc::vec::Vec<Schema>,
80    /// The next_page_token value to include in the next List request.
81    #[prost(string, optional, tag="2")]
82    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
83}
84/// Create a new Schema
85#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct CreateSchemaRequest {
88    /// Name of schema, relative to parent catalog.
89    #[prost(string, tag="1")]
90    pub name: ::prost::alloc::string::String,
91    /// Name of parent catalog.
92    #[prost(string, tag="2")]
93    pub catalog_name: ::prost::alloc::string::String,
94    /// User-provided free-form text description.
95    #[prost(string, optional, tag="3")]
96    pub comment: ::core::option::Option<::prost::alloc::string::String>,
97    /// A map of key-value properties attached to the securable.
98    #[prost(map="string, string", tag="4")]
99    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
100    /// Storage root URL for managed storage location of the schema.
101    ///
102    /// If not set, managed securables under this schema fall back to the parent
103    /// catalog's storage location. Example: `s3://bucket/ucroot`.
104    #[prost(string, optional, tag="5")]
105    pub storage_root: ::core::option::Option<::prost::alloc::string::String>,
106}
107/// Get a Schema
108#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
109#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
110pub struct GetSchemaRequest {
111    /// Full name of schema.
112    ///
113    /// Format: catalog_name.schema_name
114    #[prost(string, tag="1")]
115    pub full_name: ::prost::alloc::string::String,
116}
117/// Update a Schema
118#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct UpdateSchemaRequest {
121    /// Full name of schema, in form of catalog_name.schema_name.
122    #[prost(string, tag="1")]
123    pub full_name: ::prost::alloc::string::String,
124    /// User-provided free-form text description.
125    #[prost(string, optional, tag="2")]
126    pub comment: ::core::option::Option<::prost::alloc::string::String>,
127    /// A map of key-value properties attached to the securable.
128    ///
129    /// When provided in update request, the specified properties will override the existing properties.
130    /// To add and remove properties, one would need to perform a read-modify-write.
131    #[prost(map="string, string", tag="3")]
132    pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
133    /// Name of schema.
134    #[prost(string, optional, tag="4")]
135    pub new_name: ::core::option::Option<::prost::alloc::string::String>,
136}
137/// Delete a Schema
138#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
139#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
140pub struct DeleteSchemaRequest {
141    /// Full name of schema to delete.
142    ///
143    /// Format: catalog_name.schema_name
144    #[prost(string, tag="1")]
145    pub full_name: ::prost::alloc::string::String,
146    /// Force deletion even if the schema is not empty.
147    #[prost(bool, optional, tag="2")]
148    pub force: ::core::option::Option<bool>,
149}
150include!("unitycatalog.schemas.v1.serde.rs");
151// @@protoc_insertion_point(module)