/*
 * 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.1
 * 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 GetAllAccountsHealth200ResponseAccountsInner {
    #[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>,
    #[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>,
    #[serde(rename = "profileId", skip_serializing_if = "Option::is_none")]
    pub profile_id: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "canPost", skip_serializing_if = "Option::is_none")]
    pub can_post: Option<bool>,
    #[serde(rename = "canFetchAnalytics", skip_serializing_if = "Option::is_none")]
    pub can_fetch_analytics: Option<bool>,
    #[serde(rename = "tokenValid", skip_serializing_if = "Option::is_none")]
    pub token_valid: Option<bool>,
    #[serde(rename = "tokenExpiresAt", skip_serializing_if = "Option::is_none")]
    pub token_expires_at: Option<String>,
    #[serde(rename = "needsReconnect", skip_serializing_if = "Option::is_none")]
    pub needs_reconnect: Option<bool>,
    #[serde(rename = "issues", skip_serializing_if = "Option::is_none")]
    pub issues: Option<Vec<String>>,
}

impl GetAllAccountsHealth200ResponseAccountsInner {
    pub fn new() -> GetAllAccountsHealth200ResponseAccountsInner {
        GetAllAccountsHealth200ResponseAccountsInner {
            account_id: None,
            platform: None,
            username: None,
            display_name: None,
            profile_id: None,
            status: None,
            can_post: None,
            can_fetch_analytics: None,
            token_valid: None,
            token_expires_at: None,
            needs_reconnect: None,
            issues: None,
        }
    }
}
///
#[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
    }
}
