amazon_spapi/models/feeds_2021_06_30/
create_feed_specification.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/// CreateFeedSpecification : Information required to create the feed.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateFeedSpecification {
17    /// The feed type.
18    #[serde(rename = "feedType")]
19    pub feed_type: String,
20    /// A list of identifiers for marketplaces that you want the feed to be applied to.
21    #[serde(rename = "marketplaceIds")]
22    pub marketplace_ids: Vec<String>,
23    /// The document identifier returned by the createFeedDocument operation. Upload the feed document contents before calling the createFeed operation.
24    #[serde(rename = "inputFeedDocumentId")]
25    pub input_feed_document_id: String,
26    /// Additional options to control the feed. These vary by feed type.
27    #[serde(rename = "feedOptions", skip_serializing_if = "Option::is_none")]
28    pub feed_options: Option<std::collections::HashMap<String, String>>,
29}
30
31impl CreateFeedSpecification {
32    /// Information required to create the feed.
33    pub fn new(feed_type: String, marketplace_ids: Vec<String>, input_feed_document_id: String) -> CreateFeedSpecification {
34        CreateFeedSpecification {
35            feed_type,
36            marketplace_ids,
37            input_feed_document_id,
38            feed_options: None,
39        }
40    }
41}
42