Skip to main content

amazon_spapi/models/awd_2024_05_09/
measurement_data.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/// MeasurementData : Package weight and dimension.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct MeasurementData {
17    #[serde(rename = "dimensions", skip_serializing_if = "Option::is_none")]
18    pub dimensions: Option<Box<models::awd_2024_05_09::PackageDimensions>>,
19    #[serde(rename = "volume", skip_serializing_if = "Option::is_none")]
20    pub volume: Option<Box<models::awd_2024_05_09::PackageVolume>>,
21    #[serde(rename = "weight")]
22    pub weight: Box<models::awd_2024_05_09::PackageWeight>,
23}
24
25impl MeasurementData {
26    /// Package weight and dimension.
27    pub fn new(weight: models::awd_2024_05_09::PackageWeight) -> MeasurementData {
28        MeasurementData {
29            dimensions: None,
30            volume: None,
31            weight: Box::new(weight),
32        }
33    }
34}
35