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
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
use crate::types::passport;
use is_macro::Is;

/// Represents different kinds of [`Element`].
///
/// [`Element`]: ./struct.Element.html
#[derive(Debug, PartialEq, Eq, Clone, Hash, Is)]
#[non_exhaustive]
#[must_use]
#[allow(clippy::large_enum_variant)]
pub enum Kind {
    /// The user's personal details.
    PersonalDetails(String),
    /// The user's passport.
    #[non_exhaustive]
    Passport {
        /// Data related to the passport.
        data: String,
        /// The front size of the passport.
        front_side: passport::File,
        /// The user's selfie with the passport.
        selfie: passport::File,
        /// Translated versions of the passport.
        translation: Vec<passport::File>,
    },
    /// The user's driver license.
    #[non_exhaustive]
    DriverLicense {
        /// Data related to the license.
        data: String,
        /// The front side of the license.
        front_side: passport::File,
        /// The reverse side of the license.
        reverse_side: passport::File,
        /// The user's selfie with the license.
        selfie: passport::File,
        /// Translated versions of the license.
        translation: Vec<passport::File>,
    },
    /// The user's identity card.
    #[non_exhaustive]
    IdentityCard {
        /// Data related to the identity card.
        data: String,
        /// The front side of the identity card.
        front_side: passport::File,
        /// The reverse side of the identity card.
        reverse_side: passport::File,
        /// The user's selfie with the license.
        selfie: passport::File,
        /// Translated versions of the identity card.
        translation: Vec<passport::File>,
    },
    /// The user's internal passport.
    #[non_exhaustive]
    InternalPassport {
        /// Data related to the passport.
        data: String,
        /// The front side of the passport.
        front_side: passport::File,
        /// The user's selfie with the passport.
        selfie: passport::File,
        /// Translated versions of the passport.
        translation: Vec<passport::File>,
    },
    /// The user's address.
    Address(String),
    /// The user's utility bill.
    #[non_exhaustive]
    UtilityBill {
        /// Photos of the bill.
        files: Vec<passport::File>,
        /// Translated versions of the bill.
        translation: Vec<passport::File>,
    },
    /// The user's bank statement.
    #[non_exhaustive]
    BankStatement {
        /// Photos of the statement.
        files: Vec<passport::File>,
        /// Translated versions of the statement.
        translation: Vec<passport::File>,
    },
    /// The user's rental agreement.
    #[non_exhaustive]
    RentalAgreement {
        /// Photos of the agreement.
        files: Vec<passport::File>,
        /// Translated versions of the agreement.
        translation: Vec<passport::File>,
    },
    /// The user's passport registration.
    #[non_exhaustive]
    PassportRegistration {
        /// Photos of the registration.
        files: Vec<passport::File>,
        /// Translated versions of the registration.
        translation: Vec<passport::File>,
    },
    /// The user's temporary registration.
    #[non_exhaustive]
    TemporaryRegistration {
        /// Photos of the registration.
        files: Vec<passport::File>,
        /// Translated versions of the registration.
        translation: Vec<passport::File>,
    },
    /// The user's phone number.
    PhoneNumber(String),
    /// The user's email.
    Email(String),
}