Skip to main content

atrium_api/tools/ozone/queue/
route_reports.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `tools.ozone.queue.routeReports` namespace.
3pub const NSID: &str = "tools.ozone.queue.routeReports";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    ///End of report ID range (inclusive). Difference between start and end must be less than 5,000.
8    pub end_report_id: i64,
9    ///Start of report ID range (inclusive).
10    pub start_report_id: i64,
11}
12pub type Input = crate::types::Object<InputData>;
13#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
14#[serde(rename_all = "camelCase")]
15pub struct OutputData {
16    ///The number of reports assigned to a queue.
17    pub assigned: i64,
18    ///The number of reports with no matching queue.
19    pub unmatched: i64,
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    ///The request is invalid, such as missing required fields or invalid field values.
26    OutOfRange(Option<String>),
27}
28impl std::fmt::Display for Error {
29    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
30        match self {
31            Error::OutOfRange(msg) => {
32                write!(_f, "OutOfRange")?;
33                if let Some(msg) = msg {
34                    write!(_f, ": {msg}")?;
35                }
36            }
37        }
38        Ok(())
39    }
40}