// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: place.stream.broadcast.getBroadcaster
//
// 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::Did;
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};

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

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GetBroadcasterOutput<'a> {
    ///Array of DIDs authorized as admins
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub admins: Option<Vec<Did<'a>>>,
    ///DID of the Streamplace broadcaster to which this server belongs
    #[serde(borrow)]
    pub broadcaster: Did<'a>,
    ///DID of this particular Streamplace server
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub server: Option<Did<'a>>,
}

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

impl jacquard_common::xrpc::XrpcRequest for GetBroadcaster {
    const NSID: &'static str = "place.stream.broadcast.getBroadcaster";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = GetBroadcasterResponse;
}

/// Endpoint type for place.stream.broadcast.getBroadcaster
pub struct GetBroadcasterRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetBroadcasterRequest {
    const PATH: &'static str = "/xrpc/place.stream.broadcast.getBroadcaster";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = GetBroadcaster;
    type Response = GetBroadcasterResponse;
}