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