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.
240 lines
6.6 KiB
C++
240 lines
6.6 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.
|
|
*/
|
|
|
|
/*
|
|
* SampleView.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_SampleView_H_
|
|
#define HANZO_MODEL_SampleView_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class SampleView
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
SampleView();
|
|
virtual ~SampleView();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// SampleView members
|
|
|
|
|
|
/// <summary>
|
|
/// At is when the reading was MEASURED, RFC 3339 in UTC — the x-axis a chart plots against. The series is returned oldest first, so it only increases.
|
|
/// </summary>
|
|
utility::string_t getAt() const;
|
|
bool atIsSet() const;
|
|
void unsetAt();
|
|
void setAt(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// CostCents is what this unit resold for over the hour the reading falls in, in whole US cents. 0 means UNPRICED, not free: the operator's own machines — a linked run-target, a dialed-in BYO worker — are metered for utilization and never resold, so only a priced source ever fills it.
|
|
/// </summary>
|
|
int64_t getCostCents() const;
|
|
bool costCentsIsSet() const;
|
|
void unsetCostCents();
|
|
void setCostCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// CPUs is logical cores. The static capability rides every row on purpose: a chart can size load against cores without joining a registry whose row may since have been rewritten or the unit deregistered.
|
|
/// </summary>
|
|
int64_t getCpus() const;
|
|
bool cpusIsSet() const;
|
|
void unsetCpus();
|
|
void setCpus(int64_t value);
|
|
|
|
/// <summary>
|
|
/// GPUModel names the representative accelerator (\"GB10\"); GPUs carries how many.
|
|
/// </summary>
|
|
utility::string_t getGpuModel() const;
|
|
bool gpuModelIsSet() const;
|
|
void unsetGpuModel();
|
|
void setGpuModel(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// GPUUtil is aggregate accelerator utilization as a FRACTION of 1 — 0.42 is 42% busy. Anything a reporter sends outside 0..1 is clamped into it on write.
|
|
/// </summary>
|
|
double getGpuUtil() const;
|
|
bool gpuUtilIsSet() const;
|
|
void unsetGpuUtil();
|
|
void setGpuUtil(double value);
|
|
|
|
/// <summary>
|
|
/// GPUs is how many accelerators the reading covers.
|
|
/// </summary>
|
|
int64_t getGpus() const;
|
|
bool gpusIsSet() const;
|
|
void unsetGpus();
|
|
void setGpus(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Host is the hostname the unit reported at the time of the reading.
|
|
/// </summary>
|
|
utility::string_t getHost() const;
|
|
bool hostIsSet() const;
|
|
void unsetHost();
|
|
void setHost(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Kind is what the measured unit is: laptop, cloud, gpu, cluster, machine or worker.
|
|
/// </summary>
|
|
utility::string_t getKind() const;
|
|
bool kindIsSet() const;
|
|
void unsetKind();
|
|
void setKind(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Load1 is the 1-minute load average — runnable processes, not a percentage.
|
|
/// </summary>
|
|
double getLoad1() const;
|
|
bool load1IsSet() const;
|
|
void unsetLoad1();
|
|
void setLoad1(double value);
|
|
|
|
/// <summary>
|
|
/// Load15 is the 15-minute load average, the same units as Load1.
|
|
/// </summary>
|
|
double getLoad15() const;
|
|
bool load15IsSet() const;
|
|
void unsetLoad15();
|
|
void setLoad15(double value);
|
|
|
|
/// <summary>
|
|
/// Load5 is the 5-minute load average, the same units as Load1.
|
|
/// </summary>
|
|
double getLoad5() const;
|
|
bool load5IsSet() const;
|
|
void unsetLoad5();
|
|
void setLoad5(double value);
|
|
|
|
/// <summary>
|
|
/// MemFree is host memory available, in BYTES, as reported rather than derived.
|
|
/// </summary>
|
|
int64_t getMemFree() const;
|
|
bool memFreeIsSet() const;
|
|
void unsetMemFree();
|
|
void setMemFree(int64_t value);
|
|
|
|
/// <summary>
|
|
/// MemUsed is host memory in use, in BYTES.
|
|
/// </summary>
|
|
int64_t getMemUsed() const;
|
|
bool memUsedIsSet() const;
|
|
void unsetMemUsed();
|
|
void setMemUsed(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Memory is total system RAM in BYTES at the time of the reading.
|
|
/// </summary>
|
|
int64_t getMemory() const;
|
|
bool memoryIsSet() const;
|
|
void unsetMemory();
|
|
void setMemory(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Source is the plane that reported the reading: \"agent\", \"byo\" or \"visor\" — the same vocabulary the board's rows carry, and what ?source= narrows on.
|
|
/// </summary>
|
|
utility::string_t getSource() const;
|
|
bool sourceIsSet() const;
|
|
void unsetSource();
|
|
void setSource(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Unit is the source's own id for the measured unit. With Source it is the key the chart groups by, and the key the board joins a unit's latest reading on.
|
|
/// </summary>
|
|
utility::string_t getUnit() const;
|
|
bool unitIsSet() const;
|
|
void unsetUnit();
|
|
void setUnit(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_At;
|
|
bool m_AtIsSet;
|
|
|
|
int64_t m_CostCents;
|
|
bool m_CostCentsIsSet;
|
|
|
|
int64_t m_Cpus;
|
|
bool m_CpusIsSet;
|
|
|
|
utility::string_t m_GpuModel;
|
|
bool m_GpuModelIsSet;
|
|
|
|
double m_GpuUtil;
|
|
bool m_GpuUtilIsSet;
|
|
|
|
int64_t m_Gpus;
|
|
bool m_GpusIsSet;
|
|
|
|
utility::string_t m_Host;
|
|
bool m_HostIsSet;
|
|
|
|
utility::string_t m_Kind;
|
|
bool m_KindIsSet;
|
|
|
|
double m_Load1;
|
|
bool m_Load1IsSet;
|
|
|
|
double m_Load15;
|
|
bool m_Load15IsSet;
|
|
|
|
double m_Load5;
|
|
bool m_Load5IsSet;
|
|
|
|
int64_t m_MemFree;
|
|
bool m_MemFreeIsSet;
|
|
|
|
int64_t m_MemUsed;
|
|
bool m_MemUsedIsSet;
|
|
|
|
int64_t m_Memory;
|
|
bool m_MemoryIsSet;
|
|
|
|
utility::string_t m_Source;
|
|
bool m_SourceIsSet;
|
|
|
|
utility::string_t m_Unit;
|
|
bool m_UnitIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_SampleView_H_ */
|