A better Rust ATProto crate
at main 6.2 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: sh.tangled.pipeline 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8pub mod status; 9 10#[jacquard_derive::lexicon] 11#[derive( 12 serde::Serialize, 13 serde::Deserialize, 14 Debug, 15 Clone, 16 PartialEq, 17 Eq, 18 jacquard_derive::IntoStatic, 19 bon::Builder 20)] 21#[serde(rename_all = "camelCase")] 22pub struct CloneOpts<'a> { 23 pub depth: i64, 24 pub skip: bool, 25 pub submodules: bool, 26} 27 28#[jacquard_derive::lexicon] 29#[derive( 30 serde::Serialize, 31 serde::Deserialize, 32 Debug, 33 Clone, 34 PartialEq, 35 Eq, 36 jacquard_derive::IntoStatic, 37 bon::Builder 38)] 39#[serde(rename_all = "camelCase")] 40pub struct Pipeline<'a> { 41 #[serde(borrow)] 42 pub trigger_metadata: crate::sh_tangled::pipeline::TriggerMetadata<'a>, 43 #[serde(borrow)] 44 pub workflows: Vec<crate::sh_tangled::pipeline::Workflow<'a>>, 45} 46 47/// Typed wrapper for GetRecord response with this collection's record type. 48#[derive( 49 serde::Serialize, 50 serde::Deserialize, 51 Debug, 52 Clone, 53 PartialEq, 54 Eq, 55 jacquard_derive::IntoStatic 56)] 57#[serde(rename_all = "camelCase")] 58pub struct PipelineGetRecordOutput<'a> { 59 #[serde(skip_serializing_if = "std::option::Option::is_none")] 60 #[serde(borrow)] 61 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 62 #[serde(borrow)] 63 pub uri: jacquard_common::types::string::AtUri<'a>, 64 #[serde(borrow)] 65 pub value: Pipeline<'a>, 66} 67 68/// Marker type for deserializing records from this collection. 69pub struct PipelineRecord; 70impl jacquard_common::xrpc::XrpcResp for PipelineRecord { 71 const NSID: &'static str = "sh.tangled.pipeline"; 72 const ENCODING: &'static str = "application/json"; 73 type Output<'de> = PipelineGetRecordOutput<'de>; 74 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 75} 76 77impl jacquard_common::types::collection::Collection for Pipeline<'_> { 78 const NSID: &'static str = "sh.tangled.pipeline"; 79 type Record = PipelineRecord; 80} 81 82impl From<PipelineGetRecordOutput<'_>> for Pipeline<'_> { 83 fn from(output: PipelineGetRecordOutput<'_>) -> Self { 84 use jacquard_common::IntoStatic; 85 output.value.into_static() 86 } 87} 88 89#[jacquard_derive::lexicon] 90#[derive( 91 serde::Serialize, 92 serde::Deserialize, 93 Debug, 94 Clone, 95 PartialEq, 96 Eq, 97 jacquard_derive::IntoStatic, 98 Default 99)] 100#[serde(rename_all = "camelCase")] 101pub struct ManualTriggerData<'a> { 102 #[serde(skip_serializing_if = "std::option::Option::is_none")] 103 #[serde(borrow)] 104 pub inputs: std::option::Option<Vec<crate::sh_tangled::pipeline::Pair<'a>>>, 105} 106 107#[jacquard_derive::lexicon] 108#[derive( 109 serde::Serialize, 110 serde::Deserialize, 111 Debug, 112 Clone, 113 PartialEq, 114 Eq, 115 jacquard_derive::IntoStatic, 116 Default 117)] 118#[serde(rename_all = "camelCase")] 119pub struct Pair<'a> { 120 #[serde(borrow)] 121 pub key: jacquard_common::CowStr<'a>, 122 #[serde(borrow)] 123 pub value: jacquard_common::CowStr<'a>, 124} 125 126#[jacquard_derive::lexicon] 127#[derive( 128 serde::Serialize, 129 serde::Deserialize, 130 Debug, 131 Clone, 132 PartialEq, 133 Eq, 134 jacquard_derive::IntoStatic, 135 Default 136)] 137#[serde(rename_all = "camelCase")] 138pub struct PullRequestTriggerData<'a> { 139 #[serde(borrow)] 140 pub action: jacquard_common::CowStr<'a>, 141 #[serde(borrow)] 142 pub source_branch: jacquard_common::CowStr<'a>, 143 #[serde(borrow)] 144 pub source_sha: jacquard_common::CowStr<'a>, 145 #[serde(borrow)] 146 pub target_branch: jacquard_common::CowStr<'a>, 147} 148 149#[jacquard_derive::lexicon] 150#[derive( 151 serde::Serialize, 152 serde::Deserialize, 153 Debug, 154 Clone, 155 PartialEq, 156 Eq, 157 jacquard_derive::IntoStatic, 158 Default 159)] 160#[serde(rename_all = "camelCase")] 161pub struct PushTriggerData<'a> { 162 #[serde(borrow)] 163 pub new_sha: jacquard_common::CowStr<'a>, 164 #[serde(borrow)] 165 pub old_sha: jacquard_common::CowStr<'a>, 166 #[serde(borrow)] 167 pub r#ref: jacquard_common::CowStr<'a>, 168} 169 170#[jacquard_derive::lexicon] 171#[derive( 172 serde::Serialize, 173 serde::Deserialize, 174 Debug, 175 Clone, 176 PartialEq, 177 Eq, 178 jacquard_derive::IntoStatic, 179 bon::Builder 180)] 181#[serde(rename_all = "camelCase")] 182pub struct TriggerMetadata<'a> { 183 #[serde(borrow)] 184 #[builder(into)] 185 pub kind: jacquard_common::CowStr<'a>, 186 #[serde(skip_serializing_if = "std::option::Option::is_none")] 187 #[builder(into)] 188 #[serde(borrow)] 189 pub manual: Option<crate::sh_tangled::pipeline::ManualTriggerData<'a>>, 190 #[serde(skip_serializing_if = "std::option::Option::is_none")] 191 #[builder(into)] 192 #[serde(borrow)] 193 pub pull_request: Option<crate::sh_tangled::pipeline::PullRequestTriggerData<'a>>, 194 #[serde(skip_serializing_if = "std::option::Option::is_none")] 195 #[builder(into)] 196 #[serde(borrow)] 197 pub push: Option<crate::sh_tangled::pipeline::PushTriggerData<'a>>, 198 #[serde(borrow)] 199 pub repo: crate::sh_tangled::pipeline::TriggerRepo<'a>, 200} 201 202#[jacquard_derive::lexicon] 203#[derive( 204 serde::Serialize, 205 serde::Deserialize, 206 Debug, 207 Clone, 208 PartialEq, 209 Eq, 210 jacquard_derive::IntoStatic, 211 bon::Builder 212)] 213#[serde(rename_all = "camelCase")] 214pub struct TriggerRepo<'a> { 215 #[serde(borrow)] 216 #[builder(into)] 217 pub default_branch: jacquard_common::CowStr<'a>, 218 #[serde(borrow)] 219 pub did: jacquard_common::types::string::Did<'a>, 220 #[serde(borrow)] 221 #[builder(into)] 222 pub knot: jacquard_common::CowStr<'a>, 223 #[serde(borrow)] 224 #[builder(into)] 225 pub repo: jacquard_common::CowStr<'a>, 226} 227 228#[jacquard_derive::lexicon] 229#[derive( 230 serde::Serialize, 231 serde::Deserialize, 232 Debug, 233 Clone, 234 PartialEq, 235 Eq, 236 jacquard_derive::IntoStatic, 237 bon::Builder 238)] 239#[serde(rename_all = "camelCase")] 240pub struct Workflow<'a> { 241 #[serde(borrow)] 242 pub clone: crate::sh_tangled::pipeline::CloneOpts<'a>, 243 #[serde(borrow)] 244 #[builder(into)] 245 pub engine: jacquard_common::CowStr<'a>, 246 #[serde(borrow)] 247 #[builder(into)] 248 pub name: jacquard_common::CowStr<'a>, 249 #[serde(borrow)] 250 #[builder(into)] 251 pub raw: jacquard_common::CowStr<'a>, 252}