// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: games.gamesgamesgamesgames.actor.createProfile
//
// 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::blob::BlobRef;
use jacquard_common::types::string::{AtUri, Datetime};
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::app_bsky::richtext::facet::Facet;
use crate::games_gamesgamesgamesgames::Website;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct CreateProfile<'a> {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub avatar: Option<BlobRef<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub created_at: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub description: Option<CowStr<'a>>,
    ///Annotations of text (mentions, URLs, hashtags, etc)
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub description_facets: Option<Vec<Facet<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub display_name: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub pronouns: Option<CowStr<'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 CreateProfileOutput<'a> {
    #[serde(borrow)]
    pub cid: CowStr<'a>,
    #[serde(borrow)]
    pub uri: AtUri<'a>,
}

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

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

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