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.
119 lines
3.1 KiB
C++
119 lines
3.1 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.
|
|
*/
|
|
|
|
/*
|
|
* FleetMetrics.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_FleetMetrics_H_
|
|
#define HANZO_MODEL_FleetMetrics_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class FleetMetrics
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
FleetMetrics();
|
|
virtual ~FleetMetrics();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// FleetMetrics members
|
|
|
|
|
|
/// <summary>
|
|
/// At is when this reading was MEASURED, RFC 3339 in UTC — not when the board was built. A console decides staleness by comparing it to now; the board deliberately does not decide that for it.
|
|
/// </summary>
|
|
utility::string_t getAt() const;
|
|
bool atIsSet() const;
|
|
void unsetAt();
|
|
void setAt(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// GPUUtil is aggregate accelerator utilization as a FRACTION of 1 — 0.42 is 42% busy, never 42. Across all of the unit's cards, not one of them.
|
|
/// </summary>
|
|
double getGpuUtil() const;
|
|
bool gpuUtilIsSet() const;
|
|
void unsetGpuUtil();
|
|
void setGpuUtil(double value);
|
|
|
|
/// <summary>
|
|
/// Load1 is the host's 1-minute load average — runnable processes, not a percentage, so it is read against the unit's core count and can exceed 1.
|
|
/// </summary>
|
|
double getLoad1() const;
|
|
bool load1IsSet() const;
|
|
void unsetLoad1();
|
|
void setLoad1(double value);
|
|
|
|
/// <summary>
|
|
/// MemFree is host memory still available, in BYTES. It is what the source reported, not fleetSpec.Memory minus MemUsed.
|
|
/// </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);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_At;
|
|
bool m_AtIsSet;
|
|
|
|
double m_GpuUtil;
|
|
bool m_GpuUtilIsSet;
|
|
|
|
double m_Load1;
|
|
bool m_Load1IsSet;
|
|
|
|
int64_t m_MemFree;
|
|
bool m_MemFreeIsSet;
|
|
|
|
int64_t m_MemUsed;
|
|
bool m_MemUsedIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_FleetMetrics_H_ */
|