// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: app.gainforest.organization.info
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

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

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr};

#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::deps::smol_str::SmolStr;
use jacquard_common::types::collection::{Collection, RecordError};
use jacquard_common::types::string::{AtUri, Cid, Datetime, UriValue};
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};
/// A declaration of an organization or project

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
    rename_all = "camelCase",
    rename = "app.gainforest.organization.info",
    tag = "$type",
    bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct Info<S: BosStr = DefaultStr> {
    ///The country of the organization or project in two letter code (ISO 3166-1 alpha-2)
    pub country: S,
    ///Cover image for the organization
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cover_image: Option<Data<S>>,
    ///The date and time of the creation of the record
    pub created_at: Datetime,
    ///The name of the organization or project
    pub display_name: S,
    ///Logo for the organization
    #[serde(skip_serializing_if = "Option::is_none")]
    pub logo: Option<Data<S>>,
    ///The long description of the organization or project in richtext
    pub long_description: S,
    ///The objectives of the organization or project
    pub objectives: Vec<S>,
    ///The description of the organization or project
    pub short_description: S,
    ///The start date of the organization or project
    #[serde(skip_serializing_if = "Option::is_none")]
    pub start_date: Option<Datetime>,
    ///The visibility of the organization or project in the Green Globe
    pub visibility: S,
    ///The website of the organization or project
    #[serde(skip_serializing_if = "Option::is_none")]
    pub website: Option<UriValue<S>>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}

/// 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 InfoGetRecordOutput<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cid: Option<Cid<S>>,
    pub uri: AtUri<S>,
    pub value: Info<S>,
}

impl<S: BosStr> Info<S> {
    pub fn uri(uri: S) -> Result<RecordUri<S, InfoRecord>, UriError> {
        RecordUri::try_from_uri(AtUri::new(uri)?)
    }
}

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

#[derive(Debug, Serialize, Deserialize)]
pub struct InfoRecord;
impl XrpcResp for InfoRecord {
    const NSID: &'static str = "app.gainforest.organization.info";
    const ENCODING: &'static str = "application/json";
    type Output<S: BosStr> = InfoGetRecordOutput<S>;
    type Err = RecordError;
}

impl<S: BosStr> From<InfoGetRecordOutput<S>> for Info<S> {
    fn from(output: InfoGetRecordOutput<S>) -> Self {
        output.value
    }
}

impl<S: BosStr> Collection for Info<S> {
    const NSID: &'static str = "app.gainforest.organization.info";
    type Record = InfoRecord;
}

impl Collection for InfoRecord {
    const NSID: &'static str = "app.gainforest.organization.info";
    type Record = InfoRecord;
}

