tangled-api 0.1.0

Lexicon-generated XRPC client for Tangled and AT Protocol APIs
Documentation
// @generated by `cargo xtask codegen` — do not edit.
// source: lexicons/label/op.json (sh.tangled.label.op)

#![allow(clippy::all)]

pub const NSID: &str = "sh.tangled.label.op";

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Record {
    /// Record type discriminator (`$type`); set to [`NSID`] when writing.
    #[serde(
        rename = "$type",
        skip_serializing_if = "Option::is_none",
        default
    )]
    pub r#type: Option<String>,
    pub add: Vec<crate::lexicon::sh::tangled::label::op::Operand>,
    pub delete: Vec<crate::lexicon::sh::tangled::label::op::Operand>,
    #[serde(rename = "performedAt")]
    pub performed_at: String,
    /// The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op.
    pub subject: String,
    /// Unknown fields, preserved across read-modify-write round-trips.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, serde_json::Value>,
}

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Operand {
    /// ATURI to the label definition
    pub key: String,
    /// Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value.
    pub value: String,
    /// Unknown fields, preserved across read-modify-write round-trips.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, serde_json::Value>,
}