Files
2025-10-02 20:13:20 -04:00

57 lines
1.8 KiB
Swift

//
// Tool.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
public struct Tool: Codable, JSONEncodable, Hashable {
public var annotations: ToolAnnotations?
public var description: String?
public var icons: [Icon]?
public var inputSchema: [String: AnyCodable]
public var name: String
public var outputSchema: [String: AnyCodable]?
public var title: String?
public init(annotations: ToolAnnotations? = nil, description: String? = nil, icons: [Icon]? = nil, inputSchema: [String: AnyCodable], name: String, outputSchema: [String: AnyCodable]? = nil, title: String? = nil) {
self.annotations = annotations
self.description = description
self.icons = icons
self.inputSchema = inputSchema
self.name = name
self.outputSchema = outputSchema
self.title = title
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case annotations
case description
case icons
case inputSchema
case name
case outputSchema
case title
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(annotations, forKey: .annotations)
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(icons, forKey: .icons)
try container.encode(inputSchema, forKey: .inputSchema)
try container.encode(name, forKey: .name)
try container.encodeIfPresent(outputSchema, forKey: .outputSchema)
try container.encodeIfPresent(title, forKey: .title)
}
}