atrium-api 0.26.0

API library for AT Protocol (Bluesky)
Documentation
// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `tools.ozone.moderation.scheduleAction` namespace.
pub const NSID: &str = "tools.ozone.moderation.scheduleAction";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct InputData {
    pub action: crate::types::Union<InputActionRefs>,
    pub created_by: crate::types::string::Did,
    ///This will be propagated to the moderation event when it is applied
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub mod_tool: core::option::Option<crate::tools::ozone::moderation::defs::ModTool>,
    pub scheduling: SchedulingConfig,
    ///Array of DID subjects to schedule the action for
    pub subjects: Vec<crate::types::string::Did>,
}
pub type Input = crate::types::Object<InputData>;
pub type Output = ScheduledActionResults;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {}
impl std::fmt::Display for Error {
    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
        Ok(())
    }
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct FailedSchedulingData {
    pub error: String,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub error_code: core::option::Option<String>,
    pub subject: crate::types::string::Did,
}
pub type FailedScheduling = crate::types::Object<FailedSchedulingData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ScheduledActionResultsData {
    pub failed: Vec<FailedScheduling>,
    pub succeeded: Vec<crate::types::string::Did>,
}
pub type ScheduledActionResults = crate::types::Object<ScheduledActionResultsData>;
///Configuration for when the action should be executed
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct SchedulingConfigData {
    ///Earliest time to execute the action (for randomized scheduling)
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub execute_after: core::option::Option<crate::types::string::Datetime>,
    ///Exact time to execute the action
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub execute_at: core::option::Option<crate::types::string::Datetime>,
    ///Latest time to execute the action (for randomized scheduling)
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub execute_until: core::option::Option<crate::types::string::Datetime>,
}
pub type SchedulingConfig = crate::types::Object<SchedulingConfigData>;
///Schedule a takedown action
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct TakedownData {
    ///If true, all other reports on content authored by this account will be resolved (acknowledged).
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub acknowledge_account_subjects: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Indicates how long the takedown should be in effect before automatically expiring.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub duration_in_hours: core::option::Option<i64>,
    ///Email content to be sent to the user upon takedown.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub email_content: core::option::Option<String>,
    ///Subject of the email to be sent to the user upon takedown.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub email_subject: core::option::Option<String>,
    ///Names/Keywords of the policies that drove the decision.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub policies: core::option::Option<Vec<String>>,
    ///Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.).
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub severity_level: core::option::Option<String>,
    ///Number of strikes to assign to the user when takedown is applied.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub strike_count: core::option::Option<i64>,
    ///When the strike should expire. If not provided, the strike never expires.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub strike_expires_at: core::option::Option<crate::types::string::Datetime>,
}
pub type Takedown = crate::types::Object<TakedownData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum InputActionRefs {
    #[serde(rename = "tools.ozone.moderation.scheduleAction#takedown")]
    Takedown(Box<Takedown>),
}