jacquard-api 0.10.2

Generated AT Protocol API bindings for Jacquard
Documentation
// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: games.gamesgamesgamesgames.actor.putProfile
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[jacquard_derive::lexicon]
#[derive(
    serde::Serialize,
    serde::Deserialize,
    Debug,
    Clone,
    PartialEq,
    Eq,
    jacquard_derive::IntoStatic,
    Default
)]
#[serde(rename_all = "camelCase")]
pub struct PutProfile<'a> {
    #[serde(skip_serializing_if = "std::option::Option::is_none")]
    #[serde(borrow)]
    pub avatar: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>,
    #[serde(skip_serializing_if = "std::option::Option::is_none")]
    pub created_at: std::option::Option<jacquard_common::types::string::Datetime>,
    #[serde(skip_serializing_if = "std::option::Option::is_none")]
    #[serde(borrow)]
    pub description: std::option::Option<jacquard_common::CowStr<'a>>,
    ///Annotations of text (mentions, URLs, hashtags, etc)
    #[serde(skip_serializing_if = "std::option::Option::is_none")]
    #[serde(borrow)]
    pub description_facets: std::option::Option<
        Vec<crate::app_bsky::richtext::facet::Facet<'a>>,
    >,
    #[serde(skip_serializing_if = "std::option::Option::is_none")]
    #[serde(borrow)]
    pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
    #[serde(skip_serializing_if = "std::option::Option::is_none")]
    #[serde(borrow)]
    pub pronouns: std::option::Option<jacquard_common::CowStr<'a>>,
    #[serde(skip_serializing_if = "std::option::Option::is_none")]
    #[serde(borrow)]
    pub websites: std::option::Option<
        Vec<crate::games_gamesgamesgamesgames::Website<'a>>,
    >,
}

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

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

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

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