1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* 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};
/// WebhookPayloadAccountAdsInitialSyncCompletedSync : Summary of the initial ads sync backfill results.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadAccountAdsInitialSyncCompletedSync {
/// Overall outcome of the initial sync.
#[serde(rename = "status")]
pub status: Status,
/// Total number of ads discovered for backfill.
#[serde(rename = "totalAds")]
pub total_ads: i32,
/// Number of ads successfully synced.
#[serde(rename = "synced")]
pub synced: i32,
/// Number of ads that failed to sync.
#[serde(rename = "failed")]
pub failed: i32,
}
impl WebhookPayloadAccountAdsInitialSyncCompletedSync {
/// Summary of the initial ads sync backfill results.
pub fn new(
status: Status,
total_ads: i32,
synced: i32,
failed: i32,
) -> WebhookPayloadAccountAdsInitialSyncCompletedSync {
WebhookPayloadAccountAdsInitialSyncCompletedSync {
status,
total_ads,
synced,
failed,
}
}
}
/// Overall outcome of the initial sync.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "success")]
Success,
#[serde(rename = "failure")]
Failure,
}
impl Default for Status {
fn default() -> Status {
Self::Success
}
}