Files
goose/api_clients/swift/GooseAPI/Classes/OpenAPIs/Models/ExtensionConfigOneOf.swift
2025-10-02 20:13:20 -04:00

72 lines
2.4 KiB
Swift

//
// ExtensionConfigOneOf.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
/** Server-sent events client with a URI endpoint */
public struct ExtensionConfigOneOf: Codable, JSONEncodable, Hashable {
public enum ModelType: String, Codable, CaseIterable {
case sse = "sse"
}
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]?
/** 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, 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.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 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.encode(name, forKey: .name)
try container.encodeIfPresent(timeout, forKey: .timeout)
try container.encode(type, forKey: .type)
try container.encode(uri, forKey: .uri)
}
}