amazon_spapi/models/awd_2024_05_09/distribution_package_contents.rs
1/*
2 * The Selling Partner API for Amazon Warehousing and Distribution
3 *
4 * The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
5 *
6 * The version of the OpenAPI document: 2024-05-09
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DistributionPackageContents : Represents the contents inside a package, which can be products or a nested package.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DistributionPackageContents {
17 /// This is required only when `DistributionPackageType=PALLET`.
18 #[serde(rename = "packages", skip_serializing_if = "Option::is_none")]
19 pub packages: Option<Vec<models::awd_2024_05_09::DistributionPackageQuantity>>,
20 /// This is required only when `DistributionPackageType=CASE`.
21 #[serde(rename = "products", skip_serializing_if = "Option::is_none")]
22 pub products: Option<Vec<models::awd_2024_05_09::ProductQuantity>>,
23}
24
25impl DistributionPackageContents {
26 /// Represents the contents inside a package, which can be products or a nested package.
27 pub fn new() -> DistributionPackageContents {
28 DistributionPackageContents {
29 packages: None,
30 products: None,
31 }
32 }
33}
34