mirror of
https://github.com/hanzo-swift/sdk.git
synced 2026-10-30 20:43:50 +00:00
95 lines
3.5 KiB
Swift
95 lines
3.5 KiB
Swift
//
|
|
// BotView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct BotView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Agent is the cloud Agent this machine runs, lifted out of the binding so a list of bots reads without following one. Empty means the machine is a bot machine with nothing bound — it costs money and answers nothing. */
|
|
public var agent: String?
|
|
/** Binding is the record joining this machine to that agent, carrying vm's own reconciled status and its reason. Absent means no runtime is bound, which is also what a stopped bot looks like: stopping unbinds and leaves the machine running. */
|
|
public var binding: AgentBinding?
|
|
public var createdTime: String?
|
|
public var gpu: String?
|
|
public var id: String?
|
|
public var image: String?
|
|
public var mem: String?
|
|
public var name: String?
|
|
public var os: String?
|
|
public var privateIp: String?
|
|
public var provider: String?
|
|
public var publicIp: String?
|
|
public var region: String?
|
|
public var status: String?
|
|
public var type: String?
|
|
public var vcpu: Int64?
|
|
|
|
public init(agent: String? = nil, binding: AgentBinding? = nil, createdTime: String? = nil, gpu: String? = nil, id: String? = nil, image: String? = nil, mem: String? = nil, name: String? = nil, os: String? = nil, privateIp: String? = nil, provider: String? = nil, publicIp: String? = nil, region: String? = nil, status: String? = nil, type: String? = nil, vcpu: Int64? = nil) {
|
|
self.agent = agent
|
|
self.binding = binding
|
|
self.createdTime = createdTime
|
|
self.gpu = gpu
|
|
self.id = id
|
|
self.image = image
|
|
self.mem = mem
|
|
self.name = name
|
|
self.os = os
|
|
self.privateIp = privateIp
|
|
self.provider = provider
|
|
self.publicIp = publicIp
|
|
self.region = region
|
|
self.status = status
|
|
self.type = type
|
|
self.vcpu = vcpu
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case agent
|
|
case binding
|
|
case createdTime
|
|
case gpu
|
|
case id
|
|
case image
|
|
case mem
|
|
case name
|
|
case os
|
|
case privateIp
|
|
case provider
|
|
case publicIp
|
|
case region
|
|
case status
|
|
case type
|
|
case vcpu
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(agent, forKey: .agent)
|
|
try container.encodeIfPresent(binding, forKey: .binding)
|
|
try container.encodeIfPresent(createdTime, forKey: .createdTime)
|
|
try container.encodeIfPresent(gpu, forKey: .gpu)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(image, forKey: .image)
|
|
try container.encodeIfPresent(mem, forKey: .mem)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(os, forKey: .os)
|
|
try container.encodeIfPresent(privateIp, forKey: .privateIp)
|
|
try container.encodeIfPresent(provider, forKey: .provider)
|
|
try container.encodeIfPresent(publicIp, forKey: .publicIp)
|
|
try container.encodeIfPresent(region, forKey: .region)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
try container.encodeIfPresent(vcpu, forKey: .vcpu)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension BotView: Identifiable {}
|