/*
 * 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};

/// SendInboxMessageRequestInteractiveActionOneOf7 : Catalog-message action. `type` on the parent must be `catalog_message`. May be omitted entirely; it is defaulted to `{ \"name\": \"catalog_message\" }`. Requires a Meta catalog connected to the WhatsApp Business Account in Commerce Manager.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SendInboxMessageRequestInteractiveActionOneOf7 {
    #[serde(rename = "name")]
    pub name: Name,
    #[serde(rename = "parameters", skip_serializing_if = "Option::is_none")]
    pub parameters: Option<Box<models::SendInboxMessageRequestInteractiveActionOneOf7Parameters>>,
}

impl SendInboxMessageRequestInteractiveActionOneOf7 {
    /// Catalog-message action. `type` on the parent must be `catalog_message`. May be omitted entirely; it is defaulted to `{ \"name\": \"catalog_message\" }`. Requires a Meta catalog connected to the WhatsApp Business Account in Commerce Manager.
    pub fn new(name: Name) -> SendInboxMessageRequestInteractiveActionOneOf7 {
        SendInboxMessageRequestInteractiveActionOneOf7 {
            name,
            parameters: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Name {
    #[serde(rename = "catalog_message")]
    CatalogMessage,
}

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