1pub mod comment;
10pub mod issue;
11pub mod response;
12
13
14#[allow(unused_imports)]
15use alloc::collections::BTreeMap;
16
17#[allow(unused_imports)]
18use core::marker::PhantomData;
19use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr};
20
21#[allow(unused_imports)]
22use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
23use jacquard_common::deps::smol_str::SmolStr;
24use jacquard_common::types::collection::{Collection, RecordError};
25use jacquard_common::types::string::{AtUri, Cid, Datetime};
26use jacquard_common::types::uri::{RecordUri, UriError};
27use jacquard_common::types::value::Data;
28use jacquard_common::xrpc::XrpcResp;
29use jacquard_derive::{IntoStatic, lexicon};
30use jacquard_lexicon::lexicon::LexiconDoc;
31use jacquard_lexicon::schema::LexiconSchema;
32
33#[allow(unused_imports)]
34use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
35use serde::{Serialize, Deserialize};
36use crate::network_slices::tools::Images;
37use crate::network_slices::tools::richtext::facet::Facet;
38
39#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
40#[serde(
41 rename_all = "camelCase",
42 rename = "network.slices.tools.bug",
43 tag = "$type",
44 bound(deserialize = "S: Deserialize<'de> + BosStr")
45)]
46pub struct Bug<S: BosStr = DefaultStr> {
47 #[serde(skip_serializing_if = "Option::is_none")]
48 pub app_used: Option<S>,
49 #[serde(skip_serializing_if = "Option::is_none")]
50 pub attachments: Option<Images<S>>,
51 pub created_at: Datetime,
52 pub description: S,
53 #[serde(skip_serializing_if = "Option::is_none")]
55 pub description_facets: Option<Vec<Facet<S>>>,
56 pub namespace: S,
58 pub severity: BugSeverity<S>,
59 pub steps_to_reproduce: S,
60 #[serde(skip_serializing_if = "Option::is_none")]
62 pub steps_to_reproduce_facets: Option<Vec<Facet<S>>>,
63 pub title: S,
64 #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
65 pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
66}
67
68
69#[derive(Debug, Clone, PartialEq, Eq, Hash)]
70pub enum BugSeverity<S: BosStr = DefaultStr> {
71 Cosmetic,
72 Annoying,
73 Broken,
74 Unusable,
75 Other(S),
76}
77
78impl<S: BosStr> BugSeverity<S> {
79 pub fn as_str(&self) -> &str {
80 match self {
81 Self::Cosmetic => "cosmetic",
82 Self::Annoying => "annoying",
83 Self::Broken => "broken",
84 Self::Unusable => "unusable",
85 Self::Other(s) => s.as_ref(),
86 }
87 }
88 pub fn from_value(s: S) -> Self {
90 match s.as_ref() {
91 "cosmetic" => Self::Cosmetic,
92 "annoying" => Self::Annoying,
93 "broken" => Self::Broken,
94 "unusable" => Self::Unusable,
95 _ => Self::Other(s),
96 }
97 }
98}
99
100impl<S: BosStr> core::fmt::Display for BugSeverity<S> {
101 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
102 write!(f, "{}", self.as_str())
103 }
104}
105
106impl<S: BosStr> AsRef<str> for BugSeverity<S> {
107 fn as_ref(&self) -> &str {
108 self.as_str()
109 }
110}
111
112impl<S: BosStr> Serialize for BugSeverity<S> {
113 fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
114 where
115 Ser: serde::Serializer,
116 {
117 serializer.serialize_str(self.as_str())
118 }
119}
120
121impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for BugSeverity<S> {
122 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
123 where
124 D: serde::Deserializer<'de>,
125 {
126 let s = S::deserialize(deserializer)?;
127 Ok(Self::from_value(s))
128 }
129}
130
131impl<S: BosStr + Default> Default for BugSeverity<S> {
132 fn default() -> Self {
133 Self::Other(Default::default())
134 }
135}
136
137impl<S: BosStr> jacquard_common::IntoStatic for BugSeverity<S>
138where
139 S: BosStr + jacquard_common::IntoStatic,
140 S::Output: BosStr,
141{
142 type Output = BugSeverity<S::Output>;
143 fn into_static(self) -> Self::Output {
144 match self {
145 BugSeverity::Cosmetic => BugSeverity::Cosmetic,
146 BugSeverity::Annoying => BugSeverity::Annoying,
147 BugSeverity::Broken => BugSeverity::Broken,
148 BugSeverity::Unusable => BugSeverity::Unusable,
149 BugSeverity::Other(v) => BugSeverity::Other(v.into_static()),
150 }
151 }
152}
153
154#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
157#[serde(rename_all = "camelCase")]
158pub struct BugGetRecordOutput<S: BosStr = DefaultStr> {
159 #[serde(skip_serializing_if = "Option::is_none")]
160 pub cid: Option<Cid<S>>,
161 pub uri: AtUri<S>,
162 pub value: Bug<S>,
163}
164
165impl<S: BosStr> Bug<S> {
166 pub fn uri(uri: S) -> Result<RecordUri<S, BugRecord>, UriError> {
167 RecordUri::try_from_uri(AtUri::new(uri)?)
168 }
169}
170
171#[derive(Debug, Serialize, Deserialize)]
174pub struct BugRecord;
175impl XrpcResp for BugRecord {
176 const NSID: &'static str = "network.slices.tools.bug";
177 const ENCODING: &'static str = "application/json";
178 type Output<S: BosStr> = BugGetRecordOutput<S>;
179 type Err = RecordError;
180}
181
182impl<S: BosStr> From<BugGetRecordOutput<S>> for Bug<S> {
183 fn from(output: BugGetRecordOutput<S>) -> Self {
184 output.value
185 }
186}
187
188impl<S: BosStr> Collection for Bug<S> {
189 const NSID: &'static str = "network.slices.tools.bug";
190 type Record = BugRecord;
191}
192
193impl Collection for BugRecord {
194 const NSID: &'static str = "network.slices.tools.bug";
195 type Record = BugRecord;
196}
197
198impl<S: BosStr> LexiconSchema for Bug<S> {
199 fn nsid() -> &'static str {
200 "network.slices.tools.bug"
201 }
202 fn def_name() -> &'static str {
203 "main"
204 }
205 fn lexicon_doc() -> LexiconDoc<'static> {
206 lexicon_doc_network_slices_tools_bug()
207 }
208 fn validate(&self) -> Result<(), ConstraintError> {
209 if let Some(ref value) = self.app_used {
210 #[allow(unused_comparisons)]
211 if <str>::len(value.as_ref()) > 300usize {
212 return Err(ConstraintError::MaxLength {
213 path: ValidationPath::from_field("app_used"),
214 max: 300usize,
215 actual: <str>::len(value.as_ref()),
216 });
217 }
218 }
219 {
220 let value = &self.description;
221 #[allow(unused_comparisons)]
222 if <str>::len(value.as_ref()) > 10000usize {
223 return Err(ConstraintError::MaxLength {
224 path: ValidationPath::from_field("description"),
225 max: 10000usize,
226 actual: <str>::len(value.as_ref()),
227 });
228 }
229 }
230 {
231 let value = &self.description;
232 {
233 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
234 if count > 3000usize {
235 return Err(ConstraintError::MaxGraphemes {
236 path: ValidationPath::from_field("description"),
237 max: 3000usize,
238 actual: count,
239 });
240 }
241 }
242 }
243 {
244 let value = &self.steps_to_reproduce;
245 #[allow(unused_comparisons)]
246 if <str>::len(value.as_ref()) > 5000usize {
247 return Err(ConstraintError::MaxLength {
248 path: ValidationPath::from_field("steps_to_reproduce"),
249 max: 5000usize,
250 actual: <str>::len(value.as_ref()),
251 });
252 }
253 }
254 {
255 let value = &self.steps_to_reproduce;
256 {
257 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
258 if count > 1500usize {
259 return Err(ConstraintError::MaxGraphemes {
260 path: ValidationPath::from_field("steps_to_reproduce"),
261 max: 1500usize,
262 actual: count,
263 });
264 }
265 }
266 }
267 {
268 let value = &self.title;
269 #[allow(unused_comparisons)]
270 if <str>::len(value.as_ref()) > 300usize {
271 return Err(ConstraintError::MaxLength {
272 path: ValidationPath::from_field("title"),
273 max: 300usize,
274 actual: <str>::len(value.as_ref()),
275 });
276 }
277 }
278 {
279 let value = &self.title;
280 {
281 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
282 if count > 100usize {
283 return Err(ConstraintError::MaxGraphemes {
284 path: ValidationPath::from_field("title"),
285 max: 100usize,
286 actual: count,
287 });
288 }
289 }
290 }
291 Ok(())
292 }
293}
294
295pub mod bug_state {
296
297 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
298 #[allow(unused)]
299 use ::core::marker::PhantomData;
300 mod sealed {
301 pub trait Sealed {}
302 }
303 pub trait State: sealed::Sealed {
305 type CreatedAt;
306 type Description;
307 type Namespace;
308 type Severity;
309 type StepsToReproduce;
310 type Title;
311 }
312 pub struct Empty(());
314 impl sealed::Sealed for Empty {}
315 impl State for Empty {
316 type CreatedAt = Unset;
317 type Description = Unset;
318 type Namespace = Unset;
319 type Severity = Unset;
320 type StepsToReproduce = Unset;
321 type Title = Unset;
322 }
323 pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
325 impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
326 impl<St: State> State for SetCreatedAt<St> {
327 type CreatedAt = Set<members::created_at>;
328 type Description = St::Description;
329 type Namespace = St::Namespace;
330 type Severity = St::Severity;
331 type StepsToReproduce = St::StepsToReproduce;
332 type Title = St::Title;
333 }
334 pub struct SetDescription<St: State = Empty>(PhantomData<fn() -> St>);
336 impl<St: State> sealed::Sealed for SetDescription<St> {}
337 impl<St: State> State for SetDescription<St> {
338 type CreatedAt = St::CreatedAt;
339 type Description = Set<members::description>;
340 type Namespace = St::Namespace;
341 type Severity = St::Severity;
342 type StepsToReproduce = St::StepsToReproduce;
343 type Title = St::Title;
344 }
345 pub struct SetNamespace<St: State = Empty>(PhantomData<fn() -> St>);
347 impl<St: State> sealed::Sealed for SetNamespace<St> {}
348 impl<St: State> State for SetNamespace<St> {
349 type CreatedAt = St::CreatedAt;
350 type Description = St::Description;
351 type Namespace = Set<members::namespace>;
352 type Severity = St::Severity;
353 type StepsToReproduce = St::StepsToReproduce;
354 type Title = St::Title;
355 }
356 pub struct SetSeverity<St: State = Empty>(PhantomData<fn() -> St>);
358 impl<St: State> sealed::Sealed for SetSeverity<St> {}
359 impl<St: State> State for SetSeverity<St> {
360 type CreatedAt = St::CreatedAt;
361 type Description = St::Description;
362 type Namespace = St::Namespace;
363 type Severity = Set<members::severity>;
364 type StepsToReproduce = St::StepsToReproduce;
365 type Title = St::Title;
366 }
367 pub struct SetStepsToReproduce<St: State = Empty>(PhantomData<fn() -> St>);
369 impl<St: State> sealed::Sealed for SetStepsToReproduce<St> {}
370 impl<St: State> State for SetStepsToReproduce<St> {
371 type CreatedAt = St::CreatedAt;
372 type Description = St::Description;
373 type Namespace = St::Namespace;
374 type Severity = St::Severity;
375 type StepsToReproduce = Set<members::steps_to_reproduce>;
376 type Title = St::Title;
377 }
378 pub struct SetTitle<St: State = Empty>(PhantomData<fn() -> St>);
380 impl<St: State> sealed::Sealed for SetTitle<St> {}
381 impl<St: State> State for SetTitle<St> {
382 type CreatedAt = St::CreatedAt;
383 type Description = St::Description;
384 type Namespace = St::Namespace;
385 type Severity = St::Severity;
386 type StepsToReproduce = St::StepsToReproduce;
387 type Title = Set<members::title>;
388 }
389 #[allow(non_camel_case_types)]
391 pub mod members {
392 pub struct created_at(());
394 pub struct description(());
396 pub struct namespace(());
398 pub struct severity(());
400 pub struct steps_to_reproduce(());
402 pub struct title(());
404 }
405}
406
407pub struct BugBuilder<St: bug_state::State, S: BosStr = DefaultStr> {
409 _state: PhantomData<fn() -> St>,
410 _fields: (
411 Option<S>,
412 Option<Images<S>>,
413 Option<Datetime>,
414 Option<S>,
415 Option<Vec<Facet<S>>>,
416 Option<S>,
417 Option<BugSeverity<S>>,
418 Option<S>,
419 Option<Vec<Facet<S>>>,
420 Option<S>,
421 ),
422 _type: PhantomData<fn() -> S>,
423}
424
425impl Bug<DefaultStr> {
426 pub fn new() -> BugBuilder<bug_state::Empty, DefaultStr> {
428 BugBuilder::new()
429 }
430}
431
432impl<S: BosStr> Bug<S> {
433 pub fn builder() -> BugBuilder<bug_state::Empty, S> {
435 BugBuilder::builder()
436 }
437}
438
439impl BugBuilder<bug_state::Empty, DefaultStr> {
440 pub fn new() -> Self {
442 BugBuilder {
443 _state: PhantomData,
444 _fields: (None, None, None, None, None, None, None, None, None, None),
445 _type: PhantomData,
446 }
447 }
448}
449
450impl<S: BosStr> BugBuilder<bug_state::Empty, S> {
451 pub fn builder() -> Self {
453 BugBuilder {
454 _state: PhantomData,
455 _fields: (None, None, None, None, None, None, None, None, None, None),
456 _type: PhantomData,
457 }
458 }
459}
460
461impl<St: bug_state::State, S: BosStr> BugBuilder<St, S> {
462 pub fn app_used(mut self, value: impl Into<Option<S>>) -> Self {
464 self._fields.0 = value.into();
465 self
466 }
467 pub fn maybe_app_used(mut self, value: Option<S>) -> Self {
469 self._fields.0 = value;
470 self
471 }
472}
473
474impl<St: bug_state::State, S: BosStr> BugBuilder<St, S> {
475 pub fn attachments(mut self, value: impl Into<Option<Images<S>>>) -> Self {
477 self._fields.1 = value.into();
478 self
479 }
480 pub fn maybe_attachments(mut self, value: Option<Images<S>>) -> Self {
482 self._fields.1 = value;
483 self
484 }
485}
486
487impl<St, S: BosStr> BugBuilder<St, S>
488where
489 St: bug_state::State,
490 St::CreatedAt: bug_state::IsUnset,
491{
492 pub fn created_at(
494 mut self,
495 value: impl Into<Datetime>,
496 ) -> BugBuilder<bug_state::SetCreatedAt<St>, S> {
497 self._fields.2 = Option::Some(value.into());
498 BugBuilder {
499 _state: PhantomData,
500 _fields: self._fields,
501 _type: PhantomData,
502 }
503 }
504}
505
506impl<St, S: BosStr> BugBuilder<St, S>
507where
508 St: bug_state::State,
509 St::Description: bug_state::IsUnset,
510{
511 pub fn description(
513 mut self,
514 value: impl Into<S>,
515 ) -> BugBuilder<bug_state::SetDescription<St>, S> {
516 self._fields.3 = Option::Some(value.into());
517 BugBuilder {
518 _state: PhantomData,
519 _fields: self._fields,
520 _type: PhantomData,
521 }
522 }
523}
524
525impl<St: bug_state::State, S: BosStr> BugBuilder<St, S> {
526 pub fn description_facets(
528 mut self,
529 value: impl Into<Option<Vec<Facet<S>>>>,
530 ) -> Self {
531 self._fields.4 = value.into();
532 self
533 }
534 pub fn maybe_description_facets(mut self, value: Option<Vec<Facet<S>>>) -> Self {
536 self._fields.4 = value;
537 self
538 }
539}
540
541impl<St, S: BosStr> BugBuilder<St, S>
542where
543 St: bug_state::State,
544 St::Namespace: bug_state::IsUnset,
545{
546 pub fn namespace(
548 mut self,
549 value: impl Into<S>,
550 ) -> BugBuilder<bug_state::SetNamespace<St>, S> {
551 self._fields.5 = Option::Some(value.into());
552 BugBuilder {
553 _state: PhantomData,
554 _fields: self._fields,
555 _type: PhantomData,
556 }
557 }
558}
559
560impl<St, S: BosStr> BugBuilder<St, S>
561where
562 St: bug_state::State,
563 St::Severity: bug_state::IsUnset,
564{
565 pub fn severity(
567 mut self,
568 value: impl Into<BugSeverity<S>>,
569 ) -> BugBuilder<bug_state::SetSeverity<St>, S> {
570 self._fields.6 = Option::Some(value.into());
571 BugBuilder {
572 _state: PhantomData,
573 _fields: self._fields,
574 _type: PhantomData,
575 }
576 }
577}
578
579impl<St, S: BosStr> BugBuilder<St, S>
580where
581 St: bug_state::State,
582 St::StepsToReproduce: bug_state::IsUnset,
583{
584 pub fn steps_to_reproduce(
586 mut self,
587 value: impl Into<S>,
588 ) -> BugBuilder<bug_state::SetStepsToReproduce<St>, S> {
589 self._fields.7 = Option::Some(value.into());
590 BugBuilder {
591 _state: PhantomData,
592 _fields: self._fields,
593 _type: PhantomData,
594 }
595 }
596}
597
598impl<St: bug_state::State, S: BosStr> BugBuilder<St, S> {
599 pub fn steps_to_reproduce_facets(
601 mut self,
602 value: impl Into<Option<Vec<Facet<S>>>>,
603 ) -> Self {
604 self._fields.8 = value.into();
605 self
606 }
607 pub fn maybe_steps_to_reproduce_facets(
609 mut self,
610 value: Option<Vec<Facet<S>>>,
611 ) -> Self {
612 self._fields.8 = value;
613 self
614 }
615}
616
617impl<St, S: BosStr> BugBuilder<St, S>
618where
619 St: bug_state::State,
620 St::Title: bug_state::IsUnset,
621{
622 pub fn title(
624 mut self,
625 value: impl Into<S>,
626 ) -> BugBuilder<bug_state::SetTitle<St>, S> {
627 self._fields.9 = Option::Some(value.into());
628 BugBuilder {
629 _state: PhantomData,
630 _fields: self._fields,
631 _type: PhantomData,
632 }
633 }
634}
635
636impl<St, S: BosStr> BugBuilder<St, S>
637where
638 St: bug_state::State,
639 St::CreatedAt: bug_state::IsSet,
640 St::Description: bug_state::IsSet,
641 St::Namespace: bug_state::IsSet,
642 St::Severity: bug_state::IsSet,
643 St::StepsToReproduce: bug_state::IsSet,
644 St::Title: bug_state::IsSet,
645{
646 pub fn build(self) -> Bug<S> {
648 Bug {
649 app_used: self._fields.0,
650 attachments: self._fields.1,
651 created_at: self._fields.2.unwrap(),
652 description: self._fields.3.unwrap(),
653 description_facets: self._fields.4,
654 namespace: self._fields.5.unwrap(),
655 severity: self._fields.6.unwrap(),
656 steps_to_reproduce: self._fields.7.unwrap(),
657 steps_to_reproduce_facets: self._fields.8,
658 title: self._fields.9.unwrap(),
659 extra_data: Default::default(),
660 }
661 }
662 pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> Bug<S> {
664 Bug {
665 app_used: self._fields.0,
666 attachments: self._fields.1,
667 created_at: self._fields.2.unwrap(),
668 description: self._fields.3.unwrap(),
669 description_facets: self._fields.4,
670 namespace: self._fields.5.unwrap(),
671 severity: self._fields.6.unwrap(),
672 steps_to_reproduce: self._fields.7.unwrap(),
673 steps_to_reproduce_facets: self._fields.8,
674 title: self._fields.9.unwrap(),
675 extra_data: Some(extra_data),
676 }
677 }
678}
679
680fn lexicon_doc_network_slices_tools_bug() -> LexiconDoc<'static> {
681 #[allow(unused_imports)]
682 use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
683 use jacquard_lexicon::lexicon::*;
684 use alloc::collections::BTreeMap;
685 LexiconDoc {
686 lexicon: Lexicon::Lexicon1,
687 id: CowStr::new_static("network.slices.tools.bug"),
688 defs: {
689 let mut map = BTreeMap::new();
690 map.insert(
691 SmolStr::new_static("main"),
692 LexUserType::Record(LexRecord {
693 key: Some(CowStr::new_static("tid")),
694 record: LexRecordRecord::Object(LexObject {
695 required: Some(
696 vec![
697 SmolStr::new_static("title"),
698 SmolStr::new_static("namespace"),
699 SmolStr::new_static("description"),
700 SmolStr::new_static("stepsToReproduce"),
701 SmolStr::new_static("severity"),
702 SmolStr::new_static("createdAt")
703 ],
704 ),
705 properties: {
706 #[allow(unused_mut)]
707 let mut map = BTreeMap::new();
708 map.insert(
709 SmolStr::new_static("appUsed"),
710 LexObjectProperty::String(LexString {
711 max_length: Some(300usize),
712 ..Default::default()
713 }),
714 );
715 map.insert(
716 SmolStr::new_static("attachments"),
717 LexObjectProperty::Union(LexRefUnion {
718 refs: vec![
719 CowStr::new_static("network.slices.tools.defs#images")
720 ],
721 ..Default::default()
722 }),
723 );
724 map.insert(
725 SmolStr::new_static("createdAt"),
726 LexObjectProperty::String(LexString {
727 format: Some(LexStringFormat::Datetime),
728 ..Default::default()
729 }),
730 );
731 map.insert(
732 SmolStr::new_static("description"),
733 LexObjectProperty::String(LexString {
734 max_length: Some(10000usize),
735 max_graphemes: Some(3000usize),
736 ..Default::default()
737 }),
738 );
739 map.insert(
740 SmolStr::new_static("descriptionFacets"),
741 LexObjectProperty::Array(LexArray {
742 description: Some(
743 CowStr::new_static(
744 "Annotations of description (mentions and links)",
745 ),
746 ),
747 items: LexArrayItem::Ref(LexRef {
748 r#ref: CowStr::new_static(
749 "network.slices.tools.richtext.facet",
750 ),
751 ..Default::default()
752 }),
753 ..Default::default()
754 }),
755 );
756 map.insert(
757 SmolStr::new_static("namespace"),
758 LexObjectProperty::String(LexString {
759 description: Some(
760 CowStr::new_static(
761 "Target namespace like 'social.grain' or 'app.bsky'",
762 ),
763 ),
764 ..Default::default()
765 }),
766 );
767 map.insert(
768 SmolStr::new_static("severity"),
769 LexObjectProperty::String(LexString {
770 ..Default::default()
771 }),
772 );
773 map.insert(
774 SmolStr::new_static("stepsToReproduce"),
775 LexObjectProperty::String(LexString {
776 max_length: Some(5000usize),
777 max_graphemes: Some(1500usize),
778 ..Default::default()
779 }),
780 );
781 map.insert(
782 SmolStr::new_static("stepsToReproduceFacets"),
783 LexObjectProperty::Array(LexArray {
784 description: Some(
785 CowStr::new_static(
786 "Annotations of steps to reproduce (mentions and links)",
787 ),
788 ),
789 items: LexArrayItem::Ref(LexRef {
790 r#ref: CowStr::new_static(
791 "network.slices.tools.richtext.facet",
792 ),
793 ..Default::default()
794 }),
795 ..Default::default()
796 }),
797 );
798 map.insert(
799 SmolStr::new_static("title"),
800 LexObjectProperty::String(LexString {
801 max_length: Some(300usize),
802 max_graphemes: Some(100usize),
803 ..Default::default()
804 }),
805 );
806 map
807 },
808 ..Default::default()
809 }),
810 ..Default::default()
811 }),
812 );
813 map
814 },
815 ..Default::default()
816 }
817}