atrium_api/tools/ozone/report/
reassign_queue.rs1pub const NSID: &str = "tools.ozone.report.reassignQueue";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7 #[serde(skip_serializing_if = "core::option::Option::is_none")]
9 pub comment: core::option::Option<String>,
10 pub queue_id: i64,
12 pub report_id: i64,
14}
15pub type Input = crate::types::Object<InputData>;
16#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
17#[serde(rename_all = "camelCase")]
18pub struct OutputData {
19 pub report: crate::tools::ozone::report::defs::ReportView,
20}
21pub type Output = crate::types::Object<OutputData>;
22#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
23#[serde(tag = "error", content = "message")]
24pub enum Error {
25 ReportNotFound(Option<String>),
27 ReportClosed(Option<String>),
29 AlreadyInTargetQueue(Option<String>),
31 QueueNotFound(Option<String>),
33 QueueDisabled(Option<String>),
35}
36impl std::fmt::Display for Error {
37 fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
38 match self {
39 Error::ReportNotFound(msg) => {
40 write!(_f, "ReportNotFound")?;
41 if let Some(msg) = msg {
42 write!(_f, ": {msg}")?;
43 }
44 }
45 Error::ReportClosed(msg) => {
46 write!(_f, "ReportClosed")?;
47 if let Some(msg) = msg {
48 write!(_f, ": {msg}")?;
49 }
50 }
51 Error::AlreadyInTargetQueue(msg) => {
52 write!(_f, "AlreadyInTargetQueue")?;
53 if let Some(msg) = msg {
54 write!(_f, ": {msg}")?;
55 }
56 }
57 Error::QueueNotFound(msg) => {
58 write!(_f, "QueueNotFound")?;
59 if let Some(msg) = msg {
60 write!(_f, ": {msg}")?;
61 }
62 }
63 Error::QueueDisabled(msg) => {
64 write!(_f, "QueueDisabled")?;
65 if let Some(msg) = msg {
66 write!(_f, ": {msg}")?;
67 }
68 }
69 }
70 Ok(())
71 }
72}