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.
46 lines
1.5 KiB
Swift
46 lines
1.5 KiB
Swift
//
|
|
// PoolScale.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct PoolScale: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** ClusterID is the cluster holding the pool, from the URL path. */
|
|
public var clusterId: String?
|
|
/** Count is the node count to scale TO — an absolute target, not a delta, and never negative. */
|
|
public var count: Int64?
|
|
/** PoolID is the pool to resize, from the URL path — the `poolId` a cluster read reports for it. Required. */
|
|
public var poolId: String?
|
|
/** Provider is the cloud the cluster lives on. Required; body or ?provider=. */
|
|
public var provider: String?
|
|
|
|
public init(clusterId: String? = nil, count: Int64? = nil, poolId: String? = nil, provider: String? = nil) {
|
|
self.clusterId = clusterId
|
|
self.count = count
|
|
self.poolId = poolId
|
|
self.provider = provider
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case clusterId
|
|
case count
|
|
case poolId
|
|
case provider
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(clusterId, forKey: .clusterId)
|
|
try container.encodeIfPresent(count, forKey: .count)
|
|
try container.encodeIfPresent(poolId, forKey: .poolId)
|
|
try container.encodeIfPresent(provider, forKey: .provider)
|
|
}
|
|
}
|
|
|