1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: place.stream.live.getSegments
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[derive(
9 serde::Serialize,
10 serde::Deserialize,
11 Debug,
12 Clone,
13 PartialEq,
14 Eq,
15 bon::Builder,
16 jacquard_derive::IntoStatic
17)]
18#[builder(start_fn = new)]
19#[serde(rename_all = "camelCase")]
20pub struct GetSegments<'a> {
21 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22 pub before: std::option::Option<jacquard_common::types::string::Datetime>,
23 ///(default: 50, min: 1, max: 100)
24 #[serde(skip_serializing_if = "std::option::Option::is_none")]
25 pub limit: std::option::Option<i64>,
26 #[serde(borrow)]
27 pub user_did: jacquard_common::types::string::Did<'a>,
28}
29
30#[jacquard_derive::lexicon]
31#[derive(
32 serde::Serialize,
33 serde::Deserialize,
34 Debug,
35 Clone,
36 PartialEq,
37 Eq,
38 jacquard_derive::IntoStatic,
39 Default
40)]
41#[serde(rename_all = "camelCase")]
42pub struct GetSegmentsOutput<'a> {
43 #[serde(skip_serializing_if = "std::option::Option::is_none")]
44 #[serde(borrow)]
45 pub segments: std::option::Option<
46 Vec<crate::place_stream::segment::SegmentView<'a>>,
47 >,
48}
49
50///Response type for
51///place.stream.live.getSegments
52pub struct GetSegmentsResponse;
53impl jacquard_common::xrpc::XrpcResp for GetSegmentsResponse {
54 const NSID: &'static str = "place.stream.live.getSegments";
55 const ENCODING: &'static str = "application/json";
56 type Output<'de> = GetSegmentsOutput<'de>;
57 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
58}
59
60impl<'a> jacquard_common::xrpc::XrpcRequest for GetSegments<'a> {
61 const NSID: &'static str = "place.stream.live.getSegments";
62 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
63 type Response = GetSegmentsResponse;
64}
65
66///Endpoint type for
67///place.stream.live.getSegments
68pub struct GetSegmentsRequest;
69impl jacquard_common::xrpc::XrpcEndpoint for GetSegmentsRequest {
70 const PATH: &'static str = "/xrpc/place.stream.live.getSegments";
71 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
72 type Request<'de> = GetSegments<'de>;
73 type Response = GetSegmentsResponse;
74}