atrium-api 0.26.0

API library for AT Protocol (Bluesky)
Documentation
// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `tools.ozone.report.reassignQueue` namespace.
pub const NSID: &str = "tools.ozone.report.reassignQueue";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct InputData {
    ///Optional moderator-only note recorded on the resulting queueActivity as internalNote.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Target queue ID. Use -1 to unassign from any queue.
    pub queue_id: i64,
    ///ID of the report to reassign
    pub report_id: i64,
}
pub type Input = crate::types::Object<InputData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct OutputData {
    pub report: crate::tools::ozone::report::defs::ReportView,
}
pub type Output = crate::types::Object<OutputData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
    ///No report exists with the given reportId
    ReportNotFound(Option<String>),
    ///The report is closed and cannot be reassigned
    ReportClosed(Option<String>),
    ///The report is already assigned to the target queue
    AlreadyInTargetQueue(Option<String>),
    ///No active queue exists with the given queueId
    QueueNotFound(Option<String>),
    ///The target queue is disabled and cannot receive new assignments
    QueueDisabled(Option<String>),
}
impl std::fmt::Display for Error {
    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Error::ReportNotFound(msg) => {
                write!(_f, "ReportNotFound")?;
                if let Some(msg) = msg {
                    write!(_f, ": {msg}")?;
                }
            }
            Error::ReportClosed(msg) => {
                write!(_f, "ReportClosed")?;
                if let Some(msg) = msg {
                    write!(_f, ": {msg}")?;
                }
            }
            Error::AlreadyInTargetQueue(msg) => {
                write!(_f, "AlreadyInTargetQueue")?;
                if let Some(msg) = msg {
                    write!(_f, ": {msg}")?;
                }
            }
            Error::QueueNotFound(msg) => {
                write!(_f, "QueueNotFound")?;
                if let Some(msg) = msg {
                    write!(_f, ": {msg}")?;
                }
            }
            Error::QueueDisabled(msg) => {
                write!(_f, "QueueDisabled")?;
                if let Some(msg) = msg {
                    write!(_f, ": {msg}")?;
                }
            }
        }
        Ok(())
    }
}