Files
sdk/Sources/Hanzo/Models/CreateServerReq.swift
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
The forge tree held the package scaffolding and none of the generated sources —
2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply
absent, so anything depending on this copy had a package that compiled to
nothing usable.

Generated from the current API document rather than reconciled with the other
copy: a client is a function of the spec, so regenerating answers "which history
wins" without anyone having to choose. .spec-lock records which document, so the
next reader can tell.
2026-08-23 10:04:41 -07:00

51 lines
2.1 KiB
Swift

//
// CreateServerReq.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct CreateServerReq: Sendable, Codable, ParameterConvertible, Hashable {
/** AuthHeader is the request header the credential is injected into, e.g. \"Authorization\". Empty means the server needs no credential. */
public var authHeader: String?
/** Listing enables a CATALOG entry instead — the id from GET /v1/tools/catalog. The endpoint is the listing's own streamable-http remote, so a listing that only ships a stdio package is refused: there is nothing to reach yet. */
public var listing: String?
/** Name labels the server for the org. Required with URL; with Listing it defaults to the listing's own title. */
public var name: String?
/** Secret is the credential VALUE. It is sealed into KMS under a per-org ref and never stored in SQLite, never listed, and never returned. */
public var secret: String?
/** URL is the server's JSON-RPC endpoint. It must be an http(s) URL naming a PUBLIC host: loopback, link-local, private and cloud-metadata addresses are refused here and again when the dialer connects. */
public var url: String?
public init(authHeader: String? = nil, listing: String? = nil, name: String? = nil, secret: String? = nil, url: String? = nil) {
self.authHeader = authHeader
self.listing = listing
self.name = name
self.secret = secret
self.url = url
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case authHeader
case listing
case name
case secret
case url
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(authHeader, forKey: .authHeader)
try container.encodeIfPresent(listing, forKey: .listing)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(secret, forKey: .secret)
try container.encodeIfPresent(url, forKey: .url)
}
}