shrike 0.1.6

AT Protocol library for Rust
Documentation
// Code generated by lexgen. DO NOT EDIT.

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ReportAssignModeratorInput {
    /// DID to be assigned. Defaults to the caller's DID. Admins may assign to any moderator.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub did: Option<crate::syntax::Did>,
    /// When true, the assignment has no expiry (endAt is null). Throws AlreadyAssigned if another user already has a permanent assignment on this report.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub is_permanent: Option<bool>,
    /// Optional queue ID to associate the assignment with. If not provided and the report has been assigned on a queue before, it will stay on that queue.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub queue_id: Option<i64>,
    /// The ID of the report to assign.
    pub report_id: i64,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// ReportAssignModeratorOutput is an alias.
pub type ReportAssignModeratorOutput = crate::api::tools::ozone::ReportDefsAssignmentView;

/// ReportAssignModerator — Assign a report to a user. Defaults to the caller. Admins may assign to any moderator.
pub async fn report_assign_moderator(
    client: &crate::xrpc::Client,
    input: &ReportAssignModeratorInput,
) -> Result<ReportAssignModeratorOutput, crate::xrpc::Error> {
    client
        .procedure("tools.ozone.report.assignModerator", input)
        .await
}