goosefs-sdk 0.1.0

GooseFS Rust gRPC Client - Direct gRPC client for GooseFS Master/Worker
Documentation
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AclActions {
    #[prost(enumeration = "AclAction", repeated, packed = "false", tag = "1")]
    pub actions: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AclEntry {
    #[prost(enumeration = "AclEntryType", optional, tag = "1")]
    pub r#type: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "2")]
    pub subject: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(enumeration = "AclAction", repeated, packed = "false", tag = "3")]
    pub actions: ::prost::alloc::vec::Vec<i32>,
    #[prost(bool, optional, tag = "4")]
    pub is_default: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NamedAclActions {
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "2")]
    pub actions: ::core::option::Option<AclActions>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessControlList {
    #[prost(string, optional, tag = "1")]
    pub owning_user: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub owning_group: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, repeated, tag = "3")]
    pub user_actions: ::prost::alloc::vec::Vec<NamedAclActions>,
    #[prost(message, repeated, tag = "4")]
    pub group_actions: ::prost::alloc::vec::Vec<NamedAclActions>,
    #[prost(message, optional, tag = "5")]
    pub mask_actions: ::core::option::Option<AclActions>,
    #[prost(message, optional, tag = "6")]
    pub other_actions: ::core::option::Option<AclActions>,
    #[prost(bool, optional, tag = "7")]
    pub is_default: ::core::option::Option<bool>,
    #[prost(bool, optional, tag = "8")]
    pub is_empty: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AclAction {
    Read = 0,
    Write = 1,
    Execute = 2,
}
impl AclAction {
    /// 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::Read => "READ",
            Self::Write => "WRITE",
            Self::Execute => "EXECUTE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "READ" => Some(Self::Read),
            "WRITE" => Some(Self::Write),
            "EXECUTE" => Some(Self::Execute),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AclEntryType {
    Owner = 0,
    NamedUser = 1,
    OwningGroup = 2,
    NamedGroup = 3,
    Mask = 4,
    Other = 5,
}
impl AclEntryType {
    /// 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::Owner => "OWNER",
            Self::NamedUser => "NAMED_USER",
            Self::OwningGroup => "OWNING_GROUP",
            Self::NamedGroup => "NAMED_GROUP",
            Self::Mask => "MASK",
            Self::Other => "OTHER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OWNER" => Some(Self::Owner),
            "NAMED_USER" => Some(Self::NamedUser),
            "OWNING_GROUP" => Some(Self::OwningGroup),
            "NAMED_GROUP" => Some(Self::NamedGroup),
            "MASK" => Some(Self::Mask),
            "OTHER" => Some(Self::Other),
            _ => None,
        }
    }
}