1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: org.devcon.event.test
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 jacquard_derive::IntoStatic,
17 bon::Builder
18)]
19#[serde(rename_all = "camelCase")]
20pub struct Test<'a> {
21 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22 #[builder(into)]
23 pub created_at: Option<jacquard_common::types::string::Datetime>,
24 /// Description of the event
25 #[serde(skip_serializing_if = "std::option::Option::is_none")]
26 #[builder(into)]
27 #[serde(borrow)]
28 pub description: Option<jacquard_common::CowStr<'a>>,
29 /// End time of the event
30 pub end: jacquard_common::types::string::Datetime,
31 /// Location of the event
32 #[serde(skip_serializing_if = "std::option::Option::is_none")]
33 #[builder(into)]
34 #[serde(borrow)]
35 pub location: Option<jacquard_common::CowStr<'a>>,
36 /// Start time of the event
37 pub start: jacquard_common::types::string::Datetime,
38 /// Title of the event
39 #[serde(borrow)]
40 #[builder(into)]
41 pub title: jacquard_common::CowStr<'a>,
42 /// URL of the event
43 #[serde(skip_serializing_if = "std::option::Option::is_none")]
44 #[builder(into)]
45 #[serde(borrow)]
46 pub url: Option<jacquard_common::CowStr<'a>>,
47}
48
49/// Typed wrapper for GetRecord response with this collection's record type.
50#[derive(
51 serde::Serialize,
52 serde::Deserialize,
53 Debug,
54 Clone,
55 PartialEq,
56 Eq,
57 jacquard_derive::IntoStatic
58)]
59#[serde(rename_all = "camelCase")]
60pub struct TestGetRecordOutput<'a> {
61 #[serde(skip_serializing_if = "std::option::Option::is_none")]
62 #[serde(borrow)]
63 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
64 #[serde(borrow)]
65 pub uri: jacquard_common::types::string::AtUri<'a>,
66 #[serde(borrow)]
67 pub value: Test<'a>,
68}
69
70/// Marker type for deserializing records from this collection.
71pub struct TestRecord;
72impl jacquard_common::xrpc::XrpcResp for TestRecord {
73 const NSID: &'static str = "org.devcon.event.test";
74 const ENCODING: &'static str = "application/json";
75 type Output<'de> = TestGetRecordOutput<'de>;
76 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
77}
78
79impl jacquard_common::types::collection::Collection for Test<'_> {
80 const NSID: &'static str = "org.devcon.event.test";
81 type Record = TestRecord;
82}
83
84impl From<TestGetRecordOutput<'_>> for Test<'_> {
85 fn from(output: TestGetRecordOutput<'_>) -> Self {
86 use jacquard_common::IntoStatic;
87 output.value.into_static()
88 }
89}