zulip-api 0.0.8

Client library for interacting with the Zulip API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
use serde::{Deserialize, Serialize};
use serde_repr::{Deserialize_repr, Serialize_repr};

use crate::{field_access, impl_default, impl_display, UserSettingsEmojisetChoice};

/// Represents the default values of settings for new users.
///
/// **Changes**: New in Zulip 5.0 (feature level 95).
///
/// Modified from `openapi-generator-cli` output:
///
/// ```shell,no_build,no_run
/// $ openapi-generator-cli generate -g rust -i ./zerver/openapi/zulip.yaml -o zulip-openapi --skip-validate-spec
/// ```
///
/// ```text
/// /*
/// * Zulip REST API
/// *
/// * Powerful open source group chat
/// *
/// * The version of the OpenAPI document: 1.0.0
/// *
/// * Generated by: https://openapi-generator.tech
/// */
/// ```
///
/// See [zerver/openapi/zulip.yaml](https://github.com/zulip/zulip/blob/main/zerver/openapi/zulip.yaml) for the original OpenAPI configuration.
///
/// Configuration slightly modified to work with the Rust generator of [`openapi-generator-cli`](https://openapi-generator.tech).
///
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RealmUserSettingsDefault {
    #[serde(skip_serializing_if = "Option::is_none")]
    twenty_four_hour_time: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_mark_read_on_scroll_policy: Option<WebMarkReadOnScrollPolicy>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_channel_default_view: Option<WebChannelDefaultView>,
    #[serde(skip_serializing_if = "Option::is_none")]
    starred_message_counts: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    receives_typing_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_suggest_update_timezone: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    fluid_layout_width: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    high_contrast_mode: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_font_size_px: Option<u64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_line_height_percent: Option<u64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    color_scheme: Option<ColorScheme>,
    #[serde(skip_serializing_if = "Option::is_none")]
    translate_emoticons: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    display_emoji_reaction_users: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    default_language: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_home_view: Option<WebHomeView>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_escape_navigates_to_home_view: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    left_side_userlist: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    emojiset: Option<Emojiset>,
    #[serde(skip_serializing_if = "Option::is_none")]
    demote_inactive_streams: Option<DemoteInactiveStreams>,
    #[serde(skip_serializing_if = "Option::is_none")]
    user_list_style: Option<UserListStyle>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_animate_image_previews: Option<WebAnimateImagePreviews>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_stream_unreads_count_display_policy: Option<WebStreamUnreadsCountDisplayPolicy>,
    #[serde(skip_serializing_if = "Option::is_none")]
    hide_ai_features: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_left_sidebar_show_channel_folders: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_left_sidebar_unreads_count_summary: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_stream_desktop_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_stream_email_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_stream_push_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_stream_audible_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    notification_sound: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_desktop_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_sounds: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_offline_email_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_offline_push_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_online_push_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_followed_topic_desktop_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_followed_topic_email_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_followed_topic_push_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_followed_topic_audible_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_digest_emails: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_marketing_emails: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_login_emails: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    message_content_in_email_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pm_content_in_desktop_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    wildcard_mentions_notify: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_followed_topic_wildcard_mentions_notify: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    desktop_icon_count_display: Option<DesktopIconCountDisplay>,
    #[serde(skip_serializing_if = "Option::is_none")]
    realm_name_in_email_notifications_policy: Option<RealmNameInEmailNotificationsPolicy>,
    #[serde(skip_serializing_if = "Option::is_none")]
    automatically_follow_topics_policy: Option<AutomaticallyFollowTopicsPolicy>,
    #[serde(skip_serializing_if = "Option::is_none")]
    automatically_unmute_topics_in_muted_streams_policy:
        Option<AutomaticallyUnmuteTopicsInMutedStreamsPolicy>,
    #[serde(skip_serializing_if = "Option::is_none")]
    automatically_follow_topics_where_mentioned: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    resolved_topic_notice_auto_read_policy: Option<ResolvedTopicNoticeAutoReadPolicy>,
    #[serde(skip_serializing_if = "Option::is_none")]
    presence_enabled: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enter_sends: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    enable_drafts_synchronization: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    email_notifications_batching_period_seconds: Option<u64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    available_notification_sounds: Option<Vec<String>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    emojiset_choices: Option<Vec<UserSettingsEmojisetChoice>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    send_private_typing_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    send_stream_typing_notifications: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    send_read_receipts: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    allow_private_data_export: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    email_address_visibility: Option<EmailAddressVisibility>,
    #[serde(skip_serializing_if = "Option::is_none")]
    web_navigate_to_sent_message: Option<bool>,
}

