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