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/ci/trigger.json (sh.tangled.ci.trigger)

#![allow(clippy::all)]

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Manual {
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub inputs: Option<Vec<crate::lexicon::sh::tangled::ci::trigger::Pair>>,
    /// optional ref the SHA was resolved from, for display and TANGLED_REF
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub r#ref: Option<String>,
    /// commit SHA the manual run targets
    pub sha: String,
    /// Repository DID to check out code and workflow definitions from, if different from the target repo.
    #[serde(
        rename = "sourceRepo",
        skip_serializing_if = "Option::is_none",
        default
    )]
    pub source_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 Pair {
    pub key: String,
    pub value: String,
    /// Unknown fields, preserved across read-modify-write round-trips.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, serde_json::Value>,
}

/// TODO: reference PR record with strongRef instead of embedding raw values
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct PullRequest {
    /// AT-URI of the sh.tangled.repo.pull record this run belongs to
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub pull: Option<String>,
    #[serde(
        rename = "sourceBranch",
        skip_serializing_if = "Option::is_none",
        default
    )]
    pub source_branch: Option<String>,
    /// Repository DID to check out code and workflow definitions from, if different from the target repo.
    #[serde(
        rename = "sourceRepo",
        skip_serializing_if = "Option::is_none",
        default
    )]
    pub source_repo: Option<String>,
    #[serde(rename = "sourceSha")]
    pub source_sha: String,
    #[serde(rename = "targetBranch")]
    pub target_branch: 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 Push {
    #[serde(rename = "newSha")]
    pub new_sha: String,
    #[serde(rename = "oldSha")]
    pub old_sha: String,
    pub r#ref: String,
    /// Unknown fields, preserved across read-modify-write round-trips.
    #[serde(flatten)]
    pub extra: serde_json::Map<String, serde_json::Value>,
}