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