use super::file_scope_object::FileScopeObject;
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FileScope {
#[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
pub scope: Option<Scope>,
#[serde(rename = "object", skip_serializing_if = "Option::is_none")]
pub object: Option<Box<FileScopeObject>>,
}
impl FileScope {
pub fn new() -> FileScope {
FileScope {
scope: None,
object: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Scope {
#[serde(rename = "annotation_edit")]
AnnotationEdit,
#[serde(rename = "annotation_view_all")]
AnnotationViewAll,
#[serde(rename = "annotation_view_self")]
AnnotationViewSelf,
#[serde(rename = "base_explorer")]
BaseExplorer,
#[serde(rename = "base_picker")]
BasePicker,
#[serde(rename = "base_preview")]
BasePreview,
#[serde(rename = "base_upload")]
BaseUpload,
#[serde(rename = "item_delete")]
ItemDelete,
#[serde(rename = "item_download")]
ItemDownload,
#[serde(rename = "item_preview")]
ItemPreview,
#[serde(rename = "item_rename")]
ItemRename,
#[serde(rename = "item_share")]
ItemShare,
}
impl Default for Scope {
fn default() -> Scope {
Self::AnnotationEdit
}
}