impl RealmUserSettingsDefault {
    /// Creates a new [RealmUserSettingsDefault].
    pub const fn new() -> Self {
        Self {
            twenty_four_hour_time: None,
            web_mark_read_on_scroll_policy: None,
            web_channel_default_view: None,
            starred_message_counts: None,
            receives_typing_notifications: None,
            web_suggest_update_timezone: None,
            fluid_layout_width: None,
            high_contrast_mode: None,
            web_font_size_px: None,
            web_line_height_percent: None,
            color_scheme: None,
            translate_emoticons: None,
            display_emoji_reaction_users: None,
            default_language: None,
            web_home_view: None,
            web_escape_navigates_to_home_view: None,
            left_side_userlist: None,
            emojiset: None,
            demote_inactive_streams: None,
            user_list_style: None,
            web_animate_image_previews: None,
            web_stream_unreads_count_display_policy: None,
            hide_ai_features: None,
            web_left_sidebar_show_channel_folders: None,
            web_left_sidebar_unreads_count_summary: None,
            enable_stream_desktop_notifications: None,
            enable_stream_email_notifications: None,
            enable_stream_push_notifications: None,
            enable_stream_audible_notifications: None,
            notification_sound: None,
            enable_desktop_notifications: None,
            enable_sounds: None,
            enable_offline_email_notifications: None,
            enable_offline_push_notifications: None,
            enable_online_push_notifications: None,
            enable_followed_topic_desktop_notifications: None,
            enable_followed_topic_email_notifications: None,
            enable_followed_topic_push_notifications: None,
            enable_followed_topic_audible_notifications: None,
            enable_digest_emails: None,
            enable_marketing_emails: None,
            enable_login_emails: None,
            message_content_in_email_notifications: None,
            pm_content_in_desktop_notifications: None,
            wildcard_mentions_notify: None,
            enable_followed_topic_wildcard_mentions_notify: None,
            desktop_icon_count_display: None,
            realm_name_in_email_notifications_policy: None,
            automatically_follow_topics_policy: None,
            automatically_unmute_topics_in_muted_streams_policy: None,
            automatically_follow_topics_where_mentioned: None,
            resolved_topic_notice_auto_read_policy: None,
            presence_enabled: None,
            enter_sends: None,
            enable_drafts_synchronization: None,
            email_notifications_batching_period_seconds: None,
            available_notification_sounds: None,
            emojiset_choices: None,
            send_private_typing_notifications: None,
            send_stream_typing_notifications: None,
            send_read_receipts: None,
            allow_private_data_export: None,
            email_address_visibility: None,
            web_navigate_to_sent_message: None,
        }
    }
}

