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.
81 lines
4.2 KiB
Swift
81 lines
4.2 KiB
Swift
//
|
|
// DestinationStatus.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct DestinationStatus: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Account is the operator's own label for the connected account, as supplied on connect. Absent when unset. */
|
|
public var account: String?
|
|
/** groups the card: Analytics | Advertising */
|
|
public var category: String?
|
|
/** Config is the org's stored NON-SECRET configuration — the measurement/pixel ids keyed by DestinationField.Key. A secret is never in here; secrets live in KMS and only their names are published, in Secrets. */
|
|
public var config: [String: String]?
|
|
/** Connected is true when this org has a stored row for the platform — it has been configured here at least once. It says nothing about whether a credential still resolves; that is Live. */
|
|
public var connected: Bool?
|
|
/** Enabled is whether the fan-out forwards to this destination. False on a destination that is connected but paused, and on one never connected. */
|
|
public var enabled: Bool?
|
|
/** Fields are the non-secret inputs this platform needs, which the console card renders and the connect body fills. */
|
|
public var fields: [DestinationField]?
|
|
/** Live is whether a credential resolves RIGHT NOW: a KMS-sealed secret for this org, else the integrations connection named by the platform's Fallback, else no credential needed at all (a public-ingest sink like Analytics). False on a connected destination whose secret has gone missing — Connected && !Live is exactly the \"reconnect me\" state. */
|
|
public var live: Bool?
|
|
/** the platform's display name (\"Google Analytics 4\") */
|
|
public var name: String?
|
|
/** Pixel is whether the hosted tag can inject a browser pixel for this platform, so a console offers a per-SITE pixel input for exactly these. False means the platform receives conversions server-side only, and an input would promise an injection that never happens. Derived from the tag's own map (event.BrowserTags), never restated — a second list is how a console offers a pixel nothing fires. */
|
|
public var pixel: Bool?
|
|
/** the platform slug, and the path segment every route addresses it by */
|
|
public var platform: String?
|
|
/** Secrets are the KMS secret NAMES this platform custodies for the org — names only, never values. The connect body accepts each under its camelCase form. */
|
|
public var secrets: [String]?
|
|
|
|
public init(account: String? = nil, category: String? = nil, config: [String: String]? = nil, connected: Bool? = nil, enabled: Bool? = nil, fields: [DestinationField]? = nil, live: Bool? = nil, name: String? = nil, pixel: Bool? = nil, platform: String? = nil, secrets: [String]? = nil) {
|
|
self.account = account
|
|
self.category = category
|
|
self.config = config
|
|
self.connected = connected
|
|
self.enabled = enabled
|
|
self.fields = fields
|
|
self.live = live
|
|
self.name = name
|
|
self.pixel = pixel
|
|
self.platform = platform
|
|
self.secrets = secrets
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case account
|
|
case category
|
|
case config
|
|
case connected
|
|
case enabled
|
|
case fields
|
|
case live
|
|
case name
|
|
case pixel
|
|
case platform
|
|
case secrets
|
|
}
|
|
|
|
// 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(category, forKey: .category)
|
|
try container.encodeIfPresent(config, forKey: .config)
|
|
try container.encodeIfPresent(connected, forKey: .connected)
|
|
try container.encodeIfPresent(enabled, forKey: .enabled)
|
|
try container.encodeIfPresent(fields, forKey: .fields)
|
|
try container.encodeIfPresent(live, forKey: .live)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(pixel, forKey: .pixel)
|
|
try container.encodeIfPresent(platform, forKey: .platform)
|
|
try container.encodeIfPresent(secrets, forKey: .secrets)
|
|
}
|
|
}
|
|
|