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

113 lines
4.1 KiB
Swift

//
// ExtensionEntry.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
public struct ExtensionEntry: Codable, JSONEncodable, Hashable {
public enum ModelType: String, Codable, CaseIterable {
case inlinePython = "inline_python"
}
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?
/** Description of what the extension does */
public var description: String?
public var envKeys: [String]?
public var envs: [String: String]?
/** The name used to identify this extension */
public var name: String
/** Timeout in seconds */
public var timeout: Int64?
public var type: ModelType
public var uri: String
public var args: [String]
public var cmd: String
public var displayName: String?
public var headers: [String: String]?
/** Instructions for how to use these tools */
public var instructions: String?
/** The tools provided by the frontend */
public var tools: [Tool]
/** The Python code to execute */
public var code: String
/** Python package dependencies required by this extension */
public var dependencies: [String]?
public var enabled: Bool
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, args: [String], cmd: String, displayName: String? = nil, headers: [String: String]? = nil, instructions: String? = nil, tools: [Tool], code: String, dependencies: [String]? = nil, enabled: Bool) {
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
self.args = args
self.cmd = cmd
self.displayName = displayName
self.headers = headers
self.instructions = instructions
self.tools = tools
self.code = code
self.dependencies = dependencies
self.enabled = enabled
}
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
case args
case cmd
case displayName = "display_name"
case headers
case instructions
case tools
case code
case dependencies
case enabled
}
// 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)
try container.encode(args, forKey: .args)
try container.encode(cmd, forKey: .cmd)
try container.encodeIfPresent(displayName, forKey: .displayName)
try container.encodeIfPresent(headers, forKey: .headers)
try container.encodeIfPresent(instructions, forKey: .instructions)
try container.encode(tools, forKey: .tools)
try container.encode(code, forKey: .code)
try container.encodeIfPresent(dependencies, forKey: .dependencies)
try container.encode(enabled, forKey: .enabled)
}
}