atproto blogging
1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: pub.leaflet.document
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8/// Record containing a document
9#[jacquard_derive::lexicon]
10#[derive(
11 serde::Serialize,
12 serde::Deserialize,
13 Debug,
14 Clone,
15 PartialEq,
16 Eq,
17 jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20pub struct Document<'a> {
21 #[serde(borrow)]
22 pub author: jacquard_common::types::ident::AtIdentifier<'a>,
23 #[serde(skip_serializing_if = "std::option::Option::is_none")]
24 #[serde(borrow)]
25 pub description: std::option::Option<jacquard_common::CowStr<'a>>,
26 #[serde(borrow)]
27 pub pages: Vec<DocumentPagesItem<'a>>,
28 #[serde(skip_serializing_if = "std::option::Option::is_none")]
29 #[serde(borrow)]
30 pub post_ref: std::option::Option<
31 crate::com_atproto::repo::strong_ref::StrongRef<'a>,
32 >,
33 #[serde(skip_serializing_if = "std::option::Option::is_none")]
34 #[serde(borrow)]
35 pub publication: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
36 #[serde(skip_serializing_if = "std::option::Option::is_none")]
37 pub published_at: std::option::Option<jacquard_common::types::string::Datetime>,
38 #[serde(skip_serializing_if = "std::option::Option::is_none")]
39 #[serde(borrow)]
40 pub tags: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
41 #[serde(skip_serializing_if = "std::option::Option::is_none")]
42 #[serde(borrow)]
43 pub theme: std::option::Option<crate::pub_leaflet::publication::Theme<'a>>,
44 #[serde(borrow)]
45 pub title: jacquard_common::CowStr<'a>,
46}
47
48pub mod document_state {
49
50 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
51 #[allow(unused)]
52 use ::core::marker::PhantomData;
53 mod sealed {
54 pub trait Sealed {}
55 }
56 /// State trait tracking which required fields have been set
57 pub trait State: sealed::Sealed {
58 type Title;
59 type Pages;
60 type Author;
61 }
62 /// Empty state - all required fields are unset
63 pub struct Empty(());
64 impl sealed::Sealed for Empty {}
65 impl State for Empty {
66 type Title = Unset;
67 type Pages = Unset;
68 type Author = Unset;
69 }
70 ///State transition - sets the `title` field to Set
71 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
72 impl<S: State> sealed::Sealed for SetTitle<S> {}
73 impl<S: State> State for SetTitle<S> {
74 type Title = Set<members::title>;
75 type Pages = S::Pages;
76 type Author = S::Author;
77 }
78 ///State transition - sets the `pages` field to Set
79 pub struct SetPages<S: State = Empty>(PhantomData<fn() -> S>);
80 impl<S: State> sealed::Sealed for SetPages<S> {}
81 impl<S: State> State for SetPages<S> {
82 type Title = S::Title;
83 type Pages = Set<members::pages>;
84 type Author = S::Author;
85 }
86 ///State transition - sets the `author` field to Set
87 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
88 impl<S: State> sealed::Sealed for SetAuthor<S> {}
89 impl<S: State> State for SetAuthor<S> {
90 type Title = S::Title;
91 type Pages = S::Pages;
92 type Author = Set<members::author>;
93 }
94 /// Marker types for field names
95 #[allow(non_camel_case_types)]
96 pub mod members {
97 ///Marker type for the `title` field
98 pub struct title(());
99 ///Marker type for the `pages` field
100 pub struct pages(());
101 ///Marker type for the `author` field
102 pub struct author(());
103 }
104}
105
106/// Builder for constructing an instance of this type
107pub struct DocumentBuilder<'a, S: document_state::State> {
108 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
109 __unsafe_private_named: (
110 ::core::option::Option<jacquard_common::types::ident::AtIdentifier<'a>>,
111 ::core::option::Option<jacquard_common::CowStr<'a>>,
112 ::core::option::Option<Vec<DocumentPagesItem<'a>>>,
113 ::core::option::Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
114 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
115 ::core::option::Option<jacquard_common::types::string::Datetime>,
116 ::core::option::Option<Vec<jacquard_common::CowStr<'a>>>,
117 ::core::option::Option<crate::pub_leaflet::publication::Theme<'a>>,
118 ::core::option::Option<jacquard_common::CowStr<'a>>,
119 ),
120 _phantom: ::core::marker::PhantomData<&'a ()>,
121}
122
123impl<'a> Document<'a> {
124 /// Create a new builder for this type
125 pub fn new() -> DocumentBuilder<'a, document_state::Empty> {
126 DocumentBuilder::new()
127 }
128}
129
130impl<'a> DocumentBuilder<'a, document_state::Empty> {
131 /// Create a new builder with all fields unset
132 pub fn new() -> Self {
133 DocumentBuilder {
134 _phantom_state: ::core::marker::PhantomData,
135 __unsafe_private_named: (
136 None,
137 None,
138 None,
139 None,
140 None,
141 None,
142 None,
143 None,
144 None,
145 ),
146 _phantom: ::core::marker::PhantomData,
147 }
148 }
149}
150
151impl<'a, S> DocumentBuilder<'a, S>
152where
153 S: document_state::State,
154 S::Author: document_state::IsUnset,
155{
156 /// Set the `author` field (required)
157 pub fn author(
158 mut self,
159 value: impl Into<jacquard_common::types::ident::AtIdentifier<'a>>,
160 ) -> DocumentBuilder<'a, document_state::SetAuthor<S>> {
161 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
162 DocumentBuilder {
163 _phantom_state: ::core::marker::PhantomData,
164 __unsafe_private_named: self.__unsafe_private_named,
165 _phantom: ::core::marker::PhantomData,
166 }
167 }
168}
169
170impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
171 /// Set the `description` field (optional)
172 pub fn description(
173 mut self,
174 value: impl Into<Option<jacquard_common::CowStr<'a>>>,
175 ) -> Self {
176 self.__unsafe_private_named.1 = value.into();
177 self
178 }
179 /// Set the `description` field to an Option value (optional)
180 pub fn maybe_description(
181 mut self,
182 value: Option<jacquard_common::CowStr<'a>>,
183 ) -> Self {
184 self.__unsafe_private_named.1 = value;
185 self
186 }
187}
188
189impl<'a, S> DocumentBuilder<'a, S>
190where
191 S: document_state::State,
192 S::Pages: document_state::IsUnset,
193{
194 /// Set the `pages` field (required)
195 pub fn pages(
196 mut self,
197 value: impl Into<Vec<DocumentPagesItem<'a>>>,
198 ) -> DocumentBuilder<'a, document_state::SetPages<S>> {
199 self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
200 DocumentBuilder {
201 _phantom_state: ::core::marker::PhantomData,
202 __unsafe_private_named: self.__unsafe_private_named,
203 _phantom: ::core::marker::PhantomData,
204 }
205 }
206}
207
208impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
209 /// Set the `postRef` field (optional)
210 pub fn post_ref(
211 mut self,
212 value: impl Into<Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>>,
213 ) -> Self {
214 self.__unsafe_private_named.3 = value.into();
215 self
216 }
217 /// Set the `postRef` field to an Option value (optional)
218 pub fn maybe_post_ref(
219 mut self,
220 value: Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
221 ) -> Self {
222 self.__unsafe_private_named.3 = value;
223 self
224 }
225}
226
227impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
228 /// Set the `publication` field (optional)
229 pub fn publication(
230 mut self,
231 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
232 ) -> Self {
233 self.__unsafe_private_named.4 = value.into();
234 self
235 }
236 /// Set the `publication` field to an Option value (optional)
237 pub fn maybe_publication(
238 mut self,
239 value: Option<jacquard_common::types::string::AtUri<'a>>,
240 ) -> Self {
241 self.__unsafe_private_named.4 = value;
242 self
243 }
244}
245
246impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
247 /// Set the `publishedAt` field (optional)
248 pub fn published_at(
249 mut self,
250 value: impl Into<Option<jacquard_common::types::string::Datetime>>,
251 ) -> Self {
252 self.__unsafe_private_named.5 = value.into();
253 self
254 }
255 /// Set the `publishedAt` field to an Option value (optional)
256 pub fn maybe_published_at(
257 mut self,
258 value: Option<jacquard_common::types::string::Datetime>,
259 ) -> Self {
260 self.__unsafe_private_named.5 = value;
261 self
262 }
263}
264
265impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
266 /// Set the `tags` field (optional)
267 pub fn tags(
268 mut self,
269 value: impl Into<Option<Vec<jacquard_common::CowStr<'a>>>>,
270 ) -> Self {
271 self.__unsafe_private_named.6 = value.into();
272 self
273 }
274 /// Set the `tags` field to an Option value (optional)
275 pub fn maybe_tags(
276 mut self,
277 value: Option<Vec<jacquard_common::CowStr<'a>>>,
278 ) -> Self {
279 self.__unsafe_private_named.6 = value;
280 self
281 }
282}
283
284impl<'a, S: document_state::State> DocumentBuilder<'a, S> {
285 /// Set the `theme` field (optional)
286 pub fn theme(
287 mut self,
288 value: impl Into<Option<crate::pub_leaflet::publication::Theme<'a>>>,
289 ) -> Self {
290 self.__unsafe_private_named.7 = value.into();
291 self
292 }
293 /// Set the `theme` field to an Option value (optional)
294 pub fn maybe_theme(
295 mut self,
296 value: Option<crate::pub_leaflet::publication::Theme<'a>>,
297 ) -> Self {
298 self.__unsafe_private_named.7 = value;
299 self
300 }
301}
302
303impl<'a, S> DocumentBuilder<'a, S>
304where
305 S: document_state::State,
306 S::Title: document_state::IsUnset,
307{
308 /// Set the `title` field (required)
309 pub fn title(
310 mut self,
311 value: impl Into<jacquard_common::CowStr<'a>>,
312 ) -> DocumentBuilder<'a, document_state::SetTitle<S>> {
313 self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into());
314 DocumentBuilder {
315 _phantom_state: ::core::marker::PhantomData,
316 __unsafe_private_named: self.__unsafe_private_named,
317 _phantom: ::core::marker::PhantomData,
318 }
319 }
320}
321
322impl<'a, S> DocumentBuilder<'a, S>
323where
324 S: document_state::State,
325 S::Title: document_state::IsSet,
326 S::Pages: document_state::IsSet,
327 S::Author: document_state::IsSet,
328{
329 /// Build the final struct
330 pub fn build(self) -> Document<'a> {
331 Document {
332 author: self.__unsafe_private_named.0.unwrap(),
333 description: self.__unsafe_private_named.1,
334 pages: self.__unsafe_private_named.2.unwrap(),
335 post_ref: self.__unsafe_private_named.3,
336 publication: self.__unsafe_private_named.4,
337 published_at: self.__unsafe_private_named.5,
338 tags: self.__unsafe_private_named.6,
339 theme: self.__unsafe_private_named.7,
340 title: self.__unsafe_private_named.8.unwrap(),
341 extra_data: Default::default(),
342 }
343 }
344 /// Build the final struct with custom extra_data
345 pub fn build_with_data(
346 self,
347 extra_data: std::collections::BTreeMap<
348 jacquard_common::smol_str::SmolStr,
349 jacquard_common::types::value::Data<'a>,
350 >,
351 ) -> Document<'a> {
352 Document {
353 author: self.__unsafe_private_named.0.unwrap(),
354 description: self.__unsafe_private_named.1,
355 pages: self.__unsafe_private_named.2.unwrap(),
356 post_ref: self.__unsafe_private_named.3,
357 publication: self.__unsafe_private_named.4,
358 published_at: self.__unsafe_private_named.5,
359 tags: self.__unsafe_private_named.6,
360 theme: self.__unsafe_private_named.7,
361 title: self.__unsafe_private_named.8.unwrap(),
362 extra_data: Some(extra_data),
363 }
364 }
365}
366
367impl<'a> Document<'a> {
368 pub fn uri(
369 uri: impl Into<jacquard_common::CowStr<'a>>,
370 ) -> Result<
371 jacquard_common::types::uri::RecordUri<'a, DocumentRecord>,
372 jacquard_common::types::uri::UriError,
373 > {
374 jacquard_common::types::uri::RecordUri::try_from_uri(
375 jacquard_common::types::string::AtUri::new_cow(uri.into())?,
376 )
377 }
378}
379
380#[jacquard_derive::open_union]
381#[derive(
382 serde::Serialize,
383 serde::Deserialize,
384 Debug,
385 Clone,
386 PartialEq,
387 Eq,
388 jacquard_derive::IntoStatic
389)]
390#[serde(tag = "$type")]
391#[serde(bound(deserialize = "'de: 'a"))]
392pub enum DocumentPagesItem<'a> {
393 #[serde(rename = "pub.leaflet.pages.linearDocument")]
394 LinearDocument(Box<crate::pub_leaflet::pages::linear_document::LinearDocument<'a>>),
395 #[serde(rename = "pub.leaflet.pages.canvas")]
396 Canvas(Box<crate::pub_leaflet::pages::canvas::Canvas<'a>>),
397}
398
399/// Typed wrapper for GetRecord response with this collection's record type.
400#[derive(
401 serde::Serialize,
402 serde::Deserialize,
403 Debug,
404 Clone,
405 PartialEq,
406 Eq,
407 jacquard_derive::IntoStatic
408)]
409#[serde(rename_all = "camelCase")]
410pub struct DocumentGetRecordOutput<'a> {
411 #[serde(skip_serializing_if = "std::option::Option::is_none")]
412 #[serde(borrow)]
413 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
414 #[serde(borrow)]
415 pub uri: jacquard_common::types::string::AtUri<'a>,
416 #[serde(borrow)]
417 pub value: Document<'a>,
418}
419
420impl From<DocumentGetRecordOutput<'_>> for Document<'_> {
421 fn from(output: DocumentGetRecordOutput<'_>) -> Self {
422 use jacquard_common::IntoStatic;
423 output.value.into_static()
424 }
425}
426
427impl jacquard_common::types::collection::Collection for Document<'_> {
428 const NSID: &'static str = "pub.leaflet.document";
429 type Record = DocumentRecord;
430}
431
432/// Marker type for deserializing records from this collection.
433#[derive(Debug, serde::Serialize, serde::Deserialize)]
434pub struct DocumentRecord;
435impl jacquard_common::xrpc::XrpcResp for DocumentRecord {
436 const NSID: &'static str = "pub.leaflet.document";
437 const ENCODING: &'static str = "application/json";
438 type Output<'de> = DocumentGetRecordOutput<'de>;
439 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
440}
441
442impl jacquard_common::types::collection::Collection for DocumentRecord {
443 const NSID: &'static str = "pub.leaflet.document";
444 type Record = DocumentRecord;
445}
446
447impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Document<'a> {
448 fn nsid() -> &'static str {
449 "pub.leaflet.document"
450 }
451 fn def_name() -> &'static str {
452 "main"
453 }
454 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
455 lexicon_doc_pub_leaflet_document()
456 }
457 fn validate(
458 &self,
459 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
460 if let Some(ref value) = self.description {
461 #[allow(unused_comparisons)]
462 if <str>::len(value.as_ref()) > 3000usize {
463 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
464 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
465 "description",
466 ),
467 max: 3000usize,
468 actual: <str>::len(value.as_ref()),
469 });
470 }
471 }
472 if let Some(ref value) = self.description {
473 {
474 let count = ::unicode_segmentation::UnicodeSegmentation::graphemes(
475 value.as_ref(),
476 true,
477 )
478 .count();
479 if count > 300usize {
480 return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
481 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
482 "description",
483 ),
484 max: 300usize,
485 actual: count,
486 });
487 }
488 }
489 }
490 {
491 let value = &self.title;
492 #[allow(unused_comparisons)]
493 if <str>::len(value.as_ref()) > 1280usize {
494 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
495 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
496 "title",
497 ),
498 max: 1280usize,
499 actual: <str>::len(value.as_ref()),
500 });
501 }
502 }
503 {
504 let value = &self.title;
505 {
506 let count = ::unicode_segmentation::UnicodeSegmentation::graphemes(
507 value.as_ref(),
508 true,
509 )
510 .count();
511 if count > 128usize {
512 return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
513 path: ::jacquard_lexicon::validation::ValidationPath::from_field(
514 "title",
515 ),
516 max: 128usize,
517 actual: count,
518 });
519 }
520 }
521 }
522 Ok(())
523 }
524}
525
526fn lexicon_doc_pub_leaflet_document() -> ::jacquard_lexicon::lexicon::LexiconDoc<
527 'static,
528> {
529 ::jacquard_lexicon::lexicon::LexiconDoc {
530 lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
531 id: ::jacquard_common::CowStr::new_static("pub.leaflet.document"),
532 revision: None,
533 description: None,
534 defs: {
535 let mut map = ::alloc::collections::BTreeMap::new();
536 map.insert(
537 ::jacquard_common::smol_str::SmolStr::new_static("main"),
538 ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
539 description: Some(
540 ::jacquard_common::CowStr::new_static(
541 "Record containing a document",
542 ),
543 ),
544 key: Some(::jacquard_common::CowStr::new_static("tid")),
545 record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
546 description: None,
547 required: Some(
548 vec![
549 ::jacquard_common::smol_str::SmolStr::new_static("pages"),
550 ::jacquard_common::smol_str::SmolStr::new_static("author"),
551 ::jacquard_common::smol_str::SmolStr::new_static("title")
552 ],
553 ),
554 nullable: None,
555 properties: {
556 #[allow(unused_mut)]
557 let mut map = ::alloc::collections::BTreeMap::new();
558 map.insert(
559 ::jacquard_common::smol_str::SmolStr::new_static("author"),
560 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
561 description: None,
562 format: Some(
563 ::jacquard_lexicon::lexicon::LexStringFormat::AtIdentifier,
564 ),
565 default: None,
566 min_length: None,
567 max_length: None,
568 min_graphemes: None,
569 max_graphemes: None,
570 r#enum: None,
571 r#const: None,
572 known_values: None,
573 }),
574 );
575 map.insert(
576 ::jacquard_common::smol_str::SmolStr::new_static(
577 "description",
578 ),
579 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
580 description: None,
581 format: None,
582 default: None,
583 min_length: None,
584 max_length: Some(3000usize),
585 min_graphemes: None,
586 max_graphemes: Some(300usize),
587 r#enum: None,
588 r#const: None,
589 known_values: None,
590 }),
591 );
592 map.insert(
593 ::jacquard_common::smol_str::SmolStr::new_static("pages"),
594 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
595 description: None,
596 items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion {
597 description: None,
598 refs: vec![
599 ::jacquard_common::CowStr::new_static("pub.leaflet.pages.linearDocument"),
600 ::jacquard_common::CowStr::new_static("pub.leaflet.pages.canvas")
601 ],
602 closed: None,
603 }),
604 min_length: None,
605 max_length: None,
606 }),
607 );
608 map.insert(
609 ::jacquard_common::smol_str::SmolStr::new_static("postRef"),
610 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
611 description: None,
612 r#ref: ::jacquard_common::CowStr::new_static(
613 "com.atproto.repo.strongRef",
614 ),
615 }),
616 );
617 map.insert(
618 ::jacquard_common::smol_str::SmolStr::new_static(
619 "publication",
620 ),
621 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
622 description: None,
623 format: Some(
624 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri,
625 ),
626 default: None,
627 min_length: None,
628 max_length: None,
629 min_graphemes: None,
630 max_graphemes: None,
631 r#enum: None,
632 r#const: None,
633 known_values: None,
634 }),
635 );
636 map.insert(
637 ::jacquard_common::smol_str::SmolStr::new_static(
638 "publishedAt",
639 ),
640 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
641 description: None,
642 format: Some(
643 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
644 ),
645 default: None,
646 min_length: None,
647 max_length: None,
648 min_graphemes: None,
649 max_graphemes: None,
650 r#enum: None,
651 r#const: None,
652 known_values: None,
653 }),
654 );
655 map.insert(
656 ::jacquard_common::smol_str::SmolStr::new_static("tags"),
657 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
658 description: None,
659 items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
660 description: None,
661 format: None,
662 default: None,
663 min_length: None,
664 max_length: Some(50usize),
665 min_graphemes: None,
666 max_graphemes: None,
667 r#enum: None,
668 r#const: None,
669 known_values: None,
670 }),
671 min_length: None,
672 max_length: None,
673 }),
674 );
675 map.insert(
676 ::jacquard_common::smol_str::SmolStr::new_static("theme"),
677 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
678 description: None,
679 r#ref: ::jacquard_common::CowStr::new_static(
680 "pub.leaflet.publication#theme",
681 ),
682 }),
683 );
684 map.insert(
685 ::jacquard_common::smol_str::SmolStr::new_static("title"),
686 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
687 description: None,
688 format: None,
689 default: None,
690 min_length: None,
691 max_length: Some(1280usize),
692 min_graphemes: None,
693 max_graphemes: Some(128usize),
694 r#enum: None,
695 r#const: None,
696 known_values: None,
697 }),
698 );
699 map
700 },
701 }),
702 }),
703 );
704 map
705 },
706 }
707}