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("did"),
744 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
745 description: None,
746 format: Some(
747 ::jacquard_lexicon::lexicon::LexStringFormat::Did,
748 ),
749 default: None,
750 min_length: None,
751 max_length: None,
752 min_graphemes: None,
753 max_graphemes: None,
754 r#enum: None,
755 r#const: None,
756 known_values: None,
757 }),
758 );
759 map.insert(
760 ::jacquard_common::smol_str::SmolStr::new_static(
761 "followedBy",
762 ),
763 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
764 description: Some(
765 ::jacquard_common::CowStr::new_static(
766 "if the actor is followed by this DID, contains the AT-URI of the follow record",
767 ),
768 ),
769 format: Some(
770 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
771 ),
772 default: None,
773 min_length: None,
774 max_length: None,
775 min_graphemes: None,
776 max_graphemes: None,
777 r#enum: None,
778 r#const: None,
779 known_values: None,
780 }),
781 );
782 map.insert(
783 ::jacquard_common::smol_str::SmolStr::new_static(
784 "following",
785 ),
786 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
787 description: Some(
788 ::jacquard_common::CowStr::new_static(
789 "if the actor follows this DID, this is the AT-URI of the follow record",
790 ),
791 ),
792 format: Some(
793 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
794 ),
795 default: None,
796 min_length: None,
797 max_length: None,
798 min_graphemes: None,
799 max_graphemes: None,
800 r#enum: None,
801 r#const: None,
802 known_values: None,
803 }),
804 );
805 map
806 },
807 }),
808 );
809 map.insert(
810 ::jacquard_common::smol_str::SmolStr::new_static("starterPackView"),
811 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
812 description: None,
813 required: Some(
814 vec![
815 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
816 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
817 ::jacquard_common::smol_str::SmolStr::new_static("record"),
818 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
819 ::jacquard_common::smol_str::SmolStr::new_static("indexedAt")
820 ],
821 ),
822 nullable: None,
823 properties: {
824 #[allow(unused_mut)]
825 let mut map = ::std::collections::BTreeMap::new();
826 map.insert(
827 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
828 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
829 description: None,
830 format: Some(
831 ::jacquard_lexicon::lexicon::LexStringFormat::Cid,
832 ),
833 default: None,
834 min_length: None,
835 max_length: None,
836 min_graphemes: None,
837 max_graphemes: None,
838 r#enum: None,
839 r#const: None,
840 known_values: None,
841 }),
842 );
843 map.insert(
844 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
845 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
846 description: None,
847 r#ref: ::jacquard_common::CowStr::new_static(
848 "app.bsky.actor.defs#profileViewBasic",
849 ),
850 }),
851 );
852 map.insert(
853 ::jacquard_common::smol_str::SmolStr::new_static("feeds"),
854 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
855 description: None,
856 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
857 description: None,
858 r#ref: ::jacquard_common::CowStr::new_static(
859 "app.bsky.feed.defs#generatorView",
860 ),
861 }),
862 min_length: None,
863 max_length: Some(3usize),
864 }),
865 );
866 map.insert(
867 ::jacquard_common::smol_str::SmolStr::new_static(
868 "indexedAt",
869 ),
870 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
871 description: None,
872 format: Some(
873 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
874 ),
875 default: None,
876 min_length: None,
877 max_length: None,
878 min_graphemes: None,
879 max_graphemes: None,
880 r#enum: None,
881 r#const: None,
882 known_values: None,
883 }),
884 );
885 map.insert(
886 ::jacquard_common::smol_str::SmolStr::new_static(
887 "joinedAllTimeCount",
888 ),
889 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
890 description: None,
891 default: None,
892 minimum: Some(0i64),
893 maximum: None,
894 r#enum: None,
895 r#const: None,
896 }),
897 );
898 map.insert(
899 ::jacquard_common::smol_str::SmolStr::new_static(
900 "joinedWeekCount",
901 ),
902 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
903 description: None,
904 default: None,
905 minimum: Some(0i64),
906 maximum: None,
907 r#enum: None,
908 r#const: None,
909 }),
910 );
911 map.insert(
912 ::jacquard_common::smol_str::SmolStr::new_static("labels"),
913 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
914 description: None,
915 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
916 description: None,
917 r#ref: ::jacquard_common::CowStr::new_static(
918 "com.atproto.label.defs#label",
919 ),
920 }),
921 min_length: None,
922 max_length: None,
923 }),
924 );
925 map.insert(
926 ::jacquard_common::smol_str::SmolStr::new_static("list"),
927 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
928 description: None,
929 r#ref: ::jacquard_common::CowStr::new_static(
930 "#listViewBasic",
931 ),
932 }),
933 );
934 map.insert(
935 ::jacquard_common::smol_str::SmolStr::new_static(
936 "listItemsSample",
937 ),
938 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
939 description: None,
940 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
941 description: None,
942 r#ref: ::jacquard_common::CowStr::new_static(
943 "#listItemView",
944 ),
945 }),
946 min_length: None,
947 max_length: Some(12usize),
948 }),
949 );
950 map.insert(
951 ::jacquard_common::smol_str::SmolStr::new_static("record"),
952 ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
953 description: None,
954 }),
955 );
956 map.insert(
957 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
958 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
959 description: None,
960 format: Some(
961 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
962 ),
963 default: None,
964 min_length: None,
965 max_length: None,
966 min_graphemes: None,
967 max_graphemes: None,
968 r#enum: None,
969 r#const: None,
970 known_values: None,
971 }),
972 );
973 map
974 },
975 }),
976 );
977 map.insert(
978 ::jacquard_common::smol_str::SmolStr::new_static("starterPackViewBasic"),
979 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
980 description: None,
981 required: Some(
982 vec![
983 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
984 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
985 ::jacquard_common::smol_str::SmolStr::new_static("record"),
986 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
987 ::jacquard_common::smol_str::SmolStr::new_static("indexedAt")
988 ],
989 ),
990 nullable: None,
991 properties: {
992 #[allow(unused_mut)]
993 let mut map = ::std::collections::BTreeMap::new();
994 map.insert(
995 ::jacquard_common::smol_str::SmolStr::new_static("cid"),
996 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
997 description: None,
998 format: Some(
999 ::jacquard_lexicon::lexicon::LexStringFormat::Cid,
1000 ),
1001 default: None,
1002 min_length: None,
1003 max_length: None,
1004 min_graphemes: None,
1005 max_graphemes: None,
1006 r#enum: None,
1007 r#const: None,
1008 known_values: None,
1009 }),
1010 );
1011 map.insert(
1012 ::jacquard_common::smol_str::SmolStr::new_static("creator"),
1013 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
1014 description: None,
1015 r#ref: ::jacquard_common::CowStr::new_static(
1016 "app.bsky.actor.defs#profileViewBasic",
1017 ),
1018 }),
1019 );
1020 map.insert(
1021 ::jacquard_common::smol_str::SmolStr::new_static(
1022 "indexedAt",
1023 ),
1024 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
1025 description: None,
1026 format: Some(
1027 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
1028 ),
1029 default: None,
1030 min_length: None,
1031 max_length: None,
1032 min_graphemes: None,
1033 max_graphemes: None,
1034 r#enum: None,
1035 r#const: None,
1036 known_values: None,
1037 }),
1038 );
1039 map.insert(
1040 ::jacquard_common::smol_str::SmolStr::new_static(
1041 "joinedAllTimeCount",
1042 ),
1043 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
1044 description: None,
1045 default: None,
1046 minimum: Some(0i64),
1047 maximum: None,
1048 r#enum: None,
1049 r#const: None,
1050 }),
1051 );
1052 map.insert(
1053 ::jacquard_common::smol_str::SmolStr::new_static(
1054 "joinedWeekCount",
1055 ),
1056 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
1057 description: None,
1058 default: None,
1059 minimum: Some(0i64),
1060 maximum: None,
1061 r#enum: None,
1062 r#const: None,
1063 }),
1064 );
1065 map.insert(
1066 ::jacquard_common::smol_str::SmolStr::new_static("labels"),
1067 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
1068 description: None,
1069 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
1070 description: None,
1071 r#ref: ::jacquard_common::CowStr::new_static(
1072 "com.atproto.label.defs#label",
1073 ),
1074 }),
1075 min_length: None,
1076 max_length: None,
1077 }),
1078 );
1079 map.insert(
1080 ::jacquard_common::smol_str::SmolStr::new_static(
1081 "listItemCount",
1082 ),
1083 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
1084 description: None,
1085 default: None,
1086 minimum: Some(0i64),
1087 maximum: None,
1088 r#enum: None,
1089 r#const: None,
1090 }),
1091 );
1092 map.insert(
1093 ::jacquard_common::smol_str::SmolStr::new_static("record"),
1094 ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
1095 description: None,
1096 }),
1097 );
1098 map.insert(
1099 ::jacquard_common::smol_str::SmolStr::new_static("uri"),
1100 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
1101 description: None,
1102 format: Some(
1103 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
1104 ),
1105 default: None,
1106 min_length: None,
1107 max_length: None,
1108 min_graphemes: None,
1109 max_graphemes: None,
1110 r#enum: None,
1111 r#const: None,
1112 known_values: None,
1113 }),
1114 );
1115 map
1116 },
1117 }),
1118 );
1119 map
1120 },
1121 }
1122}
1123
1124impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListItemView<'a> {
1125 fn nsid() -> &'static str {
1126 "app.bsky.graph.defs"
1127 }
1128 fn def_name() -> &'static str {
1129 "listItemView"
1130 }
1131 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
1132 lexicon_doc_app_bsky_graph_defs()
1133 }
1134 fn validate(
1135 &self,
1136 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
1137 Ok(())
1138 }
1139}
1140
1141#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1142pub enum ListPurpose<'a> {
1143 AppBskyGraphDefsModlist,
1144 AppBskyGraphDefsCuratelist,
1145 AppBskyGraphDefsReferencelist,
1146 Other(jacquard_common::CowStr<'a>),
1147}
1148
1149impl<'a> ListPurpose<'a> {
1150 pub fn as_str(&self) -> &str {
1151 match self {
1152 Self::AppBskyGraphDefsModlist => "app.bsky.graph.defs#modlist",
1153 Self::AppBskyGraphDefsCuratelist => "app.bsky.graph.defs#curatelist",
1154 Self::AppBskyGraphDefsReferencelist => "app.bsky.graph.defs#referencelist",
1155 Self::Other(s) => s.as_ref(),
1156 }
1157 }
1158}
1159
1160impl<'a> From<&'a str> for ListPurpose<'a> {
1161 fn from(s: &'a str) -> Self {
1162 match s {
1163 "app.bsky.graph.defs#modlist" => Self::AppBskyGraphDefsModlist,
1164 "app.bsky.graph.defs#curatelist" => Self::AppBskyGraphDefsCuratelist,
1165 "app.bsky.graph.defs#referencelist" => Self::AppBskyGraphDefsReferencelist,
1166 _ => Self::Other(jacquard_common::CowStr::from(s)),
1167 }
1168 }
1169}
1170
1171impl<'a> From<String> for ListPurpose<'a> {
1172 fn from(s: String) -> Self {
1173 match s.as_str() {
1174 "app.bsky.graph.defs#modlist" => Self::AppBskyGraphDefsModlist,
1175 "app.bsky.graph.defs#curatelist" => Self::AppBskyGraphDefsCuratelist,
1176 "app.bsky.graph.defs#referencelist" => Self::AppBskyGraphDefsReferencelist,
1177 _ => Self::Other(jacquard_common::CowStr::from(s)),
1178 }
1179 }
1180}
1181
1182impl<'a> AsRef<str> for ListPurpose<'a> {
1183 fn as_ref(&self) -> &str {
1184 self.as_str()
1185 }
1186}
1187
1188impl<'a> serde::Serialize for ListPurpose<'a> {
1189 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1190 where
1191 S: serde::Serializer,
1192 {
1193 serializer.serialize_str(self.as_str())
1194 }
1195}
1196
1197impl<'de, 'a> serde::Deserialize<'de> for ListPurpose<'a>
1198where
1199 'de: 'a,
1200{
1201 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1202 where
1203 D: serde::Deserializer<'de>,
1204 {
1205 let s = <&'de str>::deserialize(deserializer)?;
1206 Ok(Self::from(s))
1207 }
1208}
1209
1210impl jacquard_common::IntoStatic for ListPurpose<'_> {
1211 type Output = ListPurpose<'static>;
1212 fn into_static(self) -> Self::Output {
1213 match self {
1214 ListPurpose::AppBskyGraphDefsModlist => ListPurpose::AppBskyGraphDefsModlist,
1215 ListPurpose::AppBskyGraphDefsCuratelist => {
1216 ListPurpose::AppBskyGraphDefsCuratelist
1217 }
1218 ListPurpose::AppBskyGraphDefsReferencelist => {
1219 ListPurpose::AppBskyGraphDefsReferencelist
1220 }
1221 ListPurpose::Other(v) => ListPurpose::Other(v.into_static()),
1222 }
1223 }
1224}
1225
1226#[jacquard_derive::lexicon]
1227#[derive(
1228 serde::Serialize,
1229 serde::Deserialize,
1230 Debug,
1231 Clone,
1232 PartialEq,
1233 Eq,
1234 jacquard_derive::IntoStatic
1235)]
1236#[serde(rename_all = "camelCase")]
1237pub struct ListView<'a> {
1238 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1239 #[serde(borrow)]
1240 pub avatar: Option<jacquard_common::types::string::Uri<'a>>,
1241 #[serde(borrow)]
1242 pub cid: jacquard_common::types::string::Cid<'a>,
1243 #[serde(borrow)]
1244 pub creator: crate::app_bsky::actor::ProfileView<'a>,
1245 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1246 #[serde(borrow)]
1247 pub description: Option<jacquard_common::CowStr<'a>>,
1248 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1249 #[serde(borrow)]
1250 pub description_facets: Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
1251 pub indexed_at: jacquard_common::types::string::Datetime,
1252 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1253 #[serde(borrow)]
1254 pub labels: Option<Vec<crate::com_atproto::label::Label<'a>>>,
1255 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1256 pub list_item_count: Option<i64>,
1257 #[serde(borrow)]
1258 pub name: jacquard_common::CowStr<'a>,
1259 #[serde(borrow)]
1260 pub purpose: crate::app_bsky::graph::ListPurpose<'a>,
1261 #[serde(borrow)]
1262 pub uri: jacquard_common::types::string::AtUri<'a>,
1263 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1264 #[serde(borrow)]
1265 pub viewer: Option<crate::app_bsky::graph::ListViewerState<'a>>,
1266}
1267
1268pub mod list_view_state {
1269
1270 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1271 #[allow(unused)]
1272 use ::core::marker::PhantomData;
1273 mod sealed {
1274 pub trait Sealed {}
1275 }
1276 pub trait State: sealed::Sealed {
1278 type Uri;
1279 type Cid;
1280 type Creator;
1281 type Name;
1282 type Purpose;
1283 type IndexedAt;
1284 }
1285 pub struct Empty(());
1287 impl sealed::Sealed for Empty {}
1288 impl State for Empty {
1289 type Uri = Unset;
1290 type Cid = Unset;
1291 type Creator = Unset;
1292 type Name = Unset;
1293 type Purpose = Unset;
1294 type IndexedAt = Unset;
1295 }
1296 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
1298 impl<S: State> sealed::Sealed for SetUri<S> {}
1299 impl<S: State> State for SetUri<S> {
1300 type Uri = Set<members::uri>;
1301 type Cid = S::Cid;
1302 type Creator = S::Creator;
1303 type Name = S::Name;
1304 type Purpose = S::Purpose;
1305 type IndexedAt = S::IndexedAt;
1306 }
1307 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
1309 impl<S: State> sealed::Sealed for SetCid<S> {}
1310 impl<S: State> State for SetCid<S> {
1311 type Uri = S::Uri;
1312 type Cid = Set<members::cid>;
1313 type Creator = S::Creator;
1314 type Name = S::Name;
1315 type Purpose = S::Purpose;
1316 type IndexedAt = S::IndexedAt;
1317 }
1318 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
1320 impl<S: State> sealed::Sealed for SetCreator<S> {}
1321 impl<S: State> State for SetCreator<S> {
1322 type Uri = S::Uri;
1323 type Cid = S::Cid;
1324 type Creator = Set<members::creator>;
1325 type Name = S::Name;
1326 type Purpose = S::Purpose;
1327 type IndexedAt = S::IndexedAt;
1328 }
1329 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
1331 impl<S: State> sealed::Sealed for SetName<S> {}
1332 impl<S: State> State for SetName<S> {
1333 type Uri = S::Uri;
1334 type Cid = S::Cid;
1335 type Creator = S::Creator;
1336 type Name = Set<members::name>;
1337 type Purpose = S::Purpose;
1338 type IndexedAt = S::IndexedAt;
1339 }
1340 pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
1342 impl<S: State> sealed::Sealed for SetPurpose<S> {}
1343 impl<S: State> State for SetPurpose<S> {
1344 type Uri = S::Uri;
1345 type Cid = S::Cid;
1346 type Creator = S::Creator;
1347 type Name = S::Name;
1348 type Purpose = Set<members::purpose>;
1349 type IndexedAt = S::IndexedAt;
1350 }
1351 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
1353 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
1354 impl<S: State> State for SetIndexedAt<S> {
1355 type Uri = S::Uri;
1356 type Cid = S::Cid;
1357 type Creator = S::Creator;
1358 type Name = S::Name;
1359 type Purpose = S::Purpose;
1360 type IndexedAt = Set<members::indexed_at>;
1361 }
1362 #[allow(non_camel_case_types)]
1364 pub mod members {
1365 pub struct uri(());
1367 pub struct cid(());
1369 pub struct creator(());
1371 pub struct name(());
1373 pub struct purpose(());
1375 pub struct indexed_at(());
1377 }
1378}
1379
1380pub struct ListViewBuilder<'a, S: list_view_state::State> {
1382 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
1383 __unsafe_private_named: (
1384 ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
1385 ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
1386 ::core::option::Option<crate::app_bsky::actor::ProfileView<'a>>,
1387 ::core::option::Option<jacquard_common::CowStr<'a>>,
1388 ::core::option::Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
1389 ::core::option::Option<jacquard_common::types::string::Datetime>,
1390 ::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
1391 ::core::option::Option<i64>,
1392 ::core::option::Option<jacquard_common::CowStr<'a>>,
1393 ::core::option::Option<crate::app_bsky::graph::ListPurpose<'a>>,
1394 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
1395 ::core::option::Option<crate::app_bsky::graph::ListViewerState<'a>>,
1396 ),
1397 _phantom: ::core::marker::PhantomData<&'a ()>,
1398}
1399
1400impl<'a> ListView<'a> {
1401 pub fn new() -> ListViewBuilder<'a, list_view_state::Empty> {
1403 ListViewBuilder::new()
1404 }
1405}
1406
1407impl<'a> ListViewBuilder<'a, list_view_state::Empty> {
1408 pub fn new() -> Self {
1410 ListViewBuilder {
1411 _phantom_state: ::core::marker::PhantomData,
1412 __unsafe_private_named: (
1413 None,
1414 None,
1415 None,
1416 None,
1417 None,
1418 None,
1419 None,
1420 None,
1421 None,
1422 None,
1423 None,
1424 None,
1425 ),
1426 _phantom: ::core::marker::PhantomData,
1427 }
1428 }
1429}
1430
1431impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1432 pub fn avatar(
1434 mut self,
1435 value: impl Into<Option<jacquard_common::types::string::Uri<'a>>>,
1436 ) -> Self {
1437 self.__unsafe_private_named.0 = value.into();
1438 self
1439 }
1440 pub fn maybe_avatar(
1442 mut self,
1443 value: Option<jacquard_common::types::string::Uri<'a>>,
1444 ) -> Self {
1445 self.__unsafe_private_named.0 = value;
1446 self
1447 }
1448}
1449
1450impl<'a, S> ListViewBuilder<'a, S>
1451where
1452 S: list_view_state::State,
1453 S::Cid: list_view_state::IsUnset,
1454{
1455 pub fn cid(
1457 mut self,
1458 value: impl Into<jacquard_common::types::string::Cid<'a>>,
1459 ) -> ListViewBuilder<'a, list_view_state::SetCid<S>> {
1460 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
1461 ListViewBuilder {
1462 _phantom_state: ::core::marker::PhantomData,
1463 __unsafe_private_named: self.__unsafe_private_named,
1464 _phantom: ::core::marker::PhantomData,
1465 }
1466 }
1467}
1468
1469impl<'a, S> ListViewBuilder<'a, S>
1470where
1471 S: list_view_state::State,
1472 S::Creator: list_view_state::IsUnset,
1473{
1474 pub fn creator(
1476 mut self,
1477 value: impl Into<crate::app_bsky::actor::ProfileView<'a>>,
1478 ) -> ListViewBuilder<'a, list_view_state::SetCreator<S>> {
1479 self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
1480 ListViewBuilder {
1481 _phantom_state: ::core::marker::PhantomData,
1482 __unsafe_private_named: self.__unsafe_private_named,
1483 _phantom: ::core::marker::PhantomData,
1484 }
1485 }
1486}
1487
1488impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1489 pub fn description(
1491 mut self,
1492 value: impl Into<Option<jacquard_common::CowStr<'a>>>,
1493 ) -> Self {
1494 self.__unsafe_private_named.3 = value.into();
1495 self
1496 }
1497 pub fn maybe_description(
1499 mut self,
1500 value: Option<jacquard_common::CowStr<'a>>,
1501 ) -> Self {
1502 self.__unsafe_private_named.3 = value;
1503 self
1504 }
1505}
1506
1507impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1508 pub fn description_facets(
1510 mut self,
1511 value: impl Into<Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>>,
1512 ) -> Self {
1513 self.__unsafe_private_named.4 = value.into();
1514 self
1515 }
1516 pub fn maybe_description_facets(
1518 mut self,
1519 value: Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
1520 ) -> Self {
1521 self.__unsafe_private_named.4 = value;
1522 self
1523 }
1524}
1525
1526impl<'a, S> ListViewBuilder<'a, S>
1527where
1528 S: list_view_state::State,
1529 S::IndexedAt: list_view_state::IsUnset,
1530{
1531 pub fn indexed_at(
1533 mut self,
1534 value: impl Into<jacquard_common::types::string::Datetime>,
1535 ) -> ListViewBuilder<'a, list_view_state::SetIndexedAt<S>> {
1536 self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
1537 ListViewBuilder {
1538 _phantom_state: ::core::marker::PhantomData,
1539 __unsafe_private_named: self.__unsafe_private_named,
1540 _phantom: ::core::marker::PhantomData,
1541 }
1542 }
1543}
1544
1545impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1546 pub fn labels(
1548 mut self,
1549 value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
1550 ) -> Self {
1551 self.__unsafe_private_named.6 = value.into();
1552 self
1553 }
1554 pub fn maybe_labels(
1556 mut self,
1557 value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
1558 ) -> Self {
1559 self.__unsafe_private_named.6 = value;
1560 self
1561 }
1562}
1563
1564impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1565 pub fn list_item_count(mut self, value: impl Into<Option<i64>>) -> Self {
1567 self.__unsafe_private_named.7 = value.into();
1568 self
1569 }
1570 pub fn maybe_list_item_count(mut self, value: Option<i64>) -> Self {
1572 self.__unsafe_private_named.7 = value;
1573 self
1574 }
1575}
1576
1577impl<'a, S> ListViewBuilder<'a, S>
1578where
1579 S: list_view_state::State,
1580 S::Name: list_view_state::IsUnset,
1581{
1582 pub fn name(
1584 mut self,
1585 value: impl Into<jacquard_common::CowStr<'a>>,
1586 ) -> ListViewBuilder<'a, list_view_state::SetName<S>> {
1587 self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into());
1588 ListViewBuilder {
1589 _phantom_state: ::core::marker::PhantomData,
1590 __unsafe_private_named: self.__unsafe_private_named,
1591 _phantom: ::core::marker::PhantomData,
1592 }
1593 }
1594}
1595
1596impl<'a, S> ListViewBuilder<'a, S>
1597where
1598 S: list_view_state::State,
1599 S::Purpose: list_view_state::IsUnset,
1600{
1601 pub fn purpose(
1603 mut self,
1604 value: impl Into<crate::app_bsky::graph::ListPurpose<'a>>,
1605 ) -> ListViewBuilder<'a, list_view_state::SetPurpose<S>> {
1606 self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
1607 ListViewBuilder {
1608 _phantom_state: ::core::marker::PhantomData,
1609 __unsafe_private_named: self.__unsafe_private_named,
1610 _phantom: ::core::marker::PhantomData,
1611 }
1612 }
1613}
1614
1615impl<'a, S> ListViewBuilder<'a, S>
1616where
1617 S: list_view_state::State,
1618 S::Uri: list_view_state::IsUnset,
1619{
1620 pub fn uri(
1622 mut self,
1623 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
1624 ) -> ListViewBuilder<'a, list_view_state::SetUri<S>> {
1625 self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into());
1626 ListViewBuilder {
1627 _phantom_state: ::core::marker::PhantomData,
1628 __unsafe_private_named: self.__unsafe_private_named,
1629 _phantom: ::core::marker::PhantomData,
1630 }
1631 }
1632}
1633
1634impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> {
1635 pub fn viewer(
1637 mut self,
1638 value: impl Into<Option<crate::app_bsky::graph::ListViewerState<'a>>>,
1639 ) -> Self {
1640 self.__unsafe_private_named.11 = value.into();
1641 self
1642 }
1643 pub fn maybe_viewer(
1645 mut self,
1646 value: Option<crate::app_bsky::graph::ListViewerState<'a>>,
1647 ) -> Self {
1648 self.__unsafe_private_named.11 = value;
1649 self
1650 }
1651}
1652
1653impl<'a, S> ListViewBuilder<'a, S>
1654where
1655 S: list_view_state::State,
1656 S::Uri: list_view_state::IsSet,
1657 S::Cid: list_view_state::IsSet,
1658 S::Creator: list_view_state::IsSet,
1659 S::Name: list_view_state::IsSet,
1660 S::Purpose: list_view_state::IsSet,
1661 S::IndexedAt: list_view_state::IsSet,
1662{
1663 pub fn build(self) -> ListView<'a> {
1665 ListView {
1666 avatar: self.__unsafe_private_named.0,
1667 cid: self.__unsafe_private_named.1.unwrap(),
1668 creator: self.__unsafe_private_named.2.unwrap(),
1669 description: self.__unsafe_private_named.3,
1670 description_facets: self.__unsafe_private_named.4,
1671 indexed_at: self.__unsafe_private_named.5.unwrap(),
1672 labels: self.__unsafe_private_named.6,
1673 list_item_count: self.__unsafe_private_named.7,
1674 name: self.__unsafe_private_named.8.unwrap(),
1675 purpose: self.__unsafe_private_named.9.unwrap(),
1676 uri: self.__unsafe_private_named.10.unwrap(),
1677 viewer: self.__unsafe_private_named.11,
1678 extra_data: Default::default(),
1679 }
1680 }
1681 pub fn build_with_data(
1683 self,
1684 extra_data: std::collections::BTreeMap<
1685 jacquard_common::smol_str::SmolStr,
1686 jacquard_common::types::value::Data<'a>,
1687 >,
1688 ) -> ListView<'a> {
1689 ListView {
1690 avatar: self.__unsafe_private_named.0,
1691 cid: self.__unsafe_private_named.1.unwrap(),
1692 creator: self.__unsafe_private_named.2.unwrap(),
1693 description: self.__unsafe_private_named.3,
1694 description_facets: self.__unsafe_private_named.4,
1695 indexed_at: self.__unsafe_private_named.5.unwrap(),
1696 labels: self.__unsafe_private_named.6,
1697 list_item_count: self.__unsafe_private_named.7,
1698 name: self.__unsafe_private_named.8.unwrap(),
1699 purpose: self.__unsafe_private_named.9.unwrap(),
1700 uri: self.__unsafe_private_named.10.unwrap(),
1701 viewer: self.__unsafe_private_named.11,
1702 extra_data: Some(extra_data),
1703 }
1704 }
1705}
1706
1707impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListView<'a> {
1708 fn nsid() -> &'static str {
1709 "app.bsky.graph.defs"
1710 }
1711 fn def_name() -> &'static str {
1712 "listView"
1713 }
1714 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
1715 lexicon_doc_app_bsky_graph_defs()
1716 }
1717 fn validate(
1718 &self,
1719 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
1720 if let Some(ref value) = self.description {
1721 #[allow(unused_comparisons)]
1722 if <str>::len(value.as_ref()) > 3000usize {
1723 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
1724 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1725 "description",
1726 ),
1727 max: 3000usize,
1728 actual: <str>::len(value.as_ref()),
1729 });
1730 }
1731 }
1732 if let Some(ref value) = self.description {
1733 {
1734 let count = ::unicode_segmentation::UnicodeSegmentation::graphemes(
1735 value.as_ref(),
1736 true,
1737 )
1738 .count();
1739 if count > 300usize {
1740 return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
1741 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1742 "description",
1743 ),
1744 max: 300usize,
1745 actual: count,
1746 });
1747 }
1748 }
1749 }
1750 if let Some(ref value) = self.list_item_count {
1751 if *value < 0i64 {
1752 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
1753 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1754 "list_item_count",
1755 ),
1756 min: 0i64,
1757 actual: *value,
1758 });
1759 }
1760 }
1761 {
1762 let value = &self.name;
1763 #[allow(unused_comparisons)]
1764 if <str>::len(value.as_ref()) > 64usize {
1765 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
1766 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1767 "name",
1768 ),
1769 max: 64usize,
1770 actual: <str>::len(value.as_ref()),
1771 });
1772 }
1773 }
1774 {
1775 let value = &self.name;
1776 #[allow(unused_comparisons)]
1777 if <str>::len(value.as_ref()) < 1usize {
1778 return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
1779 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
1780 "name",
1781 ),
1782 min: 1usize,
1783 actual: <str>::len(value.as_ref()),
1784 });
1785 }
1786 }
1787 Ok(())
1788 }
1789}
1790
1791#[jacquard_derive::lexicon]
1792#[derive(
1793 serde::Serialize,
1794 serde::Deserialize,
1795 Debug,
1796 Clone,
1797 PartialEq,
1798 Eq,
1799 jacquard_derive::IntoStatic
1800)]
1801#[serde(rename_all = "camelCase")]
1802pub struct ListViewBasic<'a> {
1803 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1804 #[serde(borrow)]
1805 pub avatar: Option<jacquard_common::types::string::Uri<'a>>,
1806 #[serde(borrow)]
1807 pub cid: jacquard_common::types::string::Cid<'a>,
1808 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1809 pub indexed_at: Option<jacquard_common::types::string::Datetime>,
1810 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1811 #[serde(borrow)]
1812 pub labels: Option<Vec<crate::com_atproto::label::Label<'a>>>,
1813 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1814 pub list_item_count: Option<i64>,
1815 #[serde(borrow)]
1816 pub name: jacquard_common::CowStr<'a>,
1817 #[serde(borrow)]
1818 pub purpose: crate::app_bsky::graph::ListPurpose<'a>,
1819 #[serde(borrow)]
1820 pub uri: jacquard_common::types::string::AtUri<'a>,
1821 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1822 #[serde(borrow)]
1823 pub viewer: Option<crate::app_bsky::graph::ListViewerState<'a>>,
1824}
1825
1826pub mod list_view_basic_state {
1827
1828 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1829 #[allow(unused)]
1830 use ::core::marker::PhantomData;
1831 mod sealed {
1832 pub trait Sealed {}
1833 }
1834 pub trait State: sealed::Sealed {
1836 type Uri;
1837 type Cid;
1838 type Name;
1839 type Purpose;
1840 }
1841 pub struct Empty(());
1843 impl sealed::Sealed for Empty {}
1844 impl State for Empty {
1845 type Uri = Unset;
1846 type Cid = Unset;
1847 type Name = Unset;
1848 type Purpose = Unset;
1849 }
1850 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
1852 impl<S: State> sealed::Sealed for SetUri<S> {}
1853 impl<S: State> State for SetUri<S> {
1854 type Uri = Set<members::uri>;
1855 type Cid = S::Cid;
1856 type Name = S::Name;
1857 type Purpose = S::Purpose;
1858 }
1859 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
1861 impl<S: State> sealed::Sealed for SetCid<S> {}
1862 impl<S: State> State for SetCid<S> {
1863 type Uri = S::Uri;
1864 type Cid = Set<members::cid>;
1865 type Name = S::Name;
1866 type Purpose = S::Purpose;
1867 }
1868 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
1870 impl<S: State> sealed::Sealed for SetName<S> {}
1871 impl<S: State> State for SetName<S> {
1872 type Uri = S::Uri;
1873 type Cid = S::Cid;
1874 type Name = Set<members::name>;
1875 type Purpose = S::Purpose;
1876 }
1877 pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
1879 impl<S: State> sealed::Sealed for SetPurpose<S> {}
1880 impl<S: State> State for SetPurpose<S> {
1881 type Uri = S::Uri;
1882 type Cid = S::Cid;
1883 type Name = S::Name;
1884 type Purpose = Set<members::purpose>;
1885 }
1886 #[allow(non_camel_case_types)]
1888 pub mod members {
1889 pub struct uri(());
1891 pub struct cid(());
1893 pub struct name(());
1895 pub struct purpose(());
1897 }
1898}
1899
1900pub struct ListViewBasicBuilder<'a, S: list_view_basic_state::State> {
1902 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
1903 __unsafe_private_named: (
1904 ::core::option::Option<jacquard_common::types::string::Uri<'a>>,
1905 ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
1906 ::core::option::Option<jacquard_common::types::string::Datetime>,
1907 ::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
1908 ::core::option::Option<i64>,
1909 ::core::option::Option<jacquard_common::CowStr<'a>>,
1910 ::core::option::Option<crate::app_bsky::graph::ListPurpose<'a>>,
1911 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
1912 ::core::option::Option<crate::app_bsky::graph::ListViewerState<'a>>,
1913 ),
1914 _phantom: ::core::marker::PhantomData<&'a ()>,
1915}
1916
1917impl<'a> ListViewBasic<'a> {
1918 pub fn new() -> ListViewBasicBuilder<'a, list_view_basic_state::Empty> {
1920 ListViewBasicBuilder::new()
1921 }
1922}
1923
1924impl<'a> ListViewBasicBuilder<'a, list_view_basic_state::Empty> {
1925 pub fn new() -> Self {
1927 ListViewBasicBuilder {
1928 _phantom_state: ::core::marker::PhantomData,
1929 __unsafe_private_named: (
1930 None,
1931 None,
1932 None,
1933 None,
1934 None,
1935 None,
1936 None,
1937 None,
1938 None,
1939 ),
1940 _phantom: ::core::marker::PhantomData,
1941 }
1942 }
1943}
1944
1945impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
1946 pub fn avatar(
1948 mut self,
1949 value: impl Into<Option<jacquard_common::types::string::Uri<'a>>>,
1950 ) -> Self {
1951 self.__unsafe_private_named.0 = value.into();
1952 self
1953 }
1954 pub fn maybe_avatar(
1956 mut self,
1957 value: Option<jacquard_common::types::string::Uri<'a>>,
1958 ) -> Self {
1959 self.__unsafe_private_named.0 = value;
1960 self
1961 }
1962}
1963
1964impl<'a, S> ListViewBasicBuilder<'a, S>
1965where
1966 S: list_view_basic_state::State,
1967 S::Cid: list_view_basic_state::IsUnset,
1968{
1969 pub fn cid(
1971 mut self,
1972 value: impl Into<jacquard_common::types::string::Cid<'a>>,
1973 ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetCid<S>> {
1974 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
1975 ListViewBasicBuilder {
1976 _phantom_state: ::core::marker::PhantomData,
1977 __unsafe_private_named: self.__unsafe_private_named,
1978 _phantom: ::core::marker::PhantomData,
1979 }
1980 }
1981}
1982
1983impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
1984 pub fn indexed_at(
1986 mut self,
1987 value: impl Into<Option<jacquard_common::types::string::Datetime>>,
1988 ) -> Self {
1989 self.__unsafe_private_named.2 = value.into();
1990 self
1991 }
1992 pub fn maybe_indexed_at(
1994 mut self,
1995 value: Option<jacquard_common::types::string::Datetime>,
1996 ) -> Self {
1997 self.__unsafe_private_named.2 = value;
1998 self
1999 }
2000}
2001
2002impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
2003 pub fn labels(
2005 mut self,
2006 value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
2007 ) -> Self {
2008 self.__unsafe_private_named.3 = value.into();
2009 self
2010 }
2011 pub fn maybe_labels(
2013 mut self,
2014 value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
2015 ) -> Self {
2016 self.__unsafe_private_named.3 = value;
2017 self
2018 }
2019}
2020
2021impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
2022 pub fn list_item_count(mut self, value: impl Into<Option<i64>>) -> Self {
2024 self.__unsafe_private_named.4 = value.into();
2025 self
2026 }
2027 pub fn maybe_list_item_count(mut self, value: Option<i64>) -> Self {
2029 self.__unsafe_private_named.4 = value;
2030 self
2031 }
2032}
2033
2034impl<'a, S> ListViewBasicBuilder<'a, S>
2035where
2036 S: list_view_basic_state::State,
2037 S::Name: list_view_basic_state::IsUnset,
2038{
2039 pub fn name(
2041 mut self,
2042 value: impl Into<jacquard_common::CowStr<'a>>,
2043 ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetName<S>> {
2044 self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into());
2045 ListViewBasicBuilder {
2046 _phantom_state: ::core::marker::PhantomData,
2047 __unsafe_private_named: self.__unsafe_private_named,
2048 _phantom: ::core::marker::PhantomData,
2049 }
2050 }
2051}
2052
2053impl<'a, S> ListViewBasicBuilder<'a, S>
2054where
2055 S: list_view_basic_state::State,
2056 S::Purpose: list_view_basic_state::IsUnset,
2057{
2058 pub fn purpose(
2060 mut self,
2061 value: impl Into<crate::app_bsky::graph::ListPurpose<'a>>,
2062 ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetPurpose<S>> {
2063 self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into());
2064 ListViewBasicBuilder {
2065 _phantom_state: ::core::marker::PhantomData,
2066 __unsafe_private_named: self.__unsafe_private_named,
2067 _phantom: ::core::marker::PhantomData,
2068 }
2069 }
2070}
2071
2072impl<'a, S> ListViewBasicBuilder<'a, S>
2073where
2074 S: list_view_basic_state::State,
2075 S::Uri: list_view_basic_state::IsUnset,
2076{
2077 pub fn uri(
2079 mut self,
2080 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
2081 ) -> ListViewBasicBuilder<'a, list_view_basic_state::SetUri<S>> {
2082 self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into());
2083 ListViewBasicBuilder {
2084 _phantom_state: ::core::marker::PhantomData,
2085 __unsafe_private_named: self.__unsafe_private_named,
2086 _phantom: ::core::marker::PhantomData,
2087 }
2088 }
2089}
2090
2091impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> {
2092 pub fn viewer(
2094 mut self,
2095 value: impl Into<Option<crate::app_bsky::graph::ListViewerState<'a>>>,
2096 ) -> Self {
2097 self.__unsafe_private_named.8 = value.into();
2098 self
2099 }
2100 pub fn maybe_viewer(
2102 mut self,
2103 value: Option<crate::app_bsky::graph::ListViewerState<'a>>,
2104 ) -> Self {
2105 self.__unsafe_private_named.8 = value;
2106 self
2107 }
2108}
2109
2110impl<'a, S> ListViewBasicBuilder<'a, S>
2111where
2112 S: list_view_basic_state::State,
2113 S::Uri: list_view_basic_state::IsSet,
2114 S::Cid: list_view_basic_state::IsSet,
2115 S::Name: list_view_basic_state::IsSet,
2116 S::Purpose: list_view_basic_state::IsSet,
2117{
2118 pub fn build(self) -> ListViewBasic<'a> {
2120 ListViewBasic {
2121 avatar: self.__unsafe_private_named.0,
2122 cid: self.__unsafe_private_named.1.unwrap(),
2123 indexed_at: self.__unsafe_private_named.2,
2124 labels: self.__unsafe_private_named.3,
2125 list_item_count: self.__unsafe_private_named.4,
2126 name: self.__unsafe_private_named.5.unwrap(),
2127 purpose: self.__unsafe_private_named.6.unwrap(),
2128 uri: self.__unsafe_private_named.7.unwrap(),
2129 viewer: self.__unsafe_private_named.8,
2130 extra_data: Default::default(),
2131 }
2132 }
2133 pub fn build_with_data(
2135 self,
2136 extra_data: std::collections::BTreeMap<
2137 jacquard_common::smol_str::SmolStr,
2138 jacquard_common::types::value::Data<'a>,
2139 >,
2140 ) -> ListViewBasic<'a> {
2141 ListViewBasic {
2142 avatar: self.__unsafe_private_named.0,
2143 cid: self.__unsafe_private_named.1.unwrap(),
2144 indexed_at: self.__unsafe_private_named.2,
2145 labels: self.__unsafe_private_named.3,
2146 list_item_count: self.__unsafe_private_named.4,
2147 name: self.__unsafe_private_named.5.unwrap(),
2148 purpose: self.__unsafe_private_named.6.unwrap(),
2149 uri: self.__unsafe_private_named.7.unwrap(),
2150 viewer: self.__unsafe_private_named.8,
2151 extra_data: Some(extra_data),
2152 }
2153 }
2154}
2155
2156impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListViewBasic<'a> {
2157 fn nsid() -> &'static str {
2158 "app.bsky.graph.defs"
2159 }
2160 fn def_name() -> &'static str {
2161 "listViewBasic"
2162 }
2163 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
2164 lexicon_doc_app_bsky_graph_defs()
2165 }
2166 fn validate(
2167 &self,
2168 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
2169 if let Some(ref value) = self.list_item_count {
2170 if *value < 0i64 {
2171 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
2172 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
2173 "list_item_count",
2174 ),
2175 min: 0i64,
2176 actual: *value,
2177 });
2178 }
2179 }
2180 {
2181 let value = &self.name;
2182 #[allow(unused_comparisons)]
2183 if <str>::len(value.as_ref()) > 64usize {
2184 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
2185 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
2186 "name",
2187 ),
2188 max: 64usize,
2189 actual: <str>::len(value.as_ref()),
2190 });
2191 }
2192 }
2193 {
2194 let value = &self.name;
2195 #[allow(unused_comparisons)]
2196 if <str>::len(value.as_ref()) < 1usize {
2197 return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
2198 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
2199 "name",
2200 ),
2201 min: 1usize,
2202 actual: <str>::len(value.as_ref()),
2203 });
2204 }
2205 }
2206 Ok(())
2207 }
2208}
2209
2210#[jacquard_derive::lexicon]
2211#[derive(
2212 serde::Serialize,
2213 serde::Deserialize,
2214 Debug,
2215 Clone,
2216 PartialEq,
2217 Eq,
2218 jacquard_derive::IntoStatic,
2219 Default
2220)]
2221#[serde(rename_all = "camelCase")]
2222pub struct ListViewerState<'a> {
2223 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2224 #[serde(borrow)]
2225 pub blocked: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
2226 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2227 pub muted: std::option::Option<bool>,
2228}
2229
2230impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ListViewerState<'a> {
2231 fn nsid() -> &'static str {
2232 "app.bsky.graph.defs"
2233 }
2234 fn def_name() -> &'static str {
2235 "listViewerState"
2236 }
2237 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
2238 lexicon_doc_app_bsky_graph_defs()
2239 }
2240 fn validate(
2241 &self,
2242 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
2243 Ok(())
2244 }
2245}
2246
2247#[derive(
2249 serde::Serialize,
2250 serde::Deserialize,
2251 Debug,
2252 Clone,
2253 PartialEq,
2254 Eq,
2255 Hash,
2256 jacquard_derive::IntoStatic
2257)]
2258pub struct Modlist;
2259impl std::fmt::Display for Modlist {
2260 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2261 write!(f, "modlist")
2262 }
2263}
2264
2265#[jacquard_derive::lexicon]
2267#[derive(
2268 serde::Serialize,
2269 serde::Deserialize,
2270 Debug,
2271 Clone,
2272 PartialEq,
2273 Eq,
2274 jacquard_derive::IntoStatic
2275)]
2276#[serde(rename_all = "camelCase")]
2277pub struct NotFoundActor<'a> {
2278 #[serde(borrow)]
2279 pub actor: jacquard_common::types::ident::AtIdentifier<'a>,
2280 pub not_found: bool,
2281}
2282
2283pub mod not_found_actor_state {
2284
2285 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2286 #[allow(unused)]
2287 use ::core::marker::PhantomData;
2288 mod sealed {
2289 pub trait Sealed {}
2290 }
2291 pub trait State: sealed::Sealed {
2293 type Actor;
2294 type NotFound;
2295 }
2296 pub struct Empty(());
2298 impl sealed::Sealed for Empty {}
2299 impl State for Empty {
2300 type Actor = Unset;
2301 type NotFound = Unset;
2302 }
2303 pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
2305 impl<S: State> sealed::Sealed for SetActor<S> {}
2306 impl<S: State> State for SetActor<S> {
2307 type Actor = Set<members::actor>;
2308 type NotFound = S::NotFound;
2309 }
2310 pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
2312 impl<S: State> sealed::Sealed for SetNotFound<S> {}
2313 impl<S: State> State for SetNotFound<S> {
2314 type Actor = S::Actor;
2315 type NotFound = Set<members::not_found>;
2316 }
2317 #[allow(non_camel_case_types)]
2319 pub mod members {
2320 pub struct actor(());
2322 pub struct not_found(());
2324 }
2325}
2326
2327pub struct NotFoundActorBuilder<'a, S: not_found_actor_state::State> {
2329 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
2330 __unsafe_private_named: (
2331 ::core::option::Option<jacquard_common::types::ident::AtIdentifier<'a>>,
2332 ::core::option::Option<bool>,
2333 ),
2334 _phantom: ::core::marker::PhantomData<&'a ()>,
2335}
2336
2337impl<'a> NotFoundActor<'a> {
2338 pub fn new() -> NotFoundActorBuilder<'a, not_found_actor_state::Empty> {
2340 NotFoundActorBuilder::new()
2341 }
2342}
2343
2344impl<'a> NotFoundActorBuilder<'a, not_found_actor_state::Empty> {
2345 pub fn new() -> Self {
2347 NotFoundActorBuilder {
2348 _phantom_state: ::core::marker::PhantomData,
2349 __unsafe_private_named: (None, None),
2350 _phantom: ::core::marker::PhantomData,
2351 }
2352 }
2353}
2354
2355impl<'a, S> NotFoundActorBuilder<'a, S>
2356where
2357 S: not_found_actor_state::State,
2358 S::Actor: not_found_actor_state::IsUnset,
2359{
2360 pub fn actor(
2362 mut self,
2363 value: impl Into<jacquard_common::types::ident::AtIdentifier<'a>>,
2364 ) -> NotFoundActorBuilder<'a, not_found_actor_state::SetActor<S>> {
2365 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
2366 NotFoundActorBuilder {
2367 _phantom_state: ::core::marker::PhantomData,
2368 __unsafe_private_named: self.__unsafe_private_named,
2369 _phantom: ::core::marker::PhantomData,
2370 }
2371 }
2372}
2373
2374impl<'a, S> NotFoundActorBuilder<'a, S>
2375where
2376 S: not_found_actor_state::State,
2377 S::NotFound: not_found_actor_state::IsUnset,
2378{
2379 pub fn not_found(
2381 mut self,
2382 value: impl Into<bool>,
2383 ) -> NotFoundActorBuilder<'a, not_found_actor_state::SetNotFound<S>> {
2384 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
2385 NotFoundActorBuilder {
2386 _phantom_state: ::core::marker::PhantomData,
2387 __unsafe_private_named: self.__unsafe_private_named,
2388 _phantom: ::core::marker::PhantomData,
2389 }
2390 }
2391}
2392
2393impl<'a, S> NotFoundActorBuilder<'a, S>
2394where
2395 S: not_found_actor_state::State,
2396 S::Actor: not_found_actor_state::IsSet,
2397 S::NotFound: not_found_actor_state::IsSet,
2398{
2399 pub fn build(self) -> NotFoundActor<'a> {
2401 NotFoundActor {
2402 actor: self.__unsafe_private_named.0.unwrap(),
2403 not_found: self.__unsafe_private_named.1.unwrap(),
2404 extra_data: Default::default(),
2405 }
2406 }
2407 pub fn build_with_data(
2409 self,
2410 extra_data: std::collections::BTreeMap<
2411 jacquard_common::smol_str::SmolStr,
2412 jacquard_common::types::value::Data<'a>,
2413 >,
2414 ) -> NotFoundActor<'a> {
2415 NotFoundActor {
2416 actor: self.__unsafe_private_named.0.unwrap(),
2417 not_found: self.__unsafe_private_named.1.unwrap(),
2418 extra_data: Some(extra_data),
2419 }
2420 }
2421}
2422
2423impl<'a> ::jacquard_lexicon::schema::LexiconSchema for NotFoundActor<'a> {
2424 fn nsid() -> &'static str {
2425 "app.bsky.graph.defs"
2426 }
2427 fn def_name() -> &'static str {
2428 "notFoundActor"
2429 }
2430 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
2431 lexicon_doc_app_bsky_graph_defs()
2432 }
2433 fn validate(
2434 &self,
2435 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
2436 Ok(())
2437 }
2438}
2439
2440#[derive(
2442 serde::Serialize,
2443 serde::Deserialize,
2444 Debug,
2445 Clone,
2446 PartialEq,
2447 Eq,
2448 Hash,
2449 jacquard_derive::IntoStatic
2450)]
2451pub struct Referencelist;
2452impl std::fmt::Display for Referencelist {
2453 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2454 write!(f, "referencelist")
2455 }
2456}
2457
2458#[jacquard_derive::lexicon]
2460#[derive(
2461 serde::Serialize,
2462 serde::Deserialize,
2463 Debug,
2464 Clone,
2465 PartialEq,
2466 Eq,
2467 jacquard_derive::IntoStatic
2468)]
2469#[serde(rename_all = "camelCase")]
2470pub struct Relationship<'a> {
2471 #[serde(borrow)]
2472 pub did: jacquard_common::types::string::Did<'a>,
2473 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2475 #[serde(borrow)]
2476 pub followed_by: Option<jacquard_common::types::string::AtUri<'a>>,
2477 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2479 #[serde(borrow)]
2480 pub following: Option<jacquard_common::types::string::AtUri<'a>>,
2481}
2482
2483pub mod relationship_state {
2484
2485 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2486 #[allow(unused)]
2487 use ::core::marker::PhantomData;
2488 mod sealed {
2489 pub trait Sealed {}
2490 }
2491 pub trait State: sealed::Sealed {
2493 type Did;
2494 }
2495 pub struct Empty(());
2497 impl sealed::Sealed for Empty {}
2498 impl State for Empty {
2499 type Did = Unset;
2500 }
2501 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
2503 impl<S: State> sealed::Sealed for SetDid<S> {}
2504 impl<S: State> State for SetDid<S> {
2505 type Did = Set<members::did>;
2506 }
2507 #[allow(non_camel_case_types)]
2509 pub mod members {
2510 pub struct did(());
2512 }
2513}
2514
2515pub struct RelationshipBuilder<'a, S: relationship_state::State> {
2517 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
2518 __unsafe_private_named: (
2519 ::core::option::Option<jacquard_common::types::string::Did<'a>>,
2520 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2521 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2522 ),
2523 _phantom: ::core::marker::PhantomData<&'a ()>,
2524}
2525
2526impl<'a> Relationship<'a> {
2527 pub fn new() -> RelationshipBuilder<'a, relationship_state::Empty> {
2529 RelationshipBuilder::new()
2530 }
2531}
2532
2533impl<'a> RelationshipBuilder<'a, relationship_state::Empty> {
2534 pub fn new() -> Self {
2536 RelationshipBuilder {
2537 _phantom_state: ::core::marker::PhantomData,
2538 __unsafe_private_named: (None, None, None),
2539 _phantom: ::core::marker::PhantomData,
2540 }
2541 }
2542}
2543
2544impl<'a, S> RelationshipBuilder<'a, S>
2545where
2546 S: relationship_state::State,
2547 S::Did: relationship_state::IsUnset,
2548{
2549 pub fn did(
2551 mut self,
2552 value: impl Into<jacquard_common::types::string::Did<'a>>,
2553 ) -> RelationshipBuilder<'a, relationship_state::SetDid<S>> {
2554 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
2555 RelationshipBuilder {
2556 _phantom_state: ::core::marker::PhantomData,
2557 __unsafe_private_named: self.__unsafe_private_named,
2558 _phantom: ::core::marker::PhantomData,
2559 }
2560 }
2561}
2562
2563impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> {
2564 pub fn followed_by(
2566 mut self,
2567 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
2568 ) -> Self {
2569 self.__unsafe_private_named.1 = value.into();
2570 self
2571 }
2572 pub fn maybe_followed_by(
2574 mut self,
2575 value: Option<jacquard_common::types::string::AtUri<'a>>,
2576 ) -> Self {
2577 self.__unsafe_private_named.1 = value;
2578 self
2579 }
2580}
2581
2582impl<'a, S: relationship_state::State> RelationshipBuilder<'a, S> {
2583 pub fn following(
2585 mut self,
2586 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
2587 ) -> Self {
2588 self.__unsafe_private_named.2 = value.into();
2589 self
2590 }
2591 pub fn maybe_following(
2593 mut self,
2594 value: Option<jacquard_common::types::string::AtUri<'a>>,
2595 ) -> Self {
2596 self.__unsafe_private_named.2 = value;
2597 self
2598 }
2599}
2600
2601impl<'a, S> RelationshipBuilder<'a, S>
2602where
2603 S: relationship_state::State,
2604 S::Did: relationship_state::IsSet,
2605{
2606 pub fn build(self) -> Relationship<'a> {
2608 Relationship {
2609 did: self.__unsafe_private_named.0.unwrap(),
2610 followed_by: self.__unsafe_private_named.1,
2611 following: self.__unsafe_private_named.2,
2612 extra_data: Default::default(),
2613 }
2614 }
2615 pub fn build_with_data(
2617 self,
2618 extra_data: std::collections::BTreeMap<
2619 jacquard_common::smol_str::SmolStr,
2620 jacquard_common::types::value::Data<'a>,
2621 >,
2622 ) -> Relationship<'a> {
2623 Relationship {
2624 did: self.__unsafe_private_named.0.unwrap(),
2625 followed_by: self.__unsafe_private_named.1,
2626 following: self.__unsafe_private_named.2,
2627 extra_data: Some(extra_data),
2628 }
2629 }
2630}
2631
2632impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Relationship<'a> {
2633 fn nsid() -> &'static str {
2634 "app.bsky.graph.defs"
2635 }
2636 fn def_name() -> &'static str {
2637 "relationship"
2638 }
2639 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
2640 lexicon_doc_app_bsky_graph_defs()
2641 }
2642 fn validate(
2643 &self,
2644 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
2645 Ok(())
2646 }
2647}
2648
2649#[jacquard_derive::lexicon]
2650#[derive(
2651 serde::Serialize,
2652 serde::Deserialize,
2653 Debug,
2654 Clone,
2655 PartialEq,
2656 Eq,
2657 jacquard_derive::IntoStatic
2658)]
2659#[serde(rename_all = "camelCase")]
2660pub struct StarterPackView<'a> {
2661 #[serde(borrow)]
2662 pub cid: jacquard_common::types::string::Cid<'a>,
2663 #[serde(borrow)]
2664 pub creator: crate::app_bsky::actor::ProfileViewBasic<'a>,
2665 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2666 #[serde(borrow)]
2667 pub feeds: Option<Vec<crate::app_bsky::feed::GeneratorView<'a>>>,
2668 pub indexed_at: jacquard_common::types::string::Datetime,
2669 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2670 pub joined_all_time_count: Option<i64>,
2671 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2672 pub joined_week_count: Option<i64>,
2673 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2674 #[serde(borrow)]
2675 pub labels: Option<Vec<crate::com_atproto::label::Label<'a>>>,
2676 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2677 #[serde(borrow)]
2678 pub list: Option<crate::app_bsky::graph::ListViewBasic<'a>>,
2679 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2680 #[serde(borrow)]
2681 pub list_items_sample: Option<Vec<crate::app_bsky::graph::ListItemView<'a>>>,
2682 #[serde(borrow)]
2683 pub record: jacquard_common::types::value::Data<'a>,
2684 #[serde(borrow)]
2685 pub uri: jacquard_common::types::string::AtUri<'a>,
2686}
2687
2688pub mod starter_pack_view_state {
2689
2690 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2691 #[allow(unused)]
2692 use ::core::marker::PhantomData;
2693 mod sealed {
2694 pub trait Sealed {}
2695 }
2696 pub trait State: sealed::Sealed {
2698 type Uri;
2699 type Cid;
2700 type Record;
2701 type Creator;
2702 type IndexedAt;
2703 }
2704 pub struct Empty(());
2706 impl sealed::Sealed for Empty {}
2707 impl State for Empty {
2708 type Uri = Unset;
2709 type Cid = Unset;
2710 type Record = Unset;
2711 type Creator = Unset;
2712 type IndexedAt = Unset;
2713 }
2714 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
2716 impl<S: State> sealed::Sealed for SetUri<S> {}
2717 impl<S: State> State for SetUri<S> {
2718 type Uri = Set<members::uri>;
2719 type Cid = S::Cid;
2720 type Record = S::Record;
2721 type Creator = S::Creator;
2722 type IndexedAt = S::IndexedAt;
2723 }
2724 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
2726 impl<S: State> sealed::Sealed for SetCid<S> {}
2727 impl<S: State> State for SetCid<S> {
2728 type Uri = S::Uri;
2729 type Cid = Set<members::cid>;
2730 type Record = S::Record;
2731 type Creator = S::Creator;
2732 type IndexedAt = S::IndexedAt;
2733 }
2734 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
2736 impl<S: State> sealed::Sealed for SetRecord<S> {}
2737 impl<S: State> State for SetRecord<S> {
2738 type Uri = S::Uri;
2739 type Cid = S::Cid;
2740 type Record = Set<members::record>;
2741 type Creator = S::Creator;
2742 type IndexedAt = S::IndexedAt;
2743 }
2744 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
2746 impl<S: State> sealed::Sealed for SetCreator<S> {}
2747 impl<S: State> State for SetCreator<S> {
2748 type Uri = S::Uri;
2749 type Cid = S::Cid;
2750 type Record = S::Record;
2751 type Creator = Set<members::creator>;
2752 type IndexedAt = S::IndexedAt;
2753 }
2754 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
2756 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
2757 impl<S: State> State for SetIndexedAt<S> {
2758 type Uri = S::Uri;
2759 type Cid = S::Cid;
2760 type Record = S::Record;
2761 type Creator = S::Creator;
2762 type IndexedAt = Set<members::indexed_at>;
2763 }
2764 #[allow(non_camel_case_types)]
2766 pub mod members {
2767 pub struct uri(());
2769 pub struct cid(());
2771 pub struct record(());
2773 pub struct creator(());
2775 pub struct indexed_at(());
2777 }
2778}
2779
2780pub struct StarterPackViewBuilder<'a, S: starter_pack_view_state::State> {
2782 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
2783 __unsafe_private_named: (
2784 ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
2785 ::core::option::Option<crate::app_bsky::actor::ProfileViewBasic<'a>>,
2786 ::core::option::Option<Vec<crate::app_bsky::feed::GeneratorView<'a>>>,
2787 ::core::option::Option<jacquard_common::types::string::Datetime>,
2788 ::core::option::Option<i64>,
2789 ::core::option::Option<i64>,
2790 ::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
2791 ::core::option::Option<crate::app_bsky::graph::ListViewBasic<'a>>,
2792 ::core::option::Option<Vec<crate::app_bsky::graph::ListItemView<'a>>>,
2793 ::core::option::Option<jacquard_common::types::value::Data<'a>>,
2794 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
2795 ),
2796 _phantom: ::core::marker::PhantomData<&'a ()>,
2797}
2798
2799impl<'a> StarterPackView<'a> {
2800 pub fn new() -> StarterPackViewBuilder<'a, starter_pack_view_state::Empty> {
2802 StarterPackViewBuilder::new()
2803 }
2804}
2805
2806impl<'a> StarterPackViewBuilder<'a, starter_pack_view_state::Empty> {
2807 pub fn new() -> Self {
2809 StarterPackViewBuilder {
2810 _phantom_state: ::core::marker::PhantomData,
2811 __unsafe_private_named: (
2812 None,
2813 None,
2814 None,
2815 None,
2816 None,
2817 None,
2818 None,
2819 None,
2820 None,
2821 None,
2822 None,
2823 ),
2824 _phantom: ::core::marker::PhantomData,
2825 }
2826 }
2827}
2828
2829impl<'a, S> StarterPackViewBuilder<'a, S>
2830where
2831 S: starter_pack_view_state::State,
2832 S::Cid: starter_pack_view_state::IsUnset,
2833{
2834 pub fn cid(
2836 mut self,
2837 value: impl Into<jacquard_common::types::string::Cid<'a>>,
2838 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetCid<S>> {
2839 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
2840 StarterPackViewBuilder {
2841 _phantom_state: ::core::marker::PhantomData,
2842 __unsafe_private_named: self.__unsafe_private_named,
2843 _phantom: ::core::marker::PhantomData,
2844 }
2845 }
2846}
2847
2848impl<'a, S> StarterPackViewBuilder<'a, S>
2849where
2850 S: starter_pack_view_state::State,
2851 S::Creator: starter_pack_view_state::IsUnset,
2852{
2853 pub fn creator(
2855 mut self,
2856 value: impl Into<crate::app_bsky::actor::ProfileViewBasic<'a>>,
2857 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetCreator<S>> {
2858 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
2859 StarterPackViewBuilder {
2860 _phantom_state: ::core::marker::PhantomData,
2861 __unsafe_private_named: self.__unsafe_private_named,
2862 _phantom: ::core::marker::PhantomData,
2863 }
2864 }
2865}
2866
2867impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
2868 pub fn feeds(
2870 mut self,
2871 value: impl Into<Option<Vec<crate::app_bsky::feed::GeneratorView<'a>>>>,
2872 ) -> Self {
2873 self.__unsafe_private_named.2 = value.into();
2874 self
2875 }
2876 pub fn maybe_feeds(
2878 mut self,
2879 value: Option<Vec<crate::app_bsky::feed::GeneratorView<'a>>>,
2880 ) -> Self {
2881 self.__unsafe_private_named.2 = value;
2882 self
2883 }
2884}
2885
2886impl<'a, S> StarterPackViewBuilder<'a, S>
2887where
2888 S: starter_pack_view_state::State,
2889 S::IndexedAt: starter_pack_view_state::IsUnset,
2890{
2891 pub fn indexed_at(
2893 mut self,
2894 value: impl Into<jacquard_common::types::string::Datetime>,
2895 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetIndexedAt<S>> {
2896 self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
2897 StarterPackViewBuilder {
2898 _phantom_state: ::core::marker::PhantomData,
2899 __unsafe_private_named: self.__unsafe_private_named,
2900 _phantom: ::core::marker::PhantomData,
2901 }
2902 }
2903}
2904
2905impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
2906 pub fn joined_all_time_count(mut self, value: impl Into<Option<i64>>) -> Self {
2908 self.__unsafe_private_named.4 = value.into();
2909 self
2910 }
2911 pub fn maybe_joined_all_time_count(mut self, value: Option<i64>) -> Self {
2913 self.__unsafe_private_named.4 = value;
2914 self
2915 }
2916}
2917
2918impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
2919 pub fn joined_week_count(mut self, value: impl Into<Option<i64>>) -> Self {
2921 self.__unsafe_private_named.5 = value.into();
2922 self
2923 }
2924 pub fn maybe_joined_week_count(mut self, value: Option<i64>) -> Self {
2926 self.__unsafe_private_named.5 = value;
2927 self
2928 }
2929}
2930
2931impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
2932 pub fn labels(
2934 mut self,
2935 value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
2936 ) -> Self {
2937 self.__unsafe_private_named.6 = value.into();
2938 self
2939 }
2940 pub fn maybe_labels(
2942 mut self,
2943 value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
2944 ) -> Self {
2945 self.__unsafe_private_named.6 = value;
2946 self
2947 }
2948}
2949
2950impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
2951 pub fn list(
2953 mut self,
2954 value: impl Into<Option<crate::app_bsky::graph::ListViewBasic<'a>>>,
2955 ) -> Self {
2956 self.__unsafe_private_named.7 = value.into();
2957 self
2958 }
2959 pub fn maybe_list(
2961 mut self,
2962 value: Option<crate::app_bsky::graph::ListViewBasic<'a>>,
2963 ) -> Self {
2964 self.__unsafe_private_named.7 = value;
2965 self
2966 }
2967}
2968
2969impl<'a, S: starter_pack_view_state::State> StarterPackViewBuilder<'a, S> {
2970 pub fn list_items_sample(
2972 mut self,
2973 value: impl Into<Option<Vec<crate::app_bsky::graph::ListItemView<'a>>>>,
2974 ) -> Self {
2975 self.__unsafe_private_named.8 = value.into();
2976 self
2977 }
2978 pub fn maybe_list_items_sample(
2980 mut self,
2981 value: Option<Vec<crate::app_bsky::graph::ListItemView<'a>>>,
2982 ) -> Self {
2983 self.__unsafe_private_named.8 = value;
2984 self
2985 }
2986}
2987
2988impl<'a, S> StarterPackViewBuilder<'a, S>
2989where
2990 S: starter_pack_view_state::State,
2991 S::Record: starter_pack_view_state::IsUnset,
2992{
2993 pub fn record(
2995 mut self,
2996 value: impl Into<jacquard_common::types::value::Data<'a>>,
2997 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetRecord<S>> {
2998 self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
2999 StarterPackViewBuilder {
3000 _phantom_state: ::core::marker::PhantomData,
3001 __unsafe_private_named: self.__unsafe_private_named,
3002 _phantom: ::core::marker::PhantomData,
3003 }
3004 }
3005}
3006
3007impl<'a, S> StarterPackViewBuilder<'a, S>
3008where
3009 S: starter_pack_view_state::State,
3010 S::Uri: starter_pack_view_state::IsUnset,
3011{
3012 pub fn uri(
3014 mut self,
3015 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
3016 ) -> StarterPackViewBuilder<'a, starter_pack_view_state::SetUri<S>> {
3017 self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into());
3018 StarterPackViewBuilder {
3019 _phantom_state: ::core::marker::PhantomData,
3020 __unsafe_private_named: self.__unsafe_private_named,
3021 _phantom: ::core::marker::PhantomData,
3022 }
3023 }
3024}
3025
3026impl<'a, S> StarterPackViewBuilder<'a, S>
3027where
3028 S: starter_pack_view_state::State,
3029 S::Uri: starter_pack_view_state::IsSet,
3030 S::Cid: starter_pack_view_state::IsSet,
3031 S::Record: starter_pack_view_state::IsSet,
3032 S::Creator: starter_pack_view_state::IsSet,
3033 S::IndexedAt: starter_pack_view_state::IsSet,
3034{
3035 pub fn build(self) -> StarterPackView<'a> {
3037 StarterPackView {
3038 cid: self.__unsafe_private_named.0.unwrap(),
3039 creator: self.__unsafe_private_named.1.unwrap(),
3040 feeds: self.__unsafe_private_named.2,
3041 indexed_at: self.__unsafe_private_named.3.unwrap(),
3042 joined_all_time_count: self.__unsafe_private_named.4,
3043 joined_week_count: self.__unsafe_private_named.5,
3044 labels: self.__unsafe_private_named.6,
3045 list: self.__unsafe_private_named.7,
3046 list_items_sample: self.__unsafe_private_named.8,
3047 record: self.__unsafe_private_named.9.unwrap(),
3048 uri: self.__unsafe_private_named.10.unwrap(),
3049 extra_data: Default::default(),
3050 }
3051 }
3052 pub fn build_with_data(
3054 self,
3055 extra_data: std::collections::BTreeMap<
3056 jacquard_common::smol_str::SmolStr,
3057 jacquard_common::types::value::Data<'a>,
3058 >,
3059 ) -> StarterPackView<'a> {
3060 StarterPackView {
3061 cid: self.__unsafe_private_named.0.unwrap(),
3062 creator: self.__unsafe_private_named.1.unwrap(),
3063 feeds: self.__unsafe_private_named.2,
3064 indexed_at: self.__unsafe_private_named.3.unwrap(),
3065 joined_all_time_count: self.__unsafe_private_named.4,
3066 joined_week_count: self.__unsafe_private_named.5,
3067 labels: self.__unsafe_private_named.6,
3068 list: self.__unsafe_private_named.7,
3069 list_items_sample: self.__unsafe_private_named.8,
3070 record: self.__unsafe_private_named.9.unwrap(),
3071 uri: self.__unsafe_private_named.10.unwrap(),
3072 extra_data: Some(extra_data),
3073 }
3074 }
3075}
3076
3077impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StarterPackView<'a> {
3078 fn nsid() -> &'static str {
3079 "app.bsky.graph.defs"
3080 }
3081 fn def_name() -> &'static str {
3082 "starterPackView"
3083 }
3084 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
3085 lexicon_doc_app_bsky_graph_defs()
3086 }
3087 fn validate(
3088 &self,
3089 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
3090 if let Some(ref value) = self.feeds {
3091 #[allow(unused_comparisons)]
3092 if value.len() > 3usize {
3093 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
3094 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3095 "feeds",
3096 ),
3097 max: 3usize,
3098 actual: value.len(),
3099 });
3100 }
3101 }
3102 if let Some(ref value) = self.joined_all_time_count {
3103 if *value < 0i64 {
3104 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3105 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3106 "joined_all_time_count",
3107 ),
3108 min: 0i64,
3109 actual: *value,
3110 });
3111 }
3112 }
3113 if let Some(ref value) = self.joined_week_count {
3114 if *value < 0i64 {
3115 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3116 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3117 "joined_week_count",
3118 ),
3119 min: 0i64,
3120 actual: *value,
3121 });
3122 }
3123 }
3124 if let Some(ref value) = self.list_items_sample {
3125 #[allow(unused_comparisons)]
3126 if value.len() > 12usize {
3127 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
3128 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3129 "list_items_sample",
3130 ),
3131 max: 12usize,
3132 actual: value.len(),
3133 });
3134 }
3135 }
3136 Ok(())
3137 }
3138}
3139
3140#[jacquard_derive::lexicon]
3141#[derive(
3142 serde::Serialize,
3143 serde::Deserialize,
3144 Debug,
3145 Clone,
3146 PartialEq,
3147 Eq,
3148 jacquard_derive::IntoStatic
3149)]
3150#[serde(rename_all = "camelCase")]
3151pub struct StarterPackViewBasic<'a> {
3152 #[serde(borrow)]
3153 pub cid: jacquard_common::types::string::Cid<'a>,
3154 #[serde(borrow)]
3155 pub creator: crate::app_bsky::actor::ProfileViewBasic<'a>,
3156 pub indexed_at: jacquard_common::types::string::Datetime,
3157 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3158 pub joined_all_time_count: Option<i64>,
3159 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3160 pub joined_week_count: Option<i64>,
3161 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3162 #[serde(borrow)]
3163 pub labels: Option<Vec<crate::com_atproto::label::Label<'a>>>,
3164 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3165 pub list_item_count: Option<i64>,
3166 #[serde(borrow)]
3167 pub record: jacquard_common::types::value::Data<'a>,
3168 #[serde(borrow)]
3169 pub uri: jacquard_common::types::string::AtUri<'a>,
3170}
3171
3172pub mod starter_pack_view_basic_state {
3173
3174 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
3175 #[allow(unused)]
3176 use ::core::marker::PhantomData;
3177 mod sealed {
3178 pub trait Sealed {}
3179 }
3180 pub trait State: sealed::Sealed {
3182 type Uri;
3183 type Cid;
3184 type Record;
3185 type Creator;
3186 type IndexedAt;
3187 }
3188 pub struct Empty(());
3190 impl sealed::Sealed for Empty {}
3191 impl State for Empty {
3192 type Uri = Unset;
3193 type Cid = Unset;
3194 type Record = Unset;
3195 type Creator = Unset;
3196 type IndexedAt = Unset;
3197 }
3198 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
3200 impl<S: State> sealed::Sealed for SetUri<S> {}
3201 impl<S: State> State for SetUri<S> {
3202 type Uri = Set<members::uri>;
3203 type Cid = S::Cid;
3204 type Record = S::Record;
3205 type Creator = S::Creator;
3206 type IndexedAt = S::IndexedAt;
3207 }
3208 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
3210 impl<S: State> sealed::Sealed for SetCid<S> {}
3211 impl<S: State> State for SetCid<S> {
3212 type Uri = S::Uri;
3213 type Cid = Set<members::cid>;
3214 type Record = S::Record;
3215 type Creator = S::Creator;
3216 type IndexedAt = S::IndexedAt;
3217 }
3218 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
3220 impl<S: State> sealed::Sealed for SetRecord<S> {}
3221 impl<S: State> State for SetRecord<S> {
3222 type Uri = S::Uri;
3223 type Cid = S::Cid;
3224 type Record = Set<members::record>;
3225 type Creator = S::Creator;
3226 type IndexedAt = S::IndexedAt;
3227 }
3228 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
3230 impl<S: State> sealed::Sealed for SetCreator<S> {}
3231 impl<S: State> State for SetCreator<S> {
3232 type Uri = S::Uri;
3233 type Cid = S::Cid;
3234 type Record = S::Record;
3235 type Creator = Set<members::creator>;
3236 type IndexedAt = S::IndexedAt;
3237 }
3238 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
3240 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
3241 impl<S: State> State for SetIndexedAt<S> {
3242 type Uri = S::Uri;
3243 type Cid = S::Cid;
3244 type Record = S::Record;
3245 type Creator = S::Creator;
3246 type IndexedAt = Set<members::indexed_at>;
3247 }
3248 #[allow(non_camel_case_types)]
3250 pub mod members {
3251 pub struct uri(());
3253 pub struct cid(());
3255 pub struct record(());
3257 pub struct creator(());
3259 pub struct indexed_at(());
3261 }
3262}
3263
3264pub struct StarterPackViewBasicBuilder<'a, S: starter_pack_view_basic_state::State> {
3266 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
3267 __unsafe_private_named: (
3268 ::core::option::Option<jacquard_common::types::string::Cid<'a>>,
3269 ::core::option::Option<crate::app_bsky::actor::ProfileViewBasic<'a>>,
3270 ::core::option::Option<jacquard_common::types::string::Datetime>,
3271 ::core::option::Option<i64>,
3272 ::core::option::Option<i64>,
3273 ::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
3274 ::core::option::Option<i64>,
3275 ::core::option::Option<jacquard_common::types::value::Data<'a>>,
3276 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
3277 ),
3278 _phantom: ::core::marker::PhantomData<&'a ()>,
3279}
3280
3281impl<'a> StarterPackViewBasic<'a> {
3282 pub fn new() -> StarterPackViewBasicBuilder<
3284 'a,
3285 starter_pack_view_basic_state::Empty,
3286 > {
3287 StarterPackViewBasicBuilder::new()
3288 }
3289}
3290
3291impl<'a> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::Empty> {
3292 pub fn new() -> Self {
3294 StarterPackViewBasicBuilder {
3295 _phantom_state: ::core::marker::PhantomData,
3296 __unsafe_private_named: (
3297 None,
3298 None,
3299 None,
3300 None,
3301 None,
3302 None,
3303 None,
3304 None,
3305 None,
3306 ),
3307 _phantom: ::core::marker::PhantomData,
3308 }
3309 }
3310}
3311
3312impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3313where
3314 S: starter_pack_view_basic_state::State,
3315 S::Cid: starter_pack_view_basic_state::IsUnset,
3316{
3317 pub fn cid(
3319 mut self,
3320 value: impl Into<jacquard_common::types::string::Cid<'a>>,
3321 ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetCid<S>> {
3322 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
3323 StarterPackViewBasicBuilder {
3324 _phantom_state: ::core::marker::PhantomData,
3325 __unsafe_private_named: self.__unsafe_private_named,
3326 _phantom: ::core::marker::PhantomData,
3327 }
3328 }
3329}
3330
3331impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3332where
3333 S: starter_pack_view_basic_state::State,
3334 S::Creator: starter_pack_view_basic_state::IsUnset,
3335{
3336 pub fn creator(
3338 mut self,
3339 value: impl Into<crate::app_bsky::actor::ProfileViewBasic<'a>>,
3340 ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetCreator<S>> {
3341 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
3342 StarterPackViewBasicBuilder {
3343 _phantom_state: ::core::marker::PhantomData,
3344 __unsafe_private_named: self.__unsafe_private_named,
3345 _phantom: ::core::marker::PhantomData,
3346 }
3347 }
3348}
3349
3350impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3351where
3352 S: starter_pack_view_basic_state::State,
3353 S::IndexedAt: starter_pack_view_basic_state::IsUnset,
3354{
3355 pub fn indexed_at(
3357 mut self,
3358 value: impl Into<jacquard_common::types::string::Datetime>,
3359 ) -> StarterPackViewBasicBuilder<
3360 'a,
3361 starter_pack_view_basic_state::SetIndexedAt<S>,
3362 > {
3363 self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
3364 StarterPackViewBasicBuilder {
3365 _phantom_state: ::core::marker::PhantomData,
3366 __unsafe_private_named: self.__unsafe_private_named,
3367 _phantom: ::core::marker::PhantomData,
3368 }
3369 }
3370}
3371
3372impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> {
3373 pub fn joined_all_time_count(mut self, value: impl Into<Option<i64>>) -> Self {
3375 self.__unsafe_private_named.3 = value.into();
3376 self
3377 }
3378 pub fn maybe_joined_all_time_count(mut self, value: Option<i64>) -> Self {
3380 self.__unsafe_private_named.3 = value;
3381 self
3382 }
3383}
3384
3385impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> {
3386 pub fn joined_week_count(mut self, value: impl Into<Option<i64>>) -> Self {
3388 self.__unsafe_private_named.4 = value.into();
3389 self
3390 }
3391 pub fn maybe_joined_week_count(mut self, value: Option<i64>) -> Self {
3393 self.__unsafe_private_named.4 = value;
3394 self
3395 }
3396}
3397
3398impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> {
3399 pub fn labels(
3401 mut self,
3402 value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
3403 ) -> Self {
3404 self.__unsafe_private_named.5 = value.into();
3405 self
3406 }
3407 pub fn maybe_labels(
3409 mut self,
3410 value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
3411 ) -> Self {
3412 self.__unsafe_private_named.5 = value;
3413 self
3414 }
3415}
3416
3417impl<'a, S: starter_pack_view_basic_state::State> StarterPackViewBasicBuilder<'a, S> {
3418 pub fn list_item_count(mut self, value: impl Into<Option<i64>>) -> Self {
3420 self.__unsafe_private_named.6 = value.into();
3421 self
3422 }
3423 pub fn maybe_list_item_count(mut self, value: Option<i64>) -> Self {
3425 self.__unsafe_private_named.6 = value;
3426 self
3427 }
3428}
3429
3430impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3431where
3432 S: starter_pack_view_basic_state::State,
3433 S::Record: starter_pack_view_basic_state::IsUnset,
3434{
3435 pub fn record(
3437 mut self,
3438 value: impl Into<jacquard_common::types::value::Data<'a>>,
3439 ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetRecord<S>> {
3440 self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into());
3441 StarterPackViewBasicBuilder {
3442 _phantom_state: ::core::marker::PhantomData,
3443 __unsafe_private_named: self.__unsafe_private_named,
3444 _phantom: ::core::marker::PhantomData,
3445 }
3446 }
3447}
3448
3449impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3450where
3451 S: starter_pack_view_basic_state::State,
3452 S::Uri: starter_pack_view_basic_state::IsUnset,
3453{
3454 pub fn uri(
3456 mut self,
3457 value: impl Into<jacquard_common::types::string::AtUri<'a>>,
3458 ) -> StarterPackViewBasicBuilder<'a, starter_pack_view_basic_state::SetUri<S>> {
3459 self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into());
3460 StarterPackViewBasicBuilder {
3461 _phantom_state: ::core::marker::PhantomData,
3462 __unsafe_private_named: self.__unsafe_private_named,
3463 _phantom: ::core::marker::PhantomData,
3464 }
3465 }
3466}
3467
3468impl<'a, S> StarterPackViewBasicBuilder<'a, S>
3469where
3470 S: starter_pack_view_basic_state::State,
3471 S::Uri: starter_pack_view_basic_state::IsSet,
3472 S::Cid: starter_pack_view_basic_state::IsSet,
3473 S::Record: starter_pack_view_basic_state::IsSet,
3474 S::Creator: starter_pack_view_basic_state::IsSet,
3475 S::IndexedAt: starter_pack_view_basic_state::IsSet,
3476{
3477 pub fn build(self) -> StarterPackViewBasic<'a> {
3479 StarterPackViewBasic {
3480 cid: self.__unsafe_private_named.0.unwrap(),
3481 creator: self.__unsafe_private_named.1.unwrap(),
3482 indexed_at: self.__unsafe_private_named.2.unwrap(),
3483 joined_all_time_count: self.__unsafe_private_named.3,
3484 joined_week_count: self.__unsafe_private_named.4,
3485 labels: self.__unsafe_private_named.5,
3486 list_item_count: self.__unsafe_private_named.6,
3487 record: self.__unsafe_private_named.7.unwrap(),
3488 uri: self.__unsafe_private_named.8.unwrap(),
3489 extra_data: Default::default(),
3490 }
3491 }
3492 pub fn build_with_data(
3494 self,
3495 extra_data: std::collections::BTreeMap<
3496 jacquard_common::smol_str::SmolStr,
3497 jacquard_common::types::value::Data<'a>,
3498 >,
3499 ) -> StarterPackViewBasic<'a> {
3500 StarterPackViewBasic {
3501 cid: self.__unsafe_private_named.0.unwrap(),
3502 creator: self.__unsafe_private_named.1.unwrap(),
3503 indexed_at: self.__unsafe_private_named.2.unwrap(),
3504 joined_all_time_count: self.__unsafe_private_named.3,
3505 joined_week_count: self.__unsafe_private_named.4,
3506 labels: self.__unsafe_private_named.5,
3507 list_item_count: self.__unsafe_private_named.6,
3508 record: self.__unsafe_private_named.7.unwrap(),
3509 uri: self.__unsafe_private_named.8.unwrap(),
3510 extra_data: Some(extra_data),
3511 }
3512 }
3513}
3514
3515impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StarterPackViewBasic<'a> {
3516 fn nsid() -> &'static str {
3517 "app.bsky.graph.defs"
3518 }
3519 fn def_name() -> &'static str {
3520 "starterPackViewBasic"
3521 }
3522 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
3523 lexicon_doc_app_bsky_graph_defs()
3524 }
3525 fn validate(
3526 &self,
3527 ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
3528 if let Some(ref value) = self.joined_all_time_count {
3529 if *value < 0i64 {
3530 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3531 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3532 "joined_all_time_count",
3533 ),
3534 min: 0i64,
3535 actual: *value,
3536 });
3537 }
3538 }
3539 if let Some(ref value) = self.joined_week_count {
3540 if *value < 0i64 {
3541 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3542 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3543 "joined_week_count",
3544 ),
3545 min: 0i64,
3546 actual: *value,
3547 });
3548 }
3549 }
3550 if let Some(ref value) = self.list_item_count {
3551 if *value < 0i64 {
3552 return Err(::jacquard_lexicon::validation::ConstraintError::Minimum {
3553 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
3554 "list_item_count",
3555 ),
3556 min: 0i64,
3557 actual: *value,
3558 });
3559 }
3560 }
3561 Ok(())
3562 }
3563}