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.5 KiB
Swift
66 lines
2.5 KiB
Swift
//
|
|
// PoolCreate.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct PoolCreate: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AutoScale turns the provider's cluster autoscaler on for this pool. */
|
|
public var autoScale: Bool?
|
|
/** ClusterID is the cluster to add the pool to, from the URL path. */
|
|
public var clusterId: String?
|
|
/** Count is how many nodes the pool starts with. */
|
|
public var count: Int64?
|
|
/** MaxNodes is the ceiling the autoscaler may not grow the pool past, and so the bound on what this pool can spend. Ignored unless AutoScale is set. */
|
|
public var maxNodes: Int64?
|
|
/** MinNodes is the floor the autoscaler may not shrink the pool below. Ignored unless AutoScale is set. */
|
|
public var minNodes: Int64?
|
|
/** Name is the pool's name. */
|
|
public var name: String?
|
|
/** Provider is the cloud the cluster lives on (e.g. \"digitalocean\"). Required — Visor routes the create by it. Accepted from the body or ?provider=. */
|
|
public var provider: String?
|
|
/** Size is the provider size slug for each node (e.g. \"s-4vcpu-8gb\"). */
|
|
public var size: String?
|
|
|
|
public init(autoScale: Bool? = nil, clusterId: String? = nil, count: Int64? = nil, maxNodes: Int64? = nil, minNodes: Int64? = nil, name: String? = nil, provider: String? = nil, size: String? = nil) {
|
|
self.autoScale = autoScale
|
|
self.clusterId = clusterId
|
|
self.count = count
|
|
self.maxNodes = maxNodes
|
|
self.minNodes = minNodes
|
|
self.name = name
|
|
self.provider = provider
|
|
self.size = size
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case autoScale
|
|
case clusterId
|
|
case count
|
|
case maxNodes
|
|
case minNodes
|
|
case name
|
|
case provider
|
|
case size
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(autoScale, forKey: .autoScale)
|
|
try container.encodeIfPresent(clusterId, forKey: .clusterId)
|
|
try container.encodeIfPresent(count, forKey: .count)
|
|
try container.encodeIfPresent(maxNodes, forKey: .maxNodes)
|
|
try container.encodeIfPresent(minNodes, forKey: .minNodes)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(provider, forKey: .provider)
|
|
try container.encodeIfPresent(size, forKey: .size)
|
|
}
|
|
}
|
|
|