Something went wrong. Try again.
atproto Thingiverse but good
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196// @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.
//! Generated bindings for the `com.atproto.admin` Lexicon namespace/module.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;
#[allow(unused_imports)]use alloc::collections::BTreeMap;
#[allow(unused_imports)]use core::marker::PhantomData;use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr};
#[allow(unused_imports)]use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;use jacquard_common::deps::smol_str::SmolStr;use jacquard_common::types::string::{Did, Handle, AtUri, Cid, Datetime};use jacquard_common::types::value::Data;use jacquard_derive::IntoStatic;use jacquard_lexicon::lexicon::LexiconDoc;use jacquard_lexicon::schema::LexiconSchema;
#[allow(unused_imports)]use jacquard_lexicon::validation::{ConstraintError, ValidationPath};use serde::{Serialize, Deserialize};use crate::com_atproto::server::InviteCode;use crate::com_atproto::admin;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]pub struct AccountView<S: BosStr = DefaultStr> { #[serde(skip_serializing_if = "Option::is_none")] pub deactivated_at: Option<Datetime>, pub did: Did<S>, #[serde(skip_serializing_if = "Option::is_none")] pub email: Option<S>, #[serde(skip_serializing_if = "Option::is_none")] pub email_confirmed_at: Option<Datetime>, pub handle: Handle<S>, pub indexed_at: Datetime, #[serde(skip_serializing_if = "Option::is_none")] pub invite_note: Option<S>, #[serde(skip_serializing_if = "Option::is_none")] pub invited_by: Option<InviteCode<S>>, #[serde(skip_serializing_if = "Option::is_none")] pub invites: Option<Vec<InviteCode<S>>>, #[serde(skip_serializing_if = "Option::is_none")] pub invites_disabled: Option<bool>, #[serde(skip_serializing_if = "Option::is_none")] pub related_records: Option<Vec<Data<S>>>, #[serde(skip_serializing_if = "Option::is_none")] pub threat_signatures: Option<Vec<admin::ThreatSignature<S>>>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]pub struct RepoBlobRef<S: BosStr = DefaultStr> { pub cid: Cid<S>, pub did: Did<S>, #[serde(skip_serializing_if = "Option::is_none")] pub record_uri: Option<AtUri<S>>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]pub struct RepoRef<S: BosStr = DefaultStr> { pub did: Did<S>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]pub struct StatusAttr<S: BosStr = DefaultStr> { pub applied: bool, #[serde(skip_serializing_if = "Option::is_none")] pub r#ref: Option<S>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]pub struct ThreatSignature<S: BosStr = DefaultStr> { pub property: S, pub value: S, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,}
impl<S: BosStr> LexiconSchema for AccountView<S> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "accountView" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_com_atproto_admin_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) }}
impl<S: BosStr> LexiconSchema for RepoBlobRef<S> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "repoBlobRef" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_com_atproto_admin_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) }}
impl<S: BosStr> LexiconSchema for RepoRef<S> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "repoRef" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_com_atproto_admin_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) }}
impl<S: BosStr> LexiconSchema for StatusAttr<S> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "statusAttr" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_com_atproto_admin_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) }}
impl<S: BosStr> LexiconSchema for ThreatSignature<S> { fn nsid() -> &'static str { "com.atproto.admin.defs" } fn def_name() -> &'static str { "threatSignature" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_com_atproto_admin_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) }}
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 Did; type Handle; type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; type Handle = Unset; type IndexedAt = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>); impl<St: State> sealed::Sealed for SetDid<St> {} impl<St: State> State for SetDid<St> { type Did = Set<members::did>; type Handle = St::Handle; type IndexedAt = St::IndexedAt; } ///State transition - sets the `handle` field to Set pub struct SetHandle<St: State = Empty>(PhantomData<fn() -> St>); impl<St: State> sealed::Sealed for SetHandle<St> {} impl<St: State> State for SetHandle<St> { type Did = St::Did; type Handle = Set<members::handle>; type IndexedAt = St::IndexedAt; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt<St: State = Empty>(PhantomData<fn() -> St>); impl<St: State> sealed::Sealed for SetIndexedAt<St> {} impl<St: State> State for SetIndexedAt<St> { type Did = St::Did; type Handle = St::Handle; type IndexedAt = Set<members::indexed_at>; } /// 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 `handle` field pub struct handle(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); }}
/// Builder for constructing an instance of this type.pub struct AccountViewBuilder<St: account_view_state::State, S: BosStr = DefaultStr> { _state: PhantomData<fn() -> St>, _fields: ( Option<Datetime>, Option<Did<S>>, Option<S>, Option<Datetime>, Option<Handle<S>>, Option<Datetime>, Option<S>, Option<InviteCode<S>>, Option<Vec<InviteCode<S>>>, Option<bool>, Option<Vec<Data<S>>>, Option<Vec<admin::ThreatSignature<S>>>, ), _type: PhantomData<fn() -> S>,}
impl AccountView<DefaultStr> { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> AccountViewBuilder<account_view_state::Empty, DefaultStr> { AccountViewBuilder::new() }}
impl<S: BosStr> AccountView<S> { /// Create a new builder for this type pub fn builder() -> AccountViewBuilder<account_view_state::Empty, S> { AccountViewBuilder::builder() }}
impl AccountViewBuilder<account_view_state::Empty, DefaultStr> { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { AccountViewBuilder { _state: PhantomData, _fields: ( None, None, None, None, None, None, None, None, None, None, None, None, ), _type: PhantomData, } }}
impl<S: BosStr> AccountViewBuilder<account_view_state::Empty, S> { /// Create a new builder with all fields unset pub fn builder() -> Self { AccountViewBuilder { _state: PhantomData, _fields: ( None, None, None, None, None, None, None, None, None, None, None, None, ), _type: PhantomData, } }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `deactivatedAt` field (optional) pub fn deactivated_at(mut self, value: impl Into<Option<Datetime>>) -> Self { self._fields.0 = value.into(); self } /// Set the `deactivatedAt` field to an Option value (optional) pub fn maybe_deactivated_at(mut self, value: Option<Datetime>) -> Self { self._fields.0 = value; self }}
impl<St, S: BosStr> AccountViewBuilder<St, S>where St: account_view_state::State, St::Did: account_view_state::IsUnset,{ /// Set the `did` field (required) pub fn did( mut self, value: impl Into<Did<S>>, ) -> AccountViewBuilder<account_view_state::SetDid<St>, S> { self._fields.1 = Option::Some(value.into()); AccountViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `email` field (optional) pub fn email(mut self, value: impl Into<Option<S>>) -> Self { self._fields.2 = value.into(); self } /// Set the `email` field to an Option value (optional) pub fn maybe_email(mut self, value: Option<S>) -> Self { self._fields.2 = value; self }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `emailConfirmedAt` field (optional) pub fn email_confirmed_at(mut self, value: impl Into<Option<Datetime>>) -> Self { self._fields.3 = value.into(); self } /// Set the `emailConfirmedAt` field to an Option value (optional) pub fn maybe_email_confirmed_at(mut self, value: Option<Datetime>) -> Self { self._fields.3 = value; self }}
impl<St, S: BosStr> AccountViewBuilder<St, S>where St: account_view_state::State, St::Handle: account_view_state::IsUnset,{ /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into<Handle<S>>, ) -> AccountViewBuilder<account_view_state::SetHandle<St>, S> { self._fields.4 = Option::Some(value.into()); AccountViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } }}
impl<St, S: BosStr> AccountViewBuilder<St, S>where St: account_view_state::State, St::IndexedAt: account_view_state::IsUnset,{ /// Set the `indexedAt` field (required) pub fn indexed_at( mut self, value: impl Into<Datetime>, ) -> AccountViewBuilder<account_view_state::SetIndexedAt<St>, S> { self._fields.5 = Option::Some(value.into()); AccountViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `inviteNote` field (optional) pub fn invite_note(mut self, value: impl Into<Option<S>>) -> Self { self._fields.6 = value.into(); self } /// Set the `inviteNote` field to an Option value (optional) pub fn maybe_invite_note(mut self, value: Option<S>) -> Self { self._fields.6 = value; self }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `invitedBy` field (optional) pub fn invited_by(mut self, value: impl Into<Option<InviteCode<S>>>) -> Self { self._fields.7 = value.into(); self } /// Set the `invitedBy` field to an Option value (optional) pub fn maybe_invited_by(mut self, value: Option<InviteCode<S>>) -> Self { self._fields.7 = value; self }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `invites` field (optional) pub fn invites(mut self, value: impl Into<Option<Vec<InviteCode<S>>>>) -> Self { self._fields.8 = value.into(); self } /// Set the `invites` field to an Option value (optional) pub fn maybe_invites(mut self, value: Option<Vec<InviteCode<S>>>) -> Self { self._fields.8 = value; self }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `invitesDisabled` field (optional) pub fn invites_disabled(mut self, value: impl Into<Option<bool>>) -> Self { self._fields.9 = value.into(); self } /// Set the `invitesDisabled` field to an Option value (optional) pub fn maybe_invites_disabled(mut self, value: Option<bool>) -> Self { self._fields.9 = value; self }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `relatedRecords` field (optional) pub fn related_records(mut self, value: impl Into<Option<Vec<Data<S>>>>) -> Self { self._fields.10 = value.into(); self } /// Set the `relatedRecords` field to an Option value (optional) pub fn maybe_related_records(mut self, value: Option<Vec<Data<S>>>) -> Self { self._fields.10 = value; self }}
impl<St: account_view_state::State, S: BosStr> AccountViewBuilder<St, S> { /// Set the `threatSignatures` field (optional) pub fn threat_signatures( mut self, value: impl Into<Option<Vec<admin::ThreatSignature<S>>>>, ) -> Self { self._fields.11 = value.into(); self } /// Set the `threatSignatures` field to an Option value (optional) pub fn maybe_threat_signatures( mut self, value: Option<Vec<admin::ThreatSignature<S>>>, ) -> Self { self._fields.11 = value; self }}
impl<St, S: BosStr> AccountViewBuilder<St, S>where St: account_view_state::State, St::Did: account_view_state::IsSet, St::Handle: account_view_state::IsSet, St::IndexedAt: account_view_state::IsSet,{ /// Build the final struct. pub fn build(self) -> AccountView<S> { AccountView { deactivated_at: self._fields.0, did: self._fields.1.unwrap(), email: self._fields.2, email_confirmed_at: self._fields.3, handle: self._fields.4.unwrap(), indexed_at: self._fields.5.unwrap(), invite_note: self._fields.6, invited_by: self._fields.7, invites: self._fields.8, invites_disabled: self._fields.9, related_records: self._fields.10, threat_signatures: self._fields.11, extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap<SmolStr, Data<S>>, ) -> AccountView<S> { AccountView { deactivated_at: self._fields.0, did: self._fields.1.unwrap(), email: self._fields.2, email_confirmed_at: self._fields.3, handle: self._fields.4.unwrap(), indexed_at: self._fields.5.unwrap(), invite_note: self._fields.6, invited_by: self._fields.7, invites: self._fields.8, invites_disabled: self._fields.9, related_records: self._fields.10, threat_signatures: self._fields.11, extra_data: Some(extra_data), } }}
fn lexicon_doc_com_atproto_admin_defs() -> LexiconDoc<'static> { #[allow(unused_imports)] use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; use jacquard_lexicon::lexicon::*; use alloc::collections::BTreeMap; LexiconDoc { lexicon: Lexicon::Lexicon1, id: CowStr::new_static("com.atproto.admin.defs"), defs: { let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("accountView"), LexUserType::Object(LexObject { required: Some( vec![ SmolStr::new_static("did"), SmolStr::new_static("handle"), SmolStr::new_static("indexedAt") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("deactivatedAt"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("did"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Did), ..Default::default() }), ); map.insert( SmolStr::new_static("email"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("emailConfirmedAt"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("handle"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Handle), ..Default::default() }), ); map.insert( SmolStr::new_static("indexedAt"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("inviteNote"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("invitedBy"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static( "com.atproto.server.defs#inviteCode", ), ..Default::default() }), ); map.insert( SmolStr::new_static("invites"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static( "com.atproto.server.defs#inviteCode", ), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("invitesDisabled"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("relatedRecords"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Unknown(LexUnknown { ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("threatSignatures"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("#threatSignature"), ..Default::default() }), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("repoBlobRef"), LexUserType::Object(LexObject { required: Some( vec![SmolStr::new_static("did"), SmolStr::new_static("cid")], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("cid"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Cid), ..Default::default() }), ); map.insert( SmolStr::new_static("did"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Did), ..Default::default() }), ); map.insert( SmolStr::new_static("recordUri"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::AtUri), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("repoRef"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("did")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("did"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Did), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("statusAttr"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("applied")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("applied"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("ref"), LexObjectProperty::String(LexString { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("threatSignature"), LexUserType::Object(LexObject { required: Some( vec![ SmolStr::new_static("property"), SmolStr::new_static("value") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("property"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("value"), LexObjectProperty::String(LexString { ..Default::default() }), ); map }, ..Default::default() }), ); map }, ..Default::default() }}
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 Cid; type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Cid = Unset; type Did = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid<St: State = Empty>(PhantomData<fn() -> St>); impl<St: State> sealed::Sealed for SetCid<St> {} impl<St: State> State for SetCid<St> { type Cid = Set<members::cid>; type Did = St::Did; } ///State transition - sets the `did` field to Set pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>); impl<St: State> sealed::Sealed for SetDid<St> {} impl<St: State> State for SetDid<St> { type Cid = St::Cid; type Did = Set<members::did>; } /// 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 `did` field pub struct did(()); }}
/// Builder for constructing an instance of this type.pub struct RepoBlobRefBuilder<St: repo_blob_ref_state::State, S: BosStr = DefaultStr> { _state: PhantomData<fn() -> St>, _fields: (Option<Cid<S>>, Option<Did<S>>, Option<AtUri<S>>), _type: PhantomData<fn() -> S>,}
impl RepoBlobRef<DefaultStr> { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> RepoBlobRefBuilder<repo_blob_ref_state::Empty, DefaultStr> { RepoBlobRefBuilder::new() }}
impl<S: BosStr> RepoBlobRef<S> { /// Create a new builder for this type pub fn builder() -> RepoBlobRefBuilder<repo_blob_ref_state::Empty, S> { RepoBlobRefBuilder::builder() }}
impl RepoBlobRefBuilder<repo_blob_ref_state::Empty, DefaultStr> { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { RepoBlobRefBuilder { _state: PhantomData, _fields: (None, None, None), _type: PhantomData, } }}
impl<S: BosStr> RepoBlobRefBuilder<repo_blob_ref_state::Empty, S> { /// Create a new builder with all fields unset pub fn builder() -> Self { RepoBlobRefBuilder { _state: PhantomData, _fields: (None, None, None), _type: PhantomData, } }}
impl<St, S: BosStr> RepoBlobRefBuilder<St, S>where St: repo_blob_ref_state::State, St::Cid: repo_blob_ref_state::IsUnset,{ /// Set the `cid` field (required) pub fn cid( mut self, value: impl Into<Cid<S>>, ) -> RepoBlobRefBuilder<repo_blob_ref_state::SetCid<St>, S> { self._fields.0 = Option::Some(value.into()); RepoBlobRefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } }}
impl<St, S: BosStr> RepoBlobRefBuilder<St, S>where St: repo_blob_ref_state::State, St::Did: repo_blob_ref_state::IsUnset,{ /// Set the `did` field (required) pub fn did( mut self, value: impl Into<Did<S>>, ) -> RepoBlobRefBuilder<repo_blob_ref_state::SetDid<St>, S> { self._fields.1 = Option::Some(value.into()); RepoBlobRefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } }}
impl<St: repo_blob_ref_state::State, S: BosStr> RepoBlobRefBuilder<St, S> { /// Set the `recordUri` field (optional) pub fn record_uri(mut self, value: impl Into<Option<AtUri<S>>>) -> Self { self._fields.2 = value.into(); self } /// Set the `recordUri` field to an Option value (optional) pub fn maybe_record_uri(mut self, value: Option<AtUri<S>>) -> Self { self._fields.2 = value; self }}
impl<St, S: BosStr> RepoBlobRefBuilder<St, S>where St: repo_blob_ref_state::State, St::Cid: repo_blob_ref_state::IsSet, St::Did: repo_blob_ref_state::IsSet,{ /// Build the final struct. pub fn build(self) -> RepoBlobRef<S> { RepoBlobRef { cid: self._fields.0.unwrap(), did: self._fields.1.unwrap(), record_uri: self._fields.2, extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap<SmolStr, Data<S>>, ) -> RepoBlobRef<S> { RepoBlobRef { cid: self._fields.0.unwrap(), did: self._fields.1.unwrap(), record_uri: self._fields.2, extra_data: Some(extra_data), } }}
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<St: State = Empty>(PhantomData<fn() -> St>); impl<St: State> sealed::Sealed for SetDid<St> {} impl<St: State> State for SetDid<St> { type Did = Set<members::did>; } /// 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<St: repo_ref_state::State, S: BosStr = DefaultStr> { _state: PhantomData<fn() -> St>, _fields: (Option<Did<S>>,), _type: PhantomData<fn() -> S>,}
impl RepoRef<DefaultStr> { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> RepoRefBuilder<repo_ref_state::Empty, DefaultStr> { RepoRefBuilder::new() }}
impl<S: BosStr> RepoRef<S> { /// Create a new builder for this type pub fn builder() -> RepoRefBuilder<repo_ref_state::Empty, S> { RepoRefBuilder::builder() }}
impl RepoRefBuilder<repo_ref_state::Empty, DefaultStr> { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { RepoRefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } }}
impl<S: BosStr> RepoRefBuilder<repo_ref_state::Empty, S> { /// Create a new builder with all fields unset pub fn builder() -> Self { RepoRefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } }}
impl<St, S: BosStr> RepoRefBuilder<St, S>where St: repo_ref_state::State, St::Did: repo_ref_state::IsUnset,{ /// Set the `did` field (required) pub fn did( mut self, value: impl Into<Did<S>>, ) -> RepoRefBuilder<repo_ref_state::SetDid<St>, S> { self._fields.0 = Option::Some(value.into()); RepoRefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } }}
impl<St, S: BosStr> RepoRefBuilder<St, S>where St: repo_ref_state::State, St::Did: repo_ref_state::IsSet,{ /// Build the final struct. pub fn build(self) -> RepoRef<S> { RepoRef { did: self._fields.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> RepoRef<S> { RepoRef { did: self._fields.0.unwrap(), extra_data: Some(extra_data), } }}
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<St: State = Empty>(PhantomData<fn() -> St>); impl<St: State> sealed::Sealed for SetApplied<St> {} impl<St: State> State for SetApplied<St> { type Applied = Set<members::applied>; } /// 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<St: status_attr_state::State, S: BosStr = DefaultStr> { _state: PhantomData<fn() -> St>, _fields: (Option<bool>, Option<S>), _type: PhantomData<fn() -> S>,}
impl StatusAttr<DefaultStr> { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> StatusAttrBuilder<status_attr_state::Empty, DefaultStr> { StatusAttrBuilder::new() }}
impl<S: BosStr> StatusAttr<S> { /// Create a new builder for this type pub fn builder() -> StatusAttrBuilder<status_attr_state::Empty, S> { StatusAttrBuilder::builder() }}
impl StatusAttrBuilder<status_attr_state::Empty, DefaultStr> { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { StatusAttrBuilder { _state: PhantomData, _fields: (None, None), _type: PhantomData, } }}
impl<S: BosStr> StatusAttrBuilder<status_attr_state::Empty, S> { /// Create a new builder with all fields unset pub fn builder() -> Self { StatusAttrBuilder { _state: PhantomData, _fields: (None, None), _type: PhantomData, } }}
impl<St, S: BosStr> StatusAttrBuilder<St, S>where St: status_attr_state::State, St::Applied: status_attr_state::IsUnset,{ /// Set the `applied` field (required) pub fn applied( mut self, value: impl Into<bool>, ) -> StatusAttrBuilder<status_attr_state::SetApplied<St>, S> { self._fields.0 = Option::Some(value.into()); StatusAttrBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } }}
impl<St: status_attr_state::State, S: BosStr> StatusAttrBuilder<St, S> { /// Set the `ref` field (optional) pub fn r#ref(mut self, value: impl Into<Option<S>>) -> Self { self._fields.1 = value.into(); self } /// Set the `ref` field to an Option value (optional) pub fn maybe_ref(mut self, value: Option<S>) -> Self { self._fields.1 = value; self }}
impl<St, S: BosStr> StatusAttrBuilder<St, S>where St: status_attr_state::State, St::Applied: status_attr_state::IsSet,{ /// Build the final struct. pub fn build(self) -> StatusAttr<S> { StatusAttr { applied: self._fields.0.unwrap(), r#ref: self._fields.1, extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap<SmolStr, Data<S>>, ) -> StatusAttr<S> { StatusAttr { applied: self._fields.0.unwrap(), r#ref: self._fields.1, extra_data: Some(extra_data), } }}