Files
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
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.
2026-08-23 10:04:41 -07:00

61 lines
2.8 KiB
Swift

//
// EdgeState.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct EdgeState: Sendable, Codable, ParameterConvertible, Hashable {
/** Configured is whether the edge holds credentials to act at all. False means every purge is a no-op. */
public var configured: Bool?
/** Error is the blocker, so an operator reads it instead of guessing at it. */
public var error: String?
/** Freshness says, in one phrase, how long after a publish a reader sees it. It is the sentence an operator actually wants; the booleans above are how a machine reads the same fact. */
public var freshness: String?
/** Policy is the Cache-Control this edge serves each class of object with. It is DERIVED from the one canonical function, never a second copy: half the confusion when a publish looks stale is not knowing what the TTLs are, and reading them out of the source is not something an operator should have to do to answer \"how long until this is live\". */
public var policy: [String: String]?
/** Provider is the CDN behind this edge, or \"none\". It is the first thing an operator wants and the only vendor name this API returns. */
public var provider: String?
/** Reach is the apexes a publish is invalidated on. A site is served on more than one — the site plane's own and the first-party apex — and a purge that covers one of them looks identical from here to a purge that covers both. */
public var reach: [String]?
/** Status is \"ok\" when a publish reaches readers immediately, else \"degraded\". */
public var status: String?
public init(configured: Bool? = nil, error: String? = nil, freshness: String? = nil, policy: [String: String]? = nil, provider: String? = nil, reach: [String]? = nil, status: String? = nil) {
self.configured = configured
self.error = error
self.freshness = freshness
self.policy = policy
self.provider = provider
self.reach = reach
self.status = status
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case configured
case error
case freshness
case policy
case provider
case reach
case status
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(configured, forKey: .configured)
try container.encodeIfPresent(error, forKey: .error)
try container.encodeIfPresent(freshness, forKey: .freshness)
try container.encodeIfPresent(policy, forKey: .policy)
try container.encodeIfPresent(provider, forKey: .provider)
try container.encodeIfPresent(reach, forKey: .reach)
try container.encodeIfPresent(status, forKey: .status)
}
}