late 0.0.915

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.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 GetWhatsAppFlowsEncryptionKey200Response {
    /// The registered RSA public key in PEM format, or null when none is registered.
    #[serde(
        rename = "publicKey",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub public_key: Option<Option<String>>,
    /// VALID (key matches Meta's records) or MISMATCH (no key registered, or the key does not match); null when unknown.
    #[serde(
        rename = "signatureStatus",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub signature_status: Option<Option<SignatureStatus>>,
    /// Whether a key is currently registered. Derived from publicKey, not signatureStatus.
    #[serde(rename = "registered", skip_serializing_if = "Option::is_none")]
    pub registered: Option<bool>,
}

impl GetWhatsAppFlowsEncryptionKey200Response {
    pub fn new() -> GetWhatsAppFlowsEncryptionKey200Response {
        GetWhatsAppFlowsEncryptionKey200Response {
            public_key: None,
            signature_status: None,
            registered: None,
        }
    }
}
/// VALID (key matches Meta's records) or MISMATCH (no key registered, or the key does not match); null when unknown.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SignatureStatus {
    #[serde(rename = "VALID")]
    Valid,
    #[serde(rename = "MISMATCH")]
    Mismatch,
}

impl Default for SignatureStatus {
    fn default() -> SignatureStatus {
        Self::Valid
    }
}