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

89 lines
4.3 KiB
Swift

//
// DeploymentView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct DeploymentView: Sendable, Codable, ParameterConvertible, Hashable {
/** ApplicationID is the app this deployed — the app's `id`, not its slug. */
public var applicationId: String?
/** BuildID is the build record behind a git deploy, whose logs and status live at /v1/platform/builds. Empty for an image deploy. */
public var buildId: String?
/** Commit is the git ref this built — the commit a deploy or a push named, else the app's branch. Empty for an image deploy, which builds nothing. */
public var commit: String?
/** CreatedAt is when the attempt was recorded, unix seconds. */
public var createdAt: Int64?
/** ID is the deployment's id (`dep_…`), minted when the attempt is recorded. The app's currentDeploymentId points at one of these. */
public var id: String?
/** Image is the full `repo:tag` this deployment put in the CR. For a git deploy it is the ref the in-cluster build pushes to, known before the build runs. */
public var image: String?
/** Message is why this attempt is not live: the failure, or the note that a newer deployment went live before this build finished. Empty while it is fine. */
public var message: String?
/** Org is the tenant the deployment belongs to, from the validated identity. */
public var org: String?
/** Source is which lane produced it: `git` (built from the repo) or `image` (an already-built ref deployed as-is, including promote and rollback). */
public var source: String?
/** Status is where the attempt got to: `building` while its image is being built, `deploying` once its CR reached the cluster — which is the terminal success state, the app's own status is what turns `live` — `error` with the reason in Message, or `superseded` when a newer version went live first. */
public var status: String?
/** UpdatedAt is its last transition, unix seconds — so for a terminal deployment it is when it reached that state. */
public var updatedAt: Int64?
/** Version counts this app's deployments, from 1 and monotonically. It is what ORDERS them: a deploy only goes live if no higher version already is, so a build that finishes late is superseded instead of overwriting a newer one. */
public var version: Int64?
public init(applicationId: String? = nil, buildId: String? = nil, commit: String? = nil, createdAt: Int64? = nil, id: String? = nil, image: String? = nil, message: String? = nil, org: String? = nil, source: String? = nil, status: String? = nil, updatedAt: Int64? = nil, version: Int64? = nil) {
self.applicationId = applicationId
self.buildId = buildId
self.commit = commit
self.createdAt = createdAt
self.id = id
self.image = image
self.message = message
self.org = org
self.source = source
self.status = status
self.updatedAt = updatedAt
self.version = version
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case applicationId
case buildId
case commit
case createdAt
case id
case image
case message
case org
case source
case status
case updatedAt
case version
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(applicationId, forKey: .applicationId)
try container.encodeIfPresent(buildId, forKey: .buildId)
try container.encodeIfPresent(commit, forKey: .commit)
try container.encodeIfPresent(createdAt, forKey: .createdAt)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(image, forKey: .image)
try container.encodeIfPresent(message, forKey: .message)
try container.encodeIfPresent(org, forKey: .org)
try container.encodeIfPresent(source, forKey: .source)
try container.encodeIfPresent(status, forKey: .status)
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
try container.encodeIfPresent(version, forKey: .version)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension DeploymentView: Identifiable {}