// This file is @generated by prost-build.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct DeckId {
    #[prost(int64, tag = "1")]
    pub did: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct DeckIds {
    #[prost(int64, repeated, tag = "1")]
    pub dids: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct Deck {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(int64, tag = "3")]
    pub mtime_secs: i64,
    #[prost(int32, tag = "4")]
    pub usn: i32,
    #[prost(message, optional, tag = "5")]
    pub common: ::core::option::Option<deck::Common>,
    /// the specifics are inlined here when sending data to clients,
    /// as otherwise an extra level of indirection would be required
    #[prost(oneof = "deck::Kind", tags = "6, 7")]
    pub kind: ::core::option::Option<deck::Kind>,
}
/// Nested message and enum types in `Deck`.
pub mod deck {
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Common {
        #[prost(bool, tag = "1")]
        pub study_collapsed: bool,
        #[prost(bool, tag = "2")]
        pub browser_collapsed: bool,
        #[prost(uint32, tag = "3")]
        pub last_day_studied: u32,
        #[prost(int32, tag = "4")]
        pub new_studied: i32,
        #[prost(int32, tag = "5")]
        pub review_studied: i32,
        #[prost(int32, tag = "7")]
        pub milliseconds_studied: i32,
        /// previously set in the v1 scheduler,
        /// but not currently used for anything
        #[prost(int32, tag = "6")]
        pub learning_studied: i32,
        #[prost(bytes = "vec", tag = "255")]
        pub other: ::prost::alloc::vec::Vec<u8>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Normal {
        #[prost(int64, tag = "1")]
        pub config_id: i64,
        #[prost(uint32, tag = "2")]
        pub extend_new: u32,
        #[prost(uint32, tag = "3")]
        pub extend_review: u32,
        #[prost(string, tag = "4")]
        pub description: ::prost::alloc::string::String,
        #[prost(bool, tag = "5")]
        pub markdown_description: bool,
        #[prost(uint32, optional, tag = "6")]
        pub review_limit: ::core::option::Option<u32>,
        #[prost(uint32, optional, tag = "7")]
        pub new_limit: ::core::option::Option<u32>,
        #[prost(message, optional, tag = "8")]
        pub review_limit_today: ::core::option::Option<normal::DayLimit>,
        #[prost(message, optional, tag = "9")]
        pub new_limit_today: ::core::option::Option<normal::DayLimit>,
        /// Deck-specific desired retention override
        #[prost(float, optional, tag = "10")]
        pub desired_retention: ::core::option::Option<f32>,
    }
    /// Nested message and enum types in `Normal`.
    pub mod normal {
        #[derive(Eq, serde::Deserialize, serde::Serialize)]
        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
        #[must_use]
pub struct DayLimit {
            #[prost(uint32, tag = "1")]
            pub limit: u32,
            #[prost(uint32, tag = "2")]
            pub today: u32,
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Filtered {
        #[prost(bool, tag = "1")]
        pub reschedule: bool,
        #[prost(message, repeated, tag = "2")]
        pub search_terms: ::prost::alloc::vec::Vec<filtered::SearchTerm>,
        /// v1 scheduler only
        #[prost(float, repeated, tag = "3")]
        pub delays: ::prost::alloc::vec::Vec<f32>,
        /// v2 and old v3 scheduler only
        #[prost(uint32, tag = "4")]
        pub preview_delay: u32,
        /// recent v3 scheduler only; 0 means card will be returned
        #[prost(uint32, tag = "7")]
        pub preview_again_secs: u32,
        /// recent v3 scheduler only; 0 means card will be returned
        #[prost(uint32, tag = "5")]
        pub preview_hard_secs: u32,
        /// recent v3 scheduler only; 0 means card will be returned
        #[prost(uint32, tag = "6")]
        pub preview_good_secs: u32,
    }
    /// Nested message and enum types in `Filtered`.
    pub mod filtered {
        #[derive(Clone, PartialEq, ::prost::Message)]
        #[must_use]
pub struct SearchTerm {
            #[prost(string, tag = "1")]
            pub search: ::prost::alloc::string::String,
            #[prost(uint32, tag = "2")]
            pub limit: u32,
            #[prost(enumeration = "search_term::Order", tag = "3")]
            pub order: i32,
        }
        /// Nested message and enum types in `SearchTerm`.
        pub mod search_term {
            #[derive(strum::EnumIter)]
            #[derive(
                Clone,
                Copy,
                Debug,
                PartialEq,
                Eq,
                Hash,
                PartialOrd,
                Ord,
                ::prost::Enumeration
            )]
            #[repr(i32)]
            #[must_use]
pub enum Order {
                OldestReviewedFirst = 0,
                Random = 1,
                IntervalsAscending = 2,
                IntervalsDescending = 3,
                Lapses = 4,
                Added = 5,
                Due = 6,
                ReverseAdded = 7,
                RetrievabilityAscending = 8,
                RetrievabilityDescending = 9,
                RelativeOverdueness = 10,
            }
            impl Order {
                /// 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::OldestReviewedFirst => "OLDEST_REVIEWED_FIRST",
                        Self::Random => "RANDOM",
                        Self::IntervalsAscending => "INTERVALS_ASCENDING",
                        Self::IntervalsDescending => "INTERVALS_DESCENDING",
                        Self::Lapses => "LAPSES",
                        Self::Added => "ADDED",
                        Self::Due => "DUE",
                        Self::ReverseAdded => "REVERSE_ADDED",
                        Self::RetrievabilityAscending => "RETRIEVABILITY_ASCENDING",
                        Self::RetrievabilityDescending => "RETRIEVABILITY_DESCENDING",
                        Self::RelativeOverdueness => "RELATIVE_OVERDUENESS",
                    }
                }
                /// Creates an enum from field names used in the ProtoBuf definition.
                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                    match value {
                        "OLDEST_REVIEWED_FIRST" => Some(Self::OldestReviewedFirst),
                        "RANDOM" => Some(Self::Random),
                        "INTERVALS_ASCENDING" => Some(Self::IntervalsAscending),
                        "INTERVALS_DESCENDING" => Some(Self::IntervalsDescending),
                        "LAPSES" => Some(Self::Lapses),
                        "ADDED" => Some(Self::Added),
                        "DUE" => Some(Self::Due),
                        "REVERSE_ADDED" => Some(Self::ReverseAdded),
                        "RETRIEVABILITY_ASCENDING" => Some(Self::RetrievabilityAscending),
                        "RETRIEVABILITY_DESCENDING" => {
                            Some(Self::RetrievabilityDescending)
                        }
                        "RELATIVE_OVERDUENESS" => Some(Self::RelativeOverdueness),
                        _ => None,
                    }
                }
            }
        }
    }
    /// a container to store the deck specifics in the DB
    /// as a tagged enum
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct KindContainer {
        #[prost(oneof = "kind_container::Kind", tags = "1, 2")]
        pub kind: ::core::option::Option<kind_container::Kind>,
    }
    /// Nested message and enum types in `KindContainer`.
    pub mod kind_container {
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        #[must_use]
pub enum Kind {
            #[prost(message, tag = "1")]
            Normal(super::Normal),
            #[prost(message, tag = "2")]
            Filtered(super::Filtered),
        }
    }
    /// the specifics are inlined here when sending data to clients,
    /// as otherwise an extra level of indirection would be required
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    #[must_use]
pub enum Kind {
        #[prost(message, tag = "6")]
        Normal(Normal),
        #[prost(message, tag = "7")]
        Filtered(Filtered),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct AddOrUpdateDeckLegacyRequest {
    #[prost(bytes = "vec", tag = "1")]
    pub deck: ::prost::alloc::vec::Vec<u8>,
    #[prost(bool, tag = "2")]
    pub preserve_usn_and_mtime: bool,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct DeckTreeRequest {
    /// if non-zero, counts for the provided timestamp will be included
    #[prost(int64, tag = "1")]
    pub now: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct DeckTreeNode {
    #[prost(int64, tag = "1")]
    pub deck_id: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(uint32, tag = "4")]
    pub level: u32,
    #[prost(bool, tag = "5")]
    pub collapsed: bool,
    /// counts after adding children+applying limits
    #[prost(uint32, tag = "6")]
    pub review_count: u32,
    #[prost(uint32, tag = "7")]
    pub learn_count: u32,
    #[prost(uint32, tag = "8")]
    pub new_count: u32,
    /// card counts without children or limits applied
    #[prost(uint32, tag = "9")]
    pub intraday_learning: u32,
    #[prost(uint32, tag = "10")]
    pub interday_learning_uncapped: u32,
    #[prost(uint32, tag = "11")]
    pub new_uncapped: u32,
    #[prost(uint32, tag = "12")]
    pub review_uncapped: u32,
    #[prost(uint32, tag = "13")]
    pub total_in_deck: u32,
    /// with children, without any limits
    #[prost(uint32, tag = "14")]
    pub total_including_children: u32,
    #[prost(bool, tag = "16")]
    pub filtered: bool,
    /// low index so key can be packed into a byte, but at bottom
    /// to make debug output easier to read
    #[prost(message, repeated, tag = "3")]
    pub children: ::prost::alloc::vec::Vec<DeckTreeNode>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct SetDeckCollapsedRequest {
    #[prost(int64, tag = "1")]
    pub deck_id: i64,
    #[prost(bool, tag = "2")]
    pub collapsed: bool,
    #[prost(enumeration = "set_deck_collapsed_request::Scope", tag = "3")]
    pub scope: i32,
}
/// Nested message and enum types in `SetDeckCollapsedRequest`.
pub mod set_deck_collapsed_request {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    #[must_use]
pub enum Scope {
        Reviewer = 0,
        Browser = 1,
    }
    impl Scope {
        /// 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::Reviewer => "REVIEWER",
                Self::Browser => "BROWSER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "REVIEWER" => Some(Self::Reviewer),
                "BROWSER" => Some(Self::Browser),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct GetDeckNamesRequest {
    #[prost(bool, tag = "1")]
    pub skip_empty_default: bool,
    /// if unset, implies skip_empty_default
    #[prost(bool, tag = "2")]
    pub include_filtered: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct DeckNames {
    #[prost(message, repeated, tag = "1")]
    pub entries: ::prost::alloc::vec::Vec<DeckNameId>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct DeckNameId {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct ReparentDecksRequest {
    #[prost(int64, repeated, tag = "1")]
    pub deck_ids: ::prost::alloc::vec::Vec<i64>,
    #[prost(int64, tag = "2")]
    pub new_parent: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct RenameDeckRequest {
    #[prost(int64, tag = "1")]
    pub deck_id: i64,
    #[prost(string, tag = "2")]
    pub new_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct FilteredDeckForUpdate {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub config: ::core::option::Option<deck::Filtered>,
    #[prost(bool, tag = "4")]
    pub allow_empty: bool,
}
