ydb-grpc 0.2.2

Crate contains generated low-level grpc code from YDB API protobuf, used as base for ydb crate
Documentation
// This file is @generated by prost-build.
/// Create directory.
/// All intermediate directories must be created
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MakeDirectoryRequest {
    #[prost(message, optional, tag = "1")]
    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MakeDirectoryResponse {
    #[prost(message, optional, tag = "1")]
    pub operation: ::core::option::Option<super::operations::Operation>,
}
/// Remove directory
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveDirectoryRequest {
    #[prost(message, optional, tag = "1")]
    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveDirectoryResponse {
    #[prost(message, optional, tag = "1")]
    pub operation: ::core::option::Option<super::operations::Operation>,
}
/// List directory
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDirectoryRequest {
    #[prost(message, optional, tag = "1")]
    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDirectoryResponse {
    /// Holds ListDirectoryResult in case of successful call
    #[prost(message, optional, tag = "1")]
    pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Permissions {
    /// SID (Security ID) of user or group
    #[prost(string, tag = "1")]
    pub subject: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub permission_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entry {
    /// Name of scheme entry (dir2 of /dir1/dir2)
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// SID (Security ID) of user or group
    #[prost(string, tag = "2")]
    pub owner: ::prost::alloc::string::String,
    #[prost(enumeration = "entry::Type", tag = "5")]
    pub r#type: i32,
    #[prost(message, repeated, tag = "6")]
    pub effective_permissions: ::prost::alloc::vec::Vec<Permissions>,
    #[prost(message, repeated, tag = "7")]
    pub permissions: ::prost::alloc::vec::Vec<Permissions>,
    /// Size of entry in bytes. Currently filled for:
    /// * TABLE;
    /// * DATABASE.
    ///   Empty (zero) in other cases.
    #[prost(uint64, tag = "8")]
    pub size_bytes: u64,
    /// Virtual timestamp when the object was created
    #[prost(message, optional, tag = "9")]
    pub created_at: ::core::option::Option<super::VirtualTimestamp>,
}
/// Nested message and enum types in `Entry`.
pub mod entry {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        Unspecified = 0,
        Directory = 1,
        Table = 2,
        PersQueueGroup = 3,
        Database = 4,
        RtmrVolume = 5,
        BlockStoreVolume = 6,
        CoordinationNode = 7,
        ColumnStore = 12,
        ColumnTable = 13,
        Sequence = 15,
        Replication = 16,
        Topic = 17,
        ExternalTable = 18,
        ExternalDataSource = 19,
        View = 20,
        ResourcePool = 21,
        Transfer = 23,
        SysView = 24,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::Directory => "DIRECTORY",
                Self::Table => "TABLE",
                Self::PersQueueGroup => "PERS_QUEUE_GROUP",
                Self::Database => "DATABASE",
                Self::RtmrVolume => "RTMR_VOLUME",
                Self::BlockStoreVolume => "BLOCK_STORE_VOLUME",
                Self::CoordinationNode => "COORDINATION_NODE",
                Self::ColumnStore => "COLUMN_STORE",
                Self::ColumnTable => "COLUMN_TABLE",
                Self::Sequence => "SEQUENCE",
                Self::Replication => "REPLICATION",
                Self::Topic => "TOPIC",
                Self::ExternalTable => "EXTERNAL_TABLE",
                Self::ExternalDataSource => "EXTERNAL_DATA_SOURCE",
                Self::View => "VIEW",
                Self::ResourcePool => "RESOURCE_POOL",
                Self::Transfer => "TRANSFER",
                Self::SysView => "SYS_VIEW",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "DIRECTORY" => Some(Self::Directory),
                "TABLE" => Some(Self::Table),
                "PERS_QUEUE_GROUP" => Some(Self::PersQueueGroup),
                "DATABASE" => Some(Self::Database),
                "RTMR_VOLUME" => Some(Self::RtmrVolume),
                "BLOCK_STORE_VOLUME" => Some(Self::BlockStoreVolume),
                "COORDINATION_NODE" => Some(Self::CoordinationNode),
                "COLUMN_STORE" => Some(Self::ColumnStore),
                "COLUMN_TABLE" => Some(Self::ColumnTable),
                "SEQUENCE" => Some(Self::Sequence),
                "REPLICATION" => Some(Self::Replication),
                "TOPIC" => Some(Self::Topic),
                "EXTERNAL_TABLE" => Some(Self::ExternalTable),
                "EXTERNAL_DATA_SOURCE" => Some(Self::ExternalDataSource),
                "VIEW" => Some(Self::View),
                "RESOURCE_POOL" => Some(Self::ResourcePool),
                "TRANSFER" => Some(Self::Transfer),
                "SYS_VIEW" => Some(Self::SysView),
                _ => None,
            }
        }
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDirectoryResult {
    #[prost(message, optional, tag = "1")]
    pub self_: ::core::option::Option<Entry>,
    #[prost(message, repeated, tag = "2")]
    pub children: ::prost::alloc::vec::Vec<Entry>,
}
/// Returns information about object with given path
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribePathRequest {
    #[prost(message, optional, tag = "1")]
    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribePathResponse {
    /// Holds DescribePathResult in case of DescribePathResult
    #[prost(message, optional, tag = "1")]
    pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribePathResult {
    #[prost(message, optional, tag = "1")]
    pub self_: ::core::option::Option<Entry>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PermissionsAction {
    #[prost(oneof = "permissions_action::Action", tags = "1, 2, 3, 4")]
    pub action: ::core::option::Option<permissions_action::Action>,
}
/// Nested message and enum types in `PermissionsAction`.
pub mod permissions_action {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Action {
        /// Grant permissions
        #[prost(message, tag = "1")]
        Grant(super::Permissions),
        /// Revoke permissions
        #[prost(message, tag = "2")]
        Revoke(super::Permissions),
        /// Rewrite permissions for given subject (last set win in case of multiple set for one subject)
        #[prost(message, tag = "3")]
        Set(super::Permissions),
        /// New owner for object
        #[prost(string, tag = "4")]
        ChangeOwner(::prost::alloc::string::String),
    }
}
/// Modify permissions of given object
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModifyPermissionsRequest {
    #[prost(message, optional, tag = "1")]
    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "3")]
    pub actions: ::prost::alloc::vec::Vec<PermissionsAction>,
    /// Clear all permissions on the object for all subjects
    #[prost(bool, tag = "4")]
    pub clear_permissions: bool,
    #[prost(oneof = "modify_permissions_request::Inheritance", tags = "5")]
    pub inheritance: ::core::option::Option<modify_permissions_request::Inheritance>,
}
/// Nested message and enum types in `ModifyPermissionsRequest`.
pub mod modify_permissions_request {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Inheritance {
        #[prost(bool, tag = "5")]
        InterruptInheritance(bool),
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModifyPermissionsResponse {
    #[prost(message, optional, tag = "1")]
    pub operation: ::core::option::Option<super::operations::Operation>,
}