amazon_spapi/models/shipping/
label_specification.rs

1/*
2 * Selling Partner API for Shipping
3 *
4 * Provides programmatic access to Amazon Shipping APIs.   **Note:** If you are new to the Amazon Shipping API, refer to the latest version of <a href=\"https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference\">Amazon Shipping API (v2)</a> on the <a href=\"https://developer-docs.amazon.com/amazon-shipping/\">Amazon Shipping Developer Documentation</a> site.
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/// LabelSpecification : The label specification info.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct LabelSpecification {
17    /// The format of the label. Enum of PNG only for now.
18    #[serde(rename = "labelFormat")]
19    pub label_format: LabelFormat,
20    /// The label stock size specification in length and height. Enum of 4x6 only for now.
21    #[serde(rename = "labelStockSize")]
22    pub label_stock_size: LabelStockSize,
23}
24
25impl LabelSpecification {
26    /// The label specification info.
27    pub fn new(label_format: LabelFormat, label_stock_size: LabelStockSize) -> LabelSpecification {
28        LabelSpecification {
29            label_format,
30            label_stock_size,
31        }
32    }
33}
34/// The format of the label. Enum of PNG only for now.
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum LabelFormat {
37    #[serde(rename = "PNG")]
38    Png,
39}
40
41impl Default for LabelFormat {
42    fn default() -> LabelFormat {
43        Self::Png
44    }
45}
46/// The label stock size specification in length and height. Enum of 4x6 only for now.
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum LabelStockSize {
49    #[serde(rename = "4x6")]
50    Variant4x6,
51}
52
53impl Default for LabelStockSize {
54    fn default() -> LabelStockSize {
55        Self::Variant4x6
56    }
57}
58