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

241 lines
9.4 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 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.
*/
/*
* MqApi.h
*
*
*/
#ifndef HANZO_API_MqApi_H_
#define HANZO_API_MqApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/Config.h"
#include "hanzo/model/Consumer.h"
#include "hanzo/model/Health.h"
#include "hanzo/model/InfoOut.h"
#include "hanzo/model/MakeIn.h"
#include "hanzo/model/NextIn.h"
#include "hanzo/model/PickOut.h"
#include "hanzo/model/Purge.h"
#include "hanzo/model/PurgeOut.h"
#include "hanzo/model/ReadOut.h"
#include "hanzo/model/Stream.h"
#include "hanzo/model/Streams.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class MqApi
{
public:
explicit MqApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~MqApi();
/// <summary>
/// Removes a stream with all its messages and consumers.
/// </summary>
/// <remarks>
/// Removes a stream with all its messages and consumers. Irreversible.
/// </remarks>
/// <param name="name">Name is the stream name, from the path.</param>
pplx::task<void> deleteMqStreamByName(
utility::string_t name
) const;
/// <summary>
/// Erases one message by sequence; the sequence gap remains.
/// </summary>
/// <remarks>
/// Erases one message by sequence; the sequence gap remains.
/// </remarks>
/// <param name="name">Name is the stream name, from the path.</param>
/// <param name="seq">Seq is the message&#39;s stream sequence, from the path.</param>
pplx::task<void> deleteMqStreamByNameMessageBySeq(
utility::string_t name,
int32_t seq
) const;
/// <summary>
/// Removes a consumer and its delivery state; unacknowledged messages stay in the stream.
/// </summary>
/// <remarks>
/// Removes a consumer and its delivery state; unacknowledged messages stay in the stream.
/// </remarks>
/// <param name="stream">Stream is the stream name, from the path.</param>
/// <param name="name">Name is the consumer name, from the path.</param>
pplx::task<void> deleteMqStreamByStreamConsumerByName(
utility::string_t stream,
utility::string_t name
) const;
/// <summary>
/// Reports whether the message plane behind this surface answers.
/// </summary>
/// <remarks>
/// Reports whether the message plane behind this surface answers.
/// </remarks>
pplx::task<std::shared_ptr<Health>> getMqHealth(
) const;
/// <summary>
/// Returns the broker&#39;s identity and the org&#39;s stream count.
/// </summary>
/// <remarks>
/// Returns the broker&#39;s identity and the org&#39;s stream count.
/// </remarks>
pplx::task<std::shared_ptr<InfoOut>> getMqInfo(
) const;
/// <summary>
/// Returns the org&#39;s streams, name-ordered, with their live state.
/// </summary>
/// <remarks>
/// Returns the org&#39;s streams, name-ordered, with their live state.
/// </remarks>
/// <param name="limit">Limit caps the streams returned (1–1000, default 100). (optional, default to 0L)</param>
/// <param name="offset">Offset skips that many streams, name-ordered. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<Streams>> getMqStream(
boost::optional<int64_t> limit,
boost::optional<int64_t> offset
) const;
/// <summary>
/// Returns one stream&#39;s configuration and live state.
/// </summary>
/// <remarks>
/// Returns one stream&#39;s configuration and live state.
/// </remarks>
/// <param name="name">Name is the stream name, from the path.</param>
pplx::task<std::shared_ptr<Stream>> getMqStreamByName(
utility::string_t name
) const;
/// <summary>
/// Reads stored messages without a consumer: by sequence, by newest on a subject, or walking a subject forward from a sequence.
/// </summary>
/// <remarks>
/// Reads stored messages without a consumer: by sequence, by newest on a subject, or walking a subject forward from a sequence.
/// </remarks>
/// <param name="name">Name is the stream name, from the path.</param>
/// <param name="seq">Seq reads the message at this sequence (with next_by_subject: the walk&#39;s start). (optional, default to 0)</param>
/// <param name="lastBySubject">LastBySubject reads the newest message on this org-relative subject. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="nextBySubject">NextBySubject walks forward from seq collecting messages on this org-relative subject (wildcards supported). (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="limit">Limit caps a next_by_subject walk (1–1000, default 100). (optional, default to 0L)</param>
pplx::task<std::shared_ptr<ReadOut>> getMqStreamByNameMessage(
utility::string_t name,
boost::optional<int32_t> seq,
boost::optional<utility::string_t> lastBySubject,
boost::optional<utility::string_t> nextBySubject,
boost::optional<int64_t> limit
) const;
/// <summary>
/// Returns a stream&#39;s consumers, name-ordered, with delivery state.
/// </summary>
/// <remarks>
/// Returns a stream&#39;s consumers, name-ordered, with delivery state.
/// </remarks>
/// <param name="stream">Stream is the stream name, from the path.</param>
/// <param name="limit">Limit caps the consumers returned (1–1000, default 100). (optional, default to 0L)</param>
/// <param name="offset">Offset skips that many consumers, name-ordered. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<PickOut>> getMqStreamByStreamConsumer(
utility::string_t stream,
boost::optional<int64_t> limit,
boost::optional<int64_t> offset
) const;
/// <summary>
/// Returns one consumer&#39;s configuration and delivery state.
/// </summary>
/// <remarks>
/// Returns one consumer&#39;s configuration and delivery state.
/// </remarks>
/// <param name="stream">Stream is the stream name, from the path.</param>
/// <param name="name">Name is the consumer name, from the path.</param>
pplx::task<std::shared_ptr<Consumer>> getMqStreamByStreamConsumerByName(
utility::string_t stream,
utility::string_t name
) const;
/// <summary>
/// Creates a durable stream in the org&#39;s namespace and returns it.
/// </summary>
/// <remarks>
/// Creates a durable stream in the org&#39;s namespace and returns it.
/// </remarks>
/// <param name="config"></param>
pplx::task<std::shared_ptr<Stream>> postMqStream(
std::shared_ptr<Config> config
) const;
/// <summary>
/// Removes messages from a stream, leaving its consumers in place.
/// </summary>
/// <remarks>
/// Removes messages from a stream, leaving its consumers in place.
/// </remarks>
/// <param name="name">Name is the stream name, from the path.</param>
/// <param name="purge"></param>
pplx::task<std::shared_ptr<PurgeOut>> postMqStreamByNamePurge(
utility::string_t name,
std::shared_ptr<Purge> purge
) const;
/// <summary>
/// Creates a durable pull consumer on a stream and returns it.
/// </summary>
/// <remarks>
/// Creates a durable pull consumer on a stream and returns it.
/// </remarks>
/// <param name="stream">Stream is the stream name, from the path.</param>
/// <param name="makeIn"></param>
pplx::task<std::shared_ptr<Consumer>> postMqStreamByStreamConsumer(
utility::string_t stream,
std::shared_ptr<MakeIn> makeIn
) const;
/// <summary>
/// Pulls the consumer&#39;s next batch.
/// </summary>
/// <remarks>
/// Pulls the consumer&#39;s next batch. Delivered messages are acknowledged on delivery — the broker will not redeliver what this call returns; an empty wait answers 408.
/// </remarks>
/// <param name="stream">Stream is the stream name, from the path.</param>
/// <param name="name">Name is the consumer name, from the path.</param>
/// <param name="nextIn"></param>
pplx::task<std::shared_ptr<ReadOut>> postMqStreamByStreamConsumerByNameNext(
utility::string_t stream,
utility::string_t name,
std::shared_ptr<NextIn> nextIn
) const;
/// <summary>
/// Reconfigures an existing stream; the path names the stream, and the immutable fields (storage, retention) must restate what they are.
/// </summary>
/// <remarks>
/// Reconfigures an existing stream; the path names the stream, and the immutable fields (storage, retention) must restate what they are.
/// </remarks>
/// <param name="name">Name is the stream name, unique within the org (alphanumeric, hyphens, underscores).</param>
/// <param name="config"></param>
pplx::task<std::shared_ptr<Stream>> putMqStreamByName(
utility::string_t name,
std::shared_ptr<Config> config
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_MqApi_H_ */