amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Feeds
 *
 * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
 *
 * The version of the OpenAPI document: 2021-06-30
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// FeedDocument : Information required for the feed document.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FeedDocument {
    /// The identifier for the feed document. This identifier is unique only in combination with a seller ID.
    #[serde(rename = "feedDocumentId")]
    pub feed_document_id: String,
    /// A presigned URL for the feed document. If `compressionAlgorithm` is not returned, you can download the feed directly from this URL. This URL expires after 5 minutes.
    #[serde(rename = "url")]
    pub url: String,
    /// If the feed document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the feed when you download. Otherwise, you can download the feed directly. Refer to [Step 7. Download the feed processing report](doc:feeds-api-v2021-06-30-use-case-guide#step-7-download-the-feed-processing-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 FeedDocument {
    /// Information required for the feed document.
    pub fn new(feed_document_id: String, url: String) -> FeedDocument {
        FeedDocument {
            feed_document_id,
            url,
            compression_algorithm: None,
        }
    }
}
/// If the feed document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the feed when you download. Otherwise, you can download the feed directly. Refer to [Step 7. Download the feed processing report](doc:feeds-api-v2021-06-30-use-case-guide#step-7-download-the-feed-processing-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
    }
}