atrium-api 0.25.8

API library for AT Protocol (Bluesky)
Documentation
// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `tools.ozone.safelink.removeRule` namespace.
pub const NSID: &str = "tools.ozone.safelink.removeRule";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct InputData {
    ///Optional comment about why the rule is being removed
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Optional DID of the user. Only respected when using admin auth.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub created_by: core::option::Option<crate::types::string::Did>,
    pub pattern: crate::tools::ozone::safelink::defs::PatternType,
    ///The URL or domain to remove the rule for
    pub url: String,
}
pub type Input = crate::types::Object<InputData>;
pub type Output = crate::tools::ozone::safelink::defs::Event;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
    ///No active rule found for this URL/domain
    RuleNotFound(Option<String>),
}
impl std::fmt::Display for Error {
    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Error::RuleNotFound(msg) => {
                write!(_f, "RuleNotFound")?;
                if let Some(msg) = msg {
                    write!(_f, ": {msg}")?;
                }
            }
        }
        Ok(())
    }
}