// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: app.bsky.unspecced.defs // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. pub mod get_age_assurance_state; pub mod get_config; pub mod get_onboarding_suggested_starter_packs; pub mod get_onboarding_suggested_starter_packs_skeleton; pub mod get_popular_feed_generators; pub mod get_post_thread_other_v2; pub mod get_post_thread_v2; pub mod get_suggested_feeds; pub mod get_suggested_feeds_skeleton; pub mod get_suggested_starter_packs; pub mod get_suggested_starter_packs_skeleton; pub mod get_suggested_users; pub mod get_suggested_users_skeleton; pub mod get_suggestions_skeleton; pub mod get_tagged_suggestions; pub mod get_trending_topics; pub mod get_trends; pub mod get_trends_skeleton; pub mod init_age_assurance; pub mod search_actors_skeleton; pub mod search_posts_skeleton; pub mod search_starter_packs_skeleton; /// Object used to store age assurance data in stash. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct AgeAssuranceEvent<'a> { /// The unique identifier for this instance of the age assurance flow, in UUID format. #[serde(borrow)] pub attempt_id: jacquard_common::CowStr<'a>, /// The IP address used when completing the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub complete_ip: std::option::Option>, /// The user agent used when completing the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub complete_ua: std::option::Option>, /// The date and time of this write operation. pub created_at: jacquard_common::types::string::Datetime, /// The email used for AA. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub email: std::option::Option>, /// The IP address used when initiating the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub init_ip: std::option::Option>, /// The user agent used when initiating the AA flow. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub init_ua: std::option::Option>, /// The status of the age assurance process. #[serde(borrow)] pub status: AgeAssuranceEventStatus<'a>, } pub mod age_assurance_event_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; type Status; type AttemptId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; type Status = Unset; type AttemptId = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; type Status = S::Status; type AttemptId = S::AttemptId; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { type CreatedAt = S::CreatedAt; type Status = Set; type AttemptId = S::AttemptId; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData S>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { type CreatedAt = S::CreatedAt; type Status = S::Status; type AttemptId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `status` field pub struct status(()); ///Marker type for the `attempt_id` field pub struct attempt_id(()); } } /// Builder for constructing an instance of this type pub struct AgeAssuranceEventBuilder<'a, S: age_assurance_event_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> AgeAssuranceEvent<'a> { /// Create a new builder for this type pub fn new() -> AgeAssuranceEventBuilder<'a, age_assurance_event_state::Empty> { AgeAssuranceEventBuilder::new() } } impl<'a> AgeAssuranceEventBuilder<'a, age_assurance_event_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { AgeAssuranceEventBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, S::AttemptId: age_assurance_event_state::IsUnset, { /// Set the `attemptId` field (required) pub fn attempt_id( mut self, value: impl Into>, ) -> AgeAssuranceEventBuilder<'a, age_assurance_event_state::SetAttemptId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); AgeAssuranceEventBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> { /// Set the `completeIp` field (optional) pub fn complete_ip( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `completeIp` field to an Option value (optional) pub fn maybe_complete_ip( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> { /// Set the `completeUa` field (optional) pub fn complete_ua( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `completeUa` field to an Option value (optional) pub fn maybe_complete_ua( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, S::CreatedAt: age_assurance_event_state::IsUnset, { /// Set the `createdAt` field (required) pub fn created_at( mut self, value: impl Into, ) -> AgeAssuranceEventBuilder<'a, age_assurance_event_state::SetCreatedAt> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); AgeAssuranceEventBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> { /// Set the `email` field (optional) pub fn email( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `email` field to an Option value (optional) pub fn maybe_email(mut self, value: Option>) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> { /// Set the `initIp` field (optional) pub fn init_ip( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `initIp` field to an Option value (optional) pub fn maybe_init_ip(mut self, value: Option>) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> { /// Set the `initUa` field (optional) pub fn init_ua( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `initUa` field to an Option value (optional) pub fn maybe_init_ua(mut self, value: Option>) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, S::Status: age_assurance_event_state::IsUnset, { /// Set the `status` field (required) pub fn status( mut self, value: impl Into>, ) -> AgeAssuranceEventBuilder<'a, age_assurance_event_state::SetStatus> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); AgeAssuranceEventBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, S::CreatedAt: age_assurance_event_state::IsSet, S::Status: age_assurance_event_state::IsSet, S::AttemptId: age_assurance_event_state::IsSet, { /// Build the final struct pub fn build(self) -> AgeAssuranceEvent<'a> { AgeAssuranceEvent { attempt_id: self.__unsafe_private_named.0.unwrap(), complete_ip: self.__unsafe_private_named.1, complete_ua: self.__unsafe_private_named.2, created_at: self.__unsafe_private_named.3.unwrap(), email: self.__unsafe_private_named.4, init_ip: self.__unsafe_private_named.5, init_ua: self.__unsafe_private_named.6, status: self.__unsafe_private_named.7.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> AgeAssuranceEvent<'a> { AgeAssuranceEvent { attempt_id: self.__unsafe_private_named.0.unwrap(), complete_ip: self.__unsafe_private_named.1, complete_ua: self.__unsafe_private_named.2, created_at: self.__unsafe_private_named.3.unwrap(), email: self.__unsafe_private_named.4, init_ip: self.__unsafe_private_named.5, init_ua: self.__unsafe_private_named.6, status: self.__unsafe_private_named.7.unwrap(), extra_data: Some(extra_data), } } } /// The status of the age assurance process. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum AgeAssuranceEventStatus<'a> { Unknown, Pending, Assured, Other(jacquard_common::CowStr<'a>), } impl<'a> AgeAssuranceEventStatus<'a> { pub fn as_str(&self) -> &str { match self { Self::Unknown => "unknown", Self::Pending => "pending", Self::Assured => "assured", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for AgeAssuranceEventStatus<'a> { fn from(s: &'a str) -> Self { match s { "unknown" => Self::Unknown, "pending" => Self::Pending, "assured" => Self::Assured, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for AgeAssuranceEventStatus<'a> { fn from(s: String) -> Self { match s.as_str() { "unknown" => Self::Unknown, "pending" => Self::Pending, "assured" => Self::Assured, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for AgeAssuranceEventStatus<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for AgeAssuranceEventStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for AgeAssuranceEventStatus<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for AgeAssuranceEventStatus<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for AgeAssuranceEventStatus<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for AgeAssuranceEventStatus<'_> { type Output = AgeAssuranceEventStatus<'static>; fn into_static(self) -> Self::Output { match self { AgeAssuranceEventStatus::Unknown => AgeAssuranceEventStatus::Unknown, AgeAssuranceEventStatus::Pending => AgeAssuranceEventStatus::Pending, AgeAssuranceEventStatus::Assured => AgeAssuranceEventStatus::Assured, AgeAssuranceEventStatus::Other(v) => { AgeAssuranceEventStatus::Other(v.into_static()) } } } } fn lexicon_doc_app_bsky_unspecced_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 'static, > { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("app.bsky.unspecced.defs"), revision: None, description: None, defs: { let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("ageAssuranceEvent"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "Object used to store age assurance data in stash.", ), ), required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("createdAt"), ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_common::smol_str::SmolStr::new_static("attemptId") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "attemptId", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The unique identifier for this instance of the age assurance flow, in UUID format.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "completeIp", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The IP address used when completing the AA flow.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "completeUa", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The user agent used when completing the AA flow.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "createdAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The date and time of this write operation.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("email"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The email used for AA.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("initIp"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The IP address used when initiating the AA flow.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("initUa"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The user agent used when initiating the AA flow.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The status of the age assurance process.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("ageAssuranceState"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "The computed state of the age assurance process, returned to the user in question on certain authenticated requests.", ), ), required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("status")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "lastInitiatedAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The timestamp when this state was last updated.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The status of the age assurance process.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("skeletonSearchActor"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("did")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("skeletonSearchPost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("uri")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "skeletonSearchStarterPack", ), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("uri")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("skeletonTrend"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("topic"), ::jacquard_common::smol_str::SmolStr::new_static("displayName"), ::jacquard_common::smol_str::SmolStr::new_static("link"), ::jacquard_common::smol_str::SmolStr::new_static("startedAt"), ::jacquard_common::smol_str::SmolStr::new_static("postCount"), ::jacquard_common::smol_str::SmolStr::new_static("dids") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("category"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("dids"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "displayName", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("link"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "postCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "startedAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("topic"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("threadItemBlocked"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("author")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("author"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.feed.defs#blockedAuthor", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "threadItemNoUnauthenticated", ), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("threadItemNotFound"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("threadItemPost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("post"), ::jacquard_common::smol_str::SmolStr::new_static("moreParents"), ::jacquard_common::smol_str::SmolStr::new_static("moreReplies"), ::jacquard_common::smol_str::SmolStr::new_static("opThread"), ::jacquard_common::smol_str::SmolStr::new_static("hiddenByThreadgate"), ::jacquard_common::smol_str::SmolStr::new_static("mutedByViewer") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "hiddenByThreadgate", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "moreParents", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "moreReplies", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "mutedByViewer", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("opThread"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("post"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.feed.defs#postView", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("trendView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("topic"), ::jacquard_common::smol_str::SmolStr::new_static("displayName"), ::jacquard_common::smol_str::SmolStr::new_static("link"), ::jacquard_common::smol_str::SmolStr::new_static("startedAt"), ::jacquard_common::smol_str::SmolStr::new_static("postCount"), ::jacquard_common::smol_str::SmolStr::new_static("actors") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("actors"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileViewBasic", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("category"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "displayName", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("link"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "postCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "startedAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("topic"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("trendingTopic"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("topic"), ::jacquard_common::smol_str::SmolStr::new_static("link") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "description", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "displayName", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("link"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("topic"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map }, } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for AgeAssuranceEvent<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "ageAssuranceEvent" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// The computed state of the age assurance process, returned to the user in question on certain authenticated requests. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct AgeAssuranceState<'a> { /// The timestamp when this state was last updated. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub last_initiated_at: std::option::Option, /// The status of the age assurance process. #[serde(borrow)] pub status: AgeAssuranceStateStatus<'a>, } /// The status of the age assurance process. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum AgeAssuranceStateStatus<'a> { Unknown, Pending, Assured, Blocked, Other(jacquard_common::CowStr<'a>), } impl<'a> AgeAssuranceStateStatus<'a> { pub fn as_str(&self) -> &str { match self { Self::Unknown => "unknown", Self::Pending => "pending", Self::Assured => "assured", Self::Blocked => "blocked", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for AgeAssuranceStateStatus<'a> { fn from(s: &'a str) -> Self { match s { "unknown" => Self::Unknown, "pending" => Self::Pending, "assured" => Self::Assured, "blocked" => Self::Blocked, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for AgeAssuranceStateStatus<'a> { fn from(s: String) -> Self { match s.as_str() { "unknown" => Self::Unknown, "pending" => Self::Pending, "assured" => Self::Assured, "blocked" => Self::Blocked, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for AgeAssuranceStateStatus<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for AgeAssuranceStateStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for AgeAssuranceStateStatus<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for AgeAssuranceStateStatus<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for AgeAssuranceStateStatus<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for AgeAssuranceStateStatus<'_> { type Output = AgeAssuranceStateStatus<'static>; fn into_static(self) -> Self::Output { match self { AgeAssuranceStateStatus::Unknown => AgeAssuranceStateStatus::Unknown, AgeAssuranceStateStatus::Pending => AgeAssuranceStateStatus::Pending, AgeAssuranceStateStatus::Assured => AgeAssuranceStateStatus::Assured, AgeAssuranceStateStatus::Blocked => AgeAssuranceStateStatus::Blocked, AgeAssuranceStateStatus::Other(v) => { AgeAssuranceStateStatus::Other(v.into_static()) } } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for AgeAssuranceState<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "ageAssuranceState" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SkeletonSearchActor<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } pub mod skeleton_search_actor_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); } } /// Builder for constructing an instance of this type pub struct SkeletonSearchActorBuilder<'a, S: skeleton_search_actor_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> SkeletonSearchActor<'a> { /// Create a new builder for this type pub fn new() -> SkeletonSearchActorBuilder<'a, skeleton_search_actor_state::Empty> { SkeletonSearchActorBuilder::new() } } impl<'a> SkeletonSearchActorBuilder<'a, skeleton_search_actor_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SkeletonSearchActorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonSearchActorBuilder<'a, S> where S: skeleton_search_actor_state::State, S::Did: skeleton_search_actor_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> SkeletonSearchActorBuilder<'a, skeleton_search_actor_state::SetDid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); SkeletonSearchActorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonSearchActorBuilder<'a, S> where S: skeleton_search_actor_state::State, S::Did: skeleton_search_actor_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonSearchActor<'a> { SkeletonSearchActor { did: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SkeletonSearchActor<'a> { SkeletonSearchActor { did: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SkeletonSearchActor<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "skeletonSearchActor" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SkeletonSearchPost<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod skeleton_search_post_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); } } /// Builder for constructing an instance of this type pub struct SkeletonSearchPostBuilder<'a, S: skeleton_search_post_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> SkeletonSearchPost<'a> { /// Create a new builder for this type pub fn new() -> SkeletonSearchPostBuilder<'a, skeleton_search_post_state::Empty> { SkeletonSearchPostBuilder::new() } } impl<'a> SkeletonSearchPostBuilder<'a, skeleton_search_post_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SkeletonSearchPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonSearchPostBuilder<'a, S> where S: skeleton_search_post_state::State, S::Uri: skeleton_search_post_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> SkeletonSearchPostBuilder<'a, skeleton_search_post_state::SetUri> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); SkeletonSearchPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonSearchPostBuilder<'a, S> where S: skeleton_search_post_state::State, S::Uri: skeleton_search_post_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonSearchPost<'a> { SkeletonSearchPost { uri: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SkeletonSearchPost<'a> { SkeletonSearchPost { uri: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SkeletonSearchPost<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "skeletonSearchPost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SkeletonSearchStarterPack<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod skeleton_search_starter_pack_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); } } /// Builder for constructing an instance of this type pub struct SkeletonSearchStarterPackBuilder< 'a, S: skeleton_search_starter_pack_state::State, > { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> SkeletonSearchStarterPack<'a> { /// Create a new builder for this type pub fn new() -> SkeletonSearchStarterPackBuilder< 'a, skeleton_search_starter_pack_state::Empty, > { SkeletonSearchStarterPackBuilder::new() } } impl< 'a, > SkeletonSearchStarterPackBuilder<'a, skeleton_search_starter_pack_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SkeletonSearchStarterPackBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonSearchStarterPackBuilder<'a, S> where S: skeleton_search_starter_pack_state::State, S::Uri: skeleton_search_starter_pack_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> SkeletonSearchStarterPackBuilder< 'a, skeleton_search_starter_pack_state::SetUri, > { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); SkeletonSearchStarterPackBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonSearchStarterPackBuilder<'a, S> where S: skeleton_search_starter_pack_state::State, S::Uri: skeleton_search_starter_pack_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonSearchStarterPack<'a> { SkeletonSearchStarterPack { uri: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SkeletonSearchStarterPack<'a> { SkeletonSearchStarterPack { uri: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SkeletonSearchStarterPack<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "skeletonSearchStarterPack" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SkeletonTrend<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub category: std::option::Option>, #[serde(borrow)] pub dids: Vec>, #[serde(borrow)] pub display_name: jacquard_common::CowStr<'a>, #[serde(borrow)] pub link: jacquard_common::CowStr<'a>, pub post_count: i64, pub started_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, #[serde(borrow)] pub topic: jacquard_common::CowStr<'a>, } pub mod skeleton_trend_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Link; type Dids; type DisplayName; type Topic; type PostCount; type StartedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Link = Unset; type Dids = Unset; type DisplayName = Unset; type Topic = Unset; type PostCount = Unset; type StartedAt = Unset; } ///State transition - sets the `link` field to Set pub struct SetLink(PhantomData S>); impl sealed::Sealed for SetLink {} impl State for SetLink { type Link = Set; type Dids = S::Dids; type DisplayName = S::DisplayName; type Topic = S::Topic; type PostCount = S::PostCount; type StartedAt = S::StartedAt; } ///State transition - sets the `dids` field to Set pub struct SetDids(PhantomData S>); impl sealed::Sealed for SetDids {} impl State for SetDids { type Link = S::Link; type Dids = Set; type DisplayName = S::DisplayName; type Topic = S::Topic; type PostCount = S::PostCount; type StartedAt = S::StartedAt; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { type Link = S::Link; type Dids = S::Dids; type DisplayName = Set; type Topic = S::Topic; type PostCount = S::PostCount; type StartedAt = S::StartedAt; } ///State transition - sets the `topic` field to Set pub struct SetTopic(PhantomData S>); impl sealed::Sealed for SetTopic {} impl State for SetTopic { type Link = S::Link; type Dids = S::Dids; type DisplayName = S::DisplayName; type Topic = Set; type PostCount = S::PostCount; type StartedAt = S::StartedAt; } ///State transition - sets the `post_count` field to Set pub struct SetPostCount(PhantomData S>); impl sealed::Sealed for SetPostCount {} impl State for SetPostCount { type Link = S::Link; type Dids = S::Dids; type DisplayName = S::DisplayName; type Topic = S::Topic; type PostCount = Set; type StartedAt = S::StartedAt; } ///State transition - sets the `started_at` field to Set pub struct SetStartedAt(PhantomData S>); impl sealed::Sealed for SetStartedAt {} impl State for SetStartedAt { type Link = S::Link; type Dids = S::Dids; type DisplayName = S::DisplayName; type Topic = S::Topic; type PostCount = S::PostCount; type StartedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `link` field pub struct link(()); ///Marker type for the `dids` field pub struct dids(()); ///Marker type for the `display_name` field pub struct display_name(()); ///Marker type for the `topic` field pub struct topic(()); ///Marker type for the `post_count` field pub struct post_count(()); ///Marker type for the `started_at` field pub struct started_at(()); } } /// Builder for constructing an instance of this type pub struct SkeletonTrendBuilder<'a, S: skeleton_trend_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> SkeletonTrend<'a> { /// Create a new builder for this type pub fn new() -> SkeletonTrendBuilder<'a, skeleton_trend_state::Empty> { SkeletonTrendBuilder::new() } } impl<'a> SkeletonTrendBuilder<'a, skeleton_trend_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SkeletonTrendBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: skeleton_trend_state::State> SkeletonTrendBuilder<'a, S> { /// Set the `category` field (optional) pub fn category( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `category` field to an Option value (optional) pub fn maybe_category(mut self, value: Option>) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, S::Dids: skeleton_trend_state::IsUnset, { /// Set the `dids` field (required) pub fn dids( mut self, value: impl Into>>, ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetDids> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); SkeletonTrendBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, S::DisplayName: skeleton_trend_state::IsUnset, { /// Set the `displayName` field (required) pub fn display_name( mut self, value: impl Into>, ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetDisplayName> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); SkeletonTrendBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, S::Link: skeleton_trend_state::IsUnset, { /// Set the `link` field (required) pub fn link( mut self, value: impl Into>, ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetLink> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); SkeletonTrendBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, S::PostCount: skeleton_trend_state::IsUnset, { /// Set the `postCount` field (required) pub fn post_count( mut self, value: impl Into, ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetPostCount> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); SkeletonTrendBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, S::StartedAt: skeleton_trend_state::IsUnset, { /// Set the `startedAt` field (required) pub fn started_at( mut self, value: impl Into, ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetStartedAt> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); SkeletonTrendBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: skeleton_trend_state::State> SkeletonTrendBuilder<'a, S> { /// Set the `status` field (optional) pub fn status(mut self, value: impl Into>>) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status(mut self, value: Option>) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, S::Topic: skeleton_trend_state::IsUnset, { /// Set the `topic` field (required) pub fn topic( mut self, value: impl Into>, ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetTopic> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); SkeletonTrendBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, S::Link: skeleton_trend_state::IsSet, S::Dids: skeleton_trend_state::IsSet, S::DisplayName: skeleton_trend_state::IsSet, S::Topic: skeleton_trend_state::IsSet, S::PostCount: skeleton_trend_state::IsSet, S::StartedAt: skeleton_trend_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonTrend<'a> { SkeletonTrend { category: self.__unsafe_private_named.0, dids: self.__unsafe_private_named.1.unwrap(), display_name: self.__unsafe_private_named.2.unwrap(), link: self.__unsafe_private_named.3.unwrap(), post_count: self.__unsafe_private_named.4.unwrap(), started_at: self.__unsafe_private_named.5.unwrap(), status: self.__unsafe_private_named.6, topic: self.__unsafe_private_named.7.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SkeletonTrend<'a> { SkeletonTrend { category: self.__unsafe_private_named.0, dids: self.__unsafe_private_named.1.unwrap(), display_name: self.__unsafe_private_named.2.unwrap(), link: self.__unsafe_private_named.3.unwrap(), post_count: self.__unsafe_private_named.4.unwrap(), started_at: self.__unsafe_private_named.5.unwrap(), status: self.__unsafe_private_named.6, topic: self.__unsafe_private_named.7.unwrap(), extra_data: Some(extra_data), } } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum SkeletonTrendStatus<'a> { Hot, Other(jacquard_common::CowStr<'a>), } impl<'a> SkeletonTrendStatus<'a> { pub fn as_str(&self) -> &str { match self { Self::Hot => "hot", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for SkeletonTrendStatus<'a> { fn from(s: &'a str) -> Self { match s { "hot" => Self::Hot, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for SkeletonTrendStatus<'a> { fn from(s: String) -> Self { match s.as_str() { "hot" => Self::Hot, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for SkeletonTrendStatus<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for SkeletonTrendStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for SkeletonTrendStatus<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for SkeletonTrendStatus<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for SkeletonTrendStatus<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for SkeletonTrendStatus<'_> { type Output = SkeletonTrendStatus<'static>; fn into_static(self) -> Self::Output { match self { SkeletonTrendStatus::Hot => SkeletonTrendStatus::Hot, SkeletonTrendStatus::Other(v) => SkeletonTrendStatus::Other(v.into_static()), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SkeletonTrend<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "skeletonTrend" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ThreadItemBlocked<'a> { #[serde(borrow)] pub author: crate::app_bsky::feed::BlockedAuthor<'a>, } pub mod thread_item_blocked_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Author; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Author = Unset; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { type Author = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `author` field pub struct author(()); } } /// Builder for constructing an instance of this type pub struct ThreadItemBlockedBuilder<'a, S: thread_item_blocked_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ThreadItemBlocked<'a> { /// Create a new builder for this type pub fn new() -> ThreadItemBlockedBuilder<'a, thread_item_blocked_state::Empty> { ThreadItemBlockedBuilder::new() } } impl<'a> ThreadItemBlockedBuilder<'a, thread_item_blocked_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ThreadItemBlockedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemBlockedBuilder<'a, S> where S: thread_item_blocked_state::State, S::Author: thread_item_blocked_state::IsUnset, { /// Set the `author` field (required) pub fn author( mut self, value: impl Into>, ) -> ThreadItemBlockedBuilder<'a, thread_item_blocked_state::SetAuthor> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ThreadItemBlockedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemBlockedBuilder<'a, S> where S: thread_item_blocked_state::State, S::Author: thread_item_blocked_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadItemBlocked<'a> { ThreadItemBlocked { author: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ThreadItemBlocked<'a> { ThreadItemBlocked { author: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadItemBlocked<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "threadItemBlocked" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ThreadItemNoUnauthenticated<'a> {} impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadItemNoUnauthenticated<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "threadItemNoUnauthenticated" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ThreadItemNotFound<'a> {} impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadItemNotFound<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "threadItemNotFound" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ThreadItemPost<'a> { /// The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. pub hidden_by_threadgate: bool, /// This post has more parents that were not present in the response. This is just a boolean, without the number of parents. pub more_parents: bool, /// This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate. pub more_replies: i64, /// This is by an account muted by the viewer requesting it. pub muted_by_viewer: bool, /// This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread. pub op_thread: bool, #[serde(borrow)] pub post: crate::app_bsky::feed::PostView<'a>, } pub mod thread_item_post_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type OpThread; type Post; type MoreParents; type HiddenByThreadgate; type MutedByViewer; type MoreReplies; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type OpThread = Unset; type Post = Unset; type MoreParents = Unset; type HiddenByThreadgate = Unset; type MutedByViewer = Unset; type MoreReplies = Unset; } ///State transition - sets the `op_thread` field to Set pub struct SetOpThread(PhantomData S>); impl sealed::Sealed for SetOpThread {} impl State for SetOpThread { type OpThread = Set; type Post = S::Post; type MoreParents = S::MoreParents; type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = S::MutedByViewer; type MoreReplies = S::MoreReplies; } ///State transition - sets the `post` field to Set pub struct SetPost(PhantomData S>); impl sealed::Sealed for SetPost {} impl State for SetPost { type OpThread = S::OpThread; type Post = Set; type MoreParents = S::MoreParents; type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = S::MutedByViewer; type MoreReplies = S::MoreReplies; } ///State transition - sets the `more_parents` field to Set pub struct SetMoreParents(PhantomData S>); impl sealed::Sealed for SetMoreParents {} impl State for SetMoreParents { type OpThread = S::OpThread; type Post = S::Post; type MoreParents = Set; type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = S::MutedByViewer; type MoreReplies = S::MoreReplies; } ///State transition - sets the `hidden_by_threadgate` field to Set pub struct SetHiddenByThreadgate(PhantomData S>); impl sealed::Sealed for SetHiddenByThreadgate {} impl State for SetHiddenByThreadgate { type OpThread = S::OpThread; type Post = S::Post; type MoreParents = S::MoreParents; type HiddenByThreadgate = Set; type MutedByViewer = S::MutedByViewer; type MoreReplies = S::MoreReplies; } ///State transition - sets the `muted_by_viewer` field to Set pub struct SetMutedByViewer(PhantomData S>); impl sealed::Sealed for SetMutedByViewer {} impl State for SetMutedByViewer { type OpThread = S::OpThread; type Post = S::Post; type MoreParents = S::MoreParents; type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = Set; type MoreReplies = S::MoreReplies; } ///State transition - sets the `more_replies` field to Set pub struct SetMoreReplies(PhantomData S>); impl sealed::Sealed for SetMoreReplies {} impl State for SetMoreReplies { type OpThread = S::OpThread; type Post = S::Post; type MoreParents = S::MoreParents; type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = S::MutedByViewer; type MoreReplies = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `op_thread` field pub struct op_thread(()); ///Marker type for the `post` field pub struct post(()); ///Marker type for the `more_parents` field pub struct more_parents(()); ///Marker type for the `hidden_by_threadgate` field pub struct hidden_by_threadgate(()); ///Marker type for the `muted_by_viewer` field pub struct muted_by_viewer(()); ///Marker type for the `more_replies` field pub struct more_replies(()); } } /// Builder for constructing an instance of this type pub struct ThreadItemPostBuilder<'a, S: thread_item_post_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option, ::core::option::Option, ::core::option::Option, ::core::option::Option, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ThreadItemPost<'a> { /// Create a new builder for this type pub fn new() -> ThreadItemPostBuilder<'a, thread_item_post_state::Empty> { ThreadItemPostBuilder::new() } } impl<'a> ThreadItemPostBuilder<'a, thread_item_post_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ThreadItemPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, S::HiddenByThreadgate: thread_item_post_state::IsUnset, { /// Set the `hiddenByThreadgate` field (required) pub fn hidden_by_threadgate( mut self, value: impl Into, ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetHiddenByThreadgate> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ThreadItemPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, S::MoreParents: thread_item_post_state::IsUnset, { /// Set the `moreParents` field (required) pub fn more_parents( mut self, value: impl Into, ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetMoreParents> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); ThreadItemPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, S::MoreReplies: thread_item_post_state::IsUnset, { /// Set the `moreReplies` field (required) pub fn more_replies( mut self, value: impl Into, ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetMoreReplies> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ThreadItemPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, S::MutedByViewer: thread_item_post_state::IsUnset, { /// Set the `mutedByViewer` field (required) pub fn muted_by_viewer( mut self, value: impl Into, ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetMutedByViewer> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); ThreadItemPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, S::OpThread: thread_item_post_state::IsUnset, { /// Set the `opThread` field (required) pub fn op_thread( mut self, value: impl Into, ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetOpThread> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); ThreadItemPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, S::Post: thread_item_post_state::IsUnset, { /// Set the `post` field (required) pub fn post( mut self, value: impl Into>, ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetPost> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); ThreadItemPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, S::OpThread: thread_item_post_state::IsSet, S::Post: thread_item_post_state::IsSet, S::MoreParents: thread_item_post_state::IsSet, S::HiddenByThreadgate: thread_item_post_state::IsSet, S::MutedByViewer: thread_item_post_state::IsSet, S::MoreReplies: thread_item_post_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadItemPost<'a> { ThreadItemPost { hidden_by_threadgate: self.__unsafe_private_named.0.unwrap(), more_parents: self.__unsafe_private_named.1.unwrap(), more_replies: self.__unsafe_private_named.2.unwrap(), muted_by_viewer: self.__unsafe_private_named.3.unwrap(), op_thread: self.__unsafe_private_named.4.unwrap(), post: self.__unsafe_private_named.5.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ThreadItemPost<'a> { ThreadItemPost { hidden_by_threadgate: self.__unsafe_private_named.0.unwrap(), more_parents: self.__unsafe_private_named.1.unwrap(), more_replies: self.__unsafe_private_named.2.unwrap(), muted_by_viewer: self.__unsafe_private_named.3.unwrap(), op_thread: self.__unsafe_private_named.4.unwrap(), post: self.__unsafe_private_named.5.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadItemPost<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "threadItemPost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct TrendView<'a> { #[serde(borrow)] pub actors: Vec>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub category: std::option::Option>, #[serde(borrow)] pub display_name: jacquard_common::CowStr<'a>, #[serde(borrow)] pub link: jacquard_common::CowStr<'a>, pub post_count: i64, pub started_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, #[serde(borrow)] pub topic: jacquard_common::CowStr<'a>, } pub mod trend_view_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type DisplayName; type Actors; type Link; type StartedAt; type Topic; type PostCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type DisplayName = Unset; type Actors = Unset; type Link = Unset; type StartedAt = Unset; type Topic = Unset; type PostCount = Unset; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { type DisplayName = Set; type Actors = S::Actors; type Link = S::Link; type StartedAt = S::StartedAt; type Topic = S::Topic; type PostCount = S::PostCount; } ///State transition - sets the `actors` field to Set pub struct SetActors(PhantomData S>); impl sealed::Sealed for SetActors {} impl State for SetActors { type DisplayName = S::DisplayName; type Actors = Set; type Link = S::Link; type StartedAt = S::StartedAt; type Topic = S::Topic; type PostCount = S::PostCount; } ///State transition - sets the `link` field to Set pub struct SetLink(PhantomData S>); impl sealed::Sealed for SetLink {} impl State for SetLink { type DisplayName = S::DisplayName; type Actors = S::Actors; type Link = Set; type StartedAt = S::StartedAt; type Topic = S::Topic; type PostCount = S::PostCount; } ///State transition - sets the `started_at` field to Set pub struct SetStartedAt(PhantomData S>); impl sealed::Sealed for SetStartedAt {} impl State for SetStartedAt { type DisplayName = S::DisplayName; type Actors = S::Actors; type Link = S::Link; type StartedAt = Set; type Topic = S::Topic; type PostCount = S::PostCount; } ///State transition - sets the `topic` field to Set pub struct SetTopic(PhantomData S>); impl sealed::Sealed for SetTopic {} impl State for SetTopic { type DisplayName = S::DisplayName; type Actors = S::Actors; type Link = S::Link; type StartedAt = S::StartedAt; type Topic = Set; type PostCount = S::PostCount; } ///State transition - sets the `post_count` field to Set pub struct SetPostCount(PhantomData S>); impl sealed::Sealed for SetPostCount {} impl State for SetPostCount { type DisplayName = S::DisplayName; type Actors = S::Actors; type Link = S::Link; type StartedAt = S::StartedAt; type Topic = S::Topic; type PostCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `display_name` field pub struct display_name(()); ///Marker type for the `actors` field pub struct actors(()); ///Marker type for the `link` field pub struct link(()); ///Marker type for the `started_at` field pub struct started_at(()); ///Marker type for the `topic` field pub struct topic(()); ///Marker type for the `post_count` field pub struct post_count(()); } } /// Builder for constructing an instance of this type pub struct TrendViewBuilder<'a, S: trend_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> TrendView<'a> { /// Create a new builder for this type pub fn new() -> TrendViewBuilder<'a, trend_view_state::Empty> { TrendViewBuilder::new() } } impl<'a> TrendViewBuilder<'a, trend_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { TrendViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, S::Actors: trend_view_state::IsUnset, { /// Set the `actors` field (required) pub fn actors( mut self, value: impl Into>>, ) -> TrendViewBuilder<'a, trend_view_state::SetActors> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); TrendViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: trend_view_state::State> TrendViewBuilder<'a, S> { /// Set the `category` field (optional) pub fn category( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `category` field to an Option value (optional) pub fn maybe_category(mut self, value: Option>) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, S::DisplayName: trend_view_state::IsUnset, { /// Set the `displayName` field (required) pub fn display_name( mut self, value: impl Into>, ) -> TrendViewBuilder<'a, trend_view_state::SetDisplayName> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); TrendViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, S::Link: trend_view_state::IsUnset, { /// Set the `link` field (required) pub fn link( mut self, value: impl Into>, ) -> TrendViewBuilder<'a, trend_view_state::SetLink> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); TrendViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, S::PostCount: trend_view_state::IsUnset, { /// Set the `postCount` field (required) pub fn post_count( mut self, value: impl Into, ) -> TrendViewBuilder<'a, trend_view_state::SetPostCount> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); TrendViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, S::StartedAt: trend_view_state::IsUnset, { /// Set the `startedAt` field (required) pub fn started_at( mut self, value: impl Into, ) -> TrendViewBuilder<'a, trend_view_state::SetStartedAt> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); TrendViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: trend_view_state::State> TrendViewBuilder<'a, S> { /// Set the `status` field (optional) pub fn status(mut self, value: impl Into>>) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status(mut self, value: Option>) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, S::Topic: trend_view_state::IsUnset, { /// Set the `topic` field (required) pub fn topic( mut self, value: impl Into>, ) -> TrendViewBuilder<'a, trend_view_state::SetTopic> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); TrendViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, S::DisplayName: trend_view_state::IsSet, S::Actors: trend_view_state::IsSet, S::Link: trend_view_state::IsSet, S::StartedAt: trend_view_state::IsSet, S::Topic: trend_view_state::IsSet, S::PostCount: trend_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TrendView<'a> { TrendView { actors: self.__unsafe_private_named.0.unwrap(), category: self.__unsafe_private_named.1, display_name: self.__unsafe_private_named.2.unwrap(), link: self.__unsafe_private_named.3.unwrap(), post_count: self.__unsafe_private_named.4.unwrap(), started_at: self.__unsafe_private_named.5.unwrap(), status: self.__unsafe_private_named.6, topic: self.__unsafe_private_named.7.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> TrendView<'a> { TrendView { actors: self.__unsafe_private_named.0.unwrap(), category: self.__unsafe_private_named.1, display_name: self.__unsafe_private_named.2.unwrap(), link: self.__unsafe_private_named.3.unwrap(), post_count: self.__unsafe_private_named.4.unwrap(), started_at: self.__unsafe_private_named.5.unwrap(), status: self.__unsafe_private_named.6, topic: self.__unsafe_private_named.7.unwrap(), extra_data: Some(extra_data), } } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum TrendViewStatus<'a> { Hot, Other(jacquard_common::CowStr<'a>), } impl<'a> TrendViewStatus<'a> { pub fn as_str(&self) -> &str { match self { Self::Hot => "hot", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for TrendViewStatus<'a> { fn from(s: &'a str) -> Self { match s { "hot" => Self::Hot, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for TrendViewStatus<'a> { fn from(s: String) -> Self { match s.as_str() { "hot" => Self::Hot, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for TrendViewStatus<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for TrendViewStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for TrendViewStatus<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for TrendViewStatus<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for TrendViewStatus<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for TrendViewStatus<'_> { type Output = TrendViewStatus<'static>; fn into_static(self) -> Self::Output { match self { TrendViewStatus::Hot => TrendViewStatus::Hot, TrendViewStatus::Other(v) => TrendViewStatus::Other(v.into_static()), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for TrendView<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "trendView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct TrendingTopic<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub description: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub display_name: std::option::Option>, #[serde(borrow)] pub link: jacquard_common::CowStr<'a>, #[serde(borrow)] pub topic: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for TrendingTopic<'a> { fn nsid() -> &'static str { "app.bsky.unspecced.defs" } fn def_name() -> &'static str { "trendingTopic" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_unspecced_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } }