mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
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.
66 lines
2.6 KiB
Swift
66 lines
2.6 KiB
Swift
//
|
|
// ProjectsRelease.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ProjectsRelease: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Active is whether this is the release the site is SERVING right now. Exactly one release of a site is active; the others are kept so they can be activated again, until retention reclaims them. */
|
|
public var active: Bool?
|
|
/** Bytes is their total size in bytes. */
|
|
public var bytes: Int64?
|
|
/** CreatedAt is when the release was cut, as Unix seconds — not when it was last activated. */
|
|
public var createdAt: Int64?
|
|
/** Objects is how many files the release holds. */
|
|
public var objects: Int64?
|
|
/** ReleaseID is derived from a DIGEST of the release's own manifest, so identical content is the same release and a release can never be confused with another one. Activating an older id IS the rollback. */
|
|
public var releaseId: String?
|
|
/** Slug is the site this release belongs to. */
|
|
public var slug: String?
|
|
/** Source is what the release was cut from — the build output or upload it was promoted out of. */
|
|
public var source: String?
|
|
/** URL is where the site serves. Present only on the ACTIVE release, since an inactive one is not answering anywhere. */
|
|
public var url: String?
|
|
|
|
public init(active: Bool? = nil, bytes: Int64? = nil, createdAt: Int64? = nil, objects: Int64? = nil, releaseId: String? = nil, slug: String? = nil, source: String? = nil, url: String? = nil) {
|
|
self.active = active
|
|
self.bytes = bytes
|
|
self.createdAt = createdAt
|
|
self.objects = objects
|
|
self.releaseId = releaseId
|
|
self.slug = slug
|
|
self.source = source
|
|
self.url = url
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case active
|
|
case bytes
|
|
case createdAt
|
|
case objects
|
|
case releaseId
|
|
case slug
|
|
case source
|
|
case url
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(active, forKey: .active)
|
|
try container.encodeIfPresent(bytes, forKey: .bytes)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(objects, forKey: .objects)
|
|
try container.encodeIfPresent(releaseId, forKey: .releaseId)
|
|
try container.encodeIfPresent(slug, forKey: .slug)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(url, forKey: .url)
|
|
}
|
|
}
|
|
|