Skip to main content

atrium_api/tools/ozone/queue/
assign_moderator.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `tools.ozone.queue.assignModerator` namespace.
3pub const NSID: &str = "tools.ozone.queue.assignModerator";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    ///DID to be assigned.
8    pub did: String,
9    ///The ID of the queue to assign the user to.
10    pub queue_id: i64,
11}
12pub type Input = crate::types::Object<InputData>;
13pub type Output = crate::tools::ozone::queue::defs::AssignmentView;
14#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
15#[serde(tag = "error", content = "message")]
16pub enum Error {
17    ///The specified queue does not exist or is not enabled.
18    InvalidAssignment(Option<String>),
19}
20impl std::fmt::Display for Error {
21    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
22        match self {
23            Error::InvalidAssignment(msg) => {
24                write!(_f, "InvalidAssignment")?;
25                if let Some(msg) = msg {
26                    write!(_f, ": {msg}")?;
27                }
28            }
29        }
30        Ok(())
31    }
32}