1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: sh.tangled.repo.hiddenRef
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 bon::Builder,
17 jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20#[builder(start_fn = new)]
21pub struct HiddenRef<'a> {
22 /// Fork reference name
23 #[serde(borrow)]
24 #[builder(into)]
25 pub fork_ref: jacquard_common::CowStr<'a>,
26 /// Remote reference name
27 #[serde(borrow)]
28 #[builder(into)]
29 pub remote_ref: jacquard_common::CowStr<'a>,
30 /// AT-URI of the repository
31 #[serde(borrow)]
32 pub repo: jacquard_common::types::string::AtUri<'a>,
33 #[serde(flatten)]
34 #[serde(borrow)]
35 #[builder(default)]
36 pub extra_data: ::std::collections::BTreeMap<
37 ::jacquard_common::smol_str::SmolStr,
38 ::jacquard_common::types::value::Data<'a>,
39 >,
40}
41
42#[jacquard_derive::lexicon]
43#[derive(
44 serde::Serialize,
45 serde::Deserialize,
46 Debug,
47 Clone,
48 PartialEq,
49 Eq,
50 jacquard_derive::IntoStatic
51)]
52#[serde(rename_all = "camelCase")]
53pub struct HiddenRefOutput<'a> {
54 /// Error message if creation failed
55 #[serde(skip_serializing_if = "std::option::Option::is_none")]
56 #[serde(borrow)]
57 pub error: std::option::Option<jacquard_common::CowStr<'a>>,
58 /// The created hidden ref name
59 #[serde(skip_serializing_if = "std::option::Option::is_none")]
60 #[serde(borrow)]
61 pub r#ref: std::option::Option<jacquard_common::CowStr<'a>>,
62 /// Whether the hidden ref was created successfully
63 pub success: bool,
64}
65
66///Response type for
67///sh.tangled.repo.hiddenRef
68pub struct HiddenRefResponse;
69impl jacquard_common::xrpc::XrpcResp for HiddenRefResponse {
70 const NSID: &'static str = "sh.tangled.repo.hiddenRef";
71 const ENCODING: &'static str = "application/json";
72 type Output<'de> = HiddenRefOutput<'de>;
73 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
74}
75
76impl<'a> jacquard_common::xrpc::XrpcRequest for HiddenRef<'a> {
77 const NSID: &'static str = "sh.tangled.repo.hiddenRef";
78 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
79 "application/json",
80 );
81 type Response = HiddenRefResponse;
82}
83
84///Endpoint type for
85///sh.tangled.repo.hiddenRef
86pub struct HiddenRefRequest;
87impl jacquard_common::xrpc::XrpcEndpoint for HiddenRefRequest {
88 const PATH: &'static str = "/xrpc/sh.tangled.repo.hiddenRef";
89 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
90 "application/json",
91 );
92 type Request<'de> = HiddenRef<'de>;
93 type Response = HiddenRefResponse;
94}