use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DangerousGoodsDetails {
#[serde(rename = "unitedNationsRegulatoryId", skip_serializing_if = "Option::is_none")]
pub united_nations_regulatory_id: Option<String>,
#[serde(rename = "transportationRegulatoryClass", skip_serializing_if = "Option::is_none")]
pub transportation_regulatory_class: Option<String>,
#[serde(rename = "packingGroup", skip_serializing_if = "Option::is_none")]
pub packing_group: Option<PackingGroup>,
#[serde(rename = "packingInstruction", skip_serializing_if = "Option::is_none")]
pub packing_instruction: Option<PackingInstruction>,
}
impl DangerousGoodsDetails {
pub fn new() -> DangerousGoodsDetails {
DangerousGoodsDetails {
united_nations_regulatory_id: None,
transportation_regulatory_class: None,
packing_group: None,
packing_instruction: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PackingGroup {
#[serde(rename = "I")]
I,
#[serde(rename = "II")]
Ii,
#[serde(rename = "III")]
Iii,
}
impl Default for PackingGroup {
fn default() -> PackingGroup {
Self::I
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PackingInstruction {
#[serde(rename = "PI965_SECTION_IA")]
Pi965SectionIa,
#[serde(rename = "PI965_SECTION_IB")]
Pi965SectionIb,
#[serde(rename = "PI965_SECTION_II")]
Pi965SectionIi,
#[serde(rename = "PI966_SECTION_I")]
Pi966SectionI,
#[serde(rename = "PI966_SECTION_II")]
Pi966SectionIi,
#[serde(rename = "PI967_SECTION_I")]
Pi967SectionI,
#[serde(rename = "PI967_SECTION_II")]
Pi967SectionIi,
#[serde(rename = "PI968_SECTION_IA")]
Pi968SectionIa,
#[serde(rename = "PI968_SECTION_IB")]
Pi968SectionIb,
#[serde(rename = "PI969_SECTION_I")]
Pi969SectionI,
#[serde(rename = "PI969_SECTION_II")]
Pi969SectionIi,
#[serde(rename = "PI970_SECTION_I")]
Pi970SectionI,
#[serde(rename = "PI970_SECTION_II")]
Pi970SectionIi,
}
impl Default for PackingInstruction {
fn default() -> PackingInstruction {
Self::Pi965SectionIa
}
}