ydb_grpc/generated/
ydb.scheme.rs

1// This file is @generated by prost-build.
2/// Create directory.
3/// All intermediate directories must be created
4#[derive(serde::Serialize, serde::Deserialize)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct MakeDirectoryRequest {
7    #[prost(message, optional, tag = "1")]
8    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
9    #[prost(string, tag = "2")]
10    pub path: ::prost::alloc::string::String,
11}
12#[derive(serde::Serialize, serde::Deserialize)]
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct MakeDirectoryResponse {
15    #[prost(message, optional, tag = "1")]
16    pub operation: ::core::option::Option<super::operations::Operation>,
17}
18/// Remove directory
19#[derive(serde::Serialize, serde::Deserialize)]
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct RemoveDirectoryRequest {
22    #[prost(message, optional, tag = "1")]
23    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
24    #[prost(string, tag = "2")]
25    pub path: ::prost::alloc::string::String,
26}
27#[derive(serde::Serialize, serde::Deserialize)]
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct RemoveDirectoryResponse {
30    #[prost(message, optional, tag = "1")]
31    pub operation: ::core::option::Option<super::operations::Operation>,
32}
33/// List directory
34#[derive(serde::Serialize, serde::Deserialize)]
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct ListDirectoryRequest {
37    #[prost(message, optional, tag = "1")]
38    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
39    #[prost(string, tag = "2")]
40    pub path: ::prost::alloc::string::String,
41}
42#[derive(serde::Serialize, serde::Deserialize)]
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct ListDirectoryResponse {
45    /// Holds ListDirectoryResult in case of successful call
46    #[prost(message, optional, tag = "1")]
47    pub operation: ::core::option::Option<super::operations::Operation>,
48}
49#[derive(serde::Serialize, serde::Deserialize)]
50#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
51pub struct Permissions {
52    /// SID (Security ID) of user or group
53    #[prost(string, tag = "1")]
54    pub subject: ::prost::alloc::string::String,
55    #[prost(string, repeated, tag = "2")]
56    pub permission_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
57}
58#[derive(serde::Serialize, serde::Deserialize)]
59#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct Entry {
61    /// Name of scheme entry (dir2 of /dir1/dir2)
62    #[prost(string, tag = "1")]
63    pub name: ::prost::alloc::string::String,
64    /// SID (Security ID) of user or group
65    #[prost(string, tag = "2")]
66    pub owner: ::prost::alloc::string::String,
67    #[prost(enumeration = "entry::Type", tag = "5")]
68    pub r#type: i32,
69    #[prost(message, repeated, tag = "6")]
70    pub effective_permissions: ::prost::alloc::vec::Vec<Permissions>,
71    #[prost(message, repeated, tag = "7")]
72    pub permissions: ::prost::alloc::vec::Vec<Permissions>,
73    /// Size of entry in bytes. Currently filled for:
74    /// * TABLE;
75    /// * DATABASE.
76    ///   Empty (zero) in other cases.
77    #[prost(uint64, tag = "8")]
78    pub size_bytes: u64,
79    /// Virtual timestamp when the object was created
80    #[prost(message, optional, tag = "9")]
81    pub created_at: ::core::option::Option<super::VirtualTimestamp>,
82}
83/// Nested message and enum types in `Entry`.
84pub mod entry {
85    #[derive(serde::Serialize, serde::Deserialize)]
86    #[derive(
87        Clone,
88        Copy,
89        Debug,
90        PartialEq,
91        Eq,
92        Hash,
93        PartialOrd,
94        Ord,
95        ::prost::Enumeration
96    )]
97    #[repr(i32)]
98    pub enum Type {
99        Unspecified = 0,
100        Directory = 1,
101        Table = 2,
102        PersQueueGroup = 3,
103        Database = 4,
104        RtmrVolume = 5,
105        BlockStoreVolume = 6,
106        CoordinationNode = 7,
107        ColumnStore = 12,
108        ColumnTable = 13,
109        Sequence = 15,
110        Replication = 16,
111        Topic = 17,
112        ExternalTable = 18,
113        ExternalDataSource = 19,
114        View = 20,
115    }
116    impl Type {
117        /// String value of the enum field names used in the ProtoBuf definition.
118        /// The values are not transformed in any way and thus are considered stable
119        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
120        pub fn as_str_name(&self) -> &'static str {
121            match self {
122                Self::Unspecified => "TYPE_UNSPECIFIED",
123                Self::Directory => "DIRECTORY",
124                Self::Table => "TABLE",
125                Self::PersQueueGroup => "PERS_QUEUE_GROUP",
126                Self::Database => "DATABASE",
127                Self::RtmrVolume => "RTMR_VOLUME",
128                Self::BlockStoreVolume => "BLOCK_STORE_VOLUME",
129                Self::CoordinationNode => "COORDINATION_NODE",
130                Self::ColumnStore => "COLUMN_STORE",
131                Self::ColumnTable => "COLUMN_TABLE",
132                Self::Sequence => "SEQUENCE",
133                Self::Replication => "REPLICATION",
134                Self::Topic => "TOPIC",
135                Self::ExternalTable => "EXTERNAL_TABLE",
136                Self::ExternalDataSource => "EXTERNAL_DATA_SOURCE",
137                Self::View => "VIEW",
138            }
139        }
140        /// Creates an enum from field names used in the ProtoBuf definition.
141        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
142            match value {
143                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
144                "DIRECTORY" => Some(Self::Directory),
145                "TABLE" => Some(Self::Table),
146                "PERS_QUEUE_GROUP" => Some(Self::PersQueueGroup),
147                "DATABASE" => Some(Self::Database),
148                "RTMR_VOLUME" => Some(Self::RtmrVolume),
149                "BLOCK_STORE_VOLUME" => Some(Self::BlockStoreVolume),
150                "COORDINATION_NODE" => Some(Self::CoordinationNode),
151                "COLUMN_STORE" => Some(Self::ColumnStore),
152                "COLUMN_TABLE" => Some(Self::ColumnTable),
153                "SEQUENCE" => Some(Self::Sequence),
154                "REPLICATION" => Some(Self::Replication),
155                "TOPIC" => Some(Self::Topic),
156                "EXTERNAL_TABLE" => Some(Self::ExternalTable),
157                "EXTERNAL_DATA_SOURCE" => Some(Self::ExternalDataSource),
158                "VIEW" => Some(Self::View),
159                _ => None,
160            }
161        }
162    }
163}
164#[derive(serde::Serialize, serde::Deserialize)]
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct ListDirectoryResult {
167    #[prost(message, optional, tag = "1")]
168    pub self_: ::core::option::Option<Entry>,
169    #[prost(message, repeated, tag = "2")]
170    pub children: ::prost::alloc::vec::Vec<Entry>,
171}
172/// Returns information about object with given path
173#[derive(serde::Serialize, serde::Deserialize)]
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct DescribePathRequest {
176    #[prost(message, optional, tag = "1")]
177    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
178    #[prost(string, tag = "2")]
179    pub path: ::prost::alloc::string::String,
180}
181#[derive(serde::Serialize, serde::Deserialize)]
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct DescribePathResponse {
184    /// Holds DescribePathResult in case of DescribePathResult
185    #[prost(message, optional, tag = "1")]
186    pub operation: ::core::option::Option<super::operations::Operation>,
187}
188#[derive(serde::Serialize, serde::Deserialize)]
189#[derive(Clone, PartialEq, ::prost::Message)]
190pub struct DescribePathResult {
191    #[prost(message, optional, tag = "1")]
192    pub self_: ::core::option::Option<Entry>,
193}
194#[derive(serde::Serialize, serde::Deserialize)]
195#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
196pub struct PermissionsAction {
197    #[prost(oneof = "permissions_action::Action", tags = "1, 2, 3, 4")]
198    pub action: ::core::option::Option<permissions_action::Action>,
199}
200/// Nested message and enum types in `PermissionsAction`.
201pub mod permissions_action {
202    #[derive(serde::Serialize, serde::Deserialize)]
203    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
204    pub enum Action {
205        /// Grant permissions
206        #[prost(message, tag = "1")]
207        Grant(super::Permissions),
208        /// Revoke permissions
209        #[prost(message, tag = "2")]
210        Revoke(super::Permissions),
211        /// Rewrite permissions for given subject (last set win in case of multiple set for one subject)
212        #[prost(message, tag = "3")]
213        Set(super::Permissions),
214        /// New owner for object
215        #[prost(string, tag = "4")]
216        ChangeOwner(::prost::alloc::string::String),
217    }
218}
219/// Modify permissions of given object
220#[derive(serde::Serialize, serde::Deserialize)]
221#[derive(Clone, PartialEq, ::prost::Message)]
222pub struct ModifyPermissionsRequest {
223    #[prost(message, optional, tag = "1")]
224    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
225    #[prost(string, tag = "2")]
226    pub path: ::prost::alloc::string::String,
227    #[prost(message, repeated, tag = "3")]
228    pub actions: ::prost::alloc::vec::Vec<PermissionsAction>,
229    /// Clear all permissions on the object for all subjects
230    #[prost(bool, tag = "4")]
231    pub clear_permissions: bool,
232    #[prost(oneof = "modify_permissions_request::Inheritance", tags = "5")]
233    pub inheritance: ::core::option::Option<modify_permissions_request::Inheritance>,
234}
235/// Nested message and enum types in `ModifyPermissionsRequest`.
236pub mod modify_permissions_request {
237    #[derive(serde::Serialize, serde::Deserialize)]
238    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
239    pub enum Inheritance {
240        #[prost(bool, tag = "5")]
241        InterruptInheritance(bool),
242    }
243}
244#[derive(serde::Serialize, serde::Deserialize)]
245#[derive(Clone, PartialEq, ::prost::Message)]
246pub struct ModifyPermissionsResponse {
247    #[prost(message, optional, tag = "1")]
248    pub operation: ::core::option::Option<super::operations::Operation>,
249}