/*
 * 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 ListSequenceEnrollments200ResponseEnrollmentsInner {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "contactId", skip_serializing_if = "Option::is_none")]
    pub contact_id: Option<String>,
    #[serde(rename = "channelId", skip_serializing_if = "Option::is_none")]
    pub channel_id: Option<String>,
    #[serde(rename = "platformIdentifier", skip_serializing_if = "Option::is_none")]
    pub platform_identifier: Option<String>,
    #[serde(rename = "contactName", skip_serializing_if = "Option::is_none")]
    pub contact_name: Option<String>,
    #[serde(rename = "currentStepIndex", skip_serializing_if = "Option::is_none")]
    pub current_step_index: Option<i32>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "exitReason", skip_serializing_if = "Option::is_none")]
    pub exit_reason: Option<String>,
    #[serde(rename = "nextStepAt", skip_serializing_if = "Option::is_none")]
    pub next_step_at: Option<String>,
    #[serde(rename = "stepsSent", skip_serializing_if = "Option::is_none")]
    pub steps_sent: Option<i32>,
    #[serde(rename = "lastStepSentAt", skip_serializing_if = "Option::is_none")]
    pub last_step_sent_at: Option<String>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
}

impl ListSequenceEnrollments200ResponseEnrollmentsInner {
    pub fn new() -> ListSequenceEnrollments200ResponseEnrollmentsInner {
        ListSequenceEnrollments200ResponseEnrollmentsInner {
            id: None,
            contact_id: None,
            channel_id: None,
            platform_identifier: None,
            contact_name: None,
            current_step_index: None,
            status: None,
            exit_reason: None,
            next_step_at: None,
            steps_sent: None,
            last_step_sent_at: None,
            created_at: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "completed")]
    Completed,
    #[serde(rename = "exited")]
    Exited,
    #[serde(rename = "paused")]
    Paused,
}

impl Default for Status {
    fn default() -> Status {
        Self::Active
    }
}
