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
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AudiencePreview {
/// Available is false when the roster or the warehouse could not be read; the counts are then zero because nothing was measured, not because the cohort is empty, and Reason says which read failed.
#[serde(rename = "available", skip_serializing_if = "Option::is_none")]
pub available: Option<bool>,
/// Count is the cohort size: distinct warehouse identifiers for an event audience, mailable customers for an event-less (whole-org) one.
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
pub count: Option<i32>,
/// Deliverable is how many de-duplicated mailboxes a send would reach. Two customers sharing an address count once, so it is <= Count.
#[serde(rename = "deliverable", skip_serializing_if = "Option::is_none")]
pub deliverable: Option<i32>,
/// Reason is the error text of the read that failed: the org's roster could not be loaded (\"identity store unavailable…\"), or the cohort query had no warehouse to run against (\"analytics warehouse not configured\"). Absent when the evaluation succeeded, so its presence and Available=false are one fact seen twice.
#[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
/// Sample is up to 1000 cohort IDENTIFIERS — never addresses, which product analytics does not hold. Empty for an event-less (whole-org) audience.
#[serde(rename = "sample", skip_serializing_if = "Option::is_none")]
pub sample: Option<Vec<String>>,
/// Source names where the cohort was read: the events table for an event audience, \"iam:<org>\" for the whole-org one.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
/// Unmatched is how many cohort identifiers named nobody on the org's roster and so have no address to mail. It is reported rather than hidden: it is the honest explanation for a cohort of 500 that mails 3. Always 0 for an event-less (whole-org) audience, which starts from the roster and has nothing to match.
#[serde(rename = "unmatched", skip_serializing_if = "Option::is_none")]
pub unmatched: Option<i32>,
}
impl AudiencePreview {
pub fn new() -> AudiencePreview {
AudiencePreview {
available: None,
count: None,
deliverable: None,
reason: None,
sample: None,
source: None,
unmatched: None,
}
}
}