field_access! {
    RealmUserSettingsDefault {
        /// Whether time should be [displayed in 24-hour notation](https://zulip.com/help/change-the-time-format).
        ///
        /// A `null` value indicates that the client should use the default time format for the user's locale.
        ///
        /// **Changes**: Prior to Zulip 11.0 (feature level 408), `null` was not a valid value for this setting.
        /// Note that it was not possible to actually set the time format to `null` at this feature level.
        ///
        /// New in Zulip 5.0 (feature level 99). This value was previously available as `realm_default_twenty_four_hour_time`
        /// in the top-level response object (only when `realm` was present in `fetch_event_types`).
        twenty_four_hour_time: option { bool },
        /// Whether or not to mark messages as read when the user scrolls through their feed.
        web_mark_read_on_scroll_policy: option { WebMarkReadOnScrollPolicy },
        /// Web/desktop app setting controlling the default navigation behavior when clicking on a channel link.
        web_channel_default_view: option { WebChannelDefaultView },
        /// Whether clients should display the [number of starred messages](https://zulip.com/help/star-a-message#display-the-number-of-starred-messages).
        starred_message_counts: option { bool },
        /// Whether the user is configured to receive typing notifications from other users.
        ///
        /// The server will only deliver typing notifications events to users who for whom this is enabled.
        ///
        /// **Changes**: New in Zulip 9.0 (feature level 253). Previously, there were only options to disable sending typing notifications.
        receives_typing_notifications: option { bool },
        /// Whether the user should be shown an alert, offering to update their [profile time zone](https://zulip.com/help/change-your-timezone),
        /// when the time displayed for the profile time zone differs from the current time displayed by the time zone configured on their device.
        ///
        /// **Changes**: New in Zulip 10.0 (feature level 329).
        web_suggest_update_timezone: option { bool },
        /// Whether to use the [maximum available screen width](https://zulip.com/help/enable-full-width-display) for the web app's center panel (message feed, recent conversations) on wide screens.
        fluid_layout_width: option { bool },
        /// This setting is reserved for use to control variations in Zulip's design to help visually impaired users.
        high_contrast_mode: option { bool },
        /// User-configured primary `font-size` for the web application, in pixels.
        ///
        /// **Changes**: New in Zulip 9.0 (feature level 245). Previously, font size was only adjustable via browser zoom. Note that this setting was not fully implemented at this feature level.
        web_font_size_px: option { u64 },
        /// User-configured primary `line-height` for the web application, in percent, so a value of 120 represents a `line-height` of 1.2.
        ///
        /// **Changes**: New in Zulip 9.0 (feature level 245). Previously, line height was not user-configurable. Note that this setting was not fully implemented at this feature level.
        web_line_height_percent: option { u64 },
        /// Controls which [color theme](https://zulip.com/help/dark-theme) to use.
        color_scheme: option { ColorScheme },
        /// Whether to [translate emoticons to emoji](/help/configure-emoticon-translations) in messages the user sends.
        translate_emoticons: option { bool },
        /// Whether to display the names of reacting users on a message.
        ///
        /// When enabled, clients should display the names of reacting users, rather than a count, for messages with few total reactions.
        /// The ideal cutoff may depend on the space available for displaying reactions;
        /// the official web application displays names when 3 or fewer total reactions are present with this setting enabled.
        ///
        /// **Changes**: New in Zulip 6.0 (feature level 125).
        display_emoji_reaction_users: option { bool },
        /// The [home view](/help/configure-home-view) used when opening a new Zulip web app window or hitting the `Esc` keyboard shortcut repeatedly.
        web_home_view: option { WebHomeView },
        /// Whether the escape key navigates to the [configured home view](/help/configure-home-view).
        ///
        /// **Changes**: New in Zulip 8.0 (feature level 219). Previously, this was called `escape_navigates_to_default_view`, which was new in Zulip 5.0 (feature level 107).
        web_escape_navigates_to_home_view: option { bool },
        /// Whether the users list on left sidebar in narrow windows.
        ///
        /// This feature is not heavily used and is likely to be reworked.
        left_side_userlist: option { bool },
        /// The user's configured [emoji set](https://zulip.com/help/emoji-and-emoticons#use-emoticons), used to display emoji to the user everywhere they appear in the UI.
        emojiset: option { Emojiset },
        /// Whether to [hide inactive channels](https://zulip.com/help/manage-inactive-channels) in the left sidebar.
        demote_inactive_streams: option { DemoteInactiveStreams },
        /// The style selected by the user for the right sidebar user list.
        user_list_style: option { UserListStyle },
        /// Controls how animated images should be played in the message feed in the web/desktop application.
        web_animate_image_previews: option { WebAnimateImagePreviews },
        /// Configuration for which channels should be displayed with a numeric unread count in the left sidebar.
        ///
        /// Channels that do not have an unread count will have a simple dot indicator for whether there are any unread messages.
        web_stream_unreads_count_display_policy: option { WebStreamUnreadsCountDisplayPolicy },
        /// Controls whether user wants AI features like topic summarization to be hidden in all Zulip clients.  **Changes**: New in Zulip 10.0 (feature level 350).
        hide_ai_features: option { bool },
        /// Determines whether the web/desktop application's left sidebar displays any channel folders configured by the organization.  **Changes**: New in Zulip 11.0 (feature level 411).
        web_left_sidebar_show_channel_folders: option { bool },
        /// Determines whether the web/desktop application's left sidebar displays the unread message count summary.  **Changes**: New in Zulip 11.0 (feature level 398).
        web_left_sidebar_unreads_count_summary: option { bool },
        /// Enable visual desktop notifications for channel messages.
        enable_stream_desktop_notifications: option { bool },
        /// Enable email notifications for channel messages.
        enable_stream_email_notifications: option { bool },
        /// Enable mobile notifications for channel messages.
        enable_stream_push_notifications: option { bool },
        /// Enable audible desktop notifications for channel messages.
        enable_stream_audible_notifications: option { bool },
        /// Enable visual desktop notifications for direct messages and @-mentions.
        enable_desktop_notifications: option { bool },
        /// Enable audible desktop notifications for direct messages and @-mentions.
        enable_sounds: option { bool },
        /// Enable email notifications for direct messages and @-mentions received when the user is offline.
        enable_offline_email_notifications: option { bool },
        /// Enable mobile notification for direct messages and @-mentions received when the user is offline.
        enable_offline_push_notifications: option { bool },
        /// Enable mobile notification for direct messages and @-mentions received when the user is online.
        enable_online_push_notifications: option { bool },
        /// Enable visual desktop notifications for messages sent to followed topics.
        ///
        /// **Changes**: New in Zulip 8.0 (feature level 189).
        enable_followed_topic_desktop_notifications: option { bool },
        /// Enable email notifications for messages sent to followed topics.
        ///
        /// **Changes**: New in Zulip 8.0 (feature level 189).
        enable_followed_topic_email_notifications: option { bool },
        /// Enable push notifications for messages sent to followed topics.
        ///
        /// **Changes**: New in Zulip 8.0 (feature level 189).
        enable_followed_topic_push_notifications: option { bool },
        /// Enable audible desktop notifications for messages sent to followed topics.
        ///
        /// **Changes**: New in Zulip 8.0 (feature level 189).
        enable_followed_topic_audible_notifications: option { bool },
        /// Enable digest emails when the user is away.
        enable_digest_emails: option { bool },
        /// Enable marketing emails. Has no function outside Zulip Cloud.
        enable_marketing_emails: option { bool },
        /// Enable email notifications for new logins to account.
        enable_login_emails: option { bool },
        /// Include the message's content in email notifications for new messages.
        message_content_in_email_notifications: option { bool },
        /// Include content of direct messages in desktop notifications.
        pm_content_in_desktop_notifications: option { bool },
        /// Whether wildcard mentions (E.g. @**all**) should send notifications like a personal mention.
        wildcard_mentions_notify: option { bool },
        /// Whether wildcard mentions (e.g., @**all**) in messages sent to followed topics should send notifications like a personal mention.
        ///
        /// **Changes**: New in Zulip 8.0 (feature level 189).
        enable_followed_topic_wildcard_mentions_notify: option { bool },
        /// Unread count badge (appears in desktop sidebar and browser tab).
        desktop_icon_count_display: option { DesktopIconCountDisplay },
        /// Whether to [include organization name in subject of message notification emails](https://zulip.com/help/email-notifications#include-organization-name-in-subject-line).
        realm_name_in_email_notifications_policy: option { RealmNameInEmailNotificationsPolicy },
        /// Which [topics to follow automatically](/help/mute-a-topic).
        automatically_follow_topics_policy: option { AutomaticallyFollowTopicsPolicy },
        /// Which [topics to unmute automatically in muted channels](/help/mute-a-topic).
        automatically_unmute_topics_in_muted_streams_policy: option { AutomaticallyUnmuteTopicsInMutedStreamsPolicy },
        /// Whether the server will automatically mark the user as following topics where the user is mentioned.
        ///
        /// **Changes**: New in Zulip 8.0 (feature level 235).
        automatically_follow_topics_where_mentioned: option { bool },
        /// Controls whether the resolved-topic notices are marked as read.
        resolved_topic_notice_auto_read_policy: option { ResolvedTopicNoticeAutoReadPolicy },
        /// Display the presence status to other users when online.
        presence_enabled: option { bool },
        /// Whether the user setting for [sending on pressing Enter](/help/configure-send-message-keys) in the compose box is enabled.
        enter_sends: option { bool },
        /// A boolean parameter to control whether synchronizing drafts is enabled for the user.
        ///
        /// When synchronization is disabled, all drafts stored in the server will be automatically deleted from the server.
        ///
        /// This does not do anything (like sending events) to delete local copies of drafts stored in clients.
        enable_drafts_synchronization: option { bool },
        /// The duration (in seconds) for which the server should wait to batch email notifications before sending them.
        email_notifications_batching_period_seconds: option { u64 },
        /// Whether [typing notifications](/help/typing-notifications) be sent when composing direct messages.
        ///
        /// **Changes**: New in Zulip 5.0 (feature level 105).
        send_private_typing_notifications: option { bool },
        /// Whether [typing notifications](/help/typing-notifications) be sent when composing channel messages.
        ///
        /// **Changes**: New in Zulip 5.0 (feature level 105).
        send_stream_typing_notifications: option { bool },
        /// Whether other users are allowed to see whether you've read messages.
        ///
        /// **Changes**: New in Zulip 5.0 (feature level 105).
        send_read_receipts: option { bool },
        /// Whether organization administrators are allowed to export your private data.
        ///
        /// **Changes**: New in Zulip 10.0 (feature level 293).
        allow_private_data_export: option { bool },
        /// The [policy][permission-level] for [which other users][help-email-visibility] in this organization can see the user's real email address.
        email_address_visibility: option { EmailAddressVisibility },
        /// Web/desktop app setting for whether the user's view should automatically go to the conversation where they sent a message.
        ///
        /// **Changes**: New in Zulip 9.0 (feature level 268). Previously, this behavior was not configurable.
        web_navigate_to_sent_message: option { bool },
    }
}

