amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Amazon Warehousing and Distribution
 *
 * The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
 *
 * The version of the OpenAPI document: 2024-05-09
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// DistributionPackageContents : Represents the contents inside a package, which can be products or a nested package.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DistributionPackageContents {
    /// This is required only when `DistributionPackageType=PALLET`.
    #[serde(rename = "packages", skip_serializing_if = "Option::is_none")]
    pub packages: Option<Vec<models::awd_2024_05_09::DistributionPackageQuantity>>,
    /// This is required only when `DistributionPackageType=CASE`.
    #[serde(rename = "products", skip_serializing_if = "Option::is_none")]
    pub products: Option<Vec<models::awd_2024_05_09::ProductQuantity>>,
}

impl DistributionPackageContents {
    /// Represents the contents inside a package, which can be products or a nested package.
    pub fn new() -> DistributionPackageContents {
        DistributionPackageContents {
            packages: None,
            products: None,
        }
    }
}