Skip to main content

jacquard_api/network_slices/tools/
bug.rs

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