field_access! {
    RealmUserSettingsDefault {
        /// What [default language](https://zulip.com/help/change-your-language) to use for the account.
        ///
        /// This controls both the Zulip UI as well as email notifications sent to the user.
        ///
        /// The value needs to be a standard language code that the Zulip server has translation data for; for example, `\"en\"` for English or `\"de\"` for German.
        default_language: option_cow_deref { str, String },
        /// Notification sound name.
        notification_sound: option_cow_deref { str, String },
        /// Array containing the names of the notification sound options supported by this Zulip server.
        ///
        /// Only relevant to support UI for configuring notification sounds.
        available_notification_sounds: option_cow_deref { [String], Vec<String> },
        /// Array of dictionaries where each dictionary describes an emoji set supported by this version of the Zulip server.
        ///
        /// Only relevant to clients with configuration UI for choosing an emoji set; the currently selected emoji set is available in the `emojiset` key.
        ///
        /// See [PATCH /settings](https://zulip.com/api/update-settings) for details on the meaning of this setting.
        emojiset_choices: option_cow_deref { [UserSettingsEmojisetChoice], Vec<UserSettingsEmojisetChoice> },
    }
}

impl_default!(RealmUserSettingsDefault);
impl_display!(RealmUserSettingsDefault);

/// Whether or not to mark messages as read when the user scrolls through their feed.
///
/// - 1: Always
/// - 2: Only in conversation views
/// - 3: Never
///
/// **Changes**: New in Zulip 7.0 (feature level 175).
/// Previously, there was no way for the user to configure this behavior on the web,
/// and the Zulip web and desktop apps behaved like the \"Always\" setting when marking messages as read.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
#[repr(u8)]
pub enum WebMarkReadOnScrollPolicy {
    Always = 1,
    OnlyInConversationViews = 2,
    Never = 3,
}

