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)]
55#[serde(rename_all = "camelCase")]
56pub struct Profile<'a> {
57 ///Small image to be displayed next to job listings from account. AKA, 'profile picture'
58 #[serde(skip_serializing_if = "std::option::Option::is_none")]
59 #[serde(borrow)]
60 pub avatar: std::option::Option<jacquard_common::types::blob::Blob<'a>>,
61 ///Larger horizontal image to display behind profile view.
62 #[serde(skip_serializing_if = "std::option::Option::is_none")]
63 #[serde(borrow)]
64 pub banner: std::option::Option<jacquard_common::types::blob::Blob<'a>>,
65 ///A free text description of the identity.
66 #[serde(skip_serializing_if = "std::option::Option::is_none")]
67 #[serde(borrow)]
68 pub description: std::option::Option<jacquard_common::CowStr<'a>>,
69 ///The display name of the identity.
70 #[serde(skip_serializing_if = "std::option::Option::is_none")]
71 #[serde(borrow)]
72 pub display_name: std::option::Option<jacquard_common::CowStr<'a>>,
73 ///Annotations of text (mentions, URLs, hashtags, etc) in the description.
74 #[serde(skip_serializing_if = "std::option::Option::is_none")]
75 #[serde(borrow)]
76 pub facets: std::option::Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
77 ///The service used for profile links
78 #[serde(skip_serializing_if = "std::option::Option::is_none")]
79 #[serde(borrow)]
80 pub profile_host: std::option::Option<jacquard_common::CowStr<'a>>,
81 ///The identity's resume.
82 #[serde(skip_serializing_if = "std::option::Option::is_none")]
83 #[serde(borrow)]
84 pub resume: std::option::Option<jacquard_common::types::blob::Blob<'a>>,
85 ///The current status of the identity.
86 #[serde(skip_serializing_if = "std::option::Option::is_none")]
87 #[serde(borrow)]
88 pub status: std::option::Option<jacquard_common::CowStr<'a>>,
89}
90
91/// Typed wrapper for GetRecord response with this collection's record type.
92#[derive(
93 serde::Serialize,
94 serde::Deserialize,
95 Debug,
96 Clone,
97 PartialEq,
98 Eq,
99 jacquard_derive::IntoStatic
100)]
101#[serde(rename_all = "camelCase")]
102pub struct ProfileGetRecordOutput<'a> {
103 #[serde(skip_serializing_if = "std::option::Option::is_none")]
104 #[serde(borrow)]
105 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
106 #[serde(borrow)]
107 pub uri: jacquard_common::types::string::AtUri<'a>,
108 #[serde(borrow)]
109 pub value: Profile<'a>,
110}
111
112/// Marker type for deserializing records from this collection.
113pub struct ProfileRecord;
114impl jacquard_common::xrpc::XrpcResp for ProfileRecord {
115 const NSID: &'static str = "place.atwork.profile";
116 const ENCODING: &'static str = "application/json";
117 type Output<'de> = ProfileGetRecordOutput<'de>;
118 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
119}
120
121impl jacquard_common::types::collection::Collection for Profile<'_> {
122 const NSID: &'static str = "place.atwork.profile";
123 type Record = ProfileRecord;
124}
125
126impl From<ProfileGetRecordOutput<'_>> for Profile<'_> {
127 fn from(output: ProfileGetRecordOutput<'_>) -> Self {
128 use jacquard_common::IntoStatic;
129 output.value.into_static()
130 }
131}