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.
166 lines
4.3 KiB
C++
166 lines
4.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.
|
|
*/
|
|
|
|
/*
|
|
* RunReq.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_RunReq_H_
|
|
#define HANZO_MODEL_RunReq_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include "hanzo/model/EnvVarJSON.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class EnvVarJSON;
|
|
|
|
|
|
class RunReq
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
RunReq();
|
|
virtual ~RunReq();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// RunReq members
|
|
|
|
|
|
/// <summary>
|
|
/// Env is the run's environment. Keys must match `^[A-Za-z_][A-Za-z0-9_]*$`; a variable marked `secret: true` is sealed into KMS.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<EnvVarJSON>> getEnv() const;
|
|
bool envIsSet() const;
|
|
void unsetEnv();
|
|
void setEnv(const std::vector<std::shared_ptr<EnvVarJSON>>& value);
|
|
|
|
/// <summary>
|
|
/// GPU is how many GPUs the run asks for; a negative value is 400.
|
|
/// </summary>
|
|
int64_t getGpu() const;
|
|
bool gpuIsSet() const;
|
|
void unsetGpu();
|
|
void setGpu(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Image is the container image to run. Required.
|
|
/// </summary>
|
|
utility::string_t getImage() const;
|
|
bool imageIsSet() const;
|
|
void unsetImage();
|
|
void setImage(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// MaxScale above the floor declares an autoscaling ceiling; 0 means no autoscaler at all — a fixed run at the floor.
|
|
/// </summary>
|
|
int64_t getMaxScale() const;
|
|
bool maxScaleIsSet() const;
|
|
void unsetMaxScale();
|
|
void setMaxScale(int64_t value);
|
|
|
|
/// <summary>
|
|
/// MinScale is the replica floor, clamped to the deployment's limit.
|
|
/// </summary>
|
|
int64_t getMinScale() const;
|
|
bool minScaleIsSet() const;
|
|
void unsetMinScale();
|
|
void setMinScale(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Name is the run's name, and the slug is derived from it. Required, and it must resolve to `^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$`. Re-running the same name updates that run in place.
|
|
/// </summary>
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Port is the container port the run listens on.
|
|
/// </summary>
|
|
int64_t getPort() const;
|
|
bool portIsSet() const;
|
|
void unsetPort();
|
|
void setPort(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Runtime is accepted for the client contract and echoed nowhere: the image IS the runtime unit.
|
|
/// </summary>
|
|
utility::string_t getRuntime() const;
|
|
bool runtimeIsSet() const;
|
|
void unsetRuntime();
|
|
void setRuntime(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Shape is a compute size label, echoed back; sizing is the operator's default. Defaults to \"auto\".
|
|
/// </summary>
|
|
utility::string_t getShape() const;
|
|
bool shapeIsSet() const;
|
|
void unsetShape();
|
|
void setShape(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
std::vector<std::shared_ptr<EnvVarJSON>> m_Env;
|
|
bool m_EnvIsSet;
|
|
|
|
int64_t m_Gpu;
|
|
bool m_GpuIsSet;
|
|
|
|
utility::string_t m_Image;
|
|
bool m_ImageIsSet;
|
|
|
|
int64_t m_MaxScale;
|
|
bool m_MaxScaleIsSet;
|
|
|
|
int64_t m_MinScale;
|
|
bool m_MinScaleIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
int64_t m_Port;
|
|
bool m_PortIsSet;
|
|
|
|
utility::string_t m_Runtime;
|
|
bool m_RuntimeIsSet;
|
|
|
|
utility::string_t m_Shape;
|
|
bool m_ShapeIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_RunReq_H_ */
|