impl WebMarkReadOnScrollPolicy {
    /// Creates a new [WebMarkReadOnScrollPolicy].
    pub const fn new() -> Self {
        Self::Always
    }
}

impl_default!(WebMarkReadOnScrollPolicy);
impl_display!(WebMarkReadOnScrollPolicy);

/// Web/desktop app setting controlling the default navigation behavior when clicking on a channel link.
///
/// - 1: Top topic in the channel
/// - 2: Channel feed
/// - 3: List of topics
/// - 4: Top unread topic in channel
///
/// **Changes**: The \"Top unread topic in channel\" is new in Zulip 11.0 (feature level 401).
///
/// In Zulip 11.0 (feature level 383), we added a new option \"List of topics\" to this setting.
///
/// New in Zulip 9.0 (feature level 269). Previously, this was not configurable, and every user had the \"Channel feed\" behavior.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
#[repr(u8)]
pub enum WebChannelDefaultView {
    TopTopic = 1,
    ChannelFeed = 2,
    ListOfTopics = 3,
    TopUnreadTopic = 4,
}

impl WebChannelDefaultView {
    /// Creates a new [WebChannelDefaultView].
    pub const fn new() -> Self {
        Self::TopTopic
    }
}

impl_default!(WebChannelDefaultView);
impl_display!(WebChannelDefaultView);

