Skip to main content

atrium_api/tools/ozone/queue/
unassign_moderator.rs

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