// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct BackendInit {
    #[prost(string, repeated, tag = "1")]
    pub preferred_langs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "2")]
    pub locale_folder_path: ::prost::alloc::string::String,
    #[prost(bool, tag = "3")]
    pub server: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct I18nBackendInit {
    #[prost(string, repeated, tag = "4")]
    pub preferred_langs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "5")]
    pub locale_folder_path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
#[must_use]
pub struct BackendError {
    /// error description, usually localized, suitable for displaying to the user
    #[prost(string, tag = "1")]
    pub message: ::prost::alloc::string::String,
    /// the error subtype
    #[prost(enumeration = "backend_error::Kind", tag = "2")]
    pub kind: i32,
    /// optional page in the manual
    #[prost(
        enumeration = "super::links::help_page_link_request::HelpPage",
        optional,
        tag = "3"
    )]
    pub help_page: ::core::option::Option<i32>,
    /// additional information about the context in which the error occurred
    #[prost(string, tag = "4")]
    pub context: ::prost::alloc::string::String,
    /// a backtrace of the underlying error; requires RUST_BACKTRACE to be set
    #[prost(string, tag = "5")]
    pub backtrace: ::prost::alloc::string::String,
}
/// Nested message and enum types in `BackendError`.
pub mod backend_error {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    #[must_use]
pub enum Kind {
        InvalidInput = 0,
        UndoEmpty = 1,
        Interrupted = 2,
        TemplateParse = 3,
        IoError = 4,
        DbError = 5,
        NetworkError = 6,
        SyncAuthError = 7,
        SyncServerMessage = 23,
        SyncOtherError = 8,
        JsonError = 9,
        ProtoError = 10,
        NotFoundError = 11,
        Exists = 12,
        FilteredDeckError = 13,
        SearchError = 14,
        CustomStudyError = 15,
        ImportError = 16,
        Deleted = 17,
        CardTypeError = 18,
        AnkidroidPanicError = 19,
        /// Originated from and usually specific to the OS.
        OsError = 20,
        SchedulerUpgradeRequired = 21,
        InvalidCertificateFormat = 22,
        InvalidChecksum = 24,
    }
    impl Kind {
        /// 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::InvalidInput => "INVALID_INPUT",
                Self::UndoEmpty => "UNDO_EMPTY",
                Self::Interrupted => "INTERRUPTED",
                Self::TemplateParse => "TEMPLATE_PARSE",
                Self::IoError => "IO_ERROR",
                Self::DbError => "DB_ERROR",
                Self::NetworkError => "NETWORK_ERROR",
                Self::SyncAuthError => "SYNC_AUTH_ERROR",
                Self::SyncServerMessage => "SYNC_SERVER_MESSAGE",
                Self::SyncOtherError => "SYNC_OTHER_ERROR",
                Self::JsonError => "JSON_ERROR",
                Self::ProtoError => "PROTO_ERROR",
                Self::NotFoundError => "NOT_FOUND_ERROR",
                Self::Exists => "EXISTS",
                Self::FilteredDeckError => "FILTERED_DECK_ERROR",
                Self::SearchError => "SEARCH_ERROR",
                Self::CustomStudyError => "CUSTOM_STUDY_ERROR",
                Self::ImportError => "IMPORT_ERROR",
                Self::Deleted => "DELETED",
                Self::CardTypeError => "CARD_TYPE_ERROR",
                Self::AnkidroidPanicError => "ANKIDROID_PANIC_ERROR",
                Self::OsError => "OS_ERROR",
                Self::SchedulerUpgradeRequired => "SCHEDULER_UPGRADE_REQUIRED",
                Self::InvalidCertificateFormat => "INVALID_CERTIFICATE_FORMAT",
                Self::InvalidChecksum => "INVALID_CHECKSUM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "INVALID_INPUT" => Some(Self::InvalidInput),
                "UNDO_EMPTY" => Some(Self::UndoEmpty),
                "INTERRUPTED" => Some(Self::Interrupted),
                "TEMPLATE_PARSE" => Some(Self::TemplateParse),
                "IO_ERROR" => Some(Self::IoError),
                "DB_ERROR" => Some(Self::DbError),
                "NETWORK_ERROR" => Some(Self::NetworkError),
                "SYNC_AUTH_ERROR" => Some(Self::SyncAuthError),
                "SYNC_SERVER_MESSAGE" => Some(Self::SyncServerMessage),
                "SYNC_OTHER_ERROR" => Some(Self::SyncOtherError),
                "JSON_ERROR" => Some(Self::JsonError),
                "PROTO_ERROR" => Some(Self::ProtoError),
                "NOT_FOUND_ERROR" => Some(Self::NotFoundError),
                "EXISTS" => Some(Self::Exists),
                "FILTERED_DECK_ERROR" => Some(Self::FilteredDeckError),
                "SEARCH_ERROR" => Some(Self::SearchError),
                "CUSTOM_STUDY_ERROR" => Some(Self::CustomStudyError),
                "IMPORT_ERROR" => Some(Self::ImportError),
                "DELETED" => Some(Self::Deleted),
                "CARD_TYPE_ERROR" => Some(Self::CardTypeError),
                "ANKIDROID_PANIC_ERROR" => Some(Self::AnkidroidPanicError),
                "OS_ERROR" => Some(Self::OsError),
                "SCHEDULER_UPGRADE_REQUIRED" => Some(Self::SchedulerUpgradeRequired),
                "INVALID_CERTIFICATE_FORMAT" => Some(Self::InvalidCertificateFormat),
                "INVALID_CHECKSUM" => Some(Self::InvalidChecksum),
                _ => None,
            }
        }
    }
}