/// Controls which [color theme](/help/dark-theme) to use.
///
/// - 1: Automatic
/// - 2: Dark theme
/// - 3: Light theme
///
/// Automatic detection is implementing using the standard `prefers-color-scheme` media query.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
#[repr(u8)]
pub enum ColorScheme {
    Automatic = 1,
    DarkTheme = 2,
    LightTheme = 3,
}

impl ColorScheme {
    /// Creates a new [ColorScheme].
    pub const fn new() -> Self {
        Self::Automatic
    }
}

impl_default!(ColorScheme);
impl_display!(ColorScheme);

/// Represents the `home view` used when opening a new Zulip web app window or hitting the `Esc` keyboard shortcut repeatedly.
///
/// - \"recent\" - Recent conversations view
/// - \"inbox\" - Inbox view
/// - \"all_messages\" - Combined feed view
///
/// **Changes**: New in Zulip 8.0 (feature level 219). Previously, this was called `default_view`, which was new in Zulip 4.0 (feature level 42).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum WebHomeView {
    Recent,
    Inbox,
    AllMessages,
}

impl WebHomeView {
    /// Creates a new [WebHomeView].
    pub const fn new() -> Self {
        Self::Recent
    }
}

impl_default!(WebHomeView);
impl_display!(WebHomeView);

/// Represents The user's configured `emoji set`, used to display emoji to the user everywhere they appear in the UI.
///
/// - \"google\": Google modern
/// - \"twitter\": Twitter
/// - \"text\": Plain text
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum Emojiset {
    Google,
    Twitter,
    Text,
}

