// This file is @generated by prost-build.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConfigKey {}
/// Nested message and enum types in `ConfigKey`.
pub mod config_key {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    #[must_use]
pub enum Bool {
        BrowserTableShowNotesMode = 0,
        PreviewBothSides = 3,
        CollapseTags = 4,
        CollapseNotetypes = 5,
        CollapseDecks = 6,
        CollapseSavedSearches = 7,
        CollapseToday = 8,
        CollapseCardState = 9,
        CollapseFlags = 10,
        Sched2021 = 11,
        AddingDefaultsToCurrentDeck = 12,
        HideAudioPlayButtons = 13,
        InterruptAudioWhenAnswering = 14,
        PasteImagesAsPng = 15,
        PasteStripsFormatting = 16,
        NormalizeNoteText = 17,
        IgnoreAccentsInSearch = 18,
        RestorePositionBrowser = 19,
        RestorePositionReviewer = 20,
        ResetCountsBrowser = 21,
        ResetCountsReviewer = 22,
        RandomOrderReposition = 23,
        ShiftPositionOfExistingCards = 24,
        RenderLatex = 25,
        LoadBalancerEnabled = 26,
        FsrsShortTermWithStepsEnabled = 27,
        FsrsLegacyEvaluate = 28,
    }
    impl Bool {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::BrowserTableShowNotesMode => "BROWSER_TABLE_SHOW_NOTES_MODE",
                Self::PreviewBothSides => "PREVIEW_BOTH_SIDES",
                Self::CollapseTags => "COLLAPSE_TAGS",
                Self::CollapseNotetypes => "COLLAPSE_NOTETYPES",
                Self::CollapseDecks => "COLLAPSE_DECKS",
                Self::CollapseSavedSearches => "COLLAPSE_SAVED_SEARCHES",
                Self::CollapseToday => "COLLAPSE_TODAY",
                Self::CollapseCardState => "COLLAPSE_CARD_STATE",
                Self::CollapseFlags => "COLLAPSE_FLAGS",
                Self::Sched2021 => "SCHED_2021",
                Self::AddingDefaultsToCurrentDeck => "ADDING_DEFAULTS_TO_CURRENT_DECK",
                Self::HideAudioPlayButtons => "HIDE_AUDIO_PLAY_BUTTONS",
                Self::InterruptAudioWhenAnswering => "INTERRUPT_AUDIO_WHEN_ANSWERING",
                Self::PasteImagesAsPng => "PASTE_IMAGES_AS_PNG",
                Self::PasteStripsFormatting => "PASTE_STRIPS_FORMATTING",
                Self::NormalizeNoteText => "NORMALIZE_NOTE_TEXT",
                Self::IgnoreAccentsInSearch => "IGNORE_ACCENTS_IN_SEARCH",
                Self::RestorePositionBrowser => "RESTORE_POSITION_BROWSER",
                Self::RestorePositionReviewer => "RESTORE_POSITION_REVIEWER",
                Self::ResetCountsBrowser => "RESET_COUNTS_BROWSER",
                Self::ResetCountsReviewer => "RESET_COUNTS_REVIEWER",
                Self::RandomOrderReposition => "RANDOM_ORDER_REPOSITION",
                Self::ShiftPositionOfExistingCards => "SHIFT_POSITION_OF_EXISTING_CARDS",
                Self::RenderLatex => "RENDER_LATEX",
                Self::LoadBalancerEnabled => "LOAD_BALANCER_ENABLED",
                Self::FsrsShortTermWithStepsEnabled => {
                    "FSRS_SHORT_TERM_WITH_STEPS_ENABLED"
                }
                Self::FsrsLegacyEvaluate => "FSRS_LEGACY_EVALUATE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "BROWSER_TABLE_SHOW_NOTES_MODE" => Some(Self::BrowserTableShowNotesMode),
                "PREVIEW_BOTH_SIDES" => Some(Self::PreviewBothSides),
                "COLLAPSE_TAGS" => Some(Self::CollapseTags),
                "COLLAPSE_NOTETYPES" => Some(Self::CollapseNotetypes),
                "COLLAPSE_DECKS" => Some(Self::CollapseDecks),
                "COLLAPSE_SAVED_SEARCHES" => Some(Self::CollapseSavedSearches),
                "COLLAPSE_TODAY" => Some(Self::CollapseToday),
                "COLLAPSE_CARD_STATE" => Some(Self::CollapseCardState),
                "COLLAPSE_FLAGS" => Some(Self::CollapseFlags),
                "SCHED_2021" => Some(Self::Sched2021),
                "ADDING_DEFAULTS_TO_CURRENT_DECK" => {
                    Some(Self::AddingDefaultsToCurrentDeck)
                }
                "HIDE_AUDIO_PLAY_BUTTONS" => Some(Self::HideAudioPlayButtons),
                "INTERRUPT_AUDIO_WHEN_ANSWERING" => {
                    Some(Self::InterruptAudioWhenAnswering)
                }
                "PASTE_IMAGES_AS_PNG" => Some(Self::PasteImagesAsPng),
                "PASTE_STRIPS_FORMATTING" => Some(Self::PasteStripsFormatting),
                "NORMALIZE_NOTE_TEXT" => Some(Self::NormalizeNoteText),
                "IGNORE_ACCENTS_IN_SEARCH" => Some(Self::IgnoreAccentsInSearch),
                "RESTORE_POSITION_BROWSER" => Some(Self::RestorePositionBrowser),
                "RESTORE_POSITION_REVIEWER" => Some(Self::RestorePositionReviewer),
                "RESET_COUNTS_BROWSER" => Some(Self::ResetCountsBrowser),
                "RESET_COUNTS_REVIEWER" => Some(Self::ResetCountsReviewer),
                "RANDOM_ORDER_REPOSITION" => Some(Self::RandomOrderReposition),
                "SHIFT_POSITION_OF_EXISTING_CARDS" => {
                    Some(Self::ShiftPositionOfExistingCards)
                }
                "RENDER_LATEX" => Some(Self::RenderLatex),
                "LOAD_BALANCER_ENABLED" => Some(Self::LoadBalancerEnabled),
                "FSRS_SHORT_TERM_WITH_STEPS_ENABLED" => {
                    Some(Self::FsrsShortTermWithStepsEnabled)
                }
                "FSRS_LEGACY_EVALUATE" => Some(Self::FsrsLegacyEvaluate),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    #[must_use]
pub enum String {
        SetDueBrowser = 0,
        SetDueReviewer = 1,
        DefaultSearchText = 2,
        CardStateCustomizer = 3,
    }
    impl String {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::SetDueBrowser => "SET_DUE_BROWSER",
                Self::SetDueReviewer => "SET_DUE_REVIEWER",
                Self::DefaultSearchText => "DEFAULT_SEARCH_TEXT",
                Self::CardStateCustomizer => "CARD_STATE_CUSTOMIZER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SET_DUE_BROWSER" => Some(Self::SetDueBrowser),
                "SET_DUE_REVIEWER" => Some(Self::SetDueReviewer),
                "DEFAULT_SEARCH_TEXT" => Some(Self::DefaultSearchText),
                "CARD_STATE_CUSTOMIZER" => Some(Self::CardStateCustomizer),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct GetConfigBoolRequest {
    #[prost(enumeration = "config_key::Bool", tag = "1")]
    pub key: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct SetConfigBoolRequest {
    #[prost(enumeration = "config_key::Bool", tag = "1")]
    pub key: i32,
    #[prost(bool, tag = "2")]
    pub value: bool,
    #[prost(bool, tag = "3")]
    pub undoable: bool,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct GetConfigStringRequest {
    #[prost(enumeration = "config_key::String", tag = "1")]
    pub key: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct SetConfigStringRequest {
    #[prost(enumeration = "config_key::String", tag = "1")]
    pub key: i32,
    #[prost(string, tag = "2")]
    pub value: ::prost::alloc::string::String,
    #[prost(bool, tag = "3")]
    pub undoable: bool,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct OptionalStringConfigKey {
    #[prost(enumeration = "config_key::String", tag = "1")]
    pub key: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct SetConfigJsonRequest {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "2")]
    pub value_json: ::prost::alloc::vec::Vec<u8>,
    #[prost(bool, tag = "3")]
    pub undoable: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct Preferences {
    #[prost(message, optional, tag = "1")]
    pub scheduling: ::core::option::Option<preferences::Scheduling>,
    #[prost(message, optional, tag = "2")]
    pub reviewing: ::core::option::Option<preferences::Reviewing>,
    #[prost(message, optional, tag = "3")]
    pub editing: ::core::option::Option<preferences::Editing>,
    #[prost(message, optional, tag = "4")]
    pub backups: ::core::option::Option<preferences::BackupLimits>,
}
/// Nested message and enum types in `Preferences`.
pub mod preferences {
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Scheduling {
        #[prost(uint32, tag = "2")]
        pub rollover: u32,
        #[prost(uint32, tag = "3")]
        pub learn_ahead_secs: u32,
        #[prost(enumeration = "scheduling::NewReviewMix", tag = "4")]
        pub new_review_mix: i32,
        /// v2 only
        #[prost(bool, tag = "5")]
        pub new_timezone: bool,
        #[prost(bool, tag = "6")]
        pub day_learn_first: bool,
    }
    /// Nested message and enum types in `Scheduling`.
    pub mod scheduling {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        #[must_use]
pub enum NewReviewMix {
            Distribute = 0,
            ReviewsFirst = 1,
            NewFirst = 2,
        }
        impl NewReviewMix {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Distribute => "DISTRIBUTE",
                    Self::ReviewsFirst => "REVIEWS_FIRST",
                    Self::NewFirst => "NEW_FIRST",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "DISTRIBUTE" => Some(Self::Distribute),
                    "REVIEWS_FIRST" => Some(Self::ReviewsFirst),
                    "NEW_FIRST" => Some(Self::NewFirst),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Reviewing {
        #[prost(bool, tag = "1")]
        pub hide_audio_play_buttons: bool,
        #[prost(bool, tag = "2")]
        pub interrupt_audio_when_answering: bool,
        #[prost(bool, tag = "3")]
        pub show_remaining_due_counts: bool,
        #[prost(bool, tag = "4")]
        pub show_intervals_on_buttons: bool,
        #[prost(uint32, tag = "5")]
        pub time_limit_secs: u32,
        #[prost(bool, tag = "6")]
        pub load_balancer_enabled: bool,
        #[prost(bool, tag = "7")]
        pub fsrs_short_term_with_steps_enabled: bool,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Editing {
        #[prost(bool, tag = "1")]
        pub adding_defaults_to_current_deck: bool,
        #[prost(bool, tag = "2")]
        pub paste_images_as_png: bool,
        #[prost(bool, tag = "3")]
        pub paste_strips_formatting: bool,
        #[prost(string, tag = "4")]
        pub default_search_text: ::prost::alloc::string::String,
        #[prost(bool, tag = "5")]
        pub ignore_accents_in_search: bool,
        #[prost(bool, tag = "6")]
        pub render_latex: bool,
    }
    #[derive(serde::Deserialize, serde::Serialize)]
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    #[must_use]
pub struct BackupLimits {
        #[prost(uint32, tag = "1")]
        pub daily: u32,
        #[prost(uint32, tag = "2")]
        pub weekly: u32,
        #[prost(uint32, tag = "3")]
        pub monthly: u32,
        #[prost(uint32, tag = "4")]
        pub minimum_interval_mins: u32,
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
#[must_use]
pub enum ExperimentalFeatureFlag {
    TestFlag = 0,
    SvelteEditor = 1,
    SvelteReviewer = 2,
}
impl ExperimentalFeatureFlag {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::TestFlag => "TEST_FLAG",
            Self::SvelteEditor => "SVELTE_EDITOR",
            Self::SvelteReviewer => "SVELTE_REVIEWER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TEST_FLAG" => Some(Self::TestFlag),
            "SVELTE_EDITOR" => Some(Self::SvelteEditor),
            "SVELTE_REVIEWER" => Some(Self::SvelteReviewer),
            _ => None,
        }
    }
}
