Skip to main content

jacquard_api/place_stream/server/
get_server_time.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: place.stream.server.getServerTime
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[allow(unused_imports)]
9use alloc::collections::BTreeMap;
10
11#[allow(unused_imports)]
12use core::marker::PhantomData;
13use jacquard_common::types::string::Datetime;
14use jacquard_derive::{IntoStatic, lexicon};
15use serde::{Serialize, Deserialize};
16
17#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
18#[serde(rename_all = "camelCase")]
19pub struct GetServerTime;
20
21#[lexicon]
22#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
23#[serde(rename_all = "camelCase")]
24pub struct GetServerTimeOutput<'a> {
25    ///Current server time in RFC3339 format
26    pub server_time: Datetime,
27}
28
29/// Response type for place.stream.server.getServerTime
30pub struct GetServerTimeResponse;
31impl jacquard_common::xrpc::XrpcResp for GetServerTimeResponse {
32    const NSID: &'static str = "place.stream.server.getServerTime";
33    const ENCODING: &'static str = "application/json";
34    type Output<'de> = GetServerTimeOutput<'de>;
35    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
36}
37
38impl jacquard_common::xrpc::XrpcRequest for GetServerTime {
39    const NSID: &'static str = "place.stream.server.getServerTime";
40    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
41    type Response = GetServerTimeResponse;
42}
43
44/// Endpoint type for place.stream.server.getServerTime
45pub struct GetServerTimeRequest;
46impl jacquard_common::xrpc::XrpcEndpoint for GetServerTimeRequest {
47    const PATH: &'static str = "/xrpc/place.stream.server.getServerTime";
48    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
49    type Request<'de> = GetServerTime;
50    type Response = GetServerTimeResponse;
51}