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

59 lines
2.3 KiB
Swift

//
// Audience.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Audience: Sendable, Codable, ParameterConvertible, Hashable {
/** CreatedAt is unix seconds when the filter was saved, server-assigned. */
public var createdAt: Int64?
/** Event is the analytics event a member must have fired. EMPTY MEANS NO FILTER: the audience is then every mailable customer in the org, and no warehouse is consulted. */
public var event: String?
/** ID is the server-assigned audience id (\"aud_\" + 128 random bits). */
public var id: String?
/** Name is the audience's label. Required, trimmed, capped at 1024 bytes. */
public var name: String?
/** UpdatedAt is unix seconds of the last write, server-assigned, and the key the audience list is ordered by (newest first). A saved audience has no update route, so in practice it stays equal to CreatedAt: to change a filter you save another one. */
public var updatedAt: Int64?
/** WindowDays is how far back the event counts, ending now. 0 means 30 and nothing above 3650 is honoured. Ignored when Event is empty. */
public var windowDays: Int64?
public init(createdAt: Int64? = nil, event: String? = nil, id: String? = nil, name: String? = nil, updatedAt: Int64? = nil, windowDays: Int64? = nil) {
self.createdAt = createdAt
self.event = event
self.id = id
self.name = name
self.updatedAt = updatedAt
self.windowDays = windowDays
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case createdAt
case event
case id
case name
case updatedAt
case windowDays
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(createdAt, forKey: .createdAt)
try container.encodeIfPresent(event, forKey: .event)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
try container.encodeIfPresent(windowDays, forKey: .windowDays)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension Audience: Identifiable {}