Skip to main content

unitycatalog_common/models/_gen/
unitycatalog.volumes.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 Volume {
6    /// Name of volume, relative to parent schema.
7    #[prost(string, tag="1")]
8    pub name: ::prost::alloc::string::String,
9    /// Name of parent catalog.
10    #[prost(string, tag="2")]
11    pub catalog_name: ::prost::alloc::string::String,
12    /// Name of parent schema.
13    #[prost(string, tag="3")]
14    pub schema_name: ::prost::alloc::string::String,
15    /// The three-level (fully qualified) name of the volume
16    #[prost(string, tag="4")]
17    pub full_name: ::prost::alloc::string::String,
18    /// The storage location on the cloud
19    #[prost(string, tag="5")]
20    pub storage_location: ::prost::alloc::string::String,
21    /// The unique identifier of the volume
22    #[prost(string, tag="6")]
23    pub volume_id: ::prost::alloc::string::String,
24    /// The type of the volume.
25    ///
26    /// An external volume is located in the specified external location.
27    /// A managed volume is located in the default location which is specified
28    /// by the parent schema, or the parent catalog, or the Metastore.
29    #[prost(enumeration="VolumeType", tag="7")]
30    pub volume_type: i32,
31    /// Username of current owner of table.
32    #[prost(string, optional, tag="8")]
33    pub owner: ::core::option::Option<::prost::alloc::string::String>,
34    /// User-provided free-form text description.
35    #[prost(string, optional, tag="9")]
36    pub comment: ::core::option::Option<::prost::alloc::string::String>,
37    /// Time at which this catalog was created, in epoch milliseconds.
38    #[prost(int64, optional, tag="1000")]
39    pub created_at: ::core::option::Option<i64>,
40    /// Username of catalog creator.
41    #[prost(string, optional, tag="1001")]
42    pub created_by: ::core::option::Option<::prost::alloc::string::String>,
43    /// Time at which this catalog was last updated, in epoch milliseconds.
44    #[prost(int64, optional, tag="1002")]
45    pub updated_at: ::core::option::Option<i64>,
46    /// Username of user who last modified catalog.
47    #[prost(string, optional, tag="1003")]
48    pub updated_by: ::core::option::Option<::prost::alloc::string::String>,
49    /// Indicates whether the principal is limited to retrieving metadata
50    /// for the associated object through the BROWSE privilege when include_browse
51    /// is enabled in the request.
52    #[prost(bool, optional, tag="1004")]
53    pub browse_only: ::core::option::Option<bool>,
54    /// The unique identifier of the metastore
55    #[prost(string, optional, tag="1005")]
56    pub metastore_id: ::core::option::Option<::prost::alloc::string::String>,
57}
58#[cfg_attr(feature = "python", ::pyo3::pyclass)]
59#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
60#[repr(i32)]
61pub enum VolumeType {
62    Unspecified = 0,
63    External = 1,
64    Managed = 2,
65}
66impl VolumeType {
67    /// String value of the enum field names used in the ProtoBuf definition.
68    ///
69    /// The values are not transformed in any way and thus are considered stable
70    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
71    pub fn as_str_name(&self) -> &'static str {
72        match self {
73            Self::Unspecified => "VOLUME_TYPE_UNSPECIFIED",
74            Self::External => "EXTERNAL",
75            Self::Managed => "MANAGED",
76        }
77    }
78    /// Creates an enum from field names used in the ProtoBuf definition.
79    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
80        match value {
81            "VOLUME_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
82            "EXTERNAL" => Some(Self::External),
83            "MANAGED" => Some(Self::Managed),
84            _ => None,
85        }
86    }
87}
88/// List volumes
89#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
90#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
91pub struct ListVolumesRequest {
92    /// The identifier of the catalog
93    #[prost(string, tag="1")]
94    pub catalog_name: ::prost::alloc::string::String,
95    /// The identifier of the schema
96    #[prost(string, tag="2")]
97    pub schema_name: ::prost::alloc::string::String,
98    /// The maximum number of results per page that should be returned.
99    #[prost(int32, optional, tag="3")]
100    pub max_results: ::core::option::Option<i32>,
101    /// Opaque pagination token to go to next page based on previous query.
102    #[prost(string, optional, tag="4")]
103    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
104    /// Whether to include schemas in the response for which the principal can only access selective metadata for
105    #[prost(bool, optional, tag="5")]
106    pub include_browse: ::core::option::Option<bool>,
107}
108/// List Schemas response.
109#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct ListVolumesResponse {
112    /// The volumes returned.
113    #[prost(message, repeated, tag="1")]
114    pub volumes: ::prost::alloc::vec::Vec<Volume>,
115    /// Opaque token to retrieve the next page of results.
116    ///
117    /// Absent if there are no more pages. page_token should be set to
118    /// this value for the next request to retrieve the next page of results.
119    #[prost(string, optional, tag="2")]
120    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
121}
122/// Create a new Volume
123#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
124#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
125pub struct CreateVolumeRequest {
126    /// The identifier of the catalog
127    #[prost(string, tag="1")]
128    pub catalog_name: ::prost::alloc::string::String,
129    /// The identifier of the schema
130    #[prost(string, tag="2")]
131    pub schema_name: ::prost::alloc::string::String,
132    /// The identifier of the volume
133    #[prost(string, tag="3")]
134    pub name: ::prost::alloc::string::String,
135    /// The type of the volume.
136    ///
137    /// An external volume is located in the specified external location.
138    /// A managed volume is located in the default location which is specified
139    /// by the parent schema, or the parent catalog, or the Metastore.
140    #[prost(enumeration="VolumeType", tag="4")]
141    pub volume_type: i32,
142    /// The storage location on the cloud
143    #[prost(string, optional, tag="5")]
144    pub storage_location: ::core::option::Option<::prost::alloc::string::String>,
145    /// The storage location on the cloud
146    #[prost(string, optional, tag="6")]
147    pub comment: ::core::option::Option<::prost::alloc::string::String>,
148}
149#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
150#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
151pub struct GetVolumeRequest {
152    /// The three-level (fully qualified) name of the volume
153    #[prost(string, tag="1")]
154    pub name: ::prost::alloc::string::String,
155    /// Whether to include schemas in the response for which the principal can only access selective metadata for
156    #[prost(bool, optional, tag="1005")]
157    pub include_browse: ::core::option::Option<bool>,
158}
159#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
160#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
161pub struct UpdateVolumeRequest {
162    /// The three-level (fully qualified) name of the volume
163    #[prost(string, tag="1")]
164    pub name: ::prost::alloc::string::String,
165    /// New name for the volume.
166    #[prost(string, optional, tag="2")]
167    pub new_name: ::core::option::Option<::prost::alloc::string::String>,
168    /// The comment attached to the volume
169    #[prost(string, optional, tag="3")]
170    pub comment: ::core::option::Option<::prost::alloc::string::String>,
171    /// The identifier of the user who owns the volume
172    #[prost(string, optional, tag="4")]
173    pub owner: ::core::option::Option<::prost::alloc::string::String>,
174}
175#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
176#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
177pub struct DeleteVolumeRequest {
178    /// The three-level (fully qualified) name of the volume
179    #[prost(string, tag="1")]
180    pub name: ::prost::alloc::string::String,
181}
182include!("unitycatalog.volumes.v1.serde.rs");
183// @@protoc_insertion_point(module)