mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
76 lines
2.7 KiB
Swift
76 lines
2.7 KiB
Swift
//
|
|
// ExtensionConfigOneOf3.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
#if canImport(AnyCodable)
|
|
import AnyCodable
|
|
#endif
|
|
|
|
/** Streamable HTTP client with a URI endpoint using MCP Streamable HTTP specification */
|
|
public struct ExtensionConfigOneOf3: Codable, JSONEncodable, Hashable {
|
|
|
|
public enum ModelType: String, Codable, CaseIterable {
|
|
case streamableHttp = "streamable_http"
|
|
}
|
|
public static let timeoutRule = NumericRule<Int64>(minimum: 0, exclusiveMinimum: false, maximum: nil, exclusiveMaximum: false, multipleOf: nil)
|
|
public var availableTools: [String]?
|
|
/** Whether this extension is bundled with goose */
|
|
public var bundled: Bool?
|
|
public var description: String?
|
|
public var envKeys: [String]?
|
|
public var envs: [String: String]?
|
|
public var headers: [String: String]?
|
|
/** The name used to identify this extension */
|
|
public var name: String
|
|
public var timeout: Int64?
|
|
public var type: ModelType
|
|
public var uri: String
|
|
|
|
public init(availableTools: [String]? = nil, bundled: Bool? = nil, description: String? = nil, envKeys: [String]? = nil, envs: [String: String]? = nil, headers: [String: String]? = nil, name: String, timeout: Int64? = nil, type: ModelType, uri: String) {
|
|
self.availableTools = availableTools
|
|
self.bundled = bundled
|
|
self.description = description
|
|
self.envKeys = envKeys
|
|
self.envs = envs
|
|
self.headers = headers
|
|
self.name = name
|
|
self.timeout = timeout
|
|
self.type = type
|
|
self.uri = uri
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case availableTools = "available_tools"
|
|
case bundled
|
|
case description
|
|
case envKeys = "env_keys"
|
|
case envs
|
|
case headers
|
|
case name
|
|
case timeout
|
|
case type
|
|
case uri
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(availableTools, forKey: .availableTools)
|
|
try container.encodeIfPresent(bundled, forKey: .bundled)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encodeIfPresent(envKeys, forKey: .envKeys)
|
|
try container.encodeIfPresent(envs, forKey: .envs)
|
|
try container.encodeIfPresent(headers, forKey: .headers)
|
|
try container.encode(name, forKey: .name)
|
|
try container.encodeIfPresent(timeout, forKey: .timeout)
|
|
try container.encode(type, forKey: .type)
|
|
try container.encode(uri, forKey: .uri)
|
|
}
|
|
}
|
|
|