mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
56 lines
2.5 KiB
Swift
56 lines
2.5 KiB
Swift
//
|
|
// ChannelSpec.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ChannelSpec: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Account is the provider account this channel runs under: an ad-account, a page or a mailing-list id. An executor may replace it at launch with the account it actually used. */
|
|
public var account: String?
|
|
/** Detail is the last outcome in one secret-free line — the failure reason, or what the executor reported. Absent when there is nothing to explain. */
|
|
public var detail: String?
|
|
/** ExternalID is the provider-side id of the running execution, recorded by the orchestrator at launch and handed back verbatim to read spend or to pause. Server-owned and absent until this channel has launched; anything a caller sends for it is dropped. */
|
|
public var externalId: String?
|
|
/** Kind is the channel and the identity a campaign holds at most one of: paid, organic or email. It picks the executor the launch fans out to. */
|
|
public var kind: String?
|
|
/** Platform is the provider within the kind — meta, google, x, instagram, or the email provider. */
|
|
public var platform: String?
|
|
/** Status is this channel's own launch outcome, not the campaign's: pending (added, never launched), live, paused, failed (Detail says why) or unavailable (no executor wired on this deployment). Server-owned — a caller can never assert it. */
|
|
public var status: String?
|
|
|
|
public init(account: String? = nil, detail: String? = nil, externalId: String? = nil, kind: String? = nil, platform: String? = nil, status: String? = nil) {
|
|
self.account = account
|
|
self.detail = detail
|
|
self.externalId = externalId
|
|
self.kind = kind
|
|
self.platform = platform
|
|
self.status = status
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case account
|
|
case detail
|
|
case externalId
|
|
case kind
|
|
case platform
|
|
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(detail, forKey: .detail)
|
|
try container.encodeIfPresent(externalId, forKey: .externalId)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(platform, forKey: .platform)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
}
|
|
}
|
|
|