Files
swift-sdk/Sources/Hanzo/Models/AiResponsesResource.swift
zeekay b60f47a8bb Regenerate: the AI surface says what it answers
288 of hanzoai/ai's 294 operations now declare a response, against 1 before.
GET /v1/models, POST /v1/chat/completions, /v1/embeddings, /v1/messages —
every address a client actually calls — used to reach this client untyped,
because cloud's relay carried an operation's sentence and dropped the shapes
it named. It carries both now.

Fleet-wide the document goes from 69% to 81% of operations declaring what
comes back, which is where the ~208 new models here come from.
2026-08-28 15:52:19 -07:00

113 lines
4.5 KiB
Swift

//
// AiResponsesResource.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct AiResponsesResource: Sendable, Codable, ParameterConvertible, Hashable {
public var createdAt: Int?
public var error: JSONValue?
public var id: String?
public var incompleteDetails: JSONValue?
public var instructions: String?
public var maxOutputTokens: Int?
public var metadata: [String: String]?
public var model: String?
public var object: String?
public var output: [JSONValue]?
public var parallelToolCalls: Bool?
public var previousResponseId: JSONValue?
public var reasoning: JSONValue?
public var status: String?
public var store: Bool?
public var temperature: Double?
public var text: JSONValue?
public var toolChoice: JSONValue?
public var tools: [AiResponsesTool]?
public var topP: Double?
public var usage: AiResponsesUsage?
public init(createdAt: Int? = nil, error: JSONValue? = nil, id: String? = nil, incompleteDetails: JSONValue? = nil, instructions: String? = nil, maxOutputTokens: Int? = nil, metadata: [String: String]? = nil, model: String? = nil, object: String? = nil, output: [JSONValue]? = nil, parallelToolCalls: Bool? = nil, previousResponseId: JSONValue? = nil, reasoning: JSONValue? = nil, status: String? = nil, store: Bool? = nil, temperature: Double? = nil, text: JSONValue? = nil, toolChoice: JSONValue? = nil, tools: [AiResponsesTool]? = nil, topP: Double? = nil, usage: AiResponsesUsage? = nil) {
self.createdAt = createdAt
self.error = error
self.id = id
self.incompleteDetails = incompleteDetails
self.instructions = instructions
self.maxOutputTokens = maxOutputTokens
self.metadata = metadata
self.model = model
self.object = object
self.output = output
self.parallelToolCalls = parallelToolCalls
self.previousResponseId = previousResponseId
self.reasoning = reasoning
self.status = status
self.store = store
self.temperature = temperature
self.text = text
self.toolChoice = toolChoice
self.tools = tools
self.topP = topP
self.usage = usage
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case createdAt = "created_at"
case error
case id
case incompleteDetails = "incomplete_details"
case instructions
case maxOutputTokens = "max_output_tokens"
case metadata
case model
case object
case output
case parallelToolCalls = "parallel_tool_calls"
case previousResponseId = "previous_response_id"
case reasoning
case status
case store
case temperature
case text
case toolChoice = "tool_choice"
case tools
case topP = "top_p"
case usage
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(createdAt, forKey: .createdAt)
try container.encodeIfPresent(error, forKey: .error)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(incompleteDetails, forKey: .incompleteDetails)
try container.encodeIfPresent(instructions, forKey: .instructions)
try container.encodeIfPresent(maxOutputTokens, forKey: .maxOutputTokens)
try container.encodeIfPresent(metadata, forKey: .metadata)
try container.encodeIfPresent(model, forKey: .model)
try container.encodeIfPresent(object, forKey: .object)
try container.encodeIfPresent(output, forKey: .output)
try container.encodeIfPresent(parallelToolCalls, forKey: .parallelToolCalls)
try container.encodeIfPresent(previousResponseId, forKey: .previousResponseId)
try container.encodeIfPresent(reasoning, forKey: .reasoning)
try container.encodeIfPresent(status, forKey: .status)
try container.encodeIfPresent(store, forKey: .store)
try container.encodeIfPresent(temperature, forKey: .temperature)
try container.encodeIfPresent(text, forKey: .text)
try container.encodeIfPresent(toolChoice, forKey: .toolChoice)
try container.encodeIfPresent(tools, forKey: .tools)
try container.encodeIfPresent(topP, forKey: .topP)
try container.encodeIfPresent(usage, forKey: .usage)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension AiResponsesResource: Identifiable {}