// This file is @generated by prost-build.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BackupInfo {
    #[prost(uint64, tag = "1")]
    pub version: u64,
    #[prost(uint64, tag = "2")]
    pub backup_time_ms: u64,
    /// 32-byte random value generated when the backup is uploaded for the first time.
    #[prost(bytes = "vec", tag = "3")]
    pub media_root_backup_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, tag = "4")]
    pub current_app_version: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub first_app_version: ::prost::alloc::string::String,
    /// Client-specific data field for debug info during testing
    #[prost(bytes = "vec", tag = "6")]
    pub debug_info: ::prost::alloc::vec::Vec<u8>,
}
/// Frames must follow in the following ordering rules:
///
/// 1. There is exactly one AccountData and it is the first frame.
/// 2. A frame referenced by ID must come before the referencing frame.
///     e.g. a Recipient must come before any Chat referencing it.
/// 3. All ChatItems must appear in global Chat rendering order.
///     (The order in which they were received by the client.)
/// 4. ChatFolders must appear in render order (e.g., left to right for
///     LTR locales), but can appear anywhere relative to other frames respecting
///     rule 2 (after Recipients and Chats).
///
/// Recipients, Chats, StickerPacks, AdHocCalls, and NotificationProfiles
/// can be in any order. (But must respect rule 2.)
///
/// For example, Chats may all be together at the beginning,
/// or may each immediately precede its first ChatItem.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Frame {
    /// If unset, importers should skip this frame without throwing an error.
    #[prost(oneof = "frame::Item", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
    pub item: ::core::option::Option<frame::Item>,
}
/// Nested message and enum types in `Frame`.
pub mod frame {
    /// If unset, importers should skip this frame without throwing an error.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Item {
        #[prost(message, tag = "1")]
        Account(super::AccountData),
        #[prost(message, tag = "2")]
        Recipient(super::Recipient),
        #[prost(message, tag = "3")]
        Chat(super::Chat),
        #[prost(message, tag = "4")]
        ChatItem(super::ChatItem),
        #[prost(message, tag = "5")]
        StickerPack(super::StickerPack),
        #[prost(message, tag = "6")]
        AdHocCall(super::AdHocCall),
        #[prost(message, tag = "7")]
        NotificationProfile(super::NotificationProfile),
        #[prost(message, tag = "8")]
        ChatFolder(super::ChatFolder),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountData {
    #[prost(bytes = "vec", tag = "1")]
    pub profile_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, optional, tag = "2")]
    pub username: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "3")]
    pub username_link: ::core::option::Option<account_data::UsernameLink>,
    #[prost(string, tag = "4")]
    pub given_name: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub family_name: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub avatar_url_path: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub donation_subscriber_data: ::core::option::Option<account_data::SubscriberData>,
    #[prost(message, optional, tag = "9")]
    pub account_settings: ::core::option::Option<account_data::AccountSettings>,
    #[prost(message, optional, tag = "10")]
    pub backups_subscriber_data: ::core::option::Option<account_data::IapSubscriberData>,
    #[prost(string, tag = "11")]
    pub svr_pin: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "12")]
    pub android_specific_settings: ::core::option::Option<
        account_data::AndroidSpecificSettings,
    >,
    #[prost(string, tag = "13")]
    pub bio_text: ::prost::alloc::string::String,
    #[prost(string, tag = "14")]
    pub bio_emoji: ::prost::alloc::string::String,
    /// Opaque blob containing key transparency data for the account
    #[prost(bytes = "vec", optional, tag = "15")]
    pub key_transparency_data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(message, optional, tag = "16")]
    pub ios_specific_settings: ::core::option::Option<account_data::IosSpecificSettings>,
}
/// Nested message and enum types in `AccountData`.
pub mod account_data {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct UsernameLink {
        /// 32 bytes of entropy used for encryption
        #[prost(bytes = "vec", tag = "1")]
        pub entropy: ::prost::alloc::vec::Vec<u8>,
        /// 16 bytes of encoded UUID provided by the server
        #[prost(bytes = "vec", tag = "2")]
        pub server_id: ::prost::alloc::vec::Vec<u8>,
        #[prost(enumeration = "username_link::Color", tag = "3")]
        pub color: i32,
    }
    /// Nested message and enum types in `UsernameLink`.
    pub mod username_link {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Color {
            /// Interpret as "Blue"
            Unknown = 0,
            Blue = 1,
            White = 2,
            Grey = 3,
            Olive = 4,
            Green = 5,
            Orange = 6,
            Pink = 7,
            Purple = 8,
        }
        impl Color {
            /// 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::Unknown => "UNKNOWN",
                    Self::Blue => "BLUE",
                    Self::White => "WHITE",
                    Self::Grey => "GREY",
                    Self::Olive => "OLIVE",
                    Self::Green => "GREEN",
                    Self::Orange => "ORANGE",
                    Self::Pink => "PINK",
                    Self::Purple => "PURPLE",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN" => Some(Self::Unknown),
                    "BLUE" => Some(Self::Blue),
                    "WHITE" => Some(Self::White),
                    "GREY" => Some(Self::Grey),
                    "OLIVE" => Some(Self::Olive),
                    "GREEN" => Some(Self::Green),
                    "ORANGE" => Some(Self::Orange),
                    "PINK" => Some(Self::Pink),
                    "PURPLE" => Some(Self::Purple),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AutoDownloadSettings {
        #[prost(enumeration = "auto_download_settings::AutoDownloadOption", tag = "1")]
        pub images: i32,
        #[prost(enumeration = "auto_download_settings::AutoDownloadOption", tag = "2")]
        pub audio: i32,
        #[prost(enumeration = "auto_download_settings::AutoDownloadOption", tag = "3")]
        pub video: i32,
        #[prost(enumeration = "auto_download_settings::AutoDownloadOption", tag = "4")]
        pub documents: i32,
    }
    /// Nested message and enum types in `AutoDownloadSettings`.
    pub mod auto_download_settings {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum AutoDownloadOption {
            /// Interpret as "Never"
            Unknown = 0,
            Never = 1,
            Wifi = 2,
            WifiAndCellular = 3,
        }
        impl AutoDownloadOption {
            /// 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::Unknown => "UNKNOWN",
                    Self::Never => "NEVER",
                    Self::Wifi => "WIFI",
                    Self::WifiAndCellular => "WIFI_AND_CELLULAR",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN" => Some(Self::Unknown),
                    "NEVER" => Some(Self::Never),
                    "WIFI" => Some(Self::Wifi),
                    "WIFI_AND_CELLULAR" => Some(Self::WifiAndCellular),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AccountSettings {
        #[prost(bool, tag = "1")]
        pub read_receipts: bool,
        #[prost(bool, tag = "2")]
        pub sealed_sender_indicators: bool,
        #[prost(bool, tag = "3")]
        pub typing_indicators: bool,
        #[prost(bool, tag = "4")]
        pub link_previews: bool,
        #[prost(bool, tag = "5")]
        pub not_discoverable_by_phone_number: bool,
        #[prost(bool, tag = "6")]
        pub prefer_contact_avatars: bool,
        /// 0 means no universal expire timer.
        #[prost(uint32, tag = "7")]
        pub universal_expire_timer_seconds: u32,
        #[prost(string, repeated, tag = "8")]
        pub preferred_reaction_emoji: ::prost::alloc::vec::Vec<
            ::prost::alloc::string::String,
        >,
        #[prost(bool, tag = "9")]
        pub display_badges_on_profile: bool,
        #[prost(bool, tag = "10")]
        pub keep_muted_chats_archived: bool,
        #[prost(bool, tag = "11")]
        pub has_set_my_stories_privacy: bool,
        #[prost(bool, tag = "12")]
        pub has_viewed_onboarding_story: bool,
        #[prost(bool, tag = "13")]
        pub stories_disabled: bool,
        #[prost(bool, optional, tag = "14")]
        pub story_view_receipts_enabled: ::core::option::Option<bool>,
        #[prost(bool, tag = "15")]
        pub has_seen_group_story_education_sheet: bool,
        #[prost(bool, tag = "16")]
        pub has_completed_username_onboarding: bool,
        #[prost(enumeration = "PhoneNumberSharingMode", tag = "17")]
        pub phone_number_sharing_mode: i32,
        #[prost(message, optional, tag = "18")]
        pub default_chat_style: ::core::option::Option<super::ChatStyle>,
        #[prost(message, repeated, tag = "19")]
        pub custom_chat_colors: ::prost::alloc::vec::Vec<
            super::chat_style::CustomChatColor,
        >,
        #[prost(bool, tag = "20")]
        pub optimize_on_device_storage: bool,
        /// See zkgroup for integer particular values. Unset if backups are not enabled.
        #[prost(uint64, optional, tag = "21")]
        pub backup_tier: ::core::option::Option<u64>,
        #[prost(enumeration = "SentMediaQuality", tag = "23")]
        pub default_sent_media_quality: i32,
        #[prost(message, optional, tag = "24")]
        pub auto_download_settings: ::core::option::Option<AutoDownloadSettings>,
        /// If unset, consider screen lock to be disabled.
        #[prost(uint32, optional, tag = "26")]
        pub screen_lock_timeout_minutes: ::core::option::Option<u32>,
        /// If unset, consider pin reminders to be enabled.
        #[prost(bool, optional, tag = "27")]
        pub pin_reminders: ::core::option::Option<bool>,
        /// If unset, treat the same as "Unknown" case
        #[prost(enumeration = "AppTheme", tag = "28")]
        pub app_theme: i32,
        /// If unset, treat the same as "Unknown" case
        #[prost(enumeration = "CallsUseLessDataSetting", tag = "29")]
        pub calls_use_less_data_setting: i32,
        #[prost(bool, tag = "30")]
        pub allow_sealed_sender_from_anyone: bool,
        #[prost(bool, tag = "31")]
        pub allow_automatic_key_verification: bool,
        #[prost(bool, tag = "32")]
        pub has_seen_admin_delete_education_dialog: bool,
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct SubscriberData {
        #[prost(bytes = "vec", tag = "1")]
        pub subscriber_id: ::prost::alloc::vec::Vec<u8>,
        #[prost(string, tag = "2")]
        pub currency_code: ::prost::alloc::string::String,
        #[prost(bool, tag = "3")]
        pub manually_cancelled: bool,
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct IapSubscriberData {
        #[prost(bytes = "vec", tag = "1")]
        pub subscriber_id: ::prost::alloc::vec::Vec<u8>,
        /// If unset, importers should ignore the subscriber data without throwing an error.
        #[prost(oneof = "iap_subscriber_data::IapSubscriptionId", tags = "2, 3")]
        pub iap_subscription_id: ::core::option::Option<
            iap_subscriber_data::IapSubscriptionId,
        >,
    }
    /// Nested message and enum types in `IAPSubscriberData`.
    pub mod iap_subscriber_data {
        /// If unset, importers should ignore the subscriber data without throwing an error.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum IapSubscriptionId {
            /// Identifies an Android Play Store IAP subscription.
            #[prost(string, tag = "2")]
            PurchaseToken(::prost::alloc::string::String),
            /// Identifies an iOS App Store IAP subscription.
            #[prost(uint64, tag = "3")]
            OriginalTransactionId(u64),
        }
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AndroidSpecificSettings {
        #[prost(bool, tag = "1")]
        pub use_system_emoji: bool,
        #[prost(bool, tag = "2")]
        pub screenshot_security: bool,
        /// If unset, treat the same as "Unknown" case
        #[prost(enumeration = "android_specific_settings::NavigationBarSize", tag = "3")]
        pub navigation_bar_size: i32,
    }
    /// Nested message and enum types in `AndroidSpecificSettings`.
    pub mod android_specific_settings {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum NavigationBarSize {
            /// Intepret as "Normal"
            UnknownBarSize = 0,
            Normal = 1,
            Compact = 2,
        }
        impl NavigationBarSize {
            /// 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::UnknownBarSize => "UNKNOWN_BAR_SIZE",
                    Self::Normal => "NORMAL",
                    Self::Compact => "COMPACT",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN_BAR_SIZE" => Some(Self::UnknownBarSize),
                    "NORMAL" => Some(Self::Normal),
                    "COMPACT" => Some(Self::Compact),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct IosSpecificSettings {
        #[prost(bool, tag = "1")]
        pub is_system_call_log_enabled: bool,
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum PhoneNumberSharingMode {
        /// Interpret as "Nobody"
        Unknown = 0,
        Everybody = 1,
        Nobody = 2,
    }
    impl PhoneNumberSharingMode {
        /// 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::Unknown => "UNKNOWN",
                Self::Everybody => "EVERYBODY",
                Self::Nobody => "NOBODY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "EVERYBODY" => Some(Self::Everybody),
                "NOBODY" => Some(Self::Nobody),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SentMediaQuality {
        /// Interpret as "Standard"
        UnknownQuality = 0,
        Standard = 1,
        High = 2,
    }
    impl SentMediaQuality {
        /// 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::UnknownQuality => "UNKNOWN_QUALITY",
                Self::Standard => "STANDARD",
                Self::High => "HIGH",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_QUALITY" => Some(Self::UnknownQuality),
                "STANDARD" => Some(Self::Standard),
                "HIGH" => Some(Self::High),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum AppTheme {
        /// Interpret as "System"
        UnknownAppTheme = 0,
        System = 1,
        Light = 2,
        Dark = 3,
    }
    impl AppTheme {
        /// 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::UnknownAppTheme => "UNKNOWN_APP_THEME",
                Self::System => "SYSTEM",
                Self::Light => "LIGHT",
                Self::Dark => "DARK",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_APP_THEME" => Some(Self::UnknownAppTheme),
                "SYSTEM" => Some(Self::System),
                "LIGHT" => Some(Self::Light),
                "DARK" => Some(Self::Dark),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum CallsUseLessDataSetting {
        /// Interpret as "Never"
        UnknownCallDataSetting = 0,
        Never = 1,
        MobileDataOnly = 2,
        WifiAndMobileData = 3,
    }
    impl CallsUseLessDataSetting {
        /// 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::UnknownCallDataSetting => "UNKNOWN_CALL_DATA_SETTING",
                Self::Never => "NEVER",
                Self::MobileDataOnly => "MOBILE_DATA_ONLY",
                Self::WifiAndMobileData => "WIFI_AND_MOBILE_DATA",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_CALL_DATA_SETTING" => Some(Self::UnknownCallDataSetting),
                "NEVER" => Some(Self::Never),
                "MOBILE_DATA_ONLY" => Some(Self::MobileDataOnly),
                "WIFI_AND_MOBILE_DATA" => Some(Self::WifiAndMobileData),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Recipient {
    /// generated id for reference only within this file
    #[prost(uint64, tag = "1")]
    pub id: u64,
    /// If unset, importers should skip this frame without throwing an error.
    #[prost(oneof = "recipient::Destination", tags = "2, 3, 4, 5, 6, 7")]
    pub destination: ::core::option::Option<recipient::Destination>,
}
/// Nested message and enum types in `Recipient`.
pub mod recipient {
    /// If unset, importers should skip this frame without throwing an error.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Destination {
        #[prost(message, tag = "2")]
        Contact(super::Contact),
        #[prost(message, tag = "3")]
        Group(super::Group),
        #[prost(message, tag = "4")]
        DistributionList(super::DistributionListItem),
        #[prost(message, tag = "5")]
        Self_(super::Self_),
        #[prost(message, tag = "6")]
        ReleaseNotes(super::ReleaseNotes),
        #[prost(message, tag = "7")]
        CallLink(super::CallLink),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Contact {
    /// should be 16 bytes
    #[prost(bytes = "vec", optional, tag = "1")]
    pub aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    /// should be 16 bytes
    #[prost(bytes = "vec", optional, tag = "2")]
    pub pni: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(string, optional, tag = "3")]
    pub username: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint64, optional, tag = "4")]
    pub e164: ::core::option::Option<u64>,
    #[prost(bool, tag = "5")]
    pub blocked: bool,
    #[prost(enumeration = "contact::Visibility", tag = "6")]
    pub visibility: i32,
    #[prost(bytes = "vec", optional, tag = "9")]
    pub profile_key: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bool, tag = "10")]
    pub profile_sharing: bool,
    #[prost(string, optional, tag = "11")]
    pub profile_given_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "12")]
    pub profile_family_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, tag = "13")]
    pub hide_story: bool,
    #[prost(bytes = "vec", optional, tag = "14")]
    pub identity_key: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(enumeration = "contact::IdentityState", tag = "15")]
    pub identity_state: i32,
    /// absent iff both `given` and `family` are empty
    #[prost(message, optional, tag = "16")]
    pub nickname: ::core::option::Option<contact::Name>,
    #[prost(string, tag = "17")]
    pub note: ::prost::alloc::string::String,
    #[prost(string, tag = "18")]
    pub system_given_name: ::prost::alloc::string::String,
    #[prost(string, tag = "19")]
    pub system_family_name: ::prost::alloc::string::String,
    #[prost(string, tag = "20")]
    pub system_nickname: ::prost::alloc::string::String,
    #[prost(enumeration = "AvatarColor", optional, tag = "21")]
    pub avatar_color: ::core::option::Option<i32>,
    /// Opaque blob containing key transparency data for the contact
    #[prost(bytes = "vec", optional, tag = "22")]
    pub key_transparency_data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    /// If unset, consider the user to be registered
    #[prost(oneof = "contact::Registration", tags = "7, 8")]
    pub registration: ::core::option::Option<contact::Registration>,
}
/// Nested message and enum types in `Contact`.
pub mod contact {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Registered {}
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct NotRegistered {
        #[prost(uint64, tag = "1")]
        pub unregistered_timestamp: u64,
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Name {
        #[prost(string, tag = "1")]
        pub given: ::prost::alloc::string::String,
        #[prost(string, tag = "2")]
        pub family: ::prost::alloc::string::String,
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum IdentityState {
        /// A valid value -- indicates unset by the user
        Default = 0,
        Verified = 1,
        /// Was once verified and is now unverified
        Unverified = 2,
    }
    impl IdentityState {
        /// 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::Default => "DEFAULT",
                Self::Verified => "VERIFIED",
                Self::Unverified => "UNVERIFIED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DEFAULT" => Some(Self::Default),
                "VERIFIED" => Some(Self::Verified),
                "UNVERIFIED" => Some(Self::Unverified),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Visibility {
        /// A valid value -- the contact is not hidden
        Visible = 0,
        Hidden = 1,
        HiddenMessageRequest = 2,
    }
    impl Visibility {
        /// 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::Visible => "VISIBLE",
                Self::Hidden => "HIDDEN",
                Self::HiddenMessageRequest => "HIDDEN_MESSAGE_REQUEST",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "VISIBLE" => Some(Self::Visible),
                "HIDDEN" => Some(Self::Hidden),
                "HIDDEN_MESSAGE_REQUEST" => Some(Self::HiddenMessageRequest),
                _ => None,
            }
        }
    }
    /// If unset, consider the user to be registered
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Registration {
        #[prost(message, tag = "7")]
        Registered(Registered),
        #[prost(message, tag = "8")]
        NotRegistered(NotRegistered),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Group {
    #[prost(bytes = "vec", tag = "1")]
    pub master_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(bool, tag = "2")]
    pub whitelisted: bool,
    #[prost(bool, tag = "3")]
    pub hide_story: bool,
    #[prost(enumeration = "group::StorySendMode", tag = "4")]
    pub story_send_mode: i32,
    #[prost(message, optional, tag = "5")]
    pub snapshot: ::core::option::Option<group::GroupSnapshot>,
    #[prost(bool, tag = "6")]
    pub blocked: bool,
    #[prost(enumeration = "AvatarColor", optional, tag = "7")]
    pub avatar_color: ::core::option::Option<i32>,
}
/// Nested message and enum types in `Group`.
pub mod group {
    /// These are simply plaintext copies of the groups proto from Groups.proto.
    /// They should be kept completely in-sync with Groups.proto.
    /// These exist to allow us to have the latest snapshot of a group during restoration without having to hit the network.
    /// We would use Groups.proto if we could, but we want a plaintext version to improve export readability.
    /// For documentation, defer to Groups.proto. The only name change is Group -> GroupSnapshot to avoid the naming conflict.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct GroupSnapshot {
        #[prost(message, optional, tag = "2")]
        pub title: ::core::option::Option<GroupAttributeBlob>,
        #[prost(message, optional, tag = "11")]
        pub description: ::core::option::Option<GroupAttributeBlob>,
        #[prost(string, tag = "3")]
        pub avatar_url: ::prost::alloc::string::String,
        #[prost(message, optional, tag = "4")]
        pub disappearing_messages_timer: ::core::option::Option<GroupAttributeBlob>,
        #[prost(message, optional, tag = "5")]
        pub access_control: ::core::option::Option<AccessControl>,
        #[prost(uint32, tag = "6")]
        pub version: u32,
        #[prost(message, repeated, tag = "7")]
        pub members: ::prost::alloc::vec::Vec<Member>,
        #[prost(message, repeated, tag = "8")]
        pub members_pending_profile_key: ::prost::alloc::vec::Vec<
            MemberPendingProfileKey,
        >,
        #[prost(message, repeated, tag = "9")]
        pub members_pending_admin_approval: ::prost::alloc::vec::Vec<
            MemberPendingAdminApproval,
        >,
        #[prost(bytes = "vec", tag = "10")]
        pub invite_link_password: ::prost::alloc::vec::Vec<u8>,
        #[prost(bool, tag = "12")]
        pub announcements_only: bool,
        #[prost(message, repeated, tag = "13")]
        pub members_banned: ::prost::alloc::vec::Vec<MemberBanned>,
        #[prost(bool, tag = "14")]
        pub terminated: bool,
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct GroupAttributeBlob {
        /// If unset, consider the field it represents to not be present
        #[prost(oneof = "group_attribute_blob::Content", tags = "1, 2, 3, 4")]
        pub content: ::core::option::Option<group_attribute_blob::Content>,
    }
    /// Nested message and enum types in `GroupAttributeBlob`.
    pub mod group_attribute_blob {
        /// If unset, consider the field it represents to not be present
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum Content {
            #[prost(string, tag = "1")]
            Title(::prost::alloc::string::String),
            #[prost(bytes, tag = "2")]
            Avatar(::prost::alloc::vec::Vec<u8>),
            #[prost(uint32, tag = "3")]
            DisappearingMessagesDuration(u32),
            #[prost(string, tag = "4")]
            DescriptionText(::prost::alloc::string::String),
        }
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Member {
        #[prost(bytes = "vec", tag = "1")]
        pub user_id: ::prost::alloc::vec::Vec<u8>,
        #[prost(enumeration = "member::Role", tag = "2")]
        pub role: i32,
        #[prost(uint32, tag = "5")]
        pub joined_at_version: u32,
        #[prost(string, tag = "6")]
        pub label_emoji: ::prost::alloc::string::String,
        #[prost(string, tag = "7")]
        pub label_string: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `Member`.
    pub mod member {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Role {
            /// Intepret as "Default"
            Unknown = 0,
            Default = 1,
            Administrator = 2,
        }
        impl Role {
            /// 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::Unknown => "UNKNOWN",
                    Self::Default => "DEFAULT",
                    Self::Administrator => "ADMINISTRATOR",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN" => Some(Self::Unknown),
                    "DEFAULT" => Some(Self::Default),
                    "ADMINISTRATOR" => Some(Self::Administrator),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct MemberPendingProfileKey {
        #[prost(message, optional, tag = "1")]
        pub member: ::core::option::Option<Member>,
        #[prost(bytes = "vec", tag = "2")]
        pub added_by_user_id: ::prost::alloc::vec::Vec<u8>,
        #[prost(uint64, tag = "3")]
        pub timestamp: u64,
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct MemberPendingAdminApproval {
        #[prost(bytes = "vec", tag = "1")]
        pub user_id: ::prost::alloc::vec::Vec<u8>,
        #[prost(uint64, tag = "4")]
        pub timestamp: u64,
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct MemberBanned {
        #[prost(bytes = "vec", tag = "1")]
        pub user_id: ::prost::alloc::vec::Vec<u8>,
        #[prost(uint64, tag = "2")]
        pub timestamp: u64,
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AccessControl {
        #[prost(enumeration = "access_control::AccessRequired", tag = "1")]
        pub attributes: i32,
        #[prost(enumeration = "access_control::AccessRequired", tag = "2")]
        pub members: i32,
        #[prost(enumeration = "access_control::AccessRequired", tag = "3")]
        pub add_from_invite_link: i32,
        #[prost(enumeration = "access_control::AccessRequired", tag = "4")]
        pub member_label: i32,
    }
    /// Nested message and enum types in `AccessControl`.
    pub mod access_control {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum AccessRequired {
            /// Intepret as "Unsatisfiable"
            Unknown = 0,
            Any = 1,
            Member = 2,
            Administrator = 3,
            Unsatisfiable = 4,
        }
        impl AccessRequired {
            /// 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::Unknown => "UNKNOWN",
                    Self::Any => "ANY",
                    Self::Member => "MEMBER",
                    Self::Administrator => "ADMINISTRATOR",
                    Self::Unsatisfiable => "UNSATISFIABLE",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN" => Some(Self::Unknown),
                    "ANY" => Some(Self::Any),
                    "MEMBER" => Some(Self::Member),
                    "ADMINISTRATOR" => Some(Self::Administrator),
                    "UNSATISFIABLE" => Some(Self::Unsatisfiable),
                    _ => None,
                }
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum StorySendMode {
        /// A valid value -- indicates unset by the user
        Default = 0,
        Disabled = 1,
        Enabled = 2,
    }
    impl StorySendMode {
        /// 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::Default => "DEFAULT",
                Self::Disabled => "DISABLED",
                Self::Enabled => "ENABLED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DEFAULT" => Some(Self::Default),
                "DISABLED" => Some(Self::Disabled),
                "ENABLED" => Some(Self::Enabled),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Self_ {
    #[prost(enumeration = "AvatarColor", optional, tag = "1")]
    pub avatar_color: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseNotes {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Chat {
    /// generated id for reference only within this file
    #[prost(uint64, tag = "1")]
    pub id: u64,
    #[prost(uint64, tag = "2")]
    pub recipient_id: u64,
    #[prost(bool, tag = "3")]
    pub archived: bool,
    /// will be displayed in ascending order
    #[prost(uint32, optional, tag = "4")]
    pub pinned_order: ::core::option::Option<u32>,
    #[prost(uint64, optional, tag = "5")]
    pub expiration_timer_ms: ::core::option::Option<u64>,
    /// INT64_MAX (2^63 - 1) = "always muted".
    #[prost(uint64, optional, tag = "6")]
    pub mute_until_ms: ::core::option::Option<u64>,
    #[prost(bool, tag = "7")]
    pub marked_unread: bool,
    #[prost(bool, tag = "8")]
    pub dont_notify_for_mentions_if_muted: bool,
    #[prost(message, optional, tag = "9")]
    pub style: ::core::option::Option<ChatStyle>,
    #[prost(uint32, tag = "10")]
    pub expire_timer_version: u32,
}
/// *
/// Call Links have some associated data including a call, but unlike other recipients
/// are not tied to threads because they do not have messages associated with them.
///
/// note:
/// - room id can be derived from the root key
/// - the presence of an admin key means this user is a call admin
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CallLink {
    #[prost(bytes = "vec", tag = "1")]
    pub root_key: ::prost::alloc::vec::Vec<u8>,
    /// Only present if the user is an admin
    #[prost(bytes = "vec", optional, tag = "2")]
    pub admin_key: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    #[prost(enumeration = "call_link::Restrictions", tag = "4")]
    pub restrictions: i32,
    #[prost(uint64, tag = "5")]
    pub expiration_ms: u64,
}
/// Nested message and enum types in `CallLink`.
pub mod call_link {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Restrictions {
        /// Interpret as "Admin Approval"
        Unknown = 0,
        None = 1,
        AdminApproval = 2,
    }
    impl Restrictions {
        /// 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::Unknown => "UNKNOWN",
                Self::None => "NONE",
                Self::AdminApproval => "ADMIN_APPROVAL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "NONE" => Some(Self::None),
                "ADMIN_APPROVAL" => Some(Self::AdminApproval),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AdHocCall {
    #[prost(uint64, tag = "1")]
    pub call_id: u64,
    /// Refers to a `CallLink` recipient.
    #[prost(uint64, tag = "2")]
    pub recipient_id: u64,
    #[prost(enumeration = "ad_hoc_call::State", tag = "3")]
    pub state: i32,
    #[prost(uint64, tag = "4")]
    pub call_timestamp: u64,
}
/// Nested message and enum types in `AdHocCall`.
pub mod ad_hoc_call {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Interpret as "Generic"
        UnknownState = 0,
        Generic = 1,
    }
    impl State {
        /// 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::UnknownState => "UNKNOWN_STATE",
                Self::Generic => "GENERIC",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_STATE" => Some(Self::UnknownState),
                "GENERIC" => Some(Self::Generic),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DistributionListItem {
    /// distribution ids are UUIDv4s. "My Story" is represented
    /// by an all-0 UUID (00000000-0000-0000-0000-000000000000).
    ///
    /// distribution list ids are uuids
    #[prost(bytes = "vec", tag = "1")]
    pub distribution_id: ::prost::alloc::vec::Vec<u8>,
    /// If unset, importers should skip the item entirely without showing an error.
    #[prost(oneof = "distribution_list_item::Item", tags = "2, 3")]
    pub item: ::core::option::Option<distribution_list_item::Item>,
}
/// Nested message and enum types in `DistributionListItem`.
pub mod distribution_list_item {
    /// If unset, importers should skip the item entirely without showing an error.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Item {
        #[prost(uint64, tag = "2")]
        DeletionTimestamp(u64),
        #[prost(message, tag = "3")]
        DistributionList(super::DistributionList),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DistributionList {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub allow_replies: bool,
    #[prost(enumeration = "distribution_list::PrivacyMode", tag = "3")]
    pub privacy_mode: i32,
    /// generated recipient id
    #[prost(uint64, repeated, tag = "4")]
    pub member_recipient_ids: ::prost::alloc::vec::Vec<u64>,
}
/// Nested message and enum types in `DistributionList`.
pub mod distribution_list {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum PrivacyMode {
        /// Interpret as "Only with"
        Unknown = 0,
        OnlyWith = 1,
        AllExcept = 2,
        All = 3,
    }
    impl PrivacyMode {
        /// 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::Unknown => "UNKNOWN",
                Self::OnlyWith => "ONLY_WITH",
                Self::AllExcept => "ALL_EXCEPT",
                Self::All => "ALL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "ONLY_WITH" => Some(Self::OnlyWith),
                "ALL_EXCEPT" => Some(Self::AllExcept),
                "ALL" => Some(Self::All),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChatItem {
    /// conversation id
    #[prost(uint64, tag = "1")]
    pub chat_id: u64,
    /// recipient id
    #[prost(uint64, tag = "2")]
    pub author_id: u64,
    #[prost(uint64, tag = "3")]
    pub date_sent: u64,
    /// timestamp of when expiration timer started ticking down
    #[prost(uint64, optional, tag = "4")]
    pub expire_start_date: ::core::option::Option<u64>,
    /// how long timer of message is (ms)
    #[prost(uint64, optional, tag = "5")]
    pub expires_in_ms: ::core::option::Option<u64>,
    /// ordered from oldest to newest
    #[prost(message, repeated, tag = "6")]
    pub revisions: ::prost::alloc::vec::Vec<ChatItem>,
    #[prost(bool, tag = "7")]
    pub sms: bool,
    /// only set if message is pinned
    #[prost(message, optional, tag = "21")]
    pub pin_details: ::core::option::Option<chat_item::PinDetails>,
    /// If unset, importers should skip this item without throwing an error.
    #[prost(oneof = "chat_item::DirectionalDetails", tags = "8, 9, 10")]
    pub directional_details: ::core::option::Option<chat_item::DirectionalDetails>,
    /// If unset, importers should skip this item without throwing an error.
    #[prost(
        oneof = "chat_item::Item",
        tags = "11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22"
    )]
    pub item: ::core::option::Option<chat_item::Item>,
}
/// Nested message and enum types in `ChatItem`.
pub mod chat_item {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct IncomingMessageDetails {
        #[prost(uint64, tag = "1")]
        pub date_received: u64,
        #[prost(uint64, optional, tag = "2")]
        pub date_server_sent: ::core::option::Option<u64>,
        #[prost(bool, tag = "3")]
        pub read: bool,
        #[prost(bool, tag = "4")]
        pub sealed_sender: bool,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct OutgoingMessageDetails {
        #[prost(message, repeated, tag = "1")]
        pub send_status: ::prost::alloc::vec::Vec<super::SendStatus>,
        /// may be different from dateSent for sync messages
        #[prost(uint64, tag = "2")]
        pub date_received: u64,
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct DirectionlessMessageDetails {}
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct PinDetails {
        #[prost(uint64, tag = "1")]
        pub pinned_at_timestamp: u64,
        #[prost(oneof = "pin_details::PinExpiry", tags = "2, 3")]
        pub pin_expiry: ::core::option::Option<pin_details::PinExpiry>,
    }
    /// Nested message and enum types in `PinDetails`.
    pub mod pin_details {
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum PinExpiry {
            /// timestamp when the pin should expire
            #[prost(uint64, tag = "2")]
            PinExpiresAtTimestamp(u64),
            #[prost(bool, tag = "3")]
            PinNeverExpires(bool),
        }
    }
    /// If unset, importers should skip this item without throwing an error.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum DirectionalDetails {
        #[prost(message, tag = "8")]
        Incoming(IncomingMessageDetails),
        #[prost(message, tag = "9")]
        Outgoing(OutgoingMessageDetails),
        #[prost(message, tag = "10")]
        Directionless(DirectionlessMessageDetails),
    }
    /// If unset, importers should skip this item without throwing an error.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Item {
        #[prost(message, tag = "11")]
        StandardMessage(super::StandardMessage),
        #[prost(message, tag = "12")]
        ContactMessage(super::ContactMessage),
        #[prost(message, tag = "13")]
        StickerMessage(super::StickerMessage),
        #[prost(message, tag = "14")]
        RemoteDeletedMessage(super::RemoteDeletedMessage),
        #[prost(message, tag = "15")]
        UpdateMessage(super::ChatUpdateMessage),
        #[prost(message, tag = "16")]
        PaymentNotification(super::PaymentNotification),
        #[prost(message, tag = "17")]
        GiftBadge(super::GiftBadge),
        #[prost(message, tag = "18")]
        ViewOnceMessage(super::ViewOnceMessage),
        /// group story reply messages are not backed up
        #[prost(message, tag = "19")]
        DirectStoryReplyMessage(super::DirectStoryReplyMessage),
        #[prost(message, tag = "20")]
        Poll(super::Poll),
        #[prost(message, tag = "22")]
        AdminDeletedMessage(super::AdminDeletedMessage),
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SendStatus {
    #[prost(uint64, tag = "1")]
    pub recipient_id: u64,
    /// the time the status was last updated -- if from a receipt, it should be the sentTime of the receipt
    #[prost(uint64, tag = "2")]
    pub timestamp: u64,
    /// If unset, importers should consider the status to be "pending"
    #[prost(oneof = "send_status::DeliveryStatus", tags = "3, 4, 5, 6, 7, 8, 9")]
    pub delivery_status: ::core::option::Option<send_status::DeliveryStatus>,
}
/// Nested message and enum types in `SendStatus`.
pub mod send_status {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Pending {}
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Sent {
        #[prost(bool, tag = "1")]
        pub sealed_sender: bool,
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Delivered {
        #[prost(bool, tag = "1")]
        pub sealed_sender: bool,
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Read {
        #[prost(bool, tag = "1")]
        pub sealed_sender: bool,
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Viewed {
        #[prost(bool, tag = "1")]
        pub sealed_sender: bool,
    }
    /// e.g. user in group was blocked, so we skipped sending to them
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Skipped {}
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Failed {
        #[prost(enumeration = "failed::FailureReason", tag = "1")]
        pub reason: i32,
    }
    /// Nested message and enum types in `Failed`.
    pub mod failed {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum FailureReason {
            /// A valid value -- could indicate a crash or lack of information
            Unknown = 0,
            Network = 1,
            IdentityKeyMismatch = 2,
        }
        impl FailureReason {
            /// 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::Unknown => "UNKNOWN",
                    Self::Network => "NETWORK",
                    Self::IdentityKeyMismatch => "IDENTITY_KEY_MISMATCH",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN" => Some(Self::Unknown),
                    "NETWORK" => Some(Self::Network),
                    "IDENTITY_KEY_MISMATCH" => Some(Self::IdentityKeyMismatch),
                    _ => None,
                }
            }
        }
    }
    /// If unset, importers should consider the status to be "pending"
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum DeliveryStatus {
        #[prost(message, tag = "3")]
        Pending(Pending),
        #[prost(message, tag = "4")]
        Sent(Sent),
        #[prost(message, tag = "5")]
        Delivered(Delivered),
        #[prost(message, tag = "6")]
        Read(Read),
        #[prost(message, tag = "7")]
        Viewed(Viewed),
        #[prost(message, tag = "8")]
        Skipped(Skipped),
        #[prost(message, tag = "9")]
        Failed(Failed),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Text {
    #[prost(string, tag = "1")]
    pub body: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub body_ranges: ::prost::alloc::vec::Vec<BodyRange>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StandardMessage {
    #[prost(message, optional, tag = "1")]
    pub quote: ::core::option::Option<Quote>,
    #[prost(message, optional, tag = "2")]
    pub text: ::core::option::Option<Text>,
    #[prost(message, repeated, tag = "3")]
    pub attachments: ::prost::alloc::vec::Vec<MessageAttachment>,
    #[prost(message, repeated, tag = "4")]
    pub link_preview: ::prost::alloc::vec::Vec<LinkPreview>,
    #[prost(message, optional, tag = "5")]
    pub long_text: ::core::option::Option<FilePointer>,
    #[prost(message, repeated, tag = "6")]
    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContactMessage {
    #[prost(message, optional, tag = "1")]
    pub contact: ::core::option::Option<ContactAttachment>,
    #[prost(message, repeated, tag = "2")]
    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DirectStoryReplyMessage {
    #[prost(message, repeated, tag = "3")]
    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
    /// If unset, importers should ignore the message without throwing an error.
    #[prost(oneof = "direct_story_reply_message::Reply", tags = "1, 2")]
    pub reply: ::core::option::Option<direct_story_reply_message::Reply>,
}
/// Nested message and enum types in `DirectStoryReplyMessage`.
pub mod direct_story_reply_message {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TextReply {
        #[prost(message, optional, tag = "1")]
        pub text: ::core::option::Option<super::Text>,
        #[prost(message, optional, tag = "2")]
        pub long_text: ::core::option::Option<super::FilePointer>,
    }
    /// If unset, importers should ignore the message without throwing an error.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Reply {
        #[prost(message, tag = "1")]
        TextReply(::prost::alloc::boxed::Box<TextReply>),
        #[prost(string, tag = "2")]
        Emoji(::prost::alloc::string::String),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaymentNotification {
    /// stored as a decimal string, e.g. 1.00001
    #[prost(string, optional, tag = "1")]
    pub amount_mob: ::core::option::Option<::prost::alloc::string::String>,
    /// stored as a decimal string, e.g. 1.00001
    #[prost(string, optional, tag = "2")]
    pub fee_mob: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub note: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "4")]
    pub transaction_details: ::core::option::Option<
        payment_notification::TransactionDetails,
    >,
}
/// Nested message and enum types in `PaymentNotification`.
pub mod payment_notification {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct TransactionDetails {
        /// If unset, importers should treat the transaction as successful with no metadata.
        #[prost(oneof = "transaction_details::Payment", tags = "1, 2")]
        pub payment: ::core::option::Option<transaction_details::Payment>,
    }
    /// Nested message and enum types in `TransactionDetails`.
    pub mod transaction_details {
        /// Used to map to payments on the ledger
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct MobileCoinTxoIdentification {
            /// for received transactions
            #[prost(bytes = "vec", repeated, tag = "1")]
            pub public_key: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
            /// for sent transactions
            #[prost(bytes = "vec", repeated, tag = "2")]
            pub key_images: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
        }
        /// Failed payments can't be synced from the ledger
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct FailedTransaction {
            #[prost(enumeration = "failed_transaction::FailureReason", tag = "1")]
            pub reason: i32,
        }
        /// Nested message and enum types in `FailedTransaction`.
        pub mod failed_transaction {
            #[derive(
                Clone,
                Copy,
                Debug,
                PartialEq,
                Eq,
                Hash,
                PartialOrd,
                Ord,
                ::prost::Enumeration
            )]
            #[repr(i32)]
            pub enum FailureReason {
                /// A valid value -- reason unknown
                Generic = 0,
                Network = 1,
                InsufficientFunds = 2,
            }
            impl FailureReason {
                /// 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::Generic => "GENERIC",
                        Self::Network => "NETWORK",
                        Self::InsufficientFunds => "INSUFFICIENT_FUNDS",
                    }
                }
                /// Creates an enum from field names used in the ProtoBuf definition.
                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                    match value {
                        "GENERIC" => Some(Self::Generic),
                        "NETWORK" => Some(Self::Network),
                        "INSUFFICIENT_FUNDS" => Some(Self::InsufficientFunds),
                        _ => None,
                    }
                }
            }
        }
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct Transaction {
            #[prost(enumeration = "transaction::Status", tag = "1")]
            pub status: i32,
            /// This identification is used to map the payment table to the ledger
            /// and is likely required otherwise we may have issues reconciling with
            /// the ledger
            #[prost(message, optional, tag = "2")]
            pub mobile_coin_identification: ::core::option::Option<
                MobileCoinTxoIdentification,
            >,
            #[prost(uint64, optional, tag = "3")]
            pub timestamp: ::core::option::Option<u64>,
            #[prost(uint64, optional, tag = "4")]
            pub block_index: ::core::option::Option<u64>,
            #[prost(uint64, optional, tag = "5")]
            pub block_timestamp: ::core::option::Option<u64>,
            /// mobile coin blobs
            #[prost(bytes = "vec", optional, tag = "6")]
            pub transaction: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
            /// mobile coin blobs
            #[prost(bytes = "vec", optional, tag = "7")]
            pub receipt: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
        }
        /// Nested message and enum types in `Transaction`.
        pub mod transaction {
            #[derive(
                Clone,
                Copy,
                Debug,
                PartialEq,
                Eq,
                Hash,
                PartialOrd,
                Ord,
                ::prost::Enumeration
            )]
            #[repr(i32)]
            pub enum Status {
                /// A valid value -- state unconfirmed
                Initial = 0,
                Submitted = 1,
                Successful = 2,
            }
            impl Status {
                /// 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::Initial => "INITIAL",
                        Self::Submitted => "SUBMITTED",
                        Self::Successful => "SUCCESSFUL",
                    }
                }
                /// Creates an enum from field names used in the ProtoBuf definition.
                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                    match value {
                        "INITIAL" => Some(Self::Initial),
                        "SUBMITTED" => Some(Self::Submitted),
                        "SUCCESSFUL" => Some(Self::Successful),
                        _ => None,
                    }
                }
            }
        }
        /// If unset, importers should treat the transaction as successful with no metadata.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum Payment {
            #[prost(message, tag = "1")]
            Transaction(Transaction),
            #[prost(message, tag = "2")]
            FailedTransaction(FailedTransaction),
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GiftBadge {
    #[prost(bytes = "vec", tag = "1")]
    pub receipt_credential_presentation: ::prost::alloc::vec::Vec<u8>,
    #[prost(enumeration = "gift_badge::State", tag = "2")]
    pub state: i32,
}
/// Nested message and enum types in `GiftBadge`.
pub mod gift_badge {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// A valid state
        Unopened = 0,
        Opened = 1,
        Redeemed = 2,
        Failed = 3,
    }
    impl State {
        /// 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::Unopened => "UNOPENED",
                Self::Opened => "OPENED",
                Self::Redeemed => "REDEEMED",
                Self::Failed => "FAILED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNOPENED" => Some(Self::Unopened),
                "OPENED" => Some(Self::Opened),
                "REDEEMED" => Some(Self::Redeemed),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ViewOnceMessage {
    /// Will be null for viewed messages
    #[prost(message, optional, tag = "1")]
    pub attachment: ::core::option::Option<MessageAttachment>,
    #[prost(message, repeated, tag = "2")]
    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContactAttachment {
    #[prost(message, optional, tag = "1")]
    pub name: ::core::option::Option<contact_attachment::Name>,
    #[prost(message, repeated, tag = "3")]
    pub number: ::prost::alloc::vec::Vec<contact_attachment::Phone>,
    #[prost(message, repeated, tag = "4")]
    pub email: ::prost::alloc::vec::Vec<contact_attachment::Email>,
    #[prost(message, repeated, tag = "5")]
    pub address: ::prost::alloc::vec::Vec<contact_attachment::PostalAddress>,
    #[prost(message, optional, tag = "6")]
    pub avatar: ::core::option::Option<FilePointer>,
    #[prost(string, tag = "7")]
    pub organization: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ContactAttachment`.
pub mod contact_attachment {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Name {
        #[prost(string, tag = "1")]
        pub given_name: ::prost::alloc::string::String,
        #[prost(string, tag = "2")]
        pub family_name: ::prost::alloc::string::String,
        #[prost(string, tag = "3")]
        pub prefix: ::prost::alloc::string::String,
        #[prost(string, tag = "4")]
        pub suffix: ::prost::alloc::string::String,
        #[prost(string, tag = "5")]
        pub middle_name: ::prost::alloc::string::String,
        #[prost(string, tag = "6")]
        pub nickname: ::prost::alloc::string::String,
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Phone {
        #[prost(string, tag = "1")]
        pub value: ::prost::alloc::string::String,
        #[prost(enumeration = "phone::Type", tag = "2")]
        pub r#type: i32,
        #[prost(string, tag = "3")]
        pub label: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `Phone`.
    pub mod phone {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Type {
            /// Interpret as "Home"
            Unknown = 0,
            Home = 1,
            Mobile = 2,
            Work = 3,
            Custom = 4,
        }
        impl Type {
            /// 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::Unknown => "UNKNOWN",
                    Self::Home => "HOME",
                    Self::Mobile => "MOBILE",
                    Self::Work => "WORK",
                    Self::Custom => "CUSTOM",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN" => Some(Self::Unknown),
                    "HOME" => Some(Self::Home),
                    "MOBILE" => Some(Self::Mobile),
                    "WORK" => Some(Self::Work),
                    "CUSTOM" => Some(Self::Custom),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Email {
        #[prost(string, tag = "1")]
        pub value: ::prost::alloc::string::String,
        #[prost(enumeration = "email::Type", tag = "2")]
        pub r#type: i32,
        #[prost(string, tag = "3")]
        pub label: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `Email`.
    pub mod email {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Type {
            /// Intepret as "Home"
            Unknown = 0,
            Home = 1,
            Mobile = 2,
            Work = 3,
            Custom = 4,
        }
        impl Type {
            /// 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::Unknown => "UNKNOWN",
                    Self::Home => "HOME",
                    Self::Mobile => "MOBILE",
                    Self::Work => "WORK",
                    Self::Custom => "CUSTOM",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN" => Some(Self::Unknown),
                    "HOME" => Some(Self::Home),
                    "MOBILE" => Some(Self::Mobile),
                    "WORK" => Some(Self::Work),
                    "CUSTOM" => Some(Self::Custom),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct PostalAddress {
        #[prost(enumeration = "postal_address::Type", tag = "1")]
        pub r#type: i32,
        #[prost(string, tag = "2")]
        pub label: ::prost::alloc::string::String,
        #[prost(string, tag = "3")]
        pub street: ::prost::alloc::string::String,
        #[prost(string, tag = "4")]
        pub pobox: ::prost::alloc::string::String,
        #[prost(string, tag = "5")]
        pub neighborhood: ::prost::alloc::string::String,
        #[prost(string, tag = "6")]
        pub city: ::prost::alloc::string::String,
        #[prost(string, tag = "7")]
        pub region: ::prost::alloc::string::String,
        #[prost(string, tag = "8")]
        pub postcode: ::prost::alloc::string::String,
        #[prost(string, tag = "9")]
        pub country: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `PostalAddress`.
    pub mod postal_address {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Type {
            /// Interpret as "Home"
            Unknown = 0,
            Home = 1,
            Work = 2,
            Custom = 3,
        }
        impl Type {
            /// 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::Unknown => "UNKNOWN",
                    Self::Home => "HOME",
                    Self::Work => "WORK",
                    Self::Custom => "CUSTOM",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "UNKNOWN" => Some(Self::Unknown),
                    "HOME" => Some(Self::Home),
                    "WORK" => Some(Self::Work),
                    "CUSTOM" => Some(Self::Custom),
                    _ => None,
                }
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StickerMessage {
    #[prost(message, optional, tag = "1")]
    pub sticker: ::core::option::Option<Sticker>,
    #[prost(message, repeated, tag = "2")]
    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
}
/// Tombstone for remote delete
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoteDeletedMessage {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Sticker {
    #[prost(bytes = "vec", tag = "1")]
    pub pack_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "2")]
    pub pack_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint32, tag = "3")]
    pub sticker_id: u32,
    #[prost(string, optional, tag = "4")]
    pub emoji: ::core::option::Option<::prost::alloc::string::String>,
    /// Stickers are uploaded to be sent as attachments; we also
    /// back them up as normal attachments when they are in messages.
    /// DO NOT treat this as the definitive source of a sticker in
    /// an installed StickerPack that shares the same packId.
    #[prost(message, optional, tag = "5")]
    pub data: ::core::option::Option<FilePointer>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkPreview {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub title: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "3")]
    pub image: ::core::option::Option<FilePointer>,
    #[prost(string, optional, tag = "4")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint64, optional, tag = "5")]
    pub date: ::core::option::Option<u64>,
}
/// A FilePointer on a message that has additional
/// metadata that applies only to message attachments.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MessageAttachment {
    #[prost(message, optional, tag = "1")]
    pub pointer: ::core::option::Option<FilePointer>,
    #[prost(enumeration = "message_attachment::Flag", tag = "2")]
    pub flag: i32,
    #[prost(bool, tag = "3")]
    pub was_downloaded: bool,
    /// Cross-client identifier for this attachment among all attachments on the
    /// owning message. See: SignalService.AttachmentPointer.clientUuid.
    #[prost(bytes = "vec", optional, tag = "4")]
    pub client_uuid: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
/// Nested message and enum types in `MessageAttachment`.
pub mod message_attachment {
    /// Similar to SignalService.AttachmentPointer.Flags,
    /// but explicitly mutually exclusive. Note the different raw values
    /// (non-zero starting values are not supported in proto3.)
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Flag {
        /// A valid value -- no flag applied
        None = 0,
        VoiceMessage = 1,
        Borderless = 2,
        Gif = 3,
    }
    impl Flag {
        /// 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::None => "NONE",
                Self::VoiceMessage => "VOICE_MESSAGE",
                Self::Borderless => "BORDERLESS",
                Self::Gif => "GIF",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "NONE" => Some(Self::None),
                "VOICE_MESSAGE" => Some(Self::VoiceMessage),
                "BORDERLESS" => Some(Self::Borderless),
                "GIF" => Some(Self::Gif),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FilePointer {
    #[prost(string, optional, tag = "4")]
    pub content_type: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bytes = "vec", optional, tag = "5")]
    pub incremental_mac: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(uint32, optional, tag = "6")]
    pub incremental_mac_chunk_size: ::core::option::Option<u32>,
    #[prost(string, optional, tag = "7")]
    pub file_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint32, optional, tag = "8")]
    pub width: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "9")]
    pub height: ::core::option::Option<u32>,
    #[prost(string, optional, tag = "10")]
    pub caption: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "11")]
    pub blur_hash: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "13")]
    pub locator_info: ::core::option::Option<file_pointer::LocatorInfo>,
}
/// Nested message and enum types in `FilePointer`.
pub mod file_pointer {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct LocatorInfo {
        /// Must be non-empty if transitCdnKey or plaintextHash are set/nonempty.
        /// Otherwise must be empty.
        #[prost(bytes = "vec", tag = "1")]
        pub key: ::prost::alloc::vec::Vec<u8>,
        /// NB: This is the plaintext size, and empty content attachments are legal, so this
        /// may be zero even if transitCdnKey or mediaName are set/nonempty.
        #[prost(uint32, tag = "3")]
        pub size: u32,
        /// Either both transit cdn key and number are set or neither should be set.
        /// Upload timestamp is optional but should only be set if key/number are set.
        #[prost(string, optional, tag = "4")]
        pub transit_cdn_key: ::core::option::Option<::prost::alloc::string::String>,
        #[prost(uint32, optional, tag = "5")]
        pub transit_cdn_number: ::core::option::Option<u32>,
        #[prost(uint64, optional, tag = "6")]
        pub transit_tier_upload_timestamp: ::core::option::Option<u64>,
        /// If present, the cdn number of the succesful upload to media tier.
        /// If unset, may still have been uploaded, and clients
        /// can discover the cdn number via the list endpoint.
        /// Exporting clients should set this as long as their subscription
        /// has not rotated since last upload; even if currently free tier.
        #[prost(uint32, optional, tag = "7")]
        pub media_tier_cdn_number: ::core::option::Option<u32>,
        /// Separate key used to encrypt this file for the local backup.
        /// Generally required for local backups.
        /// Missing field indicates attachment was not available locally
        /// when the backup was generated, but remote backup or transit
        /// info was available.
        #[prost(bytes = "vec", optional, tag = "9")]
        pub local_key: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
        #[prost(oneof = "locator_info::IntegrityCheck", tags = "10, 11")]
        pub integrity_check: ::core::option::Option<locator_info::IntegrityCheck>,
    }
    /// Nested message and enum types in `LocatorInfo`.
    pub mod locator_info {
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum IntegrityCheck {
            /// Set if file was at one point downloaded and its plaintextHash was calculated
            #[prost(bytes, tag = "10")]
            PlaintextHash(::prost::alloc::vec::Vec<u8>),
            /// Set if file has not been downloaded so its integrity has not been verified
            /// From the sender of the attachment
            #[prost(bytes, tag = "11")]
            EncryptedDigest(::prost::alloc::vec::Vec<u8>),
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Quote {
    /// null if the target message could not be found at time of quote insert
    #[prost(uint64, optional, tag = "1")]
    pub target_sent_timestamp: ::core::option::Option<u64>,
    #[prost(uint64, tag = "2")]
    pub author_id: u64,
    #[prost(message, optional, tag = "3")]
    pub text: ::core::option::Option<Text>,
    #[prost(message, repeated, tag = "4")]
    pub attachments: ::prost::alloc::vec::Vec<quote::QuotedAttachment>,
    #[prost(enumeration = "quote::Type", tag = "5")]
    pub r#type: i32,
}
/// Nested message and enum types in `Quote`.
pub mod quote {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct QuotedAttachment {
        #[prost(string, optional, tag = "1")]
        pub content_type: ::core::option::Option<::prost::alloc::string::String>,
        #[prost(string, optional, tag = "2")]
        pub file_name: ::core::option::Option<::prost::alloc::string::String>,
        #[prost(message, optional, tag = "3")]
        pub thumbnail: ::core::option::Option<super::MessageAttachment>,
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Interpret as "Normal"
        Unknown = 0,
        Normal = 1,
        GiftBadge = 2,
        ViewOnce = 3,
        Poll = 4,
    }
    impl Type {
        /// 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::Unknown => "UNKNOWN",
                Self::Normal => "NORMAL",
                Self::GiftBadge => "GIFT_BADGE",
                Self::ViewOnce => "VIEW_ONCE",
                Self::Poll => "POLL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "NORMAL" => Some(Self::Normal),
                "GIFT_BADGE" => Some(Self::GiftBadge),
                "VIEW_ONCE" => Some(Self::ViewOnce),
                "POLL" => Some(Self::Poll),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BodyRange {
    /// 'start' and 'length' are measured in UTF-16 code units.
    /// They may refer to offsets in a longText attachment.
    #[prost(uint32, tag = "1")]
    pub start: u32,
    #[prost(uint32, tag = "2")]
    pub length: u32,
    /// If unset, importers should ignore the body range without throwing an error.
    #[prost(oneof = "body_range::AssociatedValue", tags = "3, 4")]
    pub associated_value: ::core::option::Option<body_range::AssociatedValue>,
}
/// Nested message and enum types in `BodyRange`.
pub mod body_range {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Style {
        /// Importers should ignore the body range without throwing an error.
        None = 0,
        Bold = 1,
        Italic = 2,
        Spoiler = 3,
        Strikethrough = 4,
        Monospace = 5,
    }
    impl Style {
        /// 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::None => "NONE",
                Self::Bold => "BOLD",
                Self::Italic => "ITALIC",
                Self::Spoiler => "SPOILER",
                Self::Strikethrough => "STRIKETHROUGH",
                Self::Monospace => "MONOSPACE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "NONE" => Some(Self::None),
                "BOLD" => Some(Self::Bold),
                "ITALIC" => Some(Self::Italic),
                "SPOILER" => Some(Self::Spoiler),
                "STRIKETHROUGH" => Some(Self::Strikethrough),
                "MONOSPACE" => Some(Self::Monospace),
                _ => None,
            }
        }
    }
    /// If unset, importers should ignore the body range without throwing an error.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum AssociatedValue {
        #[prost(bytes, tag = "3")]
        MentionAci(::prost::alloc::vec::Vec<u8>),
        #[prost(enumeration = "Style", tag = "4")]
        Style(i32),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Reaction {
    #[prost(string, tag = "1")]
    pub emoji: ::prost::alloc::string::String,
    #[prost(uint64, tag = "2")]
    pub author_id: u64,
    #[prost(uint64, tag = "3")]
    pub sent_timestamp: u64,
    /// A higher sort order means that a reaction is more recent. Some clients may export this as
    /// incrementing numbers (e.g. 1, 2, 3), others as timestamps.
    #[prost(uint64, tag = "4")]
    pub sort_order: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Poll {
    /// Between 1-100 characters
    #[prost(string, tag = "1")]
    pub question: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub allow_multiple: bool,
    /// At least two
    #[prost(message, repeated, tag = "3")]
    pub options: ::prost::alloc::vec::Vec<poll::PollOption>,
    #[prost(bool, tag = "4")]
    pub has_ended: bool,
    #[prost(message, repeated, tag = "5")]
    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
}
/// Nested message and enum types in `Poll`.
pub mod poll {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct PollOption {
        /// Between 1-100 characters
        #[prost(string, tag = "1")]
        pub option: ::prost::alloc::string::String,
        #[prost(message, repeated, tag = "2")]
        pub votes: ::prost::alloc::vec::Vec<poll_option::PollVote>,
    }
    /// Nested message and enum types in `PollOption`.
    pub mod poll_option {
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct PollVote {
            /// A direct reference to Recipient proto id. Must be self or contact.
            #[prost(uint64, tag = "1")]
            pub voter_id: u64,
            /// Tracks how many times you voted.
            #[prost(uint32, tag = "2")]
            pub vote_count: u32,
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AdminDeletedMessage {
    /// id of the admin that deleted the message
    #[prost(uint64, tag = "1")]
    pub admin_id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChatUpdateMessage {
    /// If unset, importers should ignore the update message without throwing an error.
    #[prost(
        oneof = "chat_update_message::Update",
        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11"
    )]
    pub update: ::core::option::Option<chat_update_message::Update>,
}
/// Nested message and enum types in `ChatUpdateMessage`.
pub mod chat_update_message {
    /// If unset, importers should ignore the update message without throwing an error.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Update {
        #[prost(message, tag = "1")]
        SimpleUpdate(super::SimpleChatUpdate),
        #[prost(message, tag = "2")]
        GroupChange(super::GroupChangeChatUpdate),
        #[prost(message, tag = "3")]
        ExpirationTimerChange(super::ExpirationTimerChatUpdate),
        #[prost(message, tag = "4")]
        ProfileChange(super::ProfileChangeChatUpdate),
        #[prost(message, tag = "5")]
        ThreadMerge(super::ThreadMergeChatUpdate),
        #[prost(message, tag = "6")]
        SessionSwitchover(super::SessionSwitchoverChatUpdate),
        #[prost(message, tag = "7")]
        IndividualCall(super::IndividualCall),
        #[prost(message, tag = "8")]
        GroupCall(super::GroupCall),
        #[prost(message, tag = "9")]
        LearnedProfileChange(super::LearnedProfileChatUpdate),
        #[prost(message, tag = "10")]
        PollTerminate(super::PollTerminateUpdate),
        #[prost(message, tag = "11")]
        PinMessage(super::PinMessageUpdate),
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IndividualCall {
    #[prost(uint64, optional, tag = "1")]
    pub call_id: ::core::option::Option<u64>,
    #[prost(enumeration = "individual_call::Type", tag = "2")]
    pub r#type: i32,
    #[prost(enumeration = "individual_call::Direction", tag = "3")]
    pub direction: i32,
    #[prost(enumeration = "individual_call::State", tag = "4")]
    pub state: i32,
    #[prost(uint64, tag = "5")]
    pub started_call_timestamp: u64,
    #[prost(bool, tag = "6")]
    pub read: bool,
}
/// Nested message and enum types in `IndividualCall`.
pub mod individual_call {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Interpret as "Audio call"
        UnknownType = 0,
        AudioCall = 1,
        VideoCall = 2,
    }
    impl Type {
        /// 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::UnknownType => "UNKNOWN_TYPE",
                Self::AudioCall => "AUDIO_CALL",
                Self::VideoCall => "VIDEO_CALL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_TYPE" => Some(Self::UnknownType),
                "AUDIO_CALL" => Some(Self::AudioCall),
                "VIDEO_CALL" => Some(Self::VideoCall),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Direction {
        /// Interpret as "Incoming"
        UnknownDirection = 0,
        Incoming = 1,
        Outgoing = 2,
    }
    impl Direction {
        /// 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::UnknownDirection => "UNKNOWN_DIRECTION",
                Self::Incoming => "INCOMING",
                Self::Outgoing => "OUTGOING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_DIRECTION" => Some(Self::UnknownDirection),
                "INCOMING" => Some(Self::Incoming),
                "OUTGOING" => Some(Self::Outgoing),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Interpret as "Accepted"
        UnknownState = 0,
        Accepted = 1,
        NotAccepted = 2,
        /// An incoming call that is no longer ongoing, which we neither accepted
        /// not actively declined. For example, it expired, was canceled by the
        /// sender, or was rejected due to being in another call.
        Missed = 3,
        /// We auto-declined an incoming call due to a notification profile.
        MissedNotificationProfile = 4,
    }
    impl State {
        /// 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::UnknownState => "UNKNOWN_STATE",
                Self::Accepted => "ACCEPTED",
                Self::NotAccepted => "NOT_ACCEPTED",
                Self::Missed => "MISSED",
                Self::MissedNotificationProfile => "MISSED_NOTIFICATION_PROFILE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_STATE" => Some(Self::UnknownState),
                "ACCEPTED" => Some(Self::Accepted),
                "NOT_ACCEPTED" => Some(Self::NotAccepted),
                "MISSED" => Some(Self::Missed),
                "MISSED_NOTIFICATION_PROFILE" => Some(Self::MissedNotificationProfile),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupCall {
    #[prost(uint64, optional, tag = "1")]
    pub call_id: ::core::option::Option<u64>,
    #[prost(enumeration = "group_call::State", tag = "2")]
    pub state: i32,
    #[prost(uint64, optional, tag = "3")]
    pub ringer_recipient_id: ::core::option::Option<u64>,
    #[prost(uint64, optional, tag = "4")]
    pub started_call_recipient_id: ::core::option::Option<u64>,
    #[prost(uint64, tag = "5")]
    pub started_call_timestamp: u64,
    /// The time the call ended.
    #[prost(uint64, optional, tag = "6")]
    pub ended_call_timestamp: ::core::option::Option<u64>,
    #[prost(bool, tag = "7")]
    pub read: bool,
}
/// Nested message and enum types in `GroupCall`.
pub mod group_call {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Interpret as "Generic"
        UnknownState = 0,
        /// A group call was started without ringing.
        Generic = 1,
        /// We joined a group call that was started without ringing.
        Joined = 2,
        /// An incoming group call is actively ringing.
        Ringing = 3,
        /// We accepted an incoming group ring.
        Accepted = 4,
        /// We declined an incoming group ring.
        Declined = 5,
        /// We missed an incoming group ring, for example because it expired.
        Missed = 6,
        /// We auto-declined an incoming group ring due to a notification profile.
        MissedNotificationProfile = 7,
        /// An outgoing ring was started. We don't track any state for outgoing rings
        /// beyond that they started.
        OutgoingRing = 8,
    }
    impl State {
        /// 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::UnknownState => "UNKNOWN_STATE",
                Self::Generic => "GENERIC",
                Self::Joined => "JOINED",
                Self::Ringing => "RINGING",
                Self::Accepted => "ACCEPTED",
                Self::Declined => "DECLINED",
                Self::Missed => "MISSED",
                Self::MissedNotificationProfile => "MISSED_NOTIFICATION_PROFILE",
                Self::OutgoingRing => "OUTGOING_RING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_STATE" => Some(Self::UnknownState),
                "GENERIC" => Some(Self::Generic),
                "JOINED" => Some(Self::Joined),
                "RINGING" => Some(Self::Ringing),
                "ACCEPTED" => Some(Self::Accepted),
                "DECLINED" => Some(Self::Declined),
                "MISSED" => Some(Self::Missed),
                "MISSED_NOTIFICATION_PROFILE" => Some(Self::MissedNotificationProfile),
                "OUTGOING_RING" => Some(Self::OutgoingRing),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SimpleChatUpdate {
    #[prost(enumeration = "simple_chat_update::Type", tag = "1")]
    pub r#type: i32,
}
/// Nested message and enum types in `SimpleChatUpdate`.
pub mod simple_chat_update {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Importers should skip the update without throwing an error.
        Unknown = 0,
        JoinedSignal = 1,
        IdentityUpdate = 2,
        IdentityVerified = 3,
        /// marking as unverified
        IdentityDefault = 4,
        ChangeNumber = 5,
        ReleaseChannelDonationRequest = 6,
        EndSession = 7,
        ChatSessionRefresh = 8,
        BadDecrypt = 9,
        PaymentsActivated = 10,
        PaymentActivationRequest = 11,
        UnsupportedProtocolMessage = 12,
        ReportedSpam = 13,
        Blocked = 14,
        Unblocked = 15,
        MessageRequestAccepted = 16,
    }
    impl Type {
        /// 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::Unknown => "UNKNOWN",
                Self::JoinedSignal => "JOINED_SIGNAL",
                Self::IdentityUpdate => "IDENTITY_UPDATE",
                Self::IdentityVerified => "IDENTITY_VERIFIED",
                Self::IdentityDefault => "IDENTITY_DEFAULT",
                Self::ChangeNumber => "CHANGE_NUMBER",
                Self::ReleaseChannelDonationRequest => "RELEASE_CHANNEL_DONATION_REQUEST",
                Self::EndSession => "END_SESSION",
                Self::ChatSessionRefresh => "CHAT_SESSION_REFRESH",
                Self::BadDecrypt => "BAD_DECRYPT",
                Self::PaymentsActivated => "PAYMENTS_ACTIVATED",
                Self::PaymentActivationRequest => "PAYMENT_ACTIVATION_REQUEST",
                Self::UnsupportedProtocolMessage => "UNSUPPORTED_PROTOCOL_MESSAGE",
                Self::ReportedSpam => "REPORTED_SPAM",
                Self::Blocked => "BLOCKED",
                Self::Unblocked => "UNBLOCKED",
                Self::MessageRequestAccepted => "MESSAGE_REQUEST_ACCEPTED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "JOINED_SIGNAL" => Some(Self::JoinedSignal),
                "IDENTITY_UPDATE" => Some(Self::IdentityUpdate),
                "IDENTITY_VERIFIED" => Some(Self::IdentityVerified),
                "IDENTITY_DEFAULT" => Some(Self::IdentityDefault),
                "CHANGE_NUMBER" => Some(Self::ChangeNumber),
                "RELEASE_CHANNEL_DONATION_REQUEST" => {
                    Some(Self::ReleaseChannelDonationRequest)
                }
                "END_SESSION" => Some(Self::EndSession),
                "CHAT_SESSION_REFRESH" => Some(Self::ChatSessionRefresh),
                "BAD_DECRYPT" => Some(Self::BadDecrypt),
                "PAYMENTS_ACTIVATED" => Some(Self::PaymentsActivated),
                "PAYMENT_ACTIVATION_REQUEST" => Some(Self::PaymentActivationRequest),
                "UNSUPPORTED_PROTOCOL_MESSAGE" => Some(Self::UnsupportedProtocolMessage),
                "REPORTED_SPAM" => Some(Self::ReportedSpam),
                "BLOCKED" => Some(Self::Blocked),
                "UNBLOCKED" => Some(Self::Unblocked),
                "MESSAGE_REQUEST_ACCEPTED" => Some(Self::MessageRequestAccepted),
                _ => None,
            }
        }
    }
}
/// For 1:1 chat updates only.
/// For group thread updates use GroupExpirationTimerUpdate.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExpirationTimerChatUpdate {
    /// 0 means the expiration timer was disabled
    #[prost(uint64, tag = "1")]
    pub expires_in_ms: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProfileChangeChatUpdate {
    #[prost(string, tag = "1")]
    pub previous_name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub new_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LearnedProfileChatUpdate {
    /// If unset, importers should consider the previous name to be an empty string.
    #[prost(oneof = "learned_profile_chat_update::PreviousName", tags = "1, 2")]
    pub previous_name: ::core::option::Option<learned_profile_chat_update::PreviousName>,
}
/// Nested message and enum types in `LearnedProfileChatUpdate`.
pub mod learned_profile_chat_update {
    /// If unset, importers should consider the previous name to be an empty string.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum PreviousName {
        #[prost(uint64, tag = "1")]
        E164(u64),
        #[prost(string, tag = "2")]
        Username(::prost::alloc::string::String),
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ThreadMergeChatUpdate {
    #[prost(uint64, tag = "1")]
    pub previous_e164: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionSwitchoverChatUpdate {
    #[prost(uint64, tag = "1")]
    pub e164: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroupChangeChatUpdate {
    /// Must be one or more; all updates batched together came from
    /// a single batched group state update.
    #[prost(message, repeated, tag = "1")]
    pub updates: ::prost::alloc::vec::Vec<group_change_chat_update::Update>,
}
/// Nested message and enum types in `GroupChangeChatUpdate`.
pub mod group_change_chat_update {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Update {
        /// If unset, importers should consider it to be a GenericGroupUpdate with unset updaterAci
        #[prost(
            oneof = "update::Update",
            tags = "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"
        )]
        pub update: ::core::option::Option<update::Update>,
    }
    /// Nested message and enum types in `Update`.
    pub mod update {
        /// If unset, importers should consider it to be a GenericGroupUpdate with unset updaterAci
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Update {
            #[prost(message, tag = "1")]
            GenericGroupUpdate(super::super::GenericGroupUpdate),
            #[prost(message, tag = "2")]
            GroupCreationUpdate(super::super::GroupCreationUpdate),
            #[prost(message, tag = "3")]
            GroupNameUpdate(super::super::GroupNameUpdate),
            #[prost(message, tag = "4")]
            GroupAvatarUpdate(super::super::GroupAvatarUpdate),
            #[prost(message, tag = "5")]
            GroupDescriptionUpdate(super::super::GroupDescriptionUpdate),
            #[prost(message, tag = "6")]
            GroupMembershipAccessLevelChangeUpdate(
                super::super::GroupMembershipAccessLevelChangeUpdate,
            ),
            #[prost(message, tag = "7")]
            GroupAttributesAccessLevelChangeUpdate(
                super::super::GroupAttributesAccessLevelChangeUpdate,
            ),
            #[prost(message, tag = "8")]
            GroupAnnouncementOnlyChangeUpdate(
                super::super::GroupAnnouncementOnlyChangeUpdate,
            ),
            #[prost(message, tag = "9")]
            GroupAdminStatusUpdate(super::super::GroupAdminStatusUpdate),
            #[prost(message, tag = "10")]
            GroupMemberLeftUpdate(super::super::GroupMemberLeftUpdate),
            #[prost(message, tag = "11")]
            GroupMemberRemovedUpdate(super::super::GroupMemberRemovedUpdate),
            #[prost(message, tag = "12")]
            SelfInvitedToGroupUpdate(super::super::SelfInvitedToGroupUpdate),
            #[prost(message, tag = "13")]
            SelfInvitedOtherUserToGroupUpdate(
                super::super::SelfInvitedOtherUserToGroupUpdate,
            ),
            #[prost(message, tag = "14")]
            GroupUnknownInviteeUpdate(super::super::GroupUnknownInviteeUpdate),
            #[prost(message, tag = "15")]
            GroupInvitationAcceptedUpdate(super::super::GroupInvitationAcceptedUpdate),
            #[prost(message, tag = "16")]
            GroupInvitationDeclinedUpdate(super::super::GroupInvitationDeclinedUpdate),
            #[prost(message, tag = "17")]
            GroupMemberJoinedUpdate(super::super::GroupMemberJoinedUpdate),
            #[prost(message, tag = "18")]
            GroupMemberAddedUpdate(super::super::GroupMemberAddedUpdate),
            #[prost(message, tag = "19")]
            GroupSelfInvitationRevokedUpdate(
                super::super::GroupSelfInvitationRevokedUpdate,
            ),
            #[prost(message, tag = "20")]
            GroupInvitationRevokedUpdate(super::super::GroupInvitationRevokedUpdate),
            #[prost(message, tag = "21")]
            GroupJoinRequestUpdate(super::super::GroupJoinRequestUpdate),
            #[prost(message, tag = "22")]
            GroupJoinRequestApprovalUpdate(super::super::GroupJoinRequestApprovalUpdate),
            #[prost(message, tag = "23")]
            GroupJoinRequestCanceledUpdate(super::super::GroupJoinRequestCanceledUpdate),
            #[prost(message, tag = "24")]
            GroupInviteLinkResetUpdate(super::super::GroupInviteLinkResetUpdate),
            #[prost(message, tag = "25")]
            GroupInviteLinkEnabledUpdate(super::super::GroupInviteLinkEnabledUpdate),
            #[prost(message, tag = "26")]
            GroupInviteLinkAdminApprovalUpdate(
                super::super::GroupInviteLinkAdminApprovalUpdate,
            ),
            #[prost(message, tag = "27")]
            GroupInviteLinkDisabledUpdate(super::super::GroupInviteLinkDisabledUpdate),
            #[prost(message, tag = "28")]
            GroupMemberJoinedByLinkUpdate(super::super::GroupMemberJoinedByLinkUpdate),
            #[prost(message, tag = "29")]
            GroupV2MigrationUpdate(super::super::GroupV2MigrationUpdate),
            #[prost(message, tag = "30")]
            GroupV2MigrationSelfInvitedUpdate(
                super::super::GroupV2MigrationSelfInvitedUpdate,
            ),
            #[prost(message, tag = "31")]
            GroupV2MigrationInvitedMembersUpdate(
                super::super::GroupV2MigrationInvitedMembersUpdate,
            ),
            #[prost(message, tag = "32")]
            GroupV2MigrationDroppedMembersUpdate(
                super::super::GroupV2MigrationDroppedMembersUpdate,
            ),
            #[prost(message, tag = "33")]
            GroupSequenceOfRequestsAndCancelsUpdate(
                super::super::GroupSequenceOfRequestsAndCancelsUpdate,
            ),
            #[prost(message, tag = "34")]
            GroupExpirationTimerUpdate(super::super::GroupExpirationTimerUpdate),
            #[prost(message, tag = "35")]
            GroupMemberLabelAccessLevelChangeUpdate(
                super::super::GroupMemberLabelAccessLevelChangeUpdate,
            ),
            #[prost(message, tag = "36")]
            GroupTerminateChangeUpdate(super::super::GroupTerminateChangeUpdate),
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenericGroupUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupCreationUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupNameUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    /// Null value means the group name was removed.
    #[prost(string, optional, tag = "2")]
    pub new_group_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupAvatarUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bool, tag = "2")]
    pub was_removed: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupDescriptionUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    /// Null value means the group description was removed.
    #[prost(string, optional, tag = "2")]
    pub new_description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupMembershipAccessLevelChangeUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(enumeration = "GroupV2AccessLevel", tag = "2")]
    pub access_level: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupMemberLabelAccessLevelChangeUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(enumeration = "GroupV2AccessLevel", tag = "2")]
    pub access_level: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupAttributesAccessLevelChangeUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(enumeration = "GroupV2AccessLevel", tag = "2")]
    pub access_level: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupAnnouncementOnlyChangeUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bool, tag = "2")]
    pub is_announcement_only: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupAdminStatusUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    /// The aci who had admin status granted or revoked.
    #[prost(bytes = "vec", tag = "2")]
    pub member_aci: ::prost::alloc::vec::Vec<u8>,
    #[prost(bool, tag = "3")]
    pub was_admin_status_granted: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupMemberLeftUpdate {
    #[prost(bytes = "vec", tag = "1")]
    pub aci: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupMemberRemovedUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub remover_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bytes = "vec", tag = "2")]
    pub removed_aci: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SelfInvitedToGroupUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub inviter_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SelfInvitedOtherUserToGroupUpdate {
    /// If no invitee id available, use GroupUnknownInviteeUpdate
    #[prost(bytes = "vec", tag = "1")]
    pub invitee_service_id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupUnknownInviteeUpdate {
    /// Can be the self user.
    #[prost(bytes = "vec", optional, tag = "1")]
    pub inviter_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(uint32, tag = "2")]
    pub invitee_count: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupInvitationAcceptedUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub inviter_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bytes = "vec", tag = "2")]
    pub new_member_aci: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupInvitationDeclinedUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub inviter_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    /// Note: if invited by pni, just set inviteeAci to nil.
    #[prost(bytes = "vec", optional, tag = "2")]
    pub invitee_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupMemberJoinedUpdate {
    #[prost(bytes = "vec", tag = "1")]
    pub new_member_aci: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupMemberAddedUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bytes = "vec", tag = "2")]
    pub new_member_aci: ::prost::alloc::vec::Vec<u8>,
    #[prost(bool, tag = "3")]
    pub had_open_invitation: bool,
    /// If hadOpenInvitation is true, optionally include aci of the inviter.
    #[prost(bytes = "vec", optional, tag = "4")]
    pub inviter_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
/// An invitation to self was revoked.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupSelfInvitationRevokedUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub revoker_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
/// These invitees should never be the local user.
/// Use GroupSelfInvitationRevokedUpdate in those cases.
/// The inviter or updater can be the local user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroupInvitationRevokedUpdate {
    /// The member that revoked the invite(s), not the inviter!
    /// Assumed to be an admin (at the time, may no longer be an
    /// admin or even a member).
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(message, repeated, tag = "2")]
    pub invitees: ::prost::alloc::vec::Vec<group_invitation_revoked_update::Invitee>,
}
/// Nested message and enum types in `GroupInvitationRevokedUpdate`.
pub mod group_invitation_revoked_update {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Invitee {
        #[prost(bytes = "vec", optional, tag = "1")]
        pub inviter_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
        /// Prefer to use aci over pni. No need to set
        /// pni if aci is set. Both can be missing.
        #[prost(bytes = "vec", optional, tag = "2")]
        pub invitee_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
        #[prost(bytes = "vec", optional, tag = "3")]
        pub invitee_pni: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupJoinRequestUpdate {
    #[prost(bytes = "vec", tag = "1")]
    pub requestor_aci: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupJoinRequestApprovalUpdate {
    #[prost(bytes = "vec", tag = "1")]
    pub requestor_aci: ::prost::alloc::vec::Vec<u8>,
    /// The aci that approved or rejected the request.
    #[prost(bytes = "vec", optional, tag = "2")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bool, tag = "3")]
    pub was_approved: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupJoinRequestCanceledUpdate {
    #[prost(bytes = "vec", tag = "1")]
    pub requestor_aci: ::prost::alloc::vec::Vec<u8>,
}
/// A single requestor has requested to join and cancelled
/// their request repeatedly with no other updates in between.
/// The last action encompassed by this update is always a
/// cancellation; if there was another open request immediately
/// after, it will be a separate GroupJoinRequestUpdate, either
/// in the same frame or in a subsequent frame.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupSequenceOfRequestsAndCancelsUpdate {
    #[prost(bytes = "vec", tag = "1")]
    pub requestor_aci: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint32, tag = "2")]
    pub count: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupInviteLinkResetUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupInviteLinkEnabledUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bool, tag = "2")]
    pub link_requires_admin_approval: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupInviteLinkAdminApprovalUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(bool, tag = "2")]
    pub link_requires_admin_approval: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupInviteLinkDisabledUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupMemberJoinedByLinkUpdate {
    #[prost(bytes = "vec", tag = "1")]
    pub new_member_aci: ::prost::alloc::vec::Vec<u8>,
}
/// A gv1->gv2 migration occurred.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupV2MigrationUpdate {}
/// Another user migrated gv1->gv2 but was unable to add
/// the local user and invited them instead.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupV2MigrationSelfInvitedUpdate {}
/// The local user migrated gv1->gv2 but was unable to
/// add some members and invited them instead.
/// (Happens if we don't have the invitee's profile key)
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupV2MigrationInvitedMembersUpdate {
    #[prost(uint32, tag = "1")]
    pub invited_members_count: u32,
}
/// The local user migrated gv1->gv2 but was unable to
/// add or invite some members and dropped them instead.
/// (Happens for e164 members where we don't have an aci).
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupV2MigrationDroppedMembersUpdate {
    #[prost(uint32, tag = "1")]
    pub dropped_members_count: u32,
}
/// For 1:1 timer updates, use ExpirationTimerChatUpdate.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupExpirationTimerUpdate {
    /// 0 means the expiration timer was disabled
    #[prost(uint64, tag = "1")]
    pub expires_in_ms: u64,
    #[prost(bytes = "vec", optional, tag = "2")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroupTerminateChangeUpdate {
    #[prost(bytes = "vec", optional, tag = "1")]
    pub updater_aci: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PollTerminateUpdate {
    #[prost(uint64, tag = "1")]
    pub target_sent_timestamp: u64,
    /// Between 1-100 characters
    #[prost(string, tag = "2")]
    pub question: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PinMessageUpdate {
    #[prost(uint64, tag = "1")]
    pub target_sent_timestamp: u64,
    /// recipient id
    #[prost(uint64, tag = "2")]
    pub author_id: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StickerPack {
    #[prost(bytes = "vec", tag = "1")]
    pub pack_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "2")]
    pub pack_key: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChatStyle {
    #[prost(bool, tag = "7")]
    pub dim_wallpaper_in_dark_mode: bool,
    /// If unset, importers should consider there to be no wallpaper.
    #[prost(oneof = "chat_style::Wallpaper", tags = "1, 2")]
    pub wallpaper: ::core::option::Option<chat_style::Wallpaper>,
    /// If unset, importers should consider it to be AutomaticBubbleColor
    #[prost(oneof = "chat_style::BubbleColor", tags = "3, 4, 5")]
    pub bubble_color: ::core::option::Option<chat_style::BubbleColor>,
}
/// Nested message and enum types in `ChatStyle`.
pub mod chat_style {
    /// Color ordering:
    ///    0   degrees: bottom-to-top
    ///    90  degrees: left-to-right
    ///    180 degrees: top-to-bottom
    ///    270 degrees: right-to-left
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Gradient {
        /// degrees
        #[prost(uint32, tag = "1")]
        pub angle: u32,
        /// 0xAARRGGBB
        #[prost(fixed32, repeated, tag = "2")]
        pub colors: ::prost::alloc::vec::Vec<u32>,
        /// percent from 0 to 1
        #[prost(float, repeated, tag = "3")]
        pub positions: ::prost::alloc::vec::Vec<f32>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CustomChatColor {
        #[prost(uint64, tag = "1")]
        pub id: u64,
        /// If unset, use the default chat color
        #[prost(oneof = "custom_chat_color::Color", tags = "2, 3")]
        pub color: ::core::option::Option<custom_chat_color::Color>,
    }
    /// Nested message and enum types in `CustomChatColor`.
    pub mod custom_chat_color {
        /// If unset, use the default chat color
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Color {
            /// 0xAARRGGBB
            #[prost(fixed32, tag = "2")]
            Solid(u32),
            #[prost(message, tag = "3")]
            Gradient(super::Gradient),
        }
    }
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AutomaticBubbleColor {}
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum WallpaperPreset {
        /// Interpret as the wallpaper being unset
        UnknownWallpaperPreset = 0,
        SolidBlush = 1,
        SolidCopper = 2,
        SolidDust = 3,
        SolidCeladon = 4,
        SolidRainforest = 5,
        SolidPacific = 6,
        SolidFrost = 7,
        SolidNavy = 8,
        SolidLilac = 9,
        SolidPink = 10,
        SolidEggplant = 11,
        SolidSilver = 12,
        GradientSunset = 13,
        GradientNoir = 14,
        GradientHeatmap = 15,
        GradientAqua = 16,
        GradientIridescent = 17,
        GradientMonstera = 18,
        GradientBliss = 19,
        GradientSky = 20,
        GradientPeach = 21,
    }
    impl WallpaperPreset {
        /// 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::UnknownWallpaperPreset => "UNKNOWN_WALLPAPER_PRESET",
                Self::SolidBlush => "SOLID_BLUSH",
                Self::SolidCopper => "SOLID_COPPER",
                Self::SolidDust => "SOLID_DUST",
                Self::SolidCeladon => "SOLID_CELADON",
                Self::SolidRainforest => "SOLID_RAINFOREST",
                Self::SolidPacific => "SOLID_PACIFIC",
                Self::SolidFrost => "SOLID_FROST",
                Self::SolidNavy => "SOLID_NAVY",
                Self::SolidLilac => "SOLID_LILAC",
                Self::SolidPink => "SOLID_PINK",
                Self::SolidEggplant => "SOLID_EGGPLANT",
                Self::SolidSilver => "SOLID_SILVER",
                Self::GradientSunset => "GRADIENT_SUNSET",
                Self::GradientNoir => "GRADIENT_NOIR",
                Self::GradientHeatmap => "GRADIENT_HEATMAP",
                Self::GradientAqua => "GRADIENT_AQUA",
                Self::GradientIridescent => "GRADIENT_IRIDESCENT",
                Self::GradientMonstera => "GRADIENT_MONSTERA",
                Self::GradientBliss => "GRADIENT_BLISS",
                Self::GradientSky => "GRADIENT_SKY",
                Self::GradientPeach => "GRADIENT_PEACH",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_WALLPAPER_PRESET" => Some(Self::UnknownWallpaperPreset),
                "SOLID_BLUSH" => Some(Self::SolidBlush),
                "SOLID_COPPER" => Some(Self::SolidCopper),
                "SOLID_DUST" => Some(Self::SolidDust),
                "SOLID_CELADON" => Some(Self::SolidCeladon),
                "SOLID_RAINFOREST" => Some(Self::SolidRainforest),
                "SOLID_PACIFIC" => Some(Self::SolidPacific),
                "SOLID_FROST" => Some(Self::SolidFrost),
                "SOLID_NAVY" => Some(Self::SolidNavy),
                "SOLID_LILAC" => Some(Self::SolidLilac),
                "SOLID_PINK" => Some(Self::SolidPink),
                "SOLID_EGGPLANT" => Some(Self::SolidEggplant),
                "SOLID_SILVER" => Some(Self::SolidSilver),
                "GRADIENT_SUNSET" => Some(Self::GradientSunset),
                "GRADIENT_NOIR" => Some(Self::GradientNoir),
                "GRADIENT_HEATMAP" => Some(Self::GradientHeatmap),
                "GRADIENT_AQUA" => Some(Self::GradientAqua),
                "GRADIENT_IRIDESCENT" => Some(Self::GradientIridescent),
                "GRADIENT_MONSTERA" => Some(Self::GradientMonstera),
                "GRADIENT_BLISS" => Some(Self::GradientBliss),
                "GRADIENT_SKY" => Some(Self::GradientSky),
                "GRADIENT_PEACH" => Some(Self::GradientPeach),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum BubbleColorPreset {
        /// Interpret as the user's default chat bubble color
        UnknownBubbleColorPreset = 0,
        SolidUltramarine = 1,
        SolidCrimson = 2,
        SolidVermilion = 3,
        SolidBurlap = 4,
        SolidForest = 5,
        SolidWintergreen = 6,
        SolidTeal = 7,
        SolidBlue = 8,
        SolidIndigo = 9,
        SolidViolet = 10,
        SolidPlum = 11,
        SolidTaupe = 12,
        SolidSteel = 13,
        GradientEmber = 14,
        GradientMidnight = 15,
        GradientInfrared = 16,
        GradientLagoon = 17,
        GradientFluorescent = 18,
        GradientBasil = 19,
        GradientSublime = 20,
        GradientSea = 21,
        GradientTangerine = 22,
    }
    impl BubbleColorPreset {
        /// 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::UnknownBubbleColorPreset => "UNKNOWN_BUBBLE_COLOR_PRESET",
                Self::SolidUltramarine => "SOLID_ULTRAMARINE",
                Self::SolidCrimson => "SOLID_CRIMSON",
                Self::SolidVermilion => "SOLID_VERMILION",
                Self::SolidBurlap => "SOLID_BURLAP",
                Self::SolidForest => "SOLID_FOREST",
                Self::SolidWintergreen => "SOLID_WINTERGREEN",
                Self::SolidTeal => "SOLID_TEAL",
                Self::SolidBlue => "SOLID_BLUE",
                Self::SolidIndigo => "SOLID_INDIGO",
                Self::SolidViolet => "SOLID_VIOLET",
                Self::SolidPlum => "SOLID_PLUM",
                Self::SolidTaupe => "SOLID_TAUPE",
                Self::SolidSteel => "SOLID_STEEL",
                Self::GradientEmber => "GRADIENT_EMBER",
                Self::GradientMidnight => "GRADIENT_MIDNIGHT",
                Self::GradientInfrared => "GRADIENT_INFRARED",
                Self::GradientLagoon => "GRADIENT_LAGOON",
                Self::GradientFluorescent => "GRADIENT_FLUORESCENT",
                Self::GradientBasil => "GRADIENT_BASIL",
                Self::GradientSublime => "GRADIENT_SUBLIME",
                Self::GradientSea => "GRADIENT_SEA",
                Self::GradientTangerine => "GRADIENT_TANGERINE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN_BUBBLE_COLOR_PRESET" => Some(Self::UnknownBubbleColorPreset),
                "SOLID_ULTRAMARINE" => Some(Self::SolidUltramarine),
                "SOLID_CRIMSON" => Some(Self::SolidCrimson),
                "SOLID_VERMILION" => Some(Self::SolidVermilion),
                "SOLID_BURLAP" => Some(Self::SolidBurlap),
                "SOLID_FOREST" => Some(Self::SolidForest),
                "SOLID_WINTERGREEN" => Some(Self::SolidWintergreen),
                "SOLID_TEAL" => Some(Self::SolidTeal),
                "SOLID_BLUE" => Some(Self::SolidBlue),
                "SOLID_INDIGO" => Some(Self::SolidIndigo),
                "SOLID_VIOLET" => Some(Self::SolidViolet),
                "SOLID_PLUM" => Some(Self::SolidPlum),
                "SOLID_TAUPE" => Some(Self::SolidTaupe),
                "SOLID_STEEL" => Some(Self::SolidSteel),
                "GRADIENT_EMBER" => Some(Self::GradientEmber),
                "GRADIENT_MIDNIGHT" => Some(Self::GradientMidnight),
                "GRADIENT_INFRARED" => Some(Self::GradientInfrared),
                "GRADIENT_LAGOON" => Some(Self::GradientLagoon),
                "GRADIENT_FLUORESCENT" => Some(Self::GradientFluorescent),
                "GRADIENT_BASIL" => Some(Self::GradientBasil),
                "GRADIENT_SUBLIME" => Some(Self::GradientSublime),
                "GRADIENT_SEA" => Some(Self::GradientSea),
                "GRADIENT_TANGERINE" => Some(Self::GradientTangerine),
                _ => None,
            }
        }
    }
    /// If unset, importers should consider there to be no wallpaper.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Wallpaper {
        #[prost(enumeration = "WallpaperPreset", tag = "1")]
        WallpaperPreset(i32),
        /// This `FilePointer` is expected not to contain a `fileName`, `width`,
        /// `height`, or `caption`.
        #[prost(message, tag = "2")]
        WallpaperPhoto(::prost::alloc::boxed::Box<super::FilePointer>),
    }
    /// If unset, importers should consider it to be AutomaticBubbleColor
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum BubbleColor {
        /// Bubble setting is automatically determined based on the wallpaper setting,
        /// or `SOLID_ULTRAMARINE` for `noWallpaper`
        #[prost(message, tag = "3")]
        AutoBubbleColor(AutomaticBubbleColor),
        #[prost(enumeration = "BubbleColorPreset", tag = "4")]
        BubbleColorPreset(i32),
        /// See AccountSettings.customChatColors
        #[prost(uint64, tag = "5")]
        CustomColorId(u64),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NotificationProfile {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub emoji: ::core::option::Option<::prost::alloc::string::String>,
    /// 0xAARRGGBB
    #[prost(fixed32, tag = "3")]
    pub color: u32,
    #[prost(uint64, tag = "4")]
    pub created_at_ms: u64,
    #[prost(bool, tag = "5")]
    pub allow_all_calls: bool,
    #[prost(bool, tag = "6")]
    pub allow_all_mentions: bool,
    /// generated recipient id for allowed groups and contacts
    #[prost(uint64, repeated, tag = "7")]
    pub allowed_members: ::prost::alloc::vec::Vec<u64>,
    #[prost(bool, tag = "8")]
    pub schedule_enabled: bool,
    /// 24-hour clock int, 0000-2359 (e.g., 15, 900, 1130, 2345)
    #[prost(uint32, tag = "9")]
    pub schedule_start_time: u32,
    /// 24-hour clock int, 0000-2359 (e.g., 15, 900, 1130, 2345)
    #[prost(uint32, tag = "10")]
    pub schedule_end_time: u32,
    #[prost(enumeration = "notification_profile::DayOfWeek", repeated, tag = "11")]
    pub schedule_days_enabled: ::prost::alloc::vec::Vec<i32>,
    /// should be 16 bytes
    #[prost(bytes = "vec", tag = "12")]
    pub id: ::prost::alloc::vec::Vec<u8>,
}
/// Nested message and enum types in `NotificationProfile`.
pub mod notification_profile {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DayOfWeek {
        /// Interpret as "Monday"
        Unknown = 0,
        Monday = 1,
        Tuesday = 2,
        Wednesday = 3,
        Thursday = 4,
        Friday = 5,
        Saturday = 6,
        Sunday = 7,
    }
    impl DayOfWeek {
        /// 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::Unknown => "UNKNOWN",
                Self::Monday => "MONDAY",
                Self::Tuesday => "TUESDAY",
                Self::Wednesday => "WEDNESDAY",
                Self::Thursday => "THURSDAY",
                Self::Friday => "FRIDAY",
                Self::Saturday => "SATURDAY",
                Self::Sunday => "SUNDAY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "MONDAY" => Some(Self::Monday),
                "TUESDAY" => Some(Self::Tuesday),
                "WEDNESDAY" => Some(Self::Wednesday),
                "THURSDAY" => Some(Self::Thursday),
                "FRIDAY" => Some(Self::Friday),
                "SATURDAY" => Some(Self::Saturday),
                "SUNDAY" => Some(Self::Sunday),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChatFolder {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub show_only_unread: bool,
    #[prost(bool, tag = "3")]
    pub show_muted_chats: bool,
    /// Folder includes all 1:1 chats, unless excluded
    #[prost(bool, tag = "4")]
    pub include_all_individual_chats: bool,
    /// Folder includes all group chats, unless excluded
    #[prost(bool, tag = "5")]
    pub include_all_group_chats: bool,
    #[prost(enumeration = "chat_folder::FolderType", tag = "6")]
    pub folder_type: i32,
    /// generated recipient id of groups, contacts, and/or note to self
    #[prost(uint64, repeated, tag = "7")]
    pub included_recipient_ids: ::prost::alloc::vec::Vec<u64>,
    /// generated recipient id of groups, contacts, and/or note to self
    #[prost(uint64, repeated, tag = "8")]
    pub excluded_recipient_ids: ::prost::alloc::vec::Vec<u64>,
    /// should be 16 bytes
    #[prost(bytes = "vec", tag = "9")]
    pub id: ::prost::alloc::vec::Vec<u8>,
}
/// Nested message and enum types in `ChatFolder`.
pub mod chat_folder {
    /// Represents the default "All chats" folder record vs all other custom folders
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum FolderType {
        /// Interpret as "Custom"
        Unknown = 0,
        All = 1,
        Custom = 2,
    }
    impl FolderType {
        /// 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::Unknown => "UNKNOWN",
                Self::All => "ALL",
                Self::Custom => "CUSTOM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "ALL" => Some(Self::All),
                "CUSTOM" => Some(Self::Custom),
                _ => None,
            }
        }
    }
}
/// If unset - computed as the value of the first byte of SHA-256(msg=CONTACT_ID)
/// modulo the count of colors. Once set the avatar color for a recipient is
/// never recomputed or changed.
///
/// `CONTACT_ID` is the first available identifier from the list:
/// - ServiceIdToBinary(ACI)
/// - E164
/// - ServiceIdToBinary(PNI)
/// - Group Id
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AvatarColor {
    A100 = 0,
    A110 = 1,
    A120 = 2,
    A130 = 3,
    A140 = 4,
    A150 = 5,
    A160 = 6,
    A170 = 7,
    A180 = 8,
    A190 = 9,
    A200 = 10,
    A210 = 11,
}
impl AvatarColor {
    /// 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::A100 => "A100",
            Self::A110 => "A110",
            Self::A120 => "A120",
            Self::A130 => "A130",
            Self::A140 => "A140",
            Self::A150 => "A150",
            Self::A160 => "A160",
            Self::A170 => "A170",
            Self::A180 => "A180",
            Self::A190 => "A190",
            Self::A200 => "A200",
            Self::A210 => "A210",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "A100" => Some(Self::A100),
            "A110" => Some(Self::A110),
            "A120" => Some(Self::A120),
            "A130" => Some(Self::A130),
            "A140" => Some(Self::A140),
            "A150" => Some(Self::A150),
            "A160" => Some(Self::A160),
            "A170" => Some(Self::A170),
            "A180" => Some(Self::A180),
            "A190" => Some(Self::A190),
            "A200" => Some(Self::A200),
            "A210" => Some(Self::A210),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GroupV2AccessLevel {
    /// Interpret as "Unsatisfiable"
    Unknown = 0,
    Any = 1,
    Member = 2,
    Administrator = 3,
    Unsatisfiable = 4,
}
impl GroupV2AccessLevel {
    /// 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::Unknown => "UNKNOWN",
            Self::Any => "ANY",
            Self::Member => "MEMBER",
            Self::Administrator => "ADMINISTRATOR",
            Self::Unsatisfiable => "UNSATISFIABLE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN" => Some(Self::Unknown),
            "ANY" => Some(Self::Any),
            "MEMBER" => Some(Self::Member),
            "ADMINISTRATOR" => Some(Self::Administrator),
            "UNSATISFIABLE" => Some(Self::Unsatisfiable),
            _ => None,
        }
    }
}
