1pub mod block;
9pub mod follow;
10pub mod get_actor_starter_packs;
11pub mod get_blocks;
12pub mod get_followers;
13pub mod get_follows;
14pub mod get_known_followers;
15pub mod get_list;
16pub mod get_list_blocks;
17pub mod get_list_mutes;
18pub mod get_lists;
19pub mod get_lists_with_membership;
20pub mod get_mutes;
21pub mod get_relationships;
22pub mod get_starter_pack;
23pub mod get_starter_packs;
24pub mod get_starter_packs_with_membership;
25pub mod get_suggested_follows_by_actor;
26pub mod list;
27pub mod listblock;
28pub mod listitem;
29pub mod mute_actor;
30pub mod mute_actor_list;
31pub mod mute_thread;
32pub mod search_starter_packs;
33pub mod starterpack;
34pub mod unmute_actor;
35pub mod unmute_actor_list;
36pub mod unmute_thread;
37pub mod verification;
38
39#[derive(
41 serde::Serialize,
42 serde::Deserialize,
43 Debug,
44 Clone,
45 PartialEq,
46 Eq,
47 Hash,
48 jacquard_derive::IntoStatic
49)]
50pub struct Curatelist;
51impl std::fmt::Display for Curatelist {
52 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
53 write!(f, "curatelist")
54 }
55}
56
57#[jacquard_derive::lexicon]
58#[derive(
59 serde::Serialize,
60 serde::Deserialize,
61 Debug,
62 Clone,
63 PartialEq,
64 Eq,
65 jacquard_derive::IntoStatic
66)]
67#[serde(rename_all = "camelCase")]
68pub struct ListItemView<'a> {
69 #[serde(borrow)]
70 pub subject: crate::app_bsky::actor::ProfileView<'a>,
71 #[serde(borrow)]
72 pub uri: jacquard_common::types::string::AtUri<'a>,
73}
74
75pub mod list_item_view_state {
76
77 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
78 #[allow(unused)]
79 use ::core::marker::PhantomData;
80 mod sealed {
81 pub trait Sealed {}
82 }
83 pub trait State: sealed::Sealed {
85 type Uri;
86 type Subject;
87 }
88 pub struct Empty(());
90 impl sealed::Sealed for Empty {}
91 impl State for Empty {
92 type Uri = Unset;
93 type Subject = Unset;
94 }
95 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
97 impl<S: State> sealed::Sealed for SetUri<S> {}
98 impl<S: State> State for SetUri<S> {
99 type Uri = Set<members::uri>;
100 type Subject = S::Subject;
101 }
102 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
104 impl<S: State> sealed::Sealed for SetSubject<S> {}
105 impl<S: State> State for SetSubject<S> {
106 type Uri = S::Uri;
107 type Subject = Set<members::subject>;
108 }
109 #[allow(non_camel_case_types)]
111 pub mod members {
112 pub struct uri(());
114 pub struct subject(());
116 }
117}
118
119pub struct ListItemViewBuilder<'a, S: list_item_view_state::State> {
121 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
122 __unsafe_private_named: (
123 ::core::option::Option<crate::app_bsky::actor::ProfileView<'a>>,
124 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
125 ),
126 _phantom: ::core::marker::PhantomData<&'a ()>,
127}
128
129impl<'a> ListItemView<'a> {
130 pub fn new() -> ListItemViewBuilder<'a, list_item_view_state::Empty> {
132 ListItemViewBuilder::new()
133 }
134}
135
136impl<'a> ListItemViewBuilder<'a, list_item_view_state::Empty> {
137 pub fn new() -> Self {
139 ListItemViewBuilder {
140 _phantom_state: ::core::marker::PhantomData,
141 __unsafe_private_named: (None, None),
142 _phantom: ::core::marker::PhantomData,
143 }
144 }
145}
146
147impl<'a, S> ListItemViewBuilder<'a, S>
148where
149 S: list_item_view_state::State,
150 S::Subject: list_item_view_state::IsUnset,
151{
152 pub fn subject(
154 mut self,
155 value: impl Into<crate::app_bsky::actor::ProfileView<'a>>,
156 ) -> ListItemViewBuilder<'a, list_item_view_state::SetSubject<S>> {
157 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
158 ListItemViewBuilder {
159 _phantom_state: ::core::marker::PhantomData,
160 __unsafe_private_named: self.__unsafe_private_named,
161 _phantom: ::core::marker::PhantomData,
162 }
163 }
164}
165
166impl<'a, S> ListItemViewBuilder<'a, S>
167where
168 S: list_item_view_state::State,
169 S::Uri: list_item_view_state::IsUnset,
170{
171 pub fn uri(
173 mut self,
174 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
175 ) -> ListItemViewBuilder<'a, list_item_view_state::SetUri<S>> {
176 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
177 ListItemViewBuilder {
178 _phantom_state: ::core::marker::PhantomData,
179 __unsafe_private_named: self.__unsafe_private_named,
180 _phantom: ::core::marker::PhantomData,
181 }
182 }
183}
184
185impl<'a, S> ListItemViewBuilder<'a, S>
186where
187 S: list_item_view_state::State,
188 S::Uri: list_item_view_state::IsSet,
189 S::Subject: list_item_view_state::IsSet,
190{
191 pub fn build(self) -> ListItemView<'a> {
193 ListItemView {
194 subject: self.__unsafe_private_named.0.unwrap(),
195 uri: self.__unsafe_private_named.1.unwrap(),
196 extra_data: Default::default(),
197 }
198 }
199 pub fn build_with_data(
201 self,
202 extra_data: std::collections::BTreeMap<
203 jacquard_common::smol_str::SmolStr,
204 jacquard_common::types::value::Data<'a>,
205 >,
206 ) -> ListItemView<'a> {
207 ListItemView {
208 subject: self.__unsafe_private_named.0.unwrap(),
209 uri: self.__unsafe_private_named.1.unwrap(),
210 extra_data: Some(extra_data),
211 }
212 }
213}
214
215fn lexicon_doc_app_bsky_graph_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc<
216 'static,
217> {
218 ::jacquard_lexicon::lexicon::LexiconDoc {
219 lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
220 id: ::jacquard_common::CowStr::new_static("app.bsky.graph.defs"),
221 revision: None,
222 description: None,
223 defs: {
224 let mut map = ::std::collections::BTreeMap::new();
225 map.insert(
226 ::jacquard_common::smol_str::SmolStr::new_static("curatelist"),
227 ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
228 description: None,
229 }),
230 );
231 map.insert(
232 ::jacquard_common::smol_str::SmolStr::new_static("listItemView"),
233 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
234 description: None,
235 required: Some(
236 vec![
237 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
238 ::jacquard_common::smol_str::SmolStr::new_static("subject")
239 ],
240 ),
241 nullable: None,
242 properties: {
243 #[allow(unused_mut)]
244 let mut map = ::std::collections::BTreeMap::new();
245 map.insert(
246 ::jacquard_common::smol_str::SmolStr::new_static("subject"),
247 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
248 description: None,
249 r#ref: ::jacquard_common::CowStr::new_static(
250 "app.bsky.actor.defs#profileView",
251 ),
252 }),
253 );
254 map.insert(
255 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
256 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
257 description: None,
258 format: Some(
259 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
260 ),
261 default: None,
262 min_length: None,
263 max_length: None,
264 min_graphemes: None,
265 max_graphemes: None,
266 r#enum: None,
267 r#const: None,
268 known_values: None,
269 }),
270 );
271 map
272 },
273 }),
274 );
275 map.insert(
276 ::jacquard_common::smol_str::SmolStr::new_static("listPurpose"),
277 ::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString {
278 description: None,
279 format: None,
280 default: None,
281 min_length: None,
282 max_length: None,
283 min_graphemes: None,
284 max_graphemes: None,
285 r#enum: None,
286 r#const: None,
287 known_values: None,
288 }),
289 );
290 map.insert(
291 ::jacquard_common::smol_str::SmolStr::new_static("listView"),
292 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
293 description: None,
294 required: Some(
295 vec![
296 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
297 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
298 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
299 ::jacquard_common::smol_str::SmolStr::new_static("name"),
300 ::jacquard_common::smol_str::SmolStr::new_static("purpose"),
301 ::jacquard_common::smol_str::SmolStr::new_static("indexedAt")
302 ],
303 ),
304 nullable: None,
305 properties: {
306 #[allow(unused_mut)]
307 let mut map = ::std::collections::BTreeMap::new();
308 map.insert(
309 ::jacquard_common::smol_str::SmolStr::new_static("avatar"),
310 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
311 description: None,
312 format: Some(
313 ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
314 ),
315 default: None,
316 min_length: None,
317 max_length: None,
318 min_graphemes: None,
319 max_graphemes: None,
320 r#enum: None,
321 r#const: None,
322 known_values: None,
323 }),
324 );
325 map.insert(
326 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
327 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
328 description: None,
329 format: Some(
330 ::jacquard_lexicon::lexicon::LexStringFormat::Cid,
331 ),
332 default: None,
333 min_length: None,
334 max_length: None,
335 min_graphemes: None,
336 max_graphemes: None,
337 r#enum: None,
338 r#const: None,
339 known_values: None,
340 }),
341 );
342 map.insert(
343 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
344 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
345 description: None,
346 r#ref: ::jacquard_common::CowStr::new_static(
347 "app.bsky.actor.defs#profileView",
348 ),
349 }),
350 );
351 map.insert(
352 ::jacquard_common::smol_str::SmolStr::new_static(
353 "description",
354 ),
355 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
356 description: None,
357 format: None,
358 default: None,
359 min_length: None,
360 max_length: Some(3000usize),
361 min_graphemes: None,
362 max_graphemes: Some(300usize),
363 r#enum: None,
364 r#const: None,
365 known_values: None,
366 }),
367 );
368 map.insert(
369 ::jacquard_common::smol_str::SmolStr::new_static(
370 "descriptionFacets",
371 ),
372 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
373 description: None,
374 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
375 description: None,
376 r#ref: ::jacquard_common::CowStr::new_static(
377 "app.bsky.richtext.facet",
378 ),
379 }),
380 min_length: None,
381 max_length: None,
382 }),
383 );
384 map.insert(
385 ::jacquard_common::smol_str::SmolStr::new_static(
386 "indexedAt",
387 ),
388 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
389 description: None,
390 format: Some(
391 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
392 ),
393 default: None,
394 min_length: None,
395 max_length: None,
396 min_graphemes: None,
397 max_graphemes: None,
398 r#enum: None,
399 r#const: None,
400 known_values: None,
401 }),
402 );
403 map.insert(
404 ::jacquard_common::smol_str::SmolStr::new_static("labels"),
405 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
406 description: None,
407 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
408 description: None,
409 r#ref: ::jacquard_common::CowStr::new_static(
410 "com.atproto.label.defs#label",
411 ),
412 }),
413 min_length: None,
414 max_length: None,
415 }),
416 );
417 map.insert(
418 ::jacquard_common::smol_str::SmolStr::new_static(
419 "listItemCount",
420 ),
421 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
422 description: None,
423 default: None,
424 minimum: Some(0i64),
425 maximum: None,
426 r#enum: None,
427 r#const: None,
428 }),
429 );
430 map.insert(
431 ::jacquard_common::smol_str::SmolStr::new_static("name"),
432 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
433 description: None,
434 format: None,
435 default: None,
436 min_length: Some(1usize),
437 max_length: Some(64usize),
438 min_graphemes: None,
439 max_graphemes: None,
440 r#enum: None,
441 r#const: None,
442 known_values: None,
443 }),
444 );
445 map.insert(
446 ::jacquard_common::smol_str::SmolStr::new_static("purpose"),
447 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
448 description: None,
449 r#ref: ::jacquard_common::CowStr::new_static("#listPurpose"),
450 }),
451 );
452 map.insert(
453 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
454 ::jacquard_lexicon::lexicon::LexObjectProperty::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 );
469 map.insert(
470 ::jacquard_common::smol_str::SmolStr::new_static("viewer"),
471 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
472 description: None,
473 r#ref: ::jacquard_common::CowStr::new_static(
474 "#listViewerState",
475 ),
476 }),
477 );
478 map
479 },
480 }),
481 );
482 map.insert(
483 ::jacquard_common::smol_str::SmolStr::new_static("listViewBasic"),
484 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
485 description: None,
486 required: Some(
487 vec![
488 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
489 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
490 ::jacquard_common::smol_str::SmolStr::new_static("name"),
491 ::jacquard_common::smol_str::SmolStr::new_static("purpose")
492 ],
493 ),
494 nullable: None,
495 properties: {
496 #[allow(unused_mut)]
497 let mut map = ::std::collections::BTreeMap::new();
498 map.insert(
499 ::jacquard_common::smol_str::SmolStr::new_static("avatar"),
500 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
501 description: None,
502 format: Some(
503 ::jacquard_lexicon::lexicon::LexStringFormat::Uri,
504 ),
505 default: None,
506 min_length: None,
507 max_length: None,
508 min_graphemes: None,
509 max_graphemes: None,
510 r#enum: None,
511 r#const: None,
512 known_values: None,
513 }),
514 );
515 map.insert(
516 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
517 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
518 description: None,
519 format: Some(
520 ::jacquard_lexicon::lexicon::LexStringFormat::Cid,
521 ),
522 default: None,
523 min_length: None,
524 max_length: None,
525 min_graphemes: None,
526 max_graphemes: None,
527 r#enum: None,
528 r#const: None,
529 known_values: None,
530 }),
531 );
532 map.insert(
533 ::jacquard_common::smol_str::SmolStr::new_static(
534 "indexedAt",
535 ),
536 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
537 description: None,
538 format: Some(
539 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
540 ),
541 default: None,
542 min_length: None,
543 max_length: None,
544 min_graphemes: None,
545 max_graphemes: None,
546 r#enum: None,
547 r#const: None,
548 known_values: None,
549 }),
550 );
551 map.insert(
552 ::jacquard_common::smol_str::SmolStr::new_static("labels"),
553 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
554 description: None,
555 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
556 description: None,
557 r#ref: ::jacquard_common::CowStr::new_static(
558 "com.atproto.label.defs#label",
559 ),
560 }),
561 min_length: None,
562 max_length: None,
563 }),
564 );
565 map.insert(
566 ::jacquard_common::smol_str::SmolStr::new_static(
567 "listItemCount",
568 ),
569 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
570 description: None,
571 default: None,
572 minimum: Some(0i64),
573 maximum: None,
574 r#enum: None,
575 r#const: None,
576 }),
577 );
578 map.insert(
579 ::jacquard_common::smol_str::SmolStr::new_static("name"),
580 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
581 description: None,
582 format: None,
583 default: None,
584 min_length: Some(1usize),
585 max_length: Some(64usize),
586 min_graphemes: None,
587 max_graphemes: None,
588 r#enum: None,
589 r#const: None,
590 known_values: None,
591 }),
592 );
593 map.insert(
594 ::jacquard_common::smol_str::SmolStr::new_static("purpose"),
595 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
596 description: None,
597 r#ref: ::jacquard_common::CowStr::new_static("#listPurpose"),
598 }),
599 );
600 map.insert(
601 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
602 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
603 description: None,
604 format: Some(
605 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
606 ),
607 default: None,
608 min_length: None,
609 max_length: None,
610 min_graphemes: None,
611 max_graphemes: None,
612 r#enum: None,
613 r#const: None,
614 known_values: None,
615 }),
616 );
617 map.insert(
618 ::jacquard_common::smol_str::SmolStr::new_static("viewer"),
619 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
620 description: None,
621 r#ref: ::jacquard_common::CowStr::new_static(
622 "#listViewerState",
623 ),
624 }),
625 );
626 map
627 },
628 }),
629 );
630 map.insert(
631 ::jacquard_common::smol_str::SmolStr::new_static("listViewerState"),
632 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
633 description: None,
634 required: None,
635 nullable: None,
636 properties: {
637 #[allow(unused_mut)]
638 let mut map = ::std::collections::BTreeMap::new();
639 map.insert(
640 ::jacquard_common::smol_str::SmolStr::new_static("blocked"),
641 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
642 description: None,
643 format: Some(
644 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
645 ),
646 default: None,
647 min_length: None,
648 max_length: None,
649 min_graphemes: None,
650 max_graphemes: None,
651 r#enum: None,
652 r#const: None,
653 known_values: None,
654 }),
655 );
656 map.insert(
657 ::jacquard_common::smol_str::SmolStr::new_static("muted"),
658 ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
659 description: None,
660 default: None,
661 r#const: None,
662 }),
663 );
664 map
665 },
666 }),
667 );
668 map.insert(
669 ::jacquard_common::smol_str::SmolStr::new_static("modlist"),
670 ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
671 description: None,
672 }),
673 );
674 map.insert(
675 ::jacquard_common::smol_str::SmolStr::new_static("notFoundActor"),
676 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
677 description: Some(
678 ::jacquard_common::CowStr::new_static(
679 "indicates that a handle or DID could not be resolved",
680 ),
681 ),
682 required: Some(
683 vec![
684 ::jacquard_common::smol_str::SmolStr::new_static("actor"),
685 ::jacquard_common::smol_str::SmolStr::new_static("notFound")
686 ],
687 ),
688 nullable: None,
689 properties: {
690 #[allow(unused_mut)]
691 let mut map = ::std::collections::BTreeMap::new();
692 map.insert(
693 ::jacquard_common::smol_str::SmolStr::new_static("actor"),
694 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
695 description: None,
696 format: Some(
697 ::jacquard_lexicon::lexicon::LexStringFormat::AtIdentifier,
698 ),
699 default: None,
700 min_length: None,
701 max_length: None,
702 min_graphemes: None,
703 max_graphemes: None,
704 r#enum: None,
705 r#const: None,
706 known_values: None,
707 }),
708 );
709 map.insert(
710 ::jacquard_common::smol_str::SmolStr::new_static("notFound"),
711 ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean {
712 description: None,
713 default: None,
714 r#const: None,
715 }),
716 );
717 map
718 },
719 }),
720 );
721 map.insert(
722 ::jacquard_common::smol_str::SmolStr::new_static("referencelist"),
723 ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
724 description: None,
725 }),
726 );
727 map.insert(
728 ::jacquard_common::smol_str::SmolStr::new_static("relationship"),
729 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
730 description: Some(
731 ::jacquard_common::CowStr::new_static(
732 "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",
733 ),
734 ),
735 required: Some(
736 vec![::jacquard_common::smol_str::SmolStr::new_static("did")],
737 ),
738 nullable: None,
739 properties: {
740 #[allow(unused_mut)]
741 let mut map = ::std::collections::BTreeMap::new();
742 map.insert(
743 ::jacquard_common::smol_str::SmolStr::new_static(
744 "blockedBy",
745 ),
746 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
747 description: Some(
748 ::jacquard_common::CowStr::new_static(
749 "if the actor is blocked by this DID, contains the AT-URI of the block record",
750 ),
751 ),
752 format: Some(
753 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
754 ),
755 default: None,
756 min_length: None,
757 max_length: None,
758 min_graphemes: None,
759 max_graphemes: None,
760 r#enum: None,
761 r#const: None,
762 known_values: None,
763 }),
764 );
765 map.insert(
766 ::jacquard_common::smol_str::SmolStr::new_static(
767 "blockedByList",
768 ),
769 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
770 description: Some(
771 ::jacquard_common::CowStr::new_static(
772 "if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record",
773 ),
774 ),
775 format: Some(
776 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
777 ),
778 default: None,
779 min_length: None,
780 max_length: None,
781 min_graphemes: None,
782 max_graphemes: None,
783 r#enum: None,
784 r#const: None,
785 known_values: None,
786 }),
787 );
788 map.insert(
789 ::jacquard_common::smol_str::SmolStr::new_static("blocking"),
790 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
791 description: Some(
792 ::jacquard_common::CowStr::new_static(
793 "if the actor blocks this DID, this is the AT-URI of the block record",
794 ),
795 ),
796 format: Some(
797 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
798 ),
799 default: None,
800 min_length: None,
801 max_length: None,
802 min_graphemes: None,
803 max_graphemes: None,
804 r#enum: None,
805 r#const: None,
806 known_values: None,
807 }),
808 );
809 map.insert(
810 ::jacquard_common::smol_str::SmolStr::new_static(
811 "blockingByList",
812 ),
813 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
814 description: Some(
815 ::jacquard_common::CowStr::new_static(
816 "if the actor blocks this DID via a block list, this is the AT-URI of the listblock record",
817 ),
818 ),
819 format: Some(
820 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
821 ),
822 default: None,
823 min_length: None,
824 max_length: None,
825 min_graphemes: None,
826 max_graphemes: None,
827 r#enum: None,
828 r#const: None,
829 known_values: None,
830 }),
831 );
832 map.insert(
833 ::jacquard_common::smol_str::SmolStr::new_static("did"),
834 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
835 description: None,
836 format: Some(
837 ::jacquard_lexicon::lexicon::LexStringFormat::Did,
838 ),
839 default: None,
840 min_length: None,
841 max_length: None,
842 min_graphemes: None,
843 max_graphemes: None,
844 r#enum: None,
845 r#const: None,
846 known_values: None,
847 }),
848 );
849 map.insert(
850 ::jacquard_common::smol_str::SmolStr::new_static(
851 "followedBy",
852 ),
853 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
854 description: Some(
855 ::jacquard_common::CowStr::new_static(
856 "if the actor is followed by this DID, contains the AT-URI of the follow record",
857 ),
858 ),
859 format: Some(
860 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
861 ),
862 default: None,
863 min_length: None,
864 max_length: None,
865 min_graphemes: None,
866 max_graphemes: None,
867 r#enum: None,
868 r#const: None,
869 known_values: None,
870 }),
871 );
872 map.insert(
873 ::jacquard_common::smol_str::SmolStr::new_static(
874 "following",
875 ),
876 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
877 description: Some(
878 ::jacquard_common::CowStr::new_static(
879 "if the actor follows this DID, this is the AT-URI of the follow record",
880 ),
881 ),
882 format: Some(
883 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
884 ),
885 default: None,
886 min_length: None,
887 max_length: None,
888 min_graphemes: None,
889 max_graphemes: None,
890 r#enum: None,
891 r#const: None,
892 known_values: None,
893 }),
894 );
895 map
896 },
897 }),
898 );
899 map.insert(
900 ::jacquard_common::smol_str::SmolStr::new_static("starterPackView"),
901 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
902 description: None,
903 required: Some(
904 vec![
905 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
906 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
907 ::jacquard_common::smol_str::SmolStr::new_static("record"),
908 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
909 ::jacquard_common::smol_str::SmolStr::new_static("indexedAt")
910 ],
911 ),
912 nullable: None,
913 properties: {
914 #[allow(unused_mut)]
915 let mut map = ::std::collections::BTreeMap::new();
916 map.insert(
917 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
918 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
919 description: None,
920 format: Some(
921 ::jacquard_lexicon::lexicon::LexStringFormat::Cid,
922 ),
923 default: None,
924 min_length: None,
925 max_length: None,
926 min_graphemes: None,
927 max_graphemes: None,
928 r#enum: None,
929 r#const: None,
930 known_values: None,
931 }),
932 );
933 map.insert(
934 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
935 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
936 description: None,
937 r#ref: ::jacquard_common::CowStr::new_static(
938 "app.bsky.actor.defs#profileViewBasic",
939 ),
940 }),
941 );
942 map.insert(
943 ::jacquard_common::smol_str::SmolStr::new_static("feeds"),
944 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
945 description: None,
946 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
947 description: None,
948 r#ref: ::jacquard_common::CowStr::new_static(
949 "app.bsky.feed.defs#generatorView",
950 ),
951 }),
952 min_length: None,
953 max_length: Some(3usize),
954 }),
955 );
956 map.insert(
957 ::jacquard_common::smol_str::SmolStr::new_static(
958 "indexedAt",
959 ),
960 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
961 description: None,
962 format: Some(
963 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
964 ),
965 default: None,
966 min_length: None,
967 max_length: None,
968 min_graphemes: None,
969 max_graphemes: None,
970 r#enum: None,
971 r#const: None,
972 known_values: None,
973 }),
974 );
975 map.insert(
976 ::jacquard_common::smol_str::SmolStr::new_static(
977 "joinedAllTimeCount",
978 ),
979 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
980 description: None,
981 default: None,
982 minimum: Some(0i64),
983 maximum: None,
984 r#enum: None,
985 r#const: None,
986 }),
987 );
988 map.insert(
989 ::jacquard_common::smol_str::SmolStr::new_static(
990 "joinedWeekCount",
991 ),
992 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
993 description: None,
994 default: None,
995 minimum: Some(0i64),
996 maximum: None,
997 r#enum: None,
998 r#const: None,
999 }),
1000 );
1001 map.insert(
1002 ::jacquard_common::smol_str::SmolStr::new_static("labels"),
1003 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
1004 description: None,
1005 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
1006 description: None,
1007 r#ref: ::jacquard_common::CowStr::new_static(
1008 "com.atproto.label.defs#label",
1009 ),
1010 }),
1011 min_length: None,
1012 max_length: None,
1013 }),
1014 );
1015 map.insert(
1016 ::jacquard_common::smol_str::SmolStr::new_static("list"),
1017 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
1018 description: None,
1019 r#ref: ::jacquard_common::CowStr::new_static(
1020 "#listViewBasic",
1021 ),
1022 }),
1023 );
1024 map.insert(
1025 ::jacquard_common::smol_str::SmolStr::new_static(
1026 "listItemsSample",
1027 ),
1028 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
1029 description: None,
1030 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
1031 description: None,
1032 r#ref: ::jacquard_common::CowStr::new_static(
1033 "#listItemView",
1034 ),
1035 }),
1036 min_length: None,
1037 max_length: Some(12usize),
1038 }),
1039 );
1040 map.insert(
1041 ::jacquard_common::smol_str::SmolStr::new_static("record"),
1042 ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
1043 description: None,
1044 }),
1045 );
1046 map.insert(
1047 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
1048 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
1049 description: None,
1050 format: Some(
1051 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
1052 ),
1053 default: None,
1054 min_length: None,
1055 max_length: None,
1056 min_graphemes: None,
1057 max_graphemes: None,
1058 r#enum: None,
1059 r#const: None,
1060 known_values: None,
1061 }),
1062 );
1063 map
1064 },
1065 }),
1066 );
1067 map.insert(
1068 ::jacquard_common::smol_str::SmolStr::new_static("starterPackViewBasic"),
1069 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
1070 description: None,
1071 required: Some(
1072 vec![
1073 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
1074 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
1075 ::jacquard_common::smol_str::SmolStr::new_static("record"),
1076 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
1077 ::jacquard_common::smol_str::SmolStr::new_static("indexedAt")
1078 ],
1079 ),
1080 nullable: None,
1081 properties: {
1082 #[allow(unused_mut)]
1083 let mut map = ::std::collections::BTreeMap::new();
1084 map.insert(
1085 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
1086 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
1087 description: None,
1088 format: Some(
1089 ::jacquard_lexicon::lexicon::LexStringFormat::Cid,
1090 ),
1091 default: None,
1092 min_length: None,
1093 max_length: None,
1094 min_graphemes: None,
1095 max_graphemes: None,
1096 r#enum: None,
1097 r#const: None,
1098 known_values: None,
1099 }),
1100 );
1101 map.insert(
1102 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
1103 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
1104 description: None,
1105 r#ref: ::jacquard_common::CowStr::new_static(
1106 "app.bsky.actor.defs#profileViewBasic",
1107 ),
1108 }),
1109 );
1110 map.insert(
1111 ::jacquard_common::smol_str::SmolStr::new_static(
1112 "indexedAt",
1113 ),
1114 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
1115 description: None,
1116 format: Some(
1117 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
1118 ),
1119 default: None,
1120 min_length: None,
1121 max_length: None,
1122 min_graphemes: None,
1123 max_graphemes: None,
1124 r#enum: None,
1125 r#const: None,
1126 known_values: None,
1127 }),
1128 );
1129 map.insert(
1130 ::jacquard_common::smol_str::SmolStr::new_static(
1131 "joinedAllTimeCount",
1132 ),
1133 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
1134 description: None,
1135 default: None,
1136 minimum: Some(0i64),
1137 maximum: None,
1138 r#enum: None,
1139 r#const: None,
1140 }),
1141 );
1142 map.insert(
1143 ::jacquard_common::smol_str::SmolStr::new_static(
1144 "joinedWeekCount",
1145 ),
1146 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
1147 description: None,
1148 default: None,
1149 minimum: Some(0i64),
1150 maximum: None,
1151 r#enum: None,
1152 r#const: None,
1153 }),
1154 );
1155 map.insert(
1156 ::jacquard_common::smol_str::SmolStr::new_static("labels"),
1157 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
1158 description: None,
1159 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
1160 description: None,
1161 r#ref: ::jacquard_common::CowStr::new_static(
1162 "com.atproto.label.defs#label",
1163 ),
1164 }),
1165 min_length: None,
1166 max_length: None,
1167 }),
1168 );
1169 map.insert(
1170 ::jacquard_common::smol_str::SmolStr::new_static(
1171 "listItemCount",
1172 ),
1173 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
1174 description: None,
1175 default: None,
1176 minimum: Some(0i64),
1177 maximum: None,
1178 r#enum: None,
1179 r#const: None,
1180 }),
1181 );
1182 map.insert(
1183 ::jacquard_common::smol_str::SmolStr::new_static("record"),
1184 ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
1185 description: None,
1186 }),
1187 );
1188 map.insert(
1189 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
1190 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
1191 description: None,
1192 format: Some(
1193 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
1194 ),
1195 default: None,
1196 min_length: None,
1197 max_length: None,
1198 min_graphemes: None,
1199 max_graphemes: None,
1200 r#enum: None,
1201 r#const: None,
1202 known_values: None,
1203 }),
1204 );
1205 map
1206 },
1207 }),
1208 );
1209 map
1210 },
1211 }
1212}
1213
1214impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListItemView<'a> {
1215 fn nsid() -> &'static str {
1216 "app.bsky.graph.defs"
1217 }
1218 fn def_name() -> &'static str {
1219 "listItemView"
1220 }
1221 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
1222 lexicon_doc_app_bsky_graph_defs()
1223 }
1224 fn validate(
1225 &self,
1226 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
1227 Ok(())
1228 }
1229}
1230
1231#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1232pub enum ListPurpose<'a> {
1233 AppBskyGraphDefsModlist,
1234 AppBskyGraphDefsCuratelist,
1235 AppBskyGraphDefsReferencelist,
1236 Other(jacquard_common::CowStr<'a>),
1237}
1238
1239impl<'a> ListPurpose<'a> {
1240 pub fn as_str(&self) -> &str {
1241 match self {
1242 Self::AppBskyGraphDefsModlist => "app.bsky.graph.defs#modlist",
1243 Self::AppBskyGraphDefsCuratelist => "app.bsky.graph.defs#curatelist",
1244 Self::AppBskyGraphDefsReferencelist => "app.bsky.graph.defs#referencelist",
1245 Self::Other(s) => s.as_ref(),
1246 }
1247 }
1248}
1249
1250impl<'a> From<&'a str> for ListPurpose<'a> {
1251 fn from(s: &'a str) -> Self {
1252 match s {
1253 "app.bsky.graph.defs#modlist" => Self::AppBskyGraphDefsModlist,
1254 "app.bsky.graph.defs#curatelist" => Self::AppBskyGraphDefsCuratelist,
1255 "app.bsky.graph.defs#referencelist" => Self::AppBskyGraphDefsReferencelist,
1256 _ => Self::Other(jacquard_common::CowStr::from(s)),
1257 }
1258 }
1259}
1260
1261impl<'a> From<String> for ListPurpose<'a> {
1262 fn from(s: String) -> Self {
1263 match s.as_str() {
1264 "app.bsky.graph.defs#modlist" => Self::AppBskyGraphDefsModlist,
1265 "app.bsky.graph.defs#curatelist" => Self::AppBskyGraphDefsCuratelist,
1266 "app.bsky.graph.defs#referencelist" => Self::AppBskyGraphDefsReferencelist,
1267 _ => Self::Other(jacquard_common::CowStr::from(s)),
1268 }
1269 }
1270}
1271
1272impl<'a> AsRef<str> for ListPurpose<'a> {
1273 fn as_ref(&self) -> &str {
1274 self.as_str()
1275 }
1276}
1277
1278impl<'a> serde::Serialize for ListPurpose<'a> {
1279 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1280 where
1281 S: serde::Serializer,
1282 {
1283 serializer.serialize_str(self.as_str())
1284 }
1285}
1286
1287impl<'de, 'a> serde::Deserialize<'de> for ListPurpose<'a>
1288where
1289 'de: 'a,
1290{
1291 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1292 where
1293 D: serde::Deserializer<'de>,
1294 {
1295 let s = <&'de str>::deserialize(deserializer)?;
1296 Ok(Self::from(s))
1297 }
1298}
1299
1300impl jacquard_common::IntoStatic for ListPurpose<'_> {
1301 type Output = ListPurpose<'static>;
1302 fn into_static(self) -> Self::Output {
1303 match self {
1304 ListPurpose::AppBskyGraphDefsModlist => ListPurpose::AppBskyGraphDefsModlist,
1305 ListPurpose::AppBskyGraphDefsCuratelist => {
1306 ListPurpose::AppBskyGraphDefsCuratelist
1307 }
1308 ListPurpose::AppBskyGraphDefsReferencelist => {
1309 ListPurpose::AppBskyGraphDefsReferencelist
1310 }
1311 ListPurpose::Other(v) => ListPurpose::Other(v.into_static()),
1312 }
1313 }
1314}
1315
1316#[jacquard_derive::lexicon]
1317#[derive(
1318 serde::Serialize,
1319 serde::Deserialize,
1320 Debug,
1321 Clone,
1322 PartialEq,
1323 Eq,
1324 jacquard_derive::IntoStatic
1325)]
1326#[serde(rename_all = "camelCase")]
1327pub struct ListView<'a> {
1328 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1329 #[serde(borrow)]
1330 pub avatar: std::option::Option<jacquard_common::types::string::Uri<'a>>,
1331 #[serde(borrow)]
1332 pub cid: jacquard_common::types::string::Cid<'a>,
1333 #[serde(borrow)]
1334 pub creator: crate::app_bsky::actor::ProfileView<'a>,
1335 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1336 #[serde(borrow)]
1337 pub description: std::option::Option<jacquard_common::CowStr<'a>>,
1338 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1339 #[serde(borrow)]
1340 pub description_facets: std::option::Option<
1341 Vec<crate::app_bsky::richtext::facet::Facet<'a>>,
1342 >,
1343 pub indexed_at: jacquard_common::types::string::Datetime,
1344 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1345 #[serde(borrow)]
1346 pub labels: std::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
1347 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1348 pub list_item_count: std::option::Option<i64>,
1349 #[serde(borrow)]
1350 pub name: jacquard_common::CowStr<'a>,
1351 #[serde(borrow)]
1352 pub purpose: crate::app_bsky::graph::ListPurpose<'a>,
1353 #[serde(borrow)]
1354 pub uri: jacquard_common::types::string::AtUri<'a>,
1355 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1356 #[serde(borrow)]
1357 pub viewer: std::option::Option<crate::app_bsky::graph::ListViewerState<'a>>,
1358}
1359
1360pub mod list_view_state {
1361
1362 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1363 #[allow(unused)]
1364 use ::core::marker::PhantomData;
1365 mod sealed {
1366 pub trait Sealed {}
1367 }
1368 pub trait State: sealed::Sealed {
1370 type Uri;
1371 type Cid;
1372 type Creator;
1373 type Purpose;
1374 type IndexedAt;
1375 type Name;
1376 }
1377 pub struct Empty(());
1379 impl sealed::Sealed for Empty {}
1380 impl State for Empty {
1381 type Uri = Unset;
1382 type Cid = Unset;
1383 type Creator = Unset;
1384 type Purpose = Unset;
1385 type IndexedAt = Unset;
1386 type Name = Unset;
1387 }
1388 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
1390 impl<S: State> sealed::Sealed for SetUri<S> {}
1391 impl<S: State> State for SetUri<S> {
1392 type Uri = Set<members::uri>;
1393 type Cid = S::Cid;
1394 type Creator = S::Creator;
1395 type Purpose = S::Purpose;
1396 type IndexedAt = S::IndexedAt;
1397 type Name = S::Name;
1398 }
1399 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
1401 impl<S: State> sealed::Sealed for SetCid<S> {}
1402 impl<S: State> State for SetCid<S> {
1403 type Uri = S::Uri;
1404 type Cid = Set<members::cid>;
1405 type Creator = S::Creator;
1406 type Purpose = S::Purpose;
1407 type IndexedAt = S::IndexedAt;
1408 type Name = S::Name;
1409 }
1410 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
1412 impl<S: State> sealed::Sealed for SetCreator<S> {}
1413 impl<S: State> State for SetCreator<S> {
1414 type Uri = S::Uri;
1415 type Cid = S::Cid;
1416 type Creator = Set<members::creator>;
1417 type Purpose = S::Purpose;
1418 type IndexedAt = S::IndexedAt;
1419 type Name = S::Name;
1420 }
1421 pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
1423 impl<S: State> sealed::Sealed for SetPurpose<S> {}
1424 impl<S: State> State for SetPurpose<S> {
1425 type Uri = S::Uri;
1426 type Cid = S::Cid;
1427 type Creator = S::Creator;
1428 type Purpose = Set<members::purpose>;
1429 type IndexedAt = S::IndexedAt;
1430 type Name = S::Name;
1431 }
1432 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
1434 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
1435 impl<S: State> State for SetIndexedAt<S> {
1436 type Uri = S::Uri;
1437 type Cid = S::Cid;
1438 type Creator = S::Creator;
1439 type Purpose = S::Purpose;
1440 type IndexedAt = Set<members::indexed_at>;
1441 type Name = S::Name;
1442 }
1443 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
1445 impl<S: State> sealed::Sealed for SetName<S> {}
1446 impl<S: State> State for SetName<S> {
1447 type Uri = S::Uri;
1448 type Cid = S::Cid;
1449 type Creator = S::Creator;
1450 type Purpose = S::Purpose;
1451 type IndexedAt = S::IndexedAt;
1452 type Name = Set<members::name>;
1453 }
1454 #[allow(non_camel_case_types)]
1456 pub mod members {
1457 pub struct uri(());
1459 pub struct cid(());
1461 pub struct creator(());
1463 pub struct purpose(());
1465 pub struct indexed_at(());
1467 pub struct name(());
1469 }
1470}
1471
1472pub struct ListViewBuilder<'a, S: list_view_state::State> {
1474 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
1475 __unsafe_private_named: (
1476 ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
1477 ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
1478 ::core::option::Option<crate::app_bsky::actor::ProfileView<'a>>,
1479 ::core::option::Option<jacquard_common::CowStr<'a>>,
1480 ::core::option::Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
1481 ::core::option::Option<jacquard_common::types::string::Datetime>,
1482 ::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
1483 ::core::option::Option<i64>,
1484 ::core::option::Option<jacquard_common::CowStr<'a>>,
1485 ::core::option::Option<crate::app_bsky::graph::ListPurpose<'a>>,
1486 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
1487 ::core::option::Option<crate::app_bsky::graph::ListViewerState<'a>>,
1488 ),
1489 _phantom: ::core::marker::PhantomData<&'a ()>,
1490}
1491
1492impl<'a> ListView<'a> {
1493 pub fn new() -> ListViewBuilder<'a, list_view_state::Empty> {
1495 ListViewBuilder::new()
1496 }
1497}
1498
1499impl<'a> ListViewBuilder<'a, list_view_state::Empty> {
1500 pub fn new() -> Self {
1502 ListViewBuilder {
1503 _phantom_state: ::core::marker::PhantomData,
1504 __unsafe_private_named: (
1505 None,
1506 None,
1507 None,
1508 None,
1509 None,
1510 None,
1511 None,
1512 None,
1513 None,
1514 None,
1515 None,
1516 None,
1517 ),
1518 _phantom: ::core::marker::PhantomData,
1519 }
1520 }
1521}
1522
1523impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1524 pub fn avatar(
1526 mut self,
1527 value: impl Into<Option<jacquard_common::types::string::Uri<'a>>>,
1528 ) -> Self {
1529 self.__unsafe_private_named.0 = value.into();
1530 self
1531 }
1532 pub fn maybe_avatar(
1534 mut self,
1535 value: Option<jacquard_common::types::string::Uri<'a>>,
1536 ) -> Self {
1537 self.__unsafe_private_named.0 = value;
1538 self
1539 }
1540}
1541
1542impl<'a, S> ListViewBuilder<'a, S>
1543where
1544 S: list_view_state::State,
1545 S::Cid: list_view_state::IsUnset,
1546{
1547 pub fn cid(
1549 mut self,
1550 value: impl Into<jacquard_common::types::string::Cid<'a>>,
1551 ) -> ListViewBuilder<'a, list_view_state::SetCid<S>> {
1552 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
1553 ListViewBuilder {
1554 _phantom_state: ::core::marker::PhantomData,
1555 __unsafe_private_named: self.__unsafe_private_named,
1556 _phantom: ::core::marker::PhantomData,
1557 }
1558 }
1559}
1560
1561impl<'a, S> ListViewBuilder<'a, S>
1562where
1563 S: list_view_state::State,
1564 S::Creator: list_view_state::IsUnset,
1565{
1566 pub fn creator(
1568 mut self,
1569 value: impl Into<crate::app_bsky::actor::ProfileView<'a>>,
1570 ) -> ListViewBuilder<'a, list_view_state::SetCreator<S>> {
1571 self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
1572 ListViewBuilder {
1573 _phantom_state: ::core::marker::PhantomData,
1574 __unsafe_private_named: self.__unsafe_private_named,
1575 _phantom: ::core::marker::PhantomData,
1576 }
1577 }
1578}
1579
1580impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1581 pub fn description(
1583 mut self,
1584 value: impl Into<Option<jacquard_common::CowStr<'a>>>,
1585 ) -> Self {
1586 self.__unsafe_private_named.3 = value.into();
1587 self
1588 }
1589 pub fn maybe_description(
1591 mut self,
1592 value: Option<jacquard_common::CowStr<'a>>,
1593 ) -> Self {
1594 self.__unsafe_private_named.3 = value;
1595 self
1596 }
1597}
1598
1599impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1600 pub fn description_facets(
1602 mut self,
1603 value: impl Into<Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>>,
1604 ) -> Self {
1605 self.__unsafe_private_named.4 = value.into();
1606 self
1607 }
1608 pub fn maybe_description_facets(
1610 mut self,
1611 value: Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
1612 ) -> Self {
1613 self.__unsafe_private_named.4 = value;
1614 self
1615 }
1616}
1617
1618impl<'a, S> ListViewBuilder<'a, S>
1619where
1620 S: list_view_state::State,
1621 S::IndexedAt: list_view_state::IsUnset,
1622{
1623 pub fn indexed_at(
1625 mut self,
1626 value: impl Into<jacquard_common::types::string::Datetime>,
1627 ) -> ListViewBuilder<'a, list_view_state::SetIndexedAt<S>> {
1628 self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
1629 ListViewBuilder {
1630 _phantom_state: ::core::marker::PhantomData,
1631 __unsafe_private_named: self.__unsafe_private_named,
1632 _phantom: ::core::marker::PhantomData,
1633 }
1634 }
1635}
1636
1637impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1638 pub fn labels(
1640 mut self,
1641 value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
1642 ) -> Self {
1643 self.__unsafe_private_named.6 = value.into();
1644 self
1645 }
1646 pub fn maybe_labels(
1648 mut self,
1649 value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
1650 ) -> Self {
1651 self.__unsafe_private_named.6 = value;
1652 self
1653 }
1654}
1655
1656impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1657 pub fn list_item_count(mut self, value: impl Into<Option<i64>>) -> Self {
1659 self.__unsafe_private_named.7 = value.into();
1660 self
1661 }
1662 pub fn maybe_list_item_count(mut self, value: Option<i64>) -> Self {
1664 self.__unsafe_private_named.7 = value;
1665 self
1666 }
1667}
1668
1669impl<'a, S> ListViewBuilder<'a, S>
1670where
1671 S: list_view_state::State,
1672 S::Name: list_view_state::IsUnset,
1673{
1674 pub fn name(
1676 mut self,
1677 value: impl Into<jacquard_common::CowStr<'a>>,
1678 ) -> ListViewBuilder<'a, list_view_state::SetName<S>> {
1679 self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into());
1680 ListViewBuilder {
1681 _phantom_state: ::core::marker::PhantomData,
1682 __unsafe_private_named: self.__unsafe_private_named,
1683 _phantom: ::core::marker::PhantomData,
1684 }
1685 }
1686}
1687
1688impl<'a, S> ListViewBuilder<'a, S>
1689where
1690 S: list_view_state::State,
1691 S::Purpose: list_view_state::IsUnset,
1692{
1693 pub fn purpose(
1695 mut self,
1696 value: impl Into<crate::app_bsky::graph::ListPurpose<'a>>,
1697 ) -> ListViewBuilder<'a, list_view_state::SetPurpose<S>> {
1698 self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
1699 ListViewBuilder {
1700 _phantom_state: ::core::marker::PhantomData,
1701 __unsafe_private_named: self.__unsafe_private_named,
1702 _phantom: ::core::marker::PhantomData,
1703 }
1704 }
1705}
1706
1707impl<'a, S> ListViewBuilder<'a, S>
1708where
1709 S: list_view_state::State,
1710 S::Uri: list_view_state::IsUnset,
1711{
1712 pub fn uri(
1714 mut self,
1715 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
1716 ) -> ListViewBuilder<'a, list_view_state::SetUri<S>> {
1717 self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into());
1718 ListViewBuilder {
1719 _phantom_state: ::core::marker::PhantomData,
1720 __unsafe_private_named: self.__unsafe_private_named,
1721 _phantom: ::core::marker::PhantomData,
1722 }
1723 }
1724}
1725
1726impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1727 pub fn viewer(
1729 mut self,
1730 value: impl Into<Option<crate::app_bsky::graph::ListViewerState<'a>>>,
1731 ) -> Self {
1732 self.__unsafe_private_named.11 = value.into();
1733 self
1734 }
1735 pub fn maybe_viewer(
1737 mut self,
1738 value: Option<crate::app_bsky::graph::ListViewerState<'a>>,
1739 ) -> Self {
1740 self.__unsafe_private_named.11 = value;
1741 self
1742 }
1743}
1744
1745impl<'a, S> ListViewBuilder<'a, S>
1746where
1747 S: list_view_state::State,
1748 S::Uri: list_view_state::IsSet,
1749 S::Cid: list_view_state::IsSet,
1750 S::Creator: list_view_state::IsSet,
1751 S::Purpose: list_view_state::IsSet,
1752 S::IndexedAt: list_view_state::IsSet,
1753 S::Name: list_view_state::IsSet,
1754{
1755 pub fn build(self) -> ListView<'a> {
1757 ListView {
1758 avatar: self.__unsafe_private_named.0,
1759 cid: self.__unsafe_private_named.1.unwrap(),
1760 creator: self.__unsafe_private_named.2.unwrap(),
1761 description: self.__unsafe_private_named.3,
1762 description_facets: self.__unsafe_private_named.4,
1763 indexed_at: self.__unsafe_private_named.5.unwrap(),
1764 labels: self.__unsafe_private_named.6,
1765 list_item_count: self.__unsafe_private_named.7,
1766 name: self.__unsafe_private_named.8.unwrap(),
1767 purpose: self.__unsafe_private_named.9.unwrap(),
1768 uri: self.__unsafe_private_named.10.unwrap(),
1769 viewer: self.__unsafe_private_named.11,
1770 extra_data: Default::default(),
1771 }
1772 }
1773 pub fn build_with_data(
1775 self,
1776 extra_data: std::collections::BTreeMap<
1777 jacquard_common::smol_str::SmolStr,
1778 jacquard_common::types::value::Data<'a>,
1779 >,
1780 ) -> ListView<'a> {
1781 ListView {
1782 avatar: self.__unsafe_private_named.0,
1783 cid: self.__unsafe_private_named.1.unwrap(),
1784 creator: self.__unsafe_private_named.2.unwrap(),
1785 description: self.__unsafe_private_named.3,
1786 description_facets: self.__unsafe_private_named.4,
1787 indexed_at: self.__unsafe_private_named.5.unwrap(),
1788 labels: self.__unsafe_private_named.6,
1789 list_item_count: self.__unsafe_private_named.7,
1790 name: self.__unsafe_private_named.8.unwrap(),
1791 purpose: self.__unsafe_private_named.9.unwrap(),
1792 uri: self.__unsafe_private_named.10.unwrap(),
1793 viewer: self.__unsafe_private_named.11,
1794 extra_data: Some(extra_data),
1795 }
1796 }
1797}
1798
1799impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListView<'a> {
1800 fn nsid() -> &'static str {
1801 "app.bsky.graph.defs"
1802 }
1803 fn def_name() -> &'static str {
1804 "listView"
1805 }
1806 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
1807 lexicon_doc_app_bsky_graph_defs()
1808 }
1809 fn validate(
1810 &self,
1811 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
1812 if let Some(ref value) = self.description {
1813 #[allow(unused_comparisons)]
1814 if <str>::len(value.as_ref()) > 3000usize {
1815 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
1816 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1817 "description",
1818 ),
1819 max: 3000usize,
1820 actual: <str>::len(value.as_ref()),
1821 });
1822 }
1823 }
1824 if let Some(ref value) = self.description {
1825 {
1826 let count = ::unicode_segmentation::UnicodeSegmentation::graphemes(
1827 value.as_ref(),
1828 true,
1829 )
1830 .count();
1831 if count > 300usize {
1832 return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
1833 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1834 "description",
1835 ),
1836 max: 300usize,
1837 actual: count,
1838 });
1839 }
1840 }
1841 }
1842 if let Some(ref value) = self.list_item_count {
1843 if *value < 0i64 {
1844 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
1845 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1846 "list_item_count",
1847 ),
1848 min: 0i64,
1849 actual: *value,
1850 });
1851 }
1852 }
1853 {
1854 let value = &self.name;
1855 #[allow(unused_comparisons)]
1856 if <str>::len(value.as_ref()) > 64usize {
1857 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
1858 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1859 "name",
1860 ),
1861 max: 64usize,
1862 actual: <str>::len(value.as_ref()),
1863 });
1864 }
1865 }
1866 {
1867 let value = &self.name;
1868 #[allow(unused_comparisons)]
1869 if <str>::len(value.as_ref()) < 1usize {
1870 return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
1871 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1872 "name",
1873 ),
1874 min: 1usize,
1875 actual: <str>::len(value.as_ref()),
1876 });
1877 }
1878 }
1879 Ok(())
1880 }
1881}
1882
1883#[jacquard_derive::lexicon]
1884#[derive(
1885 serde::Serialize,
1886 serde::Deserialize,
1887 Debug,
1888 Clone,
1889 PartialEq,
1890 Eq,
1891 jacquard_derive::IntoStatic
1892)]
1893#[serde(rename_all = "camelCase")]
1894pub struct ListViewBasic<'a> {
1895 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1896 #[serde(borrow)]
1897 pub avatar: std::option::Option<jacquard_common::types::string::Uri<'a>>,
1898 #[serde(borrow)]
1899 pub cid: jacquard_common::types::string::Cid<'a>,
1900 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1901 pub indexed_at: std::option::Option<jacquard_common::types::string::Datetime>,
1902 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1903 #[serde(borrow)]
1904 pub labels: std::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
1905 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1906 pub list_item_count: std::option::Option<i64>,
1907 #[serde(borrow)]
1908 pub name: jacquard_common::CowStr<'a>,
1909 #[serde(borrow)]
1910 pub purpose: crate::app_bsky::graph::ListPurpose<'a>,
1911 #[serde(borrow)]
1912 pub uri: jacquard_common::types::string::AtUri<'a>,
1913 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1914 #[serde(borrow)]
1915 pub viewer: std::option::Option<crate::app_bsky::graph::ListViewerState<'a>>,
1916}
1917
1918pub mod list_view_basic_state {
1919
1920 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1921 #[allow(unused)]
1922 use ::core::marker::PhantomData;
1923 mod sealed {
1924 pub trait Sealed {}
1925 }
1926 pub trait State: sealed::Sealed {
1928 type Name;
1929 type Purpose;
1930 type Cid;
1931 type Uri;
1932 }
1933 pub struct Empty(());
1935 impl sealed::Sealed for Empty {}
1936 impl State for Empty {
1937 type Name = Unset;
1938 type Purpose = Unset;
1939 type Cid = Unset;
1940 type Uri = Unset;
1941 }
1942 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
1944 impl<S: State> sealed::Sealed for SetName<S> {}
1945 impl<S: State> State for SetName<S> {
1946 type Name = Set<members::name>;
1947 type Purpose = S::Purpose;
1948 type Cid = S::Cid;
1949 type Uri = S::Uri;
1950 }
1951 pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
1953 impl<S: State> sealed::Sealed for SetPurpose<S> {}
1954 impl<S: State> State for SetPurpose<S> {
1955 type Name = S::Name;
1956 type Purpose = Set<members::purpose>;
1957 type Cid = S::Cid;
1958 type Uri = S::Uri;
1959 }
1960 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
1962 impl<S: State> sealed::Sealed for SetCid<S> {}
1963 impl<S: State> State for SetCid<S> {
1964 type Name = S::Name;
1965 type Purpose = S::Purpose;
1966 type Cid = Set<members::cid>;
1967 type Uri = S::Uri;
1968 }
1969 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
1971 impl<S: State> sealed::Sealed for SetUri<S> {}
1972 impl<S: State> State for SetUri<S> {
1973 type Name = S::Name;
1974 type Purpose = S::Purpose;
1975 type Cid = S::Cid;
1976 type Uri = Set<members::uri>;
1977 }
1978 #[allow(non_camel_case_types)]
1980 pub mod members {
1981 pub struct name(());
1983 pub struct purpose(());
1985 pub struct cid(());
1987 pub struct uri(());
1989 }
1990}
1991
1992pub struct ListViewBasicBuilder<'a, S: list_view_basic_state::State> {
1994 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
1995 __unsafe_private_named: (
1996 ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
1997 ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
1998 ::core::option::Option<jacquard_common::types::string::Datetime>,
1999 ::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
2000 ::core::option::Option<i64>,
2001 ::core::option::Option<jacquard_common::CowStr<'a>>,
2002 ::core::option::Option<crate::app_bsky::graph::ListPurpose<'a>>,
2003 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2004 ::core::option::Option<crate::app_bsky::graph::ListViewerState<'a>>,
2005 ),
2006 _phantom: ::core::marker::PhantomData<&'a ()>,
2007}
2008
2009impl<'a> ListViewBasic<'a> {
2010 pub fn new() -> ListViewBasicBuilder<'a, list_view_basic_state::Empty> {
2012 ListViewBasicBuilder::new()
2013 }
2014}
2015
2016impl<'a> ListViewBasicBuilder<'a, list_view_basic_state::Empty> {
2017 pub fn new() -> Self {
2019 ListViewBasicBuilder {
2020 _phantom_state: ::core::marker::PhantomData,
2021 __unsafe_private_named: (
2022 None,
2023 None,
2024 None,
2025 None,
2026 None,
2027 None,
2028 None,
2029 None,
2030 None,
2031 ),
2032 _phantom: ::core::marker::PhantomData,
2033 }
2034 }
2035}
2036
2037impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
2038 pub fn avatar(
2040 mut self,
2041 value: impl Into<Option<jacquard_common::types::string::Uri<'a>>>,
2042 ) -> Self {
2043 self.__unsafe_private_named.0 = value.into();
2044 self
2045 }
2046 pub fn maybe_avatar(
2048 mut self,
2049 value: Option<jacquard_common::types::string::Uri<'a>>,
2050 ) -> Self {
2051 self.__unsafe_private_named.0 = value;
2052 self
2053 }
2054}
2055
2056impl<'a, S> ListViewBasicBuilder<'a, S>
2057where
2058 S: list_view_basic_state::State,
2059 S::Cid: list_view_basic_state::IsUnset,
2060{
2061 pub fn cid(
2063 mut self,
2064 value: impl Into<jacquard_common::types::string::Cid<'a>>,
2065 ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetCid<S>> {
2066 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
2067 ListViewBasicBuilder {
2068 _phantom_state: ::core::marker::PhantomData,
2069 __unsafe_private_named: self.__unsafe_private_named,
2070 _phantom: ::core::marker::PhantomData,
2071 }
2072 }
2073}
2074
2075impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
2076 pub fn indexed_at(
2078 mut self,
2079 value: impl Into<Option<jacquard_common::types::string::Datetime>>,
2080 ) -> Self {
2081 self.__unsafe_private_named.2 = value.into();
2082 self
2083 }
2084 pub fn maybe_indexed_at(
2086 mut self,
2087 value: Option<jacquard_common::types::string::Datetime>,
2088 ) -> Self {
2089 self.__unsafe_private_named.2 = value;
2090 self
2091 }
2092}
2093
2094impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
2095 pub fn labels(
2097 mut self,
2098 value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
2099 ) -> Self {
2100 self.__unsafe_private_named.3 = value.into();
2101 self
2102 }
2103 pub fn maybe_labels(
2105 mut self,
2106 value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
2107 ) -> Self {
2108 self.__unsafe_private_named.3 = value;
2109 self
2110 }
2111}
2112
2113impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
2114 pub fn list_item_count(mut self, value: impl Into<Option<i64>>) -> Self {
2116 self.__unsafe_private_named.4 = value.into();
2117 self
2118 }
2119 pub fn maybe_list_item_count(mut self, value: Option<i64>) -> Self {
2121 self.__unsafe_private_named.4 = value;
2122 self
2123 }
2124}
2125
2126impl<'a, S> ListViewBasicBuilder<'a, S>
2127where
2128 S: list_view_basic_state::State,
2129 S::Name: list_view_basic_state::IsUnset,
2130{
2131 pub fn name(
2133 mut self,
2134 value: impl Into<jacquard_common::CowStr<'a>>,
2135 ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetName<S>> {
2136 self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
2137 ListViewBasicBuilder {
2138 _phantom_state: ::core::marker::PhantomData,
2139 __unsafe_private_named: self.__unsafe_private_named,
2140 _phantom: ::core::marker::PhantomData,
2141 }
2142 }
2143}
2144
2145impl<'a, S> ListViewBasicBuilder<'a, S>
2146where
2147 S: list_view_basic_state::State,
2148 S::Purpose: list_view_basic_state::IsUnset,
2149{
2150 pub fn purpose(
2152 mut self,
2153 value: impl Into<crate::app_bsky::graph::ListPurpose<'a>>,
2154 ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetPurpose<S>> {
2155 self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into());
2156 ListViewBasicBuilder {
2157 _phantom_state: ::core::marker::PhantomData,
2158 __unsafe_private_named: self.__unsafe_private_named,
2159 _phantom: ::core::marker::PhantomData,
2160 }
2161 }
2162}
2163
2164impl<'a, S> ListViewBasicBuilder<'a, S>
2165where
2166 S: list_view_basic_state::State,
2167 S::Uri: list_view_basic_state::IsUnset,
2168{
2169 pub fn uri(
2171 mut self,
2172 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
2173 ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetUri<S>> {
2174 self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into());
2175 ListViewBasicBuilder {
2176 _phantom_state: ::core::marker::PhantomData,
2177 __unsafe_private_named: self.__unsafe_private_named,
2178 _phantom: ::core::marker::PhantomData,
2179 }
2180 }
2181}
2182
2183impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
2184 pub fn viewer(
2186 mut self,
2187 value: impl Into<Option<crate::app_bsky::graph::ListViewerState<'a>>>,
2188 ) -> Self {
2189 self.__unsafe_private_named.8 = value.into();
2190 self
2191 }
2192 pub fn maybe_viewer(
2194 mut self,
2195 value: Option<crate::app_bsky::graph::ListViewerState<'a>>,
2196 ) -> Self {
2197 self.__unsafe_private_named.8 = value;
2198 self
2199 }
2200}
2201
2202impl<'a, S> ListViewBasicBuilder<'a, S>
2203where
2204 S: list_view_basic_state::State,
2205 S::Name: list_view_basic_state::IsSet,
2206 S::Purpose: list_view_basic_state::IsSet,
2207 S::Cid: list_view_basic_state::IsSet,
2208 S::Uri: list_view_basic_state::IsSet,
2209{
2210 pub fn build(self) -> ListViewBasic<'a> {
2212 ListViewBasic {
2213 avatar: self.__unsafe_private_named.0,
2214 cid: self.__unsafe_private_named.1.unwrap(),
2215 indexed_at: self.__unsafe_private_named.2,
2216 labels: self.__unsafe_private_named.3,
2217 list_item_count: self.__unsafe_private_named.4,
2218 name: self.__unsafe_private_named.5.unwrap(),
2219 purpose: self.__unsafe_private_named.6.unwrap(),
2220 uri: self.__unsafe_private_named.7.unwrap(),
2221 viewer: self.__unsafe_private_named.8,
2222 extra_data: Default::default(),
2223 }
2224 }
2225 pub fn build_with_data(
2227 self,
2228 extra_data: std::collections::BTreeMap<
2229 jacquard_common::smol_str::SmolStr,
2230 jacquard_common::types::value::Data<'a>,
2231 >,
2232 ) -> ListViewBasic<'a> {
2233 ListViewBasic {
2234 avatar: self.__unsafe_private_named.0,
2235 cid: self.__unsafe_private_named.1.unwrap(),
2236 indexed_at: self.__unsafe_private_named.2,
2237 labels: self.__unsafe_private_named.3,
2238 list_item_count: self.__unsafe_private_named.4,
2239 name: self.__unsafe_private_named.5.unwrap(),
2240 purpose: self.__unsafe_private_named.6.unwrap(),
2241 uri: self.__unsafe_private_named.7.unwrap(),
2242 viewer: self.__unsafe_private_named.8,
2243 extra_data: Some(extra_data),
2244 }
2245 }
2246}
2247
2248impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListViewBasic<'a> {
2249 fn nsid() -> &'static str {
2250 "app.bsky.graph.defs"
2251 }
2252 fn def_name() -> &'static str {
2253 "listViewBasic"
2254 }
2255 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
2256 lexicon_doc_app_bsky_graph_defs()
2257 }
2258 fn validate(
2259 &self,
2260 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
2261 if let Some(ref value) = self.list_item_count {
2262 if *value < 0i64 {
2263 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
2264 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
2265 "list_item_count",
2266 ),
2267 min: 0i64,
2268 actual: *value,
2269 });
2270 }
2271 }
2272 {
2273 let value = &self.name;
2274 #[allow(unused_comparisons)]
2275 if <str>::len(value.as_ref()) > 64usize {
2276 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
2277 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
2278 "name",
2279 ),
2280 max: 64usize,
2281 actual: <str>::len(value.as_ref()),
2282 });
2283 }
2284 }
2285 {
2286 let value = &self.name;
2287 #[allow(unused_comparisons)]
2288 if <str>::len(value.as_ref()) < 1usize {
2289 return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
2290 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
2291 "name",
2292 ),
2293 min: 1usize,
2294 actual: <str>::len(value.as_ref()),
2295 });
2296 }
2297 }
2298 Ok(())
2299 }
2300}
2301
2302#[jacquard_derive::lexicon]
2303#[derive(
2304 serde::Serialize,
2305 serde::Deserialize,
2306 Debug,
2307 Clone,
2308 PartialEq,
2309 Eq,
2310 jacquard_derive::IntoStatic,
2311 Default
2312)]
2313#[serde(rename_all = "camelCase")]
2314pub struct ListViewerState<'a> {
2315 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2316 #[serde(borrow)]
2317 pub blocked: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2318 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2319 pub muted: std::option::Option<bool>,
2320}
2321
2322impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListViewerState<'a> {
2323 fn nsid() -> &'static str {
2324 "app.bsky.graph.defs"
2325 }
2326 fn def_name() -> &'static str {
2327 "listViewerState"
2328 }
2329 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
2330 lexicon_doc_app_bsky_graph_defs()
2331 }
2332 fn validate(
2333 &self,
2334 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
2335 Ok(())
2336 }
2337}
2338
2339#[derive(
2341 serde::Serialize,
2342 serde::Deserialize,
2343 Debug,
2344 Clone,
2345 PartialEq,
2346 Eq,
2347 Hash,
2348 jacquard_derive::IntoStatic
2349)]
2350pub struct Modlist;
2351impl std::fmt::Display for Modlist {
2352 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2353 write!(f, "modlist")
2354 }
2355}
2356
2357#[jacquard_derive::lexicon]
2359#[derive(
2360 serde::Serialize,
2361 serde::Deserialize,
2362 Debug,
2363 Clone,
2364 PartialEq,
2365 Eq,
2366 jacquard_derive::IntoStatic
2367)]
2368#[serde(rename_all = "camelCase")]
2369pub struct NotFoundActor<'a> {
2370 #[serde(borrow)]
2371 pub actor: jacquard_common::types::ident::AtIdentifier<'a>,
2372 pub not_found: bool,
2373}
2374
2375pub mod not_found_actor_state {
2376
2377 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2378 #[allow(unused)]
2379 use ::core::marker::PhantomData;
2380 mod sealed {
2381 pub trait Sealed {}
2382 }
2383 pub trait State: sealed::Sealed {
2385 type NotFound;
2386 type Actor;
2387 }
2388 pub struct Empty(());
2390 impl sealed::Sealed for Empty {}
2391 impl State for Empty {
2392 type NotFound = Unset;
2393 type Actor = Unset;
2394 }
2395 pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
2397 impl<S: State> sealed::Sealed for SetNotFound<S> {}
2398 impl<S: State> State for SetNotFound<S> {
2399 type NotFound = Set<members::not_found>;
2400 type Actor = S::Actor;
2401 }
2402 pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
2404 impl<S: State> sealed::Sealed for SetActor<S> {}
2405 impl<S: State> State for SetActor<S> {
2406 type NotFound = S::NotFound;
2407 type Actor = Set<members::actor>;
2408 }
2409 #[allow(non_camel_case_types)]
2411 pub mod members {
2412 pub struct not_found(());
2414 pub struct actor(());
2416 }
2417}
2418
2419pub struct NotFoundActorBuilder<'a, S: not_found_actor_state::State> {
2421 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
2422 __unsafe_private_named: (
2423 ::core::option::Option<jacquard_common::types::ident::AtIdentifier<'a>>,
2424 ::core::option::Option<bool>,
2425 ),
2426 _phantom: ::core::marker::PhantomData<&'a ()>,
2427}
2428
2429impl<'a> NotFoundActor<'a> {
2430 pub fn new() -> NotFoundActorBuilder<'a, not_found_actor_state::Empty> {
2432 NotFoundActorBuilder::new()
2433 }
2434}
2435
2436impl<'a> NotFoundActorBuilder<'a, not_found_actor_state::Empty> {
2437 pub fn new() -> Self {
2439 NotFoundActorBuilder {
2440 _phantom_state: ::core::marker::PhantomData,
2441 __unsafe_private_named: (None, None),
2442 _phantom: ::core::marker::PhantomData,
2443 }
2444 }
2445}
2446
2447impl<'a, S> NotFoundActorBuilder<'a, S>
2448where
2449 S: not_found_actor_state::State,
2450 S::Actor: not_found_actor_state::IsUnset,
2451{
2452 pub fn actor(
2454 mut self,
2455 value: impl Into<jacquard_common::types::ident::AtIdentifier<'a>>,
2456 ) -> NotFoundActorBuilder<'a, not_found_actor_state::SetActor<S>> {
2457 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
2458 NotFoundActorBuilder {
2459 _phantom_state: ::core::marker::PhantomData,
2460 __unsafe_private_named: self.__unsafe_private_named,
2461 _phantom: ::core::marker::PhantomData,
2462 }
2463 }
2464}
2465
2466impl<'a, S> NotFoundActorBuilder<'a, S>
2467where
2468 S: not_found_actor_state::State,
2469 S::NotFound: not_found_actor_state::IsUnset,
2470{
2471 pub fn not_found(
2473 mut self,
2474 value: impl Into<bool>,
2475 ) -> NotFoundActorBuilder<'a, not_found_actor_state::SetNotFound<S>> {
2476 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
2477 NotFoundActorBuilder {
2478 _phantom_state: ::core::marker::PhantomData,
2479 __unsafe_private_named: self.__unsafe_private_named,
2480 _phantom: ::core::marker::PhantomData,
2481 }
2482 }
2483}
2484
2485impl<'a, S> NotFoundActorBuilder<'a, S>
2486where
2487 S: not_found_actor_state::State,
2488 S::NotFound: not_found_actor_state::IsSet,
2489 S::Actor: not_found_actor_state::IsSet,
2490{
2491 pub fn build(self) -> NotFoundActor<'a> {
2493 NotFoundActor {
2494 actor: self.__unsafe_private_named.0.unwrap(),
2495 not_found: self.__unsafe_private_named.1.unwrap(),
2496 extra_data: Default::default(),
2497 }
2498 }
2499 pub fn build_with_data(
2501 self,
2502 extra_data: std::collections::BTreeMap<
2503 jacquard_common::smol_str::SmolStr,
2504 jacquard_common::types::value::Data<'a>,
2505 >,
2506 ) -> NotFoundActor<'a> {
2507 NotFoundActor {
2508 actor: self.__unsafe_private_named.0.unwrap(),
2509 not_found: self.__unsafe_private_named.1.unwrap(),
2510 extra_data: Some(extra_data),
2511 }
2512 }
2513}
2514
2515impl<'a> ::jacquard_lexicon::schema::LexiconSchema for NotFoundActor<'a> {
2516 fn nsid() -> &'static str {
2517 "app.bsky.graph.defs"
2518 }
2519 fn def_name() -> &'static str {
2520 "notFoundActor"
2521 }
2522 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
2523 lexicon_doc_app_bsky_graph_defs()
2524 }
2525 fn validate(
2526 &self,
2527 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
2528 Ok(())
2529 }
2530}
2531
2532#[derive(
2534 serde::Serialize,
2535 serde::Deserialize,
2536 Debug,
2537 Clone,
2538 PartialEq,
2539 Eq,
2540 Hash,
2541 jacquard_derive::IntoStatic
2542)]
2543pub struct Referencelist;
2544impl std::fmt::Display for Referencelist {
2545 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2546 write!(f, "referencelist")
2547 }
2548}
2549
2550#[jacquard_derive::lexicon]
2552#[derive(
2553 serde::Serialize,
2554 serde::Deserialize,
2555 Debug,
2556 Clone,
2557 PartialEq,
2558 Eq,
2559 jacquard_derive::IntoStatic
2560)]
2561#[serde(rename_all = "camelCase")]
2562pub struct Relationship<'a> {
2563 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2565 #[serde(borrow)]
2566 pub blocked_by: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2567 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2569 #[serde(borrow)]
2570 pub blocked_by_list: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2571 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2573 #[serde(borrow)]
2574 pub blocking: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2575 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2577 #[serde(borrow)]
2578 pub blocking_by_list: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2579 #[serde(borrow)]
2580 pub did: jacquard_common::types::string::Did<'a>,
2581 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2583 #[serde(borrow)]
2584 pub followed_by: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2585 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2587 #[serde(borrow)]
2588 pub following: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2589}
2590
2591pub mod relationship_state {
2592
2593 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2594 #[allow(unused)]
2595 use ::core::marker::PhantomData;
2596 mod sealed {
2597 pub trait Sealed {}
2598 }
2599 pub trait State: sealed::Sealed {
2601 type Did;
2602 }
2603 pub struct Empty(());
2605 impl sealed::Sealed for Empty {}
2606 impl State for Empty {
2607 type Did = Unset;
2608 }
2609 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
2611 impl<S: State> sealed::Sealed for SetDid<S> {}
2612 impl<S: State> State for SetDid<S> {
2613 type Did = Set<members::did>;
2614 }
2615 #[allow(non_camel_case_types)]
2617 pub mod members {
2618 pub struct did(());
2620 }
2621}
2622
2623pub struct RelationshipBuilder<'a, S: relationship_state::State> {
2625 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
2626 __unsafe_private_named: (
2627 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2628 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2629 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2630 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2631 ::core::option::Option<jacquard_common::types::string::Did<'a>>,
2632 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2633 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2634 ),
2635 _phantom: ::core::marker::PhantomData<&'a ()>,
2636}
2637
2638impl<'a> Relationship<'a> {
2639 pub fn new() -> RelationshipBuilder<'a, relationship_state::Empty> {
2641 RelationshipBuilder::new()
2642 }
2643}
2644
2645impl<'a> RelationshipBuilder<'a, relationship_state::Empty> {
2646 pub fn new() -> Self {
2648 RelationshipBuilder {
2649 _phantom_state: ::core::marker::PhantomData,
2650 __unsafe_private_named: (None, None, None, None, None, None, None),
2651 _phantom: ::core::marker::PhantomData,
2652 }
2653 }
2654}
2655
2656impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> {
2657 pub fn blocked_by(
2659 mut self,
2660 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
2661 ) -> Self {
2662 self.__unsafe_private_named.0 = value.into();
2663 self
2664 }
2665 pub fn maybe_blocked_by(
2667 mut self,
2668 value: Option<jacquard_common::types::string::AtUri<'a>>,
2669 ) -> Self {
2670 self.__unsafe_private_named.0 = value;
2671 self
2672 }
2673}
2674
2675impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> {
2676 pub fn blocked_by_list(
2678 mut self,
2679 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
2680 ) -> Self {
2681 self.__unsafe_private_named.1 = value.into();
2682 self
2683 }
2684 pub fn maybe_blocked_by_list(
2686 mut self,
2687 value: Option<jacquard_common::types::string::AtUri<'a>>,
2688 ) -> Self {
2689 self.__unsafe_private_named.1 = value;
2690 self
2691 }
2692}
2693
2694impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> {
2695 pub fn blocking(
2697 mut self,
2698 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
2699 ) -> Self {
2700 self.__unsafe_private_named.2 = value.into();
2701 self
2702 }
2703 pub fn maybe_blocking(
2705 mut self,
2706 value: Option<jacquard_common::types::string::AtUri<'a>>,
2707 ) -> Self {
2708 self.__unsafe_private_named.2 = value;
2709 self
2710 }
2711}
2712
2713impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> {
2714 pub fn blocking_by_list(
2716 mut self,
2717 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
2718 ) -> Self {
2719 self.__unsafe_private_named.3 = value.into();
2720 self
2721 }
2722 pub fn maybe_blocking_by_list(
2724 mut self,
2725 value: Option<jacquard_common::types::string::AtUri<'a>>,
2726 ) -> Self {
2727 self.__unsafe_private_named.3 = value;
2728 self
2729 }
2730}
2731
2732impl<'a, S> RelationshipBuilder<'a, S>
2733where
2734 S: relationship_state::State,
2735 S::Did: relationship_state::IsUnset,
2736{
2737 pub fn did(
2739 mut self,
2740 value: impl Into<jacquard_common::types::string::Did<'a>>,
2741 ) -> RelationshipBuilder<'a, relationship_state::SetDid<S>> {
2742 self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
2743 RelationshipBuilder {
2744 _phantom_state: ::core::marker::PhantomData,
2745 __unsafe_private_named: self.__unsafe_private_named,
2746 _phantom: ::core::marker::PhantomData,
2747 }
2748 }
2749}
2750
2751impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> {
2752 pub fn followed_by(
2754 mut self,
2755 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
2756 ) -> Self {
2757 self.__unsafe_private_named.5 = value.into();
2758 self
2759 }
2760 pub fn maybe_followed_by(
2762 mut self,
2763 value: Option<jacquard_common::types::string::AtUri<'a>>,
2764 ) -> Self {
2765 self.__unsafe_private_named.5 = value;
2766 self
2767 }
2768}
2769
2770impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> {
2771 pub fn following(
2773 mut self,
2774 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
2775 ) -> Self {
2776 self.__unsafe_private_named.6 = value.into();
2777 self
2778 }
2779 pub fn maybe_following(
2781 mut self,
2782 value: Option<jacquard_common::types::string::AtUri<'a>>,
2783 ) -> Self {
2784 self.__unsafe_private_named.6 = value;
2785 self
2786 }
2787}
2788
2789impl<'a, S> RelationshipBuilder<'a, S>
2790where
2791 S: relationship_state::State,
2792 S::Did: relationship_state::IsSet,
2793{
2794 pub fn build(self) -> Relationship<'a> {
2796 Relationship {
2797 blocked_by: self.__unsafe_private_named.0,
2798 blocked_by_list: self.__unsafe_private_named.1,
2799 blocking: self.__unsafe_private_named.2,
2800 blocking_by_list: self.__unsafe_private_named.3,
2801 did: self.__unsafe_private_named.4.unwrap(),
2802 followed_by: self.__unsafe_private_named.5,
2803 following: self.__unsafe_private_named.6,
2804 extra_data: Default::default(),
2805 }
2806 }
2807 pub fn build_with_data(
2809 self,
2810 extra_data: std::collections::BTreeMap<
2811 jacquard_common::smol_str::SmolStr,
2812 jacquard_common::types::value::Data<'a>,
2813 >,
2814 ) -> Relationship<'a> {
2815 Relationship {
2816 blocked_by: self.__unsafe_private_named.0,
2817 blocked_by_list: self.__unsafe_private_named.1,
2818 blocking: self.__unsafe_private_named.2,
2819 blocking_by_list: self.__unsafe_private_named.3,
2820 did: self.__unsafe_private_named.4.unwrap(),
2821 followed_by: self.__unsafe_private_named.5,
2822 following: self.__unsafe_private_named.6,
2823 extra_data: Some(extra_data),
2824 }
2825 }
2826}
2827
2828impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Relationship<'a> {
2829 fn nsid() -> &'static str {
2830 "app.bsky.graph.defs"
2831 }
2832 fn def_name() -> &'static str {
2833 "relationship"
2834 }
2835 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
2836 lexicon_doc_app_bsky_graph_defs()
2837 }
2838 fn validate(
2839 &self,
2840 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
2841 Ok(())
2842 }
2843}
2844
2845#[jacquard_derive::lexicon]
2846#[derive(
2847 serde::Serialize,
2848 serde::Deserialize,
2849 Debug,
2850 Clone,
2851 PartialEq,
2852 Eq,
2853 jacquard_derive::IntoStatic
2854)]
2855#[serde(rename_all = "camelCase")]
2856pub struct StarterPackView<'a> {
2857 #[serde(borrow)]
2858 pub cid: jacquard_common::types::string::Cid<'a>,
2859 #[serde(borrow)]
2860 pub creator: crate::app_bsky::actor::ProfileViewBasic<'a>,
2861 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2862 #[serde(borrow)]
2863 pub feeds: std::option::Option<Vec<crate::app_bsky::feed::GeneratorView<'a>>>,
2864 pub indexed_at: jacquard_common::types::string::Datetime,
2865 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2866 pub joined_all_time_count: std::option::Option<i64>,
2867 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2868 pub joined_week_count: std::option::Option<i64>,
2869 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2870 #[serde(borrow)]
2871 pub labels: std::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
2872 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2873 #[serde(borrow)]
2874 pub list: std::option::Option<crate::app_bsky::graph::ListViewBasic<'a>>,
2875 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2876 #[serde(borrow)]
2877 pub list_items_sample: std::option::Option<
2878 Vec<crate::app_bsky::graph::ListItemView<'a>>,
2879 >,
2880 #[serde(borrow)]
2881 pub record: jacquard_common::types::value::Data<'a>,
2882 #[serde(borrow)]
2883 pub uri: jacquard_common::types::string::AtUri<'a>,
2884}
2885
2886pub mod starter_pack_view_state {
2887
2888 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2889 #[allow(unused)]
2890 use ::core::marker::PhantomData;
2891 mod sealed {
2892 pub trait Sealed {}
2893 }
2894 pub trait State: sealed::Sealed {
2896 type Cid;
2897 type Record;
2898 type IndexedAt;
2899 type Creator;
2900 type Uri;
2901 }
2902 pub struct Empty(());
2904 impl sealed::Sealed for Empty {}
2905 impl State for Empty {
2906 type Cid = Unset;
2907 type Record = Unset;
2908 type IndexedAt = Unset;
2909 type Creator = Unset;
2910 type Uri = Unset;
2911 }
2912 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
2914 impl<S: State> sealed::Sealed for SetCid<S> {}
2915 impl<S: State> State for SetCid<S> {
2916 type Cid = Set<members::cid>;
2917 type Record = S::Record;
2918 type IndexedAt = S::IndexedAt;
2919 type Creator = S::Creator;
2920 type Uri = S::Uri;
2921 }
2922 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
2924 impl<S: State> sealed::Sealed for SetRecord<S> {}
2925 impl<S: State> State for SetRecord<S> {
2926 type Cid = S::Cid;
2927 type Record = Set<members::record>;
2928 type IndexedAt = S::IndexedAt;
2929 type Creator = S::Creator;
2930 type Uri = S::Uri;
2931 }
2932 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
2934 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
2935 impl<S: State> State for SetIndexedAt<S> {
2936 type Cid = S::Cid;
2937 type Record = S::Record;
2938 type IndexedAt = Set<members::indexed_at>;
2939 type Creator = S::Creator;
2940 type Uri = S::Uri;
2941 }
2942 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
2944 impl<S: State> sealed::Sealed for SetCreator<S> {}
2945 impl<S: State> State for SetCreator<S> {
2946 type Cid = S::Cid;
2947 type Record = S::Record;
2948 type IndexedAt = S::IndexedAt;
2949 type Creator = Set<members::creator>;
2950 type Uri = S::Uri;
2951 }
2952 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
2954 impl<S: State> sealed::Sealed for SetUri<S> {}
2955 impl<S: State> State for SetUri<S> {
2956 type Cid = S::Cid;
2957 type Record = S::Record;
2958 type IndexedAt = S::IndexedAt;
2959 type Creator = S::Creator;
2960 type Uri = Set<members::uri>;
2961 }
2962 #[allow(non_camel_case_types)]
2964 pub mod members {
2965 pub struct cid(());
2967 pub struct record(());
2969 pub struct indexed_at(());
2971 pub struct creator(());
2973 pub struct uri(());
2975 }
2976}
2977
2978pub struct StarterPackViewBuilder<'a, S: starter_pack_view_state::State> {
2980 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
2981 __unsafe_private_named: (
2982 ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
2983 ::core::option::Option<crate::app_bsky::actor::ProfileViewBasic<'a>>,
2984 ::core::option::Option<Vec<crate::app_bsky::feed::GeneratorView<'a>>>,
2985 ::core::option::Option<jacquard_common::types::string::Datetime>,
2986 ::core::option::Option<i64>,
2987 ::core::option::Option<i64>,
2988 ::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
2989 ::core::option::Option<crate::app_bsky::graph::ListViewBasic<'a>>,
2990 ::core::option::Option<Vec<crate::app_bsky::graph::ListItemView<'a>>>,
2991 ::core::option::Option<jacquard_common::types::value::Data<'a>>,
2992 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2993 ),
2994 _phantom: ::core::marker::PhantomData<&'a ()>,
2995}
2996
2997impl<'a> StarterPackView<'a> {
2998 pub fn new() -> StarterPackViewBuilder<'a, starter_pack_view_state::Empty> {
3000 StarterPackViewBuilder::new()
3001 }
3002}
3003
3004impl<'a> StarterPackViewBuilder<'a, starter_pack_view_state::Empty> {
3005 pub fn new() -> Self {
3007 StarterPackViewBuilder {
3008 _phantom_state: ::core::marker::PhantomData,
3009 __unsafe_private_named: (
3010 None,
3011 None,
3012 None,
3013 None,
3014 None,
3015 None,
3016 None,
3017 None,
3018 None,
3019 None,
3020 None,
3021 ),
3022 _phantom: ::core::marker::PhantomData,
3023 }
3024 }
3025}
3026
3027impl<'a, S> StarterPackViewBuilder<'a, S>
3028where
3029 S: starter_pack_view_state::State,
3030 S::Cid: starter_pack_view_state::IsUnset,
3031{
3032 pub fn cid(
3034 mut self,
3035 value: impl Into<jacquard_common::types::string::Cid<'a>>,
3036 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetCid<S>> {
3037 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
3038 StarterPackViewBuilder {
3039 _phantom_state: ::core::marker::PhantomData,
3040 __unsafe_private_named: self.__unsafe_private_named,
3041 _phantom: ::core::marker::PhantomData,
3042 }
3043 }
3044}
3045
3046impl<'a, S> StarterPackViewBuilder<'a, S>
3047where
3048 S: starter_pack_view_state::State,
3049 S::Creator: starter_pack_view_state::IsUnset,
3050{
3051 pub fn creator(
3053 mut self,
3054 value: impl Into<crate::app_bsky::actor::ProfileViewBasic<'a>>,
3055 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetCreator<S>> {
3056 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
3057 StarterPackViewBuilder {
3058 _phantom_state: ::core::marker::PhantomData,
3059 __unsafe_private_named: self.__unsafe_private_named,
3060 _phantom: ::core::marker::PhantomData,
3061 }
3062 }
3063}
3064
3065impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
3066 pub fn feeds(
3068 mut self,
3069 value: impl Into<Option<Vec<crate::app_bsky::feed::GeneratorView<'a>>>>,
3070 ) -> Self {
3071 self.__unsafe_private_named.2 = value.into();
3072 self
3073 }
3074 pub fn maybe_feeds(
3076 mut self,
3077 value: Option<Vec<crate::app_bsky::feed::GeneratorView<'a>>>,
3078 ) -> Self {
3079 self.__unsafe_private_named.2 = value;
3080 self
3081 }
3082}
3083
3084impl<'a, S> StarterPackViewBuilder<'a, S>
3085where
3086 S: starter_pack_view_state::State,
3087 S::IndexedAt: starter_pack_view_state::IsUnset,
3088{
3089 pub fn indexed_at(
3091 mut self,
3092 value: impl Into<jacquard_common::types::string::Datetime>,
3093 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetIndexedAt<S>> {
3094 self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
3095 StarterPackViewBuilder {
3096 _phantom_state: ::core::marker::PhantomData,
3097 __unsafe_private_named: self.__unsafe_private_named,
3098 _phantom: ::core::marker::PhantomData,
3099 }
3100 }
3101}
3102
3103impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
3104 pub fn joined_all_time_count(mut self, value: impl Into<Option<i64>>) -> Self {
3106 self.__unsafe_private_named.4 = value.into();
3107 self
3108 }
3109 pub fn maybe_joined_all_time_count(mut self, value: Option<i64>) -> Self {
3111 self.__unsafe_private_named.4 = value;
3112 self
3113 }
3114}
3115
3116impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
3117 pub fn joined_week_count(mut self, value: impl Into<Option<i64>>) -> Self {
3119 self.__unsafe_private_named.5 = value.into();
3120 self
3121 }
3122 pub fn maybe_joined_week_count(mut self, value: Option<i64>) -> Self {
3124 self.__unsafe_private_named.5 = value;
3125 self
3126 }
3127}
3128
3129impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
3130 pub fn labels(
3132 mut self,
3133 value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
3134 ) -> Self {
3135 self.__unsafe_private_named.6 = value.into();
3136 self
3137 }
3138 pub fn maybe_labels(
3140 mut self,
3141 value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
3142 ) -> Self {
3143 self.__unsafe_private_named.6 = value;
3144 self
3145 }
3146}
3147
3148impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
3149 pub fn list(
3151 mut self,
3152 value: impl Into<Option<crate::app_bsky::graph::ListViewBasic<'a>>>,
3153 ) -> Self {
3154 self.__unsafe_private_named.7 = value.into();
3155 self
3156 }
3157 pub fn maybe_list(
3159 mut self,
3160 value: Option<crate::app_bsky::graph::ListViewBasic<'a>>,
3161 ) -> Self {
3162 self.__unsafe_private_named.7 = value;
3163 self
3164 }
3165}
3166
3167impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
3168 pub fn list_items_sample(
3170 mut self,
3171 value: impl Into<Option<Vec<crate::app_bsky::graph::ListItemView<'a>>>>,
3172 ) -> Self {
3173 self.__unsafe_private_named.8 = value.into();
3174 self
3175 }
3176 pub fn maybe_list_items_sample(
3178 mut self,
3179 value: Option<Vec<crate::app_bsky::graph::ListItemView<'a>>>,
3180 ) -> Self {
3181 self.__unsafe_private_named.8 = value;
3182 self
3183 }
3184}
3185
3186impl<'a, S> StarterPackViewBuilder<'a, S>
3187where
3188 S: starter_pack_view_state::State,
3189 S::Record: starter_pack_view_state::IsUnset,
3190{
3191 pub fn record(
3193 mut self,
3194 value: impl Into<jacquard_common::types::value::Data<'a>>,
3195 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetRecord<S>> {
3196 self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
3197 StarterPackViewBuilder {
3198 _phantom_state: ::core::marker::PhantomData,
3199 __unsafe_private_named: self.__unsafe_private_named,
3200 _phantom: ::core::marker::PhantomData,
3201 }
3202 }
3203}
3204
3205impl<'a, S> StarterPackViewBuilder<'a, S>
3206where
3207 S: starter_pack_view_state::State,
3208 S::Uri: starter_pack_view_state::IsUnset,
3209{
3210 pub fn uri(
3212 mut self,
3213 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
3214 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetUri<S>> {
3215 self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into());
3216 StarterPackViewBuilder {
3217 _phantom_state: ::core::marker::PhantomData,
3218 __unsafe_private_named: self.__unsafe_private_named,
3219 _phantom: ::core::marker::PhantomData,
3220 }
3221 }
3222}
3223
3224impl<'a, S> StarterPackViewBuilder<'a, S>
3225where
3226 S: starter_pack_view_state::State,
3227 S::Cid: starter_pack_view_state::IsSet,
3228 S::Record: starter_pack_view_state::IsSet,
3229 S::IndexedAt: starter_pack_view_state::IsSet,
3230 S::Creator: starter_pack_view_state::IsSet,
3231 S::Uri: starter_pack_view_state::IsSet,
3232{
3233 pub fn build(self) -> StarterPackView<'a> {
3235 StarterPackView {
3236 cid: self.__unsafe_private_named.0.unwrap(),
3237 creator: self.__unsafe_private_named.1.unwrap(),
3238 feeds: self.__unsafe_private_named.2,
3239 indexed_at: self.__unsafe_private_named.3.unwrap(),
3240 joined_all_time_count: self.__unsafe_private_named.4,
3241 joined_week_count: self.__unsafe_private_named.5,
3242 labels: self.__unsafe_private_named.6,
3243 list: self.__unsafe_private_named.7,
3244 list_items_sample: self.__unsafe_private_named.8,
3245 record: self.__unsafe_private_named.9.unwrap(),
3246 uri: self.__unsafe_private_named.10.unwrap(),
3247 extra_data: Default::default(),
3248 }
3249 }
3250 pub fn build_with_data(
3252 self,
3253 extra_data: std::collections::BTreeMap<
3254 jacquard_common::smol_str::SmolStr,
3255 jacquard_common::types::value::Data<'a>,
3256 >,
3257 ) -> StarterPackView<'a> {
3258 StarterPackView {
3259 cid: self.__unsafe_private_named.0.unwrap(),
3260 creator: self.__unsafe_private_named.1.unwrap(),
3261 feeds: self.__unsafe_private_named.2,
3262 indexed_at: self.__unsafe_private_named.3.unwrap(),
3263 joined_all_time_count: self.__unsafe_private_named.4,
3264 joined_week_count: self.__unsafe_private_named.5,
3265 labels: self.__unsafe_private_named.6,
3266 list: self.__unsafe_private_named.7,
3267 list_items_sample: self.__unsafe_private_named.8,
3268 record: self.__unsafe_private_named.9.unwrap(),
3269 uri: self.__unsafe_private_named.10.unwrap(),
3270 extra_data: Some(extra_data),
3271 }
3272 }
3273}
3274
3275impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StarterPackView<'a> {
3276 fn nsid() -> &'static str {
3277 "app.bsky.graph.defs"
3278 }
3279 fn def_name() -> &'static str {
3280 "starterPackView"
3281 }
3282 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
3283 lexicon_doc_app_bsky_graph_defs()
3284 }
3285 fn validate(
3286 &self,
3287 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
3288 if let Some(ref value) = self.feeds {
3289 #[allow(unused_comparisons)]
3290 if value.len() > 3usize {
3291 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
3292 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3293 "feeds",
3294 ),
3295 max: 3usize,
3296 actual: value.len(),
3297 });
3298 }
3299 }
3300 if let Some(ref value) = self.joined_all_time_count {
3301 if *value < 0i64 {
3302 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3303 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3304 "joined_all_time_count",
3305 ),
3306 min: 0i64,
3307 actual: *value,
3308 });
3309 }
3310 }
3311 if let Some(ref value) = self.joined_week_count {
3312 if *value < 0i64 {
3313 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3314 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3315 "joined_week_count",
3316 ),
3317 min: 0i64,
3318 actual: *value,
3319 });
3320 }
3321 }
3322 if let Some(ref value) = self.list_items_sample {
3323 #[allow(unused_comparisons)]
3324 if value.len() > 12usize {
3325 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
3326 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3327 "list_items_sample",
3328 ),
3329 max: 12usize,
3330 actual: value.len(),
3331 });
3332 }
3333 }
3334 Ok(())
3335 }
3336}
3337
3338#[jacquard_derive::lexicon]
3339#[derive(
3340 serde::Serialize,
3341 serde::Deserialize,
3342 Debug,
3343 Clone,
3344 PartialEq,
3345 Eq,
3346 jacquard_derive::IntoStatic
3347)]
3348#[serde(rename_all = "camelCase")]
3349pub struct StarterPackViewBasic<'a> {
3350 #[serde(borrow)]
3351 pub cid: jacquard_common::types::string::Cid<'a>,
3352 #[serde(borrow)]
3353 pub creator: crate::app_bsky::actor::ProfileViewBasic<'a>,
3354 pub indexed_at: jacquard_common::types::string::Datetime,
3355 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3356 pub joined_all_time_count: std::option::Option<i64>,
3357 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3358 pub joined_week_count: std::option::Option<i64>,
3359 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3360 #[serde(borrow)]
3361 pub labels: std::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
3362 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3363 pub list_item_count: std::option::Option<i64>,
3364 #[serde(borrow)]
3365 pub record: jacquard_common::types::value::Data<'a>,
3366 #[serde(borrow)]
3367 pub uri: jacquard_common::types::string::AtUri<'a>,
3368}
3369
3370pub mod starter_pack_view_basic_state {
3371
3372 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
3373 #[allow(unused)]
3374 use ::core::marker::PhantomData;
3375 mod sealed {
3376 pub trait Sealed {}
3377 }
3378 pub trait State: sealed::Sealed {
3380 type Cid;
3381 type Record;
3382 type Creator;
3383 type Uri;
3384 type IndexedAt;
3385 }
3386 pub struct Empty(());
3388 impl sealed::Sealed for Empty {}
3389 impl State for Empty {
3390 type Cid = Unset;
3391 type Record = Unset;
3392 type Creator = Unset;
3393 type Uri = Unset;
3394 type IndexedAt = Unset;
3395 }
3396 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
3398 impl<S: State> sealed::Sealed for SetCid<S> {}
3399 impl<S: State> State for SetCid<S> {
3400 type Cid = Set<members::cid>;
3401 type Record = S::Record;
3402 type Creator = S::Creator;
3403 type Uri = S::Uri;
3404 type IndexedAt = S::IndexedAt;
3405 }
3406 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
3408 impl<S: State> sealed::Sealed for SetRecord<S> {}
3409 impl<S: State> State for SetRecord<S> {
3410 type Cid = S::Cid;
3411 type Record = Set<members::record>;
3412 type Creator = S::Creator;
3413 type Uri = S::Uri;
3414 type IndexedAt = S::IndexedAt;
3415 }
3416 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
3418 impl<S: State> sealed::Sealed for SetCreator<S> {}
3419 impl<S: State> State for SetCreator<S> {
3420 type Cid = S::Cid;
3421 type Record = S::Record;
3422 type Creator = Set<members::creator>;
3423 type Uri = S::Uri;
3424 type IndexedAt = S::IndexedAt;
3425 }
3426 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
3428 impl<S: State> sealed::Sealed for SetUri<S> {}
3429 impl<S: State> State for SetUri<S> {
3430 type Cid = S::Cid;
3431 type Record = S::Record;
3432 type Creator = S::Creator;
3433 type Uri = Set<members::uri>;
3434 type IndexedAt = S::IndexedAt;
3435 }
3436 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
3438 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
3439 impl<S: State> State for SetIndexedAt<S> {
3440 type Cid = S::Cid;
3441 type Record = S::Record;
3442 type Creator = S::Creator;
3443 type Uri = S::Uri;
3444 type IndexedAt = Set<members::indexed_at>;
3445 }
3446 #[allow(non_camel_case_types)]
3448 pub mod members {
3449 pub struct cid(());
3451 pub struct record(());
3453 pub struct creator(());
3455 pub struct uri(());
3457 pub struct indexed_at(());
3459 }
3460}
3461
3462pub struct StarterPackViewBasicBuilder<'a, S: starter_pack_view_basic_state::State> {
3464 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
3465 __unsafe_private_named: (
3466 ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
3467 ::core::option::Option<crate::app_bsky::actor::ProfileViewBasic<'a>>,
3468 ::core::option::Option<jacquard_common::types::string::Datetime>,
3469 ::core::option::Option<i64>,
3470 ::core::option::Option<i64>,
3471 ::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
3472 ::core::option::Option<i64>,
3473 ::core::option::Option<jacquard_common::types::value::Data<'a>>,
3474 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
3475 ),
3476 _phantom: ::core::marker::PhantomData<&'a ()>,
3477}
3478
3479impl<'a> StarterPackViewBasic<'a> {
3480 pub fn new() -> StarterPackViewBasicBuilder<
3482 'a,
3483 starter_pack_view_basic_state::Empty,
3484 > {
3485 StarterPackViewBasicBuilder::new()
3486 }
3487}
3488
3489impl<'a> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::Empty> {
3490 pub fn new() -> Self {
3492 StarterPackViewBasicBuilder {
3493 _phantom_state: ::core::marker::PhantomData,
3494 __unsafe_private_named: (
3495 None,
3496 None,
3497 None,
3498 None,
3499 None,
3500 None,
3501 None,
3502 None,
3503 None,
3504 ),
3505 _phantom: ::core::marker::PhantomData,
3506 }
3507 }
3508}
3509
3510impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3511where
3512 S: starter_pack_view_basic_state::State,
3513 S::Cid: starter_pack_view_basic_state::IsUnset,
3514{
3515 pub fn cid(
3517 mut self,
3518 value: impl Into<jacquard_common::types::string::Cid<'a>>,
3519 ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetCid<S>> {
3520 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
3521 StarterPackViewBasicBuilder {
3522 _phantom_state: ::core::marker::PhantomData,
3523 __unsafe_private_named: self.__unsafe_private_named,
3524 _phantom: ::core::marker::PhantomData,
3525 }
3526 }
3527}
3528
3529impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3530where
3531 S: starter_pack_view_basic_state::State,
3532 S::Creator: starter_pack_view_basic_state::IsUnset,
3533{
3534 pub fn creator(
3536 mut self,
3537 value: impl Into<crate::app_bsky::actor::ProfileViewBasic<'a>>,
3538 ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetCreator<S>> {
3539 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
3540 StarterPackViewBasicBuilder {
3541 _phantom_state: ::core::marker::PhantomData,
3542 __unsafe_private_named: self.__unsafe_private_named,
3543 _phantom: ::core::marker::PhantomData,
3544 }
3545 }
3546}
3547
3548impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3549where
3550 S: starter_pack_view_basic_state::State,
3551 S::IndexedAt: starter_pack_view_basic_state::IsUnset,
3552{
3553 pub fn indexed_at(
3555 mut self,
3556 value: impl Into<jacquard_common::types::string::Datetime>,
3557 ) -> StarterPackViewBasicBuilder<
3558 'a,
3559 starter_pack_view_basic_state::SetIndexedAt<S>,
3560 > {
3561 self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
3562 StarterPackViewBasicBuilder {
3563 _phantom_state: ::core::marker::PhantomData,
3564 __unsafe_private_named: self.__unsafe_private_named,
3565 _phantom: ::core::marker::PhantomData,
3566 }
3567 }
3568}
3569
3570impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> {
3571 pub fn joined_all_time_count(mut self, value: impl Into<Option<i64>>) -> Self {
3573 self.__unsafe_private_named.3 = value.into();
3574 self
3575 }
3576 pub fn maybe_joined_all_time_count(mut self, value: Option<i64>) -> Self {
3578 self.__unsafe_private_named.3 = value;
3579 self
3580 }
3581}
3582
3583impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> {
3584 pub fn joined_week_count(mut self, value: impl Into<Option<i64>>) -> Self {
3586 self.__unsafe_private_named.4 = value.into();
3587 self
3588 }
3589 pub fn maybe_joined_week_count(mut self, value: Option<i64>) -> Self {
3591 self.__unsafe_private_named.4 = value;
3592 self
3593 }
3594}
3595
3596impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> {
3597 pub fn labels(
3599 mut self,
3600 value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
3601 ) -> Self {
3602 self.__unsafe_private_named.5 = value.into();
3603 self
3604 }
3605 pub fn maybe_labels(
3607 mut self,
3608 value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
3609 ) -> Self {
3610 self.__unsafe_private_named.5 = value;
3611 self
3612 }
3613}
3614
3615impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> {
3616 pub fn list_item_count(mut self, value: impl Into<Option<i64>>) -> Self {
3618 self.__unsafe_private_named.6 = value.into();
3619 self
3620 }
3621 pub fn maybe_list_item_count(mut self, value: Option<i64>) -> Self {
3623 self.__unsafe_private_named.6 = value;
3624 self
3625 }
3626}
3627
3628impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3629where
3630 S: starter_pack_view_basic_state::State,
3631 S::Record: starter_pack_view_basic_state::IsUnset,
3632{
3633 pub fn record(
3635 mut self,
3636 value: impl Into<jacquard_common::types::value::Data<'a>>,
3637 ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetRecord<S>> {
3638 self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into());
3639 StarterPackViewBasicBuilder {
3640 _phantom_state: ::core::marker::PhantomData,
3641 __unsafe_private_named: self.__unsafe_private_named,
3642 _phantom: ::core::marker::PhantomData,
3643 }
3644 }
3645}
3646
3647impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3648where
3649 S: starter_pack_view_basic_state::State,
3650 S::Uri: starter_pack_view_basic_state::IsUnset,
3651{
3652 pub fn uri(
3654 mut self,
3655 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
3656 ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetUri<S>> {
3657 self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into());
3658 StarterPackViewBasicBuilder {
3659 _phantom_state: ::core::marker::PhantomData,
3660 __unsafe_private_named: self.__unsafe_private_named,
3661 _phantom: ::core::marker::PhantomData,
3662 }
3663 }
3664}
3665
3666impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3667where
3668 S: starter_pack_view_basic_state::State,
3669 S::Cid: starter_pack_view_basic_state::IsSet,
3670 S::Record: starter_pack_view_basic_state::IsSet,
3671 S::Creator: starter_pack_view_basic_state::IsSet,
3672 S::Uri: starter_pack_view_basic_state::IsSet,
3673 S::IndexedAt: starter_pack_view_basic_state::IsSet,
3674{
3675 pub fn build(self) -> StarterPackViewBasic<'a> {
3677 StarterPackViewBasic {
3678 cid: self.__unsafe_private_named.0.unwrap(),
3679 creator: self.__unsafe_private_named.1.unwrap(),
3680 indexed_at: self.__unsafe_private_named.2.unwrap(),
3681 joined_all_time_count: self.__unsafe_private_named.3,
3682 joined_week_count: self.__unsafe_private_named.4,
3683 labels: self.__unsafe_private_named.5,
3684 list_item_count: self.__unsafe_private_named.6,
3685 record: self.__unsafe_private_named.7.unwrap(),
3686 uri: self.__unsafe_private_named.8.unwrap(),
3687 extra_data: Default::default(),
3688 }
3689 }
3690 pub fn build_with_data(
3692 self,
3693 extra_data: std::collections::BTreeMap<
3694 jacquard_common::smol_str::SmolStr,
3695 jacquard_common::types::value::Data<'a>,
3696 >,
3697 ) -> StarterPackViewBasic<'a> {
3698 StarterPackViewBasic {
3699 cid: self.__unsafe_private_named.0.unwrap(),
3700 creator: self.__unsafe_private_named.1.unwrap(),
3701 indexed_at: self.__unsafe_private_named.2.unwrap(),
3702 joined_all_time_count: self.__unsafe_private_named.3,
3703 joined_week_count: self.__unsafe_private_named.4,
3704 labels: self.__unsafe_private_named.5,
3705 list_item_count: self.__unsafe_private_named.6,
3706 record: self.__unsafe_private_named.7.unwrap(),
3707 uri: self.__unsafe_private_named.8.unwrap(),
3708 extra_data: Some(extra_data),
3709 }
3710 }
3711}
3712
3713impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StarterPackViewBasic<'a> {
3714 fn nsid() -> &'static str {
3715 "app.bsky.graph.defs"
3716 }
3717 fn def_name() -> &'static str {
3718 "starterPackViewBasic"
3719 }
3720 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
3721 lexicon_doc_app_bsky_graph_defs()
3722 }
3723 fn validate(
3724 &self,
3725 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
3726 if let Some(ref value) = self.joined_all_time_count {
3727 if *value < 0i64 {
3728 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3729 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3730 "joined_all_time_count",
3731 ),
3732 min: 0i64,
3733 actual: *value,
3734 });
3735 }
3736 }
3737 if let Some(ref value) = self.joined_week_count {
3738 if *value < 0i64 {
3739 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3740 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3741 "joined_week_count",
3742 ),
3743 min: 0i64,
3744 actual: *value,
3745 });
3746 }
3747 }
3748 if let Some(ref value) = self.list_item_count {
3749 if *value < 0i64 {
3750 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3751 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3752 "list_item_count",
3753 ),
3754 min: 0i64,
3755 actual: *value,
3756 });
3757 }
3758 }
3759 Ok(())
3760 }
3761}