late 0.0.1349

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.529.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// GetAd200ResponseDarkPost : Only when `{adId}` is a Facebook ad dark post with no resolvable ad (then `ad` is null).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetAd200ResponseDarkPost {
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<Platform>,
    /// The dark post id, `{pageId}_{postId}`.
    #[serde(rename = "platformPostId", skip_serializing_if = "Option::is_none")]
    pub platform_post_id: Option<String>,
    #[serde(rename = "pageId", skip_serializing_if = "Option::is_none")]
    pub page_id: Option<String>,
    /// Always true.
    #[serde(rename = "isDarkPost", skip_serializing_if = "Option::is_none")]
    pub is_dark_post: Option<bool>,
    /// Always null: Meta exposes no link from a placement dark post to its ad.
    #[serde(
        rename = "adId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub ad_id: Option<Option<String>>,
    /// Zernio Meta Ads account id for the Page, null when none is connected.
    #[serde(
        rename = "accountId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub account_id: Option<Option<String>>,
    /// Zernio Facebook account id of the Page.
    #[serde(rename = "facebookAccountId", skip_serializing_if = "Option::is_none")]
    pub facebook_account_id: Option<String>,
    /// Meta ad accounts (`act_...`) with synced ads on this Page.
    #[serde(
        rename = "platformAdAccountIds",
        skip_serializing_if = "Option::is_none"
    )]
    pub platform_ad_account_ids: Option<Vec<String>>,
    #[serde(rename = "firstSeenAt", skip_serializing_if = "Option::is_none")]
    pub first_seen_at: Option<String>,
    #[serde(rename = "lastActivityAt", skip_serializing_if = "Option::is_none")]
    pub last_activity_at: Option<String>,
}

impl GetAd200ResponseDarkPost {
    /// Only when `{adId}` is a Facebook ad dark post with no resolvable ad (then `ad` is null).
    pub fn new() -> GetAd200ResponseDarkPost {
        GetAd200ResponseDarkPost {
            platform: None,
            platform_post_id: None,
            page_id: None,
            is_dark_post: None,
            ad_id: None,
            account_id: None,
            facebook_account_id: None,
            platform_ad_account_ids: None,
            first_seen_at: None,
            last_activity_at: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
    #[serde(rename = "facebook")]
    Facebook,
}

impl Default for Platform {
    fn default() -> Platform {
        Self::Facebook
    }
}