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.
357 lines
12 KiB
C++
357 lines
12 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.
|
||
*/
|
||
|
||
/*
|
||
* AppView.h
|
||
*
|
||
*
|
||
*/
|
||
|
||
#ifndef HANZO_MODEL_AppView_H_
|
||
#define HANZO_MODEL_AppView_H_
|
||
|
||
#include <boost/optional.hpp>
|
||
|
||
#include "hanzo/ModelBase.h"
|
||
|
||
#include "hanzo/model/EnvVarJSON.h"
|
||
#include "hanzo/model/ImageView.h"
|
||
#include <cpprest/details/basic_types.h>
|
||
#include <vector>
|
||
#include "hanzo/model/GitSource.h"
|
||
|
||
namespace hanzo {
|
||
namespace model {
|
||
|
||
class EnvVarJSON;
|
||
class ImageView;
|
||
class GitSource;
|
||
|
||
|
||
class AppView
|
||
: public ModelBase
|
||
{
|
||
public:
|
||
AppView();
|
||
virtual ~AppView();
|
||
|
||
/////////////////////////////////////////////
|
||
/// 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;
|
||
|
||
|
||
/////////////////////////////////////////////
|
||
/// AppView members
|
||
|
||
|
||
/// <summary>
|
||
/// BuildType is how a git app builds: `pack`, the zero-config default that detects the project, or `dockerfile`. An image app carries `image`, which means it never builds.
|
||
/// </summary>
|
||
utility::string_t getBuildType() const;
|
||
bool buildTypeIsSet() const;
|
||
void unsetBuildType();
|
||
void setBuildType(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// CreatedAt is when the app was created, unix seconds.
|
||
/// </summary>
|
||
int64_t getCreatedAt() const;
|
||
bool createdAtIsSet() const;
|
||
void unsetCreatedAt();
|
||
void setCreatedAt(int64_t value);
|
||
|
||
/// <summary>
|
||
/// CurrentDeploymentID is the deployment that is live — the pointer a deploy advances monotonically by version, so it never regresses to an older one. Empty until the first deploy reaches the cluster.
|
||
/// </summary>
|
||
utility::string_t getCurrentDeploymentId() const;
|
||
bool currentDeploymentIdIsSet() const;
|
||
void unsetCurrentDeploymentId();
|
||
void setCurrentDeploymentId(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Description is free text about what the app is. Nothing derives from it.
|
||
/// </summary>
|
||
utility::string_t getDescription() const;
|
||
bool descriptionIsSet() const;
|
||
void unsetDescription();
|
||
void setDescription(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Dockerfile is the path inside the repo to build from, for buildType `dockerfile`. The build path keys off its presence, and it is validated at create against the same allowlist the privileged build enforces.
|
||
/// </summary>
|
||
utility::string_t getDockerfile() const;
|
||
bool dockerfileIsSet() const;
|
||
void unsetDockerfile();
|
||
void setDockerfile(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Domains are the ingress hosts rendered into the app's CR, its own `<slug>.<org>.<sites host>` first. That one is seeded at create and cannot be removed; a custom host joins only after add-domain and DNS verification.
|
||
/// </summary>
|
||
std::vector<utility::string_t> getDomains() const;
|
||
bool domainsIsSet() const;
|
||
void unsetDomains();
|
||
void setDomains(const std::vector<utility::string_t>& value);
|
||
|
||
/// <summary>
|
||
/// Env is the app's environment variables, with every SECRET value masked to \"\" — the plaintext is in KMS and this surface never echoes it. That masking is why an empty secret value means \"keep what is sealed\" when posted back.
|
||
/// </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>
|
||
/// Environment is the deploy target this app names, `production` when none was given. It is a LABEL: /v1/platform/environments derives the environment list from the apps that name one, so an environment exists as long as an app points at it and no route creates or deletes one.
|
||
/// </summary>
|
||
utility::string_t getEnvironment() const;
|
||
bool environmentIsSet() const;
|
||
void unsetEnvironment();
|
||
void setEnvironment(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Health rolls ready-vs-desired replicas up to a colour: green (all ready), yellow (some ready, or deliberately scaled to zero), red (none), or \"\" when the cluster reports no replica counts at all — unknown, never a guessed green.
|
||
/// </summary>
|
||
utility::string_t getHealth() const;
|
||
bool healthIsSet() const;
|
||
void unsetHealth();
|
||
void setHealth(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// ID is the server-minted application id (`app_…`). Routes address an app by project and slug; this is the key its deployments and builds carry.
|
||
/// </summary>
|
||
utility::string_t getId() const;
|
||
bool idIsSet() const;
|
||
void unsetId();
|
||
void setId(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Image is the image a source `image` app runs. For a git app only the tag is filled, stamped by the deploy that went live; the built ref is on the deployment.
|
||
/// </summary>
|
||
std::shared_ptr<ImageView> getImage() const;
|
||
bool imageIsSet() const;
|
||
void unsetImage();
|
||
void setImage(const std::shared_ptr<ImageView>& value);
|
||
|
||
/// <summary>
|
||
/// Name is the display name. It is not an address — the slug is.
|
||
/// </summary>
|
||
utility::string_t getName() const;
|
||
bool nameIsSet() const;
|
||
void unsetName();
|
||
void setName(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Namespace is where the app's cluster objects live, `tenant-<org>`. It is derived from the validated org and is never accepted from a request.
|
||
/// </summary>
|
||
utility::string_t getRNamespace() const;
|
||
bool rNamespaceIsSet() const;
|
||
void unsetr_namespace();
|
||
void setRNamespace(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Org is the tenant that owns the app. It comes from the validated identity, never from the request, and it is the boundary every route is scoped to.
|
||
/// </summary>
|
||
utility::string_t getOrg() const;
|
||
bool orgIsSet() const;
|
||
void unsetOrg();
|
||
void setOrg(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Phase is the operator's own `status.phase` for the app's Service CR, read from the cluster on this request. Empty when there is no CR yet or the cluster could not be read.
|
||
/// </summary>
|
||
utility::string_t getPhase() const;
|
||
bool phaseIsSet() const;
|
||
void unsetPhase();
|
||
void setPhase(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Port is the container port traffic is sent to. 8080 when the create asked for none, or for one outside 1–65535.
|
||
/// </summary>
|
||
int64_t getPort() const;
|
||
bool portIsSet() const;
|
||
void unsetPort();
|
||
void setPort(int64_t value);
|
||
|
||
/// <summary>
|
||
/// ProjectID is the IAM project the app lives under, and it is that project's NAME — the (org,name) key IAM identifies it by, which is also what the `:project` path segment carries. There is no platform-minted project id.
|
||
/// </summary>
|
||
utility::string_t getProjectId() const;
|
||
bool projectIdIsSet() const;
|
||
void unsetProjectId();
|
||
void setProjectId(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Replicas is how many copies the CR declares. It is CLAMPED to the deployment's ceiling rather than refused, so it can be below what was asked.
|
||
/// </summary>
|
||
int64_t getReplicas() const;
|
||
bool replicasIsSet() const;
|
||
void unsetReplicas();
|
||
void setReplicas(int64_t value);
|
||
|
||
/// <summary>
|
||
/// Repo is the git origin a source `git` app builds from, and the repo+branch a landed push has to match to build it.
|
||
/// </summary>
|
||
std::shared_ptr<GitSource> getRepo() const;
|
||
bool repoIsSet() const;
|
||
void unsetRepo();
|
||
void setRepo(const std::shared_ptr<GitSource>& value);
|
||
|
||
/// <summary>
|
||
/// SecretSync is how far the app's secret env has got into the cluster: \"\"|pending|syncing|ready|failed (secrets.go). It is best-effort and never fails a deploy, so `pending` is ordinary right after one.
|
||
/// </summary>
|
||
utility::string_t getSecretSync() const;
|
||
bool secretSyncIsSet() const;
|
||
void unsetSecretSync();
|
||
void setSecretSync(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// SecretSyncDetail is the honest reason when the sync is not ready — a missing CRD, an RBAC grant, a per-tenant credential. Empty when it is.
|
||
/// </summary>
|
||
utility::string_t getSecretSyncDetail() const;
|
||
bool secretSyncDetailIsSet() const;
|
||
void unsetSecretSyncDetail();
|
||
void setSecretSyncDetail(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Slug is the app's identity in the cluster: the operator CR's name, the first label of its default host, and the `:app` path segment. Unique per project.
|
||
/// </summary>
|
||
utility::string_t getSlug() const;
|
||
bool slugIsSet() const;
|
||
void unsetSlug();
|
||
void setSlug(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Source is what the app deploys FROM: `git`, which builds Repo, or `image`, which runs Image as it is. It decides whether a deploy builds at all.
|
||
/// </summary>
|
||
utility::string_t getSource() const;
|
||
bool sourceIsSet() const;
|
||
void unsetSource();
|
||
void setSource(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// Status is the lifecycle THIS store records: draft (created, nothing in the cluster yet), building, deploying, live, stopped or error. What the cluster itself says is Phase and Health.
|
||
/// </summary>
|
||
utility::string_t getStatus() const;
|
||
bool statusIsSet() const;
|
||
void unsetStatus();
|
||
void setStatus(const utility::string_t& value);
|
||
|
||
/// <summary>
|
||
/// StorageGB is the persistent volume size in GiB. Absent means stateless — no volume at all — and it is clamped like Replicas.
|
||
/// </summary>
|
||
int64_t getStorageGb() const;
|
||
bool storageGbIsSet() const;
|
||
void unsetStorageGb();
|
||
void setStorageGb(int64_t value);
|
||
|
||
/// <summary>
|
||
/// UpdatedAt is when it last changed, unix seconds. Every lifecycle transition moves it, so it tracks deploys as well as edits.
|
||
/// </summary>
|
||
int64_t getUpdatedAt() const;
|
||
bool updatedAtIsSet() const;
|
||
void unsetUpdatedAt();
|
||
void setUpdatedAt(int64_t value);
|
||
|
||
|
||
protected:
|
||
utility::string_t m_BuildType;
|
||
bool m_BuildTypeIsSet;
|
||
|
||
int64_t m_CreatedAt;
|
||
bool m_CreatedAtIsSet;
|
||
|
||
utility::string_t m_CurrentDeploymentId;
|
||
bool m_CurrentDeploymentIdIsSet;
|
||
|
||
utility::string_t m_Description;
|
||
bool m_DescriptionIsSet;
|
||
|
||
utility::string_t m_Dockerfile;
|
||
bool m_DockerfileIsSet;
|
||
|
||
std::vector<utility::string_t> m_Domains;
|
||
bool m_DomainsIsSet;
|
||
|
||
std::vector<std::shared_ptr<EnvVarJSON>> m_Env;
|
||
bool m_EnvIsSet;
|
||
|
||
utility::string_t m_Environment;
|
||
bool m_EnvironmentIsSet;
|
||
|
||
utility::string_t m_Health;
|
||
bool m_HealthIsSet;
|
||
|
||
utility::string_t m_Id;
|
||
bool m_IdIsSet;
|
||
|
||
std::shared_ptr<ImageView> m_Image;
|
||
bool m_ImageIsSet;
|
||
|
||
utility::string_t m_Name;
|
||
bool m_NameIsSet;
|
||
|
||
utility::string_t m_r_namespace;
|
||
bool m_r_namespaceIsSet;
|
||
|
||
utility::string_t m_Org;
|
||
bool m_OrgIsSet;
|
||
|
||
utility::string_t m_Phase;
|
||
bool m_PhaseIsSet;
|
||
|
||
int64_t m_Port;
|
||
bool m_PortIsSet;
|
||
|
||
utility::string_t m_ProjectId;
|
||
bool m_ProjectIdIsSet;
|
||
|
||
int64_t m_Replicas;
|
||
bool m_ReplicasIsSet;
|
||
|
||
std::shared_ptr<GitSource> m_Repo;
|
||
bool m_RepoIsSet;
|
||
|
||
utility::string_t m_SecretSync;
|
||
bool m_SecretSyncIsSet;
|
||
|
||
utility::string_t m_SecretSyncDetail;
|
||
bool m_SecretSyncDetailIsSet;
|
||
|
||
utility::string_t m_Slug;
|
||
bool m_SlugIsSet;
|
||
|
||
utility::string_t m_Source;
|
||
bool m_SourceIsSet;
|
||
|
||
utility::string_t m_Status;
|
||
bool m_StatusIsSet;
|
||
|
||
int64_t m_StorageGb;
|
||
bool m_StorageGbIsSet;
|
||
|
||
int64_t m_UpdatedAt;
|
||
bool m_UpdatedAtIsSet;
|
||
|
||
};
|
||
|
||
|
||
}
|
||
}
|
||
|
||
#endif /* HANZO_MODEL_AppView_H_ */
|