conogram/entities/
passport_element_error_file.rs

1use serde::{Deserialize, Serialize};
2
3/// Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
4///
5/// API Reference: [link](https://core.telegram.org/bots/api/#passportelementerrorfile)
6#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
7pub struct PassportElementErrorFile {
8    /// The section of the user's Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”
9    #[serde(rename = "type")]
10    pub type_: PassportElementErrorFileType,
11
12    /// Base64-encoded file hash
13    pub file_hash: String,
14
15    /// Error message
16    pub message: String,
17}
18
19/// The section of the user's Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”
20#[derive(Debug, Clone, Copy, Default, PartialEq, Serialize, Deserialize)]
21pub enum PassportElementErrorFileType {
22    /// `utility_bill`
23    #[default]
24    #[serde(rename = "utility_bill")]
25    UtilityBill,
26
27    /// `bank_statement`
28    #[serde(rename = "bank_statement")]
29    BankStatement,
30
31    /// `rental_agreement`
32    #[serde(rename = "rental_agreement")]
33    RentalAgreement,
34
35    /// `passport_registration`
36    #[serde(rename = "passport_registration")]
37    PassportRegistration,
38
39    /// `temporary_registration`
40    #[serde(rename = "temporary_registration")]
41    TemporaryRegistration,
42}
43
44// Divider: all content below this line will be preserved after code regen