mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection was 113 commits behind the document it claims to describe, and `generate.py --all --check` reported every one of the thirteen clients DRIFTED — the same +19 models in each, because they all fell behind the same emission. Regenerated in place from hanzo-inc/cloud openapi.yaml at 939b09d4 (sha256 087024f6…), which is the only description of this API that cannot name a route the binary does not serve. `--check` is clean across all thirteen after. .spec-lock moved with the code. The generator READS that file and never writes it — hanzoai/ci`s lane does — so a hand run leaves every lock naming the previous document. A lock that disagrees with the tree beside it is worse than no lock: the next `--check` without `--spec` fetches what production serves, compares it to a digest that was already wrong, and reports drift that is really staleness.
251 lines
8.5 KiB
C++
251 lines
8.5 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.
|
|
*/
|
|
|
|
/*
|
|
* Iam_Key.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_Iam_Key_H_
|
|
#define HANZO_MODEL_Iam_Key_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class Iam_Key
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
Iam_Key();
|
|
virtual ~Iam_Key();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// Iam_Key members
|
|
|
|
|
|
/// <summary>
|
|
/// AccessKey (pk-*) is the publishable identifier and lookup index; AccessSecret (sk-*) is the confidential secret. AccessSecret IS NOT PERSISTED for a key minted at or after the digest change: it carries the secret out to its holder once, in the mint response, and the row keeps only AccessSecretDigest. It stays on the struct because that one-time reveal is the whole point of minting, and it stays in the schema because rows written before the change still hold a plaintext secret that the resolver drains on first use.
|
|
/// </summary>
|
|
utility::string_t getAccessKey() const;
|
|
bool accessKeyIsSet() const;
|
|
void unsetAccessKey();
|
|
void setAccessKey(const utility::string_t& value);
|
|
|
|
utility::string_t getAccessSecret() const;
|
|
bool accessSecretIsSet() const;
|
|
void unsetAccessSecret();
|
|
void setAccessSecret(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// AccessSecretDigest is how a presented secret finds its key: the resolver digests what the caller sent and looks THAT up. It is what lets the row hold no plaintext and still be found in one indexed read — a salted hash cannot be looked up by value, which is the reason the plaintext was here.
|
|
/// </summary>
|
|
utility::string_t getAccessSecretDigest() const;
|
|
bool accessSecretDigestIsSet() const;
|
|
void unsetAccessSecretDigest();
|
|
void setAccessSecretDigest(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Act is the durable, opt-in grant that lets this key act FOR a user in its own org — the credential behind as(): presenting it authorizes minting a short-lived, user-bound token for a member of the key's tenant. Default false, so a server key mints nothing on anyone's behalf until the grant is set deliberately — the capability is never inherited by every key. It is confined at mint time to the key's OWN Owner, and a reserved-org or SuperAdmin target is refused, so the grant reaches only ordinary members of the one tenant that holds the key.
|
|
/// </summary>
|
|
bool isAct() const;
|
|
bool actIsSet() const;
|
|
void unsetAct();
|
|
void setAct(bool value);
|
|
|
|
utility::string_t getApplication() const;
|
|
bool applicationIsSet() const;
|
|
void unsetApplication();
|
|
void setApplication(const utility::string_t& value);
|
|
|
|
utility::datetime getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(const utility::datetime& value);
|
|
|
|
/// <summary>
|
|
/// CreatedTime and UpdatedTime are RFC3339 audit stamps carried as strings for byte-parity with the v1 row (orm.Model separately tracks CreatedAt / UpdatedAt as time.Time for the store's own lifecycle).
|
|
/// </summary>
|
|
utility::string_t getCreatedTime() const;
|
|
bool createdTimeIsSet() const;
|
|
void unsetCreatedTime();
|
|
void setCreatedTime(const utility::string_t& value);
|
|
|
|
bool isDeleted() const;
|
|
bool deletedIsSet() const;
|
|
void unsetDeleted();
|
|
void setDeleted(bool value);
|
|
|
|
/// <summary>
|
|
/// DisplayName is the human-facing label.
|
|
/// </summary>
|
|
utility::string_t getDisplayName() const;
|
|
bool displayNameIsSet() const;
|
|
void unsetDisplayName();
|
|
void setDisplayName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ExpireTime is when the key stops being honored (empty = never). State is the lifecycle flag (\"Active\", \"test\", …); \"test\" mints test-env credentials instead of live ones.
|
|
/// </summary>
|
|
utility::string_t getExpireTime() const;
|
|
bool expireTimeIsSet() const;
|
|
void unsetExpireTime();
|
|
void setExpireTime(const utility::string_t& value);
|
|
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
utility::string_t getOrganization() const;
|
|
bool organizationIsSet() const;
|
|
void unsetOrganization();
|
|
void setOrganization(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Owner is the tenant that holds the key; Name is unique within Owner.
|
|
/// </summary>
|
|
utility::string_t getOwner() const;
|
|
bool ownerIsSet() const;
|
|
void unsetOwner();
|
|
void setOwner(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Scope is the key's ACCESS CLASS, orthogonal to Type (which names the bound principal). Empty (the default, \"secret\") is a full key: a pk- publishable half AND a confidential sk- half, the sk- authenticating a server-side reader. KeyScopePublish is a WRITE-ONLY publishable key — a pk- half only, no secret — that resolves to just an ORG (never a principal) at the ingest endpoint and is safe to ship in client JS. A missing value on an existing row reads as the default, so every pre-Scope key is a secret key unchanged.
|
|
/// </summary>
|
|
utility::string_t getScope() const;
|
|
bool scopeIsSet() const;
|
|
void unsetScope();
|
|
void setScope(const utility::string_t& value);
|
|
|
|
utility::string_t getState() const;
|
|
bool stateIsSet() const;
|
|
void unsetState();
|
|
void setState(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Type is the scope the key is bound to — \"Organization\", \"Application\", \"User\", or \"General\" — and Organization / Application / User name the concrete principal for whichever scope Type selects.
|
|
/// </summary>
|
|
utility::string_t getType() const;
|
|
bool typeIsSet() const;
|
|
void unsetType();
|
|
void setType(const utility::string_t& value);
|
|
|
|
utility::datetime getUpdatedAt() const;
|
|
bool updatedAtIsSet() const;
|
|
void unsetUpdatedAt();
|
|
void setUpdatedAt(const utility::datetime& value);
|
|
|
|
utility::string_t getUpdatedTime() const;
|
|
bool updatedTimeIsSet() const;
|
|
void unsetUpdatedTime();
|
|
void setUpdatedTime(const utility::string_t& value);
|
|
|
|
utility::string_t getUser() const;
|
|
bool userIsSet() const;
|
|
void unsetUser();
|
|
void setUser(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_AccessKey;
|
|
bool m_AccessKeyIsSet;
|
|
|
|
utility::string_t m_AccessSecret;
|
|
bool m_AccessSecretIsSet;
|
|
|
|
utility::string_t m_AccessSecretDigest;
|
|
bool m_AccessSecretDigestIsSet;
|
|
|
|
bool m_Act;
|
|
bool m_ActIsSet;
|
|
|
|
utility::string_t m_Application;
|
|
bool m_ApplicationIsSet;
|
|
|
|
utility::datetime m_CreatedAt;
|
|
bool m_CreatedAtIsSet;
|
|
|
|
utility::string_t m_CreatedTime;
|
|
bool m_CreatedTimeIsSet;
|
|
|
|
bool m_Deleted;
|
|
bool m_DeletedIsSet;
|
|
|
|
utility::string_t m_DisplayName;
|
|
bool m_DisplayNameIsSet;
|
|
|
|
utility::string_t m_ExpireTime;
|
|
bool m_ExpireTimeIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
utility::string_t m_Organization;
|
|
bool m_OrganizationIsSet;
|
|
|
|
utility::string_t m_Owner;
|
|
bool m_OwnerIsSet;
|
|
|
|
utility::string_t m_Scope;
|
|
bool m_ScopeIsSet;
|
|
|
|
utility::string_t m_State;
|
|
bool m_StateIsSet;
|
|
|
|
utility::string_t m_Type;
|
|
bool m_TypeIsSet;
|
|
|
|
utility::datetime m_UpdatedAt;
|
|
bool m_UpdatedAtIsSet;
|
|
|
|
utility::string_t m_UpdatedTime;
|
|
bool m_UpdatedTimeIsSet;
|
|
|
|
utility::string_t m_User;
|
|
bool m_UserIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_Iam_Key_H_ */
|