shrike 0.1.1

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 SafelinkUpdateRuleInput {
    pub action: crate::api::tools::ozone::SafelinkDefsActionType,
    /// Optional comment about the update
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,
    /// Optional DID to credit as the creator. Only respected for admin_token authentication.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub created_by: Option<crate::syntax::Did>,
    pub pattern: crate::api::tools::ozone::SafelinkDefsPatternType,
    pub reason: crate::api::tools::ozone::SafelinkDefsReasonType,
    /// The URL or domain to update the rule for
    pub url: String,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// SafelinkUpdateRuleOutput is an alias.
pub type SafelinkUpdateRuleOutput = crate::api::tools::ozone::SafelinkDefsEvent;

/// SafelinkUpdateRule — Update an existing URL safety rule
pub async fn safelink_update_rule(
    client: &crate::xrpc::Client,
    input: &SafelinkUpdateRuleInput,
) -> Result<SafelinkUpdateRuleOutput, crate::xrpc::Error> {
    client
        .procedure("tools.ozone.safelink.updateRule", input)
        .await
}