impl Emojiset {
    /// Creates a new  [Emojiset].
    pub const fn new() -> Self {
        Self::Google
    }
}

impl_default!(Emojiset);
impl_display!(Emojiset);

/// Whether to `hide inactive channels` in the left sidebar.
///
/// - 1: Automatic
/// - 2: Always
/// - 3: Never
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum DemoteInactiveStreams {
    Automatic = 1,
    Always = 2,
    Never = 3,
}

impl DemoteInactiveStreams {
    /// Creates a new  [DemoteInactiveStreams].
    pub const fn new() -> Self {
        Self::Automatic
    }
}

impl_default!(DemoteInactiveStreams);
impl_display!(DemoteInactiveStreams);

/// The style selected by the user for the right sidebar user list.
///
/// - 1: Compact
/// - 2: With status
/// - 3: With avatar and status
///
/// **Changes**: New in Zulip 6.0 (feature level 141).
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum UserListStyle {
    Compact = 1,
    WithStatus = 2,
    WithAvatarAndStatus = 3,
}

impl UserListStyle {
    /// Creates a new  [UserListStyle].
    pub const fn new() -> Self {
        Self::Compact
    }
}

impl_default!(UserListStyle);
impl_display!(UserListStyle);

/// Controls how animated images should be played in the message feed in the web/desktop application.
///
/// - \"always\": Always play the animated images in the message feed.
/// - \"on_hover\": Play the animated images on hover over them in the message feed.
/// - \"never\": Never play animated images in the message feed.
///
/// **Changes**: New in Zulip 9.0 (feature level 275).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum WebAnimateImagePreviews {
    Always,
    OnHover,
    Never,
}

impl WebAnimateImagePreviews {
    /// Creates a new  [WebAnimateImagePreviews].
    pub const fn new() -> Self {
        Self::Always
    }
}

impl_default!(WebAnimateImagePreviews);
impl_display!(WebAnimateImagePreviews);

/// Configuration for which channels should be displayed with a numeric unread count in the left sidebar.
///
/// Channels that do not have an unread count will have a simple dot indicator for whether there are any unread messages.
///
/// - 1: All channels
/// - 2: Unmuted channels and topics
/// - 3: No channels
///
/// **Changes**: New in Zulip 8.0 (feature level 210).
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum WebStreamUnreadsCountDisplayPolicy {
    AllChannels = 1,
    UnmutedChannelsAndTopics = 2,
    NoChannels = 3,
}

impl WebStreamUnreadsCountDisplayPolicy {
    /// Creates a new  [WebStreamUnreadsCountDisplayPolicy].
    pub const fn new() -> Self {
        Self::AllChannels
    }
}

impl_default!(WebStreamUnreadsCountDisplayPolicy);
impl_display!(WebStreamUnreadsCountDisplayPolicy);

/// Unread count badge (appears in desktop sidebar and browser tab).
///
/// - 1: All unread messages
/// - 2: DMs, mentions, and followed topics
/// - 3: DMs and mentions
/// - 4: None
///
/// **Changes**: In Zulip 8.0 (feature level 227), added `DMs, mentions, and followed topics` option, renumbering the options to insert it in order.
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum DesktopIconCountDisplay {
    AllUnreadMessages = 1,
    DmsMentionsFollowedTopics = 2,
    DmsMentions = 3,
    None = 4,
}

impl DesktopIconCountDisplay {
    /// Creates a new  [DesktopIconCountDisplay].
    pub const fn new() -> Self {
        Self::AllUnreadMessages
    }
}

impl_default!(DesktopIconCountDisplay);
impl_display!(DesktopIconCountDisplay);

/// Whether to `include organization name in subject of message notification emails`.
///
/// - 1: Automatic
/// - 2: Always
/// - 3: Never
///
/// **Changes**: New in Zulip 7.0 (feature level 168), replacing the previous `realm_name_in_notifications` boolean; `true` corresponded to `Always`, and `false` to `Never`.
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum RealmNameInEmailNotificationsPolicy {
    Automatic = 1,
    Always = 2,
    Never = 3,
}

