Skip to main content

amazon_spapi/models/catalog_items_2020_12_01/
item.rs

1/*
2 * Selling Partner API for Catalog Items
3 *
4 * The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.  For more information, see the [Catalog Items API Use Case Guide](doc:catalog-items-api-v2020-12-01-use-case-guide).
5 *
6 * The version of the OpenAPI document: 2020-12-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Item : An item in the Amazon catalog.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Item {
17    /// Amazon Standard Identification Number (ASIN) is the unique identifier for an item in the Amazon catalog.
18    #[serde(rename = "asin")]
19    pub asin: String,
20    /// A JSON object that contains structured item attribute data keyed by attribute name. Catalog item attributes are available only to brand owners and conform to the related product type definitions available in the Selling Partner API for Product Type Definitions.
21    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
22    pub attributes: Option<std::collections::HashMap<String, serde_json::Value>>,
23    /// Identifiers associated with the item in the Amazon catalog, such as UPC and EAN identifiers.
24    #[serde(rename = "identifiers", skip_serializing_if = "Option::is_none")]
25    pub identifiers: Option<Vec<models::catalog_items_2020_12_01::ItemIdentifiersByMarketplace>>,
26    /// Images for an item in the Amazon catalog. All image variants are provided to brand owners. Otherwise, a thumbnail of the \"MAIN\" image variant is provided.
27    #[serde(rename = "images", skip_serializing_if = "Option::is_none")]
28    pub images: Option<Vec<models::catalog_items_2020_12_01::ItemImagesByMarketplace>>,
29    /// Product types associated with the Amazon catalog item.
30    #[serde(rename = "productTypes", skip_serializing_if = "Option::is_none")]
31    pub product_types: Option<Vec<models::catalog_items_2020_12_01::ItemProductTypeByMarketplace>>,
32    /// Sales ranks of an Amazon catalog item.
33    #[serde(rename = "salesRanks", skip_serializing_if = "Option::is_none")]
34    pub sales_ranks: Option<Vec<models::catalog_items_2020_12_01::ItemSalesRanksByMarketplace>>,
35    /// Summary details of an Amazon catalog item.
36    #[serde(rename = "summaries", skip_serializing_if = "Option::is_none")]
37    pub summaries: Option<Vec<models::catalog_items_2020_12_01::ItemSummaryByMarketplace>>,
38    /// Variation details by marketplace for an Amazon catalog item (variation relationships).
39    #[serde(rename = "variations", skip_serializing_if = "Option::is_none")]
40    pub variations: Option<Vec<models::catalog_items_2020_12_01::ItemVariationsByMarketplace>>,
41    /// Vendor details associated with an Amazon catalog item. Vendor details are available to vendors only.
42    #[serde(rename = "vendorDetails", skip_serializing_if = "Option::is_none")]
43    pub vendor_details: Option<Vec<models::catalog_items_2020_12_01::ItemVendorDetailsByMarketplace>>,
44}
45
46impl Item {
47    /// An item in the Amazon catalog.
48    pub fn new(asin: String) -> Item {
49        Item {
50            asin,
51            attributes: None,
52            identifiers: None,
53            images: None,
54            product_types: None,
55            sales_ranks: None,
56            summaries: None,
57            variations: None,
58            vendor_details: None,
59        }
60    }
61}
62