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
/*
 * Selling Partner API for Reports
 *
 * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses.
 *
 * The version of the OpenAPI document: 2020-09-04
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ReportDocument {
    /// The identifier for the report document. This identifier is unique only in combination with a seller ID.
    #[serde(default, rename = "reportDocumentId")]
    pub report_document_id: String,
    /// A presigned URL for the report document. If `compressionAlgorithm` is not returned, you can download the report directly from this URL. This URL expires after 5 minutes.
    #[serde(default, rename = "url")]
    pub url: String,
    #[serde(default, rename = "encryptionDetails")]
    pub encryption_details: Box<crate::models::ReportDocumentEncryptionDetails>,
    /// If the report document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the report when you download. Otherwise, you can download the report directly. Refer to [Step 2. Download and decrypt the report](doc:reports-api-v2020-09-04-use-case-guide#step-2-download-and-decrypt-the-report) in the use case guide, where sample code is provided.
    #[serde(default, rename = "compressionAlgorithm", skip_serializing_if = "Option::is_none")]
    pub compression_algorithm: Option<CompressionAlgorithm>,
}

impl ReportDocument {
    pub fn new(report_document_id: String, url: String, encryption_details: crate::models::ReportDocumentEncryptionDetails) -> ReportDocument {
        ReportDocument {
            report_document_id,
            url,
            encryption_details: Box::new(encryption_details),
            compression_algorithm: None,
        }
    }
}

/// If the report document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the report when you download. Otherwise, you can download the report directly. Refer to [Step 2. Download and decrypt the report](doc:reports-api-v2020-09-04-use-case-guide#step-2-download-and-decrypt-the-report) in the use case guide, where sample code is provided.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CompressionAlgorithm {
    #[serde(rename = "GZIP")]
    GZIP,
}

impl Default for CompressionAlgorithm {
    fn default() -> CompressionAlgorithm {
        Self::GZIP
    }
}