/*
 * 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 CreateSequenceRequest {
    #[serde(rename = "profileId")]
    pub profile_id: String,
    #[serde(rename = "accountId")]
    pub account_id: String,
    #[serde(rename = "platform")]
    pub platform: Platform,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "steps", skip_serializing_if = "Option::is_none")]
    pub steps: Option<Vec<models::CreateSequenceRequestStepsInner>>,
    #[serde(rename = "exitOnReply", skip_serializing_if = "Option::is_none")]
    pub exit_on_reply: Option<bool>,
    #[serde(rename = "exitOnUnsubscribe", skip_serializing_if = "Option::is_none")]
    pub exit_on_unsubscribe: Option<bool>,
}

impl CreateSequenceRequest {
    pub fn new(
        profile_id: String,
        account_id: String,
        platform: Platform,
        name: String,
    ) -> CreateSequenceRequest {
        CreateSequenceRequest {
            profile_id,
            account_id,
            platform,
            name,
            description: None,
            steps: None,
            exit_on_reply: None,
            exit_on_unsubscribe: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
    #[serde(rename = "instagram")]
    Instagram,
    #[serde(rename = "facebook")]
    Facebook,
    #[serde(rename = "telegram")]
    Telegram,
    #[serde(rename = "twitter")]
    Twitter,
    #[serde(rename = "bluesky")]
    Bluesky,
    #[serde(rename = "reddit")]
    Reddit,
    #[serde(rename = "whatsapp")]
    Whatsapp,
}

impl Default for Platform {
    fn default() -> Platform {
        Self::Instagram
    }
}
