amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for A+ Content Management
 *
 * Use the A+ Content API to build applications that help selling partners add rich marketing content to their Amazon product detail pages. Selling partners can use A+ content to share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners use content modules to add images and text.
 *
 * The version of the OpenAPI document: 2020-11-01
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// ContentDocument : The A+ Content document. This is the enhanced content that is published to product detail pages.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContentDocument {
    /// The A+ Content document name.
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "contentType")]
    pub content_type: models::aplus_content_2020_11_01::ContentType,
    /// The A+ Content document subtype. This represents a special-purpose type of an A+ Content document. Not every A+ Content document type has a subtype, and subtypes can change at any time.
    #[serde(rename = "contentSubType", skip_serializing_if = "Option::is_none")]
    pub content_sub_type: Option<String>,
    /// The IETF language tag, which supports the primary language subtag and one secondary language subtag. The secondary language subtag is usually a regional designation. This doesn't support subtags other than the primary and secondary subtags. **Pattern:** ^[a-z]{2,}-[A-Z0-9]{2,}$
    #[serde(rename = "locale")]
    pub locale: String,
    /// A list of A+ Content modules.
    #[serde(rename = "contentModuleList")]
    pub content_module_list: Vec<models::aplus_content_2020_11_01::ContentModule>,
}

impl ContentDocument {
    /// The A+ Content document. This is the enhanced content that is published to product detail pages.
    pub fn new(name: String, content_type: models::aplus_content_2020_11_01::ContentType, locale: String, content_module_list: Vec<models::aplus_content_2020_11_01::ContentModule>) -> ContentDocument {
        ContentDocument {
            name,
            content_type,
            content_sub_type: None,
            locale,
            content_module_list,
        }
    }
}