1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* 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};
/// Duration : Duration after manufacturing date during which the product is valid for consumption.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Duration {
/// Unit for duration.
#[serde(rename = "durationUnit")]
pub duration_unit: DurationUnit,
/// Value for the duration in terms of the durationUnit.
#[serde(rename = "durationValue")]
pub duration_value: i32,
}
impl Duration {
/// Duration after manufacturing date during which the product is valid for consumption.
pub fn new(duration_unit: DurationUnit, duration_value: i32) -> Duration {
Duration {
duration_unit,
duration_value,
}
}
}
/// Unit for duration.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DurationUnit {
#[serde(rename = "Days")]
Days,
#[serde(rename = "Months")]
Months,
}
impl Default for DurationUnit {
fn default() -> DurationUnit {
Self::Days
}
}