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.
59 lines
1.9 KiB
Swift
59 lines
1.9 KiB
Swift
//
|
|
// InvocationView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct InvocationView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** how long it took */
|
|
public var durationMs: Int64?
|
|
/** the invocation's handle */
|
|
public var id: String?
|
|
/** the HTTP method that triggered it */
|
|
public var method: String?
|
|
/** how the run ended: ok, error or timeout */
|
|
public var status: String?
|
|
/** Code is the status the function's OWN code answered with, which is not the status of the reply — a program can answer 500 through a healthy sandbox. */
|
|
public var statusCode: Int64?
|
|
/** when it ran, RFC3339 */
|
|
public var time: String?
|
|
|
|
public init(durationMs: Int64? = nil, id: String? = nil, method: String? = nil, status: String? = nil, statusCode: Int64? = nil, time: String? = nil) {
|
|
self.durationMs = durationMs
|
|
self.id = id
|
|
self.method = method
|
|
self.status = status
|
|
self.statusCode = statusCode
|
|
self.time = time
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case durationMs
|
|
case id
|
|
case method
|
|
case status
|
|
case statusCode
|
|
case time
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(durationMs, forKey: .durationMs)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(method, forKey: .method)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(statusCode, forKey: .statusCode)
|
|
try container.encodeIfPresent(time, forKey: .time)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension InvocationView: Identifiable {}
|