/*
 * API Documentation
 *
 * Source of truth and network automation platform
 *
 * The version of the OpenAPI document: 3.1.0 (3.1)
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CustomFieldType {
    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
    pub value: Option<Value>,
    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
    pub label: Option<Label>,
}

impl CustomFieldType {
    pub fn new() -> CustomFieldType {
        CustomFieldType {
            value: None,
            label: None,
        }
    }
}

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Value {
    #[serde(rename = "text")]
    Text,
    #[serde(rename = "integer")]
    Integer,
    #[serde(rename = "boolean")]
    Boolean,
    #[serde(rename = "date")]
    Date,
    #[serde(rename = "datetime")]
    Datetime,
    #[serde(rename = "url")]
    Url,
    #[serde(rename = "select")]
    Select,
    #[serde(rename = "multi-select")]
    MultiSelect,
    #[serde(rename = "json")]
    Json,
    #[serde(rename = "markdown")]
    Markdown,
}

impl Default for Value {
    fn default() -> Value {
        Self::Text
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Label {
    #[serde(rename = "Text")]
    Text,
    #[serde(rename = "Integer")]
    Integer,
    #[serde(rename = "Boolean (true/false)")]
    BooleanLeftParenthesisTrueSlashFalseRightParenthesis,
    #[serde(rename = "Date")]
    Date,
    #[serde(rename = "Date/time")]
    DateSlashTime,
    #[serde(rename = "URL")]
    Url,
    #[serde(rename = "Selection")]
    Selection,
    #[serde(rename = "Multiple selection")]
    MultipleSelection,
    #[serde(rename = "JSON")]
    Json,
    #[serde(rename = "Markdown")]
    Markdown,
}

impl Default for Label {
    fn default() -> Label {
        Self::Text
    }
}
