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.queue.updateQueue` namespace.
pub const NSID: &str = "tools.ozone.queue.updateQueue";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct InputData {
    ///Optional description of the queue
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub description: core::option::Option<String>,
    ///Enable or disable the queue
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub enabled: core::option::Option<bool>,
    ///New display name for the queue
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub name: core::option::Option<String>,
    ///ID of the queue to update
    pub queue_id: i64,
    ///Policy keys to recommend when actioning reports in this queue
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub recommended_policies: core::option::Option<Vec<String>>,
}
pub type Input = crate::types::Object<InputData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct OutputData {
    pub queue: crate::tools::ozone::queue::defs::QueueView,
}
pub type Output = crate::types::Object<OutputData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
    ///One or more recommended policy keys do not exist in the configured policy list
    InvalidRecommendedPolicies(Option<String>),
}
impl std::fmt::Display for Error {
    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Error::InvalidRecommendedPolicies(msg) => {
                write!(_f, "InvalidRecommendedPolicies")?;
                if let Some(msg) = msg {
                    write!(_f, ": {msg}")?;
                }
            }
        }
        Ok(())
    }
}