amazon_spapi/models/feeds_2021_06_30/
feed_document.rs

1/*
2 * Selling Partner API for Feeds
3 *
4 * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
5 *
6 * The version of the OpenAPI document: 2021-06-30
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FeedDocument : Information required for the feed document.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FeedDocument {
17    /// The identifier for the feed document. This identifier is unique only in combination with a seller ID.
18    #[serde(rename = "feedDocumentId")]
19    pub feed_document_id: String,
20    /// 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.
21    #[serde(rename = "url")]
22    pub url: String,
23    /// 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.
24    #[serde(rename = "compressionAlgorithm", skip_serializing_if = "Option::is_none")]
25    pub compression_algorithm: Option<CompressionAlgorithm>,
26}
27
28impl FeedDocument {
29    /// Information required for the feed document.
30    pub fn new(feed_document_id: String, url: String) -> FeedDocument {
31        FeedDocument {
32            feed_document_id,
33            url,
34            compression_algorithm: None,
35        }
36    }
37}
38/// 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.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum CompressionAlgorithm {
41    #[serde(rename = "GZIP")]
42    Gzip,
43}
44
45impl Default for CompressionAlgorithm {
46    fn default() -> CompressionAlgorithm {
47        Self::Gzip
48    }
49}
50