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

118 lines
5.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.
*/
/*
* Capabilities.h
*
*
*/
#ifndef HANZO_MODEL_Capabilities_H_
#define HANZO_MODEL_Capabilities_H_
#include <boost/optional.hpp>
#include "hanzo/ModelBase.h"
namespace hanzo {
namespace model {
class Capabilities
: public ModelBase
{
public:
Capabilities();
virtual ~Capabilities();
/////////////////////////////////////////////
/// 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;
/////////////////////////////////////////////
/// Capabilities members
/// <summary>
/// Actions is whether the transport renders an INTERACTIVE control natively, and it is the flag to read before composing one. The vocabulary is a closed kind-tagged union (envelope.go), exactly four kinds, each carrying only its own field plus an optional label: command — a bot command to run (&#x60;command&#x60;), rendered as a button that invokes it. url — an external link (&#x60;url&#x60;), rendered as a link button. select — a menu (&#x60;options&#x60;, each a label and the value choosing it returns), rendered as a picker. approval — a reference to an approval request (&#x60;approval.id&#x60;), rendered as approve/deny controls bound to that id. False on every transport, and nothing refuses a send for it: actions are accepted, validated per kind, and flattened by renderText to one line each after the text — &#x60;[label] command&#x60;, &#x60;[label] url&#x60;, &#x60;[label] opt | opt&#x60;, &#x60;[label] approval requested: &lt;id&gt;&#x60;. So a caller that needs a real control must read this flag and degrade itself; a caller that only needs the choice communicated can send actions and take the text form.
/// </summary>
bool isActions() const;
bool actionsIsSet() const;
void unsetActions();
void setActions(bool value);
/// <summary>
/// DM is whether the transport carries a DIRECT message at all. True for slack, teams, telegram and whatsapp — whatsapp is nothing else, since the Cloud API addresses a person&#39;s number and there is no room a third party joins. False for discord, honestly: that ingress is guild-scoped slash commands — an interaction without a guild id is refused at the endpoint — so nothing ever arrives classified as a DM, no reply route is ever learned for one, and a send addressed at a Discord DM is refused 409.
/// </summary>
bool isDm() const;
bool dmIsSet() const;
void unsetDm();
void setDm(bool value);
/// <summary>
/// Group is whether the transport carries multi-person rooms — a Discord guild channel, a Slack channel, a Teams channel or group chat, a Telegram group or supergroup. False on whatsapp alone, which has no such room to carry.
/// </summary>
bool isGroup() const;
bool groupIsSet() const;
void unsetGroup();
void setGroup(bool value);
/// <summary>
/// Media is whether the transport renders an ATTACHMENT natively. False everywhere, and a send is not refused for it: renderText flattens each attachment to one &#x60;kind: url (mime)&#x60; line after the text rather than dropping it. A transport whose egress passes the raw text straight through would drop the attachment instead, and an attachment-only send would reach the platform with nothing to say — which is why the flag and the flattening are pinned together.
/// </summary>
bool isMedia() const;
bool mediaIsSet() const;
void unsetMedia();
void setMedia(bool value);
/// <summary>
/// Thread is whether a reply can be threaded UNDER a specific message. True for slack alone: it is the only transport whose ingress reports a thread (thread_ts, published as the envelope&#39;s replyTo) and whose send posts back into it. Discord&#39;s replyTo makes an inline reply rather than a thread, Telegram&#39;s and WhatsApp&#39;s each quote one message, and Teams carries no reply target at all — a replyTo sent to it is ignored.
/// </summary>
bool isThread() const;
bool threadIsSet() const;
void unsetThread();
void setThread(bool value);
protected:
bool m_Actions;
bool m_ActionsIsSet;
bool m_Dm;
bool m_DmIsSet;
bool m_Group;
bool m_GroupIsSet;
bool m_Media;
bool m_MediaIsSet;
bool m_Thread;
bool m_ThreadIsSet;
};
}
}
#endif /* HANZO_MODEL_Capabilities_H_ */