1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: place.stream.live.getProfileCard
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[derive(
9 serde::Serialize,
10 serde::Deserialize,
11 Debug,
12 Clone,
13 PartialEq,
14 Eq,
15 bon::Builder,
16 jacquard_derive::IntoStatic
17)]
18#[builder(start_fn = new)]
19#[serde(rename_all = "camelCase")]
20pub struct GetProfileCard<'a> {
21 #[serde(borrow)]
22 #[builder(into)]
23 pub id: jacquard_common::CowStr<'a>,
24}
25
26#[jacquard_derive::lexicon]
27#[derive(
28 serde::Serialize,
29 serde::Deserialize,
30 Debug,
31 Clone,
32 PartialEq,
33 Eq,
34 jacquard_derive::IntoStatic
35)]
36#[serde(rename_all = "camelCase")]
37pub struct GetProfileCardOutput<'a> {}
38#[jacquard_derive::open_union]
39#[derive(
40 serde::Serialize,
41 serde::Deserialize,
42 Debug,
43 Clone,
44 PartialEq,
45 Eq,
46 thiserror::Error,
47 miette::Diagnostic,
48 jacquard_derive::IntoStatic
49)]
50#[serde(tag = "error", content = "message")]
51#[serde(bound(deserialize = "'de: 'a"))]
52pub enum GetProfileCardError<'a> {
53 #[serde(rename = "RepoNotFound")]
54 RepoNotFound(std::option::Option<String>),
55}
56
57impl std::fmt::Display for GetProfileCardError<'_> {
58 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
59 match self {
60 Self::RepoNotFound(msg) => {
61 write!(f, "RepoNotFound")?;
62 if let Some(msg) = msg {
63 write!(f, ": {}", msg)?;
64 }
65 Ok(())
66 }
67 Self::Unknown(err) => write!(f, "Unknown error: {:?}", err),
68 }
69 }
70}
71
72///Response type for
73///place.stream.live.getProfileCard
74pub struct GetProfileCardResponse;
75impl jacquard_common::xrpc::XrpcResp for GetProfileCardResponse {
76 const NSID: &'static str = "place.stream.live.getProfileCard";
77 const ENCODING: &'static str = "*/*";
78 type Output<'de> = GetProfileCardOutput<'de>;
79 type Err<'de> = GetProfileCardError<'de>;
80}
81
82impl<'a> jacquard_common::xrpc::XrpcRequest for GetProfileCard<'a> {
83 const NSID: &'static str = "place.stream.live.getProfileCard";
84 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
85 type Response = GetProfileCardResponse;
86}
87
88///Endpoint type for
89///place.stream.live.getProfileCard
90pub struct GetProfileCardRequest;
91impl jacquard_common::xrpc::XrpcEndpoint for GetProfileCardRequest {
92 const PATH: &'static str = "/xrpc/place.stream.live.getProfileCard";
93 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
94 type Request<'de> = GetProfileCard<'de>;
95 type Response = GetProfileCardResponse;
96}