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

56 lines
2.2 KiB
Swift

//
// CampaignWrite.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct CampaignWrite: Sendable, Codable, ParameterConvertible, Hashable {
/** Audience is the segment or audience selector this campaign targets. */
public var audience: String?
/** Budget is the campaign's total budget in CENTS. Negative reads as 0. */
public var budget: Int64?
/** Channels are the fan-out targets, at most one per kind (paid, organic, email) and at most 12. A channel's status and provider id are server-owned: whatever the caller sends for them is replaced with \"pending\". */
public var channels: [ChannelSpec]?
/** Content is the ordered creative set. Content[0] is the active creative and the rest are A/B variants; at most 32, empty entries dropped. */
public var content: [String]?
/** Name is the campaign's display name. Required; trimmed and capped at 2048 characters. */
public var name: String?
/** ScheduleAt is when the campaign should run, in unix seconds. Negative reads as 0 (immediately). */
public var scheduleAt: Int64?
public init(audience: String? = nil, budget: Int64? = nil, channels: [ChannelSpec]? = nil, content: [String]? = nil, name: String? = nil, scheduleAt: Int64? = nil) {
self.audience = audience
self.budget = budget
self.channels = channels
self.content = content
self.name = name
self.scheduleAt = scheduleAt
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case audience
case budget
case channels
case content
case name
case scheduleAt
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(audience, forKey: .audience)
try container.encodeIfPresent(budget, forKey: .budget)
try container.encodeIfPresent(channels, forKey: .channels)
try container.encodeIfPresent(content, forKey: .content)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(scheduleAt, forKey: .scheduleAt)
}
}