Files
zeekay 189ce08e51 Regenerate against the document the deployment answers for
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.
2026-09-05 18:07:13 -07:00

376 lines
14 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.
*/
/*
* SessionView.h
*
*
*/
#ifndef HANZO_MODEL_SessionView_H_
#define HANZO_MODEL_SessionView_H_
#include <boost/optional.hpp>
#include "hanzo/ModelBase.h"
#include "hanzo/model/LastEventView.h"
#include <cpprest/details/basic_types.h>
#include "hanzo/model/SessionProgress.h"
namespace hanzo {
namespace model {
class LastEventView;
class SessionProgress;
class SessionView
: public ModelBase
{
public:
SessionView();
virtual ~SessionView();
/////////////////////////////////////////////
/// 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;
/////////////////////////////////////////////
/// SessionView members
/// <summary>
/// Account is which subscription or API account under that provider served it. Together with Provider it is what a login revoke matches on to stop the sessions a withdrawn account was paying for.
/// </summary>
utility::string_t getAccount() const;
bool accountIsSet() const;
void unsetAccount();
void setAccount(const utility::string_t& value);
/// <summary>
/// Actor is WHO this session belongs to, as \&quot;org/sub\&quot; — the same identity a run is billed under. A register that names none takes the calling principal. It is what scopes a login revoke, so a session with the wrong actor is a session the right person cannot stop.
/// </summary>
utility::string_t getActor() const;
bool actorIsSet() const;
void unsetActor();
void setActor(const utility::string_t& value);
/// <summary>
/// Agent is the label the surface running this session calls itself by (\&quot;hanzo-dev\&quot;), up to 128 characters. Required at register. It is free text, not a reference: it need not name a defined agent, and nothing resolves it.
/// </summary>
utility::string_t getAgent() const;
bool agentIsSet() const;
void unsetAgent();
void setAgent(const utility::string_t& value);
/// <summary>
/// Children is the DIRECT fan-out — how many sessions name this one as parent — and not the size of the subtree. Read the tree for that.
/// </summary>
int64_t getChildren() const;
bool childrenIsSet() const;
void unsetChildren();
void setChildren(int64_t value);
/// <summary>
/// CreatedAt is when the row was written, same format. Every path that opens a session stamps it and StartedAt from one clock reading, so the two are equal on every session this surface has ever produced.
/// </summary>
utility::string_t getCreatedAt() const;
bool createdAtIsSet() const;
void unsetCreatedAt();
void setCreatedAt(const utility::string_t& value);
/// <summary>
/// Cwd is the directory the session is working in NOW, not the one it started in: a linked shell moves around, and a card showing where &#x60;hanzo link&#x60; was run answers \&quot;which work is this\&quot; with something that was true once.
/// </summary>
utility::string_t getCwd() const;
bool cwdIsSet() const;
void unsetCwd();
void setCwd(const utility::string_t& value);
/// <summary>
/// EndedAt is when it reached done or error, same format. Empty while it is still running or paused, which is how absence reads here: not over yet.
/// </summary>
utility::string_t getEndedAt() const;
bool endedAtIsSet() const;
void unsetEndedAt();
void setEndedAt(const utility::string_t& value);
/// <summary>
/// Events is how many turns the session&#39;s log holds, counted at read time. It is the whole log, however few of them RecentEvents carries.
/// </summary>
int64_t getEvents() const;
bool eventsIsSet() const;
void unsetEvents();
void setEvents(int64_t value);
/// <summary>
/// Execution context (mission-control): the machine/repo/cwd a card shows and the run-target a session is dispatched to. Omitted when a surface didn&#39;t report it.
/// </summary>
utility::string_t getHost() const;
bool hostIsSet() const;
void unsetHost();
void setHost(const utility::string_t& value);
/// <summary>
/// ID is the session&#39;s handle, minted here as \&quot;sess_\&quot; + 32 hex characters. Every later read, patch, event append and control command is addressed with it, and a caller cannot choose it.
/// </summary>
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
/// <summary>
/// LastEvent is the compact latest-activity line for the list projection (nil in register/patch/tree responses; set by list + detail). It lets a swipe card show a live one-line preview without fetching full detail.
/// </summary>
std::shared_ptr<LastEventView> getLastEvent() const;
bool lastEventIsSet() const;
void unsetLastEvent();
void setLastEvent(const std::shared_ptr<LastEventView>& value);
/// <summary>
/// Org is the caller&#39;s OWN tenant, echoed so a client can build the public build URL (/builds/:org/:project) without a second call or a guess. It is never another tenant&#39;s — every read is org-scoped before it gets here.
/// </summary>
utility::string_t getOrg() const;
bool orgIsSet() const;
void unsetOrg();
void setOrg(const utility::string_t& value);
/// <summary>
/// ParentSessionID is the session that spawned this one, making this a subagent of it. Empty means this session is a root — a flow of its own. A parent always belongs to the same org, so a tree never crosses a tenant.
/// </summary>
utility::string_t getParentSessionId() const;
bool parentSessionIdIsSet() const;
void unsetParentSessionId();
void setParentSessionId(const utility::string_t& value);
/// <summary>
/// Progress is how far along this run is — a share of its goal, a phase, and a line saying what it is doing. Always present, so a board never branches on whether it is there; &#x60;phase&#x60; says \&quot;unknown\&quot; when nothing has estimated it. It is a MODEL ESTIMATE wherever &#x60;estimated&#x60; is true, and the row&#39;s own word where it is false. See progress.go.
/// </summary>
std::shared_ptr<SessionProgress> getProgress() const;
bool progressIsSet() const;
void unsetProgress();
void setProgress(const std::shared_ptr<SessionProgress>& value);
/// <summary>
/// The readable build: the product this session built and whether its story is public (provenance.go).
/// </summary>
utility::string_t getProject() const;
bool projectIsSet() const;
void unsetProject();
void setProject(const utility::string_t& value);
/// <summary>
/// Provider is the linked AI account&#39;s provider (claude | codex | hanzo | …) that served this run. Empty when the surface did not say.
/// </summary>
utility::string_t getProvider() const;
bool providerIsSet() const;
void unsetProvider();
void setProvider(const utility::string_t& value);
/// <summary>
/// Published is the author&#39;s decision to let anyone read this session&#39;s story at the public build route. It only ever widens READ access to a session that already exists and grants nothing else; false, an unpublished session is invisible there no matter who asks. It cannot be true without a Project, because that route is keyed on (org, project).
/// </summary>
bool isPublished() const;
bool publishedIsSet() const;
void unsetPublished();
void setPublished(bool value);
/// <summary>
/// Repo is the code the session is working on, as the surface reported it. It is truth the SURFACE states, so it is a label rather than something resolved here.
/// </summary>
utility::string_t getRepo() const;
bool repoIsSet() const;
void unsetRepo();
void setRepo(const utility::string_t& value);
/// <summary>
/// Room is the collaborative room this run was started in (HIP-0523), empty when it came from anywhere else — a CLI, a schedule, an API call. It is what lets a space view show the runs of one room beside its messages.
/// </summary>
utility::string_t getRoom() const;
bool roomIsSet() const;
void unsetRoom();
void setRoom(const utility::string_t& value);
/// <summary>
/// RootSessionID is the top of this session&#39;s tree, inherited from the parent and shared by every node in one flow. A root session&#39;s own id, when it has no parent. It is the key one indexed read pulls a whole flow by, and what ?root&#x3D; narrows a list or a stream to.
/// </summary>
utility::string_t getRootSessionId() const;
bool rootSessionIdIsSet() const;
void unsetRootSessionId();
void setRootSessionId(const utility::string_t& value);
/// <summary>
/// StartedAt is when the session opened, RFC 3339 in UTC to the second.
/// </summary>
utility::string_t getStartedAt() const;
bool startedAtIsSet() const;
void unsetStartedAt();
void setStartedAt(const utility::string_t& value);
/// <summary>
/// Status is one of exactly four: running, paused, done, error. running and paused are LIVE; done and error are TERMINAL and monotonic — once a session reaches one it can never go back, because reopening a finished run would fabricate liveness. A control command never moves it: the surface running the agent reports the new status, and until it does the command is only recorded.
/// </summary>
utility::string_t getStatus() const;
bool statusIsSet() const;
void unsetStatus();
void setStatus(const utility::string_t& value);
/// <summary>
/// Target is the registered run-target this session is dispatched to — a machine the org claimed, resolved same-org when it was set, so it can never point at another tenant&#39;s computer. Empty means the session names no machine.
/// </summary>
utility::string_t getTarget() const;
bool targetIsSet() const;
void unsetTarget();
void setTarget(const utility::string_t& value);
/// <summary>
/// TaskRunID is that workflow&#39;s particular run. A workflow is the definition and a run is one execution of it, which is why both are carried.
/// </summary>
utility::string_t getTaskRunId() const;
bool taskRunIdIsSet() const;
void unsetTaskRunId();
void setTaskRunId(const utility::string_t& value);
/// <summary>
/// TaskWorkflowID is the hanzoai/tasks durable workflow that actually EXECUTES this session — this registry is the view, control and stream layer over it. Set, a control command is FORWARDED to that engine; empty, the running surface polls for commands instead, which is every session today.
/// </summary>
utility::string_t getTaskWorkflowId() const;
bool taskWorkflowIdIsSet() const;
void unsetTaskWorkflowId();
void setTaskWorkflowId(const utility::string_t& value);
/// <summary>
/// Terminal is where this session can be WATCHED — the URL the machine published for its live terminal. Omitted when it publishes none.
/// </summary>
utility::string_t getTerminal() const;
bool terminalIsSet() const;
void unsetTerminal();
void setTerminal(const utility::string_t& value);
/// <summary>
/// Title is the human line a card shows (\&quot;ship the landing page\&quot;), up to 512 characters. Free text, and the one field a surface may rewrite as the work turns out to be something else.
/// </summary>
utility::string_t getTitle() const;
bool titleIsSet() const;
void unsetTitle();
void setTitle(const utility::string_t& value);
/// <summary>
/// UpdatedAt is the session&#39;s last-activity clock, same format. It moves on a write to the row — a status, a title, a re-dispatch — AND on every appended turn, because the append bumps it in the same transaction. The list is ordered on CreatedAt, so this is the field that says whether a session is still saying anything.
/// </summary>
utility::string_t getUpdatedAt() const;
bool updatedAtIsSet() const;
void unsetUpdatedAt();
void setUpdatedAt(const utility::string_t& value);
protected:
utility::string_t m_Account;
bool m_AccountIsSet;
utility::string_t m_Actor;
bool m_ActorIsSet;
utility::string_t m_Agent;
bool m_AgentIsSet;
int64_t m_Children;
bool m_ChildrenIsSet;
utility::string_t m_CreatedAt;
bool m_CreatedAtIsSet;
utility::string_t m_Cwd;
bool m_CwdIsSet;
utility::string_t m_EndedAt;
bool m_EndedAtIsSet;
int64_t m_Events;
bool m_EventsIsSet;
utility::string_t m_Host;
bool m_HostIsSet;
utility::string_t m_Id;
bool m_IdIsSet;
std::shared_ptr<LastEventView> m_LastEvent;
bool m_LastEventIsSet;
utility::string_t m_Org;
bool m_OrgIsSet;
utility::string_t m_ParentSessionId;
bool m_ParentSessionIdIsSet;
std::shared_ptr<SessionProgress> m_Progress;
bool m_ProgressIsSet;
utility::string_t m_Project;
bool m_ProjectIsSet;
utility::string_t m_Provider;
bool m_ProviderIsSet;
bool m_Published;
bool m_PublishedIsSet;
utility::string_t m_Repo;
bool m_RepoIsSet;
utility::string_t m_Room;
bool m_RoomIsSet;
utility::string_t m_RootSessionId;
bool m_RootSessionIdIsSet;
utility::string_t m_StartedAt;
bool m_StartedAtIsSet;
utility::string_t m_Status;
bool m_StatusIsSet;
utility::string_t m_Target;
bool m_TargetIsSet;
utility::string_t m_TaskRunId;
bool m_TaskRunIdIsSet;
utility::string_t m_TaskWorkflowId;
bool m_TaskWorkflowIdIsSet;
utility::string_t m_Terminal;
bool m_TerminalIsSet;
utility::string_t m_Title;
bool m_TitleIsSet;
utility::string_t m_UpdatedAt;
bool m_UpdatedAtIsSet;
};
}
}
#endif /* HANZO_MODEL_SessionView_H_ */