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.
241 lines
9.4 KiB
C++
241 lines
9.4 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.
|
||
*/
|
||
|
||
/*
|
||
* 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'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's identity and the org's stream count.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Returns the broker's identity and the org's stream count.
|
||
/// </remarks>
|
||
pplx::task<std::shared_ptr<InfoOut>> getMqInfo(
|
||
) const;
|
||
/// <summary>
|
||
/// Returns the org's streams, name-ordered, with their live state.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Returns the org'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's configuration and live state.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Returns one stream'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'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(""))</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(""))</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's consumers, name-ordered, with delivery state.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Returns a stream'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's configuration and delivery state.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Returns one consumer'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's namespace and returns it.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Creates a durable stream in the org'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's next batch.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// Pulls the consumer'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_ */
|
||
|