use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerIdentification {
#[serde(rename = "containerIdentificationType")]
pub container_identification_type: ContainerIdentificationType,
#[serde(rename = "containerIdentificationNumber")]
pub container_identification_number: String,
}
impl ContainerIdentification {
pub fn new(container_identification_type: ContainerIdentificationType, container_identification_number: String) -> ContainerIdentification {
ContainerIdentification {
container_identification_type,
container_identification_number,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ContainerIdentificationType {
#[serde(rename = "SSCC")]
Sscc,
#[serde(rename = "AMZNCC")]
Amzncc,
#[serde(rename = "GTIN")]
Gtin,
#[serde(rename = "BPS")]
Bps,
#[serde(rename = "CID")]
Cid,
}
impl Default for ContainerIdentificationType {
fn default() -> ContainerIdentificationType {
Self::Sscc
}
}