1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: place.atwork.profile
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8/// Indicates the identity is available for hire
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 Hash,
17 jacquard_derive::IntoStatic
18)]
19pub struct Forhire;
20impl std::fmt::Display for Forhire {
21 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22 write!(f, "forhire")
23 }
24}
25
26/// Indicates the identity is actively hiring
27#[derive(
28 serde::Serialize,
29 serde::Deserialize,
30 Debug,
31 Clone,
32 PartialEq,
33 Eq,
34 Hash,
35 jacquard_derive::IntoStatic
36)]
37pub struct Hiring;
38impl std::fmt::Display for Hiring {
39 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
40 write!(f, "hiring")
41 }
42}
43
44/// A user profile for AT://Work.Place
45#[jacquard_derive::lexicon]
46#[derive(
47 serde::Serialize,
48 serde::Deserialize,
49 Debug,
50 Clone,
51 PartialEq,
52 Eq,
53 jacquard_derive::IntoStatic,
54 bon::Builder
55)]
56#[serde(rename_all = "camelCase")]
57pub struct Profile<'a> {
58 /// Small image to be displayed next to job listings from account. AKA, 'profile picture'
59 #[serde(skip_serializing_if = "std::option::Option::is_none")]
60 #[builder(into)]
61 #[serde(borrow)]
62 pub avatar: Option<jacquard_common::types::blob::Blob<'a>>,
63 /// Larger horizontal image to display behind profile view.
64 #[serde(skip_serializing_if = "std::option::Option::is_none")]
65 #[builder(into)]
66 #[serde(borrow)]
67 pub banner: Option<jacquard_common::types::blob::Blob<'a>>,
68 /// A free text description of the identity.
69 #[serde(skip_serializing_if = "std::option::Option::is_none")]
70 #[builder(into)]
71 #[serde(borrow)]
72 pub description: Option<jacquard_common::CowStr<'a>>,
73 /// The display name of the identity.
74 #[serde(skip_serializing_if = "std::option::Option::is_none")]
75 #[builder(into)]
76 #[serde(borrow)]
77 pub display_name: Option<jacquard_common::CowStr<'a>>,
78 /// Annotations of text (mentions, URLs, hashtags, etc) in the description.
79 #[serde(skip_serializing_if = "std::option::Option::is_none")]
80 #[builder(into)]
81 #[serde(borrow)]
82 pub facets: Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
83 /// The service used for profile links
84 #[serde(skip_serializing_if = "std::option::Option::is_none")]
85 #[builder(into)]
86 #[serde(borrow)]
87 pub profile_host: Option<jacquard_common::CowStr<'a>>,
88 /// The identity's resume.
89 #[serde(skip_serializing_if = "std::option::Option::is_none")]
90 #[builder(into)]
91 #[serde(borrow)]
92 pub resume: Option<jacquard_common::types::blob::Blob<'a>>,
93 /// The current status of the identity.
94 #[serde(skip_serializing_if = "std::option::Option::is_none")]
95 #[builder(into)]
96 #[serde(borrow)]
97 pub status: Option<jacquard_common::CowStr<'a>>,
98}
99
100/// Typed wrapper for GetRecord response with this collection's record type.
101#[derive(
102 serde::Serialize,
103 serde::Deserialize,
104 Debug,
105 Clone,
106 PartialEq,
107 Eq,
108 jacquard_derive::IntoStatic
109)]
110#[serde(rename_all = "camelCase")]
111pub struct ProfileGetRecordOutput<'a> {
112 #[serde(skip_serializing_if = "std::option::Option::is_none")]
113 #[serde(borrow)]
114 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
115 #[serde(borrow)]
116 pub uri: jacquard_common::types::string::AtUri<'a>,
117 #[serde(borrow)]
118 pub value: Profile<'a>,
119}
120
121/// Marker type for deserializing records from this collection.
122pub struct ProfileRecord;
123impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
124 const NSID: &'static str = "place.atwork.profile";
125 const ENCODING: &'static str = "application/json";
126 type Output<'de> = ProfileGetRecordOutput<'de>;
127 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
128}
129
130impl jacquard_common::types::collection::Collection for Profile<'_> {
131 const NSID: &'static str = "place.atwork.profile";
132 type Record = ProfileRecord;
133}
134
135impl From<ProfileGetRecordOutput<'_>> for Profile<'_> {
136 fn from(output: ProfileGetRecordOutput<'_>) -> Self {
137 use jacquard_common::IntoStatic;
138 output.value.into_static()
139 }
140}