Skip to main content

amazon_spapi/models/aplus_content_2020_11_01/
content_document.rs

1/*
2 * Selling Partner API for A+ Content Management
3 *
4 * 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.
5 *
6 * The version of the OpenAPI document: 2020-11-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ContentDocument : The A+ Content document. This is the enhanced content that is published to product detail pages.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ContentDocument {
17    /// The A+ Content document name.
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "contentType")]
21    pub content_type: models::aplus_content_2020_11_01::ContentType,
22    /// 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.
23    #[serde(rename = "contentSubType", skip_serializing_if = "Option::is_none")]
24    pub content_sub_type: Option<String>,
25    /// 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,}$
26    #[serde(rename = "locale")]
27    pub locale: String,
28    /// A list of A+ Content modules.
29    #[serde(rename = "contentModuleList")]
30    pub content_module_list: Vec<models::aplus_content_2020_11_01::ContentModule>,
31}
32
33impl ContentDocument {
34    /// The A+ Content document. This is the enhanced content that is published to product detail pages.
35    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 {
36        ContentDocument {
37            name,
38            content_type,
39            content_sub_type: None,
40            locale,
41            content_module_list,
42        }
43    }
44}
45