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

61 lines
1.9 KiB
Swift

//
// ExtensionConfigOneOf4.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
/** Frontend-provided tools that will be called through the frontend */
public struct ExtensionConfigOneOf4: Codable, JSONEncodable, Hashable {
public enum ModelType: String, Codable, CaseIterable {
case frontend = "frontend"
}
public var availableTools: [String]?
/** Whether this extension is bundled with goose */
public var bundled: Bool?
/** Instructions for how to use these tools */
public var instructions: String?
/** The name used to identify this extension */
public var name: String
/** The tools provided by the frontend */
public var tools: [Tool]
public var type: ModelType
public init(availableTools: [String]? = nil, bundled: Bool? = nil, instructions: String? = nil, name: String, tools: [Tool], type: ModelType) {
self.availableTools = availableTools
self.bundled = bundled
self.instructions = instructions
self.name = name
self.tools = tools
self.type = type
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case availableTools = "available_tools"
case bundled
case instructions
case name
case tools
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(instructions, forKey: .instructions)
try container.encode(name, forKey: .name)
try container.encode(tools, forKey: .tools)
try container.encode(type, forKey: .type)
}
}