#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Parameters {
#[serde(skip_serializing_if = "Option::is_none")]
pub depth: Option<crate::types::LimitedU16<1000u16>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_height: Option<crate::types::LimitedU16<1000u16>>,
pub uri: String,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Output {
pub thread: crate::types::Union<OutputThreadRefs>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
NotFound(Option<String>),
}
impl std::fmt::Display for Error {
fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Error::NotFound(msg) => {
write!(_f, "NotFound")?;
if let Some(msg) = msg {
write!(_f, ": {msg}")?;
}
}
}
Ok(())
}
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum OutputThreadRefs {
#[serde(rename = "app.bsky.feed.defs#threadViewPost")]
AppBskyFeedDefsThreadViewPost(Box<crate::app::bsky::feed::defs::ThreadViewPost>),
#[serde(rename = "app.bsky.feed.defs#notFoundPost")]
AppBskyFeedDefsNotFoundPost(Box<crate::app::bsky::feed::defs::NotFoundPost>),
#[serde(rename = "app.bsky.feed.defs#blockedPost")]
AppBskyFeedDefsBlockedPost(Box<crate::app::bsky::feed::defs::BlockedPost>),
}