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