jacquard-api 0.11.0

Generated AT Protocol API bindings for Jacquard
Documentation
// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: place.stream.ingest.getIngestUrls
//
// 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_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::place_stream::ingest::Ingest;

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

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GetIngestUrlsOutput<'a> {
    #[serde(borrow)]
    pub ingests: Vec<Ingest<'a>>,
}


#[jacquard_derive::open_union]
#[derive(
    Serialize,
    Deserialize,
    Debug,
    Clone,
    PartialEq,
    Eq,
    thiserror::Error,
    miette::Diagnostic,
    IntoStatic
)]

#[serde(tag = "error", content = "message")]
#[serde(bound(deserialize = "'de: 'a"))]
pub enum GetIngestUrlsError<'a> {}
impl core::fmt::Display for GetIngestUrlsError<'_> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        match self {
            Self::Unknown(err) => write!(f, "Unknown error: {:?}", err),
        }
    }
}

/// Response type for place.stream.ingest.getIngestUrls
pub struct GetIngestUrlsResponse;
impl jacquard_common::xrpc::XrpcResp for GetIngestUrlsResponse {
    const NSID: &'static str = "place.stream.ingest.getIngestUrls";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = GetIngestUrlsOutput<'de>;
    type Err<'de> = GetIngestUrlsError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for GetIngestUrls {
    const NSID: &'static str = "place.stream.ingest.getIngestUrls";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = GetIngestUrlsResponse;
}

/// Endpoint type for place.stream.ingest.getIngestUrls
pub struct GetIngestUrlsRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetIngestUrlsRequest {
    const PATH: &'static str = "/xrpc/place.stream.ingest.getIngestUrls";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = GetIngestUrls;
    type Response = GetIngestUrlsResponse;
}