// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: social.grain.gallery.defs
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

pub mod item;


#[allow(unused_imports)]
use alloc::collections::BTreeMap;

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::CowStr;

#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::types::collection::{Collection, RecordError};
use jacquard_common::types::string::{AtUri, Cid, Datetime};
use jacquard_common::types::uri::{RecordUri, UriError};
use jacquard_common::types::value::Data;
use jacquard_common::xrpc::XrpcResp;
use jacquard_derive::{IntoStatic, lexicon};
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;

#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Serialize, Deserialize};
use crate::com_atproto::label::Label;
use crate::com_atproto::label::SelfLabels;
use crate::social_grain::actor::ProfileView;
use crate::social_grain::photo::PhotoView;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct Gallery<'a> {
    pub created_at: Datetime,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub description: Option<CowStr<'a>>,
    ///Self-label values for this post. Effectively content warnings.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub labels: Option<SelfLabels<'a>>,
    #[serde(borrow)]
    pub title: CowStr<'a>,
}

/// Typed wrapper for GetRecord response with this collection's record type.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GalleryGetRecordOutput<'a> {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub cid: Option<Cid<'a>>,
    #[serde(borrow)]
    pub uri: AtUri<'a>,
    #[serde(borrow)]
    pub value: Gallery<'a>,
}


#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GalleryView<'a> {
    #[serde(borrow)]
    pub cid: Cid<'a>,
    #[serde(borrow)]
    pub creator: ProfileView<'a>,
    pub indexed_at: Datetime,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub items: Option<Vec<PhotoView<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub labels: Option<Vec<Label<'a>>>,
    #[serde(borrow)]
    pub record: Data<'a>,
    #[serde(borrow)]
    pub uri: AtUri<'a>,
}

impl<'a> Gallery<'a> {
    pub fn uri(
        uri: impl Into<CowStr<'a>>,
    ) -> Result<RecordUri<'a, GalleryRecord>, UriError> {
        RecordUri::try_from_uri(AtUri::new_cow(uri.into())?)
    }
}

/// Marker type for deserializing records from this collection.

#[derive(Debug, Serialize, Deserialize)]
pub struct GalleryRecord;
impl XrpcResp for GalleryRecord {
    const NSID: &'static str = "social.grain.gallery";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = GalleryGetRecordOutput<'de>;
    type Err<'de> = RecordError<'de>;
}

impl From<GalleryGetRecordOutput<'_>> for Gallery<'_> {
    fn from(output: GalleryGetRecordOutput<'_>) -> Self {
        use jacquard_common::IntoStatic;
        output.value.into_static()
    }
}

impl Collection for Gallery<'_> {
    const NSID: &'static str = "social.grain.gallery";
    type Record = GalleryRecord;
}

impl Collection for GalleryRecord {
    const NSID: &'static str = "social.grain.gallery";
    type Record = GalleryRecord;
}

