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.
120 lines
3.6 KiB
C++
120 lines
3.6 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.
|
|
*/
|
|
|
|
/*
|
|
* ProjectsUploadGrant.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_ProjectsUploadGrant_H_
|
|
#define HANZO_MODEL_ProjectsUploadGrant_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <map>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class ProjectsUploadGrant
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
ProjectsUploadGrant();
|
|
virtual ~ProjectsUploadGrant();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// ProjectsUploadGrant members
|
|
|
|
|
|
/// <summary>
|
|
/// ExpiresAt is when the grant stops being accepted, as Unix seconds. It is short-lived by design and is handed out ONCE, on the response that queues the deployment — a later read of that deployment does not carry it, so a grant cannot be fetched again after the build it was minted for.
|
|
/// </summary>
|
|
int64_t getExpiresAt() const;
|
|
bool expiresAtIsSet() const;
|
|
void unsetExpiresAt();
|
|
void setExpiresAt(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Fields are form values every POST must carry VERBATIM, alongside `key` and `file`. The signature covers them, so altering any one of them — including widening the key to reach outside the prefix — invalidates the grant rather than extending it.
|
|
/// </summary>
|
|
std::map<utility::string_t, utility::string_t> getFields() const;
|
|
bool fieldsIsSet() const;
|
|
void unsetFields();
|
|
void setFields(const std::map<utility::string_t, utility::string_t>& value);
|
|
|
|
/// <summary>
|
|
/// MaxBytes bounds ONE object, not the upload as a whole.
|
|
/// </summary>
|
|
int64_t getMaxBytes() const;
|
|
bool maxBytesIsSet() const;
|
|
void unsetMaxBytes();
|
|
void setMaxBytes(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Prefix is the only place this grant can write: the deployment's own key prefix. It authorizes WRITES ONLY, which is why completing a deployment reconciles the prefix against a manifest instead of letting CI delete.
|
|
/// </summary>
|
|
utility::string_t getPrefix() const;
|
|
bool prefixIsSet() const;
|
|
void unsetPrefix();
|
|
void setPrefix(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// URL is the address to POST each object to. It is signed for the PUBLIC endpoint, because the signature covers the host and CI posts from outside the cluster.
|
|
/// </summary>
|
|
utility::string_t getUrl() const;
|
|
bool urlIsSet() const;
|
|
void unsetUrl();
|
|
void setUrl(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
int64_t m_ExpiresAt;
|
|
bool m_ExpiresAtIsSet;
|
|
|
|
std::map<utility::string_t, utility::string_t> m_Fields;
|
|
bool m_FieldsIsSet;
|
|
|
|
int64_t m_MaxBytes;
|
|
bool m_MaxBytesIsSet;
|
|
|
|
utility::string_t m_Prefix;
|
|
bool m_PrefixIsSet;
|
|
|
|
utility::string_t m_Url;
|
|
bool m_UrlIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_ProjectsUploadGrant_H_ */
|