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.
196 lines
6.0 KiB
C++
196 lines
6.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.
|
|
*/
|
|
|
|
/*
|
|
* DeploymentView.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_DeploymentView_H_
|
|
#define HANZO_MODEL_DeploymentView_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class DeploymentView
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
DeploymentView();
|
|
virtual ~DeploymentView();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// DeploymentView members
|
|
|
|
|
|
/// <summary>
|
|
/// ApplicationID is the app this deployed — the app's `id`, not its slug.
|
|
/// </summary>
|
|
utility::string_t getApplicationId() const;
|
|
bool applicationIdIsSet() const;
|
|
void unsetApplicationId();
|
|
void setApplicationId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// BuildID is the build record behind a git deploy, whose logs and status live at /v1/platform/builds. Empty for an image deploy.
|
|
/// </summary>
|
|
utility::string_t getBuildId() const;
|
|
bool buildIdIsSet() const;
|
|
void unsetBuildId();
|
|
void setBuildId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Commit is the git ref this built — the commit a deploy or a push named, else the app's branch. Empty for an image deploy, which builds nothing.
|
|
/// </summary>
|
|
utility::string_t getCommit() const;
|
|
bool commitIsSet() const;
|
|
void unsetCommit();
|
|
void setCommit(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// CreatedAt is when the attempt was recorded, unix seconds.
|
|
/// </summary>
|
|
int64_t getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(int64_t value);
|
|
|
|
/// <summary>
|
|
/// ID is the deployment's id (`dep_…`), minted when the attempt is recorded. The app's currentDeploymentId points at one of these.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Image is the full `repo:tag` this deployment put in the CR. For a git deploy it is the ref the in-cluster build pushes to, known before the build runs.
|
|
/// </summary>
|
|
utility::string_t getImage() const;
|
|
bool imageIsSet() const;
|
|
void unsetImage();
|
|
void setImage(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Message is why this attempt is not live: the failure, or the note that a newer deployment went live before this build finished. Empty while it is fine.
|
|
/// </summary>
|
|
utility::string_t getMessage() const;
|
|
bool messageIsSet() const;
|
|
void unsetMessage();
|
|
void setMessage(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Org is the tenant the deployment belongs to, from the validated identity.
|
|
/// </summary>
|
|
utility::string_t getOrg() const;
|
|
bool orgIsSet() const;
|
|
void unsetOrg();
|
|
void setOrg(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Source is which lane produced it: `git` (built from the repo) or `image` (an already-built ref deployed as-is, including promote and rollback).
|
|
/// </summary>
|
|
utility::string_t getSource() const;
|
|
bool sourceIsSet() const;
|
|
void unsetSource();
|
|
void setSource(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Status is where the attempt got to: `building` while its image is being built, `deploying` once its CR reached the cluster — which is the terminal success state, the app's own status is what turns `live` — `error` with the reason in Message, or `superseded` when a newer version went live first.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// UpdatedAt is its last transition, unix seconds — so for a terminal deployment it is when it reached that state.
|
|
/// </summary>
|
|
int64_t getUpdatedAt() const;
|
|
bool updatedAtIsSet() const;
|
|
void unsetUpdatedAt();
|
|
void setUpdatedAt(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Version counts this app's deployments, from 1 and monotonically. It is what ORDERS them: a deploy only goes live if no higher version already is, so a build that finishes late is superseded instead of overwriting a newer one.
|
|
/// </summary>
|
|
int64_t getVersion() const;
|
|
bool versionIsSet() const;
|
|
void unsetVersion();
|
|
void setVersion(int64_t value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_ApplicationId;
|
|
bool m_ApplicationIdIsSet;
|
|
|
|
utility::string_t m_BuildId;
|
|
bool m_BuildIdIsSet;
|
|
|
|
utility::string_t m_Commit;
|
|
bool m_CommitIsSet;
|
|
|
|
int64_t m_CreatedAt;
|
|
bool m_CreatedAtIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Image;
|
|
bool m_ImageIsSet;
|
|
|
|
utility::string_t m_Message;
|
|
bool m_MessageIsSet;
|
|
|
|
utility::string_t m_Org;
|
|
bool m_OrgIsSet;
|
|
|
|
utility::string_t m_Source;
|
|
bool m_SourceIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
int64_t m_UpdatedAt;
|
|
bool m_UpdatedAtIsSet;
|
|
|
|
int64_t m_Version;
|
|
bool m_VersionIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_DeploymentView_H_ */
|