Files
zeekay 189ce08e51 Regenerate against the document the deployment answers for
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.
2026-09-05 18:07:13 -07:00

236 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.
*/
/*
* CreateAppReq.h
*
*
*/
#ifndef HANZO_MODEL_CreateAppReq_H_
#define HANZO_MODEL_CreateAppReq_H_
#include <boost/optional.hpp>
#include "hanzo/ModelBase.h"
#include "hanzo/model/EnvVarJSON.h"
#include <cpprest/details/basic_types.h>
#include "hanzo/model/ImageOrigin.h"
#include <vector>
#include "hanzo/model/GitOrigin.h"
namespace hanzo {
namespace model {
class EnvVarJSON;
class ImageOrigin;
class GitOrigin;
class CreateAppReq
: public ModelBase
{
public:
CreateAppReq();
virtual ~CreateAppReq();
/////////////////////////////////////////////
/// 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;
/////////////////////////////////////////////
/// CreateAppReq members
/// <summary>
/// BuildType is &#x60;pack&#x60; — the zero-config default that detects any project — or &#x60;dockerfile&#x60;, the explicit escape hatch. An image app never builds.
/// </summary>
utility::string_t getBuildType() const;
bool buildTypeIsSet() const;
void unsetBuildType();
void setBuildType(const utility::string_t& value);
/// <summary>
/// Description is free text about what the application is.
/// </summary>
utility::string_t getDescription() const;
bool descriptionIsSet() const;
void unsetDescription();
void setDescription(const utility::string_t& value);
/// <summary>
/// Dockerfile is the path to build from, for buildType &#x60;dockerfile&#x60;.
/// </summary>
utility::string_t getDockerfile() const;
bool dockerfileIsSet() const;
void unsetDockerfile();
void setDockerfile(const utility::string_t& value);
/// <summary>
/// Domains are extra ingress hosts. The canonical default host is always attached; a bare custom host is refused here and must go through add-domain → verify first.
/// </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 application&#39;s environment. Keys must match &#x60;^[A-Za-z_][A-Za-z0-9_]*$&#x60;; a variable marked &#x60;secret: true&#x60; is sealed into KMS and its plaintext is never written to the database.
/// </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 (\&quot;production\&quot; by default).
/// </summary>
utility::string_t getEnvironment() const;
bool environmentIsSet() const;
void unsetEnvironment();
void setEnvironment(const utility::string_t& value);
/// <summary>
/// Image is the container image to run, for source &#x60;image&#x60;.
/// </summary>
std::shared_ptr<ImageOrigin> getImage() const;
bool imageIsSet() const;
void unsetImage();
void setImage(const std::shared_ptr<ImageOrigin>& value);
/// <summary>
/// Name is the application&#39;s display name. Required; the slug is derived from it when none is given.
/// </summary>
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
/// <summary>
/// Port is the container port the app listens on.
/// </summary>
int64_t getPort() const;
bool portIsSet() const;
void unsetPort();
void setPort(int64_t value);
/// <summary>
/// Project is the project to create the application under, from the path.
/// </summary>
utility::string_t getProject() const;
bool projectIsSet() const;
void unsetProject();
void setProject(const utility::string_t& value);
/// <summary>
/// Replicas is how many copies to run; clamped to the deployment&#39;s limit rather than refused.
/// </summary>
int64_t getReplicas() const;
bool replicasIsSet() const;
void unsetReplicas();
void setReplicas(int64_t value);
/// <summary>
/// Repo is the git source to build from, for source &#x60;git&#x60;.
/// </summary>
std::shared_ptr<GitOrigin> getRepo() const;
bool repoIsSet() const;
void unsetRepo();
void setRepo(const std::shared_ptr<GitOrigin>& value);
/// <summary>
/// Slug is the app&#39;s identity in the cluster — its CR name and part of its host. Given or derived from Name, it must match &#x60;^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$&#x60;, and one already used in this project is 409.
/// </summary>
utility::string_t getSlug() const;
bool slugIsSet() const;
void unsetSlug();
void setSlug(const utility::string_t& value);
/// <summary>
/// Source is &#x60;git&#x60;, which requires repo.url, or &#x60;image&#x60;, which requires image.repository. Anything else is 400.
/// </summary>
utility::string_t getSource() const;
bool sourceIsSet() const;
void unsetSource();
void setSource(const utility::string_t& value);
/// <summary>
/// StorageGB is the persistent volume size in GiB; absent means stateless. Clamped to the deployment&#39;s limit rather than refused.
/// </summary>
int64_t getStorageGb() const;
bool storageGbIsSet() const;
void unsetStorageGb();
void setStorageGb(int64_t value);
protected:
utility::string_t m_BuildType;
bool m_BuildTypeIsSet;
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;
std::shared_ptr<ImageOrigin> m_Image;
bool m_ImageIsSet;
utility::string_t m_Name;
bool m_NameIsSet;
int64_t m_Port;
bool m_PortIsSet;
utility::string_t m_Project;
bool m_ProjectIsSet;
int64_t m_Replicas;
bool m_ReplicasIsSet;
std::shared_ptr<GitOrigin> m_Repo;
bool m_RepoIsSet;
utility::string_t m_Slug;
bool m_SlugIsSet;
utility::string_t m_Source;
bool m_SourceIsSet;
int64_t m_StorageGb;
bool m_StorageGbIsSet;
};
}
}
#endif /* HANZO_MODEL_CreateAppReq_H_ */