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

/// SendInboxMessageRequestInteractiveActionOneOf1 : CTA URL action. `type` on the parent must be `cta_url`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SendInboxMessageRequestInteractiveActionOneOf1 {
    #[serde(rename = "name")]
    pub name: Name,
    #[serde(rename = "parameters")]
    pub parameters: Box<models::SendInboxMessageRequestInteractiveActionOneOf1Parameters>,
}

impl SendInboxMessageRequestInteractiveActionOneOf1 {
    /// CTA URL action. `type` on the parent must be `cta_url`.
    pub fn new(
        name: Name,
        parameters: models::SendInboxMessageRequestInteractiveActionOneOf1Parameters,
    ) -> SendInboxMessageRequestInteractiveActionOneOf1 {
        SendInboxMessageRequestInteractiveActionOneOf1 {
            name,
            parameters: Box::new(parameters),
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Name {
    #[serde(rename = "cta_url")]
    CtaUrl,
}

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