/*
 * 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 ListWhatsAppFlowResponses200ResponseResponsesInner {
    /// Message ID
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "receivedAt", skip_serializing_if = "Option::is_none")]
    pub received_at: Option<String>,
    /// Sender wa_id / phone
    #[serde(
        rename = "from",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub from: Option<Option<String>>,
    #[serde(
        rename = "senderName",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub sender_name: Option<Option<String>>,
    #[serde(
        rename = "conversationId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub conversation_id: Option<Option<String>>,
    #[serde(
        rename = "flowToken",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub flow_token: Option<Option<String>>,
    /// Submitted field values (flow_token removed)
    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    /// Raw response_json string
    #[serde(
        rename = "raw",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub raw: Option<Option<String>>,
}

impl ListWhatsAppFlowResponses200ResponseResponsesInner {
    pub fn new() -> ListWhatsAppFlowResponses200ResponseResponsesInner {
        ListWhatsAppFlowResponses200ResponseResponsesInner {
            id: None,
            received_at: None,
            from: None,
            sender_name: None,
            conversation_id: None,
            flow_token: None,
            data: None,
            raw: None,
        }
    }
}
