/*
 * 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 GetLinkedInPostAnalytics200Response {
    #[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 = "accountType", skip_serializing_if = "Option::is_none")]
    pub account_type: Option<AccountType>,
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
    #[serde(rename = "postUrn", skip_serializing_if = "Option::is_none")]
    pub post_urn: Option<String>,
    #[serde(rename = "analytics", skip_serializing_if = "Option::is_none")]
    pub analytics: Option<Box<models::GetLinkedInPostAnalytics200ResponseAnalytics>>,
    #[serde(rename = "lastUpdated", skip_serializing_if = "Option::is_none")]
    pub last_updated: Option<String>,
}

impl GetLinkedInPostAnalytics200Response {
    pub fn new() -> GetLinkedInPostAnalytics200Response {
        GetLinkedInPostAnalytics200Response {
            account_id: None,
            platform: None,
            account_type: None,
            username: None,
            post_urn: None,
            analytics: None,
            last_updated: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AccountType {
    #[serde(rename = "personal")]
    Personal,
    #[serde(rename = "organization")]
    Organization,
}

impl Default for AccountType {
    fn default() -> AccountType {
        Self::Personal
    }
}
