// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: sh.tangled.git.refUpdate // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct CommitCountBreakdown<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub by_email: std::option::Option< Vec>, >, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct IndividualEmailCommitCount<'a> { pub count: i64, #[serde(borrow)] #[builder(into)] pub email: jacquard_common::CowStr<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct IndividualLanguageSize<'a> { #[serde(borrow)] #[builder(into)] pub lang: jacquard_common::CowStr<'a>, pub size: i64, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct LangBreakdown<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub inputs: std::option::Option< Vec>, >, } /// An update to a git repository, emitted by knots. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct RefUpdate<'a> { /// did of the user that pushed this ref #[serde(borrow)] pub committer_did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub meta: crate::sh_tangled::git::ref_update::Meta<'a>, /// new SHA of this ref #[serde(borrow)] #[builder(into)] pub new_sha: jacquard_common::CowStr<'a>, /// old SHA of this ref #[serde(borrow)] #[builder(into)] pub old_sha: jacquard_common::CowStr<'a>, /// Ref being updated #[serde(borrow)] #[builder(into)] pub r#ref: jacquard_common::CowStr<'a>, /// did of the owner of the repo #[serde(borrow)] pub repo_did: jacquard_common::types::string::Did<'a>, /// name of the repo #[serde(borrow)] #[builder(into)] pub repo_name: jacquard_common::CowStr<'a>, } /// Typed wrapper for GetRecord response with this collection's record type. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RefUpdateGetRecordOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: RefUpdate<'a>, } /// Marker type for deserializing records from this collection. pub struct RefUpdateRecord; impl jacquard_common::xrpc::XrpcResp for RefUpdateRecord { const NSID: &'static str = "sh.tangled.git.refUpdate"; const ENCODING: &'static str = "application/json"; type Output<'de> = RefUpdateGetRecordOutput<'de>; type Err<'de> = jacquard_common::types::collection::RecordError<'de>; } impl jacquard_common::types::collection::Collection for RefUpdate<'_> { const NSID: &'static str = "sh.tangled.git.refUpdate"; type Record = RefUpdateRecord; } impl From> for RefUpdate<'_> { fn from(output: RefUpdateGetRecordOutput<'_>) -> Self { use jacquard_common::IntoStatic; output.value.into_static() } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Meta<'a> { #[serde(borrow)] pub commit_count: crate::sh_tangled::git::ref_update::CommitCountBreakdown<'a>, pub is_default_ref: bool, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub lang_breakdown: Option>, }