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.
69 lines
2.8 KiB
Swift
69 lines
2.8 KiB
Swift
//
|
|
// ProvisionedResource.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ProvisionedResource: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Database is the logical database, collection, index or bucket this resource resolves to on its backend. */
|
|
public var database: String?
|
|
/** Host is the address that actually routes to this resource — a dedicated instance's own in-cluster Service, or the public gateway for a shared one. */
|
|
public var host: String?
|
|
/** ID is the resource's server-minted handle, \"rs_\"-prefixed. */
|
|
public var id: String?
|
|
/** Kind is the product: sql, vector, datastore, kv, search, s3 or docdb. */
|
|
public var kind: String?
|
|
/** Name is the org-unique slug the caller provisioned the resource under. */
|
|
public var name: String?
|
|
/** Port is the port a client connects to on Host. */
|
|
public var port: Int64?
|
|
/** Status is \"ready\", or \"provisioning\" while a dedicated instance is still being materialized. A dedicated resource's status is reconciled from the operator's live CR before this is answered, so it is never a stale ready. */
|
|
public var status: String?
|
|
/** Username is the credential's user, for the kinds that mint one per resource. Absent for a kind whose backend authenticates with a shared, out-of-band key. */
|
|
public var username: String?
|
|
|
|
public init(database: String? = nil, host: String? = nil, id: String? = nil, kind: String? = nil, name: String? = nil, port: Int64? = nil, status: String? = nil, username: String? = nil) {
|
|
self.database = database
|
|
self.host = host
|
|
self.id = id
|
|
self.kind = kind
|
|
self.name = name
|
|
self.port = port
|
|
self.status = status
|
|
self.username = username
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case database
|
|
case host
|
|
case id
|
|
case kind
|
|
case name
|
|
case port
|
|
case status
|
|
case username
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(database, forKey: .database)
|
|
try container.encodeIfPresent(host, forKey: .host)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(port, forKey: .port)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(username, forKey: .username)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension ProvisionedResource: Identifiable {}
|