amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Retail Procurement Shipments
 *
 * The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// LabelData : Label details as part of the transport label response
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LabelData {
    /// A sequential number assigned to each label within a shipment.
    #[serde(rename = "labelSequenceNumber", skip_serializing_if = "Option::is_none")]
    pub label_sequence_number: Option<i32>,
    /// The format of the label.
    #[serde(rename = "labelFormat", skip_serializing_if = "Option::is_none")]
    pub label_format: Option<LabelFormat>,
    /// Unique identification of the carrier.
    #[serde(rename = "carrierCode", skip_serializing_if = "Option::is_none")]
    pub carrier_code: Option<String>,
    /// Tracking Id for the transportation.
    #[serde(rename = "trackingId", skip_serializing_if = "Option::is_none")]
    pub tracking_id: Option<String>,
    /// The base-64 encoded string that represents the shipment label.
    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
}

impl LabelData {
    /// Label details as part of the transport label response
    pub fn new() -> LabelData {
        LabelData {
            label_sequence_number: None,
            label_format: None,
            carrier_code: None,
            tracking_id: None,
            label: None,
        }
    }
}
/// The format of the label.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LabelFormat {
    #[serde(rename = "PDF")]
    Pdf,
}

impl Default for LabelFormat {
    fn default() -> LabelFormat {
        Self::Pdf
    }
}