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