mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection these were generated from was a month old and predated the compute migration, so every one of them described /v1/visor — which the API serves at zero paths now. That is why a hand-written console client and a generated one had drifted the same way at the same time. No /v1/visor path survives here. The word still appears as a source-plane value and inside gvisor and supervisor, which are not this rename.
230 lines
9.3 KiB
C++
230 lines
9.3 KiB
C++
/**
|
|
* Hanzo Cloud API
|
|
* 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/.
|
|
*
|
|
* The version of the OpenAPI document: v1
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* AgentView.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_AgentView_H_
|
|
#define HANZO_MODEL_AgentView_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class AgentView
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
AgentView();
|
|
virtual ~AgentView();
|
|
|
|
/////////////////////////////////////////////
|
|
/// ModelBase overrides
|
|
|
|
void validate() override;
|
|
|
|
web::json::value toJson() const override;
|
|
bool fromJson(const web::json::value& json) override;
|
|
|
|
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
|
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// AgentView members
|
|
|
|
|
|
/// <summary>
|
|
/// Avatar is an image the agent is drawn as — a link to one, or the bytes inline as a data URL, up to 96 KiB. Emoji is the one glyph a caller picked when they had no image. At most one is ever set; neither means the agent is drawn as its initial, the same way a person with no photo is. Both are iam/pkg/schema's Mark, so a face means the same thing on an agent as it does on a person or an org. Avatar is the agent's picture: an image URL, or the image itself inline as a data URL up to 96 KiB. Empty when the agent has no image.
|
|
/// </summary>
|
|
utility::string_t getAvatar() const;
|
|
bool avatarIsSet() const;
|
|
void unsetAvatar();
|
|
void setAvatar(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ComputeRef is the visor machine this bot is bound to, opaque here: this package stores and echoes it, and the binding's lifecycle belongs elsewhere. Empty means unbound, which is what every one-shot agent is.
|
|
/// </summary>
|
|
utility::string_t getComputeRef() const;
|
|
bool computeRefIsSet() const;
|
|
void unsetComputeRef();
|
|
void setComputeRef(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// CreatedAt is when the agent was defined, RFC 3339 in UTC to the second.
|
|
/// </summary>
|
|
utility::string_t getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Description is the one line another agent reads when deciding whether to call this one: the tool catalogue publishes it as the description of `agent_<name>`, falling back to \"agent <name>\" when it is empty. It is not part of the prompt — Instructions is — so writing the behaviour here reaches the caller and not the model.
|
|
/// </summary>
|
|
utility::string_t getDescription() const;
|
|
bool descriptionIsSet() const;
|
|
void unsetDescription();
|
|
void setDescription(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Emoji is the single glyph a caller picked when they had no image. At most one of avatar and emoji is ever set; neither means the agent is drawn as its initial, the same way a person with no photo is.
|
|
/// </summary>
|
|
utility::string_t getEmoji() const;
|
|
bool emojiIsSet() const;
|
|
void unsetEmoji();
|
|
void setEmoji(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ExecutionMode is one-shot or long-running, and it decides who may start this agent. one-shot runs only when something POSTs to it; long-running is additionally invoked by the scheduler on Schedule, once a minute against the cron. An org's long-running agents are capped, so a switch INTO it can be refused with 409.
|
|
/// </summary>
|
|
utility::string_t getExecutionMode() const;
|
|
bool executionModeIsSet() const;
|
|
void unsetExecutionMode();
|
|
void setExecutionMode(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ID is the agent's stable handle, minted here as \"agent_\" + 32 hex characters of crypto/rand. A caller cannot choose it, and it never changes — unlike Name, which is the other way to address the same agent.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Model is the Zen model this agent runs on, and it is always OUR name for it: writes normalize through cloud.ZenModel and the read normalizes again, so an upstream family name never leaves here even from a row written before that rule existed. A create that named none took the deployment's configured default, so this is where a caller learns which model it actually got.
|
|
/// </summary>
|
|
utility::string_t getModel() const;
|
|
bool modelIsSet() const;
|
|
void unsetModel();
|
|
void setModel(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Name is the agent's org-unique handle, matching ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. It addresses the agent everywhere ID does, it is what a run row records, and it is the suffix of the `agent_<name>` tool other agents call this one by. Set once at create; no update route moves it, because moving it would orphan that history.
|
|
/// </summary>
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Runs is how many executions the org has recorded against this agent, counted at read time. The list and update reads count the WHOLE history; the detail read reports the size of the RecentRuns page it carries, which stops at 20 — so a detail row saying 20 means \"at least 20\", not \"exactly 20\".
|
|
/// </summary>
|
|
int64_t getRuns() const;
|
|
bool runsIsSet() const;
|
|
void unsetRuns();
|
|
void setRuns(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Schedule is the 5-field cron the scheduler fires a long-running agent on, evaluated once a minute. Required for long-running and DROPPED for one-shot — a one-shot agent's schedule is not stored, so absence here is the mode's answer rather than a value nobody set.
|
|
/// </summary>
|
|
utility::string_t getSchedule() const;
|
|
bool scheduleIsSet() const;
|
|
void unsetSchedule();
|
|
void setSchedule(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ServiceAccountID is the IAM agent service account (<org>-<agent>) a scheduled run is billed AS. It is what makes an autonomous run attributable to a principal rather than only to the org; empty means the org itself wears the spend.
|
|
/// </summary>
|
|
utility::string_t getServiceAccountId() const;
|
|
bool serviceAccountIdIsSet() const;
|
|
void unsetServiceAccountId();
|
|
void setServiceAccountId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Status is the agent's readiness, and today it is \"ready\" on every row: an agent is a definition rather than a provisioned thing, so nothing transitions it. Server-set at create; no route accepts it.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Tools are the tool names this agent may call, and the list IS the authority: an agent that declares none gets none. The single entry \"*\" means whatever the fleet's MCP server serves at the moment of the run, resolved per run rather than frozen here, which is how the default assistant reaches subsystems that shipped after it was defined. Empty array, never null.
|
|
/// </summary>
|
|
std::vector<utility::string_t> getTools() const;
|
|
bool toolsIsSet() const;
|
|
void unsetTools();
|
|
void setTools(const std::vector<utility::string_t>& value);
|
|
|
|
/// <summary>
|
|
/// UpdatedAt is the last time any field above was written, same format. It moves on an update to the DEFINITION and never on a run, so a busy agent nobody has edited keeps an old one.
|
|
/// </summary>
|
|
utility::string_t getUpdatedAt() const;
|
|
bool updatedAtIsSet() const;
|
|
void unsetUpdatedAt();
|
|
void setUpdatedAt(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_Avatar;
|
|
bool m_AvatarIsSet;
|
|
|
|
utility::string_t m_ComputeRef;
|
|
bool m_ComputeRefIsSet;
|
|
|
|
utility::string_t m_CreatedAt;
|
|
bool m_CreatedAtIsSet;
|
|
|
|
utility::string_t m_Description;
|
|
bool m_DescriptionIsSet;
|
|
|
|
utility::string_t m_Emoji;
|
|
bool m_EmojiIsSet;
|
|
|
|
utility::string_t m_ExecutionMode;
|
|
bool m_ExecutionModeIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Model;
|
|
bool m_ModelIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
int64_t m_Runs;
|
|
bool m_RunsIsSet;
|
|
|
|
utility::string_t m_Schedule;
|
|
bool m_ScheduleIsSet;
|
|
|
|
utility::string_t m_ServiceAccountId;
|
|
bool m_ServiceAccountIdIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
std::vector<utility::string_t> m_Tools;
|
|
bool m_ToolsIsSet;
|
|
|
|
utility::string_t m_UpdatedAt;
|
|
bool m_UpdatedAtIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_AgentView_H_ */
|