/*
 * Late API
 *
 * API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
 *
 * The version of the OpenAPI document: 1.0.1
 * Contact: support@getlate.dev
 * 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>,
    #[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>>,
}

impl GetAccountHealth200Response {
    pub fn new() -> GetAccountHealth200Response {
        GetAccountHealth200Response {
            account_id: None,
            platform: None,
            username: None,
            display_name: None,
            status: None,
            token_status: None,
            permissions: None,
            issues: None,
            recommendations: None,
        }
    }
}
/// 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
    }
}
