netbox_openapi/models/
custom_field_choice_set_base_choices.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct CustomFieldChoiceSetBaseChoices {
13 #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
15 pub value: Option<Value>,
16 #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
17 pub label: Option<Label>,
18}
19
20impl CustomFieldChoiceSetBaseChoices {
21 pub fn new() -> CustomFieldChoiceSetBaseChoices {
22 CustomFieldChoiceSetBaseChoices {
23 value: None,
24 label: None,
25 }
26 }
27}
28
29#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Value {
32 #[serde(rename = "IATA")]
33 Iata,
34 #[serde(rename = "ISO_3166")]
35 Iso3166,
36 #[serde(rename = "UN_LOCODE")]
37 UnLocode,
38}
39
40impl Default for Value {
41 fn default() -> Value {
42 Self::Iata
43 }
44}
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum Label {
48 #[serde(rename = "IATA (Airport codes)")]
49 IataLeftParenthesisAirportCodesRightParenthesis,
50 #[serde(rename = "ISO 3166 (Country codes)")]
51 Iso3166LeftParenthesisCountryCodesRightParenthesis,
52 #[serde(rename = "UN/LOCODE (Location codes)")]
53 UnSlashLocodeLeftParenthesisLocationCodesRightParenthesis,
54}
55
56impl Default for Label {
57 fn default() -> Label {
58 Self::IataLeftParenthesisAirportCodesRightParenthesis
59 }
60}