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 #[serde(rename = "null")]
39 Null,
40}
41
42impl Default for Value {
43 fn default() -> Value {
44 Self::Iata
45 }
46}
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
49pub enum Label {
50 #[serde(rename = "IATA (Airport codes)")]
51 IataLeftParenthesisAirportCodesRightParenthesis,
52 #[serde(rename = "ISO 3166 (Country codes)")]
53 Iso3166LeftParenthesisCountryCodesRightParenthesis,
54 #[serde(rename = "UN/LOCODE (Location codes)")]
55 UnSlashLocodeLeftParenthesisLocationCodesRightParenthesis,
56}
57
58impl Default for Label {
59 fn default() -> Label {
60 Self::IataLeftParenthesisAirportCodesRightParenthesis
61 }
62}