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)]
46#[serde(rename_all = "camelCase")]
47pub struct Repo<'a> {
48 pub created_at: jacquard_common::types::string::Datetime,
49 #[serde(skip_serializing_if = "std::option::Option::is_none")]
50 #[serde(borrow)]
51 pub description: std::option::Option<jacquard_common::CowStr<'a>>,
52 ///knot where the repo was created
53 #[serde(borrow)]
54 pub knot: jacquard_common::CowStr<'a>,
55 ///List of labels that this repo subscribes to
56 #[serde(skip_serializing_if = "std::option::Option::is_none")]
57 #[serde(borrow)]
58 pub labels: std::option::Option<Vec<jacquard_common::types::string::AtUri<'a>>>,
59 ///name of the repo
60 #[serde(borrow)]
61 pub name: jacquard_common::CowStr<'a>,
62 ///source of the repo
63 #[serde(skip_serializing_if = "std::option::Option::is_none")]
64 #[serde(borrow)]
65 pub source: std::option::Option<jacquard_common::types::string::Uri<'a>>,
66 ///CI runner to send jobs to and receive results from
67 #[serde(skip_serializing_if = "std::option::Option::is_none")]
68 #[serde(borrow)]
69 pub spindle: std::option::Option<jacquard_common::CowStr<'a>>,
70}
71
72/// Typed wrapper for GetRecord response with this collection's record type.
73#[derive(
74 serde::Serialize,
75 serde::Deserialize,
76 Debug,
77 Clone,
78 PartialEq,
79 Eq,
80 jacquard_derive::IntoStatic
81)]
82#[serde(rename_all = "camelCase")]
83pub struct RepoGetRecordOutput<'a> {
84 #[serde(skip_serializing_if = "std::option::Option::is_none")]
85 #[serde(borrow)]
86 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
87 #[serde(borrow)]
88 pub uri: jacquard_common::types::string::AtUri<'a>,
89 #[serde(borrow)]
90 pub value: Repo<'a>,
91}
92
93/// Marker type for deserializing records from this collection.
94pub struct RepoRecord;
95impl jacquard_common::xrpc::XrpcResp for RepoRecord {
96 const NSID: &'static str = "sh.tangled.repo";
97 const ENCODING: &'static str = "application/json";
98 type Output<'de> = RepoGetRecordOutput<'de>;
99 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
100}
101
102impl jacquard_common::types::collection::Collection for Repo<'_> {
103 const NSID: &'static str = "sh.tangled.repo";
104 type Record = RepoRecord;
105}
106
107impl From<RepoGetRecordOutput<'_>> for Repo<'_> {
108 fn from(output: RepoGetRecordOutput<'_>) -> Self {
109 use jacquard_common::IntoStatic;
110 output.value.into_static()
111 }
112}