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