/*
 * 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 UpdateWhatsAppGroupChatRequest {
    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
    pub subject: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "joinApprovalMode", skip_serializing_if = "Option::is_none")]
    pub join_approval_mode: Option<JoinApprovalMode>,
}

impl UpdateWhatsAppGroupChatRequest {
    pub fn new() -> UpdateWhatsAppGroupChatRequest {
        UpdateWhatsAppGroupChatRequest {
            subject: None,
            description: None,
            join_approval_mode: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum JoinApprovalMode {
    #[serde(rename = "approval_required")]
    ApprovalRequired,
    #[serde(rename = "auto_approve")]
    AutoApprove,
}

impl Default for JoinApprovalMode {
    fn default() -> JoinApprovalMode {
        Self::ApprovalRequired
    }
}