impl<'a> LexiconSchema for Gallery<'a> {
    fn nsid() -> &'static str {
        "social.grain.gallery"
    }
    fn def_name() -> &'static str {
        "main"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_social_grain_gallery()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        if let Some(ref value) = self.description {
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) > 1000usize {
                return Err(ConstraintError::MaxLength {
                    path: ValidationPath::from_field("description"),
                    max: 1000usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        {
            let value = &self.title;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) > 100usize {
                return Err(ConstraintError::MaxLength {
                    path: ValidationPath::from_field("title"),
                    max: 100usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        Ok(())
    }
}

impl<'a> LexiconSchema for GalleryView<'a> {
    fn nsid() -> &'static str {
        "social.grain.gallery.defs"
    }
    fn def_name() -> &'static str {
        "galleryView"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_social_grain_gallery_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

pub mod gallery_state {

    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
    #[allow(unused)]
    use ::core::marker::PhantomData;
    mod sealed {
        pub trait Sealed {}
    }
    /// State trait tracking which required fields have been set
    pub trait State: sealed::Sealed {
        type CreatedAt;
        type Title;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type CreatedAt = Unset;
        type Title = Unset;
    }
    ///State transition - sets the `created_at` field to Set
    pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
    impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
    impl<S: State> State for SetCreatedAt<S> {
        type CreatedAt = Set<members::created_at>;
        type Title = S::Title;
    }
    ///State transition - sets the `title` field to Set
    pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
    impl<S: State> sealed::Sealed for SetTitle<S> {}
    impl<S: State> State for SetTitle<S> {
        type CreatedAt = S::CreatedAt;
        type Title = Set<members::title>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `created_at` field
        pub struct created_at(());
        ///Marker type for the `title` field
        pub struct title(());
    }
}

/// Builder for constructing an instance of this type
pub struct GalleryBuilder<'a, S: gallery_state::State> {
    _state: PhantomData<fn() -> S>,
    _fields: (
        Option<Datetime>,
        Option<CowStr<'a>>,
        Option<SelfLabels<'a>>,
        Option<CowStr<'a>>,
    ),
    _lifetime: PhantomData<&'a ()>,
}

impl<'a> Gallery<'a> {
    /// Create a new builder for this type
    pub fn new() -> GalleryBuilder<'a, gallery_state::Empty> {
        GalleryBuilder::new()
    }
}

impl<'a> GalleryBuilder<'a, gallery_state::Empty> {
    /// Create a new builder with all fields unset
    pub fn new() -> Self {
        GalleryBuilder {
            _state: PhantomData,
            _fields: (None, None, None, None),
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S> GalleryBuilder<'a, S>
where
    S: gallery_state::State,
    S::CreatedAt: gallery_state::IsUnset,
{
    /// Set the `createdAt` field (required)
    pub fn created_at(
        mut self,
        value: impl Into<Datetime>,
    ) -> GalleryBuilder<'a, gallery_state::SetCreatedAt<S>> {
        self._fields.0 = Option::Some(value.into());
        GalleryBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S: gallery_state::State> GalleryBuilder<'a, S> {
    /// Set the `description` field (optional)
    pub fn description(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
        self._fields.1 = value.into();
        self
    }
    /// Set the `description` field to an Option value (optional)
    pub fn maybe_description(mut self, value: Option<CowStr<'a>>) -> Self {
        self._fields.1 = value;
        self
    }
}

impl<'a, S: gallery_state::State> GalleryBuilder<'a, S> {
    /// Set the `labels` field (optional)
    pub fn labels(mut self, value: impl Into<Option<SelfLabels<'a>>>) -> Self {
        self._fields.2 = value.into();
        self
    }
    /// Set the `labels` field to an Option value (optional)
    pub fn maybe_labels(mut self, value: Option<SelfLabels<'a>>) -> Self {
        self._fields.2 = value;
        self
    }
}

impl<'a, S> GalleryBuilder<'a, S>
where
    S: gallery_state::State,
    S::Title: gallery_state::IsUnset,
{
    /// Set the `title` field (required)
    pub fn title(
        mut self,
        value: impl Into<CowStr<'a>>,
    ) -> GalleryBuilder<'a, gallery_state::SetTitle<S>> {
        self._fields.3 = Option::Some(value.into());
        GalleryBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S> GalleryBuilder<'a, S>
where
    S: gallery_state::State,
    S::CreatedAt: gallery_state::IsSet,
    S::Title: gallery_state::IsSet,
{
    /// Build the final struct
    pub fn build(self) -> Gallery<'a> {
        Gallery {
            created_at: self._fields.0.unwrap(),
            description: self._fields.1,
            labels: self._fields.2,
            title: self._fields.3.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
    ) -> Gallery<'a> {
        Gallery {
            created_at: self._fields.0.unwrap(),
            description: self._fields.1,
            labels: self._fields.2,
            title: self._fields.3.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

fn lexicon_doc_social_grain_gallery() -> LexiconDoc<'static> {
    #[allow(unused_imports)]
    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
    use jacquard_lexicon::lexicon::*;
    use alloc::collections::BTreeMap;
    LexiconDoc {
        lexicon: Lexicon::Lexicon1,
        id: CowStr::new_static("social.grain.gallery"),
        defs: {
            let mut map = BTreeMap::new();
            map.insert(
                SmolStr::new_static("main"),
                LexUserType::Record(LexRecord {
                    key: Some(CowStr::new_static("tid")),
                    record: LexRecordRecord::Object(LexObject {
                        required: Some(
                            vec![
                                SmolStr::new_static("title"),
                                SmolStr::new_static("createdAt")
                            ],
                        ),
                        properties: {
                            #[allow(unused_mut)]
                            let mut map = BTreeMap::new();
                            map.insert(
                                SmolStr::new_static("createdAt"),
                                LexObjectProperty::String(LexString {
                                    format: Some(LexStringFormat::Datetime),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("description"),
                                LexObjectProperty::String(LexString {
                                    max_length: Some(1000usize),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("labels"),
                                LexObjectProperty::Union(LexRefUnion {
                                    description: Some(
                                        CowStr::new_static(
                                            "Self-label values for this post. Effectively content warnings.",
                                        ),
                                    ),
                                    refs: vec![
                                        CowStr::new_static("com.atproto.label.defs#selfLabels")
                                    ],
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("title"),
                                LexObjectProperty::String(LexString {
                                    max_length: Some(100usize),
                                    ..Default::default()
                                }),
                            );
                            map
                        },
                        ..Default::default()
                    }),
                    ..Default::default()
                }),
            );
            map
        },
        ..Default::default()
    }
}

pub mod gallery_view_state {

    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
    #[allow(unused)]
    use ::core::marker::PhantomData;
    mod sealed {
        pub trait Sealed {}
    }
    /// State trait tracking which required fields have been set
    pub trait State: sealed::Sealed {
        type Cid;
        type Record;
        type Creator;
        type IndexedAt;
        type Uri;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Cid = Unset;
        type Record = Unset;
        type Creator = Unset;
        type IndexedAt = Unset;
        type Uri = Unset;
    }
    ///State transition - sets the `cid` field to Set
    pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
    impl<S: State> sealed::Sealed for SetCid<S> {}
    impl<S: State> State for SetCid<S> {
        type Cid = Set<members::cid>;
        type Record = S::Record;
        type Creator = S::Creator;
        type IndexedAt = S::IndexedAt;
        type Uri = S::Uri;
    }
    ///State transition - sets the `record` field to Set
    pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
    impl<S: State> sealed::Sealed for SetRecord<S> {}
    impl<S: State> State for SetRecord<S> {
        type Cid = S::Cid;
        type Record = Set<members::record>;
        type Creator = S::Creator;
        type IndexedAt = S::IndexedAt;
        type Uri = S::Uri;
    }
    ///State transition - sets the `creator` field to Set
    pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
    impl<S: State> sealed::Sealed for SetCreator<S> {}
    impl<S: State> State for SetCreator<S> {
        type Cid = S::Cid;
        type Record = S::Record;
        type Creator = Set<members::creator>;
        type IndexedAt = S::IndexedAt;
        type Uri = S::Uri;
    }
    ///State transition - sets the `indexed_at` field to Set
    pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
    impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
    impl<S: State> State for SetIndexedAt<S> {
        type Cid = S::Cid;
        type Record = S::Record;
        type Creator = S::Creator;
        type IndexedAt = Set<members::indexed_at>;
        type Uri = S::Uri;
    }
    ///State transition - sets the `uri` field to Set
    pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
    impl<S: State> sealed::Sealed for SetUri<S> {}
    impl<S: State> State for SetUri<S> {
        type Cid = S::Cid;
        type Record = S::Record;
        type Creator = S::Creator;
        type IndexedAt = S::IndexedAt;
        type Uri = Set<members::uri>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `cid` field
        pub struct cid(());
        ///Marker type for the `record` field
        pub struct record(());
        ///Marker type for the `creator` field
        pub struct creator(());
        ///Marker type for the `indexed_at` field
        pub struct indexed_at(());
        ///Marker type for the `uri` field
        pub struct uri(());
    }
}

/// Builder for constructing an instance of this type
pub struct GalleryViewBuilder<'a, S: gallery_view_state::State> {
    _state: PhantomData<fn() -> S>,
    _fields: (
        Option<Cid<'a>>,
        Option<ProfileView<'a>>,
        Option<Datetime>,
        Option<Vec<PhotoView<'a>>>,
        Option<Vec<Label<'a>>>,
        Option<Data<'a>>,
        Option<AtUri<'a>>,
    ),
    _lifetime: PhantomData<&'a ()>,
}

impl<'a> GalleryView<'a> {
    /// Create a new builder for this type
    pub fn new() -> GalleryViewBuilder<'a, gallery_view_state::Empty> {
        GalleryViewBuilder::new()
    }
}

impl<'a> GalleryViewBuilder<'a, gallery_view_state::Empty> {
    /// Create a new builder with all fields unset
    pub fn new() -> Self {
        GalleryViewBuilder {
            _state: PhantomData,
            _fields: (None, None, None, None, None, None, None),
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S> GalleryViewBuilder<'a, S>
where
    S: gallery_view_state::State,
    S::Cid: gallery_view_state::IsUnset,
{
    /// Set the `cid` field (required)
    pub fn cid(
        mut self,
        value: impl Into<Cid<'a>>,
    ) -> GalleryViewBuilder<'a, gallery_view_state::SetCid<S>> {
        self._fields.0 = Option::Some(value.into());
        GalleryViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S> GalleryViewBuilder<'a, S>
where
    S: gallery_view_state::State,
    S::Creator: gallery_view_state::IsUnset,
{
    /// Set the `creator` field (required)
    pub fn creator(
        mut self,
        value: impl Into<ProfileView<'a>>,
    ) -> GalleryViewBuilder<'a, gallery_view_state::SetCreator<S>> {
        self._fields.1 = Option::Some(value.into());
        GalleryViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S> GalleryViewBuilder<'a, S>
where
    S: gallery_view_state::State,
    S::IndexedAt: gallery_view_state::IsUnset,
{
    /// Set the `indexedAt` field (required)
    pub fn indexed_at(
        mut self,
        value: impl Into<Datetime>,
    ) -> GalleryViewBuilder<'a, gallery_view_state::SetIndexedAt<S>> {
        self._fields.2 = Option::Some(value.into());
        GalleryViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S: gallery_view_state::State> GalleryViewBuilder<'a, S> {
    /// Set the `items` field (optional)
    pub fn items(mut self, value: impl Into<Option<Vec<PhotoView<'a>>>>) -> Self {
        self._fields.3 = value.into();
        self
    }
    /// Set the `items` field to an Option value (optional)
    pub fn maybe_items(mut self, value: Option<Vec<PhotoView<'a>>>) -> Self {
        self._fields.3 = value;
        self
    }
}

impl<'a, S: gallery_view_state::State> GalleryViewBuilder<'a, S> {
    /// Set the `labels` field (optional)
    pub fn labels(mut self, value: impl Into<Option<Vec<Label<'a>>>>) -> Self {
        self._fields.4 = value.into();
        self
    }
    /// Set the `labels` field to an Option value (optional)
    pub fn maybe_labels(mut self, value: Option<Vec<Label<'a>>>) -> Self {
        self._fields.4 = value;
        self
    }
}

impl<'a, S> GalleryViewBuilder<'a, S>
where
    S: gallery_view_state::State,
    S::Record: gallery_view_state::IsUnset,
{
    /// Set the `record` field (required)
    pub fn record(
        mut self,
        value: impl Into<Data<'a>>,
    ) -> GalleryViewBuilder<'a, gallery_view_state::SetRecord<S>> {
        self._fields.5 = Option::Some(value.into());
        GalleryViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S> GalleryViewBuilder<'a, S>
where
    S: gallery_view_state::State,
    S::Uri: gallery_view_state::IsUnset,
{
    /// Set the `uri` field (required)
    pub fn uri(
        mut self,
        value: impl Into<AtUri<'a>>,
    ) -> GalleryViewBuilder<'a, gallery_view_state::SetUri<S>> {
        self._fields.6 = Option::Some(value.into());
        GalleryViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S> GalleryViewBuilder<'a, S>
where
    S: gallery_view_state::State,
    S::Cid: gallery_view_state::IsSet,
    S::Record: gallery_view_state::IsSet,
    S::Creator: gallery_view_state::IsSet,
    S::IndexedAt: gallery_view_state::IsSet,
    S::Uri: gallery_view_state::IsSet,
{
    /// Build the final struct
    pub fn build(self) -> GalleryView<'a> {
        GalleryView {
            cid: self._fields.0.unwrap(),
            creator: self._fields.1.unwrap(),
            indexed_at: self._fields.2.unwrap(),
            items: self._fields.3,
            labels: self._fields.4,
            record: self._fields.5.unwrap(),
            uri: self._fields.6.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
    ) -> GalleryView<'a> {
        GalleryView {
            cid: self._fields.0.unwrap(),
            creator: self._fields.1.unwrap(),
            indexed_at: self._fields.2.unwrap(),
            items: self._fields.3,
            labels: self._fields.4,
            record: self._fields.5.unwrap(),
            uri: self._fields.6.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

fn lexicon_doc_social_grain_gallery_defs() -> LexiconDoc<'static> {
    #[allow(unused_imports)]
    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
    use jacquard_lexicon::lexicon::*;
    use alloc::collections::BTreeMap;
    LexiconDoc {
        lexicon: Lexicon::Lexicon1,
        id: CowStr::new_static("social.grain.gallery.defs"),
        defs: {
            let mut map = BTreeMap::new();
            map.insert(
                SmolStr::new_static("galleryView"),
                LexUserType::Object(LexObject {
                    required: Some(
                        vec![
                            SmolStr::new_static("uri"), SmolStr::new_static("cid"),
                            SmolStr::new_static("creator"),
                            SmolStr::new_static("record"),
                            SmolStr::new_static("indexedAt")
                        ],
                    ),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("cid"),
                            LexObjectProperty::String(LexString {
                                format: Some(LexStringFormat::Cid),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("creator"),
                            LexObjectProperty::Ref(LexRef {
                                r#ref: CowStr::new_static(
                                    "social.grain.actor.defs#profileView",
                                ),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("indexedAt"),
                            LexObjectProperty::String(LexString {
                                format: Some(LexStringFormat::Datetime),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("items"),
                            LexObjectProperty::Array(LexArray {
                                items: LexArrayItem::Union(LexRefUnion {
                                    refs: vec![
                                        CowStr::new_static("social.grain.photo.defs#photoView")
                                    ],
                                    ..Default::default()
                                }),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("labels"),
                            LexObjectProperty::Array(LexArray {
                                items: LexArrayItem::Ref(LexRef {
                                    r#ref: CowStr::new_static("com.atproto.label.defs#label"),
                                    ..Default::default()
                                }),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("record"),
                            LexObjectProperty::Unknown(LexUnknown {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("uri"),
                            LexObjectProperty::String(LexString {
                                format: Some(LexStringFormat::AtUri),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map
        },
        ..Default::default()
    }
}