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.
132 lines
5.5 KiB
C++
132 lines
5.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.
|
|
*/
|
|
|
|
/*
|
|
* AllowlistView.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_AllowlistView_H_
|
|
#define HANZO_MODEL_AllowlistView_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <map>
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class AllowlistView
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
AllowlistView();
|
|
virtual ~AllowlistView();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// AllowlistView members
|
|
|
|
|
|
/// <summary>
|
|
/// AccessGroups is the org's named sender sets, as group name -> channel -> member entries, held once for the whole org. A DM or Group entry written `accessGroup:<name>` admits any sender listed under that name for THIS channel, or under the channel `*`, which is how one set covers every transport at once. Replaced wholesale by the PUT.
|
|
/// </summary>
|
|
std::map<utility::string_t, std::map<utility::string_t, std::vector<utility::string_t>>> getAccessGroups() const;
|
|
bool accessGroupsIsSet() const;
|
|
void unsetAccessGroups();
|
|
void setAccessGroups(const std::map<utility::string_t, std::map<utility::string_t, std::vector<utility::string_t>>>& value);
|
|
|
|
/// <summary>
|
|
/// DM is the CONFIG-managed DM allow entries — the list PUT /v1/channel/allowlist owns and replaces wholesale. An entry matches a sender either EXACTLY, as the transport-native id inbox messages carry, or as `accessGroup:<name>` resolved through AccessGroups. A bare `*` admits everyone, but only while DMPolicy is \"open\": it is gate syntax, not an identity, so under \"allowlist\" it matches nobody.
|
|
/// </summary>
|
|
std::vector<utility::string_t> getDm() const;
|
|
bool dmIsSet() const;
|
|
void unsetDm();
|
|
void setDm(const std::vector<utility::string_t>& value);
|
|
|
|
/// <summary>
|
|
/// DMPolicy decides every inbound DIRECT message, defaulting to \"pairing\" when the org has never set one. \"pairing\": a sender with no entry is sent a pairing code and the message is DROPPED — it never reaches the inbox — and they are admitted only once an admin approves. \"allowlist\": only DM admits, and Paired senders are suspended, since a pairing grant counts under \"pairing\" alone. \"open\" is not unconditional either — it still requires `*` or a matching entry in DM.
|
|
/// </summary>
|
|
utility::string_t getDmPolicy() const;
|
|
bool dmPolicyIsSet() const;
|
|
void unsetDmPolicy();
|
|
void setDmPolicy(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Group is the CONFIG-managed group allow entries, consulted only while GroupPolicy is \"allowlist\". Entries match the same two ways as DM, and here a bare `*` admits every sender in the room.
|
|
/// </summary>
|
|
std::vector<utility::string_t> getGroup() const;
|
|
bool groupIsSet() const;
|
|
void unsetGroup();
|
|
void setGroup(const std::vector<utility::string_t>& value);
|
|
|
|
/// <summary>
|
|
/// GroupPolicy decides every inbound GROUP or THREAD message — a thread is a group surface — defaulting to \"open\". \"open\" admits every sender in the room. \"allowlist\" admits only what Group lists, so an EMPTY Group blocks the channel's group rooms outright. \"disabled\" drops all of them.
|
|
/// </summary>
|
|
utility::string_t getGroupPolicy() const;
|
|
bool groupPolicyIsSet() const;
|
|
void unsetGroupPolicy();
|
|
void setGroupPolicy(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Paired is the senders admitted by PAIRING — the entries POST /v1/channel/pairing/approve minted, DM scope only. READ-ONLY on this endpoint: the PUT writes config entries and can never revoke one of these (listing a paired sender under DM instead promotes that entry to config, which the admin then owns). They admit only while DMPolicy is \"pairing\".
|
|
/// </summary>
|
|
std::vector<utility::string_t> getPaired() const;
|
|
bool pairedIsSet() const;
|
|
void unsetPaired();
|
|
void setPaired(const std::vector<utility::string_t>& value);
|
|
|
|
|
|
protected:
|
|
std::map<utility::string_t, std::map<utility::string_t, std::vector<utility::string_t>>> m_AccessGroups;
|
|
bool m_AccessGroupsIsSet;
|
|
|
|
std::vector<utility::string_t> m_Dm;
|
|
bool m_DmIsSet;
|
|
|
|
utility::string_t m_DmPolicy;
|
|
bool m_DmPolicyIsSet;
|
|
|
|
std::vector<utility::string_t> m_Group;
|
|
bool m_GroupIsSet;
|
|
|
|
utility::string_t m_GroupPolicy;
|
|
bool m_GroupPolicyIsSet;
|
|
|
|
std::vector<utility::string_t> m_Paired;
|
|
bool m_PairedIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_AllowlistView_H_ */
|