// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct ReviewLogs {
    #[prost(message, repeated, tag = "1")]
    pub entries: ::prost::alloc::vec::Vec<card_stats_response::StatsRevlogEntry>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct CardStatsResponse {
    #[prost(message, repeated, tag = "1")]
    pub revlog: ::prost::alloc::vec::Vec<card_stats_response::StatsRevlogEntry>,
    #[prost(int64, tag = "2")]
    pub card_id: i64,
    #[prost(int64, tag = "3")]
    pub note_id: i64,
    #[prost(string, tag = "4")]
    pub deck: ::prost::alloc::string::String,
    /// Unix timestamps
    #[prost(int64, tag = "5")]
    pub added: i64,
    #[prost(int64, optional, tag = "6")]
    pub first_review: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "7")]
    pub latest_review: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "8")]
    pub due_date: ::core::option::Option<i64>,
    #[prost(int32, optional, tag = "9")]
    pub due_position: ::core::option::Option<i32>,
    /// days
    #[prost(uint32, tag = "10")]
    pub interval: u32,
    /// per mill
    #[prost(uint32, tag = "11")]
    pub ease: u32,
    #[prost(uint32, tag = "12")]
    pub reviews: u32,
    #[prost(uint32, tag = "13")]
    pub lapses: u32,
    #[prost(float, tag = "14")]
    pub average_secs: f32,
    #[prost(float, tag = "15")]
    pub total_secs: f32,
    #[prost(string, tag = "16")]
    pub card_type: ::prost::alloc::string::String,
    #[prost(string, tag = "17")]
    pub notetype: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "18")]
    pub memory_state: ::core::option::Option<super::cards::FsrsMemoryState>,
    /// not set if due date/state not available
    #[prost(float, optional, tag = "19")]
    pub fsrs_retrievability: ::core::option::Option<f32>,
    #[prost(string, tag = "20")]
    pub custom_data: ::prost::alloc::string::String,
    #[prost(string, tag = "21")]
    pub preset: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "22")]
    pub original_deck: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(float, optional, tag = "23")]
    pub desired_retention: ::core::option::Option<f32>,
    #[prost(float, repeated, tag = "24")]
    pub fsrs_params: ::prost::alloc::vec::Vec<f32>,
}
/// Nested message and enum types in `CardStatsResponse`.
pub mod card_stats_response {
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    #[must_use]
pub struct StatsRevlogEntry {
        #[prost(int64, tag = "1")]
        pub time: i64,
        #[prost(enumeration = "super::revlog_entry::ReviewKind", tag = "2")]
        pub review_kind: i32,
        #[prost(uint32, tag = "3")]
        pub button_chosen: u32,
        /// seconds
        #[prost(uint32, tag = "4")]
        pub interval: u32,
        /// per mill
        #[prost(uint32, tag = "5")]
        pub ease: u32,
        #[prost(float, tag = "6")]
        pub taken_secs: f32,
        #[prost(message, optional, tag = "7")]
        pub memory_state: ::core::option::Option<super::super::cards::FsrsMemoryState>,
        /// seconds
        #[prost(uint32, tag = "8")]
        pub last_interval: u32,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct GraphsRequest {
    #[prost(string, tag = "1")]
    pub search: ::prost::alloc::string::String,
    #[prost(uint32, tag = "2")]
    pub days: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct GraphsResponse {
    #[prost(message, optional, tag = "1")]
    pub buttons: ::core::option::Option<graphs_response::Buttons>,
    #[prost(message, optional, tag = "2")]
    pub card_counts: ::core::option::Option<graphs_response::CardCounts>,
    #[prost(message, optional, tag = "3")]
    pub hours: ::core::option::Option<graphs_response::Hours>,
    #[prost(message, optional, tag = "4")]
    pub today: ::core::option::Option<graphs_response::Today>,
    #[prost(message, optional, tag = "5")]
    pub eases: ::core::option::Option<graphs_response::Eases>,
    #[prost(message, optional, tag = "11")]
    pub difficulty: ::core::option::Option<graphs_response::Eases>,
    #[prost(message, optional, tag = "6")]
    pub intervals: ::core::option::Option<graphs_response::Intervals>,
    #[prost(message, optional, tag = "7")]
    pub future_due: ::core::option::Option<graphs_response::FutureDue>,
    #[prost(message, optional, tag = "8")]
    pub added: ::core::option::Option<graphs_response::Added>,
    #[prost(message, optional, tag = "9")]
    pub reviews: ::core::option::Option<graphs_response::ReviewCountsAndTimes>,
    #[prost(uint32, tag = "10")]
    pub rollover_hour: u32,
    #[prost(message, optional, tag = "12")]
    pub retrievability: ::core::option::Option<graphs_response::Retrievability>,
    #[prost(bool, tag = "13")]
    pub fsrs: bool,
    #[prost(message, optional, tag = "14")]
    pub stability: ::core::option::Option<graphs_response::Intervals>,
    #[prost(message, optional, tag = "15")]
    pub true_retention: ::core::option::Option<graphs_response::TrueRetentionStats>,
}
/// Nested message and enum types in `GraphsResponse`.
pub mod graphs_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Added {
        #[prost(map = "int32, uint32", tag = "1")]
        pub added: ::std::collections::HashMap<i32, u32>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Intervals {
        #[prost(map = "uint32, uint32", tag = "1")]
        pub intervals: ::std::collections::HashMap<u32, u32>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Eases {
        #[prost(map = "uint32, uint32", tag = "1")]
        pub eases: ::std::collections::HashMap<u32, u32>,
        #[prost(float, tag = "2")]
        pub average: f32,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Retrievability {
        #[prost(map = "uint32, uint32", tag = "1")]
        pub retrievability: ::std::collections::HashMap<u32, u32>,
        #[prost(float, tag = "2")]
        pub average: f32,
        #[prost(float, tag = "3")]
        pub sum_by_card: f32,
        #[prost(float, tag = "4")]
        pub sum_by_note: f32,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct FutureDue {
        #[prost(map = "int32, uint32", tag = "1")]
        pub future_due: ::std::collections::HashMap<i32, u32>,
        #[prost(bool, tag = "2")]
        pub have_backlog: bool,
        #[prost(uint32, tag = "3")]
        pub daily_load: u32,
    }
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Today {
        #[prost(uint32, tag = "1")]
        pub answer_count: u32,
        #[prost(uint32, tag = "2")]
        pub answer_millis: u32,
        #[prost(uint32, tag = "3")]
        pub correct_count: u32,
        #[prost(uint32, tag = "4")]
        pub mature_correct: u32,
        #[prost(uint32, tag = "5")]
        pub mature_count: u32,
        #[prost(uint32, tag = "6")]
        pub learn_count: u32,
        #[prost(uint32, tag = "7")]
        pub review_count: u32,
        #[prost(uint32, tag = "8")]
        pub relearn_count: u32,
        #[prost(uint32, tag = "9")]
        pub early_review_count: u32,
    }
    /// each bucket is a 24 element vec
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Hours {
        #[prost(message, repeated, tag = "1")]
        pub one_month: ::prost::alloc::vec::Vec<hours::Hour>,
        #[prost(message, repeated, tag = "2")]
        pub three_months: ::prost::alloc::vec::Vec<hours::Hour>,
        #[prost(message, repeated, tag = "3")]
        pub one_year: ::prost::alloc::vec::Vec<hours::Hour>,
        #[prost(message, repeated, tag = "4")]
        pub all_time: ::prost::alloc::vec::Vec<hours::Hour>,
    }
    /// Nested message and enum types in `Hours`.
    pub mod hours {
        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
        #[must_use]
pub struct Hour {
            #[prost(uint32, tag = "1")]
            pub total: u32,
            #[prost(uint32, tag = "2")]
            pub correct: u32,
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct ReviewCountsAndTimes {
        #[prost(map = "int32, message", tag = "1")]
        pub count: ::std::collections::HashMap<i32, review_counts_and_times::Reviews>,
        #[prost(map = "int32, message", tag = "2")]
        pub time: ::std::collections::HashMap<i32, review_counts_and_times::Reviews>,
    }
    /// Nested message and enum types in `ReviewCountsAndTimes`.
    pub mod review_counts_and_times {
        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
        #[must_use]
pub struct Reviews {
            #[prost(uint32, tag = "1")]
            pub learn: u32,
            #[prost(uint32, tag = "2")]
            pub relearn: u32,
            #[prost(uint32, tag = "3")]
            pub young: u32,
            #[prost(uint32, tag = "4")]
            pub mature: u32,
            #[prost(uint32, tag = "5")]
            pub filtered: u32,
        }
    }
    /// 4 element vecs for buttons 1-4
    #[derive(Clone, PartialEq, ::prost::Message)]
    #[must_use]
pub struct Buttons {
        #[prost(message, optional, tag = "1")]
        pub one_month: ::core::option::Option<buttons::ButtonCounts>,
        #[prost(message, optional, tag = "2")]
        pub three_months: ::core::option::Option<buttons::ButtonCounts>,
        #[prost(message, optional, tag = "3")]
        pub one_year: ::core::option::Option<buttons::ButtonCounts>,
        #[prost(message, optional, tag = "4")]
        pub all_time: ::core::option::Option<buttons::ButtonCounts>,
    }
    /// Nested message and enum types in `Buttons`.
    pub mod buttons {
        #[derive(Clone, PartialEq, ::prost::Message)]
        #[must_use]
pub struct ButtonCounts {
            #[prost(uint32, repeated, tag = "1")]
            pub learning: ::prost::alloc::vec::Vec<u32>,
            #[prost(uint32, repeated, tag = "2")]
            pub young: ::prost::alloc::vec::Vec<u32>,
            #[prost(uint32, repeated, tag = "3")]
            pub mature: ::prost::alloc::vec::Vec<u32>,
        }
    }
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    #[must_use]
pub struct CardCounts {
        /// Buried/suspended cards are included in counts; suspended/buried counts
        /// are 0.
        #[prost(message, optional, tag = "1")]
        pub including_inactive: ::core::option::Option<card_counts::Counts>,
        /// Buried/suspended cards are counted separately.
        #[prost(message, optional, tag = "2")]
        pub excluding_inactive: ::core::option::Option<card_counts::Counts>,
    }
    /// Nested message and enum types in `CardCounts`.
    pub mod card_counts {
        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
        #[must_use]
pub struct Counts {
            #[prost(uint32, tag = "1")]
            pub new_cards: u32,
            #[prost(uint32, tag = "2")]
            pub learn: u32,
            #[prost(uint32, tag = "3")]
            pub relearn: u32,
            #[prost(uint32, tag = "4")]
            pub young: u32,
            #[prost(uint32, tag = "5")]
            pub mature: u32,
            #[prost(uint32, tag = "6")]
            pub suspended: u32,
            #[prost(uint32, tag = "7")]
            pub buried: u32,
        }
    }
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    #[must_use]
pub struct TrueRetentionStats {
        #[prost(message, optional, tag = "1")]
        pub today: ::core::option::Option<true_retention_stats::TrueRetention>,
        #[prost(message, optional, tag = "2")]
        pub yesterday: ::core::option::Option<true_retention_stats::TrueRetention>,
        #[prost(message, optional, tag = "3")]
        pub week: ::core::option::Option<true_retention_stats::TrueRetention>,
        #[prost(message, optional, tag = "4")]
        pub month: ::core::option::Option<true_retention_stats::TrueRetention>,
        #[prost(message, optional, tag = "5")]
        pub year: ::core::option::Option<true_retention_stats::TrueRetention>,
        #[prost(message, optional, tag = "6")]
        pub all_time: ::core::option::Option<true_retention_stats::TrueRetention>,
    }
    /// Nested message and enum types in `TrueRetentionStats`.
    pub mod true_retention_stats {
        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
        #[must_use]
pub struct TrueRetention {
            #[prost(uint32, tag = "1")]
            pub young_passed: u32,
            #[prost(uint32, tag = "2")]
            pub young_failed: u32,
            #[prost(uint32, tag = "3")]
            pub mature_passed: u32,
            #[prost(uint32, tag = "4")]
            pub mature_failed: u32,
        }
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct GraphPreferences {
    #[prost(enumeration = "graph_preferences::Weekday", tag = "1")]
    pub calendar_first_day_of_week: i32,
    #[prost(bool, tag = "2")]
    pub card_counts_separate_inactive: bool,
    #[prost(bool, tag = "3")]
    pub browser_links_supported: bool,
    #[prost(bool, tag = "4")]
    pub future_due_show_backlog: bool,
}
/// Nested message and enum types in `GraphPreferences`.
pub mod graph_preferences {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    #[must_use]
pub enum Weekday {
        Sunday = 0,
        Monday = 1,
        Friday = 5,
        Saturday = 6,
    }
    impl Weekday {
        /// 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::Sunday => "SUNDAY",
                Self::Monday => "MONDAY",
                Self::Friday => "FRIDAY",
                Self::Saturday => "SATURDAY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SUNDAY" => Some(Self::Sunday),
                "MONDAY" => Some(Self::Monday),
                "FRIDAY" => Some(Self::Friday),
                "SATURDAY" => Some(Self::Saturday),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct RevlogEntry {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(int64, tag = "2")]
    pub cid: i64,
    #[prost(int32, tag = "3")]
    pub usn: i32,
    #[prost(uint32, tag = "4")]
    pub button_chosen: u32,
    #[prost(int32, tag = "5")]
    pub interval: i32,
    #[prost(int32, tag = "6")]
    pub last_interval: i32,
    #[prost(uint32, tag = "7")]
    pub ease_factor: u32,
    #[prost(uint32, tag = "8")]
    pub taken_millis: u32,
    #[prost(enumeration = "revlog_entry::ReviewKind", tag = "9")]
    pub review_kind: i32,
}
/// Nested message and enum types in `RevlogEntry`.
pub mod revlog_entry {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    #[must_use]
pub enum ReviewKind {
        Learning = 0,
        Review = 1,
        Relearning = 2,
        Filtered = 3,
        Manual = 4,
        Rescheduled = 5,
    }
    impl ReviewKind {
        /// 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::Learning => "LEARNING",
                Self::Review => "REVIEW",
                Self::Relearning => "RELEARNING",
                Self::Filtered => "FILTERED",
                Self::Manual => "MANUAL",
                Self::Rescheduled => "RESCHEDULED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LEARNING" => Some(Self::Learning),
                "REVIEW" => Some(Self::Review),
                "RELEARNING" => Some(Self::Relearning),
                "FILTERED" => Some(Self::Filtered),
                "MANUAL" => Some(Self::Manual),
                "RESCHEDULED" => Some(Self::Rescheduled),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct CardEntry {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(int64, tag = "2")]
    pub note_id: i64,
    #[prost(int64, tag = "3")]
    pub deck_id: i64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[must_use]
pub struct DeckEntry {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(int64, tag = "2")]
    pub parent_id: i64,
    #[prost(int64, tag = "3")]
    pub preset_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct Dataset {
    #[prost(message, repeated, tag = "1")]
    pub revlogs: ::prost::alloc::vec::Vec<RevlogEntry>,
    #[prost(message, repeated, tag = "2")]
    pub cards: ::prost::alloc::vec::Vec<CardEntry>,
    #[prost(message, repeated, tag = "3")]
    pub decks: ::prost::alloc::vec::Vec<DeckEntry>,
    #[prost(int64, tag = "4")]
    pub next_day_at: i64,
}
