#[allow(unused_imports)]
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::{BosStr, DefaultStr, FromStaticStr};
use jacquard_common::deps::smol_str::SmolStr;
use jacquard_common::types::string::AtUri;
use jacquard_common::types::value::Data;
use jacquard_derive::IntoStatic;
use serde::{Serialize, Deserialize};
use crate::app_bsky::graph::StarterPackViewBasic;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct GetStarterPacks<S: BosStr = DefaultStr> {
pub uris: Vec<AtUri<S>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct GetStarterPacksOutput<S: BosStr = DefaultStr> {
pub starter_packs: Vec<StarterPackViewBasic<S>>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
pub struct GetStarterPacksResponse;
impl jacquard_common::xrpc::XrpcResp for GetStarterPacksResponse {
const NSID: &'static str = "app.bsky.graph.getStarterPacks";
const ENCODING: &'static str = "application/json";
type Output<S: BosStr> = GetStarterPacksOutput<S>;
type Err = jacquard_common::xrpc::GenericError;
}
impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetStarterPacks<S> {
const NSID: &'static str = "app.bsky.graph.getStarterPacks";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Response = GetStarterPacksResponse;
}
pub struct GetStarterPacksRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetStarterPacksRequest {
const PATH: &'static str = "/xrpc/app.bsky.graph.getStarterPacks";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Request<S: BosStr> = GetStarterPacks<S>;
type Response = GetStarterPacksResponse;
}
pub mod get_starter_packs_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Uris;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uris = Unset;
}
pub struct SetUris<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUris<St> {}
impl<St: State> State for SetUris<St> {
type Uris = Set<members::uris>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uris(());
}
}
pub struct GetStarterPacksBuilder<S: BosStr, St: get_starter_packs_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (Option<Vec<AtUri<S>>>,),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> GetStarterPacks<S> {
pub fn new() -> GetStarterPacksBuilder<S, get_starter_packs_state::Empty> {
GetStarterPacksBuilder::new()
}
}
impl<S: BosStr> GetStarterPacksBuilder<S, get_starter_packs_state::Empty> {
pub fn new() -> Self {
GetStarterPacksBuilder {
_state: PhantomData,
_fields: (None,),
_type: PhantomData,
}
}
}
impl<S: BosStr, St> GetStarterPacksBuilder<S, St>
where
St: get_starter_packs_state::State,
St::Uris: get_starter_packs_state::IsUnset,
{
pub fn uris(
mut self,
value: impl Into<Vec<AtUri<S>>>,
) -> GetStarterPacksBuilder<S, get_starter_packs_state::SetUris<St>> {
self._fields.0 = Option::Some(value.into());
GetStarterPacksBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> GetStarterPacksBuilder<S, St>
where
St: get_starter_packs_state::State,
St::Uris: get_starter_packs_state::IsSet,
{
pub fn build(self) -> GetStarterPacks<S> {
GetStarterPacks {
uris: self._fields.0.unwrap(),
}
}
}