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.
163 lines
5.1 KiB
C++
163 lines
5.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.
|
|
*/
|
|
|
|
/*
|
|
* GpuView.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_GpuView_H_
|
|
#define HANZO_MODEL_GpuView_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class GpuView
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
GpuView();
|
|
virtual ~GpuView();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// GpuView members
|
|
|
|
|
|
/// <summary>
|
|
/// ID is the card's address: its host machine's id, \"#\", and the card's ordinal within that machine (\"gpu-1#0\"). Stable for as long as the machine is, and the only id a single accelerator has — providers do not name cards.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Location is where the card physically sits, which for every source today is the same value Region carries — the console renders it in its own column.
|
|
/// </summary>
|
|
utility::string_t getLocation() const;
|
|
bool locationIsSet() const;
|
|
void unsetLocation();
|
|
void setLocation(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Machine is the id of the machine holding this card, addressable as-is on /v1/compute/machines/:id.
|
|
/// </summary>
|
|
utility::string_t getMachine() const;
|
|
bool machineIsSet() const;
|
|
void unsetMachine();
|
|
void setMachine(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Memory is the card's VRAM as its own tooling reported it (\"122880 MiB\") — a display string in the reporter's units, not a byte count. BYO cards carry it (nvidia-smi); Visor's machine object states no VRAM, so a rented card leaves it empty and the console renders \"—\" rather than a fabricated 0.
|
|
/// </summary>
|
|
utility::string_t getMemory() const;
|
|
bool memoryIsSet() const;
|
|
void unsetMemory();
|
|
void setMemory(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Model is the accelerator: the model token read out of the size slug for a Visor GPU droplet (\"H100\", \"MI300X\"), or the name nvidia-smi reported for a BYO card (\"NVIDIA GB10\").
|
|
/// </summary>
|
|
utility::string_t getModel() const;
|
|
bool modelIsSet() const;
|
|
void unsetModel();
|
|
void setModel(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Name is the HOST MACHINE's display name, not the card's — every card in a gpu-h100x8 node repeats it. Model is what says which accelerator this is.
|
|
/// </summary>
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Provider distinguishes a BYO accelerator (\"byo\") from a Visor-provisioned one (the host machine's real provider). It is what tells a card the org owns from a card the org rents.
|
|
/// </summary>
|
|
utility::string_t getProvider() const;
|
|
bool providerIsSet() const;
|
|
void unsetProvider();
|
|
void setProvider(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Region is the host machine's provider region slug; \"on-prem\" for a BYO card.
|
|
/// </summary>
|
|
utility::string_t getRegion() const;
|
|
bool regionIsSet() const;
|
|
void unsetRegion();
|
|
void setRegion(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Status is the HOST MACHINE's lifecycle state, because nothing upstream reports a card's own health. A card reads running because its machine does.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Location;
|
|
bool m_LocationIsSet;
|
|
|
|
utility::string_t m_Machine;
|
|
bool m_MachineIsSet;
|
|
|
|
utility::string_t m_Memory;
|
|
bool m_MemoryIsSet;
|
|
|
|
utility::string_t m_Model;
|
|
bool m_ModelIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
utility::string_t m_Provider;
|
|
bool m_ProviderIsSet;
|
|
|
|
utility::string_t m_Region;
|
|
bool m_RegionIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_GpuView_H_ */
|