late 0.0.297

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * 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};

/// WebhookPayloadAccountAdsInitialSyncCompleted : Webhook payload for `account.ads.initial_sync_completed` events. Fired once per ads-enabled account when the initial discovery + 90-day ad backfill finishes (whether it succeeded fully, partially, or failed).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadAccountAdsInitialSyncCompleted {
    /// Stable webhook event ID
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "event")]
    pub event: Event,
    #[serde(rename = "account")]
    pub account: Box<models::WebhookPayloadAccountAdsInitialSyncCompletedAccount>,
    #[serde(rename = "sync")]
    pub sync: Box<models::WebhookPayloadAccountAdsInitialSyncCompletedSync>,
    #[serde(rename = "timestamp")]
    pub timestamp: String,
}

impl WebhookPayloadAccountAdsInitialSyncCompleted {
    /// Webhook payload for `account.ads.initial_sync_completed` events. Fired once per ads-enabled account when the initial discovery + 90-day ad backfill finishes (whether it succeeded fully, partially, or failed).
    pub fn new(
        id: String,
        event: Event,
        account: models::WebhookPayloadAccountAdsInitialSyncCompletedAccount,
        sync: models::WebhookPayloadAccountAdsInitialSyncCompletedSync,
        timestamp: String,
    ) -> WebhookPayloadAccountAdsInitialSyncCompleted {
        WebhookPayloadAccountAdsInitialSyncCompleted {
            id,
            event,
            account: Box::new(account),
            sync: Box::new(sync),
            timestamp,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Event {
    #[serde(rename = "account.ads.initial_sync_completed")]
    AccountAdsInitialSyncCompleted,
}

impl Default for Event {
    fn default() -> Event {
        Self::AccountAdsInitialSyncCompleted
    }
}