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

64 lines
2.2 KiB
Swift

//
// ExtensionConfigOneOf2.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
/** Built-in extension that is part of the goose binary */
public struct ExtensionConfigOneOf2: Codable, JSONEncodable, Hashable {
public enum ModelType: String, Codable, CaseIterable {
case builtin = "builtin"
}
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 displayName: String?
/** The name used to identify this extension */
public var name: String
public var timeout: Int64?
public var type: ModelType
public init(availableTools: [String]? = nil, bundled: Bool? = nil, description: String? = nil, displayName: String? = nil, name: String, timeout: Int64? = nil, type: ModelType) {
self.availableTools = availableTools
self.bundled = bundled
self.description = description
self.displayName = displayName
self.name = name
self.timeout = timeout
self.type = type
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case availableTools = "available_tools"
case bundled
case description
case displayName = "display_name"
case name
case timeout
case type
}
// 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(displayName, forKey: .displayName)
try container.encode(name, forKey: .name)
try container.encodeIfPresent(timeout, forKey: .timeout)
try container.encode(type, forKey: .type)
}
}