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 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: 2020-09-04
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FeedDocument {
/// The identifier for the feed document. This identifier is unique only in combination with a seller ID.
#[serde(default, 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(default, rename = "url")]
pub url: String,
#[serde(default, rename = "encryptionDetails")]
pub encryption_details: Box<crate::models::FeedDocumentEncryptionDetails>,
/// 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 6. Download and decrypt the feed processing report](doc:feeds-api-v2020-09-04-use-case-guide#step-6-download-and-decrypt-the-feed-processing-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 FeedDocument {
pub fn new(feed_document_id: String, url: String, encryption_details: crate::models::FeedDocumentEncryptionDetails) -> FeedDocument {
FeedDocument {
feed_document_id,
url,
encryption_details: Box::new(encryption_details),
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 6. Download and decrypt the feed processing report](doc:feeds-api-v2020-09-04-use-case-guide#step-6-download-and-decrypt-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
}
}