Skip to main content

atrium_api/tools/ozone/queue/
update_queue.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `tools.ozone.queue.updateQueue` namespace.
3pub const NSID: &str = "tools.ozone.queue.updateQueue";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    ///Optional description of the queue
8    #[serde(skip_serializing_if = "core::option::Option::is_none")]
9    pub description: core::option::Option<String>,
10    ///Enable or disable the queue
11    #[serde(skip_serializing_if = "core::option::Option::is_none")]
12    pub enabled: core::option::Option<bool>,
13    ///New display name for the queue
14    #[serde(skip_serializing_if = "core::option::Option::is_none")]
15    pub name: core::option::Option<String>,
16    ///ID of the queue to update
17    pub queue_id: i64,
18    ///Policy keys to recommend when actioning reports in this queue
19    #[serde(skip_serializing_if = "core::option::Option::is_none")]
20    pub recommended_policies: core::option::Option<Vec<String>>,
21}
22pub type Input = crate::types::Object<InputData>;
23#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
24#[serde(rename_all = "camelCase")]
25pub struct OutputData {
26    pub queue: crate::tools::ozone::queue::defs::QueueView,
27}
28pub type Output = crate::types::Object<OutputData>;
29#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
30#[serde(tag = "error", content = "message")]
31pub enum Error {
32    ///One or more recommended policy keys do not exist in the configured policy list
33    InvalidRecommendedPolicies(Option<String>),
34}
35impl std::fmt::Display for Error {
36    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
37        match self {
38            Error::InvalidRecommendedPolicies(msg) => {
39                write!(_f, "InvalidRecommendedPolicies")?;
40                if let Some(msg) = msg {
41                    write!(_f, ": {msg}")?;
42                }
43            }
44        }
45        Ok(())
46    }
47}