#[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};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct UnmuteThread<S: BosStr = DefaultStr> {
pub root: AtUri<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
pub struct UnmuteThreadResponse;
impl jacquard_common::xrpc::XrpcResp for UnmuteThreadResponse {
const NSID: &'static str = "app.bsky.graph.unmuteThread";
const ENCODING: &'static str = "application/json";
type Output<S: BosStr> = ();
type Err = jacquard_common::xrpc::GenericError;
}
impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for UnmuteThread<S> {
const NSID: &'static str = "app.bsky.graph.unmuteThread";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
"application/json",
);
type Response = UnmuteThreadResponse;
}
pub struct UnmuteThreadRequest;
impl jacquard_common::xrpc::XrpcEndpoint for UnmuteThreadRequest {
const PATH: &'static str = "/xrpc/app.bsky.graph.unmuteThread";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
"application/json",
);
type Request<S: BosStr> = UnmuteThread<S>;
type Response = UnmuteThreadResponse;
}
pub mod unmute_thread_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 Root;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Root = Unset;
}
pub struct SetRoot<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetRoot<St> {}
impl<St: State> State for SetRoot<St> {
type Root = Set<members::root>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct root(());
}
}
pub struct UnmuteThreadBuilder<S: BosStr, St: unmute_thread_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (Option<AtUri<S>>,),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> UnmuteThread<S> {
pub fn new() -> UnmuteThreadBuilder<S, unmute_thread_state::Empty> {
UnmuteThreadBuilder::new()
}
}
impl<S: BosStr> UnmuteThreadBuilder<S, unmute_thread_state::Empty> {
pub fn new() -> Self {
UnmuteThreadBuilder {
_state: PhantomData,
_fields: (None,),
_type: PhantomData,
}
}
}
impl<S: BosStr, St> UnmuteThreadBuilder<S, St>
where
St: unmute_thread_state::State,
St::Root: unmute_thread_state::IsUnset,
{
pub fn root(
mut self,
value: impl Into<AtUri<S>>,
) -> UnmuteThreadBuilder<S, unmute_thread_state::SetRoot<St>> {
self._fields.0 = Option::Some(value.into());
UnmuteThreadBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> UnmuteThreadBuilder<S, St>
where
St: unmute_thread_state::State,
St::Root: unmute_thread_state::IsSet,
{
pub fn build(self) -> UnmuteThread<S> {
UnmuteThread {
root: self._fields.0.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<SmolStr, Data<S>>,
) -> UnmuteThread<S> {
UnmuteThread {
root: self._fields.0.unwrap(),
extra_data: Some(extra_data),
}
}
}