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.
353 lines
13 KiB
C++
353 lines
13 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.
|
|
*/
|
|
|
|
/*
|
|
* ProjectsProject.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_ProjectsProject_H_
|
|
#define HANZO_MODEL_ProjectsProject_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include "hanzo/model/ProjectsRepo.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <map>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class ProjectsRepo;
|
|
|
|
|
|
class ProjectsProject
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
ProjectsProject();
|
|
virtual ~ProjectsProject();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// ProjectsProject members
|
|
|
|
|
|
/// <summary>
|
|
/// Analytics is whether the web-analytics beacon is injected into this site's pages. It is ON by default — a project has to opt out — and it is what the static builder reads to decide whether to inject at all.
|
|
/// </summary>
|
|
bool isAnalytics() const;
|
|
bool analyticsIsSet() const;
|
|
void unsetAnalytics();
|
|
void setAnalytics(bool value);
|
|
|
|
/// <summary>
|
|
/// Bucket is the object-store bucket the site's files are served out of.
|
|
/// </summary>
|
|
utility::string_t getBucket() const;
|
|
bool bucketIsSet() const;
|
|
void unsetBucket();
|
|
void setBucket(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// CacheControl is the Cache-Control policy the edge serves this site's HTML under — how long a reader may hold a stale page before asking again. Assets are content-addressed and are not governed by it.
|
|
/// </summary>
|
|
utility::string_t getCacheControl() const;
|
|
bool cacheControlIsSet() const;
|
|
void unsetCacheControl();
|
|
void setCacheControl(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// CreatedAt is when the project was created, as Unix seconds.
|
|
/// </summary>
|
|
int64_t getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(int64_t value);
|
|
|
|
/// <summary>
|
|
/// CurrentDeploymentID names the deployment currently serving, so a caller can ask what is live without scanning the history.
|
|
/// </summary>
|
|
utility::string_t getCurrentDeploymentId() const;
|
|
bool currentDeploymentIdIsSet() const;
|
|
void unsetCurrentDeploymentId();
|
|
void setCurrentDeploymentId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Description is the one-line summary, which is copied onto forks of this project and shown on a gallery card.
|
|
/// </summary>
|
|
utility::string_t getDescription() const;
|
|
bool descriptionIsSet() const;
|
|
void unsetDescription();
|
|
void setDescription(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ForkedFrom is the parent this project was forked from (\"<org>/<slug>\" of a published project, or a catalog template slug) — the attribution edge a gallery credits.
|
|
/// </summary>
|
|
utility::string_t getForkedFrom() const;
|
|
bool forkedFromIsSet() const;
|
|
void unsetForkedFrom();
|
|
void setForkedFrom(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Framework is a BUILD HINT from a closed set, defaulting to static. It tells CI how to build a linked repo and never gates a deploy, so a wrong value costs a build rather than access.
|
|
/// </summary>
|
|
utility::string_t getFramework() const;
|
|
bool frameworkIsSet() const;
|
|
void unsetFramework();
|
|
void setFramework(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Hidden is PLATFORM MODERATION, and it is a different axis from visibility: it pulls a public project out of the catalogue without editing the publisher's own choice, so un-hiding restores exactly what they asked for. A project is listed only when it is public AND not hidden. Always present, never omitted, for the same reason as visibility.
|
|
/// </summary>
|
|
bool isHidden() const;
|
|
bool hiddenIsSet() const;
|
|
void unsetHidden();
|
|
void setHidden(bool value);
|
|
|
|
/// <summary>
|
|
/// HiddenReason is why moderation hid it. Absent when it is not hidden.
|
|
/// </summary>
|
|
utility::string_t getHiddenReason() const;
|
|
bool hiddenReasonIsSet() const;
|
|
void unsetHiddenReason();
|
|
void setHiddenReason(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ID is the project's internal identifier. It is stable across a rename, but it is not what the API addresses this project by — `slug` is.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Key is the project's publishable ingest key, minted at create. It is the value the injected beacon carries and the ONE thing that attributes this site's events; the static-builder reads it beside analytics. Publishable means it belongs in a page's source: it names a write scope and mints no principal, so it is returned in full rather than masked. Masking it would only mean every caller needed a second endpoint to get the thing the page already ships.
|
|
/// </summary>
|
|
utility::string_t getKey() const;
|
|
bool keyIsSet() const;
|
|
void unsetKey();
|
|
void setKey(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// LastPurgeAt is when the edge cache was last cleared, as Unix seconds, so a console can say how fresh what readers see actually is. Absent means never.
|
|
/// </summary>
|
|
int64_t getLastPurgeAt() const;
|
|
bool lastPurgeAtIsSet() const;
|
|
void unsetLastPurgeAt();
|
|
void setLastPurgeAt(int64_t value);
|
|
|
|
/// <summary>
|
|
/// License is the terms that upstream work carries. Absent has the same reading: undeclared, not unencumbered.
|
|
/// </summary>
|
|
utility::string_t getLicense() const;
|
|
bool licenseIsSet() const;
|
|
void unsetLicense();
|
|
void setLicense(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// LiveURL is where the site answers today. Absent until something has been deployed.
|
|
/// </summary>
|
|
utility::string_t getLiveUrl() const;
|
|
bool liveUrlIsSet() const;
|
|
void unsetLiveUrl();
|
|
void setLiveUrl(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Name is the project's display name, free text a person chose.
|
|
/// </summary>
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Org is the organisation that owns the project, and therefore who pays for it and who may change it. It is also the AUTHORSHIP line a gallery credits; there is no separate author field.
|
|
/// </summary>
|
|
utility::string_t getOrg() const;
|
|
bool orgIsSet() const;
|
|
void unsetOrg();
|
|
void setOrg(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Repo is the git source this project builds from, empty when it is deployed by uploading an artifact instead.
|
|
/// </summary>
|
|
std::shared_ptr<ProjectsRepo> getRepo() const;
|
|
bool repoIsSet() const;
|
|
void unsetRepo();
|
|
void setRepo(const std::shared_ptr<ProjectsRepo>& value);
|
|
|
|
/// <summary>
|
|
/// Slug is the identifier that MATTERS: the handle every later call addresses, the S3 key segment the site's objects live under, and the label of the public host `<slug>.hanzo.app`. Because it is a hostname it is constrained and reserved labels such as `api` are refused.
|
|
/// </summary>
|
|
utility::string_t getSlug() const;
|
|
bool slugIsSet() const;
|
|
void unsetSlug();
|
|
void setSlug(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Space is the project's Base data space, which is where a deployed site's form, forum and data submissions land. Absent means the site stores nothing.
|
|
/// </summary>
|
|
utility::string_t getSpace() const;
|
|
bool spaceIsSet() const;
|
|
void unsetSpace();
|
|
void setSpace(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Starred is THIS CALLER's star, not a property of the project — two people in the same org see different values for the same row, which is the whole point of it. Always present so a client can tell \"not starred\" from \"this API is too old to say\", the same reason visibility and hidden are.
|
|
/// </summary>
|
|
bool isStarred() const;
|
|
bool starredIsSet() const;
|
|
void unsetStarred();
|
|
void setStarred(bool value);
|
|
|
|
/// <summary>
|
|
/// Status is where the project stands — whether a build has ever succeeded and whether anything is serving right now.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Tags is the site's browser tag config: platform slug → non-secret pixel id (GA measurement, Meta pixel, …) — what track.js injects and the server CAPI reads, per site. Omitted when none are set. The API SECRET is never here (KMS).
|
|
/// </summary>
|
|
std::map<utility::string_t, utility::string_t> getTags() const;
|
|
bool tagsIsSet() const;
|
|
void unsetTags();
|
|
void setTags(const std::map<utility::string_t, utility::string_t>& value);
|
|
|
|
/// <summary>
|
|
/// UpdatedAt is when the project's own record last changed, as Unix seconds. A deploy is not an edit of the project, so this does not move on every publish.
|
|
/// </summary>
|
|
int64_t getUpdatedAt() const;
|
|
bool updatedAtIsSet() const;
|
|
void unsetUpdatedAt();
|
|
void setUpdatedAt(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Upstream credits the third-party work this project was published from — a free-text line, because the honest answer is a name and a title that no enum could hold. Absent means NOBODY HAS SAID, not that there is nothing to say.
|
|
/// </summary>
|
|
utility::string_t getUpstream() const;
|
|
bool upstreamIsSet() const;
|
|
void unsetUpstream();
|
|
void setUpstream(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Visibility is \"public\" or \"private\", and Hidden reports platform moderation. Both are always present (never omitempty) so a consumer can tell a real answer from \"this API is too old to say\" — and so a console never renders a project as public because a field was missing. Authorship is deliberately absent: it is Org, above.
|
|
/// </summary>
|
|
utility::string_t getVisibility() const;
|
|
bool visibilityIsSet() const;
|
|
void unsetVisibility();
|
|
void setVisibility(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
bool m_Analytics;
|
|
bool m_AnalyticsIsSet;
|
|
|
|
utility::string_t m_Bucket;
|
|
bool m_BucketIsSet;
|
|
|
|
utility::string_t m_CacheControl;
|
|
bool m_CacheControlIsSet;
|
|
|
|
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_ForkedFrom;
|
|
bool m_ForkedFromIsSet;
|
|
|
|
utility::string_t m_Framework;
|
|
bool m_FrameworkIsSet;
|
|
|
|
bool m_Hidden;
|
|
bool m_HiddenIsSet;
|
|
|
|
utility::string_t m_HiddenReason;
|
|
bool m_HiddenReasonIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Key;
|
|
bool m_KeyIsSet;
|
|
|
|
int64_t m_LastPurgeAt;
|
|
bool m_LastPurgeAtIsSet;
|
|
|
|
utility::string_t m_License;
|
|
bool m_LicenseIsSet;
|
|
|
|
utility::string_t m_LiveUrl;
|
|
bool m_LiveUrlIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
utility::string_t m_Org;
|
|
bool m_OrgIsSet;
|
|
|
|
std::shared_ptr<ProjectsRepo> m_Repo;
|
|
bool m_RepoIsSet;
|
|
|
|
utility::string_t m_Slug;
|
|
bool m_SlugIsSet;
|
|
|
|
utility::string_t m_Space;
|
|
bool m_SpaceIsSet;
|
|
|
|
bool m_Starred;
|
|
bool m_StarredIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
std::map<utility::string_t, utility::string_t> m_Tags;
|
|
bool m_TagsIsSet;
|
|
|
|
int64_t m_UpdatedAt;
|
|
bool m_UpdatedAtIsSet;
|
|
|
|
utility::string_t m_Upstream;
|
|
bool m_UpstreamIsSet;
|
|
|
|
utility::string_t m_Visibility;
|
|
bool m_VisibilityIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_ProjectsProject_H_ */
|