Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
The projection these were generated from predated the compute migration, so
they described /v1/visor — which the API serves at zero paths now.

No /v1/visor path survives here.
2026-09-05 18:55:38 -07:00

61 lines
3.0 KiB
Swift

//
// AudiencePreview.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct AudiencePreview: Sendable, Codable, ParameterConvertible, Hashable {
/** 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. */
public var available: Bool?
/** Count is the cohort size: distinct warehouse identifiers for an event audience, mailable customers for an event-less (whole-org) one. */
public var count: Int64?
/** Deliverable is how many de-duplicated mailboxes a send would reach. Two customers sharing an address count once, so it is <= Count. */
public var deliverable: Int64?
/** 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. */
public var reason: String?
/** Sample is up to 1000 cohort IDENTIFIERS — never addresses, which product analytics does not hold. Empty for an event-less (whole-org) audience. */
public var sample: [String]?
/** Source names where the cohort was read: the events table for an event audience, \"iam:<org>\" for the whole-org one. */
public var source: 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. */
public var unmatched: Int64?
public init(available: Bool? = nil, count: Int64? = nil, deliverable: Int64? = nil, reason: String? = nil, sample: [String]? = nil, source: String? = nil, unmatched: Int64? = nil) {
self.available = available
self.count = count
self.deliverable = deliverable
self.reason = reason
self.sample = sample
self.source = source
self.unmatched = unmatched
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case available
case count
case deliverable
case reason
case sample
case source
case unmatched
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(available, forKey: .available)
try container.encodeIfPresent(count, forKey: .count)
try container.encodeIfPresent(deliverable, forKey: .deliverable)
try container.encodeIfPresent(reason, forKey: .reason)
try container.encodeIfPresent(sample, forKey: .sample)
try container.encodeIfPresent(source, forKey: .source)
try container.encodeIfPresent(unmatched, forKey: .unmatched)
}
}