/*
 * 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 ListWhatsAppFlows200ResponseFlowsInner {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "categories", skip_serializing_if = "Option::is_none")]
    pub categories: Option<Vec<String>>,
    #[serde(rename = "validation_errors", skip_serializing_if = "Option::is_none")]
    pub validation_errors: Option<Vec<serde_json::Value>>,
    /// 1-based version within the flow's clone lineage (Zernio-tracked; Meta has no native versioning). Standalone flows are version 1.
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<i32>,
    /// Stable group key for the flow's version lineage (the root flow's ID).
    #[serde(rename = "lineageId", skip_serializing_if = "Option::is_none")]
    pub lineage_id: Option<String>,
}

impl ListWhatsAppFlows200ResponseFlowsInner {
    pub fn new() -> ListWhatsAppFlows200ResponseFlowsInner {
        ListWhatsAppFlows200ResponseFlowsInner {
            id: None,
            name: None,
            status: None,
            categories: None,
            validation_errors: None,
            version: None,
            lineage_id: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "DRAFT")]
    Draft,
    #[serde(rename = "PUBLISHED")]
    Published,
    #[serde(rename = "DEPRECATED")]
    Deprecated,
    #[serde(rename = "BLOCKED")]
    Blocked,
    #[serde(rename = "THROTTLED")]
    Throttled,
}

impl Default for Status {
    fn default() -> Status {
        Self::Draft
    }
}
