/*
 * 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 UpdateWhatsAppFlowRequest {
    /// WhatsApp social account ID
    #[serde(rename = "accountId")]
    pub account_id: String,
    /// New flow name
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "categories", skip_serializing_if = "Option::is_none")]
    pub categories: Option<Vec<Categories>>,
}

impl UpdateWhatsAppFlowRequest {
    pub fn new(account_id: String) -> UpdateWhatsAppFlowRequest {
        UpdateWhatsAppFlowRequest {
            account_id,
            name: None,
            categories: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Categories {
    #[serde(rename = "SIGN_UP")]
    SignUp,
    #[serde(rename = "SIGN_IN")]
    SignIn,
    #[serde(rename = "APPOINTMENT_BOOKING")]
    AppointmentBooking,
    #[serde(rename = "LEAD_GENERATION")]
    LeadGeneration,
    #[serde(rename = "CONTACT_US")]
    ContactUs,
    #[serde(rename = "CUSTOMER_SUPPORT")]
    CustomerSupport,
    #[serde(rename = "SURVEY")]
    Survey,
    #[serde(rename = "OTHER")]
    Other,
}

impl Default for Categories {
    fn default() -> Categories {
        Self::SignUp
    }
}
