// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: com.atproto.admin.defs // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. pub mod delete_account; pub mod disable_account_invites; pub mod disable_invite_codes; pub mod enable_account_invites; pub mod get_account_info; pub mod get_account_infos; pub mod get_invite_codes; pub mod get_subject_status; pub mod search_accounts; pub mod send_email; pub mod update_account_email; pub mod update_account_handle; pub mod update_account_password; pub mod update_account_signing_key; pub mod update_subject_status; #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct AccountView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub deactivated_at: std::option::Option, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub email: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub email_confirmed_at: std::option::Option< jacquard_common::types::string::Datetime, >, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invite_note: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invited_by: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub invites: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub invites_disabled: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub related_records: std::option::Option< Vec>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub threat_signatures: std::option::Option< Vec>, >, } pub mod account_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 IndexedAt; type Did; type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type IndexedAt = Unset; type Did = Unset; type Handle = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type IndexedAt = Set; type Did = S::Did; type Handle = S::Handle; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type IndexedAt = S::IndexedAt; type Did = Set; type Handle = S::Handle; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type IndexedAt = S::IndexedAt; type Did = S::Did; type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); } } /// Builder for constructing an instance of this type pub struct AccountViewBuilder<'a, S: account_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> AccountView<'a> { /// Create a new builder for this type pub fn new() -> AccountViewBuilder<'a, account_view_state::Empty> { AccountViewBuilder::new() } } impl<'a> AccountViewBuilder<'a, account_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { AccountViewBuilder { _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: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `deactivatedAt` field (optional) pub fn deactivated_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `deactivatedAt` field to an Option value (optional) pub fn maybe_deactivated_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> AccountViewBuilder<'a, S> where S: account_view_state::State, S::Did: account_view_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> AccountViewBuilder<'a, account_view_state::SetDid> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); AccountViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `email` field (optional) pub fn email( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.2 = 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.2 = value; self } } impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `emailConfirmedAt` field (optional) pub fn email_confirmed_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `emailConfirmedAt` field to an Option value (optional) pub fn maybe_email_confirmed_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S> AccountViewBuilder<'a, S> where S: account_view_state::State, S::Handle: account_view_state::IsUnset, { /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into>, ) -> AccountViewBuilder<'a, account_view_state::SetHandle> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); AccountViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> AccountViewBuilder<'a, S> where S: account_view_state::State, S::IndexedAt: account_view_state::IsUnset, { /// Set the `indexedAt` field (required) pub fn indexed_at( mut self, value: impl Into, ) -> AccountViewBuilder<'a, account_view_state::SetIndexedAt> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); AccountViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `inviteNote` field (optional) pub fn invite_note( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `inviteNote` field to an Option value (optional) pub fn maybe_invite_note( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `invitedBy` field (optional) pub fn invited_by( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.7 = value.into(); self } /// Set the `invitedBy` field to an Option value (optional) pub fn maybe_invited_by( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.7 = value; self } } impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `invites` field (optional) pub fn invites( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.8 = value.into(); self } /// Set the `invites` field to an Option value (optional) pub fn maybe_invites( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.8 = value; self } } impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `invitesDisabled` field (optional) pub fn invites_disabled(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.9 = value.into(); self } /// Set the `invitesDisabled` field to an Option value (optional) pub fn maybe_invites_disabled(mut self, value: Option) -> Self { self.__unsafe_private_named.9 = value; self } } impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `relatedRecords` field (optional) pub fn related_records( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.10 = value.into(); self } /// Set the `relatedRecords` field to an Option value (optional) pub fn maybe_related_records( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.10 = value; self } } impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { /// Set the `threatSignatures` field (optional) pub fn threat_signatures( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.11 = value.into(); self } /// Set the `threatSignatures` field to an Option value (optional) pub fn maybe_threat_signatures( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.11 = value; self } } impl<'a, S> AccountViewBuilder<'a, S> where S: account_view_state::State, S::IndexedAt: account_view_state::IsSet, S::Did: account_view_state::IsSet, S::Handle: account_view_state::IsSet, { /// Build the final struct pub fn build(self) -> AccountView<'a> { AccountView { deactivated_at: self.__unsafe_private_named.0, did: self.__unsafe_private_named.1.unwrap(), email: self.__unsafe_private_named.2, email_confirmed_at: self.__unsafe_private_named.3, handle: self.__unsafe_private_named.4.unwrap(), indexed_at: self.__unsafe_private_named.5.unwrap(), invite_note: self.__unsafe_private_named.6, invited_by: self.__unsafe_private_named.7, invites: self.__unsafe_private_named.8, invites_disabled: self.__unsafe_private_named.9, related_records: self.__unsafe_private_named.10, threat_signatures: 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>, >, ) -> AccountView<'a> { AccountView { deactivated_at: self.__unsafe_private_named.0, did: self.__unsafe_private_named.1.unwrap(), email: self.__unsafe_private_named.2, email_confirmed_at: self.__unsafe_private_named.3, handle: self.__unsafe_private_named.4.unwrap(), indexed_at: self.__unsafe_private_named.5.unwrap(), invite_note: self.__unsafe_private_named.6, invited_by: self.__unsafe_private_named.7, invites: self.__unsafe_private_named.8, invites_disabled: self.__unsafe_private_named.9, related_records: self.__unsafe_private_named.10, threat_signatures: self.__unsafe_private_named.11, extra_data: Some(extra_data), } } } fn lexicon_doc_com_atproto_admin_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 'static, > { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("com.atproto.admin.defs"), revision: None, description: None, defs: { let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("accountView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_common::smol_str::SmolStr::new_static("handle"), ::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( "deactivatedAt", ), ::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("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("email"), ::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( "emailConfirmedAt", ), ::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("handle"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Handle, ), 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( "inviteNote", ), ::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( "invitedBy", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "com.atproto.server.defs#inviteCode", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("invites"), ::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.server.defs#inviteCode", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "invitesDisabled", ), ::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( "relatedRecords", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "threatSignatures", ), ::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( "#threatSignature", ), }), min_length: None, max_length: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("repoBlobRef"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_common::smol_str::SmolStr::new_static("cid") ], ), 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("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( "recordUri", ), ::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("repoRef"), ::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("statusAttr"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("applied")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("applied"), ::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("ref"), ::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("threatSignature"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("property"), ::jacquard_common::smol_str::SmolStr::new_static("value") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("property"), ::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("value"), ::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 AccountView<'a> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "accountView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_com_atproto_admin_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 RepoBlobRef<'a> { #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub record_uri: std::option::Option>, } pub mod repo_blob_ref_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; type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; type Cid = 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; type Cid = S::Cid; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Did = S::Did; type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); ///Marker type for the `cid` field pub struct cid(()); } } /// Builder for constructing an instance of this type pub struct RepoBlobRefBuilder<'a, S: repo_blob_ref_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> RepoBlobRef<'a> { /// Create a new builder for this type pub fn new() -> RepoBlobRefBuilder<'a, repo_blob_ref_state::Empty> { RepoBlobRefBuilder::new() } } impl<'a> RepoBlobRefBuilder<'a, repo_blob_ref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { RepoBlobRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> RepoBlobRefBuilder<'a, S> where S: repo_blob_ref_state::State, S::Cid: repo_blob_ref_state::IsUnset, { /// Set the `cid` field (required) pub fn cid( mut self, value: impl Into>, ) -> RepoBlobRefBuilder<'a, repo_blob_ref_state::SetCid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); RepoBlobRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> RepoBlobRefBuilder<'a, S> where S: repo_blob_ref_state::State, S::Did: repo_blob_ref_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> RepoBlobRefBuilder<'a, repo_blob_ref_state::SetDid> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); RepoBlobRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: repo_blob_ref_state::State> RepoBlobRefBuilder<'a, S> { /// Set the `recordUri` field (optional) pub fn record_uri( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `recordUri` field to an Option value (optional) pub fn maybe_record_uri( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> RepoBlobRefBuilder<'a, S> where S: repo_blob_ref_state::State, S::Did: repo_blob_ref_state::IsSet, S::Cid: repo_blob_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoBlobRef<'a> { RepoBlobRef { cid: self.__unsafe_private_named.0.unwrap(), did: self.__unsafe_private_named.1.unwrap(), record_uri: 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>, >, ) -> RepoBlobRef<'a> { RepoBlobRef { cid: self.__unsafe_private_named.0.unwrap(), did: self.__unsafe_private_named.1.unwrap(), record_uri: self.__unsafe_private_named.2, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for RepoBlobRef<'a> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "repoBlobRef" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_com_atproto_admin_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 RepoRef<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } pub mod repo_ref_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 RepoRefBuilder<'a, S: repo_ref_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> RepoRef<'a> { /// Create a new builder for this type pub fn new() -> RepoRefBuilder<'a, repo_ref_state::Empty> { RepoRefBuilder::new() } } impl<'a> RepoRefBuilder<'a, repo_ref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { RepoRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> RepoRefBuilder<'a, S> where S: repo_ref_state::State, S::Did: repo_ref_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> RepoRefBuilder<'a, repo_ref_state::SetDid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); RepoRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> RepoRefBuilder<'a, S> where S: repo_ref_state::State, S::Did: repo_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoRef<'a> { RepoRef { 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>, >, ) -> RepoRef<'a> { RepoRef { did: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for RepoRef<'a> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "repoRef" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_com_atproto_admin_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 StatusAttr<'a> { pub applied: bool, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub r#ref: std::option::Option>, } pub mod status_attr_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 Applied; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Applied = Unset; } ///State transition - sets the `applied` field to Set pub struct SetApplied(PhantomData S>); impl sealed::Sealed for SetApplied {} impl State for SetApplied { type Applied = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `applied` field pub struct applied(()); } } /// Builder for constructing an instance of this type pub struct StatusAttrBuilder<'a, S: status_attr_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> StatusAttr<'a> { /// Create a new builder for this type pub fn new() -> StatusAttrBuilder<'a, status_attr_state::Empty> { StatusAttrBuilder::new() } } impl<'a> StatusAttrBuilder<'a, status_attr_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { StatusAttrBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StatusAttrBuilder<'a, S> where S: status_attr_state::State, S::Applied: status_attr_state::IsUnset, { /// Set the `applied` field (required) pub fn applied( mut self, value: impl Into, ) -> StatusAttrBuilder<'a, status_attr_state::SetApplied> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); StatusAttrBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: status_attr_state::State> StatusAttrBuilder<'a, S> { /// Set the `ref` field (optional) pub fn r#ref( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `ref` field to an Option value (optional) pub fn maybe_ref(mut self, value: Option>) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> StatusAttrBuilder<'a, S> where S: status_attr_state::State, S::Applied: status_attr_state::IsSet, { /// Build the final struct pub fn build(self) -> StatusAttr<'a> { StatusAttr { applied: self.__unsafe_private_named.0.unwrap(), r#ref: self.__unsafe_private_named.1, 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>, >, ) -> StatusAttr<'a> { StatusAttr { applied: self.__unsafe_private_named.0.unwrap(), r#ref: self.__unsafe_private_named.1, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StatusAttr<'a> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "statusAttr" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_com_atproto_admin_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 ThreatSignature<'a> { #[serde(borrow)] pub property: jacquard_common::CowStr<'a>, #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreatSignature<'a> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "threatSignature" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_com_atproto_admin_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } }