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.
74 lines
3.1 KiB
Swift
74 lines
3.1 KiB
Swift
//
|
|
// MCPServer.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct MCPServer: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AuthHeader is the request header the KMS-held credential is injected into, e.g. \"Authorization\". Absent when the server needs no credential. */
|
|
public var authHeader: String?
|
|
/** CreatedAt is when the server was registered, Unix seconds. */
|
|
public var createdAt: Int64?
|
|
/** HasSecret is whether a credential is sealed in KMS for this server. The VALUE is never returned by any route. */
|
|
public var hasSecret: Bool?
|
|
/** ID is the server's id within the org. It also PREFIXES every tool name the server contributes, which is what keeps two servers' \"search\" apart. */
|
|
public var id: String?
|
|
/** Listing is the catalog entry this server was enabled from, when it was. Empty means the org typed the URL in itself. */
|
|
public var listing: String?
|
|
/** Name is the org's label for the server. */
|
|
public var name: String?
|
|
/** Org is the org that registered the server — the validated caller's. */
|
|
public var org: String?
|
|
/** Source is where the registration came from: \"catalog\" when it was enabled off the shelf, \"org\" when the org registered the URL itself. It is DERIVED from Listing rather than stored, because two columns for one fact is two chances to disagree. */
|
|
public var source: String?
|
|
/** URL is the server's JSON-RPC endpoint. Always a public http(s) host: the registration boundary and the dialer both refuse anything else. */
|
|
public var url: String?
|
|
|
|
public init(authHeader: String? = nil, createdAt: Int64? = nil, hasSecret: Bool? = nil, id: String? = nil, listing: String? = nil, name: String? = nil, org: String? = nil, source: String? = nil, url: String? = nil) {
|
|
self.authHeader = authHeader
|
|
self.createdAt = createdAt
|
|
self.hasSecret = hasSecret
|
|
self.id = id
|
|
self.listing = listing
|
|
self.name = name
|
|
self.org = org
|
|
self.source = source
|
|
self.url = url
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case authHeader
|
|
case createdAt
|
|
case hasSecret
|
|
case id
|
|
case listing
|
|
case name
|
|
case org
|
|
case source
|
|
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(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(hasSecret, forKey: .hasSecret)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(listing, forKey: .listing)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(org, forKey: .org)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(url, forKey: .url)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension MCPServer: Identifiable {}
|