#[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),
}
}
}
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;
}
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;
}