amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * 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: 2021-06-30
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ReportDocument : Information required for the report document.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReportDocument {
    /// The identifier for the report document. This identifier is unique only in combination with a seller ID.
    #[serde(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(rename = "url")]
    pub url: String,
    /// 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 the report](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2021-06-30-retrieve-a-report#step-2-download-the-report) in the use case guide, where sample code is provided.
    #[serde(rename = "compressionAlgorithm", skip_serializing_if = "Option::is_none")]
    pub compression_algorithm: Option<CompressionAlgorithm>,
}

impl ReportDocument {
    /// Information required for the report document.
    pub fn new(report_document_id: String, url: String) -> ReportDocument {
        ReportDocument {
            report_document_id,
            url,
            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 the report](https://developer-docs.amazon.com/sp-api/docs/reports-api-v2021-06-30-retrieve-a-report#step-2-download-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
    }
}