Skip to main content

hanzo_client/models/
update_agent_in.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UpdateAgentIn {
16    /// ComputeRef re-binds (or, with \"\", unbinds) the visor machine. Opaque here.
17    #[serde(rename = "computeRef", skip_serializing_if = "Option::is_none")]
18    pub compute_ref: Option<String>,
19    /// Description replaces the line other agents read in the tool catalogue.
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    /// ExecutionMode switches between one-shot and long-running. The RESULTING mode+schedule are validated together, so switching to long-running without a stored or supplied cron is refused rather than accepted into an agent the scheduler would skip forever. A switch INTO long-running counts against the per-org cap and can be a 409.
23    #[serde(rename = "executionMode", skip_serializing_if = "Option::is_none")]
24    pub execution_mode: Option<String>,
25    /// Instructions replaces the system prompt whole, up to 32 KiB. There is no append: a prompt is one text, and sending \"\" clears it.
26    #[serde(rename = "instructions", skip_serializing_if = "Option::is_none")]
27    pub instructions: Option<String>,
28    /// Model re-points the agent at another model, checked against the gateway's served catalogue exactly as create checks it. Empty STRING is refused — say nothing to keep the current one. Past runs keep the model that served them.
29    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
30    pub model: Option<String>,
31    /// Ref is the agent to update — its public id or org-unique name, from the path.
32    #[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
33    pub r#ref: Option<String>,
34    /// Schedule replaces the cron. It is validated against the mode this update leaves behind, and dropped if that mode is one-shot.
35    #[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
36    pub schedule: Option<String>,
37    /// ServiceAccountID re-points (or, with \"\", clears) the IAM service account a scheduled run is billed as. Clearing it puts that spend back on the org.
38    #[serde(rename = "serviceAccountId", skip_serializing_if = "Option::is_none")]
39    pub service_account_id: Option<String>,
40    /// Tools replaces the whole allow-list, it does not add to it. Sending [] takes every tool away, which is the only way to say that.
41    #[serde(rename = "tools", skip_serializing_if = "Option::is_none")]
42    pub tools: Option<Vec<String>>,
43}
44
45impl UpdateAgentIn {
46    pub fn new() -> UpdateAgentIn {
47        UpdateAgentIn {
48            compute_ref: None,
49            description: None,
50            execution_mode: None,
51            instructions: None,
52            model: None,
53            r#ref: None,
54            schedule: None,
55            service_account_id: None,
56            tools: None,
57        }
58    }
59}
60