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.
199 lines
7.0 KiB
C++
199 lines
7.0 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.
|
|
*/
|
|
|
|
/*
|
|
* ClusterView.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_ClusterView_H_
|
|
#define HANZO_MODEL_ClusterView_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
#include "hanzo/model/NodePoolView.h"
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class NodePoolView;
|
|
|
|
|
|
class ClusterView
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
ClusterView();
|
|
virtual ~ClusterView();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// ClusterView members
|
|
|
|
|
|
/// <summary>
|
|
/// AmdGPU is the same count for `amd.com/gpu`: AMD accelerators across the BYO cluster's nodes, as of the attach.
|
|
/// </summary>
|
|
int64_t getAmdGpu() const;
|
|
bool amdGpuIsSet() const;
|
|
void unsetAmdGpu();
|
|
void setAmdGpu(int64_t value);
|
|
|
|
/// <summary>
|
|
/// CreatedAt is when the cluster started existing: the earliest creation time among its pools for a managed cluster, and for a BYO one the RFC 3339 moment it was attached. Empty when the source states none.
|
|
/// </summary>
|
|
utility::string_t getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// DoClusterID carries the SAME id as DoksClusterID. Both names exist because the console's Cluster type reads either one; neither is a second identifier.
|
|
/// </summary>
|
|
utility::string_t getDoClusterId() const;
|
|
bool doClusterIdIsSet() const;
|
|
void unsetDoClusterId();
|
|
void setDoClusterId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// DoksClusterID is the provider's own id for the cluster, and the value the /v1/compute/k8s/clusters/:id routes take. Empty for a BYO cluster: an attached kubeconfig was never provisioned, so there is no provider id to state.
|
|
/// </summary>
|
|
utility::string_t getDoksClusterId() const;
|
|
bool doksClusterIdIsSet() const;
|
|
void unsetDoksClusterId();
|
|
void setDoksClusterId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Kind says which of the two kinds of cluster this row is, and there are only two: \"managed\" — Visor provisioned it and Hanzo's account pays the provider — or \"byo\", an existing cluster the org attached by kubeconfig.
|
|
/// </summary>
|
|
utility::string_t getKind() const;
|
|
bool kindIsSet() const;
|
|
void unsetKind();
|
|
void setKind(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Name is the cluster's name: the provider's for a managed cluster, and for a BYO one the lower-cased fleet name it was attached under — which is also how the detach route addresses it.
|
|
/// </summary>
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// NodeCount is how many worker nodes the cluster has — the sum over its pools for a managed cluster, and for a BYO one the node count read off the cluster when it was attached.
|
|
/// </summary>
|
|
int64_t getNodeCount() const;
|
|
bool nodeCountIsSet() const;
|
|
void unsetNodeCount();
|
|
void setNodeCount(int64_t value);
|
|
|
|
/// <summary>
|
|
/// NodePools is the authoritative node inventory — every pool, each with its own size and count. It is empty in two cases that are not \"no pools\": a row from the /v1/compute/k8s/clusters LIST, which is deliberately lightweight and whose :id detail carries them, and a BYO cluster, whose pools were never read.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<NodePoolView>> getNodePools() const;
|
|
bool nodePoolsIsSet() const;
|
|
void unsetNodePools();
|
|
void setNodePools(const std::vector<std::shared_ptr<NodePoolView>>& value);
|
|
|
|
/// <summary>
|
|
/// NodeSize is a display convenience: the size slug of the FIRST pool. A cluster mixing sizes has more than one, and NodePools is where they all are.
|
|
/// </summary>
|
|
utility::string_t getNodeSize() const;
|
|
bool nodeSizeIsSet() const;
|
|
void unsetNodeSize();
|
|
void setNodeSize(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// NvidiaGPU is how many NVIDIA accelerators the cluster's nodes advertise, the sum of `nvidia.com/gpu` allocatable across them. BYO only, and counted ONCE when the cluster was attached — it is an inventory, not live capacity.
|
|
/// </summary>
|
|
int64_t getNvidiaGpu() const;
|
|
bool nvidiaGpuIsSet() const;
|
|
void unsetNvidiaGpu();
|
|
void setNvidiaGpu(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Region is the provider region slug for a managed cluster. A BYO cluster has no region we can read, so it carries the free-form `provider` label the attach named it with (\"gke\", \"on-prem\") instead.
|
|
/// </summary>
|
|
utility::string_t getRegion() const;
|
|
bool regionIsSet() const;
|
|
void unsetRegion();
|
|
void setRegion(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Status is the cluster's state: the provider's own word for a managed cluster (\"running\", \"provisioning\"), \"unknown\" when the provider stated none, and always \"attached\" for a BYO cluster — that one says the kubeconfig is on file, not that the cluster is reachable this second.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
int64_t m_AmdGpu;
|
|
bool m_AmdGpuIsSet;
|
|
|
|
utility::string_t m_CreatedAt;
|
|
bool m_CreatedAtIsSet;
|
|
|
|
utility::string_t m_DoClusterId;
|
|
bool m_DoClusterIdIsSet;
|
|
|
|
utility::string_t m_DoksClusterId;
|
|
bool m_DoksClusterIdIsSet;
|
|
|
|
utility::string_t m_Kind;
|
|
bool m_KindIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
int64_t m_NodeCount;
|
|
bool m_NodeCountIsSet;
|
|
|
|
std::vector<std::shared_ptr<NodePoolView>> m_NodePools;
|
|
bool m_NodePoolsIsSet;
|
|
|
|
utility::string_t m_NodeSize;
|
|
bool m_NodeSizeIsSet;
|
|
|
|
int64_t m_NvidiaGpu;
|
|
bool m_NvidiaGpuIsSet;
|
|
|
|
utility::string_t m_Region;
|
|
bool m_RegionIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_ClusterView_H_ */
|