Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -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/tool/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)
}
}