amazon_spapi/models/vendor_shipments/
label_data.rs

1/*
2 * Selling Partner API for Retail Procurement Shipments
3 *
4 * The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// LabelData : Label details as part of the transport label response
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct LabelData {
17    /// A sequential number assigned to each label within a shipment.
18    #[serde(rename = "labelSequenceNumber", skip_serializing_if = "Option::is_none")]
19    pub label_sequence_number: Option<i32>,
20    /// The format of the label.
21    #[serde(rename = "labelFormat", skip_serializing_if = "Option::is_none")]
22    pub label_format: Option<LabelFormat>,
23    /// Unique identification of the carrier.
24    #[serde(rename = "carrierCode", skip_serializing_if = "Option::is_none")]
25    pub carrier_code: Option<String>,
26    /// Tracking Id for the transportation.
27    #[serde(rename = "trackingId", skip_serializing_if = "Option::is_none")]
28    pub tracking_id: Option<String>,
29    /// The base-64 encoded string that represents the shipment label.
30    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
31    pub label: Option<String>,
32}
33
34impl LabelData {
35    /// Label details as part of the transport label response
36    pub fn new() -> LabelData {
37        LabelData {
38            label_sequence_number: None,
39            label_format: None,
40            carrier_code: None,
41            tracking_id: None,
42            label: None,
43        }
44    }
45}
46/// The format of the label.
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum LabelFormat {
49    #[serde(rename = "PDF")]
50    Pdf,
51}
52
53impl Default for LabelFormat {
54    fn default() -> LabelFormat {
55        Self::Pdf
56    }
57}
58