// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: games.gamesgamesgamesgames.createGame
//
// 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;
use jacquard_common::types::string::AtUri;
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::games_gamesgamesgamesgames::AgeRating;
use crate::games_gamesgamesgamesgames::AlternativeName;
use crate::games_gamesgamesgamesgames::ApplicationType;
use crate::games_gamesgamesgamesgames::ExternalVideo;
use crate::games_gamesgamesgamesgames::Genre;
use crate::games_gamesgamesgamesgames::LanguageSupport;
use crate::games_gamesgamesgamesgames::MediaItem;
use crate::games_gamesgamesgamesgames::Mode;
use crate::games_gamesgamesgamesgames::MultiplayerMode;
use crate::games_gamesgamesgamesgames::PlayerPerspective;
use crate::games_gamesgamesgamesgames::Release;
use crate::games_gamesgamesgamesgames::Theme;
use crate::games_gamesgamesgamesgames::TimeToBeat;
use crate::games_gamesgamesgamesgames::Website;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct CreateGame<'a> {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub age_ratings: Option<Vec<AgeRating<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub alternative_names: Option<Vec<AlternativeName<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub application_type: Option<ApplicationType<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub engines: Option<Vec<AtUri<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub genres: Option<Vec<Genre<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub keywords: Option<Vec<CowStr<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub language_supports: Option<Vec<LanguageSupport<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub media: Option<Vec<MediaItem<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub modes: Option<Vec<Mode<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub multiplayer_modes: Option<Vec<MultiplayerMode<'a>>>,
    #[serde(borrow)]
    pub name: CowStr<'a>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub parent: Option<AtUri<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub player_perspectives: Option<Vec<PlayerPerspective<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub releases: Option<Vec<Release<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub should_publish: Option<bool>,
    ///URL-friendly identifier for the game.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub slug: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub storyline: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub summary: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub themes: Option<Vec<Theme<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub time_to_beat: Option<TimeToBeat<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub videos: Option<Vec<ExternalVideo<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub websites: Option<Vec<Website<'a>>>,
}


#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct CreateGameOutput<'a> {
    #[serde(borrow)]
    pub cid: CowStr<'a>,
    #[serde(borrow)]
    pub uri: AtUri<'a>,
}

/// Response type for games.gamesgamesgamesgames.createGame
pub struct CreateGameResponse;
impl jacquard_common::xrpc::XrpcResp for CreateGameResponse {
    const NSID: &'static str = "games.gamesgamesgamesgames.createGame";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = CreateGameOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl<'a> jacquard_common::xrpc::XrpcRequest for CreateGame<'a> {
    const NSID: &'static str = "games.gamesgamesgamesgames.createGame";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Response = CreateGameResponse;
}

/// Endpoint type for games.gamesgamesgamesgames.createGame
pub struct CreateGameRequest;
impl jacquard_common::xrpc::XrpcEndpoint for CreateGameRequest {
    const PATH: &'static str = "/xrpc/games.gamesgamesgamesgames.createGame";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Request<'de> = CreateGame<'de>;
    type Response = CreateGameResponse;
}