Files
zeekay 87d088ed73 Regenerate against the current cloud document
The lock sat at 574d1f1d while the product moved on. The team surface
stopped at rooms — no messages path, no way to open one — so anything
built on this client had to reach past it with its own HTTP calls, which
is the duplication a generated client exists to prevent.
2026-09-01 02:21:56 -07:00

81 lines
5.0 KiB
Swift

//
// CreateAgentIn.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct CreateAgentIn: Sendable, Codable, ParameterConvertible, Hashable {
/** Avatar and Emoji are how the agent APPEARS. An image wins when both are given — it is the thing somebody made — and both empty leaves the agent drawn as its initial. Validated by iam/pkg/schema, the same rule a person's avatar passes, so the 96 KiB bound and the accepted URL forms are stated once for every subject that has a face. */
public var avatar: String?
/** ComputeRef optionally binds this bot to a visor machine. Opaque here, bounded at 256 characters, and not resolved — this package stores the reference and the binding's lifecycle belongs elsewhere. */
public var computeRef: String?
/** Description is the one line published as the description of the `agent_<name>` tool, which is how another agent decides whether to call this one. Optional, and worth writing for exactly that reason. */
public var description: String?
/** Emoji is the single glyph shown when there is no image. An image WINS when both are given — it is the thing somebody made — and both empty leaves the agent drawn as its initial. */
public var emoji: String?
/** ExecutionMode is one-shot or long-running. Empty takes one-shot, which runs only when something POSTs to it. long-running additionally requires Schedule, and counts against a per-org cap that answers 409 when it is full. */
public var executionMode: String?
/** Instructions is the system prompt, up to 32 KiB, stored verbatim. This is what the model reads; Description is what other CALLERS read. */
public var instructions: String?
/** Model names the model to run on. Omit it to take the deployment's configured default; name one and it is checked against the gateway's served catalogue here, so a model this deployment cannot serve is refused now rather than at the first run. Stored under our own name for it, whatever spelling arrives. */
public var model: String?
/** Name is the agent's org-unique handle and the only required field. It must match ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$, and a name already taken in this org is a 409 rather than an overwrite. It is permanent: no update route moves it. */
public var name: String?
/** Schedule is the 5-field cron a long-running agent fires on, parsed here so a bad expression is a 400 and not an agent that silently never runs. Required with long-running; DISCARDED for one-shot rather than stored unused. */
public var schedule: String?
/** ServiceAccountID optionally names the IAM agent service account (<org>-<agent>) a scheduled run should be billed AS, so an autonomous run is attributable to a principal rather than only to the org. Same 256-character bound, also unresolved here. */
public var serviceAccountId: String?
/** Tools are the tool names this agent may call. Omitted or empty grants NONE — that default is the agent's authority and is not widened anywhere. The single entry \"*\" means whatever the fleet's MCP server serves at the time of each run. */
public var tools: [String]?
public init(avatar: String? = nil, computeRef: String? = nil, description: String? = nil, emoji: String? = nil, executionMode: String? = nil, instructions: String? = nil, model: String? = nil, name: String? = nil, schedule: String? = nil, serviceAccountId: String? = nil, tools: [String]? = nil) {
self.avatar = avatar
self.computeRef = computeRef
self.description = description
self.emoji = emoji
self.executionMode = executionMode
self.instructions = instructions
self.model = model
self.name = name
self.schedule = schedule
self.serviceAccountId = serviceAccountId
self.tools = tools
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case avatar
case computeRef
case description
case emoji
case executionMode
case instructions
case model
case name
case schedule
case serviceAccountId
case tools
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(avatar, forKey: .avatar)
try container.encodeIfPresent(computeRef, forKey: .computeRef)
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(emoji, forKey: .emoji)
try container.encodeIfPresent(executionMode, forKey: .executionMode)
try container.encodeIfPresent(instructions, forKey: .instructions)
try container.encodeIfPresent(model, forKey: .model)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(schedule, forKey: .schedule)
try container.encodeIfPresent(serviceAccountId, forKey: .serviceAccountId)
try container.encodeIfPresent(tools, forKey: .tools)
}
}