jacquard-api 0.11.1

Generated AT Protocol API bindings for Jacquard
Documentation
// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: place.stream.server.getServerTime
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[allow(unused_imports)]
use alloc::collections::BTreeMap;

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::types::string::Datetime;
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GetServerTime;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GetServerTimeOutput<'a> {
    ///Current server time in RFC3339 format
    pub server_time: Datetime,
}

/// Response type for place.stream.server.getServerTime
pub struct GetServerTimeResponse;
impl jacquard_common::xrpc::XrpcResp for GetServerTimeResponse {
    const NSID: &'static str = "place.stream.server.getServerTime";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = GetServerTimeOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for GetServerTime {
    const NSID: &'static str = "place.stream.server.getServerTime";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = GetServerTimeResponse;
}

/// Endpoint type for place.stream.server.getServerTime
pub struct GetServerTimeRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetServerTimeRequest {
    const PATH: &'static str = "/xrpc/place.stream.server.getServerTime";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = GetServerTime;
    type Response = GetServerTimeResponse;
}