/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateSequenceRequestStepsInnerTemplateVariableMappingValue {
    #[serde(rename = "field", skip_serializing_if = "Option::is_none")]
    pub field: Option<Field>,
    /// Static value when field is \"custom\"
    #[serde(rename = "customValue", skip_serializing_if = "Option::is_none")]
    pub custom_value: Option<String>,
}

impl CreateSequenceRequestStepsInnerTemplateVariableMappingValue {
    pub fn new() -> CreateSequenceRequestStepsInnerTemplateVariableMappingValue {
        CreateSequenceRequestStepsInnerTemplateVariableMappingValue {
            field: None,
            custom_value: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Field {
    #[serde(rename = "name")]
    Name,
    #[serde(rename = "phone")]
    Phone,
    #[serde(rename = "email")]
    Email,
    #[serde(rename = "company")]
    Company,
    #[serde(rename = "custom")]
    Custom,
}

impl Default for Field {
    fn default() -> Field {
        Self::Name
    }
}
