late 0.0.1018

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
 *
 * The version of the OpenAPI document: 1.62.0
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// CtwaAdRequestBodyWelcomeMessage : Custom chat welcome message (Meta's `page_welcome_message`, \"Mensaje de bienvenida\" / \"Mensaje predefinido\" in Ads Manager). Single-creative shape only; for `creatives[]` set it per entry.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CtwaAdRequestBodyWelcomeMessage {
    /// Greeting shown when the chat opens. Replaces Meta's default (\"Hi! Can we help you?\").
    #[serde(rename = "text")]
    pub text: String,
    /// Message put into the user's text input, ready to send. Replaces Meta's default (\"Hi! I want more info.\"). Lets one ad steer the opening message toward what it promotes (e.g. a specific product). Exactly one of prefillText or quickReplies.
    #[serde(rename = "prefillText", skip_serializing_if = "Option::is_none")]
    pub prefill_text: Option<String>,
    /// Tappable chips under the greeting instead of a prefilled message. Exactly one of prefillText or quickReplies. Put your own campaign or ad key in each payload: the tap arrives on the messages webhook with that payload even where Meta delivers no ad referral (Pages owned by an EU business under the Europe/Japan Messenger restrictions).
    #[serde(rename = "quickReplies", skip_serializing_if = "Option::is_none")]
    pub quick_replies: Option<Vec<models::CtwaAdRequestBodyWelcomeMessageQuickRepliesInner>>,
}

impl CtwaAdRequestBodyWelcomeMessage {
    /// Custom chat welcome message (Meta's `page_welcome_message`, \"Mensaje de bienvenida\" / \"Mensaje predefinido\" in Ads Manager). Single-creative shape only; for `creatives[]` set it per entry.
    pub fn new(text: String) -> CtwaAdRequestBodyWelcomeMessage {
        CtwaAdRequestBodyWelcomeMessage {
            text,
            prefill_text: None,
            quick_replies: None,
        }
    }
}