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/definition.json (sh.tangled.label.definition)

#![allow(clippy::all)]

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

#[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>,
    /// The hex value for the background color for the label. Appviews may choose to respect this.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub color: Option<String>,
    #[serde(rename = "createdAt")]
    pub created_at: String,
    /// Whether this label can be repeated for a given entity, eg.: [reviewer:foo, reviewer:bar]
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub multiple: Option<bool>,
    /// The display name of this label.
    pub name: String,
    /// The areas of the repo this label may apply to, eg.: sh.tangled.repo.issue. Appviews may choose to respect this.
    pub scope: Vec<String>,
    #[serde(rename = "valueType")]
    pub value_type: crate::lexicon::sh::tangled::label::definition::ValueType,
    /// 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 ValueType {
    /// Closed set of values that this label can take.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub r#enum: Option<Vec<String>>,
    /// An optional constraint that can be applied on string concrete types.
    pub format: String,
    /// The concrete type of this label's value.
    pub r#type: String,
    /// Unknown fields, preserved across read-modify-write round-trips.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, serde_json::Value>,
}