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};

/// CreateFeedSpecification : Information required to create the feed.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateFeedSpecification {
    /// The feed type.
    #[serde(rename = "feedType")]
    pub feed_type: String,
    /// A list of identifiers for marketplaces that you want the feed to be applied to.
    #[serde(rename = "marketplaceIds")]
    pub marketplace_ids: Vec<String>,
    /// The document identifier returned by the createFeedDocument operation. Upload the feed document contents before calling the createFeed operation.
    #[serde(rename = "inputFeedDocumentId")]
    pub input_feed_document_id: String,
    /// Additional options to control the feed. These vary by feed type.
    #[serde(rename = "feedOptions", skip_serializing_if = "Option::is_none")]
    pub feed_options: Option<std::collections::HashMap<String, String>>,
}

impl CreateFeedSpecification {
    /// Information required to create the feed.
    pub fn new(feed_type: String, marketplace_ids: Vec<String>, input_feed_document_id: String) -> CreateFeedSpecification {
        CreateFeedSpecification {
            feed_type,
            marketplace_ids,
            input_feed_document_id,
            feed_options: None,
        }
    }
}