ydb_grpc_bindings/generated/
ydb.scheme.rs

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