impl<S: BosStr> LexiconSchema for Info<S> {
    fn nsid() -> &'static str {
        "app.gainforest.organization.info"
    }
    fn def_name() -> &'static str {
        "main"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_gainforest_organization_info()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        {
            let value = &self.display_name;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) > 255usize {
                return Err(ConstraintError::MaxLength {
                    path: ValidationPath::from_field("display_name"),
                    max: 255usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        {
            let value = &self.display_name;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) < 8usize {
                return Err(ConstraintError::MinLength {
                    path: ValidationPath::from_field("display_name"),
                    min: 8usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        {
            let value = &self.long_description;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) > 5000usize {
                return Err(ConstraintError::MaxLength {
                    path: ValidationPath::from_field("long_description"),
                    max: 5000usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        {
            let value = &self.long_description;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) < 50usize {
                return Err(ConstraintError::MinLength {
                    path: ValidationPath::from_field("long_description"),
                    min: 50usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        {
            let value = &self.short_description;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) > 2000usize {
                return Err(ConstraintError::MaxLength {
                    path: ValidationPath::from_field("short_description"),
                    max: 2000usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        {
            let value = &self.short_description;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) < 50usize {
                return Err(ConstraintError::MinLength {
                    path: ValidationPath::from_field("short_description"),
                    min: 50usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        Ok(())
    }
}

pub mod info_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 Country;
        type CreatedAt;
        type DisplayName;
        type LongDescription;
        type Objectives;
        type ShortDescription;
        type Visibility;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Country = Unset;
        type CreatedAt = Unset;
        type DisplayName = Unset;
        type LongDescription = Unset;
        type Objectives = Unset;
        type ShortDescription = Unset;
        type Visibility = Unset;
    }
    ///State transition - sets the `country` field to Set
    pub struct SetCountry<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetCountry<St> {}
    impl<St: State> State for SetCountry<St> {
        type Country = Set<members::country>;
        type CreatedAt = St::CreatedAt;
        type DisplayName = St::DisplayName;
        type LongDescription = St::LongDescription;
        type Objectives = St::Objectives;
        type ShortDescription = St::ShortDescription;
        type Visibility = St::Visibility;
    }
    ///State transition - sets the `created_at` field to Set
    pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
    impl<St: State> State for SetCreatedAt<St> {
        type Country = St::Country;
        type CreatedAt = Set<members::created_at>;
        type DisplayName = St::DisplayName;
        type LongDescription = St::LongDescription;
        type Objectives = St::Objectives;
        type ShortDescription = St::ShortDescription;
        type Visibility = St::Visibility;
    }
    ///State transition - sets the `display_name` field to Set
    pub struct SetDisplayName<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetDisplayName<St> {}
    impl<St: State> State for SetDisplayName<St> {
        type Country = St::Country;
        type CreatedAt = St::CreatedAt;
        type DisplayName = Set<members::display_name>;
        type LongDescription = St::LongDescription;
        type Objectives = St::Objectives;
        type ShortDescription = St::ShortDescription;
        type Visibility = St::Visibility;
    }
    ///State transition - sets the `long_description` field to Set
    pub struct SetLongDescription<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetLongDescription<St> {}
    impl<St: State> State for SetLongDescription<St> {
        type Country = St::Country;
        type CreatedAt = St::CreatedAt;
        type DisplayName = St::DisplayName;
        type LongDescription = Set<members::long_description>;
        type Objectives = St::Objectives;
        type ShortDescription = St::ShortDescription;
        type Visibility = St::Visibility;
    }
    ///State transition - sets the `objectives` field to Set
    pub struct SetObjectives<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetObjectives<St> {}
    impl<St: State> State for SetObjectives<St> {
        type Country = St::Country;
        type CreatedAt = St::CreatedAt;
        type DisplayName = St::DisplayName;
        type LongDescription = St::LongDescription;
        type Objectives = Set<members::objectives>;
        type ShortDescription = St::ShortDescription;
        type Visibility = St::Visibility;
    }
    ///State transition - sets the `short_description` field to Set
    pub struct SetShortDescription<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetShortDescription<St> {}
    impl<St: State> State for SetShortDescription<St> {
        type Country = St::Country;
        type CreatedAt = St::CreatedAt;
        type DisplayName = St::DisplayName;
        type LongDescription = St::LongDescription;
        type Objectives = St::Objectives;
        type ShortDescription = Set<members::short_description>;
        type Visibility = St::Visibility;
    }
    ///State transition - sets the `visibility` field to Set
    pub struct SetVisibility<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetVisibility<St> {}
    impl<St: State> State for SetVisibility<St> {
        type Country = St::Country;
        type CreatedAt = St::CreatedAt;
        type DisplayName = St::DisplayName;
        type LongDescription = St::LongDescription;
        type Objectives = St::Objectives;
        type ShortDescription = St::ShortDescription;
        type Visibility = Set<members::visibility>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `country` field
        pub struct country(());
        ///Marker type for the `created_at` field
        pub struct created_at(());
        ///Marker type for the `display_name` field
        pub struct display_name(());
        ///Marker type for the `long_description` field
        pub struct long_description(());
        ///Marker type for the `objectives` field
        pub struct objectives(());
        ///Marker type for the `short_description` field
        pub struct short_description(());
        ///Marker type for the `visibility` field
        pub struct visibility(());
    }
}

/// Builder for constructing an instance of this type.
pub struct InfoBuilder<St: info_state::State, S: BosStr = DefaultStr> {
    _state: PhantomData<fn() -> St>,
    _fields: (
        Option<S>,
        Option<Data<S>>,
        Option<Datetime>,
        Option<S>,
        Option<Data<S>>,
        Option<S>,
        Option<Vec<S>>,
        Option<S>,
        Option<Datetime>,
        Option<S>,
        Option<UriValue<S>>,
    ),
    _type: PhantomData<fn() -> S>,
}

impl Info<DefaultStr> {
    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
    pub fn new() -> InfoBuilder<info_state::Empty, DefaultStr> {
        InfoBuilder::new()
    }
}

impl<S: BosStr> Info<S> {
    /// Create a new builder for this type
    pub fn builder() -> InfoBuilder<info_state::Empty, S> {
        InfoBuilder::builder()
    }
}

impl InfoBuilder<info_state::Empty, DefaultStr> {
    /// Create a new builder with all fields unset, using the default string type, if needed
    pub fn new() -> Self {
        InfoBuilder {
            _state: PhantomData,
            _fields: (None, None, None, None, None, None, None, None, None, None, None),
            _type: PhantomData,
        }
    }
}

impl<S: BosStr> InfoBuilder<info_state::Empty, S> {
    /// Create a new builder with all fields unset
    pub fn builder() -> Self {
        InfoBuilder {
            _state: PhantomData,
            _fields: (None, None, None, None, None, None, None, None, None, None, None),
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> InfoBuilder<St, S>
where
    St: info_state::State,
    St::Country: info_state::IsUnset,
{
    /// Set the `country` field (required)
    pub fn country(
        mut self,
        value: impl Into<S>,
    ) -> InfoBuilder<info_state::SetCountry<St>, S> {
        self._fields.0 = Option::Some(value.into());
        InfoBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St: info_state::State, S: BosStr> InfoBuilder<St, S> {
    /// Set the `coverImage` field (optional)
    pub fn cover_image(mut self, value: impl Into<Option<Data<S>>>) -> Self {
        self._fields.1 = value.into();
        self
    }
    /// Set the `coverImage` field to an Option value (optional)
    pub fn maybe_cover_image(mut self, value: Option<Data<S>>) -> Self {
        self._fields.1 = value;
        self
    }
}

impl<St, S: BosStr> InfoBuilder<St, S>
where
    St: info_state::State,
    St::CreatedAt: info_state::IsUnset,
{
    /// Set the `createdAt` field (required)
    pub fn created_at(
        mut self,
        value: impl Into<Datetime>,
    ) -> InfoBuilder<info_state::SetCreatedAt<St>, S> {
        self._fields.2 = Option::Some(value.into());
        InfoBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> InfoBuilder<St, S>
where
    St: info_state::State,
    St::DisplayName: info_state::IsUnset,
{
    /// Set the `displayName` field (required)
    pub fn display_name(
        mut self,
        value: impl Into<S>,
    ) -> InfoBuilder<info_state::SetDisplayName<St>, S> {
        self._fields.3 = Option::Some(value.into());
        InfoBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St: info_state::State, S: BosStr> InfoBuilder<St, S> {
    /// Set the `logo` field (optional)
    pub fn logo(mut self, value: impl Into<Option<Data<S>>>) -> Self {
        self._fields.4 = value.into();
        self
    }
    /// Set the `logo` field to an Option value (optional)
    pub fn maybe_logo(mut self, value: Option<Data<S>>) -> Self {
        self._fields.4 = value;
        self
    }
}

impl<St, S: BosStr> InfoBuilder<St, S>
where
    St: info_state::State,
    St::LongDescription: info_state::IsUnset,
{
    /// Set the `longDescription` field (required)
    pub fn long_description(
        mut self,
        value: impl Into<S>,
    ) -> InfoBuilder<info_state::SetLongDescription<St>, S> {
        self._fields.5 = Option::Some(value.into());
        InfoBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> InfoBuilder<St, S>
where
    St: info_state::State,
    St::Objectives: info_state::IsUnset,
{
    /// Set the `objectives` field (required)
    pub fn objectives(
        mut self,
        value: impl Into<Vec<S>>,
    ) -> InfoBuilder<info_state::SetObjectives<St>, S> {
        self._fields.6 = Option::Some(value.into());
        InfoBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> InfoBuilder<St, S>
where
    St: info_state::State,
    St::ShortDescription: info_state::IsUnset,
{
    /// Set the `shortDescription` field (required)
    pub fn short_description(
        mut self,
        value: impl Into<S>,
    ) -> InfoBuilder<info_state::SetShortDescription<St>, S> {
        self._fields.7 = Option::Some(value.into());
        InfoBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St: info_state::State, S: BosStr> InfoBuilder<St, S> {
    /// Set the `startDate` field (optional)
    pub fn start_date(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.8 = value.into();
        self
    }
    /// Set the `startDate` field to an Option value (optional)
    pub fn maybe_start_date(mut self, value: Option<Datetime>) -> Self {
        self._fields.8 = value;
        self
    }
}

impl<St, S: BosStr> InfoBuilder<St, S>
where
    St: info_state::State,
    St::Visibility: info_state::IsUnset,
{
    /// Set the `visibility` field (required)
    pub fn visibility(
        mut self,
        value: impl Into<S>,
    ) -> InfoBuilder<info_state::SetVisibility<St>, S> {
        self._fields.9 = Option::Some(value.into());
        InfoBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St: info_state::State, S: BosStr> InfoBuilder<St, S> {
    /// Set the `website` field (optional)
    pub fn website(mut self, value: impl Into<Option<UriValue<S>>>) -> Self {
        self._fields.10 = value.into();
        self
    }
    /// Set the `website` field to an Option value (optional)
    pub fn maybe_website(mut self, value: Option<UriValue<S>>) -> Self {
        self._fields.10 = value;
        self
    }
}

impl<St, S: BosStr> InfoBuilder<St, S>
where
    St: info_state::State,
    St::Country: info_state::IsSet,
    St::CreatedAt: info_state::IsSet,
    St::DisplayName: info_state::IsSet,
    St::LongDescription: info_state::IsSet,
    St::Objectives: info_state::IsSet,
    St::ShortDescription: info_state::IsSet,
    St::Visibility: info_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> Info<S> {
        Info {
            country: self._fields.0.unwrap(),
            cover_image: self._fields.1,
            created_at: self._fields.2.unwrap(),
            display_name: self._fields.3.unwrap(),
            logo: self._fields.4,
            long_description: self._fields.5.unwrap(),
            objectives: self._fields.6.unwrap(),
            short_description: self._fields.7.unwrap(),
            start_date: self._fields.8,
            visibility: self._fields.9.unwrap(),
            website: self._fields.10,
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> Info<S> {
        Info {
            country: self._fields.0.unwrap(),
            cover_image: self._fields.1,
            created_at: self._fields.2.unwrap(),
            display_name: self._fields.3.unwrap(),
            logo: self._fields.4,
            long_description: self._fields.5.unwrap(),
            objectives: self._fields.6.unwrap(),
            short_description: self._fields.7.unwrap(),
            start_date: self._fields.8,
            visibility: self._fields.9.unwrap(),
            website: self._fields.10,
            extra_data: Some(extra_data),
        }
    }
}

fn lexicon_doc_app_gainforest_organization_info() -> 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("app.gainforest.organization.info"),
        defs: {
            let mut map = BTreeMap::new();
            map.insert(
                SmolStr::new_static("main"),
                LexUserType::Record(LexRecord {
                    description: Some(
                        CowStr::new_static("A declaration of an organization or project"),
                    ),
                    key: Some(CowStr::new_static("literal:self")),
                    record: LexRecordRecord::Object(LexObject {
                        required: Some(
                            vec![
                                SmolStr::new_static("displayName"),
                                SmolStr::new_static("shortDescription"),
                                SmolStr::new_static("longDescription"),
                                SmolStr::new_static("objectives"),
                                SmolStr::new_static("country"),
                                SmolStr::new_static("visibility"),
                                SmolStr::new_static("createdAt")
                            ],
                        ),
                        properties: {
                            #[allow(unused_mut)]
                            let mut map = BTreeMap::new();
                            map.insert(
                                SmolStr::new_static("country"),
                                LexObjectProperty::String(LexString {
                                    description: Some(
                                        CowStr::new_static(
                                            "The country of the organization or project in two letter code (ISO 3166-1 alpha-2)",
                                        ),
                                    ),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("coverImage"),
                                LexObjectProperty::Ref(LexRef {
                                    r#ref: CowStr::new_static(
                                        "app.gainforest.common.defs#smallImage",
                                    ),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("createdAt"),
                                LexObjectProperty::String(LexString {
                                    description: Some(
                                        CowStr::new_static(
                                            "The date and time of the creation of the record",
                                        ),
                                    ),
                                    format: Some(LexStringFormat::Datetime),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("displayName"),
                                LexObjectProperty::String(LexString {
                                    description: Some(
                                        CowStr::new_static(
                                            "The name of the organization or project",
                                        ),
                                    ),
                                    min_length: Some(8usize),
                                    max_length: Some(255usize),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("logo"),
                                LexObjectProperty::Ref(LexRef {
                                    r#ref: CowStr::new_static(
                                        "app.gainforest.common.defs#smallImage",
                                    ),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("longDescription"),
                                LexObjectProperty::String(LexString {
                                    description: Some(
                                        CowStr::new_static(
                                            "The long description of the organization or project in richtext",
                                        ),
                                    ),
                                    min_length: Some(50usize),
                                    max_length: Some(5000usize),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("objectives"),
                                LexObjectProperty::Array(LexArray {
                                    description: Some(
                                        CowStr::new_static(
                                            "The objectives of the organization or project",
                                        ),
                                    ),
                                    items: LexArrayItem::String(LexString {
                                        ..Default::default()
                                    }),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("shortDescription"),
                                LexObjectProperty::String(LexString {
                                    description: Some(
                                        CowStr::new_static(
                                            "The description of the organization or project",
                                        ),
                                    ),
                                    min_length: Some(50usize),
                                    max_length: Some(2000usize),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("startDate"),
                                LexObjectProperty::String(LexString {
                                    description: Some(
                                        CowStr::new_static(
                                            "The start date of the organization or project",
                                        ),
                                    ),
                                    format: Some(LexStringFormat::Datetime),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("visibility"),
                                LexObjectProperty::String(LexString {
                                    description: Some(
                                        CowStr::new_static(
                                            "The visibility of the organization or project in the Green Globe",
                                        ),
                                    ),
                                    ..Default::default()
                                }),
                            );
                            map.insert(
                                SmolStr::new_static("website"),
                                LexObjectProperty::String(LexString {
                                    description: Some(
                                        CowStr::new_static(
                                            "The website of the organization or project",
                                        ),
                                    ),
                                    format: Some(LexStringFormat::Uri),
                                    ..Default::default()
                                }),
                            );
                            map
                        },
                        ..Default::default()
                    }),
                    ..Default::default()
                }),
            );
            map
        },
        ..Default::default()
    }
}