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.
59 lines
2.1 KiB
Swift
59 lines
2.1 KiB
Swift
//
|
|
// EnvironmentRow.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct EnvironmentRow: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** ID is the environment's name, which is also its identity — an environment is derived from the apps that target it, so it has no id of its own. */
|
|
public var id: String?
|
|
/** Name is the environment's name as an app declared it. */
|
|
public var name: String?
|
|
/** Services are the apps that target this environment, by name. */
|
|
public var services: [String]?
|
|
/** Status rolls up the real states of this environment's apps: degraded, active, idle or empty. */
|
|
public var status: String?
|
|
/** Type buckets the name for display: production, staging, development or custom. */
|
|
public var type: String?
|
|
/** UpdatedAt is when any of them last changed, RFC3339 UTC; empty when unset. */
|
|
public var updatedAt: String?
|
|
|
|
public init(id: String? = nil, name: String? = nil, services: [String]? = nil, status: String? = nil, type: String? = nil, updatedAt: String? = nil) {
|
|
self.id = id
|
|
self.name = name
|
|
self.services = services
|
|
self.status = status
|
|
self.type = type
|
|
self.updatedAt = updatedAt
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case id
|
|
case name
|
|
case services
|
|
case status
|
|
case type
|
|
case updatedAt
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(services, forKey: .services)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension EnvironmentRow: Identifiable {}
|