Skip to main content

jacquard_api/games_gamesgamesgamesgames/actor/
create_profile.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: games.gamesgamesgamesgames.actor.createProfile
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[allow(unused_imports)]
9use alloc::collections::BTreeMap;
10
11use crate::app_bsky::richtext::facet::Facet;
12use crate::games_gamesgamesgamesgames::Website;
13#[allow(unused_imports)]
14use core::marker::PhantomData;
15use jacquard_common::deps::smol_str::SmolStr;
16use jacquard_common::types::blob::BlobRef;
17use jacquard_common::types::string::{AtUri, Datetime};
18use jacquard_common::types::value::Data;
19use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr};
20use jacquard_derive::IntoStatic;
21use serde::{Deserialize, Serialize};
22
23#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
24#[serde(
25    rename_all = "camelCase",
26    bound(deserialize = "S: Deserialize<'de> + BosStr")
27)]
28pub struct CreateProfile<S: BosStr = DefaultStr> {
29    #[serde(skip_serializing_if = "Option::is_none")]
30    pub avatar: Option<BlobRef<S>>,
31    #[serde(skip_serializing_if = "Option::is_none")]
32    pub created_at: Option<Datetime>,
33    #[serde(skip_serializing_if = "Option::is_none")]
34    pub description: Option<S>,
35    ///Annotations of text (mentions, URLs, hashtags, etc)
36    #[serde(skip_serializing_if = "Option::is_none")]
37    pub description_facets: Option<Vec<Facet<S>>>,
38    #[serde(skip_serializing_if = "Option::is_none")]
39    pub display_name: Option<S>,
40    #[serde(skip_serializing_if = "Option::is_none")]
41    pub pronouns: Option<S>,
42    #[serde(skip_serializing_if = "Option::is_none")]
43    pub websites: Option<Vec<Website<S>>>,
44    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
45    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
46}
47
48#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
49#[serde(
50    rename_all = "camelCase",
51    bound(deserialize = "S: Deserialize<'de> + BosStr")
52)]
53pub struct CreateProfileOutput<S: BosStr = DefaultStr> {
54    pub cid: S,
55    pub uri: AtUri<S>,
56    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
57    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
58}
59
60/** Response marker for the `games.gamesgamesgamesgames.actor.createProfile` procedure.
61
62Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `CreateProfileOutput<S>` for this endpoint.*/
63pub struct CreateProfileResponse;
64impl jacquard_common::xrpc::XrpcResp for CreateProfileResponse {
65    const NSID: &'static str = "games.gamesgamesgamesgames.actor.createProfile";
66    const ENCODING: &'static str = "application/json";
67    type Output<S: BosStr> = CreateProfileOutput<S>;
68    type Err = jacquard_common::xrpc::GenericError;
69}
70
71impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for CreateProfile<S> {
72    const NSID: &'static str = "games.gamesgamesgamesgames.actor.createProfile";
73    const METHOD: jacquard_common::xrpc::XrpcMethod =
74        jacquard_common::xrpc::XrpcMethod::Procedure("application/json");
75    type Response = CreateProfileResponse;
76}
77
78/** Endpoint marker for the `games.gamesgamesgamesgames.actor.createProfile` procedure.
79
80Path: `/xrpc/games.gamesgamesgamesgames.actor.createProfile`. The request payload type is `CreateProfile<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/
81pub struct CreateProfileRequest;
82impl jacquard_common::xrpc::XrpcEndpoint for CreateProfileRequest {
83    const PATH: &'static str = "/xrpc/games.gamesgamesgamesgames.actor.createProfile";
84    const METHOD: jacquard_common::xrpc::XrpcMethod =
85        jacquard_common::xrpc::XrpcMethod::Procedure("application/json");
86    type Request<S: BosStr> = CreateProfile<S>;
87    type Response = CreateProfileResponse;
88}