// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: app.bsky.graph.defs // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. pub mod block; pub mod follow; pub mod get_actor_starter_packs; pub mod get_blocks; pub mod get_followers; pub mod get_follows; pub mod get_known_followers; pub mod get_list; pub mod get_list_blocks; pub mod get_list_mutes; pub mod get_lists; pub mod get_lists_with_membership; pub mod get_mutes; pub mod get_relationships; pub mod get_starter_pack; pub mod get_starter_packs; pub mod get_starter_packs_with_membership; pub mod get_suggested_follows_by_actor; pub mod list; pub mod listblock; pub mod listitem; pub mod mute_actor; pub mod mute_actor_list; pub mod mute_thread; pub mod search_starter_packs; pub mod starterpack; pub mod unmute_actor; pub mod unmute_actor_list; pub mod unmute_thread; pub mod verification; /// A list of actors used for curation purposes such as list feeds or interaction gating. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct Curatelist; impl std::fmt::Display for Curatelist { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "curatelist") } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ListItemView<'a> { #[serde(borrow)] pub subject: crate::app_bsky::actor::ProfileView<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod list_item_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 Uri; type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; type Subject = 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; type Subject = S::Subject; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { type Uri = S::Uri; type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `subject` field pub struct subject(()); } } /// Builder for constructing an instance of this type pub struct ListItemViewBuilder<'a, S: list_item_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ListItemView<'a> { /// Create a new builder for this type pub fn new() -> ListItemViewBuilder<'a, list_item_view_state::Empty> { ListItemViewBuilder::new() } } impl<'a> ListItemViewBuilder<'a, list_item_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ListItemViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ListItemViewBuilder<'a, S> where S: list_item_view_state::State, S::Subject: list_item_view_state::IsUnset, { /// Set the `subject` field (required) pub fn subject( mut self, value: impl Into>, ) -> ListItemViewBuilder<'a, list_item_view_state::SetSubject> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ListItemViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ListItemViewBuilder<'a, S> where S: list_item_view_state::State, S::Uri: list_item_view_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> ListItemViewBuilder<'a, list_item_view_state::SetUri> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); ListItemViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ListItemViewBuilder<'a, S> where S: list_item_view_state::State, S::Uri: list_item_view_state::IsSet, S::Subject: list_item_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListItemView<'a> { ListItemView { subject: self.__unsafe_private_named.0.unwrap(), uri: self.__unsafe_private_named.1.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>, >, ) -> ListItemView<'a> { ListItemView { subject: self.__unsafe_private_named.0.unwrap(), uri: self.__unsafe_private_named.1.unwrap(), extra_data: Some(extra_data), } } } fn lexicon_doc_app_bsky_graph_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 'static, > { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("app.bsky.graph.defs"), revision: None, description: None, defs: { let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("curatelist"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("listItemView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("subject") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("subject"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileView", ), }), ); 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("listPurpose"), ::jacquard_lexicon::lexicon::LexUserType::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("listView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_common::smol_str::SmolStr::new_static("creator"), ::jacquard_common::smol_str::SmolStr::new_static("name"), ::jacquard_common::smol_str::SmolStr::new_static("purpose"), ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("avatar"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), 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("cid"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Cid, ), 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("creator"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileView", ), }), ); 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: Some(3000usize), min_graphemes: None, max_graphemes: Some(300usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "descriptionFacets", ), ::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.richtext.facet", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "indexedAt", ), ::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("labels"), ::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( "com.atproto.label.defs#label", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "listItemCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: Some(0i64), maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("name"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: Some(1usize), max_length: Some(64usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("purpose"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#listPurpose"), }), ); 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.insert( ::jacquard_common::smol_str::SmolStr::new_static("viewer"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#listViewerState", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("listViewBasic"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_common::smol_str::SmolStr::new_static("name"), ::jacquard_common::smol_str::SmolStr::new_static("purpose") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("avatar"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), 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("cid"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Cid, ), 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( "indexedAt", ), ::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("labels"), ::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( "com.atproto.label.defs#label", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "listItemCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: Some(0i64), maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("name"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: Some(1usize), max_length: Some(64usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("purpose"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#listPurpose"), }), ); 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.insert( ::jacquard_common::smol_str::SmolStr::new_static("viewer"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#listViewerState", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("listViewerState"), ::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.insert( ::jacquard_common::smol_str::SmolStr::new_static("blocked"), ::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.insert( ::jacquard_common::smol_str::SmolStr::new_static("muted"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("modlist"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("notFoundActor"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "indicates that a handle or DID could not be resolved", ), ), required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("actor"), ::jacquard_common::smol_str::SmolStr::new_static("notFound") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("actor"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtIdentifier, ), 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("notFound"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("referencelist"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("relationship"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)", ), ), 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.insert( ::jacquard_common::smol_str::SmolStr::new_static( "followedBy", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "if the actor is followed by this DID, contains the AT-URI of the follow record", ), ), 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.insert( ::jacquard_common::smol_str::SmolStr::new_static( "following", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "if the actor follows this DID, this is the AT-URI of the follow record", ), ), 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("starterPackView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_common::smol_str::SmolStr::new_static("creator"), ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Cid, ), 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("creator"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileViewBasic", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("feeds"), ::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.feed.defs#generatorView", ), }), min_length: None, max_length: Some(3usize), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "indexedAt", ), ::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( "joinedAllTimeCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: Some(0i64), maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "joinedWeekCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: Some(0i64), maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labels"), ::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( "com.atproto.label.defs#label", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("list"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#listViewBasic", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "listItemsSample", ), ::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( "#listItemView", ), }), min_length: None, max_length: Some(12usize), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); 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("starterPackViewBasic"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_common::smol_str::SmolStr::new_static("creator"), ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Cid, ), 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("creator"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileViewBasic", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "indexedAt", ), ::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( "joinedAllTimeCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: Some(0i64), maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "joinedWeekCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: Some(0i64), maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labels"), ::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( "com.atproto.label.defs#label", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "listItemCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: Some(0i64), maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); 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 }, } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListItemView<'a> { fn nsid() -> &'static str { "app.bsky.graph.defs" } fn def_name() -> &'static str { "listItemView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_graph_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ListPurpose<'a> { AppBskyGraphDefsModlist, AppBskyGraphDefsCuratelist, AppBskyGraphDefsReferencelist, Other(jacquard_common::CowStr<'a>), } impl<'a> ListPurpose<'a> { pub fn as_str(&self) -> &str { match self { Self::AppBskyGraphDefsModlist => "app.bsky.graph.defs#modlist", Self::AppBskyGraphDefsCuratelist => "app.bsky.graph.defs#curatelist", Self::AppBskyGraphDefsReferencelist => "app.bsky.graph.defs#referencelist", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for ListPurpose<'a> { fn from(s: &'a str) -> Self { match s { "app.bsky.graph.defs#modlist" => Self::AppBskyGraphDefsModlist, "app.bsky.graph.defs#curatelist" => Self::AppBskyGraphDefsCuratelist, "app.bsky.graph.defs#referencelist" => Self::AppBskyGraphDefsReferencelist, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for ListPurpose<'a> { fn from(s: String) -> Self { match s.as_str() { "app.bsky.graph.defs#modlist" => Self::AppBskyGraphDefsModlist, "app.bsky.graph.defs#curatelist" => Self::AppBskyGraphDefsCuratelist, "app.bsky.graph.defs#referencelist" => Self::AppBskyGraphDefsReferencelist, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> AsRef for ListPurpose<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> core::fmt::Display for ListPurpose<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> serde::Serialize for ListPurpose<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for ListPurpose<'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 jacquard_common::IntoStatic for ListPurpose<'_> { type Output = ListPurpose<'static>; fn into_static(self) -> Self::Output { match self { ListPurpose::AppBskyGraphDefsModlist => ListPurpose::AppBskyGraphDefsModlist, ListPurpose::AppBskyGraphDefsCuratelist => { ListPurpose::AppBskyGraphDefsCuratelist } ListPurpose::AppBskyGraphDefsReferencelist => { ListPurpose::AppBskyGraphDefsReferencelist } ListPurpose::Other(v) => ListPurpose::Other(v.into_static()), } } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ListView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, #[serde(borrow)] pub creator: crate::app_bsky::actor::ProfileView<'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 description_facets: std::option::Option< Vec>, >, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub list_item_count: std::option::Option, #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, #[serde(borrow)] pub purpose: crate::app_bsky::graph::ListPurpose<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } pub mod list_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 Creator; type Uri; type Cid; type Purpose; type IndexedAt; type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Creator = Unset; type Uri = Unset; type Cid = Unset; type Purpose = Unset; type IndexedAt = Unset; type Name = Unset; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { type Creator = Set; type Uri = S::Uri; type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; type Name = S::Name; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Creator = S::Creator; type Uri = Set; type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; type Name = S::Name; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Creator = S::Creator; type Uri = S::Uri; type Cid = Set; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; type Name = S::Name; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { type Creator = S::Creator; type Uri = S::Uri; type Cid = S::Cid; type Purpose = Set; type IndexedAt = S::IndexedAt; type Name = S::Name; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Creator = S::Creator; type Uri = S::Uri; type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = Set; type Name = S::Name; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { type Creator = S::Creator; type Uri = S::Uri; type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `creator` field pub struct creator(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `purpose` field pub struct purpose(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `name` field pub struct name(()); } } /// Builder for constructing an instance of this type pub struct ListViewBuilder<'a, S: list_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, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ListView<'a> { /// Create a new builder for this type pub fn new() -> ListViewBuilder<'a, list_view_state::Empty> { ListViewBuilder::new() } } impl<'a> ListViewBuilder<'a, list_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ListViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { /// Set the `avatar` field (optional) pub fn avatar( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, S::Cid: list_view_state::IsUnset, { /// Set the `cid` field (required) pub fn cid( mut self, value: impl Into>, ) -> ListViewBuilder<'a, list_view_state::SetCid> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); ListViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, S::Creator: list_view_state::IsUnset, { /// Set the `creator` field (required) pub fn creator( mut self, value: impl Into>, ) -> ListViewBuilder<'a, list_view_state::SetCreator> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ListViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { /// Set the `description` field (optional) pub fn description( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `description` field to an Option value (optional) pub fn maybe_description( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { /// Set the `descriptionFacets` field (optional) pub fn description_facets( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `descriptionFacets` field to an Option value (optional) pub fn maybe_description_facets( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, S::IndexedAt: list_view_state::IsUnset, { /// Set the `indexedAt` field (required) pub fn indexed_at( mut self, value: impl Into, ) -> ListViewBuilder<'a, list_view_state::SetIndexedAt> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); ListViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { /// Set the `labels` field (optional) pub fn labels( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { /// Set the `listItemCount` field (optional) pub fn list_item_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.7 = value.into(); self } /// Set the `listItemCount` field to an Option value (optional) pub fn maybe_list_item_count(mut self, value: Option) -> Self { self.__unsafe_private_named.7 = value; self } } impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, S::Name: list_view_state::IsUnset, { /// Set the `name` field (required) pub fn name( mut self, value: impl Into>, ) -> ListViewBuilder<'a, list_view_state::SetName> { self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into()); ListViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, S::Purpose: list_view_state::IsUnset, { /// Set the `purpose` field (required) pub fn purpose( mut self, value: impl Into>, ) -> ListViewBuilder<'a, list_view_state::SetPurpose> { self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into()); ListViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, S::Uri: list_view_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> ListViewBuilder<'a, list_view_state::SetUri> { self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into()); ListViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.11 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.11 = value; self } } impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, S::Creator: list_view_state::IsSet, S::Uri: list_view_state::IsSet, S::Cid: list_view_state::IsSet, S::Purpose: list_view_state::IsSet, S::IndexedAt: list_view_state::IsSet, S::Name: list_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListView<'a> { ListView { avatar: self.__unsafe_private_named.0, cid: self.__unsafe_private_named.1.unwrap(), creator: self.__unsafe_private_named.2.unwrap(), description: self.__unsafe_private_named.3, description_facets: self.__unsafe_private_named.4, indexed_at: self.__unsafe_private_named.5.unwrap(), labels: self.__unsafe_private_named.6, list_item_count: self.__unsafe_private_named.7, name: self.__unsafe_private_named.8.unwrap(), purpose: self.__unsafe_private_named.9.unwrap(), uri: self.__unsafe_private_named.10.unwrap(), viewer: self.__unsafe_private_named.11, 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>, >, ) -> ListView<'a> { ListView { avatar: self.__unsafe_private_named.0, cid: self.__unsafe_private_named.1.unwrap(), creator: self.__unsafe_private_named.2.unwrap(), description: self.__unsafe_private_named.3, description_facets: self.__unsafe_private_named.4, indexed_at: self.__unsafe_private_named.5.unwrap(), labels: self.__unsafe_private_named.6, list_item_count: self.__unsafe_private_named.7, name: self.__unsafe_private_named.8.unwrap(), purpose: self.__unsafe_private_named.9.unwrap(), uri: self.__unsafe_private_named.10.unwrap(), viewer: self.__unsafe_private_named.11, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListView<'a> { fn nsid() -> &'static str { "app.bsky.graph.defs" } fn def_name() -> &'static str { "listView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_graph_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.description { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 3000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "description", ), max: 3000usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.description { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 300usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "description", ), max: 300usize, actual: count, }); } } } if let Some(ref value) = self.list_item_count { if *value < 0i64 { return Err(::jacquard_lexicon::validation::ConstraintError::Minimum { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "list_item_count", ), min: 0i64, actual: *value, }); } } { let value = &self.name; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 64usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "name", ), max: 64usize, actual: ::len(value.as_ref()), }); } } { let value = &self.name; #[allow(unused_comparisons)] if ::len(value.as_ref()) < 1usize { return Err(::jacquard_lexicon::validation::ConstraintError::MinLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "name", ), min: 1usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ListViewBasic<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub indexed_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub list_item_count: std::option::Option, #[serde(borrow)] pub name: jacquard_common::CowStr<'a>, #[serde(borrow)] pub purpose: crate::app_bsky::graph::ListPurpose<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } pub mod list_view_basic_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 Cid; type Uri; type Purpose; type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Cid = Unset; type Uri = Unset; type Purpose = Unset; type Name = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Cid = Set; type Uri = S::Uri; type Purpose = S::Purpose; type Name = S::Name; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Cid = S::Cid; type Uri = Set; type Purpose = S::Purpose; type Name = S::Name; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { type Cid = S::Cid; type Uri = S::Uri; type Purpose = Set; type Name = S::Name; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { type Cid = S::Cid; type Uri = S::Uri; type Purpose = S::Purpose; type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `purpose` field pub struct purpose(()); ///Marker type for the `name` field pub struct name(()); } } /// Builder for constructing an instance of this type pub struct ListViewBasicBuilder<'a, S: list_view_basic_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>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ListViewBasic<'a> { /// Create a new builder for this type pub fn new() -> ListViewBasicBuilder<'a, list_view_basic_state::Empty> { ListViewBasicBuilder::new() } } impl<'a> ListViewBasicBuilder<'a, list_view_basic_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ListViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> { /// Set the `avatar` field (optional) pub fn avatar( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> ListViewBasicBuilder<'a, S> where S: list_view_basic_state::State, S::Cid: list_view_basic_state::IsUnset, { /// Set the `cid` field (required) pub fn cid( mut self, value: impl Into>, ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetCid> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); ListViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> { /// Set the `indexedAt` field (optional) pub fn indexed_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `indexedAt` field to an Option value (optional) pub fn maybe_indexed_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> { /// Set the `labels` field (optional) pub fn labels( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> { /// Set the `listItemCount` field (optional) pub fn list_item_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `listItemCount` field to an Option value (optional) pub fn maybe_list_item_count(mut self, value: Option) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S> ListViewBasicBuilder<'a, S> where S: list_view_basic_state::State, S::Name: list_view_basic_state::IsUnset, { /// Set the `name` field (required) pub fn name( mut self, value: impl Into>, ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetName> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); ListViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ListViewBasicBuilder<'a, S> where S: list_view_basic_state::State, S::Purpose: list_view_basic_state::IsUnset, { /// Set the `purpose` field (required) pub fn purpose( mut self, value: impl Into>, ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetPurpose> { self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into()); ListViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ListViewBasicBuilder<'a, S> where S: list_view_basic_state::State, S::Uri: list_view_basic_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetUri> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); ListViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.8 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.8 = value; self } } impl<'a, S> ListViewBasicBuilder<'a, S> where S: list_view_basic_state::State, S::Cid: list_view_basic_state::IsSet, S::Uri: list_view_basic_state::IsSet, S::Purpose: list_view_basic_state::IsSet, S::Name: list_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ListViewBasic<'a> { ListViewBasic { avatar: self.__unsafe_private_named.0, cid: self.__unsafe_private_named.1.unwrap(), indexed_at: self.__unsafe_private_named.2, labels: self.__unsafe_private_named.3, list_item_count: self.__unsafe_private_named.4, name: self.__unsafe_private_named.5.unwrap(), purpose: self.__unsafe_private_named.6.unwrap(), uri: self.__unsafe_private_named.7.unwrap(), viewer: self.__unsafe_private_named.8, 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>, >, ) -> ListViewBasic<'a> { ListViewBasic { avatar: self.__unsafe_private_named.0, cid: self.__unsafe_private_named.1.unwrap(), indexed_at: self.__unsafe_private_named.2, labels: self.__unsafe_private_named.3, list_item_count: self.__unsafe_private_named.4, name: self.__unsafe_private_named.5.unwrap(), purpose: self.__unsafe_private_named.6.unwrap(), uri: self.__unsafe_private_named.7.unwrap(), viewer: self.__unsafe_private_named.8, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListViewBasic<'a> { fn nsid() -> &'static str { "app.bsky.graph.defs" } fn def_name() -> &'static str { "listViewBasic" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_graph_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.list_item_count { if *value < 0i64 { return Err(::jacquard_lexicon::validation::ConstraintError::Minimum { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "list_item_count", ), min: 0i64, actual: *value, }); } } { let value = &self.name; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 64usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "name", ), max: 64usize, actual: ::len(value.as_ref()), }); } } { let value = &self.name; #[allow(unused_comparisons)] if ::len(value.as_ref()) < 1usize { return Err(::jacquard_lexicon::validation::ConstraintError::MinLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "name", ), min: 1usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ListViewerState<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub blocked: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub muted: std::option::Option, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListViewerState<'a> { fn nsid() -> &'static str { "app.bsky.graph.defs" } fn def_name() -> &'static str { "listViewerState" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_graph_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// A list of actors to apply an aggregate moderation action (mute/block) on. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct Modlist; impl std::fmt::Display for Modlist { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "modlist") } } /// indicates that a handle or DID could not be resolved #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct NotFoundActor<'a> { #[serde(borrow)] pub actor: jacquard_common::types::ident::AtIdentifier<'a>, pub not_found: bool, } pub mod not_found_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 Actor; type NotFound; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Actor = Unset; type NotFound = Unset; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData S>); impl sealed::Sealed for SetActor {} impl State for SetActor { type Actor = Set; type NotFound = S::NotFound; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData S>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { type Actor = S::Actor; type NotFound = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `actor` field pub struct actor(()); ///Marker type for the `not_found` field pub struct not_found(()); } } /// Builder for constructing an instance of this type pub struct NotFoundActorBuilder<'a, S: not_found_actor_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> NotFoundActor<'a> { /// Create a new builder for this type pub fn new() -> NotFoundActorBuilder<'a, not_found_actor_state::Empty> { NotFoundActorBuilder::new() } } impl<'a> NotFoundActorBuilder<'a, not_found_actor_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { NotFoundActorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> NotFoundActorBuilder<'a, S> where S: not_found_actor_state::State, S::Actor: not_found_actor_state::IsUnset, { /// Set the `actor` field (required) pub fn actor( mut self, value: impl Into>, ) -> NotFoundActorBuilder<'a, not_found_actor_state::SetActor> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); NotFoundActorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> NotFoundActorBuilder<'a, S> where S: not_found_actor_state::State, S::NotFound: not_found_actor_state::IsUnset, { /// Set the `notFound` field (required) pub fn not_found( mut self, value: impl Into, ) -> NotFoundActorBuilder<'a, not_found_actor_state::SetNotFound> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); NotFoundActorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> NotFoundActorBuilder<'a, S> where S: not_found_actor_state::State, S::Actor: not_found_actor_state::IsSet, S::NotFound: not_found_actor_state::IsSet, { /// Build the final struct pub fn build(self) -> NotFoundActor<'a> { NotFoundActor { actor: self.__unsafe_private_named.0.unwrap(), not_found: self.__unsafe_private_named.1.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>, >, ) -> NotFoundActor<'a> { NotFoundActor { actor: self.__unsafe_private_named.0.unwrap(), not_found: self.__unsafe_private_named.1.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for NotFoundActor<'a> { fn nsid() -> &'static str { "app.bsky.graph.defs" } fn def_name() -> &'static str { "notFoundActor" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_graph_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// A list of actors used for only for reference purposes such as within a starter pack. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct Referencelist; impl std::fmt::Display for Referencelist { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "referencelist") } } /// lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Relationship<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, /// if the actor is followed by this DID, contains the AT-URI of the follow record #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub followed_by: std::option::Option>, /// if the actor follows this DID, this is the AT-URI of the follow record #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub following: std::option::Option>, } pub mod relationship_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 RelationshipBuilder<'a, S: relationship_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> Relationship<'a> { /// Create a new builder for this type pub fn new() -> RelationshipBuilder<'a, relationship_state::Empty> { RelationshipBuilder::new() } } impl<'a> RelationshipBuilder<'a, relationship_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { RelationshipBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> RelationshipBuilder<'a, S> where S: relationship_state::State, S::Did: relationship_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> RelationshipBuilder<'a, relationship_state::SetDid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); RelationshipBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> { /// Set the `followedBy` field (optional) pub fn followed_by( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `followedBy` field to an Option value (optional) pub fn maybe_followed_by( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> { /// Set the `following` field (optional) pub fn following( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `following` field to an Option value (optional) pub fn maybe_following( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> RelationshipBuilder<'a, S> where S: relationship_state::State, S::Did: relationship_state::IsSet, { /// Build the final struct pub fn build(self) -> Relationship<'a> { Relationship { did: self.__unsafe_private_named.0.unwrap(), followed_by: self.__unsafe_private_named.1, following: self.__unsafe_private_named.2, 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>, >, ) -> Relationship<'a> { Relationship { did: self.__unsafe_private_named.0.unwrap(), followed_by: self.__unsafe_private_named.1, following: self.__unsafe_private_named.2, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Relationship<'a> { fn nsid() -> &'static str { "app.bsky.graph.defs" } fn def_name() -> &'static str { "relationship" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_graph_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 StarterPackView<'a> { #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, #[serde(borrow)] pub creator: crate::app_bsky::actor::ProfileViewBasic<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub feeds: std::option::Option>>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub joined_all_time_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub joined_week_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub list: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub list_items_sample: std::option::Option< Vec>, >, #[serde(borrow)] pub record: jacquard_common::types::value::Data<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod starter_pack_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 Cid; type Record; type Uri; type Creator; type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Cid = Unset; type Record = Unset; type Uri = Unset; type Creator = Unset; type IndexedAt = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Cid = Set; type Record = S::Record; type Uri = S::Uri; type Creator = S::Creator; type IndexedAt = S::IndexedAt; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { type Cid = S::Cid; type Record = Set; type Uri = S::Uri; type Creator = S::Creator; type IndexedAt = S::IndexedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Cid = S::Cid; type Record = S::Record; type Uri = Set; type Creator = S::Creator; type IndexedAt = S::IndexedAt; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { type Cid = S::Cid; type Record = S::Record; type Uri = S::Uri; type Creator = Set; type IndexedAt = S::IndexedAt; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Cid = S::Cid; type Record = S::Record; type Uri = S::Uri; type Creator = S::Creator; type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `record` field pub struct record(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `creator` field pub struct creator(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); } } /// Builder for constructing an instance of this type pub struct StarterPackViewBuilder<'a, S: starter_pack_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>, ::core::option::Option>>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> StarterPackView<'a> { /// Create a new builder for this type pub fn new() -> StarterPackViewBuilder<'a, starter_pack_view_state::Empty> { StarterPackViewBuilder::new() } } impl<'a> StarterPackViewBuilder<'a, starter_pack_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { StarterPackViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, S::Cid: starter_pack_view_state::IsUnset, { /// Set the `cid` field (required) pub fn cid( mut self, value: impl Into>, ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetCid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); StarterPackViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, S::Creator: starter_pack_view_state::IsUnset, { /// Set the `creator` field (required) pub fn creator( mut self, value: impl Into>, ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetCreator> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); StarterPackViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> { /// Set the `feeds` field (optional) pub fn feeds( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `feeds` field to an Option value (optional) pub fn maybe_feeds( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, S::IndexedAt: starter_pack_view_state::IsUnset, { /// Set the `indexedAt` field (required) pub fn indexed_at( mut self, value: impl Into, ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetIndexedAt> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); StarterPackViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> { /// Set the `joinedAllTimeCount` field (optional) pub fn joined_all_time_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `joinedAllTimeCount` field to an Option value (optional) pub fn maybe_joined_all_time_count(mut self, value: Option) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> { /// Set the `joinedWeekCount` field (optional) pub fn joined_week_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `joinedWeekCount` field to an Option value (optional) pub fn maybe_joined_week_count(mut self, value: Option) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> { /// Set the `labels` field (optional) pub fn labels( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> { /// Set the `list` field (optional) pub fn list( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.7 = value.into(); self } /// Set the `list` field to an Option value (optional) pub fn maybe_list( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.7 = value; self } } impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> { /// Set the `listItemsSample` field (optional) pub fn list_items_sample( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.8 = value.into(); self } /// Set the `listItemsSample` field to an Option value (optional) pub fn maybe_list_items_sample( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.8 = value; self } } impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, S::Record: starter_pack_view_state::IsUnset, { /// Set the `record` field (required) pub fn record( mut self, value: impl Into>, ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetRecord> { self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into()); StarterPackViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, S::Uri: starter_pack_view_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetUri> { self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into()); StarterPackViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, S::Cid: starter_pack_view_state::IsSet, S::Record: starter_pack_view_state::IsSet, S::Uri: starter_pack_view_state::IsSet, S::Creator: starter_pack_view_state::IsSet, S::IndexedAt: starter_pack_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StarterPackView<'a> { StarterPackView { cid: self.__unsafe_private_named.0.unwrap(), creator: self.__unsafe_private_named.1.unwrap(), feeds: self.__unsafe_private_named.2, indexed_at: self.__unsafe_private_named.3.unwrap(), joined_all_time_count: self.__unsafe_private_named.4, joined_week_count: self.__unsafe_private_named.5, labels: self.__unsafe_private_named.6, list: self.__unsafe_private_named.7, list_items_sample: self.__unsafe_private_named.8, record: self.__unsafe_private_named.9.unwrap(), uri: self.__unsafe_private_named.10.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>, >, ) -> StarterPackView<'a> { StarterPackView { cid: self.__unsafe_private_named.0.unwrap(), creator: self.__unsafe_private_named.1.unwrap(), feeds: self.__unsafe_private_named.2, indexed_at: self.__unsafe_private_named.3.unwrap(), joined_all_time_count: self.__unsafe_private_named.4, joined_week_count: self.__unsafe_private_named.5, labels: self.__unsafe_private_named.6, list: self.__unsafe_private_named.7, list_items_sample: self.__unsafe_private_named.8, record: self.__unsafe_private_named.9.unwrap(), uri: self.__unsafe_private_named.10.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StarterPackView<'a> { fn nsid() -> &'static str { "app.bsky.graph.defs" } fn def_name() -> &'static str { "starterPackView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_graph_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.feeds { #[allow(unused_comparisons)] if value.len() > 3usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "feeds", ), max: 3usize, actual: value.len(), }); } } if let Some(ref value) = self.joined_all_time_count { if *value < 0i64 { return Err(::jacquard_lexicon::validation::ConstraintError::Minimum { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "joined_all_time_count", ), min: 0i64, actual: *value, }); } } if let Some(ref value) = self.joined_week_count { if *value < 0i64 { return Err(::jacquard_lexicon::validation::ConstraintError::Minimum { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "joined_week_count", ), min: 0i64, actual: *value, }); } } if let Some(ref value) = self.list_items_sample { #[allow(unused_comparisons)] if value.len() > 12usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "list_items_sample", ), max: 12usize, actual: value.len(), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct StarterPackViewBasic<'a> { #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, #[serde(borrow)] pub creator: crate::app_bsky::actor::ProfileViewBasic<'a>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub joined_all_time_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub joined_week_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub list_item_count: std::option::Option, #[serde(borrow)] pub record: jacquard_common::types::value::Data<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod starter_pack_view_basic_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 Cid; type IndexedAt; type Uri; type Record; type Creator; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Cid = Unset; type IndexedAt = Unset; type Uri = Unset; type Record = Unset; type Creator = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Cid = Set; type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Record = S::Record; type Creator = S::Creator; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Cid = S::Cid; type IndexedAt = Set; type Uri = S::Uri; type Record = S::Record; type Creator = S::Creator; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Cid = S::Cid; type IndexedAt = S::IndexedAt; type Uri = Set; type Record = S::Record; type Creator = S::Creator; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { type Cid = S::Cid; type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Record = Set; type Creator = S::Creator; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { type Cid = S::Cid; type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Record = S::Record; type Creator = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `record` field pub struct record(()); ///Marker type for the `creator` field pub struct creator(()); } } /// Builder for constructing an instance of this type pub struct StarterPackViewBasicBuilder<'a, S: starter_pack_view_basic_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>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> StarterPackViewBasic<'a> { /// Create a new builder for this type pub fn new() -> StarterPackViewBasicBuilder< 'a, starter_pack_view_basic_state::Empty, > { StarterPackViewBasicBuilder::new() } } impl<'a> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { StarterPackViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, S::Cid: starter_pack_view_basic_state::IsUnset, { /// Set the `cid` field (required) pub fn cid( mut self, value: impl Into>, ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetCid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); StarterPackViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, S::Creator: starter_pack_view_basic_state::IsUnset, { /// Set the `creator` field (required) pub fn creator( mut self, value: impl Into>, ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetCreator> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); StarterPackViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, S::IndexedAt: starter_pack_view_basic_state::IsUnset, { /// Set the `indexedAt` field (required) pub fn indexed_at( mut self, value: impl Into, ) -> StarterPackViewBasicBuilder< 'a, starter_pack_view_basic_state::SetIndexedAt, > { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); StarterPackViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> { /// Set the `joinedAllTimeCount` field (optional) pub fn joined_all_time_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `joinedAllTimeCount` field to an Option value (optional) pub fn maybe_joined_all_time_count(mut self, value: Option) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> { /// Set the `joinedWeekCount` field (optional) pub fn joined_week_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `joinedWeekCount` field to an Option value (optional) pub fn maybe_joined_week_count(mut self, value: Option) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> { /// Set the `labels` field (optional) pub fn labels( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> { /// Set the `listItemCount` field (optional) pub fn list_item_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `listItemCount` field to an Option value (optional) pub fn maybe_list_item_count(mut self, value: Option) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, S::Record: starter_pack_view_basic_state::IsUnset, { /// Set the `record` field (required) pub fn record( mut self, value: impl Into>, ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetRecord> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); StarterPackViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, S::Uri: starter_pack_view_basic_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetUri> { self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into()); StarterPackViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, S::Cid: starter_pack_view_basic_state::IsSet, S::IndexedAt: starter_pack_view_basic_state::IsSet, S::Uri: starter_pack_view_basic_state::IsSet, S::Record: starter_pack_view_basic_state::IsSet, S::Creator: starter_pack_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> StarterPackViewBasic<'a> { StarterPackViewBasic { cid: self.__unsafe_private_named.0.unwrap(), creator: self.__unsafe_private_named.1.unwrap(), indexed_at: self.__unsafe_private_named.2.unwrap(), joined_all_time_count: self.__unsafe_private_named.3, joined_week_count: self.__unsafe_private_named.4, labels: self.__unsafe_private_named.5, list_item_count: self.__unsafe_private_named.6, record: self.__unsafe_private_named.7.unwrap(), uri: self.__unsafe_private_named.8.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>, >, ) -> StarterPackViewBasic<'a> { StarterPackViewBasic { cid: self.__unsafe_private_named.0.unwrap(), creator: self.__unsafe_private_named.1.unwrap(), indexed_at: self.__unsafe_private_named.2.unwrap(), joined_all_time_count: self.__unsafe_private_named.3, joined_week_count: self.__unsafe_private_named.4, labels: self.__unsafe_private_named.5, list_item_count: self.__unsafe_private_named.6, record: self.__unsafe_private_named.7.unwrap(), uri: self.__unsafe_private_named.8.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StarterPackViewBasic<'a> { fn nsid() -> &'static str { "app.bsky.graph.defs" } fn def_name() -> &'static str { "starterPackViewBasic" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_graph_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.joined_all_time_count { if *value < 0i64 { return Err(::jacquard_lexicon::validation::ConstraintError::Minimum { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "joined_all_time_count", ), min: 0i64, actual: *value, }); } } if let Some(ref value) = self.joined_week_count { if *value < 0i64 { return Err(::jacquard_lexicon::validation::ConstraintError::Minimum { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "joined_week_count", ), min: 0i64, actual: *value, }); } } if let Some(ref value) = self.list_item_count { if *value < 0i64 { return Err(::jacquard_lexicon::validation::ConstraintError::Minimum { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "list_item_count", ), min: 0i64, actual: *value, }); } } Ok(()) } }