jacquard_api/place_stream/server/
settings.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: place.stream.server.settings
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8///Record containing user settings for a particular Streamplace node
9#[jacquard_derive::lexicon]
10#[derive(
11    serde::Serialize,
12    serde::Deserialize,
13    Debug,
14    Clone,
15    PartialEq,
16    Eq,
17    jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20pub struct Settings<'a> {
21    ///Whether this node may archive your livestream for improving the service
22    #[serde(skip_serializing_if = "std::option::Option::is_none")]
23    pub debug_recording: std::option::Option<bool>,
24}
25
26/// Typed wrapper for GetRecord response with this collection's record type.
27#[derive(
28    serde::Serialize,
29    serde::Deserialize,
30    Debug,
31    Clone,
32    PartialEq,
33    Eq,
34    jacquard_derive::IntoStatic
35)]
36#[serde(rename_all = "camelCase")]
37pub struct SettingsGetRecordOutput<'a> {
38    #[serde(skip_serializing_if = "std::option::Option::is_none")]
39    #[serde(borrow)]
40    pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41    #[serde(borrow)]
42    pub uri: jacquard_common::types::string::AtUri<'a>,
43    #[serde(borrow)]
44    pub value: Settings<'a>,
45}
46
47/// Marker type for deserializing records from this collection.
48pub struct SettingsRecord;
49impl jacquard_common::xrpc::XrpcResp for SettingsRecord {
50    const NSID: &'static str = "place.stream.server.settings";
51    const ENCODING: &'static str = "application/json";
52    type Output<'de> = SettingsGetRecordOutput<'de>;
53    type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54}
55
56impl jacquard_common::types::collection::Collection for Settings<'_> {
57    const NSID: &'static str = "place.stream.server.settings";
58    type Record = SettingsRecord;
59}
60
61impl From<SettingsGetRecordOutput<'_>> for Settings<'_> {
62    fn from(output: SettingsGetRecordOutput<'_>) -> Self {
63        use jacquard_common::IntoStatic;
64        output.value.into_static()
65    }
66}