A better Rust ATProto crate
at main 3.4 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: sh.tangled.repo 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8pub mod add_secret; 9pub mod archive; 10pub mod artifact; 11pub mod blob; 12pub mod branch; 13pub mod branches; 14pub mod collaborator; 15pub mod compare; 16pub mod create; 17pub mod delete; 18pub mod delete_branch; 19pub mod diff; 20pub mod fork_status; 21pub mod fork_sync; 22pub mod get_default_branch; 23pub mod hidden_ref; 24pub mod issue; 25pub mod languages; 26pub mod list_secrets; 27pub mod log; 28pub mod merge; 29pub mod merge_check; 30pub mod pull; 31pub mod remove_secret; 32pub mod set_default_branch; 33pub mod tags; 34pub mod tree; 35 36#[jacquard_derive::lexicon] 37#[derive( 38 serde::Serialize, 39 serde::Deserialize, 40 Debug, 41 Clone, 42 PartialEq, 43 Eq, 44 jacquard_derive::IntoStatic, 45 bon::Builder 46)] 47#[serde(rename_all = "camelCase")] 48pub struct Repo<'a> { 49 pub created_at: jacquard_common::types::string::Datetime, 50 #[serde(skip_serializing_if = "std::option::Option::is_none")] 51 #[builder(into)] 52 #[serde(borrow)] 53 pub description: Option<jacquard_common::CowStr<'a>>, 54 /// knot where the repo was created 55 #[serde(borrow)] 56 #[builder(into)] 57 pub knot: jacquard_common::CowStr<'a>, 58 /// List of labels that this repo subscribes to 59 #[serde(skip_serializing_if = "std::option::Option::is_none")] 60 #[builder(into)] 61 #[serde(borrow)] 62 pub labels: Option<Vec<jacquard_common::types::string::AtUri<'a>>>, 63 /// name of the repo 64 #[serde(borrow)] 65 #[builder(into)] 66 pub name: jacquard_common::CowStr<'a>, 67 /// source of the repo 68 #[serde(skip_serializing_if = "std::option::Option::is_none")] 69 #[builder(into)] 70 #[serde(borrow)] 71 pub source: Option<jacquard_common::types::string::Uri<'a>>, 72 /// CI runner to send jobs to and receive results from 73 #[serde(skip_serializing_if = "std::option::Option::is_none")] 74 #[builder(into)] 75 #[serde(borrow)] 76 pub spindle: Option<jacquard_common::CowStr<'a>>, 77} 78 79/// Typed wrapper for GetRecord response with this collection's record type. 80#[derive( 81 serde::Serialize, 82 serde::Deserialize, 83 Debug, 84 Clone, 85 PartialEq, 86 Eq, 87 jacquard_derive::IntoStatic 88)] 89#[serde(rename_all = "camelCase")] 90pub struct RepoGetRecordOutput<'a> { 91 #[serde(skip_serializing_if = "std::option::Option::is_none")] 92 #[serde(borrow)] 93 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 94 #[serde(borrow)] 95 pub uri: jacquard_common::types::string::AtUri<'a>, 96 #[serde(borrow)] 97 pub value: Repo<'a>, 98} 99 100/// Marker type for deserializing records from this collection. 101pub struct RepoRecord; 102impl jacquard_common::xrpc::XrpcResp for RepoRecord { 103 const NSID: &'static str = "sh.tangled.repo"; 104 const ENCODING: &'static str = "application/json"; 105 type Output<'de> = RepoGetRecordOutput<'de>; 106 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 107} 108 109impl jacquard_common::types::collection::Collection for Repo<'_> { 110 const NSID: &'static str = "sh.tangled.repo"; 111 type Record = RepoRecord; 112} 113 114impl From<RepoGetRecordOutput<'_>> for Repo<'_> { 115 fn from(output: RepoGetRecordOutput<'_>) -> Self { 116 use jacquard_common::IntoStatic; 117 output.value.into_static() 118 } 119}