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.
207 lines
6.7 KiB
C++
207 lines
6.7 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.
|
|
*/
|
|
|
|
/*
|
|
* GpuJob.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_GpuJob_H_
|
|
#define HANZO_MODEL_GpuJob_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class GpuJob
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
GpuJob();
|
|
virtual ~GpuJob();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// GpuJob members
|
|
|
|
|
|
/// <summary>
|
|
/// Attempt is which try this is, counting from 1. Above 1 means the job was retried after a failed or abandoned run.
|
|
/// </summary>
|
|
int64_t getAttempt() const;
|
|
bool attemptIsSet() const;
|
|
void unsetAttempt();
|
|
void setAttempt(int64_t value);
|
|
|
|
/// <summary>
|
|
/// CloseTime is when the job reached a terminal state, RFC 3339. Empty means it is still live — queued, running or stalled.
|
|
/// </summary>
|
|
utility::string_t getCloseTime() const;
|
|
bool closeTimeIsSet() const;
|
|
void unsetCloseTime();
|
|
void setCloseTime(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// FailureCause is the engine's reason the job failed. Empty unless it did.
|
|
/// </summary>
|
|
utility::string_t getFailureCause() const;
|
|
bool failureCauseIsSet() const;
|
|
void unsetFailureCause();
|
|
void setFailureCause(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// GPU is the node this job is aimed AT — the lane \"gpu:<node>\" it was submitted on. Empty means the shared any-GPU lane: it was not aimed anywhere and the first free worker takes it.
|
|
/// </summary>
|
|
utility::string_t getGpu() const;
|
|
bool gpuIsSet() const;
|
|
void unsetGpu();
|
|
void setGpu(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ID is the job's id, and the id the cancel route takes. The dispatcher sets it equal to the render's prompt id, so it is the same value the studio knows the job by.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Label is the cheap human name for the render — the output filename prefix lifted out of the submitted graph. Empty when the graph carried none. The graph itself is never in this list; the tasks describe endpoint serves it.
|
|
/// </summary>
|
|
utility::string_t getLabel() const;
|
|
bool labelIsSet() const;
|
|
void unsetLabel();
|
|
void setLabel(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// LastHeartbeat is the claiming worker's most recent beat on this job, RFC 3339 — the evidence a long render is still alive rather than wedged.
|
|
/// </summary>
|
|
utility::string_t getLastHeartbeat() const;
|
|
bool lastHeartbeatIsSet() const;
|
|
void unsetLastHeartbeat();
|
|
void setLastHeartbeat(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// LeaseExpiry is when the worker's claim lapses, RFC 3339. Past it with the job still STARTED, the claimant is presumed dead and Status reads \"stalled\".
|
|
/// </summary>
|
|
utility::string_t getLeaseExpiry() const;
|
|
bool leaseExpiryIsSet() const;
|
|
void unsetLeaseExpiry();
|
|
void setLeaseExpiry(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// RunID identifies this execution of the job. It equals ID for a job the dispatcher submitted, which is why a cancel that omits it still works.
|
|
/// </summary>
|
|
utility::string_t getRunId() const;
|
|
bool runIdIsSet() const;
|
|
void unsetRunId();
|
|
void setRunId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// StartTime is when a worker began executing the job, RFC 3339. Empty while it is still queued.
|
|
/// </summary>
|
|
utility::string_t getStartTime() const;
|
|
bool startTimeIsSet() const;
|
|
void unsetStartTime();
|
|
void setStartTime(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Status is the job's lifecycle state: queued, running, completed, failed or canceled — plus \"stalled\", which is this surface's own reading of a job that is STARTED whose worker died: its lease has elapsed and no reaper has taken it back yet. Without it such a job reads \"running\" forever. An engine state this surface does not recognize passes through lower-cased rather than being coerced into one of these.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Type is the work being done (\"studio.render\") — what the claiming worker has to be able to execute.
|
|
/// </summary>
|
|
utility::string_t getType() const;
|
|
bool typeIsSet() const;
|
|
void unsetType();
|
|
void setType(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Worker is the node that actually CLAIMED the job, which is not always the one it was aimed at: a shared-lane job has no GPU but does have a Worker once picked up. Empty while the job is still waiting.
|
|
/// </summary>
|
|
utility::string_t getWorker() const;
|
|
bool workerIsSet() const;
|
|
void unsetWorker();
|
|
void setWorker(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
int64_t m_Attempt;
|
|
bool m_AttemptIsSet;
|
|
|
|
utility::string_t m_CloseTime;
|
|
bool m_CloseTimeIsSet;
|
|
|
|
utility::string_t m_FailureCause;
|
|
bool m_FailureCauseIsSet;
|
|
|
|
utility::string_t m_Gpu;
|
|
bool m_GpuIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Label;
|
|
bool m_LabelIsSet;
|
|
|
|
utility::string_t m_LastHeartbeat;
|
|
bool m_LastHeartbeatIsSet;
|
|
|
|
utility::string_t m_LeaseExpiry;
|
|
bool m_LeaseExpiryIsSet;
|
|
|
|
utility::string_t m_RunId;
|
|
bool m_RunIdIsSet;
|
|
|
|
utility::string_t m_StartTime;
|
|
bool m_StartTimeIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
utility::string_t m_Type;
|
|
bool m_TypeIsSet;
|
|
|
|
utility::string_t m_Worker;
|
|
bool m_WorkerIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_GpuJob_H_ */
|