mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
48 lines
1.2 KiB
Swift
48 lines
1.2 KiB
Swift
//
|
|
// ToolConfirmationRequest.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
#if canImport(AnyCodable)
|
|
import AnyCodable
|
|
#endif
|
|
|
|
public struct ToolConfirmationRequest: Codable, JSONEncodable, Hashable {
|
|
|
|
public var arguments: [String: AnyCodable]
|
|
public var id: String
|
|
public var prompt: String?
|
|
public var toolName: String
|
|
|
|
public init(arguments: [String: AnyCodable], id: String, prompt: String? = nil, toolName: String) {
|
|
self.arguments = arguments
|
|
self.id = id
|
|
self.prompt = prompt
|
|
self.toolName = toolName
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case arguments
|
|
case id
|
|
case prompt
|
|
case toolName
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encode(arguments, forKey: .arguments)
|
|
try container.encode(id, forKey: .id)
|
|
try container.encodeIfPresent(prompt, forKey: .prompt)
|
|
try container.encode(toolName, forKey: .toolName)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension ToolConfirmationRequest: Identifiable {}
|