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

//! Generated bindings for the `art.cllctv.embed` Lexicon namespace/module.
pub mod external;
pub mod external_video;
pub mod images;


#[allow(unused_imports)]
use alloc::collections::BTreeMap;
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::value::Data;
use jacquard_derive::IntoStatic;
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::art_cllctv::embed;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct Tombstone<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub camera: Option<embed::TombstoneCamera<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dimensions: Option<embed::TombstoneDimensions<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lens: Option<embed::TombstoneLens<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub materials: Option<Vec<S>>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}


#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct TombstoneCamera<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub make: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub model: Option<S>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}


#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct TombstoneDimensions<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub depth: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub height: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub unit: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub width: Option<i64>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}


#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct TombstoneLens<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub exposure_time: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub fnumber: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub focal_length: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub iso: Option<S>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}

impl<S: BosStr> LexiconSchema for Tombstone<S> {
    fn nsid() -> &'static str {
        "art.cllctv.embed.defs"
    }
    fn def_name() -> &'static str {
        "tombstone"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_art_cllctv_embed_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for TombstoneCamera<S> {
    fn nsid() -> &'static str {
        "art.cllctv.embed.defs"
    }
    fn def_name() -> &'static str {
        "tombstoneCamera"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_art_cllctv_embed_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for TombstoneDimensions<S> {
    fn nsid() -> &'static str {
        "art.cllctv.embed.defs"
    }
    fn def_name() -> &'static str {
        "tombstoneDimensions"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_art_cllctv_embed_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for TombstoneLens<S> {
    fn nsid() -> &'static str {
        "art.cllctv.embed.defs"
    }
    fn def_name() -> &'static str {
        "tombstoneLens"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_art_cllctv_embed_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

fn lexicon_doc_art_cllctv_embed_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("art.cllctv.embed.defs"),
        defs: {
            let mut map = BTreeMap::new();
            map.insert(
                SmolStr::new_static("tombstone"),
                LexUserType::Object(LexObject {
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("camera"),
                            LexObjectProperty::Ref(LexRef {
                                r#ref: CowStr::new_static("#tombstoneCamera"),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("dimensions"),
                            LexObjectProperty::Ref(LexRef {
                                r#ref: CowStr::new_static("#tombstoneDimensions"),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("lens"),
                            LexObjectProperty::Ref(LexRef {
                                r#ref: CowStr::new_static("#tombstoneLens"),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("materials"),
                            LexObjectProperty::Array(LexArray {
                                items: LexArrayItem::String(LexString {
                                    ..Default::default()
                                }),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("tombstoneCamera"),
                LexUserType::Object(LexObject {
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("make"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("model"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("tombstoneDimensions"),
                LexUserType::Object(LexObject {
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("depth"),
                            LexObjectProperty::Integer(LexInteger {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("height"),
                            LexObjectProperty::Integer(LexInteger {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("unit"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("width"),
                            LexObjectProperty::Integer(LexInteger {
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("tombstoneLens"),
                LexUserType::Object(LexObject {
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("exposureTime"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("fnumber"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("focalLength"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("iso"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map
        },
        ..Default::default()
    }
}