Skip to main content

jacquard_api/net_anisota/
settings.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: net.anisota.settings
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
11#[allow(unused_imports)]
12use core::marker::PhantomData;
13use jacquard_common::CowStr;
14
15#[allow(unused_imports)]
16use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
17use jacquard_common::types::collection::{Collection, RecordError};
18use jacquard_common::types::string::{AtUri, Cid, Datetime};
19use jacquard_common::types::uri::{RecordUri, UriError};
20use jacquard_common::xrpc::XrpcResp;
21use jacquard_derive::{IntoStatic, lexicon};
22use jacquard_lexicon::lexicon::LexiconDoc;
23use jacquard_lexicon::schema::LexiconSchema;
24
25#[allow(unused_imports)]
26use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
27use serde::{Serialize, Deserialize};
28use crate::net_anisota::settings;
29/// Animation timing and speed settings for various UI animations
30
31#[lexicon]
32#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
33#[serde(rename_all = "camelCase")]
34pub struct AnimationTiming<'a> {
35    ///Card advance exit to right and entrance back in from right (stored as string)
36    #[serde(skip_serializing_if = "Option::is_none")]
37    #[serde(borrow)]
38    pub card_advance: Option<CowStr<'a>>,
39    ///Card flip animation between front and back (stored as string)
40    #[serde(skip_serializing_if = "Option::is_none")]
41    #[serde(borrow)]
42    pub card_flip: Option<CowStr<'a>>,
43    ///Card stack animate in entrance from the top of screen (stored as string)
44    #[serde(skip_serializing_if = "Option::is_none")]
45    #[serde(borrow)]
46    pub card_stack_entrance: Option<CowStr<'a>>,
47    ///Staggered interactive corner element entrance animation (stored as string)
48    #[serde(skip_serializing_if = "Option::is_none")]
49    #[serde(borrow)]
50    pub corner_elements: Option<CowStr<'a>>,
51    ///Card stack height expansion and shrinking when entering/exiting fullscreen (stored as string)
52    #[serde(skip_serializing_if = "Option::is_none")]
53    #[serde(borrow)]
54    pub fullscreen_transitions: Option<CowStr<'a>>,
55    ///Modal entrance and exit animations (stored as string)
56    #[serde(skip_serializing_if = "Option::is_none")]
57    #[serde(borrow)]
58    pub modals: Option<CowStr<'a>>,
59    ///Master speed multiplier that affects all animations (stored as string, e.g. '1.0' = normal speed)
60    #[serde(skip_serializing_if = "Option::is_none")]
61    #[serde(borrow)]
62    pub overall: Option<CowStr<'a>>,
63    ///Page transitions and navigation animations (stored as string)
64    #[serde(skip_serializing_if = "Option::is_none")]
65    #[serde(borrow)]
66    pub page_transitions: Option<CowStr<'a>>,
67    ///Thread train sliding, entering, and exiting animations (stored as string)
68    #[serde(skip_serializing_if = "Option::is_none")]
69    #[serde(borrow)]
70    pub thread_transitions: Option<CowStr<'a>>,
71    ///Control row and feed subtitle fade in/out animations (stored as string)
72    #[serde(skip_serializing_if = "Option::is_none")]
73    #[serde(borrow)]
74    pub ui_transitions: Option<CowStr<'a>>,
75}
76
77
78#[lexicon]
79#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
80#[serde(rename_all = "camelCase")]
81pub struct BatchNotificationTypes<'a> {
82    ///Batch follow notifications
83    #[serde(skip_serializing_if = "Option::is_none")]
84    pub follows: Option<bool>,
85    ///Batch like notifications
86    #[serde(skip_serializing_if = "Option::is_none")]
87    pub likes: Option<bool>,
88    ///Batch mention notifications
89    #[serde(skip_serializing_if = "Option::is_none")]
90    pub mentions: Option<bool>,
91    ///Batch quote notifications
92    #[serde(skip_serializing_if = "Option::is_none")]
93    pub quotes: Option<bool>,
94    ///Batch reply notifications
95    #[serde(skip_serializing_if = "Option::is_none")]
96    pub replies: Option<bool>,
97    ///Batch repost notifications
98    #[serde(skip_serializing_if = "Option::is_none")]
99    pub reposts: Option<bool>,
100}
101
102/// App behavior and functionality settings
103
104#[lexicon]
105#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
106#[serde(rename_all = "camelCase")]
107pub struct BehaviorSettings<'a> {
108    #[serde(skip_serializing_if = "Option::is_none")]
109    #[serde(borrow)]
110    pub animation_timing: Option<settings::AnimationTiming<'a>>,
111    ///Show only Anisota posts in profiles instead of regular Bluesky posts
112    #[serde(skip_serializing_if = "Option::is_none")]
113    pub anisota_only_mode: Option<bool>,
114    ///Whether background audio/soundscapes are enabled by default
115    #[serde(skip_serializing_if = "Option::is_none")]
116    pub audio_enabled: Option<bool>,
117    #[serde(skip_serializing_if = "Option::is_none")]
118    #[serde(borrow)]
119    pub batch_notification_types: Option<settings::BatchNotificationTypes<'a>>,
120    ///Group similar notifications together
121    #[serde(skip_serializing_if = "Option::is_none")]
122    pub batch_notifications: Option<bool>,
123    ///Bypass detached quotes to see the full content that was removed by the author
124    #[serde(skip_serializing_if = "Option::is_none")]
125    pub bypass_detached_quotes: Option<bool>,
126    ///When enabled, show notifications that match either relationship OR follower count filters
127    #[serde(skip_serializing_if = "Option::is_none")]
128    pub combine_relationship_and_follower_filters: Option<bool>,
129    ///Show confirmation before deleting
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub confirm_deletes: Option<bool>,
132    ///Show warning before saving drafts
133    #[serde(skip_serializing_if = "Option::is_none")]
134    pub confirm_draft_saves: Option<bool>,
135    ///Default page to show on app load
136    #[serde(skip_serializing_if = "Option::is_none")]
137    #[serde(borrow)]
138    pub default_home_page: Option<CowStr<'a>>,
139    ///Default publishing target for new posts
140    #[serde(skip_serializing_if = "Option::is_none")]
141    #[serde(borrow)]
142    pub default_post_target: Option<CowStr<'a>>,
143    ///How long to cache feed position in minutes (30, 60, 360, 720, 1440, 10080)
144    #[serde(skip_serializing_if = "Option::is_none")]
145    pub feed_cache_length: Option<i64>,
146    ///Filter by follower to following ratio
147    #[serde(skip_serializing_if = "Option::is_none")]
148    pub filter_by_follower_ratio: Option<bool>,
149    #[serde(skip_serializing_if = "Option::is_none")]
150    #[serde(borrow)]
151    pub filter_notification_types: Option<settings::FilterNotificationTypes<'a>>,
152    ///Filter notifications by follower count
153    #[serde(skip_serializing_if = "Option::is_none")]
154    pub filter_notifications_by_followers: Option<bool>,
155    ///Filter notifications based on relationship with the author
156    #[serde(skip_serializing_if = "Option::is_none")]
157    pub filter_notifications_by_relationship: Option<bool>,
158    #[serde(skip_serializing_if = "Option::is_none")]
159    #[serde(borrow)]
160    pub filter_relationship_types: Option<settings::FilterRelationshipTypes<'a>>,
161    ///Force chronological sorting of posts
162    #[serde(skip_serializing_if = "Option::is_none")]
163    pub force_chronological_sort: Option<bool>,
164    ///Fullscreen behavior mode: fullscreen (show control row), immersive (hide all UI), or cycle (cycle through states)
165    #[serde(skip_serializing_if = "Option::is_none")]
166    #[serde(borrow)]
167    pub fullscreen_behavior: Option<CowStr<'a>>,
168    ///Hide posts that have been liked or reposted to focus on new content
169    #[serde(skip_serializing_if = "Option::is_none")]
170    pub hide_interacted_posts: Option<bool>,
171    ///Hide the exact notification count in the corner element, always showing 'notifications' instead
172    #[serde(skip_serializing_if = "Option::is_none")]
173    pub hide_notification_count: Option<bool>,
174    ///Hide posts that have been read
175    #[serde(skip_serializing_if = "Option::is_none")]
176    pub hide_read_posts: Option<bool>,
177    #[serde(skip_serializing_if = "Option::is_none")]
178    #[serde(borrow)]
179    pub hide_reposts: Option<settings::HideReposts<'a>>,
180    ///Also require a minimum follower-to-following ratio for highlighting
181    #[serde(skip_serializing_if = "Option::is_none")]
182    pub highlight_by_follower_ratio: Option<bool>,
183    ///Maximum follower count for notification highlighting
184    #[serde(skip_serializing_if = "Option::is_none")]
185    pub highlight_max_follower_count: Option<i64>,
186    ///Minimum follower count for notification highlighting (stored as string or integer)
187    #[serde(skip_serializing_if = "Option::is_none")]
188    #[serde(borrow)]
189    pub highlight_min_follower_count: Option<CowStr<'a>>,
190    ///Minimum follower-to-following ratio for highlighting (stored as string)
191    #[serde(skip_serializing_if = "Option::is_none")]
192    #[serde(borrow)]
193    pub highlight_min_follower_ratio: Option<CowStr<'a>>,
194    #[serde(skip_serializing_if = "Option::is_none")]
195    #[serde(borrow)]
196    pub highlight_notification_types: Option<settings::HighlightNotificationTypes<'a>>,
197    ///Enable notification highlighting to surface important notifications from notable accounts
198    #[serde(skip_serializing_if = "Option::is_none")]
199    pub highlight_notifications: Option<bool>,
200    ///Include engagement metrics from reply posts in stats calculations
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub include_reply_engagement: Option<bool>,
203    #[serde(skip_serializing_if = "Option::is_none")]
204    #[serde(borrow)]
205    pub keyboard_shortcuts: Option<settings::KeyboardShortcuts<'a>>,
206    ///Maximum follower count for notification filtering
207    #[serde(skip_serializing_if = "Option::is_none")]
208    pub max_follower_count: Option<i64>,
209    ///Minimum follower count for notification filtering (stored as string)
210    #[serde(skip_serializing_if = "Option::is_none")]
211    #[serde(borrow)]
212    pub min_follower_count: Option<CowStr<'a>>,
213    ///Minimum follower ratio for filtering (stored as string)
214    #[serde(skip_serializing_if = "Option::is_none")]
215    #[serde(borrow)]
216    pub min_follower_ratio: Option<CowStr<'a>>,
217    #[serde(skip_serializing_if = "Option::is_none")]
218    #[serde(borrow)]
219    pub moderation_settings: Option<settings::ModerationSettings<'a>>,
220    ///Enable post drafts feature
221    #[serde(skip_serializing_if = "Option::is_none")]
222    pub post_drafts: Option<bool>,
223    ///Show newest posts first
224    #[serde(skip_serializing_if = "Option::is_none")]
225    pub reverse_feed_order: Option<bool>,
226    ///Show content from users you have blocked
227    #[serde(skip_serializing_if = "Option::is_none")]
228    pub show_blocked_posts: Option<bool>,
229    ///Show New Highlights section in notifications
230    #[serde(skip_serializing_if = "Option::is_none")]
231    pub show_new_highlights_section: Option<bool>,
232    ///Enable notification sections (New Highlights, Unread, Recently Read, Older)
233    #[serde(skip_serializing_if = "Option::is_none")]
234    pub show_notification_sections: Option<bool>,
235    ///Show Older section in notifications
236    #[serde(skip_serializing_if = "Option::is_none")]
237    pub show_older_section: Option<bool>,
238    ///Display rarity indicator and rate in the stats modal header
239    #[serde(skip_serializing_if = "Option::is_none")]
240    pub show_rarity_in_header: Option<bool>,
241    ///Show Recently Read section in notifications
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub show_recently_read_section: Option<bool>,
244    ///Show thread suggestion when typing beyond character limit in post composer
245    #[serde(skip_serializing_if = "Option::is_none")]
246    pub show_thread_suggestion: Option<bool>,
247    ///Show Unread section in notifications
248    #[serde(skip_serializing_if = "Option::is_none")]
249    pub show_unread_section: Option<bool>,
250    ///Selected background audio soundscape
251    #[serde(skip_serializing_if = "Option::is_none")]
252    #[serde(borrow)]
253    pub soundscape: Option<CowStr<'a>>,
254    #[serde(skip_serializing_if = "Option::is_none")]
255    #[serde(borrow)]
256    pub stats_visible_sections: Option<settings::StatsVisibleSections<'a>>,
257    ///Filter out posts with images and videos for distraction-free reading
258    #[serde(skip_serializing_if = "Option::is_none")]
259    pub text_only_mode: Option<bool>,
260    ///Track which posts have been read
261    #[serde(skip_serializing_if = "Option::is_none")]
262    pub track_read_posts: Option<bool>,
263}
264
265/// Control button visibility settings
266
267#[lexicon]
268#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
269#[serde(rename_all = "camelCase")]
270pub struct ControlSettings<'a> {
271    ///Show account list button
272    #[serde(skip_serializing_if = "Option::is_none")]
273    pub account_list: Option<bool>,
274    ///Show back button
275    #[serde(skip_serializing_if = "Option::is_none")]
276    pub back: Option<bool>,
277    ///Show expandable comment button
278    #[serde(skip_serializing_if = "Option::is_none")]
279    pub comment_button: Option<bool>,
280    ///Show copy author DID button
281    #[serde(skip_serializing_if = "Option::is_none")]
282    pub copy_author_did: Option<bool>,
283    ///Show expandable copy button
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub copy_button: Option<bool>,
286    ///Show copy post link button
287    #[serde(skip_serializing_if = "Option::is_none")]
288    pub copy_post_link: Option<bool>,
289    ///Show copy post text button
290    #[serde(skip_serializing_if = "Option::is_none")]
291    pub copy_post_text: Option<bool>,
292    ///Show delete button
293    #[serde(skip_serializing_if = "Option::is_none")]
294    pub delete: Option<bool>,
295    ///Show expandable engage button
296    #[serde(skip_serializing_if = "Option::is_none")]
297    pub engage_button: Option<bool>,
298    ///Show feed switcher button
299    #[serde(skip_serializing_if = "Option::is_none")]
300    pub feed_switcher: Option<bool>,
301    ///Show fetch button
302    #[serde(skip_serializing_if = "Option::is_none")]
303    pub fetch: Option<bool>,
304    ///Show flip button
305    #[serde(skip_serializing_if = "Option::is_none")]
306    pub flip: Option<bool>,
307    ///Show forward button
308    #[serde(skip_serializing_if = "Option::is_none")]
309    pub forward: Option<bool>,
310    ///Show fullscreen button
311    #[serde(skip_serializing_if = "Option::is_none")]
312    pub fullscreen: Option<bool>,
313    ///Show leaflet publications button
314    #[serde(skip_serializing_if = "Option::is_none")]
315    pub leaflet_publications: Option<bool>,
316    ///Show like button
317    #[serde(skip_serializing_if = "Option::is_none")]
318    pub like: Option<bool>,
319    ///Show list button
320    #[serde(skip_serializing_if = "Option::is_none")]
321    pub list: Option<bool>,
322    ///Show expandable multi-engage button
323    #[serde(skip_serializing_if = "Option::is_none")]
324    pub multi_engage_button: Option<bool>,
325    ///Show expandable multi-repost button
326    #[serde(skip_serializing_if = "Option::is_none")]
327    pub multi_repost_button: Option<bool>,
328    ///Show position button
329    #[serde(skip_serializing_if = "Option::is_none")]
330    pub position_button: Option<bool>,
331    ///Show post list button
332    #[serde(skip_serializing_if = "Option::is_none")]
333    pub post_list: Option<bool>,
334    ///Show quick access button
335    #[serde(skip_serializing_if = "Option::is_none")]
336    pub quick_access: Option<bool>,
337    ///Show quote button
338    #[serde(skip_serializing_if = "Option::is_none")]
339    pub quote: Option<bool>,
340    ///Show relationship button
341    #[serde(skip_serializing_if = "Option::is_none")]
342    pub relationship_button: Option<bool>,
343    ///Show reply button
344    #[serde(skip_serializing_if = "Option::is_none")]
345    pub reply: Option<bool>,
346    ///Show repost button
347    #[serde(skip_serializing_if = "Option::is_none")]
348    pub repost: Option<bool>,
349    ///Show shuffle button
350    #[serde(skip_serializing_if = "Option::is_none")]
351    pub shuffle: Option<bool>,
352    ///Show text only mode button
353    #[serde(skip_serializing_if = "Option::is_none")]
354    pub text_only_mode: Option<bool>,
355}
356
357/// Corner element positioning settings
358
359#[lexicon]
360#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
361#[serde(rename_all = "camelCase")]
362pub struct CornerElements<'a> {
363    ///Element to show in bottom left corner
364    #[serde(skip_serializing_if = "Option::is_none")]
365    #[serde(borrow)]
366    pub bottom_left: Option<CowStr<'a>>,
367    ///Element to show in bottom right corner
368    #[serde(skip_serializing_if = "Option::is_none")]
369    #[serde(borrow)]
370    pub bottom_right: Option<CowStr<'a>>,
371    ///Element to show in top left corner
372    #[serde(skip_serializing_if = "Option::is_none")]
373    #[serde(borrow)]
374    pub top_left: Option<CowStr<'a>>,
375    ///Element to show in top right corner
376    #[serde(skip_serializing_if = "Option::is_none")]
377    #[serde(borrow)]
378    pub top_right: Option<CowStr<'a>>,
379}
380
381
382#[lexicon]
383#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
384#[serde(rename_all = "camelCase")]
385pub struct FilterNotificationTypes<'a> {
386    ///Show follow notifications
387    #[serde(skip_serializing_if = "Option::is_none")]
388    pub follows: Option<bool>,
389    ///Show like notifications
390    #[serde(skip_serializing_if = "Option::is_none")]
391    pub likes: Option<bool>,
392    ///Show mention notifications
393    #[serde(skip_serializing_if = "Option::is_none")]
394    pub mentions: Option<bool>,
395    ///Show quote notifications
396    #[serde(skip_serializing_if = "Option::is_none")]
397    pub quotes: Option<bool>,
398    ///Show reply notifications
399    #[serde(skip_serializing_if = "Option::is_none")]
400    pub replies: Option<bool>,
401    ///Show repost notifications
402    #[serde(skip_serializing_if = "Option::is_none")]
403    pub reposts: Option<bool>,
404}
405
406
407#[lexicon]
408#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
409#[serde(rename_all = "camelCase")]
410pub struct FilterRelationshipTypes<'a> {
411    ///Show notifications from followers
412    #[serde(skip_serializing_if = "Option::is_none")]
413    pub followers: Option<bool>,
414    ///Show notifications from accounts you follow
415    #[serde(skip_serializing_if = "Option::is_none")]
416    pub following: Option<bool>,
417    ///Show notifications from mutual connections
418    #[serde(skip_serializing_if = "Option::is_none")]
419    pub mutuals: Option<bool>,
420    ///Show notifications from followers you don't follow back
421    #[serde(skip_serializing_if = "Option::is_none")]
422    pub non_mutuals: Option<bool>,
423}
424
425
426#[lexicon]
427#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
428#[serde(rename_all = "camelCase")]
429pub struct HideReposts<'a> {
430    ///Hide reposts in feed
431    #[serde(skip_serializing_if = "Option::is_none")]
432    pub feed: Option<bool>,
433    ///Hide reposts in profile
434    #[serde(skip_serializing_if = "Option::is_none")]
435    pub profile: Option<bool>,
436}
437
438
439#[lexicon]
440#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
441#[serde(rename_all = "camelCase")]
442pub struct HighlightNotificationTypes<'a> {
443    ///Highlight follow notifications
444    #[serde(skip_serializing_if = "Option::is_none")]
445    pub follows: Option<bool>,
446    ///Highlight like notifications
447    #[serde(skip_serializing_if = "Option::is_none")]
448    pub likes: Option<bool>,
449    ///Highlight mention notifications
450    #[serde(skip_serializing_if = "Option::is_none")]
451    pub mentions: Option<bool>,
452    ///Highlight quote notifications
453    #[serde(skip_serializing_if = "Option::is_none")]
454    pub quotes: Option<bool>,
455    ///Highlight reply notifications
456    #[serde(skip_serializing_if = "Option::is_none")]
457    pub replies: Option<bool>,
458    ///Highlight repost notifications
459    #[serde(skip_serializing_if = "Option::is_none")]
460    pub reposts: Option<bool>,
461}
462
463/// Keyboard shortcut configuration
464
465#[lexicon]
466#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
467#[serde(rename_all = "camelCase")]
468pub struct KeyboardShortcuts<'a> {
469    #[serde(skip_serializing_if = "Option::is_none")]
470    #[serde(borrow)]
471    pub composer: Option<settings::KeyboardShortcutsComposer<'a>>,
472    #[serde(skip_serializing_if = "Option::is_none")]
473    #[serde(borrow)]
474    pub global: Option<settings::KeyboardShortcutsGlobal<'a>>,
475    #[serde(skip_serializing_if = "Option::is_none")]
476    #[serde(borrow)]
477    pub modals: Option<settings::KeyboardShortcutsModals<'a>>,
478    #[serde(skip_serializing_if = "Option::is_none")]
479    #[serde(borrow)]
480    pub navigation: Option<settings::KeyboardShortcutsNavigation<'a>>,
481    #[serde(skip_serializing_if = "Option::is_none")]
482    #[serde(borrow)]
483    pub post_interactions: Option<settings::KeyboardShortcutsPostInteractions<'a>>,
484}
485
486/// Post composer keyboard shortcuts
487
488#[lexicon]
489#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
490#[serde(rename_all = "camelCase")]
491pub struct KeyboardShortcutsComposer<'a> {
492    ///Publish post (e.g., ctrl+enter)
493    #[serde(skip_serializing_if = "Option::is_none")]
494    #[serde(borrow)]
495    pub publish: Option<CowStr<'a>>,
496}
497
498/// Global navigation keyboard shortcuts
499
500#[lexicon]
501#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
502#[serde(rename_all = "camelCase")]
503pub struct KeyboardShortcutsGlobal<'a> {
504    ///Navigate to collection
505    #[serde(skip_serializing_if = "Option::is_none")]
506    #[serde(borrow)]
507    pub collection: Option<CowStr<'a>>,
508    ///Navigate to feed
509    #[serde(skip_serializing_if = "Option::is_none")]
510    #[serde(borrow)]
511    pub feed: Option<CowStr<'a>>,
512    ///Navigate to inventory
513    #[serde(skip_serializing_if = "Option::is_none")]
514    #[serde(borrow)]
515    pub inventory: Option<CowStr<'a>>,
516    ///Navigate to profile
517    #[serde(skip_serializing_if = "Option::is_none")]
518    #[serde(borrow)]
519    pub profile: Option<CowStr<'a>>,
520}
521
522/// Modal keyboard shortcuts
523
524#[lexicon]
525#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
526#[serde(rename_all = "camelCase")]
527pub struct KeyboardShortcutsModals<'a> {
528    ///Show keyboard shortcuts help
529    #[serde(skip_serializing_if = "Option::is_none")]
530    #[serde(borrow)]
531    pub keyboard_help: Option<CowStr<'a>>,
532    ///Open notifications
533    #[serde(skip_serializing_if = "Option::is_none")]
534    #[serde(borrow)]
535    pub notifications: Option<CowStr<'a>>,
536    ///Open post composer
537    #[serde(skip_serializing_if = "Option::is_none")]
538    #[serde(borrow)]
539    pub post_composer: Option<CowStr<'a>>,
540    ///Open stats modal
541    #[serde(skip_serializing_if = "Option::is_none")]
542    #[serde(borrow)]
543    pub stats: Option<CowStr<'a>>,
544    ///Open touch menu
545    #[serde(skip_serializing_if = "Option::is_none")]
546    #[serde(borrow)]
547    pub touch_menu: Option<CowStr<'a>>,
548}
549
550/// Navigation keyboard shortcuts
551
552#[lexicon]
553#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
554#[serde(rename_all = "camelCase")]
555pub struct KeyboardShortcutsNavigation<'a> {
556    ///Scroll down or next item
557    #[serde(skip_serializing_if = "Option::is_none")]
558    #[serde(borrow)]
559    pub arrow_down: Option<CowStr<'a>>,
560    ///Go back to previous card
561    #[serde(skip_serializing_if = "Option::is_none")]
562    #[serde(borrow)]
563    pub arrow_left: Option<CowStr<'a>>,
564    ///Advance to next card
565    #[serde(skip_serializing_if = "Option::is_none")]
566    #[serde(borrow)]
567    pub arrow_right: Option<CowStr<'a>>,
568    ///Scroll up or previous item
569    #[serde(skip_serializing_if = "Option::is_none")]
570    #[serde(borrow)]
571    pub arrow_up: Option<CowStr<'a>>,
572    ///Exit fullscreen or close modals
573    #[serde(skip_serializing_if = "Option::is_none")]
574    #[serde(borrow)]
575    pub escape: Option<CowStr<'a>>,
576}
577
578/// Post interaction keyboard shortcuts
579
580#[lexicon]
581#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
582#[serde(rename_all = "camelCase")]
583pub struct KeyboardShortcutsPostInteractions<'a> {
584    ///Like current post
585    #[serde(skip_serializing_if = "Option::is_none")]
586    #[serde(borrow)]
587    pub like: Option<CowStr<'a>>,
588    ///Quote current post
589    #[serde(skip_serializing_if = "Option::is_none")]
590    #[serde(borrow)]
591    pub quote: Option<CowStr<'a>>,
592    ///Reply to current post
593    #[serde(skip_serializing_if = "Option::is_none")]
594    #[serde(borrow)]
595    pub reply: Option<CowStr<'a>>,
596    ///Repost current post
597    #[serde(skip_serializing_if = "Option::is_none")]
598    #[serde(borrow)]
599    pub repost: Option<CowStr<'a>>,
600}
601
602/// User settings for the Anisota app, synchronized across devices via ATProto
603
604#[lexicon]
605#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
606#[serde(rename_all = "camelCase", rename = "net.anisota.settings", tag = "$type")]
607pub struct Settings<'a> {
608    #[serde(skip_serializing_if = "Option::is_none")]
609    #[serde(borrow)]
610    pub behavior_settings: Option<settings::BehaviorSettings<'a>>,
611    ///Order of control buttons
612    #[serde(skip_serializing_if = "Option::is_none")]
613    #[serde(borrow)]
614    pub control_order: Option<Vec<CowStr<'a>>>,
615    #[serde(skip_serializing_if = "Option::is_none")]
616    #[serde(borrow)]
617    pub control_settings: Option<settings::ControlSettings<'a>>,
618    ///When the settings record was first created
619    pub created_at: Datetime,
620    ///Selected color theme
621    #[serde(skip_serializing_if = "Option::is_none")]
622    #[serde(borrow)]
623    pub theme: Option<CowStr<'a>>,
624    #[serde(skip_serializing_if = "Option::is_none")]
625    #[serde(borrow)]
626    pub ui_settings: Option<settings::UiSettings<'a>>,
627    ///When the settings were last updated
628    pub updated_at: Datetime,
629    ///Settings schema version for backward compatibility
630    pub version: i64,
631}
632
633/// Typed wrapper for GetRecord response with this collection's record type.
634
635#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
636#[serde(rename_all = "camelCase")]
637pub struct SettingsGetRecordOutput<'a> {
638    #[serde(skip_serializing_if = "Option::is_none")]
639    #[serde(borrow)]
640    pub cid: Option<Cid<'a>>,
641    #[serde(borrow)]
642    pub uri: AtUri<'a>,
643    #[serde(borrow)]
644    pub value: Settings<'a>,
645}
646
647/// Content moderation and filtering settings
648
649#[lexicon]
650#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
651#[serde(rename_all = "camelCase")]
652pub struct ModerationSettings<'a> {
653    ///How to handle posts from muted accounts
654    #[serde(skip_serializing_if = "Option::is_none")]
655    #[serde(borrow)]
656    pub muted_accounts_handling: Option<CowStr<'a>>,
657    ///How to handle posts containing muted words or phrases
658    #[serde(skip_serializing_if = "Option::is_none")]
659    #[serde(borrow)]
660    pub muted_content_handling: Option<CowStr<'a>>,
661}
662
663
664#[lexicon]
665#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
666#[serde(rename_all = "camelCase")]
667pub struct StatsVisibleSections<'a> {
668    ///Show activity section in stats overview
669    #[serde(skip_serializing_if = "Option::is_none")]
670    pub activity: Option<bool>,
671    ///Show engagement section in stats overview
672    #[serde(skip_serializing_if = "Option::is_none")]
673    pub engagement: Option<bool>,
674    ///Show progress section in stats overview
675    #[serde(skip_serializing_if = "Option::is_none")]
676    pub progress: Option<bool>,
677}
678
679/// UI visibility and behavior settings
680
681#[lexicon]
682#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
683#[serde(rename_all = "camelCase")]
684pub struct UiSettings<'a> {
685    #[serde(skip_serializing_if = "Option::is_none")]
686    #[serde(borrow)]
687    pub corner_elements: Option<settings::CornerElements<'a>>,
688    ///Font size scale (0.8 = 80%, 1.0 = 100% default, 1.2 = 120%)
689    #[serde(skip_serializing_if = "Option::is_none")]
690    #[serde(borrow)]
691    pub font_size: Option<CowStr<'a>>,
692    ///Primary name slot for post cards
693    #[serde(skip_serializing_if = "Option::is_none")]
694    #[serde(borrow)]
695    pub post_card_primary_slot: Option<CowStr<'a>>,
696    ///Secondary name slot for post cards
697    #[serde(skip_serializing_if = "Option::is_none")]
698    #[serde(borrow)]
699    pub post_card_secondary_slot: Option<CowStr<'a>>,
700    ///Primary name slot for profile cards
701    #[serde(skip_serializing_if = "Option::is_none")]
702    #[serde(borrow)]
703    pub profile_card_primary_slot: Option<CowStr<'a>>,
704    ///Secondary name slot for profile cards
705    #[serde(skip_serializing_if = "Option::is_none")]
706    #[serde(borrow)]
707    pub profile_card_secondary_slot: Option<CowStr<'a>>,
708    ///Show Bluesky icon in post card headers
709    #[serde(skip_serializing_if = "Option::is_none")]
710    pub show_post_card_at_symbol: Option<bool>,
711    ///Show avatar image in post card footer
712    #[serde(skip_serializing_if = "Option::is_none")]
713    pub show_post_card_avatar: Option<bool>,
714    ///Show display name on post cards
715    #[serde(skip_serializing_if = "Option::is_none")]
716    pub show_post_card_display_name: Option<bool>,
717    ///Show the entire post card footer section
718    #[serde(skip_serializing_if = "Option::is_none")]
719    pub show_post_card_footer: Option<bool>,
720    ///Show handle/username on post cards
721    #[serde(skip_serializing_if = "Option::is_none")]
722    pub show_post_card_handle: Option<bool>,
723    ///Show the entire post card header section
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub show_post_card_header: Option<bool>,
726    ///Show post number indicator
727    #[serde(skip_serializing_if = "Option::is_none")]
728    pub show_post_count: Option<bool>,
729    ///Show indicator for posts that have been read
730    #[serde(skip_serializing_if = "Option::is_none")]
731    pub show_post_read_indicator: Option<bool>,
732    ///Show Bluesky icon on profile cards
733    #[serde(skip_serializing_if = "Option::is_none")]
734    pub show_profile_at_symbol: Option<bool>,
735    ///Show blocked count on profiles
736    #[serde(skip_serializing_if = "Option::is_none")]
737    pub show_profile_blocked: Option<bool>,
738    ///Show blocking count on profiles
739    #[serde(skip_serializing_if = "Option::is_none")]
740    pub show_profile_blocking: Option<bool>,
741    ///Show cancelled count on profiles
742    #[serde(skip_serializing_if = "Option::is_none")]
743    pub show_profile_cancelled: Option<bool>,
744    ///Show cancelling count on profiles
745    #[serde(skip_serializing_if = "Option::is_none")]
746    pub show_profile_cancelling: Option<bool>,
747    ///Show avatar image in profile card footer
748    #[serde(skip_serializing_if = "Option::is_none")]
749    pub show_profile_card_avatar: Option<bool>,
750    ///Show the entire profile card footer section
751    #[serde(skip_serializing_if = "Option::is_none")]
752    pub show_profile_card_footer: Option<bool>,
753    ///Show the entire profile card header section
754    #[serde(skip_serializing_if = "Option::is_none")]
755    pub show_profile_card_header: Option<bool>,
756    ///Show collection count on profiles
757    #[serde(skip_serializing_if = "Option::is_none")]
758    pub show_profile_collections: Option<bool>,
759    ///Show display name on profile cards
760    #[serde(skip_serializing_if = "Option::is_none")]
761    pub show_profile_display_name: Option<bool>,
762    ///Show follower count on profiles
763    #[serde(skip_serializing_if = "Option::is_none")]
764    pub show_profile_followers: Option<bool>,
765    ///Show following count on profiles
766    #[serde(skip_serializing_if = "Option::is_none")]
767    pub show_profile_following: Option<bool>,
768    ///Show handle/username on profile cards
769    #[serde(skip_serializing_if = "Option::is_none")]
770    pub show_profile_handle: Option<bool>,
771    ///Show lexicon count on profiles
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub show_profile_lexicons: Option<bool>,
774    ///Show listed count on profiles
775    #[serde(skip_serializing_if = "Option::is_none")]
776    pub show_profile_listed: Option<bool>,
777    ///Show listing count on profiles
778    #[serde(skip_serializing_if = "Option::is_none")]
779    pub show_profile_listing: Option<bool>,
780    ///Show lists count on profiles
781    #[serde(skip_serializing_if = "Option::is_none")]
782    pub show_profile_lists: Option<bool>,
783    ///Show post count on profiles
784    #[serde(skip_serializing_if = "Option::is_none")]
785    pub show_profile_posts: Option<bool>,
786    ///Show pronouns on profile cards
787    #[serde(skip_serializing_if = "Option::is_none")]
788    pub show_profile_pronouns: Option<bool>,
789    ///Show verified count on profiles
790    #[serde(skip_serializing_if = "Option::is_none")]
791    pub show_profile_verified: Option<bool>,
792    ///Show verifying count on profiles
793    #[serde(skip_serializing_if = "Option::is_none")]
794    pub show_profile_verifying: Option<bool>,
795    ///Show website link on profile cards
796    #[serde(skip_serializing_if = "Option::is_none")]
797    pub show_profile_website: Option<bool>,
798    ///Show rarity indicator based on post engagement
799    #[serde(skip_serializing_if = "Option::is_none")]
800    pub show_rarity_indicator: Option<bool>,
801    ///Show when the post was created
802    #[serde(skip_serializing_if = "Option::is_none")]
803    pub show_timestamp: Option<bool>,
804    ///Show author username on posts
805    #[serde(skip_serializing_if = "Option::is_none")]
806    pub show_username: Option<bool>,
807}
808
809impl<'a> Settings<'a> {
810    pub fn uri(
811        uri: impl Into<CowStr<'a>>,
812    ) -> Result<RecordUri<'a, SettingsRecord>, UriError> {
813        RecordUri::try_from_uri(AtUri::new_cow(uri.into())?)
814    }
815}
816
817impl<'a> LexiconSchema for AnimationTiming<'a> {
818    fn nsid() -> &'static str {
819        "net.anisota.settings"
820    }
821    fn def_name() -> &'static str {
822        "animationTiming"
823    }
824    fn lexicon_doc() -> LexiconDoc<'static> {
825        lexicon_doc_net_anisota_settings()
826    }
827    fn validate(&self) -> Result<(), ConstraintError> {
828        if let Some(ref value) = self.card_advance {
829            #[allow(unused_comparisons)]
830            if <str>::len(value.as_ref()) > 10usize {
831                return Err(ConstraintError::MaxLength {
832                    path: ValidationPath::from_field("card_advance"),
833                    max: 10usize,
834                    actual: <str>::len(value.as_ref()),
835                });
836            }
837        }
838        if let Some(ref value) = self.card_flip {
839            #[allow(unused_comparisons)]
840            if <str>::len(value.as_ref()) > 10usize {
841                return Err(ConstraintError::MaxLength {
842                    path: ValidationPath::from_field("card_flip"),
843                    max: 10usize,
844                    actual: <str>::len(value.as_ref()),
845                });
846            }
847        }
848        if let Some(ref value) = self.card_stack_entrance {
849            #[allow(unused_comparisons)]
850            if <str>::len(value.as_ref()) > 10usize {
851                return Err(ConstraintError::MaxLength {
852                    path: ValidationPath::from_field("card_stack_entrance"),
853                    max: 10usize,
854                    actual: <str>::len(value.as_ref()),
855                });
856            }
857        }
858        if let Some(ref value) = self.corner_elements {
859            #[allow(unused_comparisons)]
860            if <str>::len(value.as_ref()) > 10usize {
861                return Err(ConstraintError::MaxLength {
862                    path: ValidationPath::from_field("corner_elements"),
863                    max: 10usize,
864                    actual: <str>::len(value.as_ref()),
865                });
866            }
867        }
868        if let Some(ref value) = self.fullscreen_transitions {
869            #[allow(unused_comparisons)]
870            if <str>::len(value.as_ref()) > 10usize {
871                return Err(ConstraintError::MaxLength {
872                    path: ValidationPath::from_field("fullscreen_transitions"),
873                    max: 10usize,
874                    actual: <str>::len(value.as_ref()),
875                });
876            }
877        }
878        if let Some(ref value) = self.modals {
879            #[allow(unused_comparisons)]
880            if <str>::len(value.as_ref()) > 10usize {
881                return Err(ConstraintError::MaxLength {
882                    path: ValidationPath::from_field("modals"),
883                    max: 10usize,
884                    actual: <str>::len(value.as_ref()),
885                });
886            }
887        }
888        if let Some(ref value) = self.overall {
889            #[allow(unused_comparisons)]
890            if <str>::len(value.as_ref()) > 10usize {
891                return Err(ConstraintError::MaxLength {
892                    path: ValidationPath::from_field("overall"),
893                    max: 10usize,
894                    actual: <str>::len(value.as_ref()),
895                });
896            }
897        }
898        if let Some(ref value) = self.page_transitions {
899            #[allow(unused_comparisons)]
900            if <str>::len(value.as_ref()) > 10usize {
901                return Err(ConstraintError::MaxLength {
902                    path: ValidationPath::from_field("page_transitions"),
903                    max: 10usize,
904                    actual: <str>::len(value.as_ref()),
905                });
906            }
907        }
908        if let Some(ref value) = self.thread_transitions {
909            #[allow(unused_comparisons)]
910            if <str>::len(value.as_ref()) > 10usize {
911                return Err(ConstraintError::MaxLength {
912                    path: ValidationPath::from_field("thread_transitions"),
913                    max: 10usize,
914                    actual: <str>::len(value.as_ref()),
915                });
916            }
917        }
918        if let Some(ref value) = self.ui_transitions {
919            #[allow(unused_comparisons)]
920            if <str>::len(value.as_ref()) > 10usize {
921                return Err(ConstraintError::MaxLength {
922                    path: ValidationPath::from_field("ui_transitions"),
923                    max: 10usize,
924                    actual: <str>::len(value.as_ref()),
925                });
926            }
927        }
928        Ok(())
929    }
930}
931
932impl<'a> LexiconSchema for BatchNotificationTypes<'a> {
933    fn nsid() -> &'static str {
934        "net.anisota.settings"
935    }
936    fn def_name() -> &'static str {
937        "batchNotificationTypes"
938    }
939    fn lexicon_doc() -> LexiconDoc<'static> {
940        lexicon_doc_net_anisota_settings()
941    }
942    fn validate(&self) -> Result<(), ConstraintError> {
943        Ok(())
944    }
945}
946
947impl<'a> LexiconSchema for BehaviorSettings<'a> {
948    fn nsid() -> &'static str {
949        "net.anisota.settings"
950    }
951    fn def_name() -> &'static str {
952        "behaviorSettings"
953    }
954    fn lexicon_doc() -> LexiconDoc<'static> {
955        lexicon_doc_net_anisota_settings()
956    }
957    fn validate(&self) -> Result<(), ConstraintError> {
958        if let Some(ref value) = self.feed_cache_length {
959            if *value < 1i64 {
960                return Err(ConstraintError::Minimum {
961                    path: ValidationPath::from_field("feed_cache_length"),
962                    min: 1i64,
963                    actual: *value,
964                });
965            }
966        }
967        if let Some(ref value) = self.highlight_min_follower_count {
968            #[allow(unused_comparisons)]
969            if <str>::len(value.as_ref()) > 20usize {
970                return Err(ConstraintError::MaxLength {
971                    path: ValidationPath::from_field("highlight_min_follower_count"),
972                    max: 20usize,
973                    actual: <str>::len(value.as_ref()),
974                });
975            }
976        }
977        if let Some(ref value) = self.highlight_min_follower_ratio {
978            #[allow(unused_comparisons)]
979            if <str>::len(value.as_ref()) > 20usize {
980                return Err(ConstraintError::MaxLength {
981                    path: ValidationPath::from_field("highlight_min_follower_ratio"),
982                    max: 20usize,
983                    actual: <str>::len(value.as_ref()),
984                });
985            }
986        }
987        if let Some(ref value) = self.min_follower_count {
988            #[allow(unused_comparisons)]
989            if <str>::len(value.as_ref()) > 20usize {
990                return Err(ConstraintError::MaxLength {
991                    path: ValidationPath::from_field("min_follower_count"),
992                    max: 20usize,
993                    actual: <str>::len(value.as_ref()),
994                });
995            }
996        }
997        if let Some(ref value) = self.min_follower_ratio {
998            #[allow(unused_comparisons)]
999            if <str>::len(value.as_ref()) > 20usize {
1000                return Err(ConstraintError::MaxLength {
1001                    path: ValidationPath::from_field("min_follower_ratio"),
1002                    max: 20usize,
1003                    actual: <str>::len(value.as_ref()),
1004                });
1005            }
1006        }
1007        Ok(())
1008    }
1009}
1010
1011impl<'a> LexiconSchema for ControlSettings<'a> {
1012    fn nsid() -> &'static str {
1013        "net.anisota.settings"
1014    }
1015    fn def_name() -> &'static str {
1016        "controlSettings"
1017    }
1018    fn lexicon_doc() -> LexiconDoc<'static> {
1019        lexicon_doc_net_anisota_settings()
1020    }
1021    fn validate(&self) -> Result<(), ConstraintError> {
1022        Ok(())
1023    }
1024}
1025
1026impl<'a> LexiconSchema for CornerElements<'a> {
1027    fn nsid() -> &'static str {
1028        "net.anisota.settings"
1029    }
1030    fn def_name() -> &'static str {
1031        "cornerElements"
1032    }
1033    fn lexicon_doc() -> LexiconDoc<'static> {
1034        lexicon_doc_net_anisota_settings()
1035    }
1036    fn validate(&self) -> Result<(), ConstraintError> {
1037        Ok(())
1038    }
1039}
1040
1041impl<'a> LexiconSchema for FilterNotificationTypes<'a> {
1042    fn nsid() -> &'static str {
1043        "net.anisota.settings"
1044    }
1045    fn def_name() -> &'static str {
1046        "filterNotificationTypes"
1047    }
1048    fn lexicon_doc() -> LexiconDoc<'static> {
1049        lexicon_doc_net_anisota_settings()
1050    }
1051    fn validate(&self) -> Result<(), ConstraintError> {
1052        Ok(())
1053    }
1054}
1055
1056impl<'a> LexiconSchema for FilterRelationshipTypes<'a> {
1057    fn nsid() -> &'static str {
1058        "net.anisota.settings"
1059    }
1060    fn def_name() -> &'static str {
1061        "filterRelationshipTypes"
1062    }
1063    fn lexicon_doc() -> LexiconDoc<'static> {
1064        lexicon_doc_net_anisota_settings()
1065    }
1066    fn validate(&self) -> Result<(), ConstraintError> {
1067        Ok(())
1068    }
1069}
1070
1071impl<'a> LexiconSchema for HideReposts<'a> {
1072    fn nsid() -> &'static str {
1073        "net.anisota.settings"
1074    }
1075    fn def_name() -> &'static str {
1076        "hideReposts"
1077    }
1078    fn lexicon_doc() -> LexiconDoc<'static> {
1079        lexicon_doc_net_anisota_settings()
1080    }
1081    fn validate(&self) -> Result<(), ConstraintError> {
1082        Ok(())
1083    }
1084}
1085
1086impl<'a> LexiconSchema for HighlightNotificationTypes<'a> {
1087    fn nsid() -> &'static str {
1088        "net.anisota.settings"
1089    }
1090    fn def_name() -> &'static str {
1091        "highlightNotificationTypes"
1092    }
1093    fn lexicon_doc() -> LexiconDoc<'static> {
1094        lexicon_doc_net_anisota_settings()
1095    }
1096    fn validate(&self) -> Result<(), ConstraintError> {
1097        Ok(())
1098    }
1099}
1100
1101impl<'a> LexiconSchema for KeyboardShortcuts<'a> {
1102    fn nsid() -> &'static str {
1103        "net.anisota.settings"
1104    }
1105    fn def_name() -> &'static str {
1106        "keyboardShortcuts"
1107    }
1108    fn lexicon_doc() -> LexiconDoc<'static> {
1109        lexicon_doc_net_anisota_settings()
1110    }
1111    fn validate(&self) -> Result<(), ConstraintError> {
1112        Ok(())
1113    }
1114}
1115
1116impl<'a> LexiconSchema for KeyboardShortcutsComposer<'a> {
1117    fn nsid() -> &'static str {
1118        "net.anisota.settings"
1119    }
1120    fn def_name() -> &'static str {
1121        "keyboardShortcutsComposer"
1122    }
1123    fn lexicon_doc() -> LexiconDoc<'static> {
1124        lexicon_doc_net_anisota_settings()
1125    }
1126    fn validate(&self) -> Result<(), ConstraintError> {
1127        if let Some(ref value) = self.publish {
1128            #[allow(unused_comparisons)]
1129            if <str>::len(value.as_ref()) > 50usize {
1130                return Err(ConstraintError::MaxLength {
1131                    path: ValidationPath::from_field("publish"),
1132                    max: 50usize,
1133                    actual: <str>::len(value.as_ref()),
1134                });
1135            }
1136        }
1137        Ok(())
1138    }
1139}
1140
1141impl<'a> LexiconSchema for KeyboardShortcutsGlobal<'a> {
1142    fn nsid() -> &'static str {
1143        "net.anisota.settings"
1144    }
1145    fn def_name() -> &'static str {
1146        "keyboardShortcutsGlobal"
1147    }
1148    fn lexicon_doc() -> LexiconDoc<'static> {
1149        lexicon_doc_net_anisota_settings()
1150    }
1151    fn validate(&self) -> Result<(), ConstraintError> {
1152        if let Some(ref value) = self.collection {
1153            #[allow(unused_comparisons)]
1154            if <str>::len(value.as_ref()) > 50usize {
1155                return Err(ConstraintError::MaxLength {
1156                    path: ValidationPath::from_field("collection"),
1157                    max: 50usize,
1158                    actual: <str>::len(value.as_ref()),
1159                });
1160            }
1161        }
1162        if let Some(ref value) = self.feed {
1163            #[allow(unused_comparisons)]
1164            if <str>::len(value.as_ref()) > 50usize {
1165                return Err(ConstraintError::MaxLength {
1166                    path: ValidationPath::from_field("feed"),
1167                    max: 50usize,
1168                    actual: <str>::len(value.as_ref()),
1169                });
1170            }
1171        }
1172        if let Some(ref value) = self.inventory {
1173            #[allow(unused_comparisons)]
1174            if <str>::len(value.as_ref()) > 50usize {
1175                return Err(ConstraintError::MaxLength {
1176                    path: ValidationPath::from_field("inventory"),
1177                    max: 50usize,
1178                    actual: <str>::len(value.as_ref()),
1179                });
1180            }
1181        }
1182        if let Some(ref value) = self.profile {
1183            #[allow(unused_comparisons)]
1184            if <str>::len(value.as_ref()) > 50usize {
1185                return Err(ConstraintError::MaxLength {
1186                    path: ValidationPath::from_field("profile"),
1187                    max: 50usize,
1188                    actual: <str>::len(value.as_ref()),
1189                });
1190            }
1191        }
1192        Ok(())
1193    }
1194}
1195
1196impl<'a> LexiconSchema for KeyboardShortcutsModals<'a> {
1197    fn nsid() -> &'static str {
1198        "net.anisota.settings"
1199    }
1200    fn def_name() -> &'static str {
1201        "keyboardShortcutsModals"
1202    }
1203    fn lexicon_doc() -> LexiconDoc<'static> {
1204        lexicon_doc_net_anisota_settings()
1205    }
1206    fn validate(&self) -> Result<(), ConstraintError> {
1207        if let Some(ref value) = self.keyboard_help {
1208            #[allow(unused_comparisons)]
1209            if <str>::len(value.as_ref()) > 50usize {
1210                return Err(ConstraintError::MaxLength {
1211                    path: ValidationPath::from_field("keyboard_help"),
1212                    max: 50usize,
1213                    actual: <str>::len(value.as_ref()),
1214                });
1215            }
1216        }
1217        if let Some(ref value) = self.notifications {
1218            #[allow(unused_comparisons)]
1219            if <str>::len(value.as_ref()) > 50usize {
1220                return Err(ConstraintError::MaxLength {
1221                    path: ValidationPath::from_field("notifications"),
1222                    max: 50usize,
1223                    actual: <str>::len(value.as_ref()),
1224                });
1225            }
1226        }
1227        if let Some(ref value) = self.post_composer {
1228            #[allow(unused_comparisons)]
1229            if <str>::len(value.as_ref()) > 50usize {
1230                return Err(ConstraintError::MaxLength {
1231                    path: ValidationPath::from_field("post_composer"),
1232                    max: 50usize,
1233                    actual: <str>::len(value.as_ref()),
1234                });
1235            }
1236        }
1237        if let Some(ref value) = self.stats {
1238            #[allow(unused_comparisons)]
1239            if <str>::len(value.as_ref()) > 50usize {
1240                return Err(ConstraintError::MaxLength {
1241                    path: ValidationPath::from_field("stats"),
1242                    max: 50usize,
1243                    actual: <str>::len(value.as_ref()),
1244                });
1245            }
1246        }
1247        if let Some(ref value) = self.touch_menu {
1248            #[allow(unused_comparisons)]
1249            if <str>::len(value.as_ref()) > 50usize {
1250                return Err(ConstraintError::MaxLength {
1251                    path: ValidationPath::from_field("touch_menu"),
1252                    max: 50usize,
1253                    actual: <str>::len(value.as_ref()),
1254                });
1255            }
1256        }
1257        Ok(())
1258    }
1259}
1260
1261impl<'a> LexiconSchema for KeyboardShortcutsNavigation<'a> {
1262    fn nsid() -> &'static str {
1263        "net.anisota.settings"
1264    }
1265    fn def_name() -> &'static str {
1266        "keyboardShortcutsNavigation"
1267    }
1268    fn lexicon_doc() -> LexiconDoc<'static> {
1269        lexicon_doc_net_anisota_settings()
1270    }
1271    fn validate(&self) -> Result<(), ConstraintError> {
1272        if let Some(ref value) = self.arrow_down {
1273            #[allow(unused_comparisons)]
1274            if <str>::len(value.as_ref()) > 50usize {
1275                return Err(ConstraintError::MaxLength {
1276                    path: ValidationPath::from_field("arrow_down"),
1277                    max: 50usize,
1278                    actual: <str>::len(value.as_ref()),
1279                });
1280            }
1281        }
1282        if let Some(ref value) = self.arrow_left {
1283            #[allow(unused_comparisons)]
1284            if <str>::len(value.as_ref()) > 50usize {
1285                return Err(ConstraintError::MaxLength {
1286                    path: ValidationPath::from_field("arrow_left"),
1287                    max: 50usize,
1288                    actual: <str>::len(value.as_ref()),
1289                });
1290            }
1291        }
1292        if let Some(ref value) = self.arrow_right {
1293            #[allow(unused_comparisons)]
1294            if <str>::len(value.as_ref()) > 50usize {
1295                return Err(ConstraintError::MaxLength {
1296                    path: ValidationPath::from_field("arrow_right"),
1297                    max: 50usize,
1298                    actual: <str>::len(value.as_ref()),
1299                });
1300            }
1301        }
1302        if let Some(ref value) = self.arrow_up {
1303            #[allow(unused_comparisons)]
1304            if <str>::len(value.as_ref()) > 50usize {
1305                return Err(ConstraintError::MaxLength {
1306                    path: ValidationPath::from_field("arrow_up"),
1307                    max: 50usize,
1308                    actual: <str>::len(value.as_ref()),
1309                });
1310            }
1311        }
1312        if let Some(ref value) = self.escape {
1313            #[allow(unused_comparisons)]
1314            if <str>::len(value.as_ref()) > 50usize {
1315                return Err(ConstraintError::MaxLength {
1316                    path: ValidationPath::from_field("escape"),
1317                    max: 50usize,
1318                    actual: <str>::len(value.as_ref()),
1319                });
1320            }
1321        }
1322        Ok(())
1323    }
1324}
1325
1326impl<'a> LexiconSchema for KeyboardShortcutsPostInteractions<'a> {
1327    fn nsid() -> &'static str {
1328        "net.anisota.settings"
1329    }
1330    fn def_name() -> &'static str {
1331        "keyboardShortcutsPostInteractions"
1332    }
1333    fn lexicon_doc() -> LexiconDoc<'static> {
1334        lexicon_doc_net_anisota_settings()
1335    }
1336    fn validate(&self) -> Result<(), ConstraintError> {
1337        if let Some(ref value) = self.like {
1338            #[allow(unused_comparisons)]
1339            if <str>::len(value.as_ref()) > 50usize {
1340                return Err(ConstraintError::MaxLength {
1341                    path: ValidationPath::from_field("like"),
1342                    max: 50usize,
1343                    actual: <str>::len(value.as_ref()),
1344                });
1345            }
1346        }
1347        if let Some(ref value) = self.quote {
1348            #[allow(unused_comparisons)]
1349            if <str>::len(value.as_ref()) > 50usize {
1350                return Err(ConstraintError::MaxLength {
1351                    path: ValidationPath::from_field("quote"),
1352                    max: 50usize,
1353                    actual: <str>::len(value.as_ref()),
1354                });
1355            }
1356        }
1357        if let Some(ref value) = self.reply {
1358            #[allow(unused_comparisons)]
1359            if <str>::len(value.as_ref()) > 50usize {
1360                return Err(ConstraintError::MaxLength {
1361                    path: ValidationPath::from_field("reply"),
1362                    max: 50usize,
1363                    actual: <str>::len(value.as_ref()),
1364                });
1365            }
1366        }
1367        if let Some(ref value) = self.repost {
1368            #[allow(unused_comparisons)]
1369            if <str>::len(value.as_ref()) > 50usize {
1370                return Err(ConstraintError::MaxLength {
1371                    path: ValidationPath::from_field("repost"),
1372                    max: 50usize,
1373                    actual: <str>::len(value.as_ref()),
1374                });
1375            }
1376        }
1377        Ok(())
1378    }
1379}
1380
1381/// Marker type for deserializing records from this collection.
1382
1383#[derive(Debug, Serialize, Deserialize)]
1384pub struct SettingsRecord;
1385impl XrpcResp for SettingsRecord {
1386    const NSID: &'static str = "net.anisota.settings";
1387    const ENCODING: &'static str = "application/json";
1388    type Output<'de> = SettingsGetRecordOutput<'de>;
1389    type Err<'de> = RecordError<'de>;
1390}
1391
1392impl From<SettingsGetRecordOutput<'_>> for Settings<'_> {
1393    fn from(output: SettingsGetRecordOutput<'_>) -> Self {
1394        use jacquard_common::IntoStatic;
1395        output.value.into_static()
1396    }
1397}
1398
1399impl Collection for Settings<'_> {
1400    const NSID: &'static str = "net.anisota.settings";
1401    type Record = SettingsRecord;
1402}
1403
1404impl Collection for SettingsRecord {
1405    const NSID: &'static str = "net.anisota.settings";
1406    type Record = SettingsRecord;
1407}
1408
1409impl<'a> LexiconSchema for Settings<'a> {
1410    fn nsid() -> &'static str {
1411        "net.anisota.settings"
1412    }
1413    fn def_name() -> &'static str {
1414        "main"
1415    }
1416    fn lexicon_doc() -> LexiconDoc<'static> {
1417        lexicon_doc_net_anisota_settings()
1418    }
1419    fn validate(&self) -> Result<(), ConstraintError> {
1420        {
1421            let value = &self.version;
1422            if *value < 1i64 {
1423                return Err(ConstraintError::Minimum {
1424                    path: ValidationPath::from_field("version"),
1425                    min: 1i64,
1426                    actual: *value,
1427                });
1428            }
1429        }
1430        Ok(())
1431    }
1432}
1433
1434impl<'a> LexiconSchema for ModerationSettings<'a> {
1435    fn nsid() -> &'static str {
1436        "net.anisota.settings"
1437    }
1438    fn def_name() -> &'static str {
1439        "moderationSettings"
1440    }
1441    fn lexicon_doc() -> LexiconDoc<'static> {
1442        lexicon_doc_net_anisota_settings()
1443    }
1444    fn validate(&self) -> Result<(), ConstraintError> {
1445        Ok(())
1446    }
1447}
1448
1449impl<'a> LexiconSchema for StatsVisibleSections<'a> {
1450    fn nsid() -> &'static str {
1451        "net.anisota.settings"
1452    }
1453    fn def_name() -> &'static str {
1454        "statsVisibleSections"
1455    }
1456    fn lexicon_doc() -> LexiconDoc<'static> {
1457        lexicon_doc_net_anisota_settings()
1458    }
1459    fn validate(&self) -> Result<(), ConstraintError> {
1460        Ok(())
1461    }
1462}
1463
1464impl<'a> LexiconSchema for UiSettings<'a> {
1465    fn nsid() -> &'static str {
1466        "net.anisota.settings"
1467    }
1468    fn def_name() -> &'static str {
1469        "uiSettings"
1470    }
1471    fn lexicon_doc() -> LexiconDoc<'static> {
1472        lexicon_doc_net_anisota_settings()
1473    }
1474    fn validate(&self) -> Result<(), ConstraintError> {
1475        if let Some(ref value) = self.font_size {
1476            #[allow(unused_comparisons)]
1477            if <str>::len(value.as_ref()) > 10usize {
1478                return Err(ConstraintError::MaxLength {
1479                    path: ValidationPath::from_field("font_size"),
1480                    max: 10usize,
1481                    actual: <str>::len(value.as_ref()),
1482                });
1483            }
1484        }
1485        Ok(())
1486    }
1487}
1488
1489fn lexicon_doc_net_anisota_settings() -> LexiconDoc<'static> {
1490    #[allow(unused_imports)]
1491    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
1492    use jacquard_lexicon::lexicon::*;
1493    use alloc::collections::BTreeMap;
1494    LexiconDoc {
1495        lexicon: Lexicon::Lexicon1,
1496        id: CowStr::new_static("net.anisota.settings"),
1497        defs: {
1498            let mut map = BTreeMap::new();
1499            map.insert(
1500                SmolStr::new_static("animationTiming"),
1501                LexUserType::Object(LexObject {
1502                    description: Some(
1503                        CowStr::new_static(
1504                            "Animation timing and speed settings for various UI animations",
1505                        ),
1506                    ),
1507                    properties: {
1508                        #[allow(unused_mut)]
1509                        let mut map = BTreeMap::new();
1510                        map.insert(
1511                            SmolStr::new_static("cardAdvance"),
1512                            LexObjectProperty::String(LexString {
1513                                description: Some(
1514                                    CowStr::new_static(
1515                                        "Card advance exit to right and entrance back in from right (stored as string)",
1516                                    ),
1517                                ),
1518                                max_length: Some(10usize),
1519                                ..Default::default()
1520                            }),
1521                        );
1522                        map.insert(
1523                            SmolStr::new_static("cardFlip"),
1524                            LexObjectProperty::String(LexString {
1525                                description: Some(
1526                                    CowStr::new_static(
1527                                        "Card flip animation between front and back (stored as string)",
1528                                    ),
1529                                ),
1530                                max_length: Some(10usize),
1531                                ..Default::default()
1532                            }),
1533                        );
1534                        map.insert(
1535                            SmolStr::new_static("cardStackEntrance"),
1536                            LexObjectProperty::String(LexString {
1537                                description: Some(
1538                                    CowStr::new_static(
1539                                        "Card stack animate in entrance from the top of screen (stored as string)",
1540                                    ),
1541                                ),
1542                                max_length: Some(10usize),
1543                                ..Default::default()
1544                            }),
1545                        );
1546                        map.insert(
1547                            SmolStr::new_static("cornerElements"),
1548                            LexObjectProperty::String(LexString {
1549                                description: Some(
1550                                    CowStr::new_static(
1551                                        "Staggered interactive corner element entrance animation (stored as string)",
1552                                    ),
1553                                ),
1554                                max_length: Some(10usize),
1555                                ..Default::default()
1556                            }),
1557                        );
1558                        map.insert(
1559                            SmolStr::new_static("fullscreenTransitions"),
1560                            LexObjectProperty::String(LexString {
1561                                description: Some(
1562                                    CowStr::new_static(
1563                                        "Card stack height expansion and shrinking when entering/exiting fullscreen (stored as string)",
1564                                    ),
1565                                ),
1566                                max_length: Some(10usize),
1567                                ..Default::default()
1568                            }),
1569                        );
1570                        map.insert(
1571                            SmolStr::new_static("modals"),
1572                            LexObjectProperty::String(LexString {
1573                                description: Some(
1574                                    CowStr::new_static(
1575                                        "Modal entrance and exit animations (stored as string)",
1576                                    ),
1577                                ),
1578                                max_length: Some(10usize),
1579                                ..Default::default()
1580                            }),
1581                        );
1582                        map.insert(
1583                            SmolStr::new_static("overall"),
1584                            LexObjectProperty::String(LexString {
1585                                description: Some(
1586                                    CowStr::new_static(
1587                                        "Master speed multiplier that affects all animations (stored as string, e.g. '1.0' = normal speed)",
1588                                    ),
1589                                ),
1590                                max_length: Some(10usize),
1591                                ..Default::default()
1592                            }),
1593                        );
1594                        map.insert(
1595                            SmolStr::new_static("pageTransitions"),
1596                            LexObjectProperty::String(LexString {
1597                                description: Some(
1598                                    CowStr::new_static(
1599                                        "Page transitions and navigation animations (stored as string)",
1600                                    ),
1601                                ),
1602                                max_length: Some(10usize),
1603                                ..Default::default()
1604                            }),
1605                        );
1606                        map.insert(
1607                            SmolStr::new_static("threadTransitions"),
1608                            LexObjectProperty::String(LexString {
1609                                description: Some(
1610                                    CowStr::new_static(
1611                                        "Thread train sliding, entering, and exiting animations (stored as string)",
1612                                    ),
1613                                ),
1614                                max_length: Some(10usize),
1615                                ..Default::default()
1616                            }),
1617                        );
1618                        map.insert(
1619                            SmolStr::new_static("uiTransitions"),
1620                            LexObjectProperty::String(LexString {
1621                                description: Some(
1622                                    CowStr::new_static(
1623                                        "Control row and feed subtitle fade in/out animations (stored as string)",
1624                                    ),
1625                                ),
1626                                max_length: Some(10usize),
1627                                ..Default::default()
1628                            }),
1629                        );
1630                        map
1631                    },
1632                    ..Default::default()
1633                }),
1634            );
1635            map.insert(
1636                SmolStr::new_static("batchNotificationTypes"),
1637                LexUserType::Object(LexObject {
1638                    properties: {
1639                        #[allow(unused_mut)]
1640                        let mut map = BTreeMap::new();
1641                        map.insert(
1642                            SmolStr::new_static("follows"),
1643                            LexObjectProperty::Boolean(LexBoolean {
1644                                ..Default::default()
1645                            }),
1646                        );
1647                        map.insert(
1648                            SmolStr::new_static("likes"),
1649                            LexObjectProperty::Boolean(LexBoolean {
1650                                ..Default::default()
1651                            }),
1652                        );
1653                        map.insert(
1654                            SmolStr::new_static("mentions"),
1655                            LexObjectProperty::Boolean(LexBoolean {
1656                                ..Default::default()
1657                            }),
1658                        );
1659                        map.insert(
1660                            SmolStr::new_static("quotes"),
1661                            LexObjectProperty::Boolean(LexBoolean {
1662                                ..Default::default()
1663                            }),
1664                        );
1665                        map.insert(
1666                            SmolStr::new_static("replies"),
1667                            LexObjectProperty::Boolean(LexBoolean {
1668                                ..Default::default()
1669                            }),
1670                        );
1671                        map.insert(
1672                            SmolStr::new_static("reposts"),
1673                            LexObjectProperty::Boolean(LexBoolean {
1674                                ..Default::default()
1675                            }),
1676                        );
1677                        map
1678                    },
1679                    ..Default::default()
1680                }),
1681            );
1682            map.insert(
1683                SmolStr::new_static("behaviorSettings"),
1684                LexUserType::Object(LexObject {
1685                    description: Some(
1686                        CowStr::new_static("App behavior and functionality settings"),
1687                    ),
1688                    properties: {
1689                        #[allow(unused_mut)]
1690                        let mut map = BTreeMap::new();
1691                        map.insert(
1692                            SmolStr::new_static("animationTiming"),
1693                            LexObjectProperty::Ref(LexRef {
1694                                r#ref: CowStr::new_static("#animationTiming"),
1695                                ..Default::default()
1696                            }),
1697                        );
1698                        map.insert(
1699                            SmolStr::new_static("anisotaOnlyMode"),
1700                            LexObjectProperty::Boolean(LexBoolean {
1701                                ..Default::default()
1702                            }),
1703                        );
1704                        map.insert(
1705                            SmolStr::new_static("audioEnabled"),
1706                            LexObjectProperty::Boolean(LexBoolean {
1707                                ..Default::default()
1708                            }),
1709                        );
1710                        map.insert(
1711                            SmolStr::new_static("batchNotificationTypes"),
1712                            LexObjectProperty::Ref(LexRef {
1713                                r#ref: CowStr::new_static("#batchNotificationTypes"),
1714                                ..Default::default()
1715                            }),
1716                        );
1717                        map.insert(
1718                            SmolStr::new_static("batchNotifications"),
1719                            LexObjectProperty::Boolean(LexBoolean {
1720                                ..Default::default()
1721                            }),
1722                        );
1723                        map.insert(
1724                            SmolStr::new_static("bypassDetachedQuotes"),
1725                            LexObjectProperty::Boolean(LexBoolean {
1726                                ..Default::default()
1727                            }),
1728                        );
1729                        map.insert(
1730                            SmolStr::new_static("combineRelationshipAndFollowerFilters"),
1731                            LexObjectProperty::Boolean(LexBoolean {
1732                                ..Default::default()
1733                            }),
1734                        );
1735                        map.insert(
1736                            SmolStr::new_static("confirmDeletes"),
1737                            LexObjectProperty::Boolean(LexBoolean {
1738                                ..Default::default()
1739                            }),
1740                        );
1741                        map.insert(
1742                            SmolStr::new_static("confirmDraftSaves"),
1743                            LexObjectProperty::Boolean(LexBoolean {
1744                                ..Default::default()
1745                            }),
1746                        );
1747                        map.insert(
1748                            SmolStr::new_static("defaultHomePage"),
1749                            LexObjectProperty::String(LexString {
1750                                description: Some(
1751                                    CowStr::new_static("Default page to show on app load"),
1752                                ),
1753                                ..Default::default()
1754                            }),
1755                        );
1756                        map.insert(
1757                            SmolStr::new_static("defaultPostTarget"),
1758                            LexObjectProperty::String(LexString {
1759                                description: Some(
1760                                    CowStr::new_static(
1761                                        "Default publishing target for new posts",
1762                                    ),
1763                                ),
1764                                ..Default::default()
1765                            }),
1766                        );
1767                        map.insert(
1768                            SmolStr::new_static("feedCacheLength"),
1769                            LexObjectProperty::Integer(LexInteger {
1770                                minimum: Some(1i64),
1771                                ..Default::default()
1772                            }),
1773                        );
1774                        map.insert(
1775                            SmolStr::new_static("filterByFollowerRatio"),
1776                            LexObjectProperty::Boolean(LexBoolean {
1777                                ..Default::default()
1778                            }),
1779                        );
1780                        map.insert(
1781                            SmolStr::new_static("filterNotificationTypes"),
1782                            LexObjectProperty::Ref(LexRef {
1783                                r#ref: CowStr::new_static("#filterNotificationTypes"),
1784                                ..Default::default()
1785                            }),
1786                        );
1787                        map.insert(
1788                            SmolStr::new_static("filterNotificationsByFollowers"),
1789                            LexObjectProperty::Boolean(LexBoolean {
1790                                ..Default::default()
1791                            }),
1792                        );
1793                        map.insert(
1794                            SmolStr::new_static("filterNotificationsByRelationship"),
1795                            LexObjectProperty::Boolean(LexBoolean {
1796                                ..Default::default()
1797                            }),
1798                        );
1799                        map.insert(
1800                            SmolStr::new_static("filterRelationshipTypes"),
1801                            LexObjectProperty::Ref(LexRef {
1802                                r#ref: CowStr::new_static("#filterRelationshipTypes"),
1803                                ..Default::default()
1804                            }),
1805                        );
1806                        map.insert(
1807                            SmolStr::new_static("forceChronologicalSort"),
1808                            LexObjectProperty::Boolean(LexBoolean {
1809                                ..Default::default()
1810                            }),
1811                        );
1812                        map.insert(
1813                            SmolStr::new_static("fullscreenBehavior"),
1814                            LexObjectProperty::String(LexString {
1815                                description: Some(
1816                                    CowStr::new_static(
1817                                        "Fullscreen behavior mode: fullscreen (show control row), immersive (hide all UI), or cycle (cycle through states)",
1818                                    ),
1819                                ),
1820                                ..Default::default()
1821                            }),
1822                        );
1823                        map.insert(
1824                            SmolStr::new_static("hideInteractedPosts"),
1825                            LexObjectProperty::Boolean(LexBoolean {
1826                                ..Default::default()
1827                            }),
1828                        );
1829                        map.insert(
1830                            SmolStr::new_static("hideNotificationCount"),
1831                            LexObjectProperty::Boolean(LexBoolean {
1832                                ..Default::default()
1833                            }),
1834                        );
1835                        map.insert(
1836                            SmolStr::new_static("hideReadPosts"),
1837                            LexObjectProperty::Boolean(LexBoolean {
1838                                ..Default::default()
1839                            }),
1840                        );
1841                        map.insert(
1842                            SmolStr::new_static("hideReposts"),
1843                            LexObjectProperty::Ref(LexRef {
1844                                r#ref: CowStr::new_static("#hideReposts"),
1845                                ..Default::default()
1846                            }),
1847                        );
1848                        map.insert(
1849                            SmolStr::new_static("highlightByFollowerRatio"),
1850                            LexObjectProperty::Boolean(LexBoolean {
1851                                ..Default::default()
1852                            }),
1853                        );
1854                        map.insert(
1855                            SmolStr::new_static("highlightMaxFollowerCount"),
1856                            LexObjectProperty::Integer(LexInteger {
1857                                ..Default::default()
1858                            }),
1859                        );
1860                        map.insert(
1861                            SmolStr::new_static("highlightMinFollowerCount"),
1862                            LexObjectProperty::String(LexString {
1863                                description: Some(
1864                                    CowStr::new_static(
1865                                        "Minimum follower count for notification highlighting (stored as string or integer)",
1866                                    ),
1867                                ),
1868                                max_length: Some(20usize),
1869                                ..Default::default()
1870                            }),
1871                        );
1872                        map.insert(
1873                            SmolStr::new_static("highlightMinFollowerRatio"),
1874                            LexObjectProperty::String(LexString {
1875                                description: Some(
1876                                    CowStr::new_static(
1877                                        "Minimum follower-to-following ratio for highlighting (stored as string)",
1878                                    ),
1879                                ),
1880                                max_length: Some(20usize),
1881                                ..Default::default()
1882                            }),
1883                        );
1884                        map.insert(
1885                            SmolStr::new_static("highlightNotificationTypes"),
1886                            LexObjectProperty::Ref(LexRef {
1887                                r#ref: CowStr::new_static("#highlightNotificationTypes"),
1888                                ..Default::default()
1889                            }),
1890                        );
1891                        map.insert(
1892                            SmolStr::new_static("highlightNotifications"),
1893                            LexObjectProperty::Boolean(LexBoolean {
1894                                ..Default::default()
1895                            }),
1896                        );
1897                        map.insert(
1898                            SmolStr::new_static("includeReplyEngagement"),
1899                            LexObjectProperty::Boolean(LexBoolean {
1900                                ..Default::default()
1901                            }),
1902                        );
1903                        map.insert(
1904                            SmolStr::new_static("keyboardShortcuts"),
1905                            LexObjectProperty::Ref(LexRef {
1906                                r#ref: CowStr::new_static("#keyboardShortcuts"),
1907                                ..Default::default()
1908                            }),
1909                        );
1910                        map.insert(
1911                            SmolStr::new_static("maxFollowerCount"),
1912                            LexObjectProperty::Integer(LexInteger {
1913                                ..Default::default()
1914                            }),
1915                        );
1916                        map.insert(
1917                            SmolStr::new_static("minFollowerCount"),
1918                            LexObjectProperty::String(LexString {
1919                                description: Some(
1920                                    CowStr::new_static(
1921                                        "Minimum follower count for notification filtering (stored as string)",
1922                                    ),
1923                                ),
1924                                max_length: Some(20usize),
1925                                ..Default::default()
1926                            }),
1927                        );
1928                        map.insert(
1929                            SmolStr::new_static("minFollowerRatio"),
1930                            LexObjectProperty::String(LexString {
1931                                description: Some(
1932                                    CowStr::new_static(
1933                                        "Minimum follower ratio for filtering (stored as string)",
1934                                    ),
1935                                ),
1936                                max_length: Some(20usize),
1937                                ..Default::default()
1938                            }),
1939                        );
1940                        map.insert(
1941                            SmolStr::new_static("moderationSettings"),
1942                            LexObjectProperty::Ref(LexRef {
1943                                r#ref: CowStr::new_static("#moderationSettings"),
1944                                ..Default::default()
1945                            }),
1946                        );
1947                        map.insert(
1948                            SmolStr::new_static("postDrafts"),
1949                            LexObjectProperty::Boolean(LexBoolean {
1950                                ..Default::default()
1951                            }),
1952                        );
1953                        map.insert(
1954                            SmolStr::new_static("reverseFeedOrder"),
1955                            LexObjectProperty::Boolean(LexBoolean {
1956                                ..Default::default()
1957                            }),
1958                        );
1959                        map.insert(
1960                            SmolStr::new_static("showBlockedPosts"),
1961                            LexObjectProperty::Boolean(LexBoolean {
1962                                ..Default::default()
1963                            }),
1964                        );
1965                        map.insert(
1966                            SmolStr::new_static("showNewHighlightsSection"),
1967                            LexObjectProperty::Boolean(LexBoolean {
1968                                ..Default::default()
1969                            }),
1970                        );
1971                        map.insert(
1972                            SmolStr::new_static("showNotificationSections"),
1973                            LexObjectProperty::Boolean(LexBoolean {
1974                                ..Default::default()
1975                            }),
1976                        );
1977                        map.insert(
1978                            SmolStr::new_static("showOlderSection"),
1979                            LexObjectProperty::Boolean(LexBoolean {
1980                                ..Default::default()
1981                            }),
1982                        );
1983                        map.insert(
1984                            SmolStr::new_static("showRarityInHeader"),
1985                            LexObjectProperty::Boolean(LexBoolean {
1986                                ..Default::default()
1987                            }),
1988                        );
1989                        map.insert(
1990                            SmolStr::new_static("showRecentlyReadSection"),
1991                            LexObjectProperty::Boolean(LexBoolean {
1992                                ..Default::default()
1993                            }),
1994                        );
1995                        map.insert(
1996                            SmolStr::new_static("showThreadSuggestion"),
1997                            LexObjectProperty::Boolean(LexBoolean {
1998                                ..Default::default()
1999                            }),
2000                        );
2001                        map.insert(
2002                            SmolStr::new_static("showUnreadSection"),
2003                            LexObjectProperty::Boolean(LexBoolean {
2004                                ..Default::default()
2005                            }),
2006                        );
2007                        map.insert(
2008                            SmolStr::new_static("soundscape"),
2009                            LexObjectProperty::String(LexString {
2010                                description: Some(
2011                                    CowStr::new_static("Selected background audio soundscape"),
2012                                ),
2013                                ..Default::default()
2014                            }),
2015                        );
2016                        map.insert(
2017                            SmolStr::new_static("statsVisibleSections"),
2018                            LexObjectProperty::Ref(LexRef {
2019                                r#ref: CowStr::new_static("#statsVisibleSections"),
2020                                ..Default::default()
2021                            }),
2022                        );
2023                        map.insert(
2024                            SmolStr::new_static("textOnlyMode"),
2025                            LexObjectProperty::Boolean(LexBoolean {
2026                                ..Default::default()
2027                            }),
2028                        );
2029                        map.insert(
2030                            SmolStr::new_static("trackReadPosts"),
2031                            LexObjectProperty::Boolean(LexBoolean {
2032                                ..Default::default()
2033                            }),
2034                        );
2035                        map
2036                    },
2037                    ..Default::default()
2038                }),
2039            );
2040            map.insert(
2041                SmolStr::new_static("controlSettings"),
2042                LexUserType::Object(LexObject {
2043                    description: Some(
2044                        CowStr::new_static("Control button visibility settings"),
2045                    ),
2046                    properties: {
2047                        #[allow(unused_mut)]
2048                        let mut map = BTreeMap::new();
2049                        map.insert(
2050                            SmolStr::new_static("accountList"),
2051                            LexObjectProperty::Boolean(LexBoolean {
2052                                ..Default::default()
2053                            }),
2054                        );
2055                        map.insert(
2056                            SmolStr::new_static("back"),
2057                            LexObjectProperty::Boolean(LexBoolean {
2058                                ..Default::default()
2059                            }),
2060                        );
2061                        map.insert(
2062                            SmolStr::new_static("commentButton"),
2063                            LexObjectProperty::Boolean(LexBoolean {
2064                                ..Default::default()
2065                            }),
2066                        );
2067                        map.insert(
2068                            SmolStr::new_static("copyAuthorDID"),
2069                            LexObjectProperty::Boolean(LexBoolean {
2070                                ..Default::default()
2071                            }),
2072                        );
2073                        map.insert(
2074                            SmolStr::new_static("copyButton"),
2075                            LexObjectProperty::Boolean(LexBoolean {
2076                                ..Default::default()
2077                            }),
2078                        );
2079                        map.insert(
2080                            SmolStr::new_static("copyPostLink"),
2081                            LexObjectProperty::Boolean(LexBoolean {
2082                                ..Default::default()
2083                            }),
2084                        );
2085                        map.insert(
2086                            SmolStr::new_static("copyPostText"),
2087                            LexObjectProperty::Boolean(LexBoolean {
2088                                ..Default::default()
2089                            }),
2090                        );
2091                        map.insert(
2092                            SmolStr::new_static("delete"),
2093                            LexObjectProperty::Boolean(LexBoolean {
2094                                ..Default::default()
2095                            }),
2096                        );
2097                        map.insert(
2098                            SmolStr::new_static("engageButton"),
2099                            LexObjectProperty::Boolean(LexBoolean {
2100                                ..Default::default()
2101                            }),
2102                        );
2103                        map.insert(
2104                            SmolStr::new_static("feedSwitcher"),
2105                            LexObjectProperty::Boolean(LexBoolean {
2106                                ..Default::default()
2107                            }),
2108                        );
2109                        map.insert(
2110                            SmolStr::new_static("fetch"),
2111                            LexObjectProperty::Boolean(LexBoolean {
2112                                ..Default::default()
2113                            }),
2114                        );
2115                        map.insert(
2116                            SmolStr::new_static("flip"),
2117                            LexObjectProperty::Boolean(LexBoolean {
2118                                ..Default::default()
2119                            }),
2120                        );
2121                        map.insert(
2122                            SmolStr::new_static("forward"),
2123                            LexObjectProperty::Boolean(LexBoolean {
2124                                ..Default::default()
2125                            }),
2126                        );
2127                        map.insert(
2128                            SmolStr::new_static("fullscreen"),
2129                            LexObjectProperty::Boolean(LexBoolean {
2130                                ..Default::default()
2131                            }),
2132                        );
2133                        map.insert(
2134                            SmolStr::new_static("leafletPublications"),
2135                            LexObjectProperty::Boolean(LexBoolean {
2136                                ..Default::default()
2137                            }),
2138                        );
2139                        map.insert(
2140                            SmolStr::new_static("like"),
2141                            LexObjectProperty::Boolean(LexBoolean {
2142                                ..Default::default()
2143                            }),
2144                        );
2145                        map.insert(
2146                            SmolStr::new_static("list"),
2147                            LexObjectProperty::Boolean(LexBoolean {
2148                                ..Default::default()
2149                            }),
2150                        );
2151                        map.insert(
2152                            SmolStr::new_static("multiEngageButton"),
2153                            LexObjectProperty::Boolean(LexBoolean {
2154                                ..Default::default()
2155                            }),
2156                        );
2157                        map.insert(
2158                            SmolStr::new_static("multiRepostButton"),
2159                            LexObjectProperty::Boolean(LexBoolean {
2160                                ..Default::default()
2161                            }),
2162                        );
2163                        map.insert(
2164                            SmolStr::new_static("positionButton"),
2165                            LexObjectProperty::Boolean(LexBoolean {
2166                                ..Default::default()
2167                            }),
2168                        );
2169                        map.insert(
2170                            SmolStr::new_static("postList"),
2171                            LexObjectProperty::Boolean(LexBoolean {
2172                                ..Default::default()
2173                            }),
2174                        );
2175                        map.insert(
2176                            SmolStr::new_static("quickAccess"),
2177                            LexObjectProperty::Boolean(LexBoolean {
2178                                ..Default::default()
2179                            }),
2180                        );
2181                        map.insert(
2182                            SmolStr::new_static("quote"),
2183                            LexObjectProperty::Boolean(LexBoolean {
2184                                ..Default::default()
2185                            }),
2186                        );
2187                        map.insert(
2188                            SmolStr::new_static("relationshipButton"),
2189                            LexObjectProperty::Boolean(LexBoolean {
2190                                ..Default::default()
2191                            }),
2192                        );
2193                        map.insert(
2194                            SmolStr::new_static("reply"),
2195                            LexObjectProperty::Boolean(LexBoolean {
2196                                ..Default::default()
2197                            }),
2198                        );
2199                        map.insert(
2200                            SmolStr::new_static("repost"),
2201                            LexObjectProperty::Boolean(LexBoolean {
2202                                ..Default::default()
2203                            }),
2204                        );
2205                        map.insert(
2206                            SmolStr::new_static("shuffle"),
2207                            LexObjectProperty::Boolean(LexBoolean {
2208                                ..Default::default()
2209                            }),
2210                        );
2211                        map.insert(
2212                            SmolStr::new_static("textOnlyMode"),
2213                            LexObjectProperty::Boolean(LexBoolean {
2214                                ..Default::default()
2215                            }),
2216                        );
2217                        map
2218                    },
2219                    ..Default::default()
2220                }),
2221            );
2222            map.insert(
2223                SmolStr::new_static("cornerElements"),
2224                LexUserType::Object(LexObject {
2225                    description: Some(
2226                        CowStr::new_static("Corner element positioning settings"),
2227                    ),
2228                    properties: {
2229                        #[allow(unused_mut)]
2230                        let mut map = BTreeMap::new();
2231                        map.insert(
2232                            SmolStr::new_static("bottomLeft"),
2233                            LexObjectProperty::String(LexString {
2234                                description: Some(
2235                                    CowStr::new_static("Element to show in bottom left corner"),
2236                                ),
2237                                ..Default::default()
2238                            }),
2239                        );
2240                        map.insert(
2241                            SmolStr::new_static("bottomRight"),
2242                            LexObjectProperty::String(LexString {
2243                                description: Some(
2244                                    CowStr::new_static("Element to show in bottom right corner"),
2245                                ),
2246                                ..Default::default()
2247                            }),
2248                        );
2249                        map.insert(
2250                            SmolStr::new_static("topLeft"),
2251                            LexObjectProperty::String(LexString {
2252                                description: Some(
2253                                    CowStr::new_static("Element to show in top left corner"),
2254                                ),
2255                                ..Default::default()
2256                            }),
2257                        );
2258                        map.insert(
2259                            SmolStr::new_static("topRight"),
2260                            LexObjectProperty::String(LexString {
2261                                description: Some(
2262                                    CowStr::new_static("Element to show in top right corner"),
2263                                ),
2264                                ..Default::default()
2265                            }),
2266                        );
2267                        map
2268                    },
2269                    ..Default::default()
2270                }),
2271            );
2272            map.insert(
2273                SmolStr::new_static("filterNotificationTypes"),
2274                LexUserType::Object(LexObject {
2275                    properties: {
2276                        #[allow(unused_mut)]
2277                        let mut map = BTreeMap::new();
2278                        map.insert(
2279                            SmolStr::new_static("follows"),
2280                            LexObjectProperty::Boolean(LexBoolean {
2281                                ..Default::default()
2282                            }),
2283                        );
2284                        map.insert(
2285                            SmolStr::new_static("likes"),
2286                            LexObjectProperty::Boolean(LexBoolean {
2287                                ..Default::default()
2288                            }),
2289                        );
2290                        map.insert(
2291                            SmolStr::new_static("mentions"),
2292                            LexObjectProperty::Boolean(LexBoolean {
2293                                ..Default::default()
2294                            }),
2295                        );
2296                        map.insert(
2297                            SmolStr::new_static("quotes"),
2298                            LexObjectProperty::Boolean(LexBoolean {
2299                                ..Default::default()
2300                            }),
2301                        );
2302                        map.insert(
2303                            SmolStr::new_static("replies"),
2304                            LexObjectProperty::Boolean(LexBoolean {
2305                                ..Default::default()
2306                            }),
2307                        );
2308                        map.insert(
2309                            SmolStr::new_static("reposts"),
2310                            LexObjectProperty::Boolean(LexBoolean {
2311                                ..Default::default()
2312                            }),
2313                        );
2314                        map
2315                    },
2316                    ..Default::default()
2317                }),
2318            );
2319            map.insert(
2320                SmolStr::new_static("filterRelationshipTypes"),
2321                LexUserType::Object(LexObject {
2322                    properties: {
2323                        #[allow(unused_mut)]
2324                        let mut map = BTreeMap::new();
2325                        map.insert(
2326                            SmolStr::new_static("followers"),
2327                            LexObjectProperty::Boolean(LexBoolean {
2328                                ..Default::default()
2329                            }),
2330                        );
2331                        map.insert(
2332                            SmolStr::new_static("following"),
2333                            LexObjectProperty::Boolean(LexBoolean {
2334                                ..Default::default()
2335                            }),
2336                        );
2337                        map.insert(
2338                            SmolStr::new_static("mutuals"),
2339                            LexObjectProperty::Boolean(LexBoolean {
2340                                ..Default::default()
2341                            }),
2342                        );
2343                        map.insert(
2344                            SmolStr::new_static("nonMutuals"),
2345                            LexObjectProperty::Boolean(LexBoolean {
2346                                ..Default::default()
2347                            }),
2348                        );
2349                        map
2350                    },
2351                    ..Default::default()
2352                }),
2353            );
2354            map.insert(
2355                SmolStr::new_static("hideReposts"),
2356                LexUserType::Object(LexObject {
2357                    properties: {
2358                        #[allow(unused_mut)]
2359                        let mut map = BTreeMap::new();
2360                        map.insert(
2361                            SmolStr::new_static("feed"),
2362                            LexObjectProperty::Boolean(LexBoolean {
2363                                ..Default::default()
2364                            }),
2365                        );
2366                        map.insert(
2367                            SmolStr::new_static("profile"),
2368                            LexObjectProperty::Boolean(LexBoolean {
2369                                ..Default::default()
2370                            }),
2371                        );
2372                        map
2373                    },
2374                    ..Default::default()
2375                }),
2376            );
2377            map.insert(
2378                SmolStr::new_static("highlightNotificationTypes"),
2379                LexUserType::Object(LexObject {
2380                    properties: {
2381                        #[allow(unused_mut)]
2382                        let mut map = BTreeMap::new();
2383                        map.insert(
2384                            SmolStr::new_static("follows"),
2385                            LexObjectProperty::Boolean(LexBoolean {
2386                                ..Default::default()
2387                            }),
2388                        );
2389                        map.insert(
2390                            SmolStr::new_static("likes"),
2391                            LexObjectProperty::Boolean(LexBoolean {
2392                                ..Default::default()
2393                            }),
2394                        );
2395                        map.insert(
2396                            SmolStr::new_static("mentions"),
2397                            LexObjectProperty::Boolean(LexBoolean {
2398                                ..Default::default()
2399                            }),
2400                        );
2401                        map.insert(
2402                            SmolStr::new_static("quotes"),
2403                            LexObjectProperty::Boolean(LexBoolean {
2404                                ..Default::default()
2405                            }),
2406                        );
2407                        map.insert(
2408                            SmolStr::new_static("replies"),
2409                            LexObjectProperty::Boolean(LexBoolean {
2410                                ..Default::default()
2411                            }),
2412                        );
2413                        map.insert(
2414                            SmolStr::new_static("reposts"),
2415                            LexObjectProperty::Boolean(LexBoolean {
2416                                ..Default::default()
2417                            }),
2418                        );
2419                        map
2420                    },
2421                    ..Default::default()
2422                }),
2423            );
2424            map.insert(
2425                SmolStr::new_static("keyboardShortcuts"),
2426                LexUserType::Object(LexObject {
2427                    description: Some(
2428                        CowStr::new_static("Keyboard shortcut configuration"),
2429                    ),
2430                    properties: {
2431                        #[allow(unused_mut)]
2432                        let mut map = BTreeMap::new();
2433                        map.insert(
2434                            SmolStr::new_static("composer"),
2435                            LexObjectProperty::Ref(LexRef {
2436                                r#ref: CowStr::new_static("#keyboardShortcutsComposer"),
2437                                ..Default::default()
2438                            }),
2439                        );
2440                        map.insert(
2441                            SmolStr::new_static("global"),
2442                            LexObjectProperty::Ref(LexRef {
2443                                r#ref: CowStr::new_static("#keyboardShortcutsGlobal"),
2444                                ..Default::default()
2445                            }),
2446                        );
2447                        map.insert(
2448                            SmolStr::new_static("modals"),
2449                            LexObjectProperty::Ref(LexRef {
2450                                r#ref: CowStr::new_static("#keyboardShortcutsModals"),
2451                                ..Default::default()
2452                            }),
2453                        );
2454                        map.insert(
2455                            SmolStr::new_static("navigation"),
2456                            LexObjectProperty::Ref(LexRef {
2457                                r#ref: CowStr::new_static("#keyboardShortcutsNavigation"),
2458                                ..Default::default()
2459                            }),
2460                        );
2461                        map.insert(
2462                            SmolStr::new_static("postInteractions"),
2463                            LexObjectProperty::Ref(LexRef {
2464                                r#ref: CowStr::new_static(
2465                                    "#keyboardShortcutsPostInteractions",
2466                                ),
2467                                ..Default::default()
2468                            }),
2469                        );
2470                        map
2471                    },
2472                    ..Default::default()
2473                }),
2474            );
2475            map.insert(
2476                SmolStr::new_static("keyboardShortcutsComposer"),
2477                LexUserType::Object(LexObject {
2478                    description: Some(
2479                        CowStr::new_static("Post composer keyboard shortcuts"),
2480                    ),
2481                    properties: {
2482                        #[allow(unused_mut)]
2483                        let mut map = BTreeMap::new();
2484                        map.insert(
2485                            SmolStr::new_static("publish"),
2486                            LexObjectProperty::String(LexString {
2487                                description: Some(
2488                                    CowStr::new_static("Publish post (e.g., ctrl+enter)"),
2489                                ),
2490                                max_length: Some(50usize),
2491                                ..Default::default()
2492                            }),
2493                        );
2494                        map
2495                    },
2496                    ..Default::default()
2497                }),
2498            );
2499            map.insert(
2500                SmolStr::new_static("keyboardShortcutsGlobal"),
2501                LexUserType::Object(LexObject {
2502                    description: Some(
2503                        CowStr::new_static("Global navigation keyboard shortcuts"),
2504                    ),
2505                    properties: {
2506                        #[allow(unused_mut)]
2507                        let mut map = BTreeMap::new();
2508                        map.insert(
2509                            SmolStr::new_static("collection"),
2510                            LexObjectProperty::String(LexString {
2511                                description: Some(
2512                                    CowStr::new_static("Navigate to collection"),
2513                                ),
2514                                max_length: Some(50usize),
2515                                ..Default::default()
2516                            }),
2517                        );
2518                        map.insert(
2519                            SmolStr::new_static("feed"),
2520                            LexObjectProperty::String(LexString {
2521                                description: Some(CowStr::new_static("Navigate to feed")),
2522                                max_length: Some(50usize),
2523                                ..Default::default()
2524                            }),
2525                        );
2526                        map.insert(
2527                            SmolStr::new_static("inventory"),
2528                            LexObjectProperty::String(LexString {
2529                                description: Some(
2530                                    CowStr::new_static("Navigate to inventory"),
2531                                ),
2532                                max_length: Some(50usize),
2533                                ..Default::default()
2534                            }),
2535                        );
2536                        map.insert(
2537                            SmolStr::new_static("profile"),
2538                            LexObjectProperty::String(LexString {
2539                                description: Some(
2540                                    CowStr::new_static("Navigate to profile"),
2541                                ),
2542                                max_length: Some(50usize),
2543                                ..Default::default()
2544                            }),
2545                        );
2546                        map
2547                    },
2548                    ..Default::default()
2549                }),
2550            );
2551            map.insert(
2552                SmolStr::new_static("keyboardShortcutsModals"),
2553                LexUserType::Object(LexObject {
2554                    description: Some(CowStr::new_static("Modal keyboard shortcuts")),
2555                    properties: {
2556                        #[allow(unused_mut)]
2557                        let mut map = BTreeMap::new();
2558                        map.insert(
2559                            SmolStr::new_static("keyboardHelp"),
2560                            LexObjectProperty::String(LexString {
2561                                description: Some(
2562                                    CowStr::new_static("Show keyboard shortcuts help"),
2563                                ),
2564                                max_length: Some(50usize),
2565                                ..Default::default()
2566                            }),
2567                        );
2568                        map.insert(
2569                            SmolStr::new_static("notifications"),
2570                            LexObjectProperty::String(LexString {
2571                                description: Some(CowStr::new_static("Open notifications")),
2572                                max_length: Some(50usize),
2573                                ..Default::default()
2574                            }),
2575                        );
2576                        map.insert(
2577                            SmolStr::new_static("postComposer"),
2578                            LexObjectProperty::String(LexString {
2579                                description: Some(CowStr::new_static("Open post composer")),
2580                                max_length: Some(50usize),
2581                                ..Default::default()
2582                            }),
2583                        );
2584                        map.insert(
2585                            SmolStr::new_static("stats"),
2586                            LexObjectProperty::String(LexString {
2587                                description: Some(CowStr::new_static("Open stats modal")),
2588                                max_length: Some(50usize),
2589                                ..Default::default()
2590                            }),
2591                        );
2592                        map.insert(
2593                            SmolStr::new_static("touchMenu"),
2594                            LexObjectProperty::String(LexString {
2595                                description: Some(CowStr::new_static("Open touch menu")),
2596                                max_length: Some(50usize),
2597                                ..Default::default()
2598                            }),
2599                        );
2600                        map
2601                    },
2602                    ..Default::default()
2603                }),
2604            );
2605            map.insert(
2606                SmolStr::new_static("keyboardShortcutsNavigation"),
2607                LexUserType::Object(LexObject {
2608                    description: Some(
2609                        CowStr::new_static("Navigation keyboard shortcuts"),
2610                    ),
2611                    properties: {
2612                        #[allow(unused_mut)]
2613                        let mut map = BTreeMap::new();
2614                        map.insert(
2615                            SmolStr::new_static("arrowDown"),
2616                            LexObjectProperty::String(LexString {
2617                                description: Some(
2618                                    CowStr::new_static("Scroll down or next item"),
2619                                ),
2620                                max_length: Some(50usize),
2621                                ..Default::default()
2622                            }),
2623                        );
2624                        map.insert(
2625                            SmolStr::new_static("arrowLeft"),
2626                            LexObjectProperty::String(LexString {
2627                                description: Some(
2628                                    CowStr::new_static("Go back to previous card"),
2629                                ),
2630                                max_length: Some(50usize),
2631                                ..Default::default()
2632                            }),
2633                        );
2634                        map.insert(
2635                            SmolStr::new_static("arrowRight"),
2636                            LexObjectProperty::String(LexString {
2637                                description: Some(
2638                                    CowStr::new_static("Advance to next card"),
2639                                ),
2640                                max_length: Some(50usize),
2641                                ..Default::default()
2642                            }),
2643                        );
2644                        map.insert(
2645                            SmolStr::new_static("arrowUp"),
2646                            LexObjectProperty::String(LexString {
2647                                description: Some(
2648                                    CowStr::new_static("Scroll up or previous item"),
2649                                ),
2650                                max_length: Some(50usize),
2651                                ..Default::default()
2652                            }),
2653                        );
2654                        map.insert(
2655                            SmolStr::new_static("escape"),
2656                            LexObjectProperty::String(LexString {
2657                                description: Some(
2658                                    CowStr::new_static("Exit fullscreen or close modals"),
2659                                ),
2660                                max_length: Some(50usize),
2661                                ..Default::default()
2662                            }),
2663                        );
2664                        map
2665                    },
2666                    ..Default::default()
2667                }),
2668            );
2669            map.insert(
2670                SmolStr::new_static("keyboardShortcutsPostInteractions"),
2671                LexUserType::Object(LexObject {
2672                    description: Some(
2673                        CowStr::new_static("Post interaction keyboard shortcuts"),
2674                    ),
2675                    properties: {
2676                        #[allow(unused_mut)]
2677                        let mut map = BTreeMap::new();
2678                        map.insert(
2679                            SmolStr::new_static("like"),
2680                            LexObjectProperty::String(LexString {
2681                                description: Some(CowStr::new_static("Like current post")),
2682                                max_length: Some(50usize),
2683                                ..Default::default()
2684                            }),
2685                        );
2686                        map.insert(
2687                            SmolStr::new_static("quote"),
2688                            LexObjectProperty::String(LexString {
2689                                description: Some(CowStr::new_static("Quote current post")),
2690                                max_length: Some(50usize),
2691                                ..Default::default()
2692                            }),
2693                        );
2694                        map.insert(
2695                            SmolStr::new_static("reply"),
2696                            LexObjectProperty::String(LexString {
2697                                description: Some(
2698                                    CowStr::new_static("Reply to current post"),
2699                                ),
2700                                max_length: Some(50usize),
2701                                ..Default::default()
2702                            }),
2703                        );
2704                        map.insert(
2705                            SmolStr::new_static("repost"),
2706                            LexObjectProperty::String(LexString {
2707                                description: Some(
2708                                    CowStr::new_static("Repost current post"),
2709                                ),
2710                                max_length: Some(50usize),
2711                                ..Default::default()
2712                            }),
2713                        );
2714                        map
2715                    },
2716                    ..Default::default()
2717                }),
2718            );
2719            map.insert(
2720                SmolStr::new_static("main"),
2721                LexUserType::Record(LexRecord {
2722                    description: Some(
2723                        CowStr::new_static(
2724                            "User settings for the Anisota app, synchronized across devices via ATProto",
2725                        ),
2726                    ),
2727                    key: Some(CowStr::new_static("literal:settings")),
2728                    record: LexRecordRecord::Object(LexObject {
2729                        required: Some(
2730                            vec![
2731                                SmolStr::new_static("version"),
2732                                SmolStr::new_static("createdAt"),
2733                                SmolStr::new_static("updatedAt")
2734                            ],
2735                        ),
2736                        properties: {
2737                            #[allow(unused_mut)]
2738                            let mut map = BTreeMap::new();
2739                            map.insert(
2740                                SmolStr::new_static("behaviorSettings"),
2741                                LexObjectProperty::Ref(LexRef {
2742                                    r#ref: CowStr::new_static("#behaviorSettings"),
2743                                    ..Default::default()
2744                                }),
2745                            );
2746                            map.insert(
2747                                SmolStr::new_static("controlOrder"),
2748                                LexObjectProperty::Array(LexArray {
2749                                    description: Some(
2750                                        CowStr::new_static("Order of control buttons"),
2751                                    ),
2752                                    items: LexArrayItem::String(LexString {
2753                                        ..Default::default()
2754                                    }),
2755                                    ..Default::default()
2756                                }),
2757                            );
2758                            map.insert(
2759                                SmolStr::new_static("controlSettings"),
2760                                LexObjectProperty::Ref(LexRef {
2761                                    r#ref: CowStr::new_static("#controlSettings"),
2762                                    ..Default::default()
2763                                }),
2764                            );
2765                            map.insert(
2766                                SmolStr::new_static("createdAt"),
2767                                LexObjectProperty::String(LexString {
2768                                    description: Some(
2769                                        CowStr::new_static(
2770                                            "When the settings record was first created",
2771                                        ),
2772                                    ),
2773                                    format: Some(LexStringFormat::Datetime),
2774                                    ..Default::default()
2775                                }),
2776                            );
2777                            map.insert(
2778                                SmolStr::new_static("theme"),
2779                                LexObjectProperty::String(LexString {
2780                                    description: Some(
2781                                        CowStr::new_static("Selected color theme"),
2782                                    ),
2783                                    ..Default::default()
2784                                }),
2785                            );
2786                            map.insert(
2787                                SmolStr::new_static("uiSettings"),
2788                                LexObjectProperty::Ref(LexRef {
2789                                    r#ref: CowStr::new_static("#uiSettings"),
2790                                    ..Default::default()
2791                                }),
2792                            );
2793                            map.insert(
2794                                SmolStr::new_static("updatedAt"),
2795                                LexObjectProperty::String(LexString {
2796                                    description: Some(
2797                                        CowStr::new_static("When the settings were last updated"),
2798                                    ),
2799                                    format: Some(LexStringFormat::Datetime),
2800                                    ..Default::default()
2801                                }),
2802                            );
2803                            map.insert(
2804                                SmolStr::new_static("version"),
2805                                LexObjectProperty::Integer(LexInteger {
2806                                    minimum: Some(1i64),
2807                                    ..Default::default()
2808                                }),
2809                            );
2810                            map
2811                        },
2812                        ..Default::default()
2813                    }),
2814                    ..Default::default()
2815                }),
2816            );
2817            map.insert(
2818                SmolStr::new_static("moderationSettings"),
2819                LexUserType::Object(LexObject {
2820                    description: Some(
2821                        CowStr::new_static("Content moderation and filtering settings"),
2822                    ),
2823                    properties: {
2824                        #[allow(unused_mut)]
2825                        let mut map = BTreeMap::new();
2826                        map.insert(
2827                            SmolStr::new_static("mutedAccountsHandling"),
2828                            LexObjectProperty::String(LexString {
2829                                description: Some(
2830                                    CowStr::new_static(
2831                                        "How to handle posts from muted accounts",
2832                                    ),
2833                                ),
2834                                ..Default::default()
2835                            }),
2836                        );
2837                        map.insert(
2838                            SmolStr::new_static("mutedContentHandling"),
2839                            LexObjectProperty::String(LexString {
2840                                description: Some(
2841                                    CowStr::new_static(
2842                                        "How to handle posts containing muted words or phrases",
2843                                    ),
2844                                ),
2845                                ..Default::default()
2846                            }),
2847                        );
2848                        map
2849                    },
2850                    ..Default::default()
2851                }),
2852            );
2853            map.insert(
2854                SmolStr::new_static("statsVisibleSections"),
2855                LexUserType::Object(LexObject {
2856                    properties: {
2857                        #[allow(unused_mut)]
2858                        let mut map = BTreeMap::new();
2859                        map.insert(
2860                            SmolStr::new_static("activity"),
2861                            LexObjectProperty::Boolean(LexBoolean {
2862                                ..Default::default()
2863                            }),
2864                        );
2865                        map.insert(
2866                            SmolStr::new_static("engagement"),
2867                            LexObjectProperty::Boolean(LexBoolean {
2868                                ..Default::default()
2869                            }),
2870                        );
2871                        map.insert(
2872                            SmolStr::new_static("progress"),
2873                            LexObjectProperty::Boolean(LexBoolean {
2874                                ..Default::default()
2875                            }),
2876                        );
2877                        map
2878                    },
2879                    ..Default::default()
2880                }),
2881            );
2882            map.insert(
2883                SmolStr::new_static("uiSettings"),
2884                LexUserType::Object(LexObject {
2885                    description: Some(
2886                        CowStr::new_static("UI visibility and behavior settings"),
2887                    ),
2888                    properties: {
2889                        #[allow(unused_mut)]
2890                        let mut map = BTreeMap::new();
2891                        map.insert(
2892                            SmolStr::new_static("cornerElements"),
2893                            LexObjectProperty::Ref(LexRef {
2894                                r#ref: CowStr::new_static("#cornerElements"),
2895                                ..Default::default()
2896                            }),
2897                        );
2898                        map.insert(
2899                            SmolStr::new_static("fontSize"),
2900                            LexObjectProperty::String(LexString {
2901                                description: Some(
2902                                    CowStr::new_static(
2903                                        "Font size scale (0.8 = 80%, 1.0 = 100% default, 1.2 = 120%)",
2904                                    ),
2905                                ),
2906                                max_length: Some(10usize),
2907                                ..Default::default()
2908                            }),
2909                        );
2910                        map.insert(
2911                            SmolStr::new_static("postCardPrimarySlot"),
2912                            LexObjectProperty::String(LexString {
2913                                description: Some(
2914                                    CowStr::new_static("Primary name slot for post cards"),
2915                                ),
2916                                ..Default::default()
2917                            }),
2918                        );
2919                        map.insert(
2920                            SmolStr::new_static("postCardSecondarySlot"),
2921                            LexObjectProperty::String(LexString {
2922                                description: Some(
2923                                    CowStr::new_static("Secondary name slot for post cards"),
2924                                ),
2925                                ..Default::default()
2926                            }),
2927                        );
2928                        map.insert(
2929                            SmolStr::new_static("profileCardPrimarySlot"),
2930                            LexObjectProperty::String(LexString {
2931                                description: Some(
2932                                    CowStr::new_static("Primary name slot for profile cards"),
2933                                ),
2934                                ..Default::default()
2935                            }),
2936                        );
2937                        map.insert(
2938                            SmolStr::new_static("profileCardSecondarySlot"),
2939                            LexObjectProperty::String(LexString {
2940                                description: Some(
2941                                    CowStr::new_static("Secondary name slot for profile cards"),
2942                                ),
2943                                ..Default::default()
2944                            }),
2945                        );
2946                        map.insert(
2947                            SmolStr::new_static("showPostCardAtSymbol"),
2948                            LexObjectProperty::Boolean(LexBoolean {
2949                                ..Default::default()
2950                            }),
2951                        );
2952                        map.insert(
2953                            SmolStr::new_static("showPostCardAvatar"),
2954                            LexObjectProperty::Boolean(LexBoolean {
2955                                ..Default::default()
2956                            }),
2957                        );
2958                        map.insert(
2959                            SmolStr::new_static("showPostCardDisplayName"),
2960                            LexObjectProperty::Boolean(LexBoolean {
2961                                ..Default::default()
2962                            }),
2963                        );
2964                        map.insert(
2965                            SmolStr::new_static("showPostCardFooter"),
2966                            LexObjectProperty::Boolean(LexBoolean {
2967                                ..Default::default()
2968                            }),
2969                        );
2970                        map.insert(
2971                            SmolStr::new_static("showPostCardHandle"),
2972                            LexObjectProperty::Boolean(LexBoolean {
2973                                ..Default::default()
2974                            }),
2975                        );
2976                        map.insert(
2977                            SmolStr::new_static("showPostCardHeader"),
2978                            LexObjectProperty::Boolean(LexBoolean {
2979                                ..Default::default()
2980                            }),
2981                        );
2982                        map.insert(
2983                            SmolStr::new_static("showPostCount"),
2984                            LexObjectProperty::Boolean(LexBoolean {
2985                                ..Default::default()
2986                            }),
2987                        );
2988                        map.insert(
2989                            SmolStr::new_static("showPostReadIndicator"),
2990                            LexObjectProperty::Boolean(LexBoolean {
2991                                ..Default::default()
2992                            }),
2993                        );
2994                        map.insert(
2995                            SmolStr::new_static("showProfileAtSymbol"),
2996                            LexObjectProperty::Boolean(LexBoolean {
2997                                ..Default::default()
2998                            }),
2999                        );
3000                        map.insert(
3001                            SmolStr::new_static("showProfileBlocked"),
3002                            LexObjectProperty::Boolean(LexBoolean {
3003                                ..Default::default()
3004                            }),
3005                        );
3006                        map.insert(
3007                            SmolStr::new_static("showProfileBlocking"),
3008                            LexObjectProperty::Boolean(LexBoolean {
3009                                ..Default::default()
3010                            }),
3011                        );
3012                        map.insert(
3013                            SmolStr::new_static("showProfileCancelled"),
3014                            LexObjectProperty::Boolean(LexBoolean {
3015                                ..Default::default()
3016                            }),
3017                        );
3018                        map.insert(
3019                            SmolStr::new_static("showProfileCancelling"),
3020                            LexObjectProperty::Boolean(LexBoolean {
3021                                ..Default::default()
3022                            }),
3023                        );
3024                        map.insert(
3025                            SmolStr::new_static("showProfileCardAvatar"),
3026                            LexObjectProperty::Boolean(LexBoolean {
3027                                ..Default::default()
3028                            }),
3029                        );
3030                        map.insert(
3031                            SmolStr::new_static("showProfileCardFooter"),
3032                            LexObjectProperty::Boolean(LexBoolean {
3033                                ..Default::default()
3034                            }),
3035                        );
3036                        map.insert(
3037                            SmolStr::new_static("showProfileCardHeader"),
3038                            LexObjectProperty::Boolean(LexBoolean {
3039                                ..Default::default()
3040                            }),
3041                        );
3042                        map.insert(
3043                            SmolStr::new_static("showProfileCollections"),
3044                            LexObjectProperty::Boolean(LexBoolean {
3045                                ..Default::default()
3046                            }),
3047                        );
3048                        map.insert(
3049                            SmolStr::new_static("showProfileDisplayName"),
3050                            LexObjectProperty::Boolean(LexBoolean {
3051                                ..Default::default()
3052                            }),
3053                        );
3054                        map.insert(
3055                            SmolStr::new_static("showProfileFollowers"),
3056                            LexObjectProperty::Boolean(LexBoolean {
3057                                ..Default::default()
3058                            }),
3059                        );
3060                        map.insert(
3061                            SmolStr::new_static("showProfileFollowing"),
3062                            LexObjectProperty::Boolean(LexBoolean {
3063                                ..Default::default()
3064                            }),
3065                        );
3066                        map.insert(
3067                            SmolStr::new_static("showProfileHandle"),
3068                            LexObjectProperty::Boolean(LexBoolean {
3069                                ..Default::default()
3070                            }),
3071                        );
3072                        map.insert(
3073                            SmolStr::new_static("showProfileLexicons"),
3074                            LexObjectProperty::Boolean(LexBoolean {
3075                                ..Default::default()
3076                            }),
3077                        );
3078                        map.insert(
3079                            SmolStr::new_static("showProfileListed"),
3080                            LexObjectProperty::Boolean(LexBoolean {
3081                                ..Default::default()
3082                            }),
3083                        );
3084                        map.insert(
3085                            SmolStr::new_static("showProfileListing"),
3086                            LexObjectProperty::Boolean(LexBoolean {
3087                                ..Default::default()
3088                            }),
3089                        );
3090                        map.insert(
3091                            SmolStr::new_static("showProfileLists"),
3092                            LexObjectProperty::Boolean(LexBoolean {
3093                                ..Default::default()
3094                            }),
3095                        );
3096                        map.insert(
3097                            SmolStr::new_static("showProfilePosts"),
3098                            LexObjectProperty::Boolean(LexBoolean {
3099                                ..Default::default()
3100                            }),
3101                        );
3102                        map.insert(
3103                            SmolStr::new_static("showProfilePronouns"),
3104                            LexObjectProperty::Boolean(LexBoolean {
3105                                ..Default::default()
3106                            }),
3107                        );
3108                        map.insert(
3109                            SmolStr::new_static("showProfileVerified"),
3110                            LexObjectProperty::Boolean(LexBoolean {
3111                                ..Default::default()
3112                            }),
3113                        );
3114                        map.insert(
3115                            SmolStr::new_static("showProfileVerifying"),
3116                            LexObjectProperty::Boolean(LexBoolean {
3117                                ..Default::default()
3118                            }),
3119                        );
3120                        map.insert(
3121                            SmolStr::new_static("showProfileWebsite"),
3122                            LexObjectProperty::Boolean(LexBoolean {
3123                                ..Default::default()
3124                            }),
3125                        );
3126                        map.insert(
3127                            SmolStr::new_static("showRarityIndicator"),
3128                            LexObjectProperty::Boolean(LexBoolean {
3129                                ..Default::default()
3130                            }),
3131                        );
3132                        map.insert(
3133                            SmolStr::new_static("showTimestamp"),
3134                            LexObjectProperty::Boolean(LexBoolean {
3135                                ..Default::default()
3136                            }),
3137                        );
3138                        map.insert(
3139                            SmolStr::new_static("showUsername"),
3140                            LexObjectProperty::Boolean(LexBoolean {
3141                                ..Default::default()
3142                            }),
3143                        );
3144                        map
3145                    },
3146                    ..Default::default()
3147                }),
3148            );
3149            map
3150        },
3151        ..Default::default()
3152    }
3153}
3154
3155pub mod settings_state {
3156
3157    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
3158    #[allow(unused)]
3159    use ::core::marker::PhantomData;
3160    mod sealed {
3161        pub trait Sealed {}
3162    }
3163    /// State trait tracking which required fields have been set
3164    pub trait State: sealed::Sealed {
3165        type Version;
3166        type CreatedAt;
3167        type UpdatedAt;
3168    }
3169    /// Empty state - all required fields are unset
3170    pub struct Empty(());
3171    impl sealed::Sealed for Empty {}
3172    impl State for Empty {
3173        type Version = Unset;
3174        type CreatedAt = Unset;
3175        type UpdatedAt = Unset;
3176    }
3177    ///State transition - sets the `version` field to Set
3178    pub struct SetVersion<S: State = Empty>(PhantomData<fn() -> S>);
3179    impl<S: State> sealed::Sealed for SetVersion<S> {}
3180    impl<S: State> State for SetVersion<S> {
3181        type Version = Set<members::version>;
3182        type CreatedAt = S::CreatedAt;
3183        type UpdatedAt = S::UpdatedAt;
3184    }
3185    ///State transition - sets the `created_at` field to Set
3186    pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
3187    impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
3188    impl<S: State> State for SetCreatedAt<S> {
3189        type Version = S::Version;
3190        type CreatedAt = Set<members::created_at>;
3191        type UpdatedAt = S::UpdatedAt;
3192    }
3193    ///State transition - sets the `updated_at` field to Set
3194    pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
3195    impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
3196    impl<S: State> State for SetUpdatedAt<S> {
3197        type Version = S::Version;
3198        type CreatedAt = S::CreatedAt;
3199        type UpdatedAt = Set<members::updated_at>;
3200    }
3201    /// Marker types for field names
3202    #[allow(non_camel_case_types)]
3203    pub mod members {
3204        ///Marker type for the `version` field
3205        pub struct version(());
3206        ///Marker type for the `created_at` field
3207        pub struct created_at(());
3208        ///Marker type for the `updated_at` field
3209        pub struct updated_at(());
3210    }
3211}
3212
3213/// Builder for constructing an instance of this type
3214pub struct SettingsBuilder<'a, S: settings_state::State> {
3215    _state: PhantomData<fn() -> S>,
3216    _fields: (
3217        Option<settings::BehaviorSettings<'a>>,
3218        Option<Vec<CowStr<'a>>>,
3219        Option<settings::ControlSettings<'a>>,
3220        Option<Datetime>,
3221        Option<CowStr<'a>>,
3222        Option<settings::UiSettings<'a>>,
3223        Option<Datetime>,
3224        Option<i64>,
3225    ),
3226    _lifetime: PhantomData<&'a ()>,
3227}
3228
3229impl<'a> Settings<'a> {
3230    /// Create a new builder for this type
3231    pub fn new() -> SettingsBuilder<'a, settings_state::Empty> {
3232        SettingsBuilder::new()
3233    }
3234}
3235
3236impl<'a> SettingsBuilder<'a, settings_state::Empty> {
3237    /// Create a new builder with all fields unset
3238    pub fn new() -> Self {
3239        SettingsBuilder {
3240            _state: PhantomData,
3241            _fields: (None, None, None, None, None, None, None, None),
3242            _lifetime: PhantomData,
3243        }
3244    }
3245}
3246
3247impl<'a, S: settings_state::State> SettingsBuilder<'a, S> {
3248    /// Set the `behaviorSettings` field (optional)
3249    pub fn behavior_settings(
3250        mut self,
3251        value: impl Into<Option<settings::BehaviorSettings<'a>>>,
3252    ) -> Self {
3253        self._fields.0 = value.into();
3254        self
3255    }
3256    /// Set the `behaviorSettings` field to an Option value (optional)
3257    pub fn maybe_behavior_settings(
3258        mut self,
3259        value: Option<settings::BehaviorSettings<'a>>,
3260    ) -> Self {
3261        self._fields.0 = value;
3262        self
3263    }
3264}
3265
3266impl<'a, S: settings_state::State> SettingsBuilder<'a, S> {
3267    /// Set the `controlOrder` field (optional)
3268    pub fn control_order(mut self, value: impl Into<Option<Vec<CowStr<'a>>>>) -> Self {
3269        self._fields.1 = value.into();
3270        self
3271    }
3272    /// Set the `controlOrder` field to an Option value (optional)
3273    pub fn maybe_control_order(mut self, value: Option<Vec<CowStr<'a>>>) -> Self {
3274        self._fields.1 = value;
3275        self
3276    }
3277}
3278
3279impl<'a, S: settings_state::State> SettingsBuilder<'a, S> {
3280    /// Set the `controlSettings` field (optional)
3281    pub fn control_settings(
3282        mut self,
3283        value: impl Into<Option<settings::ControlSettings<'a>>>,
3284    ) -> Self {
3285        self._fields.2 = value.into();
3286        self
3287    }
3288    /// Set the `controlSettings` field to an Option value (optional)
3289    pub fn maybe_control_settings(
3290        mut self,
3291        value: Option<settings::ControlSettings<'a>>,
3292    ) -> Self {
3293        self._fields.2 = value;
3294        self
3295    }
3296}
3297
3298impl<'a, S> SettingsBuilder<'a, S>
3299where
3300    S: settings_state::State,
3301    S::CreatedAt: settings_state::IsUnset,
3302{
3303    /// Set the `createdAt` field (required)
3304    pub fn created_at(
3305        mut self,
3306        value: impl Into<Datetime>,
3307    ) -> SettingsBuilder<'a, settings_state::SetCreatedAt<S>> {
3308        self._fields.3 = Option::Some(value.into());
3309        SettingsBuilder {
3310            _state: PhantomData,
3311            _fields: self._fields,
3312            _lifetime: PhantomData,
3313        }
3314    }
3315}
3316
3317impl<'a, S: settings_state::State> SettingsBuilder<'a, S> {
3318    /// Set the `theme` field (optional)
3319    pub fn theme(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
3320        self._fields.4 = value.into();
3321        self
3322    }
3323    /// Set the `theme` field to an Option value (optional)
3324    pub fn maybe_theme(mut self, value: Option<CowStr<'a>>) -> Self {
3325        self._fields.4 = value;
3326        self
3327    }
3328}
3329
3330impl<'a, S: settings_state::State> SettingsBuilder<'a, S> {
3331    /// Set the `uiSettings` field (optional)
3332    pub fn ui_settings(
3333        mut self,
3334        value: impl Into<Option<settings::UiSettings<'a>>>,
3335    ) -> Self {
3336        self._fields.5 = value.into();
3337        self
3338    }
3339    /// Set the `uiSettings` field to an Option value (optional)
3340    pub fn maybe_ui_settings(mut self, value: Option<settings::UiSettings<'a>>) -> Self {
3341        self._fields.5 = value;
3342        self
3343    }
3344}
3345
3346impl<'a, S> SettingsBuilder<'a, S>
3347where
3348    S: settings_state::State,
3349    S::UpdatedAt: settings_state::IsUnset,
3350{
3351    /// Set the `updatedAt` field (required)
3352    pub fn updated_at(
3353        mut self,
3354        value: impl Into<Datetime>,
3355    ) -> SettingsBuilder<'a, settings_state::SetUpdatedAt<S>> {
3356        self._fields.6 = Option::Some(value.into());
3357        SettingsBuilder {
3358            _state: PhantomData,
3359            _fields: self._fields,
3360            _lifetime: PhantomData,
3361        }
3362    }
3363}
3364
3365impl<'a, S> SettingsBuilder<'a, S>
3366where
3367    S: settings_state::State,
3368    S::Version: settings_state::IsUnset,
3369{
3370    /// Set the `version` field (required)
3371    pub fn version(
3372        mut self,
3373        value: impl Into<i64>,
3374    ) -> SettingsBuilder<'a, settings_state::SetVersion<S>> {
3375        self._fields.7 = Option::Some(value.into());
3376        SettingsBuilder {
3377            _state: PhantomData,
3378            _fields: self._fields,
3379            _lifetime: PhantomData,
3380        }
3381    }
3382}
3383
3384impl<'a, S> SettingsBuilder<'a, S>
3385where
3386    S: settings_state::State,
3387    S::Version: settings_state::IsSet,
3388    S::CreatedAt: settings_state::IsSet,
3389    S::UpdatedAt: settings_state::IsSet,
3390{
3391    /// Build the final struct
3392    pub fn build(self) -> Settings<'a> {
3393        Settings {
3394            behavior_settings: self._fields.0,
3395            control_order: self._fields.1,
3396            control_settings: self._fields.2,
3397            created_at: self._fields.3.unwrap(),
3398            theme: self._fields.4,
3399            ui_settings: self._fields.5,
3400            updated_at: self._fields.6.unwrap(),
3401            version: self._fields.7.unwrap(),
3402            extra_data: Default::default(),
3403        }
3404    }
3405    /// Build the final struct with custom extra_data
3406    pub fn build_with_data(
3407        self,
3408        extra_data: BTreeMap<
3409            jacquard_common::deps::smol_str::SmolStr,
3410            jacquard_common::types::value::Data<'a>,
3411        >,
3412    ) -> Settings<'a> {
3413        Settings {
3414            behavior_settings: self._fields.0,
3415            control_order: self._fields.1,
3416            control_settings: self._fields.2,
3417            created_at: self._fields.3.unwrap(),
3418            theme: self._fields.4,
3419            ui_settings: self._fields.5,
3420            updated_at: self._fields.6.unwrap(),
3421            version: self._fields.7.unwrap(),
3422            extra_data: Some(extra_data),
3423        }
3424    }
3425}