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.
56 lines
1.8 KiB
Swift
56 lines
1.8 KiB
Swift
//
|
|
// IndexTask.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct IndexTask: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** EnqueuedAt, StartedAt and FinishedAt are the same instant: the write was applied before its task id was minted. */
|
|
public var enqueuedAt: String?
|
|
/** FinishedAt is when the write completed. */
|
|
public var finishedAt: String?
|
|
/** StartedAt is when the write began. */
|
|
public var startedAt: String?
|
|
/** Status is always `succeeded`. */
|
|
public var status: String?
|
|
/** Type names the kind of write, for a client that inspects it. */
|
|
public var type: String?
|
|
/** UID echoes the task id that was asked about. */
|
|
public var uid: Int64?
|
|
|
|
public init(enqueuedAt: String? = nil, finishedAt: String? = nil, startedAt: String? = nil, status: String? = nil, type: String? = nil, uid: Int64? = nil) {
|
|
self.enqueuedAt = enqueuedAt
|
|
self.finishedAt = finishedAt
|
|
self.startedAt = startedAt
|
|
self.status = status
|
|
self.type = type
|
|
self.uid = uid
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case enqueuedAt
|
|
case finishedAt
|
|
case startedAt
|
|
case status
|
|
case type
|
|
case uid
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(enqueuedAt, forKey: .enqueuedAt)
|
|
try container.encodeIfPresent(finishedAt, forKey: .finishedAt)
|
|
try container.encodeIfPresent(startedAt, forKey: .startedAt)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
try container.encodeIfPresent(uid, forKey: .uid)
|
|
}
|
|
}
|
|
|