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
2.3 KiB
Swift

//
// CampaignInput.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct CampaignInput: Sendable, Codable, ParameterConvertible, Hashable {
/** Account is the provider ad-account this campaign runs on (Meta act_<id>). Optional. */
public var account: String?
/** Budget is the campaign budget in MINOR units (cents). Negative values clamp to 0. */
public var budget: Int64?
/** Name is the campaign's display label. Required; trimmed and bounded to 1024 bytes. */
public var name: String?
/** Objective is the campaign goal as the provider names it. Optional, bounded to 1024 bytes. */
public var objective: String?
/** Platform is the ad network: meta, google, tiktok or x. Empty defaults to meta. */
public var platform: String?
/** Spend is the amount spent so far in MINOR units (cents). Negative values clamp to 0. */
public var spend: Int64?
/** Status is the lifecycle state: draft, active, paused or completed. Empty defaults to draft. */
public var status: String?
public init(account: String? = nil, budget: Int64? = nil, name: String? = nil, objective: String? = nil, platform: String? = nil, spend: Int64? = nil, status: String? = nil) {
self.account = account
self.budget = budget
self.name = name
self.objective = objective
self.platform = platform
self.spend = spend
self.status = status
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case account
case budget
case name
case objective
case platform
case spend
case status
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(account, forKey: .account)
try container.encodeIfPresent(budget, forKey: .budget)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(objective, forKey: .objective)
try container.encodeIfPresent(platform, forKey: .platform)
try container.encodeIfPresent(spend, forKey: .spend)
try container.encodeIfPresent(status, forKey: .status)
}
}