atrium_api/tools/ozone/moderation/
get_record.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `tools.ozone.moderation.getRecord` namespace.
3pub const NSID: &str = "tools.ozone.moderation.getRecord";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    #[serde(skip_serializing_if = "core::option::Option::is_none")]
8    pub cid: core::option::Option<crate::types::string::Cid>,
9    pub uri: String,
10}
11pub type Parameters = crate::types::Object<ParametersData>;
12pub type Output = crate::tools::ozone::moderation::defs::RecordViewDetail;
13#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
14#[serde(tag = "error", content = "message")]
15pub enum Error {
16    RecordNotFound(Option<String>),
17}
18impl std::fmt::Display for Error {
19    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
20        match self {
21            Error::RecordNotFound(msg) => {
22                write!(_f, "RecordNotFound")?;
23                if let Some(msg) = msg {
24                    write!(_f, ": {msg}")?;
25                }
26            }
27        }
28        Ok(())
29    }
30}