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/pulls/pull.json (sh.tangled.repo.pull)

#![allow(clippy::all)]

pub mod comment;
pub mod status;

pub const NSID: &str = "sh.tangled.repo.pull";

#[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>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub body: Option<String>,
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(
        rename = "dependentOn",
        skip_serializing_if = "Option::is_none",
        default
    )]
    pub dependent_on: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub mentions: Option<Vec<String>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub references: Option<Vec<String>>,
    pub rounds: Vec<crate::lexicon::sh::tangled::repo::pull::Round>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub source: Option<crate::lexicon::sh::tangled::repo::pull::Source>,
    pub target: crate::lexicon::sh::tangled::repo::pull::Target,
    pub title: String,
    /// Unknown fields, preserved across read-modify-write round-trips.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, serde_json::Value>,
}

/// revisions of this pull request, newer rounds are appended to this array. appviews may reject records do not treat this field as append-only. the blob format is gzipped text-based git-format-patches.
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Round {
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "patchBlob")]
    pub patch_blob: crate::types::BlobRef,
    /// 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 Source {
    pub branch: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub repo: Option<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 Target {
    pub branch: String,
    pub repo: String,
    /// Unknown fields, preserved across read-modify-write round-trips.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, serde_json::Value>,
}