impl RealmNameInEmailNotificationsPolicy {
    /// Creates a new  [RealmNameInEmailNotificationsPolicy].
    pub const fn new() -> Self {
        Self::Automatic
    }
}

impl_default!(RealmNameInEmailNotificationsPolicy);
impl_display!(RealmNameInEmailNotificationsPolicy);

/// Which `topics to follow automatically`.
///
/// - 1: Topics the user participates in
/// - 2: Topics the user sends a message to
/// - 3: Topics the user starts
/// - 4: Never
///
/// **Changes**: New in Zulip 8.0 (feature level 214).
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum AutomaticallyFollowTopicsPolicy {
    Participates = 1,
    SendMessages = 2,
    Starts = 3,
    Never = 4,
}

impl AutomaticallyFollowTopicsPolicy {
    /// Creates a new  [AutomaticallyFollowTopicsPolicy].
    pub const fn new() -> Self {
        Self::Participates
    }
}

impl_default!(AutomaticallyFollowTopicsPolicy);
impl_display!(AutomaticallyFollowTopicsPolicy);

/// Which `topics to unmute automatically in muted channels`.
///
/// - 1: Topics the user participates in
/// - 2: Topics the user sends a message to
/// - 3: Topics the user starts
/// - 4: Never
///
/// **Changes**: New in Zulip 8.0 (feature level 214).
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum AutomaticallyUnmuteTopicsInMutedStreamsPolicy {
    Participates = 1,
    SendMessages = 2,
    Starts = 3,
    Never = 4,
}

impl AutomaticallyUnmuteTopicsInMutedStreamsPolicy {
    /// Creates a new  [AutomaticallyUnmuteTopicsInMutedStreamsPolicy].
    pub const fn new() -> Self {
        Self::Participates
    }
}

impl_default!(AutomaticallyUnmuteTopicsInMutedStreamsPolicy);
impl_display!(AutomaticallyUnmuteTopicsInMutedStreamsPolicy);

/// Controls whether the resolved-topic notices are marked as read.
///
/// - \"always\": Always mark resolved-topic notices as read.
/// - \"except_followed\": Mark resolved-topic notices as read in topics not followed by the user.
/// - \"never\": Never mark resolved-topic notices as read.
///
/// **Changes**: New in Zulip 11.0 (feature level 385).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum ResolvedTopicNoticeAutoReadPolicy {
    Always,
    ExceptFollowed,
    Never,
}

impl ResolvedTopicNoticeAutoReadPolicy {
    /// Creates a new  [ResolvedTopicNoticeAutoReadPolicy].
    pub const fn new() -> Self {
        Self::Always
    }
}

impl_default!(ResolvedTopicNoticeAutoReadPolicy);
impl_display!(ResolvedTopicNoticeAutoReadPolicy);

/// The [policy](https://zulip.com/api/roles-and-permissions#permission-levels) for [which other users](https://zulip.com/help/configure-email-visibility) in this organization can see the user's real email address.
///
/// - 1: Everyone
/// - 2: Members only
/// - 3: Administrators only
/// - 4: Nobody
/// - 5: Moderators only
///
/// **Changes**: New in Zulip 7.0 (feature level 163), replacing the realm-level setting.
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
pub enum EmailAddressVisibility {
    Everyone = 1,
    MembersOnly = 2,
    AdministratorsOnly = 3,
    Nobody = 4,
    ModeratorsOnly = 5,
}

impl EmailAddressVisibility {
    /// Creates a new  [EmailAddressVisibility].
    pub const fn new() -> Self {
        Self::Everyone
    }
}

impl_default!(EmailAddressVisibility);
impl_display!(EmailAddressVisibility);