late 0.0.1055

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). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
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).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.104.0
 * 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 GetAccountHealth200Response {
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<String>,
    /// TikTok only. The TikTok integration the account is connected through: business (TikTok for Business, Accounts API) or developer (the original integration). Absent on other platforms.
    #[serde(rename = "integrationLane", skip_serializing_if = "Option::is_none")]
    pub integration_lane: Option<IntegrationLane>,
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    /// Overall health status
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "tokenStatus", skip_serializing_if = "Option::is_none")]
    pub token_status: Option<Box<models::GetAccountHealth200ResponseTokenStatus>>,
    #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
    pub permissions: Option<Box<models::GetAccountHealth200ResponsePermissions>>,
    /// List of issues found
    #[serde(rename = "issues", skip_serializing_if = "Option::is_none")]
    pub issues: Option<Vec<String>>,
    /// Actionable recommendations to fix issues
    #[serde(rename = "recommendations", skip_serializing_if = "Option::is_none")]
    pub recommendations: Option<Vec<String>>,
    #[serde(
        rename = "messagingRestriction",
        skip_serializing_if = "Option::is_none"
    )]
    pub messaging_restriction:
        Option<Box<models::GetAllAccountsHealth200ResponseAccountsInnerMessagingRestriction>>,
    #[serde(rename = "platformConnection", skip_serializing_if = "Option::is_none")]
    pub platform_connection: Option<Box<models::GetAccountHealth200ResponsePlatformConnection>>,
}

impl GetAccountHealth200Response {
    pub fn new() -> GetAccountHealth200Response {
        GetAccountHealth200Response {
            account_id: None,
            platform: None,
            integration_lane: None,
            username: None,
            display_name: None,
            status: None,
            token_status: None,
            permissions: None,
            issues: None,
            recommendations: None,
            messaging_restriction: None,
            platform_connection: None,
        }
    }
}
/// TikTok only. The TikTok integration the account is connected through: business (TikTok for Business, Accounts API) or developer (the original integration). Absent on other platforms.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum IntegrationLane {
    #[serde(rename = "business")]
    Business,
    #[serde(rename = "developer")]
    Developer,
}

impl Default for IntegrationLane {
    fn default() -> IntegrationLane {
        Self::Business
    }
}
/// Overall health status
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "healthy")]
    Healthy,
    #[serde(rename = "warning")]
    Warning,
    #[serde(rename = "error")]
    Error,
}

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