1pub mod get_preferences;
10pub mod get_profile;
11pub mod get_profiles;
12pub mod get_suggestions;
13pub mod profile;
14pub mod put_preferences;
15pub mod search_actors;
16pub mod search_actors_typeahead;
17pub mod status;
18
19#[allow(unused_imports)]
20use alloc::collections::BTreeMap;
21
22#[allow(unused_imports)]
23use core::marker::PhantomData;
24use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr};
25
26#[allow(unused_imports)]
27use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
28use jacquard_common::deps::smol_str::SmolStr;
29use jacquard_common::types::string::{AtUri, Cid, Datetime, Did, Handle, UriValue};
30use jacquard_common::types::value::Data;
31use jacquard_derive::{IntoStatic, open_union};
32use jacquard_lexicon::lexicon::LexiconDoc;
33use jacquard_lexicon::schema::LexiconSchema;
34
35use crate::app_bsky::actor;
36use crate::app_bsky::embed::external::View;
37use crate::app_bsky::feed::postgate::DisableRule;
38use crate::app_bsky::feed::threadgate::FollowerRule;
39use crate::app_bsky::feed::threadgate::FollowingRule;
40use crate::app_bsky::feed::threadgate::ListRule;
41use crate::app_bsky::feed::threadgate::MentionRule;
42use crate::app_bsky::graph::ListViewBasic;
43use crate::app_bsky::graph::StarterPackViewBasic;
44use crate::app_bsky::notification::ActivitySubscription;
45use crate::com_atproto::label::Label;
46use crate::com_atproto::repo::strong_ref::StrongRef;
47#[allow(unused_imports)]
48use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
49use serde::{Deserialize, Serialize};
50
51#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
52#[serde(
53 rename_all = "camelCase",
54 bound(deserialize = "S: Deserialize<'de> + BosStr")
55)]
56pub struct AdultContentPref<S: BosStr = DefaultStr> {
57 #[serde(default = "_default_adult_content_pref_enabled")]
59 pub enabled: bool,
60 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
61 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
62}
63
64#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
67#[serde(
68 rename_all = "camelCase",
69 bound(deserialize = "S: Deserialize<'de> + BosStr")
70)]
71pub struct BskyAppProgressGuide<S: BosStr = DefaultStr> {
72 pub guide: S,
73 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
74 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
75}
76
77#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
80#[serde(
81 rename_all = "camelCase",
82 bound(deserialize = "S: Deserialize<'de> + BosStr")
83)]
84pub struct BskyAppStatePref<S: BosStr = DefaultStr> {
85 #[serde(skip_serializing_if = "Option::is_none")]
86 pub active_progress_guide: Option<actor::BskyAppProgressGuide<S>>,
87 #[serde(skip_serializing_if = "Option::is_none")]
89 pub nuxs: Option<Vec<actor::Nux<S>>>,
90 #[serde(skip_serializing_if = "Option::is_none")]
92 pub queued_nudges: Option<Vec<S>>,
93 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
94 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
95}
96
97#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
98#[serde(
99 rename_all = "camelCase",
100 bound(deserialize = "S: Deserialize<'de> + BosStr")
101)]
102pub struct ContentLabelPref<S: BosStr = DefaultStr> {
103 pub label: S,
104 #[serde(skip_serializing_if = "Option::is_none")]
106 pub labeler_did: Option<Did<S>>,
107 pub visibility: ContentLabelPrefVisibility<S>,
108 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
109 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
110}
111
112#[derive(Debug, Clone, PartialEq, Eq, Hash)]
113pub enum ContentLabelPrefVisibility<S: BosStr = DefaultStr> {
114 Ignore,
115 Show,
116 Warn,
117 Hide,
118 Other(S),
119}
120
121impl<S: BosStr> ContentLabelPrefVisibility<S> {
122 pub fn as_str(&self) -> &str {
123 match self {
124 Self::Ignore => "ignore",
125 Self::Show => "show",
126 Self::Warn => "warn",
127 Self::Hide => "hide",
128 Self::Other(s) => s.as_ref(),
129 }
130 }
131 pub fn from_value(s: S) -> Self {
133 match s.as_ref() {
134 "ignore" => Self::Ignore,
135 "show" => Self::Show,
136 "warn" => Self::Warn,
137 "hide" => Self::Hide,
138 _ => Self::Other(s),
139 }
140 }
141}
142
143impl<S: BosStr> core::fmt::Display for ContentLabelPrefVisibility<S> {
144 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
145 write!(f, "{}", self.as_str())
146 }
147}
148
149impl<S: BosStr> AsRef<str> for ContentLabelPrefVisibility<S> {
150 fn as_ref(&self) -> &str {
151 self.as_str()
152 }
153}
154
155impl<S: BosStr> Serialize for ContentLabelPrefVisibility<S> {
156 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
157 where
158 Ser: serde::Serializer,
159 {
160 serializer.serialize_str(self.as_str())
161 }
162}
163
164impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ContentLabelPrefVisibility<S> {
165 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
166 where
167 D: serde::Deserializer<'de>,
168 {
169 let s = S::deserialize(deserializer)?;
170 Ok(Self::from_value(s))
171 }
172}
173
174impl<S: BosStr + Default> Default for ContentLabelPrefVisibility<S> {
175 fn default() -> Self {
176 Self::Other(Default::default())
177 }
178}
179
180impl<S: BosStr> jacquard_common::IntoStatic for ContentLabelPrefVisibility<S>
181where
182 S: BosStr + jacquard_common::IntoStatic,
183 S::Output: BosStr,
184{
185 type Output = ContentLabelPrefVisibility<S::Output>;
186 fn into_static(self) -> Self::Output {
187 match self {
188 ContentLabelPrefVisibility::Ignore => ContentLabelPrefVisibility::Ignore,
189 ContentLabelPrefVisibility::Show => ContentLabelPrefVisibility::Show,
190 ContentLabelPrefVisibility::Warn => ContentLabelPrefVisibility::Warn,
191 ContentLabelPrefVisibility::Hide => ContentLabelPrefVisibility::Hide,
192 ContentLabelPrefVisibility::Other(v) => {
193 ContentLabelPrefVisibility::Other(v.into_static())
194 }
195 }
196 }
197}
198
199#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
202#[serde(
203 rename_all = "camelCase",
204 bound(deserialize = "S: Deserialize<'de> + BosStr")
205)]
206pub struct DeclaredAgePref<S: BosStr = DefaultStr> {
207 #[serde(skip_serializing_if = "Option::is_none")]
209 pub is_over_age13: Option<bool>,
210 #[serde(skip_serializing_if = "Option::is_none")]
212 pub is_over_age16: Option<bool>,
213 #[serde(skip_serializing_if = "Option::is_none")]
215 pub is_over_age18: Option<bool>,
216 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
217 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
218}
219
220#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
221#[serde(
222 rename_all = "camelCase",
223 bound(deserialize = "S: Deserialize<'de> + BosStr")
224)]
225pub struct FeedViewPref<S: BosStr = DefaultStr> {
226 pub feed: S,
228 #[serde(skip_serializing_if = "Option::is_none")]
230 pub hide_quote_posts: Option<bool>,
231 #[serde(skip_serializing_if = "Option::is_none")]
233 pub hide_replies: Option<bool>,
234 #[serde(skip_serializing_if = "Option::is_none")]
236 pub hide_replies_by_like_count: Option<i64>,
237 #[serde(skip_serializing_if = "Option::is_none")]
239 #[serde(default = "_default_feed_view_pref_hide_replies_by_unfollowed")]
240 pub hide_replies_by_unfollowed: Option<bool>,
241 #[serde(skip_serializing_if = "Option::is_none")]
243 pub hide_reposts: Option<bool>,
244 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
245 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
246}
247
248#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
249#[serde(
250 rename_all = "camelCase",
251 bound(deserialize = "S: Deserialize<'de> + BosStr")
252)]
253pub struct HiddenPostsPref<S: BosStr = DefaultStr> {
254 pub items: Vec<AtUri<S>>,
256 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
257 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
258}
259
260#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
261#[serde(
262 rename_all = "camelCase",
263 bound(deserialize = "S: Deserialize<'de> + BosStr")
264)]
265pub struct InterestsPref<S: BosStr = DefaultStr> {
266 pub tags: Vec<S>,
268 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
269 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
270}
271
272#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
275#[serde(
276 rename_all = "camelCase",
277 bound(deserialize = "S: Deserialize<'de> + BosStr")
278)]
279pub struct KnownFollowers<S: BosStr = DefaultStr> {
280 pub count: i64,
281 pub followers: Vec<actor::ProfileViewBasic<S>>,
282 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
283 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
284}
285
286#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
287#[serde(
288 rename_all = "camelCase",
289 bound(deserialize = "S: Deserialize<'de> + BosStr")
290)]
291pub struct LabelerPrefItem<S: BosStr = DefaultStr> {
292 pub did: Did<S>,
293 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
294 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
295}
296
297#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
298#[serde(
299 rename_all = "camelCase",
300 bound(deserialize = "S: Deserialize<'de> + BosStr")
301)]
302pub struct LabelersPref<S: BosStr = DefaultStr> {
303 pub labelers: Vec<actor::LabelerPrefItem<S>>,
304 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
305 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
306}
307
308#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
311#[serde(
312 rename_all = "camelCase",
313 bound(deserialize = "S: Deserialize<'de> + BosStr")
314)]
315pub struct LiveEventPreferences<S: BosStr = DefaultStr> {
316 #[serde(skip_serializing_if = "Option::is_none")]
318 pub hidden_feed_ids: Option<Vec<S>>,
319 #[serde(skip_serializing_if = "Option::is_none")]
321 #[serde(default = "_default_live_event_preferences_hide_all_feeds")]
322 pub hide_all_feeds: Option<bool>,
323 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
324 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
325}
326
327#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
330#[serde(
331 rename_all = "camelCase",
332 bound(deserialize = "S: Deserialize<'de> + BosStr")
333)]
334pub struct MutedWord<S: BosStr = DefaultStr> {
335 #[serde(skip_serializing_if = "Option::is_none")]
337 pub actor_target: Option<MutedWordActorTarget<S>>,
338 #[serde(skip_serializing_if = "Option::is_none")]
340 pub expires_at: Option<Datetime>,
341 #[serde(skip_serializing_if = "Option::is_none")]
342 pub id: Option<S>,
343 pub targets: Vec<actor::MutedWordTarget<S>>,
345 pub value: S,
347 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
348 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
349}
350
351#[derive(Debug, Clone, PartialEq, Eq, Hash)]
354pub enum MutedWordActorTarget<S: BosStr = DefaultStr> {
355 All,
356 ExcludeFollowing,
357 Other(S),
358}
359
360impl<S: BosStr> MutedWordActorTarget<S> {
361 pub fn as_str(&self) -> &str {
362 match self {
363 Self::All => "all",
364 Self::ExcludeFollowing => "exclude-following",
365 Self::Other(s) => s.as_ref(),
366 }
367 }
368 pub fn from_value(s: S) -> Self {
370 match s.as_ref() {
371 "all" => Self::All,
372 "exclude-following" => Self::ExcludeFollowing,
373 _ => Self::Other(s),
374 }
375 }
376}
377
378impl<S: BosStr> core::fmt::Display for MutedWordActorTarget<S> {
379 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
380 write!(f, "{}", self.as_str())
381 }
382}
383
384impl<S: BosStr> AsRef<str> for MutedWordActorTarget<S> {
385 fn as_ref(&self) -> &str {
386 self.as_str()
387 }
388}
389
390impl<S: BosStr> Serialize for MutedWordActorTarget<S> {
391 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
392 where
393 Ser: serde::Serializer,
394 {
395 serializer.serialize_str(self.as_str())
396 }
397}
398
399impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for MutedWordActorTarget<S> {
400 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
401 where
402 D: serde::Deserializer<'de>,
403 {
404 let s = S::deserialize(deserializer)?;
405 Ok(Self::from_value(s))
406 }
407}
408
409impl<S: BosStr + Default> Default for MutedWordActorTarget<S> {
410 fn default() -> Self {
411 Self::Other(Default::default())
412 }
413}
414
415impl<S: BosStr> jacquard_common::IntoStatic for MutedWordActorTarget<S>
416where
417 S: BosStr + jacquard_common::IntoStatic,
418 S::Output: BosStr,
419{
420 type Output = MutedWordActorTarget<S::Output>;
421 fn into_static(self) -> Self::Output {
422 match self {
423 MutedWordActorTarget::All => MutedWordActorTarget::All,
424 MutedWordActorTarget::ExcludeFollowing => MutedWordActorTarget::ExcludeFollowing,
425 MutedWordActorTarget::Other(v) => MutedWordActorTarget::Other(v.into_static()),
426 }
427 }
428}
429
430#[derive(Debug, Clone, PartialEq, Eq, Hash)]
431pub enum MutedWordTarget<S: BosStr = DefaultStr> {
432 Content,
433 Tag,
434 Other(S),
435}
436
437impl<S: BosStr> MutedWordTarget<S> {
438 pub fn as_str(&self) -> &str {
439 match self {
440 Self::Content => "content",
441 Self::Tag => "tag",
442 Self::Other(s) => s.as_ref(),
443 }
444 }
445 pub fn from_value(s: S) -> Self {
447 match s.as_ref() {
448 "content" => Self::Content,
449 "tag" => Self::Tag,
450 _ => Self::Other(s),
451 }
452 }
453}
454
455impl<S: BosStr> AsRef<str> for MutedWordTarget<S> {
456 fn as_ref(&self) -> &str {
457 self.as_str()
458 }
459}
460
461impl<S: BosStr> core::fmt::Display for MutedWordTarget<S> {
462 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
463 write!(f, "{}", self.as_str())
464 }
465}
466
467impl<S: BosStr> Serialize for MutedWordTarget<S> {
468 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
469 where
470 Ser: serde::Serializer,
471 {
472 serializer.serialize_str(self.as_str())
473 }
474}
475
476impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for MutedWordTarget<S> {
477 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
478 where
479 D: serde::Deserializer<'de>,
480 {
481 let s = S::deserialize(deserializer)?;
482 Ok(Self::from_value(s))
483 }
484}
485
486impl<S: BosStr> jacquard_common::IntoStatic for MutedWordTarget<S>
487where
488 S: BosStr + jacquard_common::IntoStatic,
489 S::Output: BosStr,
490{
491 type Output = MutedWordTarget<S::Output>;
492 fn into_static(self) -> Self::Output {
493 match self {
494 MutedWordTarget::Content => MutedWordTarget::Content,
495 MutedWordTarget::Tag => MutedWordTarget::Tag,
496 MutedWordTarget::Other(v) => MutedWordTarget::Other(v.into_static()),
497 }
498 }
499}
500
501#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
502#[serde(
503 rename_all = "camelCase",
504 bound(deserialize = "S: Deserialize<'de> + BosStr")
505)]
506pub struct MutedWordsPref<S: BosStr = DefaultStr> {
507 pub items: Vec<actor::MutedWord<S>>,
509 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
510 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
511}
512
513#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
516#[serde(
517 rename_all = "camelCase",
518 bound(deserialize = "S: Deserialize<'de> + BosStr")
519)]
520pub struct Nux<S: BosStr = DefaultStr> {
521 #[serde(default = "_default_nux_completed")]
523 pub completed: bool,
524 #[serde(skip_serializing_if = "Option::is_none")]
526 pub data: Option<S>,
527 #[serde(skip_serializing_if = "Option::is_none")]
529 pub expires_at: Option<Datetime>,
530 pub id: S,
531 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
532 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
533}
534
535#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
536#[serde(
537 rename_all = "camelCase",
538 bound(deserialize = "S: Deserialize<'de> + BosStr")
539)]
540pub struct PersonalDetailsPref<S: BosStr = DefaultStr> {
541 #[serde(skip_serializing_if = "Option::is_none")]
543 pub birth_date: Option<Datetime>,
544 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
545 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
546}
547
548#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
551#[serde(
552 rename_all = "camelCase",
553 bound(deserialize = "S: Deserialize<'de> + BosStr")
554)]
555pub struct PostInteractionSettingsPref<S: BosStr = DefaultStr> {
556 #[serde(skip_serializing_if = "Option::is_none")]
558 pub postgate_embedding_rules: Option<Vec<DisableRule<S>>>,
559 #[serde(skip_serializing_if = "Option::is_none")]
561 pub threadgate_allow_rules: Option<Vec<PostInteractionSettingsPrefThreadgateAllowRulesItem<S>>>,
562 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
563 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
564}
565
566#[open_union]
567#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
568#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
569pub enum PostInteractionSettingsPrefThreadgateAllowRulesItem<S: BosStr = DefaultStr> {
570 #[serde(rename = "app.bsky.feed.threadgate#mentionRule")]
571 ThreadgateMentionRule(Box<MentionRule<S>>),
572 #[serde(rename = "app.bsky.feed.threadgate#followerRule")]
573 ThreadgateFollowerRule(Box<FollowerRule<S>>),
574 #[serde(rename = "app.bsky.feed.threadgate#followingRule")]
575 ThreadgateFollowingRule(Box<FollowingRule<S>>),
576 #[serde(rename = "app.bsky.feed.threadgate#listRule")]
577 ThreadgateListRule(Box<ListRule<S>>),
578}
579
580#[open_union]
581#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
582#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
583pub enum PreferencesItem<S: BosStr = DefaultStr> {
584 #[serde(rename = "app.bsky.actor.defs#adultContentPref")]
585 AdultContentPref(Box<actor::AdultContentPref<S>>),
586 #[serde(rename = "app.bsky.actor.defs#contentLabelPref")]
587 ContentLabelPref(Box<actor::ContentLabelPref<S>>),
588 #[serde(rename = "app.bsky.actor.defs#savedFeedsPref")]
589 SavedFeedsPref(Box<actor::SavedFeedsPref<S>>),
590 #[serde(rename = "app.bsky.actor.defs#savedFeedsPrefV2")]
591 SavedFeedsPrefV2(Box<actor::SavedFeedsPrefV2<S>>),
592 #[serde(rename = "app.bsky.actor.defs#personalDetailsPref")]
593 PersonalDetailsPref(Box<actor::PersonalDetailsPref<S>>),
594 #[serde(rename = "app.bsky.actor.defs#declaredAgePref")]
595 DeclaredAgePref(Box<actor::DeclaredAgePref<S>>),
596 #[serde(rename = "app.bsky.actor.defs#feedViewPref")]
597 FeedViewPref(Box<actor::FeedViewPref<S>>),
598 #[serde(rename = "app.bsky.actor.defs#threadViewPref")]
599 ThreadViewPref(Box<actor::ThreadViewPref<S>>),
600 #[serde(rename = "app.bsky.actor.defs#interestsPref")]
601 InterestsPref(Box<actor::InterestsPref<S>>),
602 #[serde(rename = "app.bsky.actor.defs#mutedWordsPref")]
603 MutedWordsPref(Box<actor::MutedWordsPref<S>>),
604 #[serde(rename = "app.bsky.actor.defs#hiddenPostsPref")]
605 HiddenPostsPref(Box<actor::HiddenPostsPref<S>>),
606 #[serde(rename = "app.bsky.actor.defs#bskyAppStatePref")]
607 BskyAppStatePref(Box<actor::BskyAppStatePref<S>>),
608 #[serde(rename = "app.bsky.actor.defs#labelersPref")]
609 LabelersPref(Box<actor::LabelersPref<S>>),
610 #[serde(rename = "app.bsky.actor.defs#postInteractionSettingsPref")]
611 PostInteractionSettingsPref(Box<actor::PostInteractionSettingsPref<S>>),
612 #[serde(rename = "app.bsky.actor.defs#verificationPrefs")]
613 VerificationPrefs(Box<actor::VerificationPrefs<S>>),
614 #[serde(rename = "app.bsky.actor.defs#liveEventPreferences")]
615 LiveEventPreferences(Box<actor::LiveEventPreferences<S>>),
616}
617
618pub type Preferences<S = DefaultStr> = Vec<PreferencesItem<S>>;
619
620#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
621#[serde(
622 rename_all = "camelCase",
623 bound(deserialize = "S: Deserialize<'de> + BosStr")
624)]
625pub struct ProfileAssociated<S: BosStr = DefaultStr> {
626 #[serde(skip_serializing_if = "Option::is_none")]
627 pub activity_subscription: Option<actor::ProfileAssociatedActivitySubscription<S>>,
628 #[serde(skip_serializing_if = "Option::is_none")]
629 pub chat: Option<actor::ProfileAssociatedChat<S>>,
630 #[serde(skip_serializing_if = "Option::is_none")]
631 pub feedgens: Option<i64>,
632 #[serde(skip_serializing_if = "Option::is_none")]
633 pub germ: Option<actor::ProfileAssociatedGerm<S>>,
634 #[serde(skip_serializing_if = "Option::is_none")]
635 pub labeler: Option<bool>,
636 #[serde(skip_serializing_if = "Option::is_none")]
637 pub lists: Option<i64>,
638 #[serde(skip_serializing_if = "Option::is_none")]
639 pub starter_packs: Option<i64>,
640 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
641 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
642}
643
644#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
645#[serde(
646 rename_all = "camelCase",
647 bound(deserialize = "S: Deserialize<'de> + BosStr")
648)]
649pub struct ProfileAssociatedActivitySubscription<S: BosStr = DefaultStr> {
650 pub allow_subscriptions: ProfileAssociatedActivitySubscriptionAllowSubscriptions<S>,
651 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
652 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
653}
654
655#[derive(Debug, Clone, PartialEq, Eq, Hash)]
656pub enum ProfileAssociatedActivitySubscriptionAllowSubscriptions<S: BosStr = DefaultStr> {
657 Followers,
658 Mutuals,
659 None,
660 Other(S),
661}
662
663impl<S: BosStr> ProfileAssociatedActivitySubscriptionAllowSubscriptions<S> {
664 pub fn as_str(&self) -> &str {
665 match self {
666 Self::Followers => "followers",
667 Self::Mutuals => "mutuals",
668 Self::None => "none",
669 Self::Other(s) => s.as_ref(),
670 }
671 }
672 pub fn from_value(s: S) -> Self {
674 match s.as_ref() {
675 "followers" => Self::Followers,
676 "mutuals" => Self::Mutuals,
677 "none" => Self::None,
678 _ => Self::Other(s),
679 }
680 }
681}
682
683impl<S: BosStr> core::fmt::Display for ProfileAssociatedActivitySubscriptionAllowSubscriptions<S> {
684 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
685 write!(f, "{}", self.as_str())
686 }
687}
688
689impl<S: BosStr> AsRef<str> for ProfileAssociatedActivitySubscriptionAllowSubscriptions<S> {
690 fn as_ref(&self) -> &str {
691 self.as_str()
692 }
693}
694
695impl<S: BosStr> Serialize for ProfileAssociatedActivitySubscriptionAllowSubscriptions<S> {
696 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
697 where
698 Ser: serde::Serializer,
699 {
700 serializer.serialize_str(self.as_str())
701 }
702}
703
704impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de>
705 for ProfileAssociatedActivitySubscriptionAllowSubscriptions<S>
706{
707 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
708 where
709 D: serde::Deserializer<'de>,
710 {
711 let s = S::deserialize(deserializer)?;
712 Ok(Self::from_value(s))
713 }
714}
715
716impl<S: BosStr + Default> Default for ProfileAssociatedActivitySubscriptionAllowSubscriptions<S> {
717 fn default() -> Self {
718 Self::Other(Default::default())
719 }
720}
721
722impl<S: BosStr> jacquard_common::IntoStatic
723 for ProfileAssociatedActivitySubscriptionAllowSubscriptions<S>
724where
725 S: BosStr + jacquard_common::IntoStatic,
726 S::Output: BosStr,
727{
728 type Output = ProfileAssociatedActivitySubscriptionAllowSubscriptions<S::Output>;
729 fn into_static(self) -> Self::Output {
730 match self {
731 ProfileAssociatedActivitySubscriptionAllowSubscriptions::Followers => {
732 ProfileAssociatedActivitySubscriptionAllowSubscriptions::Followers
733 }
734 ProfileAssociatedActivitySubscriptionAllowSubscriptions::Mutuals => {
735 ProfileAssociatedActivitySubscriptionAllowSubscriptions::Mutuals
736 }
737 ProfileAssociatedActivitySubscriptionAllowSubscriptions::None => {
738 ProfileAssociatedActivitySubscriptionAllowSubscriptions::None
739 }
740 ProfileAssociatedActivitySubscriptionAllowSubscriptions::Other(v) => {
741 ProfileAssociatedActivitySubscriptionAllowSubscriptions::Other(v.into_static())
742 }
743 }
744 }
745}
746
747#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
748#[serde(
749 rename_all = "camelCase",
750 bound(deserialize = "S: Deserialize<'de> + BosStr")
751)]
752pub struct ProfileAssociatedChat<S: BosStr = DefaultStr> {
753 #[serde(skip_serializing_if = "Option::is_none")]
754 pub allow_group_invites: Option<ProfileAssociatedChatAllowGroupInvites<S>>,
755 pub allow_incoming: ProfileAssociatedChatAllowIncoming<S>,
756 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
757 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
758}
759
760#[derive(Debug, Clone, PartialEq, Eq, Hash)]
761pub enum ProfileAssociatedChatAllowGroupInvites<S: BosStr = DefaultStr> {
762 All,
763 None,
764 Following,
765 Other(S),
766}
767
768impl<S: BosStr> ProfileAssociatedChatAllowGroupInvites<S> {
769 pub fn as_str(&self) -> &str {
770 match self {
771 Self::All => "all",
772 Self::None => "none",
773 Self::Following => "following",
774 Self::Other(s) => s.as_ref(),
775 }
776 }
777 pub fn from_value(s: S) -> Self {
779 match s.as_ref() {
780 "all" => Self::All,
781 "none" => Self::None,
782 "following" => Self::Following,
783 _ => Self::Other(s),
784 }
785 }
786}
787
788impl<S: BosStr> core::fmt::Display for ProfileAssociatedChatAllowGroupInvites<S> {
789 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
790 write!(f, "{}", self.as_str())
791 }
792}
793
794impl<S: BosStr> AsRef<str> for ProfileAssociatedChatAllowGroupInvites<S> {
795 fn as_ref(&self) -> &str {
796 self.as_str()
797 }
798}
799
800impl<S: BosStr> Serialize for ProfileAssociatedChatAllowGroupInvites<S> {
801 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
802 where
803 Ser: serde::Serializer,
804 {
805 serializer.serialize_str(self.as_str())
806 }
807}
808
809impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de>
810 for ProfileAssociatedChatAllowGroupInvites<S>
811{
812 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
813 where
814 D: serde::Deserializer<'de>,
815 {
816 let s = S::deserialize(deserializer)?;
817 Ok(Self::from_value(s))
818 }
819}
820
821impl<S: BosStr + Default> Default for ProfileAssociatedChatAllowGroupInvites<S> {
822 fn default() -> Self {
823 Self::Other(Default::default())
824 }
825}
826
827impl<S: BosStr> jacquard_common::IntoStatic for ProfileAssociatedChatAllowGroupInvites<S>
828where
829 S: BosStr + jacquard_common::IntoStatic,
830 S::Output: BosStr,
831{
832 type Output = ProfileAssociatedChatAllowGroupInvites<S::Output>;
833 fn into_static(self) -> Self::Output {
834 match self {
835 ProfileAssociatedChatAllowGroupInvites::All => {
836 ProfileAssociatedChatAllowGroupInvites::All
837 }
838 ProfileAssociatedChatAllowGroupInvites::None => {
839 ProfileAssociatedChatAllowGroupInvites::None
840 }
841 ProfileAssociatedChatAllowGroupInvites::Following => {
842 ProfileAssociatedChatAllowGroupInvites::Following
843 }
844 ProfileAssociatedChatAllowGroupInvites::Other(v) => {
845 ProfileAssociatedChatAllowGroupInvites::Other(v.into_static())
846 }
847 }
848 }
849}
850
851#[derive(Debug, Clone, PartialEq, Eq, Hash)]
852pub enum ProfileAssociatedChatAllowIncoming<S: BosStr = DefaultStr> {
853 All,
854 None,
855 Following,
856 Other(S),
857}
858
859impl<S: BosStr> ProfileAssociatedChatAllowIncoming<S> {
860 pub fn as_str(&self) -> &str {
861 match self {
862 Self::All => "all",
863 Self::None => "none",
864 Self::Following => "following",
865 Self::Other(s) => s.as_ref(),
866 }
867 }
868 pub fn from_value(s: S) -> Self {
870 match s.as_ref() {
871 "all" => Self::All,
872 "none" => Self::None,
873 "following" => Self::Following,
874 _ => Self::Other(s),
875 }
876 }
877}
878
879impl<S: BosStr> core::fmt::Display for ProfileAssociatedChatAllowIncoming<S> {
880 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
881 write!(f, "{}", self.as_str())
882 }
883}
884
885impl<S: BosStr> AsRef<str> for ProfileAssociatedChatAllowIncoming<S> {
886 fn as_ref(&self) -> &str {
887 self.as_str()
888 }
889}
890
891impl<S: BosStr> Serialize for ProfileAssociatedChatAllowIncoming<S> {
892 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
893 where
894 Ser: serde::Serializer,
895 {
896 serializer.serialize_str(self.as_str())
897 }
898}
899
900impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ProfileAssociatedChatAllowIncoming<S> {
901 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
902 where
903 D: serde::Deserializer<'de>,
904 {
905 let s = S::deserialize(deserializer)?;
906 Ok(Self::from_value(s))
907 }
908}
909
910impl<S: BosStr + Default> Default for ProfileAssociatedChatAllowIncoming<S> {
911 fn default() -> Self {
912 Self::Other(Default::default())
913 }
914}
915
916impl<S: BosStr> jacquard_common::IntoStatic for ProfileAssociatedChatAllowIncoming<S>
917where
918 S: BosStr + jacquard_common::IntoStatic,
919 S::Output: BosStr,
920{
921 type Output = ProfileAssociatedChatAllowIncoming<S::Output>;
922 fn into_static(self) -> Self::Output {
923 match self {
924 ProfileAssociatedChatAllowIncoming::All => ProfileAssociatedChatAllowIncoming::All,
925 ProfileAssociatedChatAllowIncoming::None => ProfileAssociatedChatAllowIncoming::None,
926 ProfileAssociatedChatAllowIncoming::Following => {
927 ProfileAssociatedChatAllowIncoming::Following
928 }
929 ProfileAssociatedChatAllowIncoming::Other(v) => {
930 ProfileAssociatedChatAllowIncoming::Other(v.into_static())
931 }
932 }
933 }
934}
935
936#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
937#[serde(
938 rename_all = "camelCase",
939 bound(deserialize = "S: Deserialize<'de> + BosStr")
940)]
941pub struct ProfileAssociatedGerm<S: BosStr = DefaultStr> {
942 pub message_me_url: UriValue<S>,
943 pub show_button_to: ProfileAssociatedGermShowButtonTo<S>,
944 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
945 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
946}
947
948#[derive(Debug, Clone, PartialEq, Eq, Hash)]
949pub enum ProfileAssociatedGermShowButtonTo<S: BosStr = DefaultStr> {
950 UsersIFollow,
951 Everyone,
952 Other(S),
953}
954
955impl<S: BosStr> ProfileAssociatedGermShowButtonTo<S> {
956 pub fn as_str(&self) -> &str {
957 match self {
958 Self::UsersIFollow => "usersIFollow",
959 Self::Everyone => "everyone",
960 Self::Other(s) => s.as_ref(),
961 }
962 }
963 pub fn from_value(s: S) -> Self {
965 match s.as_ref() {
966 "usersIFollow" => Self::UsersIFollow,
967 "everyone" => Self::Everyone,
968 _ => Self::Other(s),
969 }
970 }
971}
972
973impl<S: BosStr> core::fmt::Display for ProfileAssociatedGermShowButtonTo<S> {
974 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
975 write!(f, "{}", self.as_str())
976 }
977}
978
979impl<S: BosStr> AsRef<str> for ProfileAssociatedGermShowButtonTo<S> {
980 fn as_ref(&self) -> &str {
981 self.as_str()
982 }
983}
984
985impl<S: BosStr> Serialize for ProfileAssociatedGermShowButtonTo<S> {
986 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
987 where
988 Ser: serde::Serializer,
989 {
990 serializer.serialize_str(self.as_str())
991 }
992}
993
994impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ProfileAssociatedGermShowButtonTo<S> {
995 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
996 where
997 D: serde::Deserializer<'de>,
998 {
999 let s = S::deserialize(deserializer)?;
1000 Ok(Self::from_value(s))
1001 }
1002}
1003
1004impl<S: BosStr + Default> Default for ProfileAssociatedGermShowButtonTo<S> {
1005 fn default() -> Self {
1006 Self::Other(Default::default())
1007 }
1008}
1009
1010impl<S: BosStr> jacquard_common::IntoStatic for ProfileAssociatedGermShowButtonTo<S>
1011where
1012 S: BosStr + jacquard_common::IntoStatic,
1013 S::Output: BosStr,
1014{
1015 type Output = ProfileAssociatedGermShowButtonTo<S::Output>;
1016 fn into_static(self) -> Self::Output {
1017 match self {
1018 ProfileAssociatedGermShowButtonTo::UsersIFollow => {
1019 ProfileAssociatedGermShowButtonTo::UsersIFollow
1020 }
1021 ProfileAssociatedGermShowButtonTo::Everyone => {
1022 ProfileAssociatedGermShowButtonTo::Everyone
1023 }
1024 ProfileAssociatedGermShowButtonTo::Other(v) => {
1025 ProfileAssociatedGermShowButtonTo::Other(v.into_static())
1026 }
1027 }
1028 }
1029}
1030
1031#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1032#[serde(
1033 rename_all = "camelCase",
1034 bound(deserialize = "S: Deserialize<'de> + BosStr")
1035)]
1036pub struct ProfileView<S: BosStr = DefaultStr> {
1037 #[serde(skip_serializing_if = "Option::is_none")]
1038 pub associated: Option<actor::ProfileAssociated<S>>,
1039 #[serde(skip_serializing_if = "Option::is_none")]
1040 pub avatar: Option<UriValue<S>>,
1041 #[serde(skip_serializing_if = "Option::is_none")]
1042 pub created_at: Option<Datetime>,
1043 #[serde(skip_serializing_if = "Option::is_none")]
1045 pub debug: Option<Data<S>>,
1046 #[serde(skip_serializing_if = "Option::is_none")]
1047 pub description: Option<S>,
1048 pub did: Did<S>,
1049 #[serde(skip_serializing_if = "Option::is_none")]
1050 pub display_name: Option<S>,
1051 pub handle: Handle<S>,
1052 #[serde(skip_serializing_if = "Option::is_none")]
1053 pub indexed_at: Option<Datetime>,
1054 #[serde(skip_serializing_if = "Option::is_none")]
1055 pub labels: Option<Vec<Label<S>>>,
1056 #[serde(skip_serializing_if = "Option::is_none")]
1057 pub pronouns: Option<S>,
1058 #[serde(skip_serializing_if = "Option::is_none")]
1059 pub status: Option<actor::StatusView<S>>,
1060 #[serde(skip_serializing_if = "Option::is_none")]
1061 pub verification: Option<actor::VerificationState<S>>,
1062 #[serde(skip_serializing_if = "Option::is_none")]
1063 pub viewer: Option<actor::ViewerState<S>>,
1064 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1065 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1066}
1067
1068#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1069#[serde(
1070 rename_all = "camelCase",
1071 bound(deserialize = "S: Deserialize<'de> + BosStr")
1072)]
1073pub struct ProfileViewBasic<S: BosStr = DefaultStr> {
1074 #[serde(skip_serializing_if = "Option::is_none")]
1075 pub associated: Option<actor::ProfileAssociated<S>>,
1076 #[serde(skip_serializing_if = "Option::is_none")]
1077 pub avatar: Option<UriValue<S>>,
1078 #[serde(skip_serializing_if = "Option::is_none")]
1079 pub created_at: Option<Datetime>,
1080 #[serde(skip_serializing_if = "Option::is_none")]
1082 pub debug: Option<Data<S>>,
1083 pub did: Did<S>,
1084 #[serde(skip_serializing_if = "Option::is_none")]
1085 pub display_name: Option<S>,
1086 pub handle: Handle<S>,
1087 #[serde(skip_serializing_if = "Option::is_none")]
1088 pub labels: Option<Vec<Label<S>>>,
1089 #[serde(skip_serializing_if = "Option::is_none")]
1090 pub pronouns: Option<S>,
1091 #[serde(skip_serializing_if = "Option::is_none")]
1092 pub status: Option<actor::StatusView<S>>,
1093 #[serde(skip_serializing_if = "Option::is_none")]
1094 pub verification: Option<actor::VerificationState<S>>,
1095 #[serde(skip_serializing_if = "Option::is_none")]
1096 pub viewer: Option<actor::ViewerState<S>>,
1097 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1098 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1099}
1100
1101#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1102#[serde(
1103 rename_all = "camelCase",
1104 bound(deserialize = "S: Deserialize<'de> + BosStr")
1105)]
1106pub struct ProfileViewDetailed<S: BosStr = DefaultStr> {
1107 #[serde(skip_serializing_if = "Option::is_none")]
1108 pub associated: Option<actor::ProfileAssociated<S>>,
1109 #[serde(skip_serializing_if = "Option::is_none")]
1110 pub avatar: Option<UriValue<S>>,
1111 #[serde(skip_serializing_if = "Option::is_none")]
1112 pub banner: Option<UriValue<S>>,
1113 #[serde(skip_serializing_if = "Option::is_none")]
1114 pub created_at: Option<Datetime>,
1115 #[serde(skip_serializing_if = "Option::is_none")]
1117 pub debug: Option<Data<S>>,
1118 #[serde(skip_serializing_if = "Option::is_none")]
1119 pub description: Option<S>,
1120 pub did: Did<S>,
1121 #[serde(skip_serializing_if = "Option::is_none")]
1122 pub display_name: Option<S>,
1123 #[serde(skip_serializing_if = "Option::is_none")]
1124 pub followers_count: Option<i64>,
1125 #[serde(skip_serializing_if = "Option::is_none")]
1126 pub follows_count: Option<i64>,
1127 pub handle: Handle<S>,
1128 #[serde(skip_serializing_if = "Option::is_none")]
1129 pub indexed_at: Option<Datetime>,
1130 #[serde(skip_serializing_if = "Option::is_none")]
1131 pub joined_via_starter_pack: Option<StarterPackViewBasic<S>>,
1132 #[serde(skip_serializing_if = "Option::is_none")]
1133 pub labels: Option<Vec<Label<S>>>,
1134 #[serde(skip_serializing_if = "Option::is_none")]
1135 pub pinned_post: Option<StrongRef<S>>,
1136 #[serde(skip_serializing_if = "Option::is_none")]
1137 pub posts_count: Option<i64>,
1138 #[serde(skip_serializing_if = "Option::is_none")]
1139 pub pronouns: Option<S>,
1140 #[serde(skip_serializing_if = "Option::is_none")]
1141 pub status: Option<actor::StatusView<S>>,
1142 #[serde(skip_serializing_if = "Option::is_none")]
1143 pub verification: Option<actor::VerificationState<S>>,
1144 #[serde(skip_serializing_if = "Option::is_none")]
1145 pub viewer: Option<actor::ViewerState<S>>,
1146 #[serde(skip_serializing_if = "Option::is_none")]
1147 pub website: Option<UriValue<S>>,
1148 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1149 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1150}
1151
1152#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1153#[serde(
1154 rename_all = "camelCase",
1155 bound(deserialize = "S: Deserialize<'de> + BosStr")
1156)]
1157pub struct SavedFeed<S: BosStr = DefaultStr> {
1158 pub id: S,
1159 pub pinned: bool,
1160 pub r#type: SavedFeedType<S>,
1161 pub value: S,
1162 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1163 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1164}
1165
1166#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1167pub enum SavedFeedType<S: BosStr = DefaultStr> {
1168 Feed,
1169 List,
1170 Timeline,
1171 Other(S),
1172}
1173
1174impl<S: BosStr> SavedFeedType<S> {
1175 pub fn as_str(&self) -> &str {
1176 match self {
1177 Self::Feed => "feed",
1178 Self::List => "list",
1179 Self::Timeline => "timeline",
1180 Self::Other(s) => s.as_ref(),
1181 }
1182 }
1183 pub fn from_value(s: S) -> Self {
1185 match s.as_ref() {
1186 "feed" => Self::Feed,
1187 "list" => Self::List,
1188 "timeline" => Self::Timeline,
1189 _ => Self::Other(s),
1190 }
1191 }
1192}
1193
1194impl<S: BosStr> core::fmt::Display for SavedFeedType<S> {
1195 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1196 write!(f, "{}", self.as_str())
1197 }
1198}
1199
1200impl<S: BosStr> AsRef<str> for SavedFeedType<S> {
1201 fn as_ref(&self) -> &str {
1202 self.as_str()
1203 }
1204}
1205
1206impl<S: BosStr> Serialize for SavedFeedType<S> {
1207 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
1208 where
1209 Ser: serde::Serializer,
1210 {
1211 serializer.serialize_str(self.as_str())
1212 }
1213}
1214
1215impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for SavedFeedType<S> {
1216 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1217 where
1218 D: serde::Deserializer<'de>,
1219 {
1220 let s = S::deserialize(deserializer)?;
1221 Ok(Self::from_value(s))
1222 }
1223}
1224
1225impl<S: BosStr + Default> Default for SavedFeedType<S> {
1226 fn default() -> Self {
1227 Self::Other(Default::default())
1228 }
1229}
1230
1231impl<S: BosStr> jacquard_common::IntoStatic for SavedFeedType<S>
1232where
1233 S: BosStr + jacquard_common::IntoStatic,
1234 S::Output: BosStr,
1235{
1236 type Output = SavedFeedType<S::Output>;
1237 fn into_static(self) -> Self::Output {
1238 match self {
1239 SavedFeedType::Feed => SavedFeedType::Feed,
1240 SavedFeedType::List => SavedFeedType::List,
1241 SavedFeedType::Timeline => SavedFeedType::Timeline,
1242 SavedFeedType::Other(v) => SavedFeedType::Other(v.into_static()),
1243 }
1244 }
1245}
1246
1247#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1248#[serde(
1249 rename_all = "camelCase",
1250 bound(deserialize = "S: Deserialize<'de> + BosStr")
1251)]
1252pub struct SavedFeedsPref<S: BosStr = DefaultStr> {
1253 pub pinned: Vec<AtUri<S>>,
1254 pub saved: Vec<AtUri<S>>,
1255 #[serde(skip_serializing_if = "Option::is_none")]
1256 pub timeline_index: Option<i64>,
1257 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1258 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1259}
1260
1261#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1262#[serde(
1263 rename_all = "camelCase",
1264 bound(deserialize = "S: Deserialize<'de> + BosStr")
1265)]
1266pub struct SavedFeedsPrefV2<S: BosStr = DefaultStr> {
1267 pub items: Vec<actor::SavedFeed<S>>,
1268 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1269 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1270}
1271
1272#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1273#[serde(
1274 rename_all = "camelCase",
1275 bound(deserialize = "S: Deserialize<'de> + BosStr")
1276)]
1277pub struct StatusView<S: BosStr = DefaultStr> {
1278 #[serde(skip_serializing_if = "Option::is_none")]
1279 pub cid: Option<Cid<S>>,
1280 #[serde(skip_serializing_if = "Option::is_none")]
1282 pub embed: Option<View<S>>,
1283 #[serde(skip_serializing_if = "Option::is_none")]
1285 pub expires_at: Option<Datetime>,
1286 #[serde(skip_serializing_if = "Option::is_none")]
1288 pub is_active: Option<bool>,
1289 #[serde(skip_serializing_if = "Option::is_none")]
1291 pub is_disabled: Option<bool>,
1292 #[serde(skip_serializing_if = "Option::is_none")]
1293 pub labels: Option<Vec<Label<S>>>,
1294 pub record: Data<S>,
1295 pub status: StatusViewStatus<S>,
1297 #[serde(skip_serializing_if = "Option::is_none")]
1298 pub uri: Option<AtUri<S>>,
1299 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1300 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1301}
1302
1303#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1306pub enum StatusViewStatus<S: BosStr = DefaultStr> {
1307 Live,
1308 Other(S),
1309}
1310
1311impl<S: BosStr> StatusViewStatus<S> {
1312 pub fn as_str(&self) -> &str {
1313 match self {
1314 Self::Live => "app.bsky.actor.status#live",
1315 Self::Other(s) => s.as_ref(),
1316 }
1317 }
1318 pub fn from_value(s: S) -> Self {
1320 match s.as_ref() {
1321 "app.bsky.actor.status#live" => Self::Live,
1322 _ => Self::Other(s),
1323 }
1324 }
1325}
1326
1327impl<S: BosStr> core::fmt::Display for StatusViewStatus<S> {
1328 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1329 write!(f, "{}", self.as_str())
1330 }
1331}
1332
1333impl<S: BosStr> AsRef<str> for StatusViewStatus<S> {
1334 fn as_ref(&self) -> &str {
1335 self.as_str()
1336 }
1337}
1338
1339impl<S: BosStr> Serialize for StatusViewStatus<S> {
1340 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
1341 where
1342 Ser: serde::Serializer,
1343 {
1344 serializer.serialize_str(self.as_str())
1345 }
1346}
1347
1348impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for StatusViewStatus<S> {
1349 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1350 where
1351 D: serde::Deserializer<'de>,
1352 {
1353 let s = S::deserialize(deserializer)?;
1354 Ok(Self::from_value(s))
1355 }
1356}
1357
1358impl<S: BosStr + Default> Default for StatusViewStatus<S> {
1359 fn default() -> Self {
1360 Self::Other(Default::default())
1361 }
1362}
1363
1364impl<S: BosStr> jacquard_common::IntoStatic for StatusViewStatus<S>
1365where
1366 S: BosStr + jacquard_common::IntoStatic,
1367 S::Output: BosStr,
1368{
1369 type Output = StatusViewStatus<S::Output>;
1370 fn into_static(self) -> Self::Output {
1371 match self {
1372 StatusViewStatus::Live => StatusViewStatus::Live,
1373 StatusViewStatus::Other(v) => StatusViewStatus::Other(v.into_static()),
1374 }
1375 }
1376}
1377
1378#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
1379#[serde(
1380 rename_all = "camelCase",
1381 bound(deserialize = "S: Deserialize<'de> + BosStr")
1382)]
1383pub struct ThreadViewPref<S: BosStr = DefaultStr> {
1384 #[serde(skip_serializing_if = "Option::is_none")]
1386 pub sort: Option<ThreadViewPrefSort<S>>,
1387 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1388 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1389}
1390
1391#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1394pub enum ThreadViewPrefSort<S: BosStr = DefaultStr> {
1395 Oldest,
1396 Newest,
1397 MostLikes,
1398 Random,
1399 Hotness,
1400 Other(S),
1401}
1402
1403impl<S: BosStr> ThreadViewPrefSort<S> {
1404 pub fn as_str(&self) -> &str {
1405 match self {
1406 Self::Oldest => "oldest",
1407 Self::Newest => "newest",
1408 Self::MostLikes => "most-likes",
1409 Self::Random => "random",
1410 Self::Hotness => "hotness",
1411 Self::Other(s) => s.as_ref(),
1412 }
1413 }
1414 pub fn from_value(s: S) -> Self {
1416 match s.as_ref() {
1417 "oldest" => Self::Oldest,
1418 "newest" => Self::Newest,
1419 "most-likes" => Self::MostLikes,
1420 "random" => Self::Random,
1421 "hotness" => Self::Hotness,
1422 _ => Self::Other(s),
1423 }
1424 }
1425}
1426
1427impl<S: BosStr> core::fmt::Display for ThreadViewPrefSort<S> {
1428 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1429 write!(f, "{}", self.as_str())
1430 }
1431}
1432
1433impl<S: BosStr> AsRef<str> for ThreadViewPrefSort<S> {
1434 fn as_ref(&self) -> &str {
1435 self.as_str()
1436 }
1437}
1438
1439impl<S: BosStr> Serialize for ThreadViewPrefSort<S> {
1440 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
1441 where
1442 Ser: serde::Serializer,
1443 {
1444 serializer.serialize_str(self.as_str())
1445 }
1446}
1447
1448impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ThreadViewPrefSort<S> {
1449 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1450 where
1451 D: serde::Deserializer<'de>,
1452 {
1453 let s = S::deserialize(deserializer)?;
1454 Ok(Self::from_value(s))
1455 }
1456}
1457
1458impl<S: BosStr + Default> Default for ThreadViewPrefSort<S> {
1459 fn default() -> Self {
1460 Self::Other(Default::default())
1461 }
1462}
1463
1464impl<S: BosStr> jacquard_common::IntoStatic for ThreadViewPrefSort<S>
1465where
1466 S: BosStr + jacquard_common::IntoStatic,
1467 S::Output: BosStr,
1468{
1469 type Output = ThreadViewPrefSort<S::Output>;
1470 fn into_static(self) -> Self::Output {
1471 match self {
1472 ThreadViewPrefSort::Oldest => ThreadViewPrefSort::Oldest,
1473 ThreadViewPrefSort::Newest => ThreadViewPrefSort::Newest,
1474 ThreadViewPrefSort::MostLikes => ThreadViewPrefSort::MostLikes,
1475 ThreadViewPrefSort::Random => ThreadViewPrefSort::Random,
1476 ThreadViewPrefSort::Hotness => ThreadViewPrefSort::Hotness,
1477 ThreadViewPrefSort::Other(v) => ThreadViewPrefSort::Other(v.into_static()),
1478 }
1479 }
1480}
1481
1482#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1485#[serde(
1486 rename_all = "camelCase",
1487 bound(deserialize = "S: Deserialize<'de> + BosStr")
1488)]
1489pub struct VerificationPrefs<S: BosStr = DefaultStr> {
1490 #[serde(skip_serializing_if = "Option::is_none")]
1492 #[serde(default = "_default_verification_prefs_hide_badges")]
1493 pub hide_badges: Option<bool>,
1494 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1495 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1496}
1497
1498#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1501#[serde(
1502 rename_all = "camelCase",
1503 bound(deserialize = "S: Deserialize<'de> + BosStr")
1504)]
1505pub struct VerificationState<S: BosStr = DefaultStr> {
1506 pub trusted_verifier_status: VerificationStateTrustedVerifierStatus<S>,
1508 pub verifications: Vec<actor::VerificationView<S>>,
1510 pub verified_status: VerificationStateVerifiedStatus<S>,
1512 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1513 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1514}
1515
1516#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1519pub enum VerificationStateTrustedVerifierStatus<S: BosStr = DefaultStr> {
1520 Valid,
1521 Invalid,
1522 None,
1523 Other(S),
1524}
1525
1526impl<S: BosStr> VerificationStateTrustedVerifierStatus<S> {
1527 pub fn as_str(&self) -> &str {
1528 match self {
1529 Self::Valid => "valid",
1530 Self::Invalid => "invalid",
1531 Self::None => "none",
1532 Self::Other(s) => s.as_ref(),
1533 }
1534 }
1535 pub fn from_value(s: S) -> Self {
1537 match s.as_ref() {
1538 "valid" => Self::Valid,
1539 "invalid" => Self::Invalid,
1540 "none" => Self::None,
1541 _ => Self::Other(s),
1542 }
1543 }
1544}
1545
1546impl<S: BosStr> core::fmt::Display for VerificationStateTrustedVerifierStatus<S> {
1547 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1548 write!(f, "{}", self.as_str())
1549 }
1550}
1551
1552impl<S: BosStr> AsRef<str> for VerificationStateTrustedVerifierStatus<S> {
1553 fn as_ref(&self) -> &str {
1554 self.as_str()
1555 }
1556}
1557
1558impl<S: BosStr> Serialize for VerificationStateTrustedVerifierStatus<S> {
1559 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
1560 where
1561 Ser: serde::Serializer,
1562 {
1563 serializer.serialize_str(self.as_str())
1564 }
1565}
1566
1567impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de>
1568 for VerificationStateTrustedVerifierStatus<S>
1569{
1570 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1571 where
1572 D: serde::Deserializer<'de>,
1573 {
1574 let s = S::deserialize(deserializer)?;
1575 Ok(Self::from_value(s))
1576 }
1577}
1578
1579impl<S: BosStr + Default> Default for VerificationStateTrustedVerifierStatus<S> {
1580 fn default() -> Self {
1581 Self::Other(Default::default())
1582 }
1583}
1584
1585impl<S: BosStr> jacquard_common::IntoStatic for VerificationStateTrustedVerifierStatus<S>
1586where
1587 S: BosStr + jacquard_common::IntoStatic,
1588 S::Output: BosStr,
1589{
1590 type Output = VerificationStateTrustedVerifierStatus<S::Output>;
1591 fn into_static(self) -> Self::Output {
1592 match self {
1593 VerificationStateTrustedVerifierStatus::Valid => {
1594 VerificationStateTrustedVerifierStatus::Valid
1595 }
1596 VerificationStateTrustedVerifierStatus::Invalid => {
1597 VerificationStateTrustedVerifierStatus::Invalid
1598 }
1599 VerificationStateTrustedVerifierStatus::None => {
1600 VerificationStateTrustedVerifierStatus::None
1601 }
1602 VerificationStateTrustedVerifierStatus::Other(v) => {
1603 VerificationStateTrustedVerifierStatus::Other(v.into_static())
1604 }
1605 }
1606 }
1607}
1608
1609#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1612pub enum VerificationStateVerifiedStatus<S: BosStr = DefaultStr> {
1613 Valid,
1614 Invalid,
1615 None,
1616 Other(S),
1617}
1618
1619impl<S: BosStr> VerificationStateVerifiedStatus<S> {
1620 pub fn as_str(&self) -> &str {
1621 match self {
1622 Self::Valid => "valid",
1623 Self::Invalid => "invalid",
1624 Self::None => "none",
1625 Self::Other(s) => s.as_ref(),
1626 }
1627 }
1628 pub fn from_value(s: S) -> Self {
1630 match s.as_ref() {
1631 "valid" => Self::Valid,
1632 "invalid" => Self::Invalid,
1633 "none" => Self::None,
1634 _ => Self::Other(s),
1635 }
1636 }
1637}
1638
1639impl<S: BosStr> core::fmt::Display for VerificationStateVerifiedStatus<S> {
1640 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1641 write!(f, "{}", self.as_str())
1642 }
1643}
1644
1645impl<S: BosStr> AsRef<str> for VerificationStateVerifiedStatus<S> {
1646 fn as_ref(&self) -> &str {
1647 self.as_str()
1648 }
1649}
1650
1651impl<S: BosStr> Serialize for VerificationStateVerifiedStatus<S> {
1652 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
1653 where
1654 Ser: serde::Serializer,
1655 {
1656 serializer.serialize_str(self.as_str())
1657 }
1658}
1659
1660impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for VerificationStateVerifiedStatus<S> {
1661 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1662 where
1663 D: serde::Deserializer<'de>,
1664 {
1665 let s = S::deserialize(deserializer)?;
1666 Ok(Self::from_value(s))
1667 }
1668}
1669
1670impl<S: BosStr + Default> Default for VerificationStateVerifiedStatus<S> {
1671 fn default() -> Self {
1672 Self::Other(Default::default())
1673 }
1674}
1675
1676impl<S: BosStr> jacquard_common::IntoStatic for VerificationStateVerifiedStatus<S>
1677where
1678 S: BosStr + jacquard_common::IntoStatic,
1679 S::Output: BosStr,
1680{
1681 type Output = VerificationStateVerifiedStatus<S::Output>;
1682 fn into_static(self) -> Self::Output {
1683 match self {
1684 VerificationStateVerifiedStatus::Valid => VerificationStateVerifiedStatus::Valid,
1685 VerificationStateVerifiedStatus::Invalid => VerificationStateVerifiedStatus::Invalid,
1686 VerificationStateVerifiedStatus::None => VerificationStateVerifiedStatus::None,
1687 VerificationStateVerifiedStatus::Other(v) => {
1688 VerificationStateVerifiedStatus::Other(v.into_static())
1689 }
1690 }
1691 }
1692}
1693
1694#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1697#[serde(
1698 rename_all = "camelCase",
1699 bound(deserialize = "S: Deserialize<'de> + BosStr")
1700)]
1701pub struct VerificationView<S: BosStr = DefaultStr> {
1702 pub created_at: Datetime,
1704 pub is_valid: bool,
1706 pub issuer: Did<S>,
1708 #[serde(skip_serializing_if = "Option::is_none")]
1710 pub issuer_display_name: Option<S>,
1711 #[serde(skip_serializing_if = "Option::is_none")]
1713 pub issuer_handle: Option<Handle<S>>,
1714 pub uri: AtUri<S>,
1716 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1717 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1718}
1719
1720#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
1723#[serde(
1724 rename_all = "camelCase",
1725 bound(deserialize = "S: Deserialize<'de> + BosStr")
1726)]
1727pub struct ViewerState<S: BosStr = DefaultStr> {
1728 #[serde(skip_serializing_if = "Option::is_none")]
1730 pub activity_subscription: Option<ActivitySubscription<S>>,
1731 #[serde(skip_serializing_if = "Option::is_none")]
1732 pub blocked_by: Option<bool>,
1733 #[serde(skip_serializing_if = "Option::is_none")]
1734 pub blocking: Option<AtUri<S>>,
1735 #[serde(skip_serializing_if = "Option::is_none")]
1736 pub blocking_by_list: Option<ListViewBasic<S>>,
1737 #[serde(skip_serializing_if = "Option::is_none")]
1738 pub followed_by: Option<AtUri<S>>,
1739 #[serde(skip_serializing_if = "Option::is_none")]
1740 pub following: Option<AtUri<S>>,
1741 #[serde(skip_serializing_if = "Option::is_none")]
1743 pub known_followers: Option<actor::KnownFollowers<S>>,
1744 #[serde(skip_serializing_if = "Option::is_none")]
1745 pub muted: Option<bool>,
1746 #[serde(skip_serializing_if = "Option::is_none")]
1747 pub muted_by_list: Option<ListViewBasic<S>>,
1748 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1749 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1750}
1751
1752impl<S: BosStr> LexiconSchema for AdultContentPref<S> {
1753 fn nsid() -> &'static str {
1754 "app.bsky.actor.defs"
1755 }
1756 fn def_name() -> &'static str {
1757 "adultContentPref"
1758 }
1759 fn lexicon_doc() -> LexiconDoc<'static> {
1760 lexicon_doc_app_bsky_actor_defs()
1761 }
1762 fn validate(&self) -> Result<(), ConstraintError> {
1763 Ok(())
1764 }
1765}
1766
1767impl<S: BosStr> LexiconSchema for BskyAppProgressGuide<S> {
1768 fn nsid() -> &'static str {
1769 "app.bsky.actor.defs"
1770 }
1771 fn def_name() -> &'static str {
1772 "bskyAppProgressGuide"
1773 }
1774 fn lexicon_doc() -> LexiconDoc<'static> {
1775 lexicon_doc_app_bsky_actor_defs()
1776 }
1777 fn validate(&self) -> Result<(), ConstraintError> {
1778 {
1779 let value = &self.guide;
1780 #[allow(unused_comparisons)]
1781 if <str>::len(value.as_ref()) > 100usize {
1782 return Err(ConstraintError::MaxLength {
1783 path: ValidationPath::from_field("guide"),
1784 max: 100usize,
1785 actual: <str>::len(value.as_ref()),
1786 });
1787 }
1788 }
1789 Ok(())
1790 }
1791}
1792
1793impl<S: BosStr> LexiconSchema for BskyAppStatePref<S> {
1794 fn nsid() -> &'static str {
1795 "app.bsky.actor.defs"
1796 }
1797 fn def_name() -> &'static str {
1798 "bskyAppStatePref"
1799 }
1800 fn lexicon_doc() -> LexiconDoc<'static> {
1801 lexicon_doc_app_bsky_actor_defs()
1802 }
1803 fn validate(&self) -> Result<(), ConstraintError> {
1804 if let Some(ref value) = self.nuxs {
1805 #[allow(unused_comparisons)]
1806 if value.len() > 100usize {
1807 return Err(ConstraintError::MaxLength {
1808 path: ValidationPath::from_field("nuxs"),
1809 max: 100usize,
1810 actual: value.len(),
1811 });
1812 }
1813 }
1814 if let Some(ref value) = self.queued_nudges {
1815 #[allow(unused_comparisons)]
1816 if value.len() > 1000usize {
1817 return Err(ConstraintError::MaxLength {
1818 path: ValidationPath::from_field("queued_nudges"),
1819 max: 1000usize,
1820 actual: value.len(),
1821 });
1822 }
1823 }
1824 Ok(())
1825 }
1826}
1827
1828impl<S: BosStr> LexiconSchema for ContentLabelPref<S> {
1829 fn nsid() -> &'static str {
1830 "app.bsky.actor.defs"
1831 }
1832 fn def_name() -> &'static str {
1833 "contentLabelPref"
1834 }
1835 fn lexicon_doc() -> LexiconDoc<'static> {
1836 lexicon_doc_app_bsky_actor_defs()
1837 }
1838 fn validate(&self) -> Result<(), ConstraintError> {
1839 Ok(())
1840 }
1841}
1842
1843impl<S: BosStr> LexiconSchema for DeclaredAgePref<S> {
1844 fn nsid() -> &'static str {
1845 "app.bsky.actor.defs"
1846 }
1847 fn def_name() -> &'static str {
1848 "declaredAgePref"
1849 }
1850 fn lexicon_doc() -> LexiconDoc<'static> {
1851 lexicon_doc_app_bsky_actor_defs()
1852 }
1853 fn validate(&self) -> Result<(), ConstraintError> {
1854 Ok(())
1855 }
1856}
1857
1858impl<S: BosStr> LexiconSchema for FeedViewPref<S> {
1859 fn nsid() -> &'static str {
1860 "app.bsky.actor.defs"
1861 }
1862 fn def_name() -> &'static str {
1863 "feedViewPref"
1864 }
1865 fn lexicon_doc() -> LexiconDoc<'static> {
1866 lexicon_doc_app_bsky_actor_defs()
1867 }
1868 fn validate(&self) -> Result<(), ConstraintError> {
1869 Ok(())
1870 }
1871}
1872
1873impl<S: BosStr> LexiconSchema for HiddenPostsPref<S> {
1874 fn nsid() -> &'static str {
1875 "app.bsky.actor.defs"
1876 }
1877 fn def_name() -> &'static str {
1878 "hiddenPostsPref"
1879 }
1880 fn lexicon_doc() -> LexiconDoc<'static> {
1881 lexicon_doc_app_bsky_actor_defs()
1882 }
1883 fn validate(&self) -> Result<(), ConstraintError> {
1884 Ok(())
1885 }
1886}
1887
1888impl<S: BosStr> LexiconSchema for InterestsPref<S> {
1889 fn nsid() -> &'static str {
1890 "app.bsky.actor.defs"
1891 }
1892 fn def_name() -> &'static str {
1893 "interestsPref"
1894 }
1895 fn lexicon_doc() -> LexiconDoc<'static> {
1896 lexicon_doc_app_bsky_actor_defs()
1897 }
1898 fn validate(&self) -> Result<(), ConstraintError> {
1899 {
1900 let value = &self.tags;
1901 #[allow(unused_comparisons)]
1902 if value.len() > 100usize {
1903 return Err(ConstraintError::MaxLength {
1904 path: ValidationPath::from_field("tags"),
1905 max: 100usize,
1906 actual: value.len(),
1907 });
1908 }
1909 }
1910 Ok(())
1911 }
1912}
1913
1914impl<S: BosStr> LexiconSchema for KnownFollowers<S> {
1915 fn nsid() -> &'static str {
1916 "app.bsky.actor.defs"
1917 }
1918 fn def_name() -> &'static str {
1919 "knownFollowers"
1920 }
1921 fn lexicon_doc() -> LexiconDoc<'static> {
1922 lexicon_doc_app_bsky_actor_defs()
1923 }
1924 fn validate(&self) -> Result<(), ConstraintError> {
1925 {
1926 let value = &self.followers;
1927 #[allow(unused_comparisons)]
1928 if value.len() > 5usize {
1929 return Err(ConstraintError::MaxLength {
1930 path: ValidationPath::from_field("followers"),
1931 max: 5usize,
1932 actual: value.len(),
1933 });
1934 }
1935 }
1936 {
1937 let value = &self.followers;
1938 #[allow(unused_comparisons)]
1939 if value.len() < 0usize {
1940 return Err(ConstraintError::MinLength {
1941 path: ValidationPath::from_field("followers"),
1942 min: 0usize,
1943 actual: value.len(),
1944 });
1945 }
1946 }
1947 Ok(())
1948 }
1949}
1950
1951impl<S: BosStr> LexiconSchema for LabelerPrefItem<S> {
1952 fn nsid() -> &'static str {
1953 "app.bsky.actor.defs"
1954 }
1955 fn def_name() -> &'static str {
1956 "labelerPrefItem"
1957 }
1958 fn lexicon_doc() -> LexiconDoc<'static> {
1959 lexicon_doc_app_bsky_actor_defs()
1960 }
1961 fn validate(&self) -> Result<(), ConstraintError> {
1962 Ok(())
1963 }
1964}
1965
1966impl<S: BosStr> LexiconSchema for LabelersPref<S> {
1967 fn nsid() -> &'static str {
1968 "app.bsky.actor.defs"
1969 }
1970 fn def_name() -> &'static str {
1971 "labelersPref"
1972 }
1973 fn lexicon_doc() -> LexiconDoc<'static> {
1974 lexicon_doc_app_bsky_actor_defs()
1975 }
1976 fn validate(&self) -> Result<(), ConstraintError> {
1977 Ok(())
1978 }
1979}
1980
1981impl<S: BosStr> LexiconSchema for LiveEventPreferences<S> {
1982 fn nsid() -> &'static str {
1983 "app.bsky.actor.defs"
1984 }
1985 fn def_name() -> &'static str {
1986 "liveEventPreferences"
1987 }
1988 fn lexicon_doc() -> LexiconDoc<'static> {
1989 lexicon_doc_app_bsky_actor_defs()
1990 }
1991 fn validate(&self) -> Result<(), ConstraintError> {
1992 Ok(())
1993 }
1994}
1995
1996impl<S: BosStr> LexiconSchema for MutedWord<S> {
1997 fn nsid() -> &'static str {
1998 "app.bsky.actor.defs"
1999 }
2000 fn def_name() -> &'static str {
2001 "mutedWord"
2002 }
2003 fn lexicon_doc() -> LexiconDoc<'static> {
2004 lexicon_doc_app_bsky_actor_defs()
2005 }
2006 fn validate(&self) -> Result<(), ConstraintError> {
2007 {
2008 let value = &self.value;
2009 #[allow(unused_comparisons)]
2010 if <str>::len(value.as_ref()) > 10000usize {
2011 return Err(ConstraintError::MaxLength {
2012 path: ValidationPath::from_field("value"),
2013 max: 10000usize,
2014 actual: <str>::len(value.as_ref()),
2015 });
2016 }
2017 }
2018 {
2019 let value = &self.value;
2020 {
2021 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
2022 if count > 1000usize {
2023 return Err(ConstraintError::MaxGraphemes {
2024 path: ValidationPath::from_field("value"),
2025 max: 1000usize,
2026 actual: count,
2027 });
2028 }
2029 }
2030 }
2031 Ok(())
2032 }
2033}
2034
2035impl<S: BosStr> LexiconSchema for MutedWordsPref<S> {
2036 fn nsid() -> &'static str {
2037 "app.bsky.actor.defs"
2038 }
2039 fn def_name() -> &'static str {
2040 "mutedWordsPref"
2041 }
2042 fn lexicon_doc() -> LexiconDoc<'static> {
2043 lexicon_doc_app_bsky_actor_defs()
2044 }
2045 fn validate(&self) -> Result<(), ConstraintError> {
2046 Ok(())
2047 }
2048}
2049
2050impl<S: BosStr> LexiconSchema for Nux<S> {
2051 fn nsid() -> &'static str {
2052 "app.bsky.actor.defs"
2053 }
2054 fn def_name() -> &'static str {
2055 "nux"
2056 }
2057 fn lexicon_doc() -> LexiconDoc<'static> {
2058 lexicon_doc_app_bsky_actor_defs()
2059 }
2060 fn validate(&self) -> Result<(), ConstraintError> {
2061 if let Some(ref value) = self.data {
2062 #[allow(unused_comparisons)]
2063 if <str>::len(value.as_ref()) > 3000usize {
2064 return Err(ConstraintError::MaxLength {
2065 path: ValidationPath::from_field("data"),
2066 max: 3000usize,
2067 actual: <str>::len(value.as_ref()),
2068 });
2069 }
2070 }
2071 if let Some(ref value) = self.data {
2072 {
2073 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
2074 if count > 300usize {
2075 return Err(ConstraintError::MaxGraphemes {
2076 path: ValidationPath::from_field("data"),
2077 max: 300usize,
2078 actual: count,
2079 });
2080 }
2081 }
2082 }
2083 {
2084 let value = &self.id;
2085 #[allow(unused_comparisons)]
2086 if <str>::len(value.as_ref()) > 100usize {
2087 return Err(ConstraintError::MaxLength {
2088 path: ValidationPath::from_field("id"),
2089 max: 100usize,
2090 actual: <str>::len(value.as_ref()),
2091 });
2092 }
2093 }
2094 Ok(())
2095 }
2096}
2097
2098impl<S: BosStr> LexiconSchema for PersonalDetailsPref<S> {
2099 fn nsid() -> &'static str {
2100 "app.bsky.actor.defs"
2101 }
2102 fn def_name() -> &'static str {
2103 "personalDetailsPref"
2104 }
2105 fn lexicon_doc() -> LexiconDoc<'static> {
2106 lexicon_doc_app_bsky_actor_defs()
2107 }
2108 fn validate(&self) -> Result<(), ConstraintError> {
2109 Ok(())
2110 }
2111}
2112
2113impl<S: BosStr> LexiconSchema for PostInteractionSettingsPref<S> {
2114 fn nsid() -> &'static str {
2115 "app.bsky.actor.defs"
2116 }
2117 fn def_name() -> &'static str {
2118 "postInteractionSettingsPref"
2119 }
2120 fn lexicon_doc() -> LexiconDoc<'static> {
2121 lexicon_doc_app_bsky_actor_defs()
2122 }
2123 fn validate(&self) -> Result<(), ConstraintError> {
2124 if let Some(ref value) = self.postgate_embedding_rules {
2125 #[allow(unused_comparisons)]
2126 if value.len() > 5usize {
2127 return Err(ConstraintError::MaxLength {
2128 path: ValidationPath::from_field("postgate_embedding_rules"),
2129 max: 5usize,
2130 actual: value.len(),
2131 });
2132 }
2133 }
2134 if let Some(ref value) = self.threadgate_allow_rules {
2135 #[allow(unused_comparisons)]
2136 if value.len() > 5usize {
2137 return Err(ConstraintError::MaxLength {
2138 path: ValidationPath::from_field("threadgate_allow_rules"),
2139 max: 5usize,
2140 actual: value.len(),
2141 });
2142 }
2143 }
2144 Ok(())
2145 }
2146}
2147
2148impl<S: BosStr> LexiconSchema for ProfileAssociated<S> {
2149 fn nsid() -> &'static str {
2150 "app.bsky.actor.defs"
2151 }
2152 fn def_name() -> &'static str {
2153 "profileAssociated"
2154 }
2155 fn lexicon_doc() -> LexiconDoc<'static> {
2156 lexicon_doc_app_bsky_actor_defs()
2157 }
2158 fn validate(&self) -> Result<(), ConstraintError> {
2159 Ok(())
2160 }
2161}
2162
2163impl<S: BosStr> LexiconSchema for ProfileAssociatedActivitySubscription<S> {
2164 fn nsid() -> &'static str {
2165 "app.bsky.actor.defs"
2166 }
2167 fn def_name() -> &'static str {
2168 "profileAssociatedActivitySubscription"
2169 }
2170 fn lexicon_doc() -> LexiconDoc<'static> {
2171 lexicon_doc_app_bsky_actor_defs()
2172 }
2173 fn validate(&self) -> Result<(), ConstraintError> {
2174 Ok(())
2175 }
2176}
2177
2178impl<S: BosStr> LexiconSchema for ProfileAssociatedChat<S> {
2179 fn nsid() -> &'static str {
2180 "app.bsky.actor.defs"
2181 }
2182 fn def_name() -> &'static str {
2183 "profileAssociatedChat"
2184 }
2185 fn lexicon_doc() -> LexiconDoc<'static> {
2186 lexicon_doc_app_bsky_actor_defs()
2187 }
2188 fn validate(&self) -> Result<(), ConstraintError> {
2189 Ok(())
2190 }
2191}
2192
2193impl<S: BosStr> LexiconSchema for ProfileAssociatedGerm<S> {
2194 fn nsid() -> &'static str {
2195 "app.bsky.actor.defs"
2196 }
2197 fn def_name() -> &'static str {
2198 "profileAssociatedGerm"
2199 }
2200 fn lexicon_doc() -> LexiconDoc<'static> {
2201 lexicon_doc_app_bsky_actor_defs()
2202 }
2203 fn validate(&self) -> Result<(), ConstraintError> {
2204 Ok(())
2205 }
2206}
2207
2208impl<S: BosStr> LexiconSchema for ProfileView<S> {
2209 fn nsid() -> &'static str {
2210 "app.bsky.actor.defs"
2211 }
2212 fn def_name() -> &'static str {
2213 "profileView"
2214 }
2215 fn lexicon_doc() -> LexiconDoc<'static> {
2216 lexicon_doc_app_bsky_actor_defs()
2217 }
2218 fn validate(&self) -> Result<(), ConstraintError> {
2219 if let Some(ref value) = self.description {
2220 #[allow(unused_comparisons)]
2221 if <str>::len(value.as_ref()) > 2560usize {
2222 return Err(ConstraintError::MaxLength {
2223 path: ValidationPath::from_field("description"),
2224 max: 2560usize,
2225 actual: <str>::len(value.as_ref()),
2226 });
2227 }
2228 }
2229 if let Some(ref value) = self.description {
2230 {
2231 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
2232 if count > 256usize {
2233 return Err(ConstraintError::MaxGraphemes {
2234 path: ValidationPath::from_field("description"),
2235 max: 256usize,
2236 actual: count,
2237 });
2238 }
2239 }
2240 }
2241 if let Some(ref value) = self.display_name {
2242 #[allow(unused_comparisons)]
2243 if <str>::len(value.as_ref()) > 640usize {
2244 return Err(ConstraintError::MaxLength {
2245 path: ValidationPath::from_field("display_name"),
2246 max: 640usize,
2247 actual: <str>::len(value.as_ref()),
2248 });
2249 }
2250 }
2251 if let Some(ref value) = self.display_name {
2252 {
2253 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
2254 if count > 64usize {
2255 return Err(ConstraintError::MaxGraphemes {
2256 path: ValidationPath::from_field("display_name"),
2257 max: 64usize,
2258 actual: count,
2259 });
2260 }
2261 }
2262 }
2263 Ok(())
2264 }
2265}
2266
2267impl<S: BosStr> LexiconSchema for ProfileViewBasic<S> {
2268 fn nsid() -> &'static str {
2269 "app.bsky.actor.defs"
2270 }
2271 fn def_name() -> &'static str {
2272 "profileViewBasic"
2273 }
2274 fn lexicon_doc() -> LexiconDoc<'static> {
2275 lexicon_doc_app_bsky_actor_defs()
2276 }
2277 fn validate(&self) -> Result<(), ConstraintError> {
2278 if let Some(ref value) = self.display_name {
2279 #[allow(unused_comparisons)]
2280 if <str>::len(value.as_ref()) > 640usize {
2281 return Err(ConstraintError::MaxLength {
2282 path: ValidationPath::from_field("display_name"),
2283 max: 640usize,
2284 actual: <str>::len(value.as_ref()),
2285 });
2286 }
2287 }
2288 if let Some(ref value) = self.display_name {
2289 {
2290 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
2291 if count > 64usize {
2292 return Err(ConstraintError::MaxGraphemes {
2293 path: ValidationPath::from_field("display_name"),
2294 max: 64usize,
2295 actual: count,
2296 });
2297 }
2298 }
2299 }
2300 Ok(())
2301 }
2302}
2303
2304impl<S: BosStr> LexiconSchema for ProfileViewDetailed<S> {
2305 fn nsid() -> &'static str {
2306 "app.bsky.actor.defs"
2307 }
2308 fn def_name() -> &'static str {
2309 "profileViewDetailed"
2310 }
2311 fn lexicon_doc() -> LexiconDoc<'static> {
2312 lexicon_doc_app_bsky_actor_defs()
2313 }
2314 fn validate(&self) -> Result<(), ConstraintError> {
2315 if let Some(ref value) = self.description {
2316 #[allow(unused_comparisons)]
2317 if <str>::len(value.as_ref()) > 2560usize {
2318 return Err(ConstraintError::MaxLength {
2319 path: ValidationPath::from_field("description"),
2320 max: 2560usize,
2321 actual: <str>::len(value.as_ref()),
2322 });
2323 }
2324 }
2325 if let Some(ref value) = self.description {
2326 {
2327 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
2328 if count > 256usize {
2329 return Err(ConstraintError::MaxGraphemes {
2330 path: ValidationPath::from_field("description"),
2331 max: 256usize,
2332 actual: count,
2333 });
2334 }
2335 }
2336 }
2337 if let Some(ref value) = self.display_name {
2338 #[allow(unused_comparisons)]
2339 if <str>::len(value.as_ref()) > 640usize {
2340 return Err(ConstraintError::MaxLength {
2341 path: ValidationPath::from_field("display_name"),
2342 max: 640usize,
2343 actual: <str>::len(value.as_ref()),
2344 });
2345 }
2346 }
2347 if let Some(ref value) = self.display_name {
2348 {
2349 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
2350 if count > 64usize {
2351 return Err(ConstraintError::MaxGraphemes {
2352 path: ValidationPath::from_field("display_name"),
2353 max: 64usize,
2354 actual: count,
2355 });
2356 }
2357 }
2358 }
2359 Ok(())
2360 }
2361}
2362
2363impl<S: BosStr> LexiconSchema for SavedFeed<S> {
2364 fn nsid() -> &'static str {
2365 "app.bsky.actor.defs"
2366 }
2367 fn def_name() -> &'static str {
2368 "savedFeed"
2369 }
2370 fn lexicon_doc() -> LexiconDoc<'static> {
2371 lexicon_doc_app_bsky_actor_defs()
2372 }
2373 fn validate(&self) -> Result<(), ConstraintError> {
2374 Ok(())
2375 }
2376}
2377
2378impl<S: BosStr> LexiconSchema for SavedFeedsPref<S> {
2379 fn nsid() -> &'static str {
2380 "app.bsky.actor.defs"
2381 }
2382 fn def_name() -> &'static str {
2383 "savedFeedsPref"
2384 }
2385 fn lexicon_doc() -> LexiconDoc<'static> {
2386 lexicon_doc_app_bsky_actor_defs()
2387 }
2388 fn validate(&self) -> Result<(), ConstraintError> {
2389 Ok(())
2390 }
2391}
2392
2393impl<S: BosStr> LexiconSchema for SavedFeedsPrefV2<S> {
2394 fn nsid() -> &'static str {
2395 "app.bsky.actor.defs"
2396 }
2397 fn def_name() -> &'static str {
2398 "savedFeedsPrefV2"
2399 }
2400 fn lexicon_doc() -> LexiconDoc<'static> {
2401 lexicon_doc_app_bsky_actor_defs()
2402 }
2403 fn validate(&self) -> Result<(), ConstraintError> {
2404 Ok(())
2405 }
2406}
2407
2408impl<S: BosStr> LexiconSchema for StatusView<S> {
2409 fn nsid() -> &'static str {
2410 "app.bsky.actor.defs"
2411 }
2412 fn def_name() -> &'static str {
2413 "statusView"
2414 }
2415 fn lexicon_doc() -> LexiconDoc<'static> {
2416 lexicon_doc_app_bsky_actor_defs()
2417 }
2418 fn validate(&self) -> Result<(), ConstraintError> {
2419 Ok(())
2420 }
2421}
2422
2423impl<S: BosStr> LexiconSchema for ThreadViewPref<S> {
2424 fn nsid() -> &'static str {
2425 "app.bsky.actor.defs"
2426 }
2427 fn def_name() -> &'static str {
2428 "threadViewPref"
2429 }
2430 fn lexicon_doc() -> LexiconDoc<'static> {
2431 lexicon_doc_app_bsky_actor_defs()
2432 }
2433 fn validate(&self) -> Result<(), ConstraintError> {
2434 Ok(())
2435 }
2436}
2437
2438impl<S: BosStr> LexiconSchema for VerificationPrefs<S> {
2439 fn nsid() -> &'static str {
2440 "app.bsky.actor.defs"
2441 }
2442 fn def_name() -> &'static str {
2443 "verificationPrefs"
2444 }
2445 fn lexicon_doc() -> LexiconDoc<'static> {
2446 lexicon_doc_app_bsky_actor_defs()
2447 }
2448 fn validate(&self) -> Result<(), ConstraintError> {
2449 Ok(())
2450 }
2451}
2452
2453impl<S: BosStr> LexiconSchema for VerificationState<S> {
2454 fn nsid() -> &'static str {
2455 "app.bsky.actor.defs"
2456 }
2457 fn def_name() -> &'static str {
2458 "verificationState"
2459 }
2460 fn lexicon_doc() -> LexiconDoc<'static> {
2461 lexicon_doc_app_bsky_actor_defs()
2462 }
2463 fn validate(&self) -> Result<(), ConstraintError> {
2464 Ok(())
2465 }
2466}
2467
2468impl<S: BosStr> LexiconSchema for VerificationView<S> {
2469 fn nsid() -> &'static str {
2470 "app.bsky.actor.defs"
2471 }
2472 fn def_name() -> &'static str {
2473 "verificationView"
2474 }
2475 fn lexicon_doc() -> LexiconDoc<'static> {
2476 lexicon_doc_app_bsky_actor_defs()
2477 }
2478 fn validate(&self) -> Result<(), ConstraintError> {
2479 Ok(())
2480 }
2481}
2482
2483impl<S: BosStr> LexiconSchema for ViewerState<S> {
2484 fn nsid() -> &'static str {
2485 "app.bsky.actor.defs"
2486 }
2487 fn def_name() -> &'static str {
2488 "viewerState"
2489 }
2490 fn lexicon_doc() -> LexiconDoc<'static> {
2491 lexicon_doc_app_bsky_actor_defs()
2492 }
2493 fn validate(&self) -> Result<(), ConstraintError> {
2494 Ok(())
2495 }
2496}
2497
2498fn _default_adult_content_pref_enabled() -> bool {
2499 false
2500}
2501
2502impl Default for AdultContentPref {
2503 fn default() -> Self {
2504 Self {
2505 enabled: false,
2506 extra_data: Default::default(),
2507 }
2508 }
2509}
2510
2511pub mod adult_content_pref_state {
2512
2513 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2514 #[allow(unused)]
2515 use ::core::marker::PhantomData;
2516 mod sealed {
2517 pub trait Sealed {}
2518 }
2519 pub trait State: sealed::Sealed {
2521 type Enabled;
2522 }
2523 pub struct Empty(());
2525 impl sealed::Sealed for Empty {}
2526 impl State for Empty {
2527 type Enabled = Unset;
2528 }
2529 pub struct SetEnabled<St: State = Empty>(PhantomData<fn() -> St>);
2531 impl<St: State> sealed::Sealed for SetEnabled<St> {}
2532 impl<St: State> State for SetEnabled<St> {
2533 type Enabled = Set<members::enabled>;
2534 }
2535 #[allow(non_camel_case_types)]
2537 pub mod members {
2538 pub struct enabled(());
2540 }
2541}
2542
2543pub struct AdultContentPrefBuilder<St: adult_content_pref_state::State, S: BosStr = DefaultStr> {
2545 _state: PhantomData<fn() -> St>,
2546 _fields: (Option<bool>,),
2547 _type: PhantomData<fn() -> S>,
2548}
2549
2550impl AdultContentPref<DefaultStr> {
2551 pub fn new() -> AdultContentPrefBuilder<adult_content_pref_state::Empty, DefaultStr> {
2553 AdultContentPrefBuilder::new()
2554 }
2555}
2556
2557impl<S: BosStr> AdultContentPref<S> {
2558 pub fn builder() -> AdultContentPrefBuilder<adult_content_pref_state::Empty, S> {
2560 AdultContentPrefBuilder::builder()
2561 }
2562}
2563
2564impl AdultContentPrefBuilder<adult_content_pref_state::Empty, DefaultStr> {
2565 pub fn new() -> Self {
2567 AdultContentPrefBuilder {
2568 _state: PhantomData,
2569 _fields: (None,),
2570 _type: PhantomData,
2571 }
2572 }
2573}
2574
2575impl<S: BosStr> AdultContentPrefBuilder<adult_content_pref_state::Empty, S> {
2576 pub fn builder() -> Self {
2578 AdultContentPrefBuilder {
2579 _state: PhantomData,
2580 _fields: (None,),
2581 _type: PhantomData,
2582 }
2583 }
2584}
2585
2586impl<St, S: BosStr> AdultContentPrefBuilder<St, S>
2587where
2588 St: adult_content_pref_state::State,
2589 St::Enabled: adult_content_pref_state::IsUnset,
2590{
2591 pub fn enabled(
2593 mut self,
2594 value: impl Into<bool>,
2595 ) -> AdultContentPrefBuilder<adult_content_pref_state::SetEnabled<St>, S> {
2596 self._fields.0 = Option::Some(value.into());
2597 AdultContentPrefBuilder {
2598 _state: PhantomData,
2599 _fields: self._fields,
2600 _type: PhantomData,
2601 }
2602 }
2603}
2604
2605impl<St, S: BosStr> AdultContentPrefBuilder<St, S>
2606where
2607 St: adult_content_pref_state::State,
2608 St::Enabled: adult_content_pref_state::IsSet,
2609{
2610 pub fn build(self) -> AdultContentPref<S> {
2612 AdultContentPref {
2613 enabled: self._fields.0.unwrap(),
2614 extra_data: Default::default(),
2615 }
2616 }
2617 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> AdultContentPref<S> {
2619 AdultContentPref {
2620 enabled: self._fields.0.unwrap(),
2621 extra_data: Some(extra_data),
2622 }
2623 }
2624}
2625
2626fn lexicon_doc_app_bsky_actor_defs() -> LexiconDoc<'static> {
2627 use alloc::collections::BTreeMap;
2628 #[allow(unused_imports)]
2629 use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
2630 use jacquard_lexicon::lexicon::*;
2631 LexiconDoc {
2632 lexicon: Lexicon::Lexicon1,
2633 id: CowStr::new_static("app.bsky.actor.defs"),
2634 defs: {
2635 let mut map = BTreeMap::new();
2636 map.insert(
2637 SmolStr::new_static("adultContentPref"),
2638 LexUserType::Object(LexObject {
2639 required: Some(vec![SmolStr::new_static("enabled")]),
2640 properties: {
2641 #[allow(unused_mut)]
2642 let mut map = BTreeMap::new();
2643 map.insert(
2644 SmolStr::new_static("enabled"),
2645 LexObjectProperty::Boolean(LexBoolean {
2646 ..Default::default()
2647 }),
2648 );
2649 map
2650 },
2651 ..Default::default()
2652 }),
2653 );
2654 map.insert(
2655 SmolStr::new_static("bskyAppProgressGuide"),
2656 LexUserType::Object(LexObject {
2657 description: Some(
2658 CowStr::new_static(
2659 "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.",
2660 ),
2661 ),
2662 required: Some(vec![SmolStr::new_static("guide")]),
2663 properties: {
2664 #[allow(unused_mut)]
2665 let mut map = BTreeMap::new();
2666 map.insert(
2667 SmolStr::new_static("guide"),
2668 LexObjectProperty::String(LexString {
2669 max_length: Some(100usize),
2670 ..Default::default()
2671 }),
2672 );
2673 map
2674 },
2675 ..Default::default()
2676 }),
2677 );
2678 map.insert(
2679 SmolStr::new_static("bskyAppStatePref"),
2680 LexUserType::Object(LexObject {
2681 description: Some(
2682 CowStr::new_static(
2683 "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",
2684 ),
2685 ),
2686 properties: {
2687 #[allow(unused_mut)]
2688 let mut map = BTreeMap::new();
2689 map.insert(
2690 SmolStr::new_static("activeProgressGuide"),
2691 LexObjectProperty::Ref(LexRef {
2692 r#ref: CowStr::new_static("#bskyAppProgressGuide"),
2693 ..Default::default()
2694 }),
2695 );
2696 map.insert(
2697 SmolStr::new_static("nuxs"),
2698 LexObjectProperty::Array(LexArray {
2699 description: Some(
2700 CowStr::new_static(
2701 "Storage for NUXs the user has encountered.",
2702 ),
2703 ),
2704 items: LexArrayItem::Ref(LexRef {
2705 r#ref: CowStr::new_static("app.bsky.actor.defs#nux"),
2706 ..Default::default()
2707 }),
2708 max_length: Some(100usize),
2709 ..Default::default()
2710 }),
2711 );
2712 map.insert(
2713 SmolStr::new_static("queuedNudges"),
2714 LexObjectProperty::Array(LexArray {
2715 description: Some(
2716 CowStr::new_static(
2717 "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.",
2718 ),
2719 ),
2720 items: LexArrayItem::String(LexString {
2721 max_length: Some(100usize),
2722 ..Default::default()
2723 }),
2724 max_length: Some(1000usize),
2725 ..Default::default()
2726 }),
2727 );
2728 map
2729 },
2730 ..Default::default()
2731 }),
2732 );
2733 map.insert(
2734 SmolStr::new_static("contentLabelPref"),
2735 LexUserType::Object(LexObject {
2736 required: Some(
2737 vec![
2738 SmolStr::new_static("label"),
2739 SmolStr::new_static("visibility")
2740 ],
2741 ),
2742 properties: {
2743 #[allow(unused_mut)]
2744 let mut map = BTreeMap::new();
2745 map.insert(
2746 SmolStr::new_static("label"),
2747 LexObjectProperty::String(LexString { ..Default::default() }),
2748 );
2749 map.insert(
2750 SmolStr::new_static("labelerDid"),
2751 LexObjectProperty::String(LexString {
2752 description: Some(
2753 CowStr::new_static(
2754 "Which labeler does this preference apply to? If undefined, applies globally.",
2755 ),
2756 ),
2757 format: Some(LexStringFormat::Did),
2758 ..Default::default()
2759 }),
2760 );
2761 map.insert(
2762 SmolStr::new_static("visibility"),
2763 LexObjectProperty::String(LexString { ..Default::default() }),
2764 );
2765 map
2766 },
2767 ..Default::default()
2768 }),
2769 );
2770 map.insert(
2771 SmolStr::new_static("declaredAgePref"),
2772 LexUserType::Object(LexObject {
2773 description: Some(
2774 CowStr::new_static(
2775 "Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.",
2776 ),
2777 ),
2778 properties: {
2779 #[allow(unused_mut)]
2780 let mut map = BTreeMap::new();
2781 map.insert(
2782 SmolStr::new_static("isOverAge13"),
2783 LexObjectProperty::Boolean(LexBoolean {
2784 ..Default::default()
2785 }),
2786 );
2787 map.insert(
2788 SmolStr::new_static("isOverAge16"),
2789 LexObjectProperty::Boolean(LexBoolean {
2790 ..Default::default()
2791 }),
2792 );
2793 map.insert(
2794 SmolStr::new_static("isOverAge18"),
2795 LexObjectProperty::Boolean(LexBoolean {
2796 ..Default::default()
2797 }),
2798 );
2799 map
2800 },
2801 ..Default::default()
2802 }),
2803 );
2804 map.insert(
2805 SmolStr::new_static("feedViewPref"),
2806 LexUserType::Object(LexObject {
2807 required: Some(vec![SmolStr::new_static("feed")]),
2808 properties: {
2809 #[allow(unused_mut)]
2810 let mut map = BTreeMap::new();
2811 map.insert(
2812 SmolStr::new_static("feed"),
2813 LexObjectProperty::String(LexString {
2814 description: Some(
2815 CowStr::new_static(
2816 "The URI of the feed, or an identifier which describes the feed.",
2817 ),
2818 ),
2819 ..Default::default()
2820 }),
2821 );
2822 map.insert(
2823 SmolStr::new_static("hideQuotePosts"),
2824 LexObjectProperty::Boolean(LexBoolean {
2825 ..Default::default()
2826 }),
2827 );
2828 map.insert(
2829 SmolStr::new_static("hideReplies"),
2830 LexObjectProperty::Boolean(LexBoolean {
2831 ..Default::default()
2832 }),
2833 );
2834 map.insert(
2835 SmolStr::new_static("hideRepliesByLikeCount"),
2836 LexObjectProperty::Integer(LexInteger {
2837 ..Default::default()
2838 }),
2839 );
2840 map.insert(
2841 SmolStr::new_static("hideRepliesByUnfollowed"),
2842 LexObjectProperty::Boolean(LexBoolean {
2843 ..Default::default()
2844 }),
2845 );
2846 map.insert(
2847 SmolStr::new_static("hideReposts"),
2848 LexObjectProperty::Boolean(LexBoolean {
2849 ..Default::default()
2850 }),
2851 );
2852 map
2853 },
2854 ..Default::default()
2855 }),
2856 );
2857 map.insert(
2858 SmolStr::new_static("hiddenPostsPref"),
2859 LexUserType::Object(LexObject {
2860 required: Some(vec![SmolStr::new_static("items")]),
2861 properties: {
2862 #[allow(unused_mut)]
2863 let mut map = BTreeMap::new();
2864 map.insert(
2865 SmolStr::new_static("items"),
2866 LexObjectProperty::Array(LexArray {
2867 description: Some(CowStr::new_static(
2868 "A list of URIs of posts the account owner has hidden.",
2869 )),
2870 items: LexArrayItem::String(LexString {
2871 format: Some(LexStringFormat::AtUri),
2872 ..Default::default()
2873 }),
2874 ..Default::default()
2875 }),
2876 );
2877 map
2878 },
2879 ..Default::default()
2880 }),
2881 );
2882 map.insert(
2883 SmolStr::new_static("interestsPref"),
2884 LexUserType::Object(LexObject {
2885 required: Some(vec![SmolStr::new_static("tags")]),
2886 properties: {
2887 #[allow(unused_mut)]
2888 let mut map = BTreeMap::new();
2889 map.insert(
2890 SmolStr::new_static("tags"),
2891 LexObjectProperty::Array(LexArray {
2892 description: Some(
2893 CowStr::new_static(
2894 "A list of tags which describe the account owner's interests gathered during onboarding.",
2895 ),
2896 ),
2897 items: LexArrayItem::String(LexString {
2898 max_length: Some(640usize),
2899 max_graphemes: Some(64usize),
2900 ..Default::default()
2901 }),
2902 max_length: Some(100usize),
2903 ..Default::default()
2904 }),
2905 );
2906 map
2907 },
2908 ..Default::default()
2909 }),
2910 );
2911 map.insert(
2912 SmolStr::new_static("knownFollowers"),
2913 LexUserType::Object(LexObject {
2914 description: Some(CowStr::new_static(
2915 "The subject's followers whom you also follow",
2916 )),
2917 required: Some(vec![
2918 SmolStr::new_static("count"),
2919 SmolStr::new_static("followers"),
2920 ]),
2921 properties: {
2922 #[allow(unused_mut)]
2923 let mut map = BTreeMap::new();
2924 map.insert(
2925 SmolStr::new_static("count"),
2926 LexObjectProperty::Integer(LexInteger {
2927 ..Default::default()
2928 }),
2929 );
2930 map.insert(
2931 SmolStr::new_static("followers"),
2932 LexObjectProperty::Array(LexArray {
2933 items: LexArrayItem::Ref(LexRef {
2934 r#ref: CowStr::new_static("#profileViewBasic"),
2935 ..Default::default()
2936 }),
2937 min_length: Some(0usize),
2938 max_length: Some(5usize),
2939 ..Default::default()
2940 }),
2941 );
2942 map
2943 },
2944 ..Default::default()
2945 }),
2946 );
2947 map.insert(
2948 SmolStr::new_static("labelerPrefItem"),
2949 LexUserType::Object(LexObject {
2950 required: Some(vec![SmolStr::new_static("did")]),
2951 properties: {
2952 #[allow(unused_mut)]
2953 let mut map = BTreeMap::new();
2954 map.insert(
2955 SmolStr::new_static("did"),
2956 LexObjectProperty::String(LexString {
2957 format: Some(LexStringFormat::Did),
2958 ..Default::default()
2959 }),
2960 );
2961 map
2962 },
2963 ..Default::default()
2964 }),
2965 );
2966 map.insert(
2967 SmolStr::new_static("labelersPref"),
2968 LexUserType::Object(LexObject {
2969 required: Some(vec![SmolStr::new_static("labelers")]),
2970 properties: {
2971 #[allow(unused_mut)]
2972 let mut map = BTreeMap::new();
2973 map.insert(
2974 SmolStr::new_static("labelers"),
2975 LexObjectProperty::Array(LexArray {
2976 items: LexArrayItem::Ref(LexRef {
2977 r#ref: CowStr::new_static("#labelerPrefItem"),
2978 ..Default::default()
2979 }),
2980 ..Default::default()
2981 }),
2982 );
2983 map
2984 },
2985 ..Default::default()
2986 }),
2987 );
2988 map.insert(
2989 SmolStr::new_static("liveEventPreferences"),
2990 LexUserType::Object(LexObject {
2991 description: Some(CowStr::new_static("Preferences for live events.")),
2992 properties: {
2993 #[allow(unused_mut)]
2994 let mut map = BTreeMap::new();
2995 map.insert(
2996 SmolStr::new_static("hiddenFeedIds"),
2997 LexObjectProperty::Array(LexArray {
2998 description: Some(CowStr::new_static(
2999 "A list of feed IDs that the user has hidden from live events.",
3000 )),
3001 items: LexArrayItem::String(LexString {
3002 ..Default::default()
3003 }),
3004 ..Default::default()
3005 }),
3006 );
3007 map.insert(
3008 SmolStr::new_static("hideAllFeeds"),
3009 LexObjectProperty::Boolean(LexBoolean {
3010 ..Default::default()
3011 }),
3012 );
3013 map
3014 },
3015 ..Default::default()
3016 }),
3017 );
3018 map.insert(
3019 SmolStr::new_static("mutedWord"),
3020 LexUserType::Object(LexObject {
3021 description: Some(
3022 CowStr::new_static("A word that the account owner has muted."),
3023 ),
3024 required: Some(
3025 vec![
3026 SmolStr::new_static("value"), SmolStr::new_static("targets")
3027 ],
3028 ),
3029 properties: {
3030 #[allow(unused_mut)]
3031 let mut map = BTreeMap::new();
3032 map.insert(
3033 SmolStr::new_static("actorTarget"),
3034 LexObjectProperty::String(LexString {
3035 description: Some(
3036 CowStr::new_static(
3037 "Groups of users to apply the muted word to. If undefined, applies to all users.",
3038 ),
3039 ),
3040 ..Default::default()
3041 }),
3042 );
3043 map.insert(
3044 SmolStr::new_static("expiresAt"),
3045 LexObjectProperty::String(LexString {
3046 description: Some(
3047 CowStr::new_static(
3048 "The date and time at which the muted word will expire and no longer be applied.",
3049 ),
3050 ),
3051 format: Some(LexStringFormat::Datetime),
3052 ..Default::default()
3053 }),
3054 );
3055 map.insert(
3056 SmolStr::new_static("id"),
3057 LexObjectProperty::String(LexString { ..Default::default() }),
3058 );
3059 map.insert(
3060 SmolStr::new_static("targets"),
3061 LexObjectProperty::Array(LexArray {
3062 description: Some(
3063 CowStr::new_static(
3064 "The intended targets of the muted word.",
3065 ),
3066 ),
3067 items: LexArrayItem::Ref(LexRef {
3068 r#ref: CowStr::new_static(
3069 "app.bsky.actor.defs#mutedWordTarget",
3070 ),
3071 ..Default::default()
3072 }),
3073 ..Default::default()
3074 }),
3075 );
3076 map.insert(
3077 SmolStr::new_static("value"),
3078 LexObjectProperty::String(LexString {
3079 description: Some(
3080 CowStr::new_static("The muted word itself."),
3081 ),
3082 max_length: Some(10000usize),
3083 max_graphemes: Some(1000usize),
3084 ..Default::default()
3085 }),
3086 );
3087 map
3088 },
3089 ..Default::default()
3090 }),
3091 );
3092 map.insert(
3093 SmolStr::new_static("mutedWordTarget"),
3094 LexUserType::String(LexString {
3095 max_length: Some(640usize),
3096 max_graphemes: Some(64usize),
3097 ..Default::default()
3098 }),
3099 );
3100 map.insert(
3101 SmolStr::new_static("mutedWordsPref"),
3102 LexUserType::Object(LexObject {
3103 required: Some(vec![SmolStr::new_static("items")]),
3104 properties: {
3105 #[allow(unused_mut)]
3106 let mut map = BTreeMap::new();
3107 map.insert(
3108 SmolStr::new_static("items"),
3109 LexObjectProperty::Array(LexArray {
3110 description: Some(CowStr::new_static(
3111 "A list of words the account owner has muted.",
3112 )),
3113 items: LexArrayItem::Ref(LexRef {
3114 r#ref: CowStr::new_static("app.bsky.actor.defs#mutedWord"),
3115 ..Default::default()
3116 }),
3117 ..Default::default()
3118 }),
3119 );
3120 map
3121 },
3122 ..Default::default()
3123 }),
3124 );
3125 map.insert(
3126 SmolStr::new_static("nux"),
3127 LexUserType::Object(LexObject {
3128 description: Some(
3129 CowStr::new_static("A new user experiences (NUX) storage object"),
3130 ),
3131 required: Some(
3132 vec![SmolStr::new_static("id"), SmolStr::new_static("completed")],
3133 ),
3134 properties: {
3135 #[allow(unused_mut)]
3136 let mut map = BTreeMap::new();
3137 map.insert(
3138 SmolStr::new_static("completed"),
3139 LexObjectProperty::Boolean(LexBoolean {
3140 ..Default::default()
3141 }),
3142 );
3143 map.insert(
3144 SmolStr::new_static("data"),
3145 LexObjectProperty::String(LexString {
3146 description: Some(
3147 CowStr::new_static(
3148 "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.",
3149 ),
3150 ),
3151 max_length: Some(3000usize),
3152 max_graphemes: Some(300usize),
3153 ..Default::default()
3154 }),
3155 );
3156 map.insert(
3157 SmolStr::new_static("expiresAt"),
3158 LexObjectProperty::String(LexString {
3159 description: Some(
3160 CowStr::new_static(
3161 "The date and time at which the NUX will expire and should be considered completed.",
3162 ),
3163 ),
3164 format: Some(LexStringFormat::Datetime),
3165 ..Default::default()
3166 }),
3167 );
3168 map.insert(
3169 SmolStr::new_static("id"),
3170 LexObjectProperty::String(LexString {
3171 max_length: Some(100usize),
3172 ..Default::default()
3173 }),
3174 );
3175 map
3176 },
3177 ..Default::default()
3178 }),
3179 );
3180 map.insert(
3181 SmolStr::new_static("personalDetailsPref"),
3182 LexUserType::Object(LexObject {
3183 properties: {
3184 #[allow(unused_mut)]
3185 let mut map = BTreeMap::new();
3186 map.insert(
3187 SmolStr::new_static("birthDate"),
3188 LexObjectProperty::String(LexString {
3189 description: Some(CowStr::new_static(
3190 "The birth date of account owner.",
3191 )),
3192 format: Some(LexStringFormat::Datetime),
3193 ..Default::default()
3194 }),
3195 );
3196 map
3197 },
3198 ..Default::default()
3199 }),
3200 );
3201 map.insert(
3202 SmolStr::new_static("postInteractionSettingsPref"),
3203 LexUserType::Object(LexObject {
3204 description: Some(
3205 CowStr::new_static(
3206 "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.",
3207 ),
3208 ),
3209 required: Some(vec![]),
3210 properties: {
3211 #[allow(unused_mut)]
3212 let mut map = BTreeMap::new();
3213 map.insert(
3214 SmolStr::new_static("postgateEmbeddingRules"),
3215 LexObjectProperty::Array(LexArray {
3216 description: Some(
3217 CowStr::new_static(
3218 "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.",
3219 ),
3220 ),
3221 items: LexArrayItem::Union(LexRefUnion {
3222 refs: vec![
3223 CowStr::new_static("app.bsky.feed.postgate#disableRule")
3224 ],
3225 ..Default::default()
3226 }),
3227 max_length: Some(5usize),
3228 ..Default::default()
3229 }),
3230 );
3231 map.insert(
3232 SmolStr::new_static("threadgateAllowRules"),
3233 LexObjectProperty::Array(LexArray {
3234 description: Some(
3235 CowStr::new_static(
3236 "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",
3237 ),
3238 ),
3239 items: LexArrayItem::Union(LexRefUnion {
3240 refs: vec![
3241 CowStr::new_static("app.bsky.feed.threadgate#mentionRule"),
3242 CowStr::new_static("app.bsky.feed.threadgate#followerRule"),
3243 CowStr::new_static("app.bsky.feed.threadgate#followingRule"),
3244 CowStr::new_static("app.bsky.feed.threadgate#listRule")
3245 ],
3246 ..Default::default()
3247 }),
3248 max_length: Some(5usize),
3249 ..Default::default()
3250 }),
3251 );
3252 map
3253 },
3254 ..Default::default()
3255 }),
3256 );
3257 map.insert(
3258 SmolStr::new_static("preferences"),
3259 LexUserType::Array(LexArray {
3260 items: LexArrayItem::Union(LexRefUnion {
3261 refs: vec![
3262 CowStr::new_static("#adultContentPref"),
3263 CowStr::new_static("#contentLabelPref"),
3264 CowStr::new_static("#savedFeedsPref"),
3265 CowStr::new_static("#savedFeedsPrefV2"),
3266 CowStr::new_static("#personalDetailsPref"),
3267 CowStr::new_static("#declaredAgePref"),
3268 CowStr::new_static("#feedViewPref"),
3269 CowStr::new_static("#threadViewPref"),
3270 CowStr::new_static("#interestsPref"),
3271 CowStr::new_static("#mutedWordsPref"),
3272 CowStr::new_static("#hiddenPostsPref"),
3273 CowStr::new_static("#bskyAppStatePref"),
3274 CowStr::new_static("#labelersPref"),
3275 CowStr::new_static("#postInteractionSettingsPref"),
3276 CowStr::new_static("#verificationPrefs"),
3277 CowStr::new_static("#liveEventPreferences"),
3278 ],
3279 ..Default::default()
3280 }),
3281 ..Default::default()
3282 }),
3283 );
3284 map.insert(
3285 SmolStr::new_static("profileAssociated"),
3286 LexUserType::Object(LexObject {
3287 properties: {
3288 #[allow(unused_mut)]
3289 let mut map = BTreeMap::new();
3290 map.insert(
3291 SmolStr::new_static("activitySubscription"),
3292 LexObjectProperty::Ref(LexRef {
3293 r#ref: CowStr::new_static("#profileAssociatedActivitySubscription"),
3294 ..Default::default()
3295 }),
3296 );
3297 map.insert(
3298 SmolStr::new_static("chat"),
3299 LexObjectProperty::Ref(LexRef {
3300 r#ref: CowStr::new_static("#profileAssociatedChat"),
3301 ..Default::default()
3302 }),
3303 );
3304 map.insert(
3305 SmolStr::new_static("feedgens"),
3306 LexObjectProperty::Integer(LexInteger {
3307 ..Default::default()
3308 }),
3309 );
3310 map.insert(
3311 SmolStr::new_static("germ"),
3312 LexObjectProperty::Ref(LexRef {
3313 r#ref: CowStr::new_static("#profileAssociatedGerm"),
3314 ..Default::default()
3315 }),
3316 );
3317 map.insert(
3318 SmolStr::new_static("labeler"),
3319 LexObjectProperty::Boolean(LexBoolean {
3320 ..Default::default()
3321 }),
3322 );
3323 map.insert(
3324 SmolStr::new_static("lists"),
3325 LexObjectProperty::Integer(LexInteger {
3326 ..Default::default()
3327 }),
3328 );
3329 map.insert(
3330 SmolStr::new_static("starterPacks"),
3331 LexObjectProperty::Integer(LexInteger {
3332 ..Default::default()
3333 }),
3334 );
3335 map
3336 },
3337 ..Default::default()
3338 }),
3339 );
3340 map.insert(
3341 SmolStr::new_static("profileAssociatedActivitySubscription"),
3342 LexUserType::Object(LexObject {
3343 required: Some(vec![SmolStr::new_static("allowSubscriptions")]),
3344 properties: {
3345 #[allow(unused_mut)]
3346 let mut map = BTreeMap::new();
3347 map.insert(
3348 SmolStr::new_static("allowSubscriptions"),
3349 LexObjectProperty::String(LexString {
3350 ..Default::default()
3351 }),
3352 );
3353 map
3354 },
3355 ..Default::default()
3356 }),
3357 );
3358 map.insert(
3359 SmolStr::new_static("profileAssociatedChat"),
3360 LexUserType::Object(LexObject {
3361 required: Some(vec![SmolStr::new_static("allowIncoming")]),
3362 properties: {
3363 #[allow(unused_mut)]
3364 let mut map = BTreeMap::new();
3365 map.insert(
3366 SmolStr::new_static("allowGroupInvites"),
3367 LexObjectProperty::String(LexString {
3368 ..Default::default()
3369 }),
3370 );
3371 map.insert(
3372 SmolStr::new_static("allowIncoming"),
3373 LexObjectProperty::String(LexString {
3374 ..Default::default()
3375 }),
3376 );
3377 map
3378 },
3379 ..Default::default()
3380 }),
3381 );
3382 map.insert(
3383 SmolStr::new_static("profileAssociatedGerm"),
3384 LexUserType::Object(LexObject {
3385 required: Some(vec![
3386 SmolStr::new_static("showButtonTo"),
3387 SmolStr::new_static("messageMeUrl"),
3388 ]),
3389 properties: {
3390 #[allow(unused_mut)]
3391 let mut map = BTreeMap::new();
3392 map.insert(
3393 SmolStr::new_static("messageMeUrl"),
3394 LexObjectProperty::String(LexString {
3395 format: Some(LexStringFormat::Uri),
3396 ..Default::default()
3397 }),
3398 );
3399 map.insert(
3400 SmolStr::new_static("showButtonTo"),
3401 LexObjectProperty::String(LexString {
3402 ..Default::default()
3403 }),
3404 );
3405 map
3406 },
3407 ..Default::default()
3408 }),
3409 );
3410 map.insert(
3411 SmolStr::new_static("profileView"),
3412 LexUserType::Object(LexObject {
3413 required: Some(vec![
3414 SmolStr::new_static("did"),
3415 SmolStr::new_static("handle"),
3416 ]),
3417 properties: {
3418 #[allow(unused_mut)]
3419 let mut map = BTreeMap::new();
3420 map.insert(
3421 SmolStr::new_static("associated"),
3422 LexObjectProperty::Ref(LexRef {
3423 r#ref: CowStr::new_static("#profileAssociated"),
3424 ..Default::default()
3425 }),
3426 );
3427 map.insert(
3428 SmolStr::new_static("avatar"),
3429 LexObjectProperty::String(LexString {
3430 format: Some(LexStringFormat::Uri),
3431 ..Default::default()
3432 }),
3433 );
3434 map.insert(
3435 SmolStr::new_static("createdAt"),
3436 LexObjectProperty::String(LexString {
3437 format: Some(LexStringFormat::Datetime),
3438 ..Default::default()
3439 }),
3440 );
3441 map.insert(
3442 SmolStr::new_static("debug"),
3443 LexObjectProperty::Unknown(LexUnknown {
3444 ..Default::default()
3445 }),
3446 );
3447 map.insert(
3448 SmolStr::new_static("description"),
3449 LexObjectProperty::String(LexString {
3450 max_length: Some(2560usize),
3451 max_graphemes: Some(256usize),
3452 ..Default::default()
3453 }),
3454 );
3455 map.insert(
3456 SmolStr::new_static("did"),
3457 LexObjectProperty::String(LexString {
3458 format: Some(LexStringFormat::Did),
3459 ..Default::default()
3460 }),
3461 );
3462 map.insert(
3463 SmolStr::new_static("displayName"),
3464 LexObjectProperty::String(LexString {
3465 max_length: Some(640usize),
3466 max_graphemes: Some(64usize),
3467 ..Default::default()
3468 }),
3469 );
3470 map.insert(
3471 SmolStr::new_static("handle"),
3472 LexObjectProperty::String(LexString {
3473 format: Some(LexStringFormat::Handle),
3474 ..Default::default()
3475 }),
3476 );
3477 map.insert(
3478 SmolStr::new_static("indexedAt"),
3479 LexObjectProperty::String(LexString {
3480 format: Some(LexStringFormat::Datetime),
3481 ..Default::default()
3482 }),
3483 );
3484 map.insert(
3485 SmolStr::new_static("labels"),
3486 LexObjectProperty::Array(LexArray {
3487 items: LexArrayItem::Ref(LexRef {
3488 r#ref: CowStr::new_static("com.atproto.label.defs#label"),
3489 ..Default::default()
3490 }),
3491 ..Default::default()
3492 }),
3493 );
3494 map.insert(
3495 SmolStr::new_static("pronouns"),
3496 LexObjectProperty::String(LexString {
3497 ..Default::default()
3498 }),
3499 );
3500 map.insert(
3501 SmolStr::new_static("status"),
3502 LexObjectProperty::Ref(LexRef {
3503 r#ref: CowStr::new_static("#statusView"),
3504 ..Default::default()
3505 }),
3506 );
3507 map.insert(
3508 SmolStr::new_static("verification"),
3509 LexObjectProperty::Ref(LexRef {
3510 r#ref: CowStr::new_static("#verificationState"),
3511 ..Default::default()
3512 }),
3513 );
3514 map.insert(
3515 SmolStr::new_static("viewer"),
3516 LexObjectProperty::Ref(LexRef {
3517 r#ref: CowStr::new_static("#viewerState"),
3518 ..Default::default()
3519 }),
3520 );
3521 map
3522 },
3523 ..Default::default()
3524 }),
3525 );
3526 map.insert(
3527 SmolStr::new_static("profileViewBasic"),
3528 LexUserType::Object(LexObject {
3529 required: Some(vec![
3530 SmolStr::new_static("did"),
3531 SmolStr::new_static("handle"),
3532 ]),
3533 properties: {
3534 #[allow(unused_mut)]
3535 let mut map = BTreeMap::new();
3536 map.insert(
3537 SmolStr::new_static("associated"),
3538 LexObjectProperty::Ref(LexRef {
3539 r#ref: CowStr::new_static("#profileAssociated"),
3540 ..Default::default()
3541 }),
3542 );
3543 map.insert(
3544 SmolStr::new_static("avatar"),
3545 LexObjectProperty::String(LexString {
3546 format: Some(LexStringFormat::Uri),
3547 ..Default::default()
3548 }),
3549 );
3550 map.insert(
3551 SmolStr::new_static("createdAt"),
3552 LexObjectProperty::String(LexString {
3553 format: Some(LexStringFormat::Datetime),
3554 ..Default::default()
3555 }),
3556 );
3557 map.insert(
3558 SmolStr::new_static("debug"),
3559 LexObjectProperty::Unknown(LexUnknown {
3560 ..Default::default()
3561 }),
3562 );
3563 map.insert(
3564 SmolStr::new_static("did"),
3565 LexObjectProperty::String(LexString {
3566 format: Some(LexStringFormat::Did),
3567 ..Default::default()
3568 }),
3569 );
3570 map.insert(
3571 SmolStr::new_static("displayName"),
3572 LexObjectProperty::String(LexString {
3573 max_length: Some(640usize),
3574 max_graphemes: Some(64usize),
3575 ..Default::default()
3576 }),
3577 );
3578 map.insert(
3579 SmolStr::new_static("handle"),
3580 LexObjectProperty::String(LexString {
3581 format: Some(LexStringFormat::Handle),
3582 ..Default::default()
3583 }),
3584 );
3585 map.insert(
3586 SmolStr::new_static("labels"),
3587 LexObjectProperty::Array(LexArray {
3588 items: LexArrayItem::Ref(LexRef {
3589 r#ref: CowStr::new_static("com.atproto.label.defs#label"),
3590 ..Default::default()
3591 }),
3592 ..Default::default()
3593 }),
3594 );
3595 map.insert(
3596 SmolStr::new_static("pronouns"),
3597 LexObjectProperty::String(LexString {
3598 ..Default::default()
3599 }),
3600 );
3601 map.insert(
3602 SmolStr::new_static("status"),
3603 LexObjectProperty::Ref(LexRef {
3604 r#ref: CowStr::new_static("#statusView"),
3605 ..Default::default()
3606 }),
3607 );
3608 map.insert(
3609 SmolStr::new_static("verification"),
3610 LexObjectProperty::Ref(LexRef {
3611 r#ref: CowStr::new_static("#verificationState"),
3612 ..Default::default()
3613 }),
3614 );
3615 map.insert(
3616 SmolStr::new_static("viewer"),
3617 LexObjectProperty::Ref(LexRef {
3618 r#ref: CowStr::new_static("#viewerState"),
3619 ..Default::default()
3620 }),
3621 );
3622 map
3623 },
3624 ..Default::default()
3625 }),
3626 );
3627 map.insert(
3628 SmolStr::new_static("profileViewDetailed"),
3629 LexUserType::Object(LexObject {
3630 required: Some(vec![
3631 SmolStr::new_static("did"),
3632 SmolStr::new_static("handle"),
3633 ]),
3634 properties: {
3635 #[allow(unused_mut)]
3636 let mut map = BTreeMap::new();
3637 map.insert(
3638 SmolStr::new_static("associated"),
3639 LexObjectProperty::Ref(LexRef {
3640 r#ref: CowStr::new_static("#profileAssociated"),
3641 ..Default::default()
3642 }),
3643 );
3644 map.insert(
3645 SmolStr::new_static("avatar"),
3646 LexObjectProperty::String(LexString {
3647 format: Some(LexStringFormat::Uri),
3648 ..Default::default()
3649 }),
3650 );
3651 map.insert(
3652 SmolStr::new_static("banner"),
3653 LexObjectProperty::String(LexString {
3654 format: Some(LexStringFormat::Uri),
3655 ..Default::default()
3656 }),
3657 );
3658 map.insert(
3659 SmolStr::new_static("createdAt"),
3660 LexObjectProperty::String(LexString {
3661 format: Some(LexStringFormat::Datetime),
3662 ..Default::default()
3663 }),
3664 );
3665 map.insert(
3666 SmolStr::new_static("debug"),
3667 LexObjectProperty::Unknown(LexUnknown {
3668 ..Default::default()
3669 }),
3670 );
3671 map.insert(
3672 SmolStr::new_static("description"),
3673 LexObjectProperty::String(LexString {
3674 max_length: Some(2560usize),
3675 max_graphemes: Some(256usize),
3676 ..Default::default()
3677 }),
3678 );
3679 map.insert(
3680 SmolStr::new_static("did"),
3681 LexObjectProperty::String(LexString {
3682 format: Some(LexStringFormat::Did),
3683 ..Default::default()
3684 }),
3685 );
3686 map.insert(
3687 SmolStr::new_static("displayName"),
3688 LexObjectProperty::String(LexString {
3689 max_length: Some(640usize),
3690 max_graphemes: Some(64usize),
3691 ..Default::default()
3692 }),
3693 );
3694 map.insert(
3695 SmolStr::new_static("followersCount"),
3696 LexObjectProperty::Integer(LexInteger {
3697 ..Default::default()
3698 }),
3699 );
3700 map.insert(
3701 SmolStr::new_static("followsCount"),
3702 LexObjectProperty::Integer(LexInteger {
3703 ..Default::default()
3704 }),
3705 );
3706 map.insert(
3707 SmolStr::new_static("handle"),
3708 LexObjectProperty::String(LexString {
3709 format: Some(LexStringFormat::Handle),
3710 ..Default::default()
3711 }),
3712 );
3713 map.insert(
3714 SmolStr::new_static("indexedAt"),
3715 LexObjectProperty::String(LexString {
3716 format: Some(LexStringFormat::Datetime),
3717 ..Default::default()
3718 }),
3719 );
3720 map.insert(
3721 SmolStr::new_static("joinedViaStarterPack"),
3722 LexObjectProperty::Ref(LexRef {
3723 r#ref: CowStr::new_static(
3724 "app.bsky.graph.defs#starterPackViewBasic",
3725 ),
3726 ..Default::default()
3727 }),
3728 );
3729 map.insert(
3730 SmolStr::new_static("labels"),
3731 LexObjectProperty::Array(LexArray {
3732 items: LexArrayItem::Ref(LexRef {
3733 r#ref: CowStr::new_static("com.atproto.label.defs#label"),
3734 ..Default::default()
3735 }),
3736 ..Default::default()
3737 }),
3738 );
3739 map.insert(
3740 SmolStr::new_static("pinnedPost"),
3741 LexObjectProperty::Ref(LexRef {
3742 r#ref: CowStr::new_static("com.atproto.repo.strongRef"),
3743 ..Default::default()
3744 }),
3745 );
3746 map.insert(
3747 SmolStr::new_static("postsCount"),
3748 LexObjectProperty::Integer(LexInteger {
3749 ..Default::default()
3750 }),
3751 );
3752 map.insert(
3753 SmolStr::new_static("pronouns"),
3754 LexObjectProperty::String(LexString {
3755 ..Default::default()
3756 }),
3757 );
3758 map.insert(
3759 SmolStr::new_static("status"),
3760 LexObjectProperty::Ref(LexRef {
3761 r#ref: CowStr::new_static("#statusView"),
3762 ..Default::default()
3763 }),
3764 );
3765 map.insert(
3766 SmolStr::new_static("verification"),
3767 LexObjectProperty::Ref(LexRef {
3768 r#ref: CowStr::new_static("#verificationState"),
3769 ..Default::default()
3770 }),
3771 );
3772 map.insert(
3773 SmolStr::new_static("viewer"),
3774 LexObjectProperty::Ref(LexRef {
3775 r#ref: CowStr::new_static("#viewerState"),
3776 ..Default::default()
3777 }),
3778 );
3779 map.insert(
3780 SmolStr::new_static("website"),
3781 LexObjectProperty::String(LexString {
3782 format: Some(LexStringFormat::Uri),
3783 ..Default::default()
3784 }),
3785 );
3786 map
3787 },
3788 ..Default::default()
3789 }),
3790 );
3791 map.insert(
3792 SmolStr::new_static("savedFeed"),
3793 LexUserType::Object(LexObject {
3794 required: Some(vec![
3795 SmolStr::new_static("id"),
3796 SmolStr::new_static("type"),
3797 SmolStr::new_static("value"),
3798 SmolStr::new_static("pinned"),
3799 ]),
3800 properties: {
3801 #[allow(unused_mut)]
3802 let mut map = BTreeMap::new();
3803 map.insert(
3804 SmolStr::new_static("id"),
3805 LexObjectProperty::String(LexString {
3806 ..Default::default()
3807 }),
3808 );
3809 map.insert(
3810 SmolStr::new_static("pinned"),
3811 LexObjectProperty::Boolean(LexBoolean {
3812 ..Default::default()
3813 }),
3814 );
3815 map.insert(
3816 SmolStr::new_static("type"),
3817 LexObjectProperty::String(LexString {
3818 ..Default::default()
3819 }),
3820 );
3821 map.insert(
3822 SmolStr::new_static("value"),
3823 LexObjectProperty::String(LexString {
3824 ..Default::default()
3825 }),
3826 );
3827 map
3828 },
3829 ..Default::default()
3830 }),
3831 );
3832 map.insert(
3833 SmolStr::new_static("savedFeedsPref"),
3834 LexUserType::Object(LexObject {
3835 required: Some(vec![
3836 SmolStr::new_static("pinned"),
3837 SmolStr::new_static("saved"),
3838 ]),
3839 properties: {
3840 #[allow(unused_mut)]
3841 let mut map = BTreeMap::new();
3842 map.insert(
3843 SmolStr::new_static("pinned"),
3844 LexObjectProperty::Array(LexArray {
3845 items: LexArrayItem::String(LexString {
3846 format: Some(LexStringFormat::AtUri),
3847 ..Default::default()
3848 }),
3849 ..Default::default()
3850 }),
3851 );
3852 map.insert(
3853 SmolStr::new_static("saved"),
3854 LexObjectProperty::Array(LexArray {
3855 items: LexArrayItem::String(LexString {
3856 format: Some(LexStringFormat::AtUri),
3857 ..Default::default()
3858 }),
3859 ..Default::default()
3860 }),
3861 );
3862 map.insert(
3863 SmolStr::new_static("timelineIndex"),
3864 LexObjectProperty::Integer(LexInteger {
3865 ..Default::default()
3866 }),
3867 );
3868 map
3869 },
3870 ..Default::default()
3871 }),
3872 );
3873 map.insert(
3874 SmolStr::new_static("savedFeedsPrefV2"),
3875 LexUserType::Object(LexObject {
3876 required: Some(vec![SmolStr::new_static("items")]),
3877 properties: {
3878 #[allow(unused_mut)]
3879 let mut map = BTreeMap::new();
3880 map.insert(
3881 SmolStr::new_static("items"),
3882 LexObjectProperty::Array(LexArray {
3883 items: LexArrayItem::Ref(LexRef {
3884 r#ref: CowStr::new_static("app.bsky.actor.defs#savedFeed"),
3885 ..Default::default()
3886 }),
3887 ..Default::default()
3888 }),
3889 );
3890 map
3891 },
3892 ..Default::default()
3893 }),
3894 );
3895 map.insert(
3896 SmolStr::new_static("statusView"),
3897 LexUserType::Object(LexObject {
3898 required: Some(
3899 vec![
3900 SmolStr::new_static("status"), SmolStr::new_static("record")
3901 ],
3902 ),
3903 properties: {
3904 #[allow(unused_mut)]
3905 let mut map = BTreeMap::new();
3906 map.insert(
3907 SmolStr::new_static("cid"),
3908 LexObjectProperty::String(LexString {
3909 format: Some(LexStringFormat::Cid),
3910 ..Default::default()
3911 }),
3912 );
3913 map.insert(
3914 SmolStr::new_static("embed"),
3915 LexObjectProperty::Union(LexRefUnion {
3916 description: Some(
3917 CowStr::new_static(
3918 "An optional embed associated with the status.",
3919 ),
3920 ),
3921 refs: vec![
3922 CowStr::new_static("app.bsky.embed.external#view")
3923 ],
3924 ..Default::default()
3925 }),
3926 );
3927 map.insert(
3928 SmolStr::new_static("expiresAt"),
3929 LexObjectProperty::String(LexString {
3930 description: Some(
3931 CowStr::new_static(
3932 "The date when this status will expire. The application might choose to no longer return the status after expiration.",
3933 ),
3934 ),
3935 format: Some(LexStringFormat::Datetime),
3936 ..Default::default()
3937 }),
3938 );
3939 map.insert(
3940 SmolStr::new_static("isActive"),
3941 LexObjectProperty::Boolean(LexBoolean {
3942 ..Default::default()
3943 }),
3944 );
3945 map.insert(
3946 SmolStr::new_static("isDisabled"),
3947 LexObjectProperty::Boolean(LexBoolean {
3948 ..Default::default()
3949 }),
3950 );
3951 map.insert(
3952 SmolStr::new_static("labels"),
3953 LexObjectProperty::Array(LexArray {
3954 items: LexArrayItem::Ref(LexRef {
3955 r#ref: CowStr::new_static("com.atproto.label.defs#label"),
3956 ..Default::default()
3957 }),
3958 ..Default::default()
3959 }),
3960 );
3961 map.insert(
3962 SmolStr::new_static("record"),
3963 LexObjectProperty::Unknown(LexUnknown {
3964 ..Default::default()
3965 }),
3966 );
3967 map.insert(
3968 SmolStr::new_static("status"),
3969 LexObjectProperty::String(LexString {
3970 description: Some(
3971 CowStr::new_static("The status for the account."),
3972 ),
3973 ..Default::default()
3974 }),
3975 );
3976 map.insert(
3977 SmolStr::new_static("uri"),
3978 LexObjectProperty::String(LexString {
3979 format: Some(LexStringFormat::AtUri),
3980 ..Default::default()
3981 }),
3982 );
3983 map
3984 },
3985 ..Default::default()
3986 }),
3987 );
3988 map.insert(
3989 SmolStr::new_static("threadViewPref"),
3990 LexUserType::Object(LexObject {
3991 properties: {
3992 #[allow(unused_mut)]
3993 let mut map = BTreeMap::new();
3994 map.insert(
3995 SmolStr::new_static("sort"),
3996 LexObjectProperty::String(LexString {
3997 description: Some(CowStr::new_static("Sorting mode for threads.")),
3998 ..Default::default()
3999 }),
4000 );
4001 map
4002 },
4003 ..Default::default()
4004 }),
4005 );
4006 map.insert(
4007 SmolStr::new_static("verificationPrefs"),
4008 LexUserType::Object(LexObject {
4009 description: Some(CowStr::new_static(
4010 "Preferences for how verified accounts appear in the app.",
4011 )),
4012 required: Some(vec![]),
4013 properties: {
4014 #[allow(unused_mut)]
4015 let mut map = BTreeMap::new();
4016 map.insert(
4017 SmolStr::new_static("hideBadges"),
4018 LexObjectProperty::Boolean(LexBoolean {
4019 ..Default::default()
4020 }),
4021 );
4022 map
4023 },
4024 ..Default::default()
4025 }),
4026 );
4027 map.insert(
4028 SmolStr::new_static("verificationState"),
4029 LexUserType::Object(LexObject {
4030 description: Some(
4031 CowStr::new_static(
4032 "Represents the verification information about the user this object is attached to.",
4033 ),
4034 ),
4035 required: Some(
4036 vec![
4037 SmolStr::new_static("verifications"),
4038 SmolStr::new_static("verifiedStatus"),
4039 SmolStr::new_static("trustedVerifierStatus")
4040 ],
4041 ),
4042 properties: {
4043 #[allow(unused_mut)]
4044 let mut map = BTreeMap::new();
4045 map.insert(
4046 SmolStr::new_static("trustedVerifierStatus"),
4047 LexObjectProperty::String(LexString {
4048 description: Some(
4049 CowStr::new_static(
4050 "The user's status as a trusted verifier.",
4051 ),
4052 ),
4053 ..Default::default()
4054 }),
4055 );
4056 map.insert(
4057 SmolStr::new_static("verifications"),
4058 LexObjectProperty::Array(LexArray {
4059 description: Some(
4060 CowStr::new_static(
4061 "All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.",
4062 ),
4063 ),
4064 items: LexArrayItem::Ref(LexRef {
4065 r#ref: CowStr::new_static("#verificationView"),
4066 ..Default::default()
4067 }),
4068 ..Default::default()
4069 }),
4070 );
4071 map.insert(
4072 SmolStr::new_static("verifiedStatus"),
4073 LexObjectProperty::String(LexString {
4074 description: Some(
4075 CowStr::new_static(
4076 "The user's status as a verified account.",
4077 ),
4078 ),
4079 ..Default::default()
4080 }),
4081 );
4082 map
4083 },
4084 ..Default::default()
4085 }),
4086 );
4087 map.insert(
4088 SmolStr::new_static("verificationView"),
4089 LexUserType::Object(LexObject {
4090 description: Some(CowStr::new_static(
4091 "An individual verification for an associated subject.",
4092 )),
4093 required: Some(vec![
4094 SmolStr::new_static("issuer"),
4095 SmolStr::new_static("uri"),
4096 SmolStr::new_static("isValid"),
4097 SmolStr::new_static("createdAt"),
4098 ]),
4099 properties: {
4100 #[allow(unused_mut)]
4101 let mut map = BTreeMap::new();
4102 map.insert(
4103 SmolStr::new_static("createdAt"),
4104 LexObjectProperty::String(LexString {
4105 description: Some(CowStr::new_static(
4106 "Timestamp when the verification was created.",
4107 )),
4108 format: Some(LexStringFormat::Datetime),
4109 ..Default::default()
4110 }),
4111 );
4112 map.insert(
4113 SmolStr::new_static("isValid"),
4114 LexObjectProperty::Boolean(LexBoolean {
4115 ..Default::default()
4116 }),
4117 );
4118 map.insert(
4119 SmolStr::new_static("issuer"),
4120 LexObjectProperty::String(LexString {
4121 description: Some(CowStr::new_static(
4122 "The user who issued this verification.",
4123 )),
4124 format: Some(LexStringFormat::Did),
4125 ..Default::default()
4126 }),
4127 );
4128 map.insert(
4129 SmolStr::new_static("issuerDisplayName"),
4130 LexObjectProperty::String(LexString {
4131 description: Some(CowStr::new_static(
4132 "The display name of the issuer.",
4133 )),
4134 ..Default::default()
4135 }),
4136 );
4137 map.insert(
4138 SmolStr::new_static("issuerHandle"),
4139 LexObjectProperty::String(LexString {
4140 description: Some(CowStr::new_static("The handle of the issuer.")),
4141 format: Some(LexStringFormat::Handle),
4142 ..Default::default()
4143 }),
4144 );
4145 map.insert(
4146 SmolStr::new_static("uri"),
4147 LexObjectProperty::String(LexString {
4148 description: Some(CowStr::new_static(
4149 "The AT-URI of the verification record.",
4150 )),
4151 format: Some(LexStringFormat::AtUri),
4152 ..Default::default()
4153 }),
4154 );
4155 map
4156 },
4157 ..Default::default()
4158 }),
4159 );
4160 map.insert(
4161 SmolStr::new_static("viewerState"),
4162 LexUserType::Object(LexObject {
4163 description: Some(
4164 CowStr::new_static(
4165 "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
4166 ),
4167 ),
4168 properties: {
4169 #[allow(unused_mut)]
4170 let mut map = BTreeMap::new();
4171 map.insert(
4172 SmolStr::new_static("activitySubscription"),
4173 LexObjectProperty::Ref(LexRef {
4174 r#ref: CowStr::new_static(
4175 "app.bsky.notification.defs#activitySubscription",
4176 ),
4177 ..Default::default()
4178 }),
4179 );
4180 map.insert(
4181 SmolStr::new_static("blockedBy"),
4182 LexObjectProperty::Boolean(LexBoolean {
4183 ..Default::default()
4184 }),
4185 );
4186 map.insert(
4187 SmolStr::new_static("blocking"),
4188 LexObjectProperty::String(LexString {
4189 format: Some(LexStringFormat::AtUri),
4190 ..Default::default()
4191 }),
4192 );
4193 map.insert(
4194 SmolStr::new_static("blockingByList"),
4195 LexObjectProperty::Ref(LexRef {
4196 r#ref: CowStr::new_static(
4197 "app.bsky.graph.defs#listViewBasic",
4198 ),
4199 ..Default::default()
4200 }),
4201 );
4202 map.insert(
4203 SmolStr::new_static("followedBy"),
4204 LexObjectProperty::String(LexString {
4205 format: Some(LexStringFormat::AtUri),
4206 ..Default::default()
4207 }),
4208 );
4209 map.insert(
4210 SmolStr::new_static("following"),
4211 LexObjectProperty::String(LexString {
4212 format: Some(LexStringFormat::AtUri),
4213 ..Default::default()
4214 }),
4215 );
4216 map.insert(
4217 SmolStr::new_static("knownFollowers"),
4218 LexObjectProperty::Ref(LexRef {
4219 r#ref: CowStr::new_static("#knownFollowers"),
4220 ..Default::default()
4221 }),
4222 );
4223 map.insert(
4224 SmolStr::new_static("muted"),
4225 LexObjectProperty::Boolean(LexBoolean {
4226 ..Default::default()
4227 }),
4228 );
4229 map.insert(
4230 SmolStr::new_static("mutedByList"),
4231 LexObjectProperty::Ref(LexRef {
4232 r#ref: CowStr::new_static(
4233 "app.bsky.graph.defs#listViewBasic",
4234 ),
4235 ..Default::default()
4236 }),
4237 );
4238 map
4239 },
4240 ..Default::default()
4241 }),
4242 );
4243 map
4244 },
4245 ..Default::default()
4246 }
4247}
4248
4249fn _default_feed_view_pref_hide_replies_by_unfollowed() -> Option<bool> {
4250 Some(true)
4251}
4252
4253pub mod hidden_posts_pref_state {
4254
4255 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4256 #[allow(unused)]
4257 use ::core::marker::PhantomData;
4258 mod sealed {
4259 pub trait Sealed {}
4260 }
4261 pub trait State: sealed::Sealed {
4263 type Items;
4264 }
4265 pub struct Empty(());
4267 impl sealed::Sealed for Empty {}
4268 impl State for Empty {
4269 type Items = Unset;
4270 }
4271 pub struct SetItems<St: State = Empty>(PhantomData<fn() -> St>);
4273 impl<St: State> sealed::Sealed for SetItems<St> {}
4274 impl<St: State> State for SetItems<St> {
4275 type Items = Set<members::items>;
4276 }
4277 #[allow(non_camel_case_types)]
4279 pub mod members {
4280 pub struct items(());
4282 }
4283}
4284
4285pub struct HiddenPostsPrefBuilder<St: hidden_posts_pref_state::State, S: BosStr = DefaultStr> {
4287 _state: PhantomData<fn() -> St>,
4288 _fields: (Option<Vec<AtUri<S>>>,),
4289 _type: PhantomData<fn() -> S>,
4290}
4291
4292impl HiddenPostsPref<DefaultStr> {
4293 pub fn new() -> HiddenPostsPrefBuilder<hidden_posts_pref_state::Empty, DefaultStr> {
4295 HiddenPostsPrefBuilder::new()
4296 }
4297}
4298
4299impl<S: BosStr> HiddenPostsPref<S> {
4300 pub fn builder() -> HiddenPostsPrefBuilder<hidden_posts_pref_state::Empty, S> {
4302 HiddenPostsPrefBuilder::builder()
4303 }
4304}
4305
4306impl HiddenPostsPrefBuilder<hidden_posts_pref_state::Empty, DefaultStr> {
4307 pub fn new() -> Self {
4309 HiddenPostsPrefBuilder {
4310 _state: PhantomData,
4311 _fields: (None,),
4312 _type: PhantomData,
4313 }
4314 }
4315}
4316
4317impl<S: BosStr> HiddenPostsPrefBuilder<hidden_posts_pref_state::Empty, S> {
4318 pub fn builder() -> Self {
4320 HiddenPostsPrefBuilder {
4321 _state: PhantomData,
4322 _fields: (None,),
4323 _type: PhantomData,
4324 }
4325 }
4326}
4327
4328impl<St, S: BosStr> HiddenPostsPrefBuilder<St, S>
4329where
4330 St: hidden_posts_pref_state::State,
4331 St::Items: hidden_posts_pref_state::IsUnset,
4332{
4333 pub fn items(
4335 mut self,
4336 value: impl Into<Vec<AtUri<S>>>,
4337 ) -> HiddenPostsPrefBuilder<hidden_posts_pref_state::SetItems<St>, S> {
4338 self._fields.0 = Option::Some(value.into());
4339 HiddenPostsPrefBuilder {
4340 _state: PhantomData,
4341 _fields: self._fields,
4342 _type: PhantomData,
4343 }
4344 }
4345}
4346
4347impl<St, S: BosStr> HiddenPostsPrefBuilder<St, S>
4348where
4349 St: hidden_posts_pref_state::State,
4350 St::Items: hidden_posts_pref_state::IsSet,
4351{
4352 pub fn build(self) -> HiddenPostsPref<S> {
4354 HiddenPostsPref {
4355 items: self._fields.0.unwrap(),
4356 extra_data: Default::default(),
4357 }
4358 }
4359 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> HiddenPostsPref<S> {
4361 HiddenPostsPref {
4362 items: self._fields.0.unwrap(),
4363 extra_data: Some(extra_data),
4364 }
4365 }
4366}
4367
4368pub mod interests_pref_state {
4369
4370 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4371 #[allow(unused)]
4372 use ::core::marker::PhantomData;
4373 mod sealed {
4374 pub trait Sealed {}
4375 }
4376 pub trait State: sealed::Sealed {
4378 type Tags;
4379 }
4380 pub struct Empty(());
4382 impl sealed::Sealed for Empty {}
4383 impl State for Empty {
4384 type Tags = Unset;
4385 }
4386 pub struct SetTags<St: State = Empty>(PhantomData<fn() -> St>);
4388 impl<St: State> sealed::Sealed for SetTags<St> {}
4389 impl<St: State> State for SetTags<St> {
4390 type Tags = Set<members::tags>;
4391 }
4392 #[allow(non_camel_case_types)]
4394 pub mod members {
4395 pub struct tags(());
4397 }
4398}
4399
4400pub struct InterestsPrefBuilder<St: interests_pref_state::State, S: BosStr = DefaultStr> {
4402 _state: PhantomData<fn() -> St>,
4403 _fields: (Option<Vec<S>>,),
4404 _type: PhantomData<fn() -> S>,
4405}
4406
4407impl InterestsPref<DefaultStr> {
4408 pub fn new() -> InterestsPrefBuilder<interests_pref_state::Empty, DefaultStr> {
4410 InterestsPrefBuilder::new()
4411 }
4412}
4413
4414impl<S: BosStr> InterestsPref<S> {
4415 pub fn builder() -> InterestsPrefBuilder<interests_pref_state::Empty, S> {
4417 InterestsPrefBuilder::builder()
4418 }
4419}
4420
4421impl InterestsPrefBuilder<interests_pref_state::Empty, DefaultStr> {
4422 pub fn new() -> Self {
4424 InterestsPrefBuilder {
4425 _state: PhantomData,
4426 _fields: (None,),
4427 _type: PhantomData,
4428 }
4429 }
4430}
4431
4432impl<S: BosStr> InterestsPrefBuilder<interests_pref_state::Empty, S> {
4433 pub fn builder() -> Self {
4435 InterestsPrefBuilder {
4436 _state: PhantomData,
4437 _fields: (None,),
4438 _type: PhantomData,
4439 }
4440 }
4441}
4442
4443impl<St, S: BosStr> InterestsPrefBuilder<St, S>
4444where
4445 St: interests_pref_state::State,
4446 St::Tags: interests_pref_state::IsUnset,
4447{
4448 pub fn tags(
4450 mut self,
4451 value: impl Into<Vec<S>>,
4452 ) -> InterestsPrefBuilder<interests_pref_state::SetTags<St>, S> {
4453 self._fields.0 = Option::Some(value.into());
4454 InterestsPrefBuilder {
4455 _state: PhantomData,
4456 _fields: self._fields,
4457 _type: PhantomData,
4458 }
4459 }
4460}
4461
4462impl<St, S: BosStr> InterestsPrefBuilder<St, S>
4463where
4464 St: interests_pref_state::State,
4465 St::Tags: interests_pref_state::IsSet,
4466{
4467 pub fn build(self) -> InterestsPref<S> {
4469 InterestsPref {
4470 tags: self._fields.0.unwrap(),
4471 extra_data: Default::default(),
4472 }
4473 }
4474 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> InterestsPref<S> {
4476 InterestsPref {
4477 tags: self._fields.0.unwrap(),
4478 extra_data: Some(extra_data),
4479 }
4480 }
4481}
4482
4483pub mod known_followers_state {
4484
4485 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4486 #[allow(unused)]
4487 use ::core::marker::PhantomData;
4488 mod sealed {
4489 pub trait Sealed {}
4490 }
4491 pub trait State: sealed::Sealed {
4493 type Count;
4494 type Followers;
4495 }
4496 pub struct Empty(());
4498 impl sealed::Sealed for Empty {}
4499 impl State for Empty {
4500 type Count = Unset;
4501 type Followers = Unset;
4502 }
4503 pub struct SetCount<St: State = Empty>(PhantomData<fn() -> St>);
4505 impl<St: State> sealed::Sealed for SetCount<St> {}
4506 impl<St: State> State for SetCount<St> {
4507 type Count = Set<members::count>;
4508 type Followers = St::Followers;
4509 }
4510 pub struct SetFollowers<St: State = Empty>(PhantomData<fn() -> St>);
4512 impl<St: State> sealed::Sealed for SetFollowers<St> {}
4513 impl<St: State> State for SetFollowers<St> {
4514 type Count = St::Count;
4515 type Followers = Set<members::followers>;
4516 }
4517 #[allow(non_camel_case_types)]
4519 pub mod members {
4520 pub struct count(());
4522 pub struct followers(());
4524 }
4525}
4526
4527pub struct KnownFollowersBuilder<St: known_followers_state::State, S: BosStr = DefaultStr> {
4529 _state: PhantomData<fn() -> St>,
4530 _fields: (Option<i64>, Option<Vec<actor::ProfileViewBasic<S>>>),
4531 _type: PhantomData<fn() -> S>,
4532}
4533
4534impl KnownFollowers<DefaultStr> {
4535 pub fn new() -> KnownFollowersBuilder<known_followers_state::Empty, DefaultStr> {
4537 KnownFollowersBuilder::new()
4538 }
4539}
4540
4541impl<S: BosStr> KnownFollowers<S> {
4542 pub fn builder() -> KnownFollowersBuilder<known_followers_state::Empty, S> {
4544 KnownFollowersBuilder::builder()
4545 }
4546}
4547
4548impl KnownFollowersBuilder<known_followers_state::Empty, DefaultStr> {
4549 pub fn new() -> Self {
4551 KnownFollowersBuilder {
4552 _state: PhantomData,
4553 _fields: (None, None),
4554 _type: PhantomData,
4555 }
4556 }
4557}
4558
4559impl<S: BosStr> KnownFollowersBuilder<known_followers_state::Empty, S> {
4560 pub fn builder() -> Self {
4562 KnownFollowersBuilder {
4563 _state: PhantomData,
4564 _fields: (None, None),
4565 _type: PhantomData,
4566 }
4567 }
4568}
4569
4570impl<St, S: BosStr> KnownFollowersBuilder<St, S>
4571where
4572 St: known_followers_state::State,
4573 St::Count: known_followers_state::IsUnset,
4574{
4575 pub fn count(
4577 mut self,
4578 value: impl Into<i64>,
4579 ) -> KnownFollowersBuilder<known_followers_state::SetCount<St>, S> {
4580 self._fields.0 = Option::Some(value.into());
4581 KnownFollowersBuilder {
4582 _state: PhantomData,
4583 _fields: self._fields,
4584 _type: PhantomData,
4585 }
4586 }
4587}
4588
4589impl<St, S: BosStr> KnownFollowersBuilder<St, S>
4590where
4591 St: known_followers_state::State,
4592 St::Followers: known_followers_state::IsUnset,
4593{
4594 pub fn followers(
4596 mut self,
4597 value: impl Into<Vec<actor::ProfileViewBasic<S>>>,
4598 ) -> KnownFollowersBuilder<known_followers_state::SetFollowers<St>, S> {
4599 self._fields.1 = Option::Some(value.into());
4600 KnownFollowersBuilder {
4601 _state: PhantomData,
4602 _fields: self._fields,
4603 _type: PhantomData,
4604 }
4605 }
4606}
4607
4608impl<St, S: BosStr> KnownFollowersBuilder<St, S>
4609where
4610 St: known_followers_state::State,
4611 St::Count: known_followers_state::IsSet,
4612 St::Followers: known_followers_state::IsSet,
4613{
4614 pub fn build(self) -> KnownFollowers<S> {
4616 KnownFollowers {
4617 count: self._fields.0.unwrap(),
4618 followers: self._fields.1.unwrap(),
4619 extra_data: Default::default(),
4620 }
4621 }
4622 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> KnownFollowers<S> {
4624 KnownFollowers {
4625 count: self._fields.0.unwrap(),
4626 followers: self._fields.1.unwrap(),
4627 extra_data: Some(extra_data),
4628 }
4629 }
4630}
4631
4632pub mod labeler_pref_item_state {
4633
4634 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4635 #[allow(unused)]
4636 use ::core::marker::PhantomData;
4637 mod sealed {
4638 pub trait Sealed {}
4639 }
4640 pub trait State: sealed::Sealed {
4642 type Did;
4643 }
4644 pub struct Empty(());
4646 impl sealed::Sealed for Empty {}
4647 impl State for Empty {
4648 type Did = Unset;
4649 }
4650 pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
4652 impl<St: State> sealed::Sealed for SetDid<St> {}
4653 impl<St: State> State for SetDid<St> {
4654 type Did = Set<members::did>;
4655 }
4656 #[allow(non_camel_case_types)]
4658 pub mod members {
4659 pub struct did(());
4661 }
4662}
4663
4664pub struct LabelerPrefItemBuilder<St: labeler_pref_item_state::State, S: BosStr = DefaultStr> {
4666 _state: PhantomData<fn() -> St>,
4667 _fields: (Option<Did<S>>,),
4668 _type: PhantomData<fn() -> S>,
4669}
4670
4671impl LabelerPrefItem<DefaultStr> {
4672 pub fn new() -> LabelerPrefItemBuilder<labeler_pref_item_state::Empty, DefaultStr> {
4674 LabelerPrefItemBuilder::new()
4675 }
4676}
4677
4678impl<S: BosStr> LabelerPrefItem<S> {
4679 pub fn builder() -> LabelerPrefItemBuilder<labeler_pref_item_state::Empty, S> {
4681 LabelerPrefItemBuilder::builder()
4682 }
4683}
4684
4685impl LabelerPrefItemBuilder<labeler_pref_item_state::Empty, DefaultStr> {
4686 pub fn new() -> Self {
4688 LabelerPrefItemBuilder {
4689 _state: PhantomData,
4690 _fields: (None,),
4691 _type: PhantomData,
4692 }
4693 }
4694}
4695
4696impl<S: BosStr> LabelerPrefItemBuilder<labeler_pref_item_state::Empty, S> {
4697 pub fn builder() -> Self {
4699 LabelerPrefItemBuilder {
4700 _state: PhantomData,
4701 _fields: (None,),
4702 _type: PhantomData,
4703 }
4704 }
4705}
4706
4707impl<St, S: BosStr> LabelerPrefItemBuilder<St, S>
4708where
4709 St: labeler_pref_item_state::State,
4710 St::Did: labeler_pref_item_state::IsUnset,
4711{
4712 pub fn did(
4714 mut self,
4715 value: impl Into<Did<S>>,
4716 ) -> LabelerPrefItemBuilder<labeler_pref_item_state::SetDid<St>, S> {
4717 self._fields.0 = Option::Some(value.into());
4718 LabelerPrefItemBuilder {
4719 _state: PhantomData,
4720 _fields: self._fields,
4721 _type: PhantomData,
4722 }
4723 }
4724}
4725
4726impl<St, S: BosStr> LabelerPrefItemBuilder<St, S>
4727where
4728 St: labeler_pref_item_state::State,
4729 St::Did: labeler_pref_item_state::IsSet,
4730{
4731 pub fn build(self) -> LabelerPrefItem<S> {
4733 LabelerPrefItem {
4734 did: self._fields.0.unwrap(),
4735 extra_data: Default::default(),
4736 }
4737 }
4738 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> LabelerPrefItem<S> {
4740 LabelerPrefItem {
4741 did: self._fields.0.unwrap(),
4742 extra_data: Some(extra_data),
4743 }
4744 }
4745}
4746
4747pub mod labelers_pref_state {
4748
4749 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4750 #[allow(unused)]
4751 use ::core::marker::PhantomData;
4752 mod sealed {
4753 pub trait Sealed {}
4754 }
4755 pub trait State: sealed::Sealed {
4757 type Labelers;
4758 }
4759 pub struct Empty(());
4761 impl sealed::Sealed for Empty {}
4762 impl State for Empty {
4763 type Labelers = Unset;
4764 }
4765 pub struct SetLabelers<St: State = Empty>(PhantomData<fn() -> St>);
4767 impl<St: State> sealed::Sealed for SetLabelers<St> {}
4768 impl<St: State> State for SetLabelers<St> {
4769 type Labelers = Set<members::labelers>;
4770 }
4771 #[allow(non_camel_case_types)]
4773 pub mod members {
4774 pub struct labelers(());
4776 }
4777}
4778
4779pub struct LabelersPrefBuilder<St: labelers_pref_state::State, S: BosStr = DefaultStr> {
4781 _state: PhantomData<fn() -> St>,
4782 _fields: (Option<Vec<actor::LabelerPrefItem<S>>>,),
4783 _type: PhantomData<fn() -> S>,
4784}
4785
4786impl LabelersPref<DefaultStr> {
4787 pub fn new() -> LabelersPrefBuilder<labelers_pref_state::Empty, DefaultStr> {
4789 LabelersPrefBuilder::new()
4790 }
4791}
4792
4793impl<S: BosStr> LabelersPref<S> {
4794 pub fn builder() -> LabelersPrefBuilder<labelers_pref_state::Empty, S> {
4796 LabelersPrefBuilder::builder()
4797 }
4798}
4799
4800impl LabelersPrefBuilder<labelers_pref_state::Empty, DefaultStr> {
4801 pub fn new() -> Self {
4803 LabelersPrefBuilder {
4804 _state: PhantomData,
4805 _fields: (None,),
4806 _type: PhantomData,
4807 }
4808 }
4809}
4810
4811impl<S: BosStr> LabelersPrefBuilder<labelers_pref_state::Empty, S> {
4812 pub fn builder() -> Self {
4814 LabelersPrefBuilder {
4815 _state: PhantomData,
4816 _fields: (None,),
4817 _type: PhantomData,
4818 }
4819 }
4820}
4821
4822impl<St, S: BosStr> LabelersPrefBuilder<St, S>
4823where
4824 St: labelers_pref_state::State,
4825 St::Labelers: labelers_pref_state::IsUnset,
4826{
4827 pub fn labelers(
4829 mut self,
4830 value: impl Into<Vec<actor::LabelerPrefItem<S>>>,
4831 ) -> LabelersPrefBuilder<labelers_pref_state::SetLabelers<St>, S> {
4832 self._fields.0 = Option::Some(value.into());
4833 LabelersPrefBuilder {
4834 _state: PhantomData,
4835 _fields: self._fields,
4836 _type: PhantomData,
4837 }
4838 }
4839}
4840
4841impl<St, S: BosStr> LabelersPrefBuilder<St, S>
4842where
4843 St: labelers_pref_state::State,
4844 St::Labelers: labelers_pref_state::IsSet,
4845{
4846 pub fn build(self) -> LabelersPref<S> {
4848 LabelersPref {
4849 labelers: self._fields.0.unwrap(),
4850 extra_data: Default::default(),
4851 }
4852 }
4853 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> LabelersPref<S> {
4855 LabelersPref {
4856 labelers: self._fields.0.unwrap(),
4857 extra_data: Some(extra_data),
4858 }
4859 }
4860}
4861
4862fn _default_live_event_preferences_hide_all_feeds() -> Option<bool> {
4863 Some(false)
4864}
4865
4866impl Default for LiveEventPreferences {
4867 fn default() -> Self {
4868 Self {
4869 hidden_feed_ids: None,
4870 hide_all_feeds: Some(false),
4871 extra_data: Default::default(),
4872 }
4873 }
4874}
4875
4876pub mod muted_word_state {
4877
4878 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4879 #[allow(unused)]
4880 use ::core::marker::PhantomData;
4881 mod sealed {
4882 pub trait Sealed {}
4883 }
4884 pub trait State: sealed::Sealed {
4886 type Targets;
4887 type Value;
4888 }
4889 pub struct Empty(());
4891 impl sealed::Sealed for Empty {}
4892 impl State for Empty {
4893 type Targets = Unset;
4894 type Value = Unset;
4895 }
4896 pub struct SetTargets<St: State = Empty>(PhantomData<fn() -> St>);
4898 impl<St: State> sealed::Sealed for SetTargets<St> {}
4899 impl<St: State> State for SetTargets<St> {
4900 type Targets = Set<members::targets>;
4901 type Value = St::Value;
4902 }
4903 pub struct SetValue<St: State = Empty>(PhantomData<fn() -> St>);
4905 impl<St: State> sealed::Sealed for SetValue<St> {}
4906 impl<St: State> State for SetValue<St> {
4907 type Targets = St::Targets;
4908 type Value = Set<members::value>;
4909 }
4910 #[allow(non_camel_case_types)]
4912 pub mod members {
4913 pub struct targets(());
4915 pub struct value(());
4917 }
4918}
4919
4920pub struct MutedWordBuilder<St: muted_word_state::State, S: BosStr = DefaultStr> {
4922 _state: PhantomData<fn() -> St>,
4923 _fields: (
4924 Option<MutedWordActorTarget<S>>,
4925 Option<Datetime>,
4926 Option<S>,
4927 Option<Vec<actor::MutedWordTarget<S>>>,
4928 Option<S>,
4929 ),
4930 _type: PhantomData<fn() -> S>,
4931}
4932
4933impl MutedWord<DefaultStr> {
4934 pub fn new() -> MutedWordBuilder<muted_word_state::Empty, DefaultStr> {
4936 MutedWordBuilder::new()
4937 }
4938}
4939
4940impl<S: BosStr> MutedWord<S> {
4941 pub fn builder() -> MutedWordBuilder<muted_word_state::Empty, S> {
4943 MutedWordBuilder::builder()
4944 }
4945}
4946
4947impl MutedWordBuilder<muted_word_state::Empty, DefaultStr> {
4948 pub fn new() -> Self {
4950 MutedWordBuilder {
4951 _state: PhantomData,
4952 _fields: (None, None, None, None, None),
4953 _type: PhantomData,
4954 }
4955 }
4956}
4957
4958impl<S: BosStr> MutedWordBuilder<muted_word_state::Empty, S> {
4959 pub fn builder() -> Self {
4961 MutedWordBuilder {
4962 _state: PhantomData,
4963 _fields: (None, None, None, None, None),
4964 _type: PhantomData,
4965 }
4966 }
4967}
4968
4969impl<St: muted_word_state::State, S: BosStr> MutedWordBuilder<St, S> {
4970 pub fn actor_target(mut self, value: impl Into<Option<MutedWordActorTarget<S>>>) -> Self {
4972 self._fields.0 = value.into();
4973 self
4974 }
4975 pub fn maybe_actor_target(mut self, value: Option<MutedWordActorTarget<S>>) -> Self {
4977 self._fields.0 = value;
4978 self
4979 }
4980}
4981
4982impl<St: muted_word_state::State, S: BosStr> MutedWordBuilder<St, S> {
4983 pub fn expires_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
4985 self._fields.1 = value.into();
4986 self
4987 }
4988 pub fn maybe_expires_at(mut self, value: Option<Datetime>) -> Self {
4990 self._fields.1 = value;
4991 self
4992 }
4993}
4994
4995impl<St: muted_word_state::State, S: BosStr> MutedWordBuilder<St, S> {
4996 pub fn id(mut self, value: impl Into<Option<S>>) -> Self {
4998 self._fields.2 = value.into();
4999 self
5000 }
5001 pub fn maybe_id(mut self, value: Option<S>) -> Self {
5003 self._fields.2 = value;
5004 self
5005 }
5006}
5007
5008impl<St, S: BosStr> MutedWordBuilder<St, S>
5009where
5010 St: muted_word_state::State,
5011 St::Targets: muted_word_state::IsUnset,
5012{
5013 pub fn targets(
5015 mut self,
5016 value: impl Into<Vec<actor::MutedWordTarget<S>>>,
5017 ) -> MutedWordBuilder<muted_word_state::SetTargets<St>, S> {
5018 self._fields.3 = Option::Some(value.into());
5019 MutedWordBuilder {
5020 _state: PhantomData,
5021 _fields: self._fields,
5022 _type: PhantomData,
5023 }
5024 }
5025}
5026
5027impl<St, S: BosStr> MutedWordBuilder<St, S>
5028where
5029 St: muted_word_state::State,
5030 St::Value: muted_word_state::IsUnset,
5031{
5032 pub fn value(
5034 mut self,
5035 value: impl Into<S>,
5036 ) -> MutedWordBuilder<muted_word_state::SetValue<St>, S> {
5037 self._fields.4 = Option::Some(value.into());
5038 MutedWordBuilder {
5039 _state: PhantomData,
5040 _fields: self._fields,
5041 _type: PhantomData,
5042 }
5043 }
5044}
5045
5046impl<St, S: BosStr> MutedWordBuilder<St, S>
5047where
5048 St: muted_word_state::State,
5049 St::Targets: muted_word_state::IsSet,
5050 St::Value: muted_word_state::IsSet,
5051{
5052 pub fn build(self) -> MutedWord<S> {
5054 MutedWord {
5055 actor_target: self._fields.0,
5056 expires_at: self._fields.1,
5057 id: self._fields.2,
5058 targets: self._fields.3.unwrap(),
5059 value: self._fields.4.unwrap(),
5060 extra_data: Default::default(),
5061 }
5062 }
5063 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> MutedWord<S> {
5065 MutedWord {
5066 actor_target: self._fields.0,
5067 expires_at: self._fields.1,
5068 id: self._fields.2,
5069 targets: self._fields.3.unwrap(),
5070 value: self._fields.4.unwrap(),
5071 extra_data: Some(extra_data),
5072 }
5073 }
5074}
5075
5076pub mod muted_words_pref_state {
5077
5078 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
5079 #[allow(unused)]
5080 use ::core::marker::PhantomData;
5081 mod sealed {
5082 pub trait Sealed {}
5083 }
5084 pub trait State: sealed::Sealed {
5086 type Items;
5087 }
5088 pub struct Empty(());
5090 impl sealed::Sealed for Empty {}
5091 impl State for Empty {
5092 type Items = Unset;
5093 }
5094 pub struct SetItems<St: State = Empty>(PhantomData<fn() -> St>);
5096 impl<St: State> sealed::Sealed for SetItems<St> {}
5097 impl<St: State> State for SetItems<St> {
5098 type Items = Set<members::items>;
5099 }
5100 #[allow(non_camel_case_types)]
5102 pub mod members {
5103 pub struct items(());
5105 }
5106}
5107
5108pub struct MutedWordsPrefBuilder<St: muted_words_pref_state::State, S: BosStr = DefaultStr> {
5110 _state: PhantomData<fn() -> St>,
5111 _fields: (Option<Vec<actor::MutedWord<S>>>,),
5112 _type: PhantomData<fn() -> S>,
5113}
5114
5115impl MutedWordsPref<DefaultStr> {
5116 pub fn new() -> MutedWordsPrefBuilder<muted_words_pref_state::Empty, DefaultStr> {
5118 MutedWordsPrefBuilder::new()
5119 }
5120}
5121
5122impl<S: BosStr> MutedWordsPref<S> {
5123 pub fn builder() -> MutedWordsPrefBuilder<muted_words_pref_state::Empty, S> {
5125 MutedWordsPrefBuilder::builder()
5126 }
5127}
5128
5129impl MutedWordsPrefBuilder<muted_words_pref_state::Empty, DefaultStr> {
5130 pub fn new() -> Self {
5132 MutedWordsPrefBuilder {
5133 _state: PhantomData,
5134 _fields: (None,),
5135 _type: PhantomData,
5136 }
5137 }
5138}
5139
5140impl<S: BosStr> MutedWordsPrefBuilder<muted_words_pref_state::Empty, S> {
5141 pub fn builder() -> Self {
5143 MutedWordsPrefBuilder {
5144 _state: PhantomData,
5145 _fields: (None,),
5146 _type: PhantomData,
5147 }
5148 }
5149}
5150
5151impl<St, S: BosStr> MutedWordsPrefBuilder<St, S>
5152where
5153 St: muted_words_pref_state::State,
5154 St::Items: muted_words_pref_state::IsUnset,
5155{
5156 pub fn items(
5158 mut self,
5159 value: impl Into<Vec<actor::MutedWord<S>>>,
5160 ) -> MutedWordsPrefBuilder<muted_words_pref_state::SetItems<St>, S> {
5161 self._fields.0 = Option::Some(value.into());
5162 MutedWordsPrefBuilder {
5163 _state: PhantomData,
5164 _fields: self._fields,
5165 _type: PhantomData,
5166 }
5167 }
5168}
5169
5170impl<St, S: BosStr> MutedWordsPrefBuilder<St, S>
5171where
5172 St: muted_words_pref_state::State,
5173 St::Items: muted_words_pref_state::IsSet,
5174{
5175 pub fn build(self) -> MutedWordsPref<S> {
5177 MutedWordsPref {
5178 items: self._fields.0.unwrap(),
5179 extra_data: Default::default(),
5180 }
5181 }
5182 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> MutedWordsPref<S> {
5184 MutedWordsPref {
5185 items: self._fields.0.unwrap(),
5186 extra_data: Some(extra_data),
5187 }
5188 }
5189}
5190
5191fn _default_nux_completed() -> bool {
5192 false
5193}
5194
5195pub mod nux_state {
5196
5197 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
5198 #[allow(unused)]
5199 use ::core::marker::PhantomData;
5200 mod sealed {
5201 pub trait Sealed {}
5202 }
5203 pub trait State: sealed::Sealed {
5205 type Completed;
5206 type Id;
5207 }
5208 pub struct Empty(());
5210 impl sealed::Sealed for Empty {}
5211 impl State for Empty {
5212 type Completed = Unset;
5213 type Id = Unset;
5214 }
5215 pub struct SetCompleted<St: State = Empty>(PhantomData<fn() -> St>);
5217 impl<St: State> sealed::Sealed for SetCompleted<St> {}
5218 impl<St: State> State for SetCompleted<St> {
5219 type Completed = Set<members::completed>;
5220 type Id = St::Id;
5221 }
5222 pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>);
5224 impl<St: State> sealed::Sealed for SetId<St> {}
5225 impl<St: State> State for SetId<St> {
5226 type Completed = St::Completed;
5227 type Id = Set<members::id>;
5228 }
5229 #[allow(non_camel_case_types)]
5231 pub mod members {
5232 pub struct completed(());
5234 pub struct id(());
5236 }
5237}
5238
5239pub struct NuxBuilder<St: nux_state::State, S: BosStr = DefaultStr> {
5241 _state: PhantomData<fn() -> St>,
5242 _fields: (Option<bool>, Option<S>, Option<Datetime>, Option<S>),
5243 _type: PhantomData<fn() -> S>,
5244}
5245
5246impl Nux<DefaultStr> {
5247 pub fn new() -> NuxBuilder<nux_state::Empty, DefaultStr> {
5249 NuxBuilder::new()
5250 }
5251}
5252
5253impl<S: BosStr> Nux<S> {
5254 pub fn builder() -> NuxBuilder<nux_state::Empty, S> {
5256 NuxBuilder::builder()
5257 }
5258}
5259
5260impl NuxBuilder<nux_state::Empty, DefaultStr> {
5261 pub fn new() -> Self {
5263 NuxBuilder {
5264 _state: PhantomData,
5265 _fields: (None, None, None, None),
5266 _type: PhantomData,
5267 }
5268 }
5269}
5270
5271impl<S: BosStr> NuxBuilder<nux_state::Empty, S> {
5272 pub fn builder() -> Self {
5274 NuxBuilder {
5275 _state: PhantomData,
5276 _fields: (None, None, None, None),
5277 _type: PhantomData,
5278 }
5279 }
5280}
5281
5282impl<St, S: BosStr> NuxBuilder<St, S>
5283where
5284 St: nux_state::State,
5285 St::Completed: nux_state::IsUnset,
5286{
5287 pub fn completed(
5289 mut self,
5290 value: impl Into<bool>,
5291 ) -> NuxBuilder<nux_state::SetCompleted<St>, S> {
5292 self._fields.0 = Option::Some(value.into());
5293 NuxBuilder {
5294 _state: PhantomData,
5295 _fields: self._fields,
5296 _type: PhantomData,
5297 }
5298 }
5299}
5300
5301impl<St: nux_state::State, S: BosStr> NuxBuilder<St, S> {
5302 pub fn data(mut self, value: impl Into<Option<S>>) -> Self {
5304 self._fields.1 = value.into();
5305 self
5306 }
5307 pub fn maybe_data(mut self, value: Option<S>) -> Self {
5309 self._fields.1 = value;
5310 self
5311 }
5312}
5313
5314impl<St: nux_state::State, S: BosStr> NuxBuilder<St, S> {
5315 pub fn expires_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
5317 self._fields.2 = value.into();
5318 self
5319 }
5320 pub fn maybe_expires_at(mut self, value: Option<Datetime>) -> Self {
5322 self._fields.2 = value;
5323 self
5324 }
5325}
5326
5327impl<St, S: BosStr> NuxBuilder<St, S>
5328where
5329 St: nux_state::State,
5330 St::Id: nux_state::IsUnset,
5331{
5332 pub fn id(mut self, value: impl Into<S>) -> NuxBuilder<nux_state::SetId<St>, S> {
5334 self._fields.3 = Option::Some(value.into());
5335 NuxBuilder {
5336 _state: PhantomData,
5337 _fields: self._fields,
5338 _type: PhantomData,
5339 }
5340 }
5341}
5342
5343impl<St, S: BosStr> NuxBuilder<St, S>
5344where
5345 St: nux_state::State,
5346 St::Completed: nux_state::IsSet,
5347 St::Id: nux_state::IsSet,
5348{
5349 pub fn build(self) -> Nux<S> {
5351 Nux {
5352 completed: self._fields.0.unwrap(),
5353 data: self._fields.1,
5354 expires_at: self._fields.2,
5355 id: self._fields.3.unwrap(),
5356 extra_data: Default::default(),
5357 }
5358 }
5359 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> Nux<S> {
5361 Nux {
5362 completed: self._fields.0.unwrap(),
5363 data: self._fields.1,
5364 expires_at: self._fields.2,
5365 id: self._fields.3.unwrap(),
5366 extra_data: Some(extra_data),
5367 }
5368 }
5369}
5370
5371pub mod profile_associated_germ_state {
5372
5373 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
5374 #[allow(unused)]
5375 use ::core::marker::PhantomData;
5376 mod sealed {
5377 pub trait Sealed {}
5378 }
5379 pub trait State: sealed::Sealed {
5381 type MessageMeUrl;
5382 type ShowButtonTo;
5383 }
5384 pub struct Empty(());
5386 impl sealed::Sealed for Empty {}
5387 impl State for Empty {
5388 type MessageMeUrl = Unset;
5389 type ShowButtonTo = Unset;
5390 }
5391 pub struct SetMessageMeUrl<St: State = Empty>(PhantomData<fn() -> St>);
5393 impl<St: State> sealed::Sealed for SetMessageMeUrl<St> {}
5394 impl<St: State> State for SetMessageMeUrl<St> {
5395 type MessageMeUrl = Set<members::message_me_url>;
5396 type ShowButtonTo = St::ShowButtonTo;
5397 }
5398 pub struct SetShowButtonTo<St: State = Empty>(PhantomData<fn() -> St>);
5400 impl<St: State> sealed::Sealed for SetShowButtonTo<St> {}
5401 impl<St: State> State for SetShowButtonTo<St> {
5402 type MessageMeUrl = St::MessageMeUrl;
5403 type ShowButtonTo = Set<members::show_button_to>;
5404 }
5405 #[allow(non_camel_case_types)]
5407 pub mod members {
5408 pub struct message_me_url(());
5410 pub struct show_button_to(());
5412 }
5413}
5414
5415pub struct ProfileAssociatedGermBuilder<
5417 St: profile_associated_germ_state::State,
5418 S: BosStr = DefaultStr,
5419> {
5420 _state: PhantomData<fn() -> St>,
5421 _fields: (
5422 Option<UriValue<S>>,
5423 Option<ProfileAssociatedGermShowButtonTo<S>>,
5424 ),
5425 _type: PhantomData<fn() -> S>,
5426}
5427
5428impl ProfileAssociatedGerm<DefaultStr> {
5429 pub fn new() -> ProfileAssociatedGermBuilder<profile_associated_germ_state::Empty, DefaultStr> {
5431 ProfileAssociatedGermBuilder::new()
5432 }
5433}
5434
5435impl<S: BosStr> ProfileAssociatedGerm<S> {
5436 pub fn builder() -> ProfileAssociatedGermBuilder<profile_associated_germ_state::Empty, S> {
5438 ProfileAssociatedGermBuilder::builder()
5439 }
5440}
5441
5442impl ProfileAssociatedGermBuilder<profile_associated_germ_state::Empty, DefaultStr> {
5443 pub fn new() -> Self {
5445 ProfileAssociatedGermBuilder {
5446 _state: PhantomData,
5447 _fields: (None, None),
5448 _type: PhantomData,
5449 }
5450 }
5451}
5452
5453impl<S: BosStr> ProfileAssociatedGermBuilder<profile_associated_germ_state::Empty, S> {
5454 pub fn builder() -> Self {
5456 ProfileAssociatedGermBuilder {
5457 _state: PhantomData,
5458 _fields: (None, None),
5459 _type: PhantomData,
5460 }
5461 }
5462}
5463
5464impl<St, S: BosStr> ProfileAssociatedGermBuilder<St, S>
5465where
5466 St: profile_associated_germ_state::State,
5467 St::MessageMeUrl: profile_associated_germ_state::IsUnset,
5468{
5469 pub fn message_me_url(
5471 mut self,
5472 value: impl Into<UriValue<S>>,
5473 ) -> ProfileAssociatedGermBuilder<profile_associated_germ_state::SetMessageMeUrl<St>, S> {
5474 self._fields.0 = Option::Some(value.into());
5475 ProfileAssociatedGermBuilder {
5476 _state: PhantomData,
5477 _fields: self._fields,
5478 _type: PhantomData,
5479 }
5480 }
5481}
5482
5483impl<St, S: BosStr> ProfileAssociatedGermBuilder<St, S>
5484where
5485 St: profile_associated_germ_state::State,
5486 St::ShowButtonTo: profile_associated_germ_state::IsUnset,
5487{
5488 pub fn show_button_to(
5490 mut self,
5491 value: impl Into<ProfileAssociatedGermShowButtonTo<S>>,
5492 ) -> ProfileAssociatedGermBuilder<profile_associated_germ_state::SetShowButtonTo<St>, S> {
5493 self._fields.1 = Option::Some(value.into());
5494 ProfileAssociatedGermBuilder {
5495 _state: PhantomData,
5496 _fields: self._fields,
5497 _type: PhantomData,
5498 }
5499 }
5500}
5501
5502impl<St, S: BosStr> ProfileAssociatedGermBuilder<St, S>
5503where
5504 St: profile_associated_germ_state::State,
5505 St::MessageMeUrl: profile_associated_germ_state::IsSet,
5506 St::ShowButtonTo: profile_associated_germ_state::IsSet,
5507{
5508 pub fn build(self) -> ProfileAssociatedGerm<S> {
5510 ProfileAssociatedGerm {
5511 message_me_url: self._fields.0.unwrap(),
5512 show_button_to: self._fields.1.unwrap(),
5513 extra_data: Default::default(),
5514 }
5515 }
5516 pub fn build_with_data(
5518 self,
5519 extra_data: BTreeMap<SmolStr, Data<S>>,
5520 ) -> ProfileAssociatedGerm<S> {
5521 ProfileAssociatedGerm {
5522 message_me_url: self._fields.0.unwrap(),
5523 show_button_to: self._fields.1.unwrap(),
5524 extra_data: Some(extra_data),
5525 }
5526 }
5527}
5528
5529pub mod profile_view_state {
5530
5531 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
5532 #[allow(unused)]
5533 use ::core::marker::PhantomData;
5534 mod sealed {
5535 pub trait Sealed {}
5536 }
5537 pub trait State: sealed::Sealed {
5539 type Did;
5540 type Handle;
5541 }
5542 pub struct Empty(());
5544 impl sealed::Sealed for Empty {}
5545 impl State for Empty {
5546 type Did = Unset;
5547 type Handle = Unset;
5548 }
5549 pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
5551 impl<St: State> sealed::Sealed for SetDid<St> {}
5552 impl<St: State> State for SetDid<St> {
5553 type Did = Set<members::did>;
5554 type Handle = St::Handle;
5555 }
5556 pub struct SetHandle<St: State = Empty>(PhantomData<fn() -> St>);
5558 impl<St: State> sealed::Sealed for SetHandle<St> {}
5559 impl<St: State> State for SetHandle<St> {
5560 type Did = St::Did;
5561 type Handle = Set<members::handle>;
5562 }
5563 #[allow(non_camel_case_types)]
5565 pub mod members {
5566 pub struct did(());
5568 pub struct handle(());
5570 }
5571}
5572
5573pub struct ProfileViewBuilder<St: profile_view_state::State, S: BosStr = DefaultStr> {
5575 _state: PhantomData<fn() -> St>,
5576 _fields: (
5577 Option<actor::ProfileAssociated<S>>,
5578 Option<UriValue<S>>,
5579 Option<Datetime>,
5580 Option<Data<S>>,
5581 Option<S>,
5582 Option<Did<S>>,
5583 Option<S>,
5584 Option<Handle<S>>,
5585 Option<Datetime>,
5586 Option<Vec<Label<S>>>,
5587 Option<S>,
5588 Option<actor::StatusView<S>>,
5589 Option<actor::VerificationState<S>>,
5590 Option<actor::ViewerState<S>>,
5591 ),
5592 _type: PhantomData<fn() -> S>,
5593}
5594
5595impl ProfileView<DefaultStr> {
5596 pub fn new() -> ProfileViewBuilder<profile_view_state::Empty, DefaultStr> {
5598 ProfileViewBuilder::new()
5599 }
5600}
5601
5602impl<S: BosStr> ProfileView<S> {
5603 pub fn builder() -> ProfileViewBuilder<profile_view_state::Empty, S> {
5605 ProfileViewBuilder::builder()
5606 }
5607}
5608
5609impl ProfileViewBuilder<profile_view_state::Empty, DefaultStr> {
5610 pub fn new() -> Self {
5612 ProfileViewBuilder {
5613 _state: PhantomData,
5614 _fields: (
5615 None, None, None, None, None, None, None, None, None, None, None, None, None, None,
5616 ),
5617 _type: PhantomData,
5618 }
5619 }
5620}
5621
5622impl<S: BosStr> ProfileViewBuilder<profile_view_state::Empty, S> {
5623 pub fn builder() -> Self {
5625 ProfileViewBuilder {
5626 _state: PhantomData,
5627 _fields: (
5628 None, None, None, None, None, None, None, None, None, None, None, None, None, None,
5629 ),
5630 _type: PhantomData,
5631 }
5632 }
5633}
5634
5635impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5636 pub fn associated(mut self, value: impl Into<Option<actor::ProfileAssociated<S>>>) -> Self {
5638 self._fields.0 = value.into();
5639 self
5640 }
5641 pub fn maybe_associated(mut self, value: Option<actor::ProfileAssociated<S>>) -> Self {
5643 self._fields.0 = value;
5644 self
5645 }
5646}
5647
5648impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5649 pub fn avatar(mut self, value: impl Into<Option<UriValue<S>>>) -> Self {
5651 self._fields.1 = value.into();
5652 self
5653 }
5654 pub fn maybe_avatar(mut self, value: Option<UriValue<S>>) -> Self {
5656 self._fields.1 = value;
5657 self
5658 }
5659}
5660
5661impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5662 pub fn created_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
5664 self._fields.2 = value.into();
5665 self
5666 }
5667 pub fn maybe_created_at(mut self, value: Option<Datetime>) -> Self {
5669 self._fields.2 = value;
5670 self
5671 }
5672}
5673
5674impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5675 pub fn debug(mut self, value: impl Into<Option<Data<S>>>) -> Self {
5677 self._fields.3 = value.into();
5678 self
5679 }
5680 pub fn maybe_debug(mut self, value: Option<Data<S>>) -> Self {
5682 self._fields.3 = value;
5683 self
5684 }
5685}
5686
5687impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5688 pub fn description(mut self, value: impl Into<Option<S>>) -> Self {
5690 self._fields.4 = value.into();
5691 self
5692 }
5693 pub fn maybe_description(mut self, value: Option<S>) -> Self {
5695 self._fields.4 = value;
5696 self
5697 }
5698}
5699
5700impl<St, S: BosStr> ProfileViewBuilder<St, S>
5701where
5702 St: profile_view_state::State,
5703 St::Did: profile_view_state::IsUnset,
5704{
5705 pub fn did(
5707 mut self,
5708 value: impl Into<Did<S>>,
5709 ) -> ProfileViewBuilder<profile_view_state::SetDid<St>, S> {
5710 self._fields.5 = Option::Some(value.into());
5711 ProfileViewBuilder {
5712 _state: PhantomData,
5713 _fields: self._fields,
5714 _type: PhantomData,
5715 }
5716 }
5717}
5718
5719impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5720 pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
5722 self._fields.6 = value.into();
5723 self
5724 }
5725 pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
5727 self._fields.6 = value;
5728 self
5729 }
5730}
5731
5732impl<St, S: BosStr> ProfileViewBuilder<St, S>
5733where
5734 St: profile_view_state::State,
5735 St::Handle: profile_view_state::IsUnset,
5736{
5737 pub fn handle(
5739 mut self,
5740 value: impl Into<Handle<S>>,
5741 ) -> ProfileViewBuilder<profile_view_state::SetHandle<St>, S> {
5742 self._fields.7 = Option::Some(value.into());
5743 ProfileViewBuilder {
5744 _state: PhantomData,
5745 _fields: self._fields,
5746 _type: PhantomData,
5747 }
5748 }
5749}
5750
5751impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5752 pub fn indexed_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
5754 self._fields.8 = value.into();
5755 self
5756 }
5757 pub fn maybe_indexed_at(mut self, value: Option<Datetime>) -> Self {
5759 self._fields.8 = value;
5760 self
5761 }
5762}
5763
5764impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5765 pub fn labels(mut self, value: impl Into<Option<Vec<Label<S>>>>) -> Self {
5767 self._fields.9 = value.into();
5768 self
5769 }
5770 pub fn maybe_labels(mut self, value: Option<Vec<Label<S>>>) -> Self {
5772 self._fields.9 = value;
5773 self
5774 }
5775}
5776
5777impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5778 pub fn pronouns(mut self, value: impl Into<Option<S>>) -> Self {
5780 self._fields.10 = value.into();
5781 self
5782 }
5783 pub fn maybe_pronouns(mut self, value: Option<S>) -> Self {
5785 self._fields.10 = value;
5786 self
5787 }
5788}
5789
5790impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5791 pub fn status(mut self, value: impl Into<Option<actor::StatusView<S>>>) -> Self {
5793 self._fields.11 = value.into();
5794 self
5795 }
5796 pub fn maybe_status(mut self, value: Option<actor::StatusView<S>>) -> Self {
5798 self._fields.11 = value;
5799 self
5800 }
5801}
5802
5803impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5804 pub fn verification(mut self, value: impl Into<Option<actor::VerificationState<S>>>) -> Self {
5806 self._fields.12 = value.into();
5807 self
5808 }
5809 pub fn maybe_verification(mut self, value: Option<actor::VerificationState<S>>) -> Self {
5811 self._fields.12 = value;
5812 self
5813 }
5814}
5815
5816impl<St: profile_view_state::State, S: BosStr> ProfileViewBuilder<St, S> {
5817 pub fn viewer(mut self, value: impl Into<Option<actor::ViewerState<S>>>) -> Self {
5819 self._fields.13 = value.into();
5820 self
5821 }
5822 pub fn maybe_viewer(mut self, value: Option<actor::ViewerState<S>>) -> Self {
5824 self._fields.13 = value;
5825 self
5826 }
5827}
5828
5829impl<St, S: BosStr> ProfileViewBuilder<St, S>
5830where
5831 St: profile_view_state::State,
5832 St::Did: profile_view_state::IsSet,
5833 St::Handle: profile_view_state::IsSet,
5834{
5835 pub fn build(self) -> ProfileView<S> {
5837 ProfileView {
5838 associated: self._fields.0,
5839 avatar: self._fields.1,
5840 created_at: self._fields.2,
5841 debug: self._fields.3,
5842 description: self._fields.4,
5843 did: self._fields.5.unwrap(),
5844 display_name: self._fields.6,
5845 handle: self._fields.7.unwrap(),
5846 indexed_at: self._fields.8,
5847 labels: self._fields.9,
5848 pronouns: self._fields.10,
5849 status: self._fields.11,
5850 verification: self._fields.12,
5851 viewer: self._fields.13,
5852 extra_data: Default::default(),
5853 }
5854 }
5855 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ProfileView<S> {
5857 ProfileView {
5858 associated: self._fields.0,
5859 avatar: self._fields.1,
5860 created_at: self._fields.2,
5861 debug: self._fields.3,
5862 description: self._fields.4,
5863 did: self._fields.5.unwrap(),
5864 display_name: self._fields.6,
5865 handle: self._fields.7.unwrap(),
5866 indexed_at: self._fields.8,
5867 labels: self._fields.9,
5868 pronouns: self._fields.10,
5869 status: self._fields.11,
5870 verification: self._fields.12,
5871 viewer: self._fields.13,
5872 extra_data: Some(extra_data),
5873 }
5874 }
5875}
5876
5877pub mod profile_view_basic_state {
5878
5879 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
5880 #[allow(unused)]
5881 use ::core::marker::PhantomData;
5882 mod sealed {
5883 pub trait Sealed {}
5884 }
5885 pub trait State: sealed::Sealed {
5887 type Did;
5888 type Handle;
5889 }
5890 pub struct Empty(());
5892 impl sealed::Sealed for Empty {}
5893 impl State for Empty {
5894 type Did = Unset;
5895 type Handle = Unset;
5896 }
5897 pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
5899 impl<St: State> sealed::Sealed for SetDid<St> {}
5900 impl<St: State> State for SetDid<St> {
5901 type Did = Set<members::did>;
5902 type Handle = St::Handle;
5903 }
5904 pub struct SetHandle<St: State = Empty>(PhantomData<fn() -> St>);
5906 impl<St: State> sealed::Sealed for SetHandle<St> {}
5907 impl<St: State> State for SetHandle<St> {
5908 type Did = St::Did;
5909 type Handle = Set<members::handle>;
5910 }
5911 #[allow(non_camel_case_types)]
5913 pub mod members {
5914 pub struct did(());
5916 pub struct handle(());
5918 }
5919}
5920
5921pub struct ProfileViewBasicBuilder<St: profile_view_basic_state::State, S: BosStr = DefaultStr> {
5923 _state: PhantomData<fn() -> St>,
5924 _fields: (
5925 Option<actor::ProfileAssociated<S>>,
5926 Option<UriValue<S>>,
5927 Option<Datetime>,
5928 Option<Data<S>>,
5929 Option<Did<S>>,
5930 Option<S>,
5931 Option<Handle<S>>,
5932 Option<Vec<Label<S>>>,
5933 Option<S>,
5934 Option<actor::StatusView<S>>,
5935 Option<actor::VerificationState<S>>,
5936 Option<actor::ViewerState<S>>,
5937 ),
5938 _type: PhantomData<fn() -> S>,
5939}
5940
5941impl ProfileViewBasic<DefaultStr> {
5942 pub fn new() -> ProfileViewBasicBuilder<profile_view_basic_state::Empty, DefaultStr> {
5944 ProfileViewBasicBuilder::new()
5945 }
5946}
5947
5948impl<S: BosStr> ProfileViewBasic<S> {
5949 pub fn builder() -> ProfileViewBasicBuilder<profile_view_basic_state::Empty, S> {
5951 ProfileViewBasicBuilder::builder()
5952 }
5953}
5954
5955impl ProfileViewBasicBuilder<profile_view_basic_state::Empty, DefaultStr> {
5956 pub fn new() -> Self {
5958 ProfileViewBasicBuilder {
5959 _state: PhantomData,
5960 _fields: (
5961 None, None, None, None, None, None, None, None, None, None, None, None,
5962 ),
5963 _type: PhantomData,
5964 }
5965 }
5966}
5967
5968impl<S: BosStr> ProfileViewBasicBuilder<profile_view_basic_state::Empty, S> {
5969 pub fn builder() -> Self {
5971 ProfileViewBasicBuilder {
5972 _state: PhantomData,
5973 _fields: (
5974 None, None, None, None, None, None, None, None, None, None, None, None,
5975 ),
5976 _type: PhantomData,
5977 }
5978 }
5979}
5980
5981impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
5982 pub fn associated(mut self, value: impl Into<Option<actor::ProfileAssociated<S>>>) -> Self {
5984 self._fields.0 = value.into();
5985 self
5986 }
5987 pub fn maybe_associated(mut self, value: Option<actor::ProfileAssociated<S>>) -> Self {
5989 self._fields.0 = value;
5990 self
5991 }
5992}
5993
5994impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
5995 pub fn avatar(mut self, value: impl Into<Option<UriValue<S>>>) -> Self {
5997 self._fields.1 = value.into();
5998 self
5999 }
6000 pub fn maybe_avatar(mut self, value: Option<UriValue<S>>) -> Self {
6002 self._fields.1 = value;
6003 self
6004 }
6005}
6006
6007impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
6008 pub fn created_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
6010 self._fields.2 = value.into();
6011 self
6012 }
6013 pub fn maybe_created_at(mut self, value: Option<Datetime>) -> Self {
6015 self._fields.2 = value;
6016 self
6017 }
6018}
6019
6020impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
6021 pub fn debug(mut self, value: impl Into<Option<Data<S>>>) -> Self {
6023 self._fields.3 = value.into();
6024 self
6025 }
6026 pub fn maybe_debug(mut self, value: Option<Data<S>>) -> Self {
6028 self._fields.3 = value;
6029 self
6030 }
6031}
6032
6033impl<St, S: BosStr> ProfileViewBasicBuilder<St, S>
6034where
6035 St: profile_view_basic_state::State,
6036 St::Did: profile_view_basic_state::IsUnset,
6037{
6038 pub fn did(
6040 mut self,
6041 value: impl Into<Did<S>>,
6042 ) -> ProfileViewBasicBuilder<profile_view_basic_state::SetDid<St>, S> {
6043 self._fields.4 = Option::Some(value.into());
6044 ProfileViewBasicBuilder {
6045 _state: PhantomData,
6046 _fields: self._fields,
6047 _type: PhantomData,
6048 }
6049 }
6050}
6051
6052impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
6053 pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
6055 self._fields.5 = value.into();
6056 self
6057 }
6058 pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
6060 self._fields.5 = value;
6061 self
6062 }
6063}
6064
6065impl<St, S: BosStr> ProfileViewBasicBuilder<St, S>
6066where
6067 St: profile_view_basic_state::State,
6068 St::Handle: profile_view_basic_state::IsUnset,
6069{
6070 pub fn handle(
6072 mut self,
6073 value: impl Into<Handle<S>>,
6074 ) -> ProfileViewBasicBuilder<profile_view_basic_state::SetHandle<St>, S> {
6075 self._fields.6 = Option::Some(value.into());
6076 ProfileViewBasicBuilder {
6077 _state: PhantomData,
6078 _fields: self._fields,
6079 _type: PhantomData,
6080 }
6081 }
6082}
6083
6084impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
6085 pub fn labels(mut self, value: impl Into<Option<Vec<Label<S>>>>) -> Self {
6087 self._fields.7 = value.into();
6088 self
6089 }
6090 pub fn maybe_labels(mut self, value: Option<Vec<Label<S>>>) -> Self {
6092 self._fields.7 = value;
6093 self
6094 }
6095}
6096
6097impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
6098 pub fn pronouns(mut self, value: impl Into<Option<S>>) -> Self {
6100 self._fields.8 = value.into();
6101 self
6102 }
6103 pub fn maybe_pronouns(mut self, value: Option<S>) -> Self {
6105 self._fields.8 = value;
6106 self
6107 }
6108}
6109
6110impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
6111 pub fn status(mut self, value: impl Into<Option<actor::StatusView<S>>>) -> Self {
6113 self._fields.9 = value.into();
6114 self
6115 }
6116 pub fn maybe_status(mut self, value: Option<actor::StatusView<S>>) -> Self {
6118 self._fields.9 = value;
6119 self
6120 }
6121}
6122
6123impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
6124 pub fn verification(mut self, value: impl Into<Option<actor::VerificationState<S>>>) -> Self {
6126 self._fields.10 = value.into();
6127 self
6128 }
6129 pub fn maybe_verification(mut self, value: Option<actor::VerificationState<S>>) -> Self {
6131 self._fields.10 = value;
6132 self
6133 }
6134}
6135
6136impl<St: profile_view_basic_state::State, S: BosStr> ProfileViewBasicBuilder<St, S> {
6137 pub fn viewer(mut self, value: impl Into<Option<actor::ViewerState<S>>>) -> Self {
6139 self._fields.11 = value.into();
6140 self
6141 }
6142 pub fn maybe_viewer(mut self, value: Option<actor::ViewerState<S>>) -> Self {
6144 self._fields.11 = value;
6145 self
6146 }
6147}
6148
6149impl<St, S: BosStr> ProfileViewBasicBuilder<St, S>
6150where
6151 St: profile_view_basic_state::State,
6152 St::Did: profile_view_basic_state::IsSet,
6153 St::Handle: profile_view_basic_state::IsSet,
6154{
6155 pub fn build(self) -> ProfileViewBasic<S> {
6157 ProfileViewBasic {
6158 associated: self._fields.0,
6159 avatar: self._fields.1,
6160 created_at: self._fields.2,
6161 debug: self._fields.3,
6162 did: self._fields.4.unwrap(),
6163 display_name: self._fields.5,
6164 handle: self._fields.6.unwrap(),
6165 labels: self._fields.7,
6166 pronouns: self._fields.8,
6167 status: self._fields.9,
6168 verification: self._fields.10,
6169 viewer: self._fields.11,
6170 extra_data: Default::default(),
6171 }
6172 }
6173 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ProfileViewBasic<S> {
6175 ProfileViewBasic {
6176 associated: self._fields.0,
6177 avatar: self._fields.1,
6178 created_at: self._fields.2,
6179 debug: self._fields.3,
6180 did: self._fields.4.unwrap(),
6181 display_name: self._fields.5,
6182 handle: self._fields.6.unwrap(),
6183 labels: self._fields.7,
6184 pronouns: self._fields.8,
6185 status: self._fields.9,
6186 verification: self._fields.10,
6187 viewer: self._fields.11,
6188 extra_data: Some(extra_data),
6189 }
6190 }
6191}
6192
6193pub mod profile_view_detailed_state {
6194
6195 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
6196 #[allow(unused)]
6197 use ::core::marker::PhantomData;
6198 mod sealed {
6199 pub trait Sealed {}
6200 }
6201 pub trait State: sealed::Sealed {
6203 type Did;
6204 type Handle;
6205 }
6206 pub struct Empty(());
6208 impl sealed::Sealed for Empty {}
6209 impl State for Empty {
6210 type Did = Unset;
6211 type Handle = Unset;
6212 }
6213 pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
6215 impl<St: State> sealed::Sealed for SetDid<St> {}
6216 impl<St: State> State for SetDid<St> {
6217 type Did = Set<members::did>;
6218 type Handle = St::Handle;
6219 }
6220 pub struct SetHandle<St: State = Empty>(PhantomData<fn() -> St>);
6222 impl<St: State> sealed::Sealed for SetHandle<St> {}
6223 impl<St: State> State for SetHandle<St> {
6224 type Did = St::Did;
6225 type Handle = Set<members::handle>;
6226 }
6227 #[allow(non_camel_case_types)]
6229 pub mod members {
6230 pub struct did(());
6232 pub struct handle(());
6234 }
6235}
6236
6237pub struct ProfileViewDetailedBuilder<
6239 St: profile_view_detailed_state::State,
6240 S: BosStr = DefaultStr,
6241> {
6242 _state: PhantomData<fn() -> St>,
6243 _fields: (
6244 Option<actor::ProfileAssociated<S>>,
6245 Option<UriValue<S>>,
6246 Option<UriValue<S>>,
6247 Option<Datetime>,
6248 Option<Data<S>>,
6249 Option<S>,
6250 Option<Did<S>>,
6251 Option<S>,
6252 Option<i64>,
6253 Option<i64>,
6254 Option<Handle<S>>,
6255 Option<Datetime>,
6256 Option<StarterPackViewBasic<S>>,
6257 Option<Vec<Label<S>>>,
6258 Option<StrongRef<S>>,
6259 Option<i64>,
6260 Option<S>,
6261 Option<actor::StatusView<S>>,
6262 Option<actor::VerificationState<S>>,
6263 Option<actor::ViewerState<S>>,
6264 Option<UriValue<S>>,
6265 ),
6266 _type: PhantomData<fn() -> S>,
6267}
6268
6269impl ProfileViewDetailed<DefaultStr> {
6270 pub fn new() -> ProfileViewDetailedBuilder<profile_view_detailed_state::Empty, DefaultStr> {
6272 ProfileViewDetailedBuilder::new()
6273 }
6274}
6275
6276impl<S: BosStr> ProfileViewDetailed<S> {
6277 pub fn builder() -> ProfileViewDetailedBuilder<profile_view_detailed_state::Empty, S> {
6279 ProfileViewDetailedBuilder::builder()
6280 }
6281}
6282
6283impl ProfileViewDetailedBuilder<profile_view_detailed_state::Empty, DefaultStr> {
6284 pub fn new() -> Self {
6286 ProfileViewDetailedBuilder {
6287 _state: PhantomData,
6288 _fields: (
6289 None, None, None, None, None, None, None, None, None, None, None, None, None, None,
6290 None, None, None, None, None, None, None,
6291 ),
6292 _type: PhantomData,
6293 }
6294 }
6295}
6296
6297impl<S: BosStr> ProfileViewDetailedBuilder<profile_view_detailed_state::Empty, S> {
6298 pub fn builder() -> Self {
6300 ProfileViewDetailedBuilder {
6301 _state: PhantomData,
6302 _fields: (
6303 None, None, None, None, None, None, None, None, None, None, None, None, None, None,
6304 None, None, None, None, None, None, None,
6305 ),
6306 _type: PhantomData,
6307 }
6308 }
6309}
6310
6311impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6312 pub fn associated(mut self, value: impl Into<Option<actor::ProfileAssociated<S>>>) -> Self {
6314 self._fields.0 = value.into();
6315 self
6316 }
6317 pub fn maybe_associated(mut self, value: Option<actor::ProfileAssociated<S>>) -> Self {
6319 self._fields.0 = value;
6320 self
6321 }
6322}
6323
6324impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6325 pub fn avatar(mut self, value: impl Into<Option<UriValue<S>>>) -> Self {
6327 self._fields.1 = value.into();
6328 self
6329 }
6330 pub fn maybe_avatar(mut self, value: Option<UriValue<S>>) -> Self {
6332 self._fields.1 = value;
6333 self
6334 }
6335}
6336
6337impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6338 pub fn banner(mut self, value: impl Into<Option<UriValue<S>>>) -> Self {
6340 self._fields.2 = value.into();
6341 self
6342 }
6343 pub fn maybe_banner(mut self, value: Option<UriValue<S>>) -> Self {
6345 self._fields.2 = value;
6346 self
6347 }
6348}
6349
6350impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6351 pub fn created_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
6353 self._fields.3 = value.into();
6354 self
6355 }
6356 pub fn maybe_created_at(mut self, value: Option<Datetime>) -> Self {
6358 self._fields.3 = value;
6359 self
6360 }
6361}
6362
6363impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6364 pub fn debug(mut self, value: impl Into<Option<Data<S>>>) -> Self {
6366 self._fields.4 = value.into();
6367 self
6368 }
6369 pub fn maybe_debug(mut self, value: Option<Data<S>>) -> Self {
6371 self._fields.4 = value;
6372 self
6373 }
6374}
6375
6376impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6377 pub fn description(mut self, value: impl Into<Option<S>>) -> Self {
6379 self._fields.5 = value.into();
6380 self
6381 }
6382 pub fn maybe_description(mut self, value: Option<S>) -> Self {
6384 self._fields.5 = value;
6385 self
6386 }
6387}
6388
6389impl<St, S: BosStr> ProfileViewDetailedBuilder<St, S>
6390where
6391 St: profile_view_detailed_state::State,
6392 St::Did: profile_view_detailed_state::IsUnset,
6393{
6394 pub fn did(
6396 mut self,
6397 value: impl Into<Did<S>>,
6398 ) -> ProfileViewDetailedBuilder<profile_view_detailed_state::SetDid<St>, S> {
6399 self._fields.6 = Option::Some(value.into());
6400 ProfileViewDetailedBuilder {
6401 _state: PhantomData,
6402 _fields: self._fields,
6403 _type: PhantomData,
6404 }
6405 }
6406}
6407
6408impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6409 pub fn display_name(mut self, value: impl Into<Option<S>>) -> Self {
6411 self._fields.7 = value.into();
6412 self
6413 }
6414 pub fn maybe_display_name(mut self, value: Option<S>) -> Self {
6416 self._fields.7 = value;
6417 self
6418 }
6419}
6420
6421impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6422 pub fn followers_count(mut self, value: impl Into<Option<i64>>) -> Self {
6424 self._fields.8 = value.into();
6425 self
6426 }
6427 pub fn maybe_followers_count(mut self, value: Option<i64>) -> Self {
6429 self._fields.8 = value;
6430 self
6431 }
6432}
6433
6434impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6435 pub fn follows_count(mut self, value: impl Into<Option<i64>>) -> Self {
6437 self._fields.9 = value.into();
6438 self
6439 }
6440 pub fn maybe_follows_count(mut self, value: Option<i64>) -> Self {
6442 self._fields.9 = value;
6443 self
6444 }
6445}
6446
6447impl<St, S: BosStr> ProfileViewDetailedBuilder<St, S>
6448where
6449 St: profile_view_detailed_state::State,
6450 St::Handle: profile_view_detailed_state::IsUnset,
6451{
6452 pub fn handle(
6454 mut self,
6455 value: impl Into<Handle<S>>,
6456 ) -> ProfileViewDetailedBuilder<profile_view_detailed_state::SetHandle<St>, S> {
6457 self._fields.10 = Option::Some(value.into());
6458 ProfileViewDetailedBuilder {
6459 _state: PhantomData,
6460 _fields: self._fields,
6461 _type: PhantomData,
6462 }
6463 }
6464}
6465
6466impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6467 pub fn indexed_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
6469 self._fields.11 = value.into();
6470 self
6471 }
6472 pub fn maybe_indexed_at(mut self, value: Option<Datetime>) -> Self {
6474 self._fields.11 = value;
6475 self
6476 }
6477}
6478
6479impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6480 pub fn joined_via_starter_pack(
6482 mut self,
6483 value: impl Into<Option<StarterPackViewBasic<S>>>,
6484 ) -> Self {
6485 self._fields.12 = value.into();
6486 self
6487 }
6488 pub fn maybe_joined_via_starter_pack(mut self, value: Option<StarterPackViewBasic<S>>) -> Self {
6490 self._fields.12 = value;
6491 self
6492 }
6493}
6494
6495impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6496 pub fn labels(mut self, value: impl Into<Option<Vec<Label<S>>>>) -> Self {
6498 self._fields.13 = value.into();
6499 self
6500 }
6501 pub fn maybe_labels(mut self, value: Option<Vec<Label<S>>>) -> Self {
6503 self._fields.13 = value;
6504 self
6505 }
6506}
6507
6508impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6509 pub fn pinned_post(mut self, value: impl Into<Option<StrongRef<S>>>) -> Self {
6511 self._fields.14 = value.into();
6512 self
6513 }
6514 pub fn maybe_pinned_post(mut self, value: Option<StrongRef<S>>) -> Self {
6516 self._fields.14 = value;
6517 self
6518 }
6519}
6520
6521impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6522 pub fn posts_count(mut self, value: impl Into<Option<i64>>) -> Self {
6524 self._fields.15 = value.into();
6525 self
6526 }
6527 pub fn maybe_posts_count(mut self, value: Option<i64>) -> Self {
6529 self._fields.15 = value;
6530 self
6531 }
6532}
6533
6534impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6535 pub fn pronouns(mut self, value: impl Into<Option<S>>) -> Self {
6537 self._fields.16 = value.into();
6538 self
6539 }
6540 pub fn maybe_pronouns(mut self, value: Option<S>) -> Self {
6542 self._fields.16 = value;
6543 self
6544 }
6545}
6546
6547impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6548 pub fn status(mut self, value: impl Into<Option<actor::StatusView<S>>>) -> Self {
6550 self._fields.17 = value.into();
6551 self
6552 }
6553 pub fn maybe_status(mut self, value: Option<actor::StatusView<S>>) -> Self {
6555 self._fields.17 = value;
6556 self
6557 }
6558}
6559
6560impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6561 pub fn verification(mut self, value: impl Into<Option<actor::VerificationState<S>>>) -> Self {
6563 self._fields.18 = value.into();
6564 self
6565 }
6566 pub fn maybe_verification(mut self, value: Option<actor::VerificationState<S>>) -> Self {
6568 self._fields.18 = value;
6569 self
6570 }
6571}
6572
6573impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6574 pub fn viewer(mut self, value: impl Into<Option<actor::ViewerState<S>>>) -> Self {
6576 self._fields.19 = value.into();
6577 self
6578 }
6579 pub fn maybe_viewer(mut self, value: Option<actor::ViewerState<S>>) -> Self {
6581 self._fields.19 = value;
6582 self
6583 }
6584}
6585
6586impl<St: profile_view_detailed_state::State, S: BosStr> ProfileViewDetailedBuilder<St, S> {
6587 pub fn website(mut self, value: impl Into<Option<UriValue<S>>>) -> Self {
6589 self._fields.20 = value.into();
6590 self
6591 }
6592 pub fn maybe_website(mut self, value: Option<UriValue<S>>) -> Self {
6594 self._fields.20 = value;
6595 self
6596 }
6597}
6598
6599impl<St, S: BosStr> ProfileViewDetailedBuilder<St, S>
6600where
6601 St: profile_view_detailed_state::State,
6602 St::Did: profile_view_detailed_state::IsSet,
6603 St::Handle: profile_view_detailed_state::IsSet,
6604{
6605 pub fn build(self) -> ProfileViewDetailed<S> {
6607 ProfileViewDetailed {
6608 associated: self._fields.0,
6609 avatar: self._fields.1,
6610 banner: self._fields.2,
6611 created_at: self._fields.3,
6612 debug: self._fields.4,
6613 description: self._fields.5,
6614 did: self._fields.6.unwrap(),
6615 display_name: self._fields.7,
6616 followers_count: self._fields.8,
6617 follows_count: self._fields.9,
6618 handle: self._fields.10.unwrap(),
6619 indexed_at: self._fields.11,
6620 joined_via_starter_pack: self._fields.12,
6621 labels: self._fields.13,
6622 pinned_post: self._fields.14,
6623 posts_count: self._fields.15,
6624 pronouns: self._fields.16,
6625 status: self._fields.17,
6626 verification: self._fields.18,
6627 viewer: self._fields.19,
6628 website: self._fields.20,
6629 extra_data: Default::default(),
6630 }
6631 }
6632 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ProfileViewDetailed<S> {
6634 ProfileViewDetailed {
6635 associated: self._fields.0,
6636 avatar: self._fields.1,
6637 banner: self._fields.2,
6638 created_at: self._fields.3,
6639 debug: self._fields.4,
6640 description: self._fields.5,
6641 did: self._fields.6.unwrap(),
6642 display_name: self._fields.7,
6643 followers_count: self._fields.8,
6644 follows_count: self._fields.9,
6645 handle: self._fields.10.unwrap(),
6646 indexed_at: self._fields.11,
6647 joined_via_starter_pack: self._fields.12,
6648 labels: self._fields.13,
6649 pinned_post: self._fields.14,
6650 posts_count: self._fields.15,
6651 pronouns: self._fields.16,
6652 status: self._fields.17,
6653 verification: self._fields.18,
6654 viewer: self._fields.19,
6655 website: self._fields.20,
6656 extra_data: Some(extra_data),
6657 }
6658 }
6659}
6660
6661pub mod saved_feed_state {
6662
6663 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
6664 #[allow(unused)]
6665 use ::core::marker::PhantomData;
6666 mod sealed {
6667 pub trait Sealed {}
6668 }
6669 pub trait State: sealed::Sealed {
6671 type Id;
6672 type Pinned;
6673 type Type;
6674 type Value;
6675 }
6676 pub struct Empty(());
6678 impl sealed::Sealed for Empty {}
6679 impl State for Empty {
6680 type Id = Unset;
6681 type Pinned = Unset;
6682 type Type = Unset;
6683 type Value = Unset;
6684 }
6685 pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>);
6687 impl<St: State> sealed::Sealed for SetId<St> {}
6688 impl<St: State> State for SetId<St> {
6689 type Id = Set<members::id>;
6690 type Pinned = St::Pinned;
6691 type Type = St::Type;
6692 type Value = St::Value;
6693 }
6694 pub struct SetPinned<St: State = Empty>(PhantomData<fn() -> St>);
6696 impl<St: State> sealed::Sealed for SetPinned<St> {}
6697 impl<St: State> State for SetPinned<St> {
6698 type Id = St::Id;
6699 type Pinned = Set<members::pinned>;
6700 type Type = St::Type;
6701 type Value = St::Value;
6702 }
6703 pub struct SetType<St: State = Empty>(PhantomData<fn() -> St>);
6705 impl<St: State> sealed::Sealed for SetType<St> {}
6706 impl<St: State> State for SetType<St> {
6707 type Id = St::Id;
6708 type Pinned = St::Pinned;
6709 type Type = Set<members::r#type>;
6710 type Value = St::Value;
6711 }
6712 pub struct SetValue<St: State = Empty>(PhantomData<fn() -> St>);
6714 impl<St: State> sealed::Sealed for SetValue<St> {}
6715 impl<St: State> State for SetValue<St> {
6716 type Id = St::Id;
6717 type Pinned = St::Pinned;
6718 type Type = St::Type;
6719 type Value = Set<members::value>;
6720 }
6721 #[allow(non_camel_case_types)]
6723 pub mod members {
6724 pub struct id(());
6726 pub struct pinned(());
6728 pub struct r#type(());
6730 pub struct value(());
6732 }
6733}
6734
6735pub struct SavedFeedBuilder<St: saved_feed_state::State, S: BosStr = DefaultStr> {
6737 _state: PhantomData<fn() -> St>,
6738 _fields: (Option<S>, Option<bool>, Option<SavedFeedType<S>>, Option<S>),
6739 _type: PhantomData<fn() -> S>,
6740}
6741
6742impl SavedFeed<DefaultStr> {
6743 pub fn new() -> SavedFeedBuilder<saved_feed_state::Empty, DefaultStr> {
6745 SavedFeedBuilder::new()
6746 }
6747}
6748
6749impl<S: BosStr> SavedFeed<S> {
6750 pub fn builder() -> SavedFeedBuilder<saved_feed_state::Empty, S> {
6752 SavedFeedBuilder::builder()
6753 }
6754}
6755
6756impl SavedFeedBuilder<saved_feed_state::Empty, DefaultStr> {
6757 pub fn new() -> Self {
6759 SavedFeedBuilder {
6760 _state: PhantomData,
6761 _fields: (None, None, None, None),
6762 _type: PhantomData,
6763 }
6764 }
6765}
6766
6767impl<S: BosStr> SavedFeedBuilder<saved_feed_state::Empty, S> {
6768 pub fn builder() -> Self {
6770 SavedFeedBuilder {
6771 _state: PhantomData,
6772 _fields: (None, None, None, None),
6773 _type: PhantomData,
6774 }
6775 }
6776}
6777
6778impl<St, S: BosStr> SavedFeedBuilder<St, S>
6779where
6780 St: saved_feed_state::State,
6781 St::Id: saved_feed_state::IsUnset,
6782{
6783 pub fn id(mut self, value: impl Into<S>) -> SavedFeedBuilder<saved_feed_state::SetId<St>, S> {
6785 self._fields.0 = Option::Some(value.into());
6786 SavedFeedBuilder {
6787 _state: PhantomData,
6788 _fields: self._fields,
6789 _type: PhantomData,
6790 }
6791 }
6792}
6793
6794impl<St, S: BosStr> SavedFeedBuilder<St, S>
6795where
6796 St: saved_feed_state::State,
6797 St::Pinned: saved_feed_state::IsUnset,
6798{
6799 pub fn pinned(
6801 mut self,
6802 value: impl Into<bool>,
6803 ) -> SavedFeedBuilder<saved_feed_state::SetPinned<St>, S> {
6804 self._fields.1 = Option::Some(value.into());
6805 SavedFeedBuilder {
6806 _state: PhantomData,
6807 _fields: self._fields,
6808 _type: PhantomData,
6809 }
6810 }
6811}
6812
6813impl<St, S: BosStr> SavedFeedBuilder<St, S>
6814where
6815 St: saved_feed_state::State,
6816 St::Type: saved_feed_state::IsUnset,
6817{
6818 pub fn r#type(
6820 mut self,
6821 value: impl Into<SavedFeedType<S>>,
6822 ) -> SavedFeedBuilder<saved_feed_state::SetType<St>, S> {
6823 self._fields.2 = Option::Some(value.into());
6824 SavedFeedBuilder {
6825 _state: PhantomData,
6826 _fields: self._fields,
6827 _type: PhantomData,
6828 }
6829 }
6830}
6831
6832impl<St, S: BosStr> SavedFeedBuilder<St, S>
6833where
6834 St: saved_feed_state::State,
6835 St::Value: saved_feed_state::IsUnset,
6836{
6837 pub fn value(
6839 mut self,
6840 value: impl Into<S>,
6841 ) -> SavedFeedBuilder<saved_feed_state::SetValue<St>, S> {
6842 self._fields.3 = Option::Some(value.into());
6843 SavedFeedBuilder {
6844 _state: PhantomData,
6845 _fields: self._fields,
6846 _type: PhantomData,
6847 }
6848 }
6849}
6850
6851impl<St, S: BosStr> SavedFeedBuilder<St, S>
6852where
6853 St: saved_feed_state::State,
6854 St::Id: saved_feed_state::IsSet,
6855 St::Pinned: saved_feed_state::IsSet,
6856 St::Type: saved_feed_state::IsSet,
6857 St::Value: saved_feed_state::IsSet,
6858{
6859 pub fn build(self) -> SavedFeed<S> {
6861 SavedFeed {
6862 id: self._fields.0.unwrap(),
6863 pinned: self._fields.1.unwrap(),
6864 r#type: self._fields.2.unwrap(),
6865 value: self._fields.3.unwrap(),
6866 extra_data: Default::default(),
6867 }
6868 }
6869 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> SavedFeed<S> {
6871 SavedFeed {
6872 id: self._fields.0.unwrap(),
6873 pinned: self._fields.1.unwrap(),
6874 r#type: self._fields.2.unwrap(),
6875 value: self._fields.3.unwrap(),
6876 extra_data: Some(extra_data),
6877 }
6878 }
6879}
6880
6881pub mod saved_feeds_pref_state {
6882
6883 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
6884 #[allow(unused)]
6885 use ::core::marker::PhantomData;
6886 mod sealed {
6887 pub trait Sealed {}
6888 }
6889 pub trait State: sealed::Sealed {
6891 type Pinned;
6892 type Saved;
6893 }
6894 pub struct Empty(());
6896 impl sealed::Sealed for Empty {}
6897 impl State for Empty {
6898 type Pinned = Unset;
6899 type Saved = Unset;
6900 }
6901 pub struct SetPinned<St: State = Empty>(PhantomData<fn() -> St>);
6903 impl<St: State> sealed::Sealed for SetPinned<St> {}
6904 impl<St: State> State for SetPinned<St> {
6905 type Pinned = Set<members::pinned>;
6906 type Saved = St::Saved;
6907 }
6908 pub struct SetSaved<St: State = Empty>(PhantomData<fn() -> St>);
6910 impl<St: State> sealed::Sealed for SetSaved<St> {}
6911 impl<St: State> State for SetSaved<St> {
6912 type Pinned = St::Pinned;
6913 type Saved = Set<members::saved>;
6914 }
6915 #[allow(non_camel_case_types)]
6917 pub mod members {
6918 pub struct pinned(());
6920 pub struct saved(());
6922 }
6923}
6924
6925pub struct SavedFeedsPrefBuilder<St: saved_feeds_pref_state::State, S: BosStr = DefaultStr> {
6927 _state: PhantomData<fn() -> St>,
6928 _fields: (Option<Vec<AtUri<S>>>, Option<Vec<AtUri<S>>>, Option<i64>),
6929 _type: PhantomData<fn() -> S>,
6930}
6931
6932impl SavedFeedsPref<DefaultStr> {
6933 pub fn new() -> SavedFeedsPrefBuilder<saved_feeds_pref_state::Empty, DefaultStr> {
6935 SavedFeedsPrefBuilder::new()
6936 }
6937}
6938
6939impl<S: BosStr> SavedFeedsPref<S> {
6940 pub fn builder() -> SavedFeedsPrefBuilder<saved_feeds_pref_state::Empty, S> {
6942 SavedFeedsPrefBuilder::builder()
6943 }
6944}
6945
6946impl SavedFeedsPrefBuilder<saved_feeds_pref_state::Empty, DefaultStr> {
6947 pub fn new() -> Self {
6949 SavedFeedsPrefBuilder {
6950 _state: PhantomData,
6951 _fields: (None, None, None),
6952 _type: PhantomData,
6953 }
6954 }
6955}
6956
6957impl<S: BosStr> SavedFeedsPrefBuilder<saved_feeds_pref_state::Empty, S> {
6958 pub fn builder() -> Self {
6960 SavedFeedsPrefBuilder {
6961 _state: PhantomData,
6962 _fields: (None, None, None),
6963 _type: PhantomData,
6964 }
6965 }
6966}
6967
6968impl<St, S: BosStr> SavedFeedsPrefBuilder<St, S>
6969where
6970 St: saved_feeds_pref_state::State,
6971 St::Pinned: saved_feeds_pref_state::IsUnset,
6972{
6973 pub fn pinned(
6975 mut self,
6976 value: impl Into<Vec<AtUri<S>>>,
6977 ) -> SavedFeedsPrefBuilder<saved_feeds_pref_state::SetPinned<St>, S> {
6978 self._fields.0 = Option::Some(value.into());
6979 SavedFeedsPrefBuilder {
6980 _state: PhantomData,
6981 _fields: self._fields,
6982 _type: PhantomData,
6983 }
6984 }
6985}
6986
6987impl<St, S: BosStr> SavedFeedsPrefBuilder<St, S>
6988where
6989 St: saved_feeds_pref_state::State,
6990 St::Saved: saved_feeds_pref_state::IsUnset,
6991{
6992 pub fn saved(
6994 mut self,
6995 value: impl Into<Vec<AtUri<S>>>,
6996 ) -> SavedFeedsPrefBuilder<saved_feeds_pref_state::SetSaved<St>, S> {
6997 self._fields.1 = Option::Some(value.into());
6998 SavedFeedsPrefBuilder {
6999 _state: PhantomData,
7000 _fields: self._fields,
7001 _type: PhantomData,
7002 }
7003 }
7004}
7005
7006impl<St: saved_feeds_pref_state::State, S: BosStr> SavedFeedsPrefBuilder<St, S> {
7007 pub fn timeline_index(mut self, value: impl Into<Option<i64>>) -> Self {
7009 self._fields.2 = value.into();
7010 self
7011 }
7012 pub fn maybe_timeline_index(mut self, value: Option<i64>) -> Self {
7014 self._fields.2 = value;
7015 self
7016 }
7017}
7018
7019impl<St, S: BosStr> SavedFeedsPrefBuilder<St, S>
7020where
7021 St: saved_feeds_pref_state::State,
7022 St::Pinned: saved_feeds_pref_state::IsSet,
7023 St::Saved: saved_feeds_pref_state::IsSet,
7024{
7025 pub fn build(self) -> SavedFeedsPref<S> {
7027 SavedFeedsPref {
7028 pinned: self._fields.0.unwrap(),
7029 saved: self._fields.1.unwrap(),
7030 timeline_index: self._fields.2,
7031 extra_data: Default::default(),
7032 }
7033 }
7034 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> SavedFeedsPref<S> {
7036 SavedFeedsPref {
7037 pinned: self._fields.0.unwrap(),
7038 saved: self._fields.1.unwrap(),
7039 timeline_index: self._fields.2,
7040 extra_data: Some(extra_data),
7041 }
7042 }
7043}
7044
7045pub mod saved_feeds_pref_v2_state {
7046
7047 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
7048 #[allow(unused)]
7049 use ::core::marker::PhantomData;
7050 mod sealed {
7051 pub trait Sealed {}
7052 }
7053 pub trait State: sealed::Sealed {
7055 type Items;
7056 }
7057 pub struct Empty(());
7059 impl sealed::Sealed for Empty {}
7060 impl State for Empty {
7061 type Items = Unset;
7062 }
7063 pub struct SetItems<St: State = Empty>(PhantomData<fn() -> St>);
7065 impl<St: State> sealed::Sealed for SetItems<St> {}
7066 impl<St: State> State for SetItems<St> {
7067 type Items = Set<members::items>;
7068 }
7069 #[allow(non_camel_case_types)]
7071 pub mod members {
7072 pub struct items(());
7074 }
7075}
7076
7077pub struct SavedFeedsPrefV2Builder<St: saved_feeds_pref_v2_state::State, S: BosStr = DefaultStr> {
7079 _state: PhantomData<fn() -> St>,
7080 _fields: (Option<Vec<actor::SavedFeed<S>>>,),
7081 _type: PhantomData<fn() -> S>,
7082}
7083
7084impl SavedFeedsPrefV2<DefaultStr> {
7085 pub fn new() -> SavedFeedsPrefV2Builder<saved_feeds_pref_v2_state::Empty, DefaultStr> {
7087 SavedFeedsPrefV2Builder::new()
7088 }
7089}
7090
7091impl<S: BosStr> SavedFeedsPrefV2<S> {
7092 pub fn builder() -> SavedFeedsPrefV2Builder<saved_feeds_pref_v2_state::Empty, S> {
7094 SavedFeedsPrefV2Builder::builder()
7095 }
7096}
7097
7098impl SavedFeedsPrefV2Builder<saved_feeds_pref_v2_state::Empty, DefaultStr> {
7099 pub fn new() -> Self {
7101 SavedFeedsPrefV2Builder {
7102 _state: PhantomData,
7103 _fields: (None,),
7104 _type: PhantomData,
7105 }
7106 }
7107}
7108
7109impl<S: BosStr> SavedFeedsPrefV2Builder<saved_feeds_pref_v2_state::Empty, S> {
7110 pub fn builder() -> Self {
7112 SavedFeedsPrefV2Builder {
7113 _state: PhantomData,
7114 _fields: (None,),
7115 _type: PhantomData,
7116 }
7117 }
7118}
7119
7120impl<St, S: BosStr> SavedFeedsPrefV2Builder<St, S>
7121where
7122 St: saved_feeds_pref_v2_state::State,
7123 St::Items: saved_feeds_pref_v2_state::IsUnset,
7124{
7125 pub fn items(
7127 mut self,
7128 value: impl Into<Vec<actor::SavedFeed<S>>>,
7129 ) -> SavedFeedsPrefV2Builder<saved_feeds_pref_v2_state::SetItems<St>, S> {
7130 self._fields.0 = Option::Some(value.into());
7131 SavedFeedsPrefV2Builder {
7132 _state: PhantomData,
7133 _fields: self._fields,
7134 _type: PhantomData,
7135 }
7136 }
7137}
7138
7139impl<St, S: BosStr> SavedFeedsPrefV2Builder<St, S>
7140where
7141 St: saved_feeds_pref_v2_state::State,
7142 St::Items: saved_feeds_pref_v2_state::IsSet,
7143{
7144 pub fn build(self) -> SavedFeedsPrefV2<S> {
7146 SavedFeedsPrefV2 {
7147 items: self._fields.0.unwrap(),
7148 extra_data: Default::default(),
7149 }
7150 }
7151 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> SavedFeedsPrefV2<S> {
7153 SavedFeedsPrefV2 {
7154 items: self._fields.0.unwrap(),
7155 extra_data: Some(extra_data),
7156 }
7157 }
7158}
7159
7160pub mod status_view_state {
7161
7162 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
7163 #[allow(unused)]
7164 use ::core::marker::PhantomData;
7165 mod sealed {
7166 pub trait Sealed {}
7167 }
7168 pub trait State: sealed::Sealed {
7170 type Record;
7171 type Status;
7172 }
7173 pub struct Empty(());
7175 impl sealed::Sealed for Empty {}
7176 impl State for Empty {
7177 type Record = Unset;
7178 type Status = Unset;
7179 }
7180 pub struct SetRecord<St: State = Empty>(PhantomData<fn() -> St>);
7182 impl<St: State> sealed::Sealed for SetRecord<St> {}
7183 impl<St: State> State for SetRecord<St> {
7184 type Record = Set<members::record>;
7185 type Status = St::Status;
7186 }
7187 pub struct SetStatus<St: State = Empty>(PhantomData<fn() -> St>);
7189 impl<St: State> sealed::Sealed for SetStatus<St> {}
7190 impl<St: State> State for SetStatus<St> {
7191 type Record = St::Record;
7192 type Status = Set<members::status>;
7193 }
7194 #[allow(non_camel_case_types)]
7196 pub mod members {
7197 pub struct record(());
7199 pub struct status(());
7201 }
7202}
7203
7204pub struct StatusViewBuilder<St: status_view_state::State, S: BosStr = DefaultStr> {
7206 _state: PhantomData<fn() -> St>,
7207 _fields: (
7208 Option<Cid<S>>,
7209 Option<View<S>>,
7210 Option<Datetime>,
7211 Option<bool>,
7212 Option<bool>,
7213 Option<Vec<Label<S>>>,
7214 Option<Data<S>>,
7215 Option<StatusViewStatus<S>>,
7216 Option<AtUri<S>>,
7217 ),
7218 _type: PhantomData<fn() -> S>,
7219}
7220
7221impl StatusView<DefaultStr> {
7222 pub fn new() -> StatusViewBuilder<status_view_state::Empty, DefaultStr> {
7224 StatusViewBuilder::new()
7225 }
7226}
7227
7228impl<S: BosStr> StatusView<S> {
7229 pub fn builder() -> StatusViewBuilder<status_view_state::Empty, S> {
7231 StatusViewBuilder::builder()
7232 }
7233}
7234
7235impl StatusViewBuilder<status_view_state::Empty, DefaultStr> {
7236 pub fn new() -> Self {
7238 StatusViewBuilder {
7239 _state: PhantomData,
7240 _fields: (None, None, None, None, None, None, None, None, None),
7241 _type: PhantomData,
7242 }
7243 }
7244}
7245
7246impl<S: BosStr> StatusViewBuilder<status_view_state::Empty, S> {
7247 pub fn builder() -> Self {
7249 StatusViewBuilder {
7250 _state: PhantomData,
7251 _fields: (None, None, None, None, None, None, None, None, None),
7252 _type: PhantomData,
7253 }
7254 }
7255}
7256
7257impl<St: status_view_state::State, S: BosStr> StatusViewBuilder<St, S> {
7258 pub fn cid(mut self, value: impl Into<Option<Cid<S>>>) -> Self {
7260 self._fields.0 = value.into();
7261 self
7262 }
7263 pub fn maybe_cid(mut self, value: Option<Cid<S>>) -> Self {
7265 self._fields.0 = value;
7266 self
7267 }
7268}
7269
7270impl<St: status_view_state::State, S: BosStr> StatusViewBuilder<St, S> {
7271 pub fn embed(mut self, value: impl Into<Option<View<S>>>) -> Self {
7273 self._fields.1 = value.into();
7274 self
7275 }
7276 pub fn maybe_embed(mut self, value: Option<View<S>>) -> Self {
7278 self._fields.1 = value;
7279 self
7280 }
7281}
7282
7283impl<St: status_view_state::State, S: BosStr> StatusViewBuilder<St, S> {
7284 pub fn expires_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
7286 self._fields.2 = value.into();
7287 self
7288 }
7289 pub fn maybe_expires_at(mut self, value: Option<Datetime>) -> Self {
7291 self._fields.2 = value;
7292 self
7293 }
7294}
7295
7296impl<St: status_view_state::State, S: BosStr> StatusViewBuilder<St, S> {
7297 pub fn is_active(mut self, value: impl Into<Option<bool>>) -> Self {
7299 self._fields.3 = value.into();
7300 self
7301 }
7302 pub fn maybe_is_active(mut self, value: Option<bool>) -> Self {
7304 self._fields.3 = value;
7305 self
7306 }
7307}
7308
7309impl<St: status_view_state::State, S: BosStr> StatusViewBuilder<St, S> {
7310 pub fn is_disabled(mut self, value: impl Into<Option<bool>>) -> Self {
7312 self._fields.4 = value.into();
7313 self
7314 }
7315 pub fn maybe_is_disabled(mut self, value: Option<bool>) -> Self {
7317 self._fields.4 = value;
7318 self
7319 }
7320}
7321
7322impl<St: status_view_state::State, S: BosStr> StatusViewBuilder<St, S> {
7323 pub fn labels(mut self, value: impl Into<Option<Vec<Label<S>>>>) -> Self {
7325 self._fields.5 = value.into();
7326 self
7327 }
7328 pub fn maybe_labels(mut self, value: Option<Vec<Label<S>>>) -> Self {
7330 self._fields.5 = value;
7331 self
7332 }
7333}
7334
7335impl<St, S: BosStr> StatusViewBuilder<St, S>
7336where
7337 St: status_view_state::State,
7338 St::Record: status_view_state::IsUnset,
7339{
7340 pub fn record(
7342 mut self,
7343 value: impl Into<Data<S>>,
7344 ) -> StatusViewBuilder<status_view_state::SetRecord<St>, S> {
7345 self._fields.6 = Option::Some(value.into());
7346 StatusViewBuilder {
7347 _state: PhantomData,
7348 _fields: self._fields,
7349 _type: PhantomData,
7350 }
7351 }
7352}
7353
7354impl<St, S: BosStr> StatusViewBuilder<St, S>
7355where
7356 St: status_view_state::State,
7357 St::Status: status_view_state::IsUnset,
7358{
7359 pub fn status(
7361 mut self,
7362 value: impl Into<StatusViewStatus<S>>,
7363 ) -> StatusViewBuilder<status_view_state::SetStatus<St>, S> {
7364 self._fields.7 = Option::Some(value.into());
7365 StatusViewBuilder {
7366 _state: PhantomData,
7367 _fields: self._fields,
7368 _type: PhantomData,
7369 }
7370 }
7371}
7372
7373impl<St: status_view_state::State, S: BosStr> StatusViewBuilder<St, S> {
7374 pub fn uri(mut self, value: impl Into<Option<AtUri<S>>>) -> Self {
7376 self._fields.8 = value.into();
7377 self
7378 }
7379 pub fn maybe_uri(mut self, value: Option<AtUri<S>>) -> Self {
7381 self._fields.8 = value;
7382 self
7383 }
7384}
7385
7386impl<St, S: BosStr> StatusViewBuilder<St, S>
7387where
7388 St: status_view_state::State,
7389 St::Record: status_view_state::IsSet,
7390 St::Status: status_view_state::IsSet,
7391{
7392 pub fn build(self) -> StatusView<S> {
7394 StatusView {
7395 cid: self._fields.0,
7396 embed: self._fields.1,
7397 expires_at: self._fields.2,
7398 is_active: self._fields.3,
7399 is_disabled: self._fields.4,
7400 labels: self._fields.5,
7401 record: self._fields.6.unwrap(),
7402 status: self._fields.7.unwrap(),
7403 uri: self._fields.8,
7404 extra_data: Default::default(),
7405 }
7406 }
7407 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> StatusView<S> {
7409 StatusView {
7410 cid: self._fields.0,
7411 embed: self._fields.1,
7412 expires_at: self._fields.2,
7413 is_active: self._fields.3,
7414 is_disabled: self._fields.4,
7415 labels: self._fields.5,
7416 record: self._fields.6.unwrap(),
7417 status: self._fields.7.unwrap(),
7418 uri: self._fields.8,
7419 extra_data: Some(extra_data),
7420 }
7421 }
7422}
7423
7424fn _default_verification_prefs_hide_badges() -> Option<bool> {
7425 Some(false)
7426}
7427
7428impl Default for VerificationPrefs {
7429 fn default() -> Self {
7430 Self {
7431 hide_badges: Some(false),
7432 extra_data: Default::default(),
7433 }
7434 }
7435}
7436
7437pub mod verification_state_state {
7438
7439 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
7440 #[allow(unused)]
7441 use ::core::marker::PhantomData;
7442 mod sealed {
7443 pub trait Sealed {}
7444 }
7445 pub trait State: sealed::Sealed {
7447 type TrustedVerifierStatus;
7448 type Verifications;
7449 type VerifiedStatus;
7450 }
7451 pub struct Empty(());
7453 impl sealed::Sealed for Empty {}
7454 impl State for Empty {
7455 type TrustedVerifierStatus = Unset;
7456 type Verifications = Unset;
7457 type VerifiedStatus = Unset;
7458 }
7459 pub struct SetTrustedVerifierStatus<St: State = Empty>(PhantomData<fn() -> St>);
7461 impl<St: State> sealed::Sealed for SetTrustedVerifierStatus<St> {}
7462 impl<St: State> State for SetTrustedVerifierStatus<St> {
7463 type TrustedVerifierStatus = Set<members::trusted_verifier_status>;
7464 type Verifications = St::Verifications;
7465 type VerifiedStatus = St::VerifiedStatus;
7466 }
7467 pub struct SetVerifications<St: State = Empty>(PhantomData<fn() -> St>);
7469 impl<St: State> sealed::Sealed for SetVerifications<St> {}
7470 impl<St: State> State for SetVerifications<St> {
7471 type TrustedVerifierStatus = St::TrustedVerifierStatus;
7472 type Verifications = Set<members::verifications>;
7473 type VerifiedStatus = St::VerifiedStatus;
7474 }
7475 pub struct SetVerifiedStatus<St: State = Empty>(PhantomData<fn() -> St>);
7477 impl<St: State> sealed::Sealed for SetVerifiedStatus<St> {}
7478 impl<St: State> State for SetVerifiedStatus<St> {
7479 type TrustedVerifierStatus = St::TrustedVerifierStatus;
7480 type Verifications = St::Verifications;
7481 type VerifiedStatus = Set<members::verified_status>;
7482 }
7483 #[allow(non_camel_case_types)]
7485 pub mod members {
7486 pub struct trusted_verifier_status(());
7488 pub struct verifications(());
7490 pub struct verified_status(());
7492 }
7493}
7494
7495pub struct VerificationStateBuilder<St: verification_state_state::State, S: BosStr = DefaultStr> {
7497 _state: PhantomData<fn() -> St>,
7498 _fields: (
7499 Option<VerificationStateTrustedVerifierStatus<S>>,
7500 Option<Vec<actor::VerificationView<S>>>,
7501 Option<VerificationStateVerifiedStatus<S>>,
7502 ),
7503 _type: PhantomData<fn() -> S>,
7504}
7505
7506impl VerificationState<DefaultStr> {
7507 pub fn new() -> VerificationStateBuilder<verification_state_state::Empty, DefaultStr> {
7509 VerificationStateBuilder::new()
7510 }
7511}
7512
7513impl<S: BosStr> VerificationState<S> {
7514 pub fn builder() -> VerificationStateBuilder<verification_state_state::Empty, S> {
7516 VerificationStateBuilder::builder()
7517 }
7518}
7519
7520impl VerificationStateBuilder<verification_state_state::Empty, DefaultStr> {
7521 pub fn new() -> Self {
7523 VerificationStateBuilder {
7524 _state: PhantomData,
7525 _fields: (None, None, None),
7526 _type: PhantomData,
7527 }
7528 }
7529}
7530
7531impl<S: BosStr> VerificationStateBuilder<verification_state_state::Empty, S> {
7532 pub fn builder() -> Self {
7534 VerificationStateBuilder {
7535 _state: PhantomData,
7536 _fields: (None, None, None),
7537 _type: PhantomData,
7538 }
7539 }
7540}
7541
7542impl<St, S: BosStr> VerificationStateBuilder<St, S>
7543where
7544 St: verification_state_state::State,
7545 St::TrustedVerifierStatus: verification_state_state::IsUnset,
7546{
7547 pub fn trusted_verifier_status(
7549 mut self,
7550 value: impl Into<VerificationStateTrustedVerifierStatus<S>>,
7551 ) -> VerificationStateBuilder<verification_state_state::SetTrustedVerifierStatus<St>, S> {
7552 self._fields.0 = Option::Some(value.into());
7553 VerificationStateBuilder {
7554 _state: PhantomData,
7555 _fields: self._fields,
7556 _type: PhantomData,
7557 }
7558 }
7559}
7560
7561impl<St, S: BosStr> VerificationStateBuilder<St, S>
7562where
7563 St: verification_state_state::State,
7564 St::Verifications: verification_state_state::IsUnset,
7565{
7566 pub fn verifications(
7568 mut self,
7569 value: impl Into<Vec<actor::VerificationView<S>>>,
7570 ) -> VerificationStateBuilder<verification_state_state::SetVerifications<St>, S> {
7571 self._fields.1 = Option::Some(value.into());
7572 VerificationStateBuilder {
7573 _state: PhantomData,
7574 _fields: self._fields,
7575 _type: PhantomData,
7576 }
7577 }
7578}
7579
7580impl<St, S: BosStr> VerificationStateBuilder<St, S>
7581where
7582 St: verification_state_state::State,
7583 St::VerifiedStatus: verification_state_state::IsUnset,
7584{
7585 pub fn verified_status(
7587 mut self,
7588 value: impl Into<VerificationStateVerifiedStatus<S>>,
7589 ) -> VerificationStateBuilder<verification_state_state::SetVerifiedStatus<St>, S> {
7590 self._fields.2 = Option::Some(value.into());
7591 VerificationStateBuilder {
7592 _state: PhantomData,
7593 _fields: self._fields,
7594 _type: PhantomData,
7595 }
7596 }
7597}
7598
7599impl<St, S: BosStr> VerificationStateBuilder<St, S>
7600where
7601 St: verification_state_state::State,
7602 St::TrustedVerifierStatus: verification_state_state::IsSet,
7603 St::Verifications: verification_state_state::IsSet,
7604 St::VerifiedStatus: verification_state_state::IsSet,
7605{
7606 pub fn build(self) -> VerificationState<S> {
7608 VerificationState {
7609 trusted_verifier_status: self._fields.0.unwrap(),
7610 verifications: self._fields.1.unwrap(),
7611 verified_status: self._fields.2.unwrap(),
7612 extra_data: Default::default(),
7613 }
7614 }
7615 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> VerificationState<S> {
7617 VerificationState {
7618 trusted_verifier_status: self._fields.0.unwrap(),
7619 verifications: self._fields.1.unwrap(),
7620 verified_status: self._fields.2.unwrap(),
7621 extra_data: Some(extra_data),
7622 }
7623 }
7624}
7625
7626pub mod verification_view_state {
7627
7628 pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
7629 #[allow(unused)]
7630 use ::core::marker::PhantomData;
7631 mod sealed {
7632 pub trait Sealed {}
7633 }
7634 pub trait State: sealed::Sealed {
7636 type CreatedAt;
7637 type IsValid;
7638 type Issuer;
7639 type Uri;
7640 }
7641 pub struct Empty(());
7643 impl sealed::Sealed for Empty {}
7644 impl State for Empty {
7645 type CreatedAt = Unset;
7646 type IsValid = Unset;
7647 type Issuer = Unset;
7648 type Uri = Unset;
7649 }
7650 pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
7652 impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
7653 impl<St: State> State for SetCreatedAt<St> {
7654 type CreatedAt = Set<members::created_at>;
7655 type IsValid = St::IsValid;
7656 type Issuer = St::Issuer;
7657 type Uri = St::Uri;
7658 }
7659 pub struct SetIsValid<St: State = Empty>(PhantomData<fn() -> St>);
7661 impl<St: State> sealed::Sealed for SetIsValid<St> {}
7662 impl<St: State> State for SetIsValid<St> {
7663 type CreatedAt = St::CreatedAt;
7664 type IsValid = Set<members::is_valid>;
7665 type Issuer = St::Issuer;
7666 type Uri = St::Uri;
7667 }
7668 pub struct SetIssuer<St: State = Empty>(PhantomData<fn() -> St>);
7670 impl<St: State> sealed::Sealed for SetIssuer<St> {}
7671 impl<St: State> State for SetIssuer<St> {
7672 type CreatedAt = St::CreatedAt;
7673 type IsValid = St::IsValid;
7674 type Issuer = Set<members::issuer>;
7675 type Uri = St::Uri;
7676 }
7677 pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
7679 impl<St: State> sealed::Sealed for SetUri<St> {}
7680 impl<St: State> State for SetUri<St> {
7681 type CreatedAt = St::CreatedAt;
7682 type IsValid = St::IsValid;
7683 type Issuer = St::Issuer;
7684 type Uri = Set<members::uri>;
7685 }
7686 #[allow(non_camel_case_types)]
7688 pub mod members {
7689 pub struct created_at(());
7691 pub struct is_valid(());
7693 pub struct issuer(());
7695 pub struct uri(());
7697 }
7698}
7699
7700pub struct VerificationViewBuilder<St: verification_view_state::State, S: BosStr = DefaultStr> {
7702 _state: PhantomData<fn() -> St>,
7703 _fields: (
7704 Option<Datetime>,
7705 Option<bool>,
7706 Option<Did<S>>,
7707 Option<S>,
7708 Option<Handle<S>>,
7709 Option<AtUri<S>>,
7710 ),
7711 _type: PhantomData<fn() -> S>,
7712}
7713
7714impl VerificationView<DefaultStr> {
7715 pub fn new() -> VerificationViewBuilder<verification_view_state::Empty, DefaultStr> {
7717 VerificationViewBuilder::new()
7718 }
7719}
7720
7721impl<S: BosStr> VerificationView<S> {
7722 pub fn builder() -> VerificationViewBuilder<verification_view_state::Empty, S> {
7724 VerificationViewBuilder::builder()
7725 }
7726}
7727
7728impl VerificationViewBuilder<verification_view_state::Empty, DefaultStr> {
7729 pub fn new() -> Self {
7731 VerificationViewBuilder {
7732 _state: PhantomData,
7733 _fields: (None, None, None, None, None, None),
7734 _type: PhantomData,
7735 }
7736 }
7737}
7738
7739impl<S: BosStr> VerificationViewBuilder<verification_view_state::Empty, S> {
7740 pub fn builder() -> Self {
7742 VerificationViewBuilder {
7743 _state: PhantomData,
7744 _fields: (None, None, None, None, None, None),
7745 _type: PhantomData,
7746 }
7747 }
7748}
7749
7750impl<St, S: BosStr> VerificationViewBuilder<St, S>
7751where
7752 St: verification_view_state::State,
7753 St::CreatedAt: verification_view_state::IsUnset,
7754{
7755 pub fn created_at(
7757 mut self,
7758 value: impl Into<Datetime>,
7759 ) -> VerificationViewBuilder<verification_view_state::SetCreatedAt<St>, S> {
7760 self._fields.0 = Option::Some(value.into());
7761 VerificationViewBuilder {
7762 _state: PhantomData,
7763 _fields: self._fields,
7764 _type: PhantomData,
7765 }
7766 }
7767}
7768
7769impl<St, S: BosStr> VerificationViewBuilder<St, S>
7770where
7771 St: verification_view_state::State,
7772 St::IsValid: verification_view_state::IsUnset,
7773{
7774 pub fn is_valid(
7776 mut self,
7777 value: impl Into<bool>,
7778 ) -> VerificationViewBuilder<verification_view_state::SetIsValid<St>, S> {
7779 self._fields.1 = Option::Some(value.into());
7780 VerificationViewBuilder {
7781 _state: PhantomData,
7782 _fields: self._fields,
7783 _type: PhantomData,
7784 }
7785 }
7786}
7787
7788impl<St, S: BosStr> VerificationViewBuilder<St, S>
7789where
7790 St: verification_view_state::State,
7791 St::Issuer: verification_view_state::IsUnset,
7792{
7793 pub fn issuer(
7795 mut self,
7796 value: impl Into<Did<S>>,
7797 ) -> VerificationViewBuilder<verification_view_state::SetIssuer<St>, S> {
7798 self._fields.2 = Option::Some(value.into());
7799 VerificationViewBuilder {
7800 _state: PhantomData,
7801 _fields: self._fields,
7802 _type: PhantomData,
7803 }
7804 }
7805}
7806
7807impl<St: verification_view_state::State, S: BosStr> VerificationViewBuilder<St, S> {
7808 pub fn issuer_display_name(mut self, value: impl Into<Option<S>>) -> Self {
7810 self._fields.3 = value.into();
7811 self
7812 }
7813 pub fn maybe_issuer_display_name(mut self, value: Option<S>) -> Self {
7815 self._fields.3 = value;
7816 self
7817 }
7818}
7819
7820impl<St: verification_view_state::State, S: BosStr> VerificationViewBuilder<St, S> {
7821 pub fn issuer_handle(mut self, value: impl Into<Option<Handle<S>>>) -> Self {
7823 self._fields.4 = value.into();
7824 self
7825 }
7826 pub fn maybe_issuer_handle(mut self, value: Option<Handle<S>>) -> Self {
7828 self._fields.4 = value;
7829 self
7830 }
7831}
7832
7833impl<St, S: BosStr> VerificationViewBuilder<St, S>
7834where
7835 St: verification_view_state::State,
7836 St::Uri: verification_view_state::IsUnset,
7837{
7838 pub fn uri(
7840 mut self,
7841 value: impl Into<AtUri<S>>,
7842 ) -> VerificationViewBuilder<verification_view_state::SetUri<St>, S> {
7843 self._fields.5 = Option::Some(value.into());
7844 VerificationViewBuilder {
7845 _state: PhantomData,
7846 _fields: self._fields,
7847 _type: PhantomData,
7848 }
7849 }
7850}
7851
7852impl<St, S: BosStr> VerificationViewBuilder<St, S>
7853where
7854 St: verification_view_state::State,
7855 St::CreatedAt: verification_view_state::IsSet,
7856 St::IsValid: verification_view_state::IsSet,
7857 St::Issuer: verification_view_state::IsSet,
7858 St::Uri: verification_view_state::IsSet,
7859{
7860 pub fn build(self) -> VerificationView<S> {
7862 VerificationView {
7863 created_at: self._fields.0.unwrap(),
7864 is_valid: self._fields.1.unwrap(),
7865 issuer: self._fields.2.unwrap(),
7866 issuer_display_name: self._fields.3,
7867 issuer_handle: self._fields.4,
7868 uri: self._fields.5.unwrap(),
7869 extra_data: Default::default(),
7870 }
7871 }
7872 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> VerificationView<S> {
7874 VerificationView {
7875 created_at: self._fields.0.unwrap(),
7876 is_valid: self._fields.1.unwrap(),
7877 issuer: self._fields.2.unwrap(),
7878 issuer_display_name: self._fields.3,
7879 issuer_handle: self._fields.4,
7880 uri: self._fields.5.unwrap(),
7881 extra_data: Some(extra_data),
7882 }
7883 }
7884}