Files
zeekay 645325a641 regenerate from cloud 939b09d4
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.
2026-08-24 23:32:53 -07:00

238 lines
12 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.
*/
/*
* IngressApi.h
*
*
*/
#ifndef HANZO_API_IngressApi_H_
#define HANZO_API_IngressApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/IngressMiddlewares.h"
#include "hanzo/model/IngressRoutes.h"
#include "hanzo/model/IngressServices.h"
#include "hanzo/model/IngressStatus.h"
#include "hanzo/model/IngressTLS.h"
#include "hanzo/model/Middleware.h"
#include "hanzo/model/Route.h"
#include "hanzo/model/TLSConfig.h"
#include "hanzo/model/Upstream.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class IngressApi
{
public:
explicit IngressApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~IngressApi();
/// <summary>
/// Removes one of the caller org&#39;s edge transforms and hot-applies the change.
/// </summary>
/// <remarks>
/// Removes one of the caller org&#39;s edge transforms and hot-applies the change. Routes still naming it stop being served (they compile as skipped) until they name a transform that exists. Answers 204; an id this org does not hold is 404.
/// </remarks>
/// <param name="id">ID is the object to act on, from the path.</param>
pplx::task<void> deleteIngressMiddlewaresById(
utility::string_t id
) const;
/// <summary>
/// Removes one of the caller org&#39;s routing rules and hot-applies the shrunken table, freeing its host for another claim.
/// </summary>
/// <remarks>
/// Removes one of the caller org&#39;s routing rules and hot-applies the shrunken table, freeing its host for another claim. Answers 204; an id this org does not hold is 404.
/// </remarks>
/// <param name="id">ID is the object to act on, from the path.</param>
pplx::task<void> deleteIngressRoutesById(
utility::string_t id
) const;
/// <summary>
/// Removes one of the caller org&#39;s backend pools and hot-applies the change.
/// </summary>
/// <remarks>
/// Removes one of the caller org&#39;s backend pools and hot-applies the change. Routes still pointing at it stop being served (they compile as skipped) until they name a pool that exists. Answers 204; an id this org does not hold is 404.
/// </remarks>
/// <param name="id">ID is the object to act on, from the path.</param>
pplx::task<void> deleteIngressServicesById(
utility::string_t id
) const;
/// <summary>
/// Returns every edge transform the caller&#39;s org has configured, ordered by id.
/// </summary>
/// <remarks>
/// Returns every edge transform the caller&#39;s org has configured, ordered by id. A route names the ones it wants, in order.
/// </remarks>
pplx::task<std::shared_ptr<IngressMiddlewares>> getIngressMiddlewares(
) const;
/// <summary>
/// Returns one of the caller org&#39;s edge transforms by id.
/// </summary>
/// <remarks>
/// Returns one of the caller org&#39;s edge transforms by id.
/// </remarks>
/// <param name="id">ID is the object to act on, from the path.</param>
pplx::task<std::shared_ptr<Middleware>> getIngressMiddlewaresById(
utility::string_t id
) const;
/// <summary>
/// Returns every routing rule the caller&#39;s org has configured, ordered by id.
/// </summary>
/// <remarks>
/// Returns every routing rule the caller&#39;s org has configured, ordered by id. A route maps an exact Host (and optional path prefix) to a service.
/// </remarks>
pplx::task<std::shared_ptr<IngressRoutes>> getIngressRoutes(
) const;
/// <summary>
/// Returns one of the caller org&#39;s routing rules by id.
/// </summary>
/// <remarks>
/// Returns one of the caller org&#39;s routing rules by id.
/// </remarks>
/// <param name="id">ID is the object to act on, from the path.</param>
pplx::task<std::shared_ptr<Route>> getIngressRoutesById(
utility::string_t id
) const;
/// <summary>
/// Returns every backend pool the caller&#39;s org has configured, ordered by id.
/// </summary>
/// <remarks>
/// Returns every backend pool the caller&#39;s org has configured, ordered by id. A service is the weighted round-robin target a route dispatches to.
/// </remarks>
pplx::task<std::shared_ptr<IngressServices>> getIngressServices(
) const;
/// <summary>
/// Returns one of the caller org&#39;s backend pools by id.
/// </summary>
/// <remarks>
/// Returns one of the caller org&#39;s backend pools by id.
/// </remarks>
/// <param name="id">ID is the object to act on, from the path.</param>
pplx::task<std::shared_ptr<Upstream>> getIngressServicesById(
utility::string_t id
) const;
/// <summary>
/// Status reports the ingress edge&#39;s live posture: the role this instance runs in (app or edge), whether its listeners are bound and on which addresses, the ACME posture (staging flag and certificate cache directory), how many hosts the compiled route table currently serves, and how many the ACME HostPolicy will issue a certificate for.
/// </summary>
/// <remarks>
/// Status reports the ingress edge&#39;s live posture: the role this instance runs in (app or edge), whether its listeners are bound and on which addresses, the ACME posture (staging flag and certificate cache directory), how many hosts the compiled route table currently serves, and how many the ACME HostPolicy will issue a certificate for.
/// </remarks>
pplx::task<std::shared_ptr<IngressStatus>> getIngressStatus(
) const;
/// <summary>
/// GetTLS returns the caller org&#39;s ACME intent together with the edge-wide TLS facts it lands in: which role this instance runs in, whether its listeners are bound, every host the ACME HostPolicy will issue a certificate for (the union across ALL orgs of TLS-marked routes and configured extraHosts, because one process holds one certificate cache), and the ACME directory and account email the process was started with.
/// </summary>
/// <remarks>
/// GetTLS returns the caller org&#39;s ACME intent together with the edge-wide TLS facts it lands in: which role this instance runs in, whether its listeners are bound, every host the ACME HostPolicy will issue a certificate for (the union across ALL orgs of TLS-marked routes and configured extraHosts, because one process holds one certificate cache), and the ACME directory and account email the process was started with.
/// </remarks>
pplx::task<std::shared_ptr<IngressTLS>> getIngressTls(
) const;
/// <summary>
/// Creates or replaces one edge transform and hot-applies it.
/// </summary>
/// <remarks>
/// Creates or replaces one edge transform and hot-applies it. POST mints an id when the body omits one; PUT takes the id from the URL, which wins over any id in the body. type must be one of redirectScheme, stripPrefix, addPrefix or headers, and stripPrefix/addPrefix each require their config key.
/// </remarks>
/// <param name="middleware"></param>
pplx::task<std::shared_ptr<Middleware>> postIngressMiddlewares(
std::shared_ptr<Middleware> middleware
) const;
/// <summary>
/// Creates or replaces one routing rule and hot-applies the new table — there is no config file and no restart.
/// </summary>
/// <remarks>
/// Creates or replaces one routing rule and hot-applies the new table — there is no config file and no restart. POST mints an id when the body omits one; PUT takes the id from the URL, which wins over any id in the body. A route&#39;s host is a GLOBALLY unique DNS claim: a host another org&#39;s route already holds is refused 409, so no tenant can hijack another&#39;s hostname.
/// </remarks>
/// <param name="route"></param>
pplx::task<std::shared_ptr<Route>> postIngressRoutes(
std::shared_ptr<Route> route
) const;
/// <summary>
/// Creates or replaces one backend pool and hot-applies it.
/// </summary>
/// <remarks>
/// Creates or replaces one backend pool and hot-applies it. POST mints an id when the body omits one; PUT takes the id from the URL, which wins over any id in the body. A pool needs at least one backend and every backend URL must be http(s)://host[:port].
/// </remarks>
/// <param name="upstream"></param>
pplx::task<std::shared_ptr<Upstream>> postIngressServices(
std::shared_ptr<Upstream> upstream
) const;
/// <summary>
/// Creates or replaces one edge transform and hot-applies it.
/// </summary>
/// <remarks>
/// Creates or replaces one edge transform and hot-applies it. POST mints an id when the body omits one; PUT takes the id from the URL, which wins over any id in the body. type must be one of redirectScheme, stripPrefix, addPrefix or headers, and stripPrefix/addPrefix each require their config key.
/// </remarks>
/// <param name="id">ID identifies the transform within the org: [A-Za-z0-9-_.], at most 128 chars. A create that omits it gets a generated one. Routes reference it by this id.</param>
/// <param name="middleware"></param>
pplx::task<std::shared_ptr<Middleware>> putIngressMiddlewaresById(
utility::string_t id,
std::shared_ptr<Middleware> middleware
) const;
/// <summary>
/// Creates or replaces one routing rule and hot-applies the new table — there is no config file and no restart.
/// </summary>
/// <remarks>
/// Creates or replaces one routing rule and hot-applies the new table — there is no config file and no restart. POST mints an id when the body omits one; PUT takes the id from the URL, which wins over any id in the body. A route&#39;s host is a GLOBALLY unique DNS claim: a host another org&#39;s route already holds is refused 409, so no tenant can hijack another&#39;s hostname.
/// </remarks>
/// <param name="id">ID identifies the route within the org: [A-Za-z0-9-_.], at most 128 chars. A create that omits it gets a generated one.</param>
/// <param name="route"></param>
pplx::task<std::shared_ptr<Route>> putIngressRoutesById(
utility::string_t id,
std::shared_ptr<Route> route
) const;
/// <summary>
/// Creates or replaces one backend pool and hot-applies it.
/// </summary>
/// <remarks>
/// Creates or replaces one backend pool and hot-applies it. POST mints an id when the body omits one; PUT takes the id from the URL, which wins over any id in the body. A pool needs at least one backend and every backend URL must be http(s)://host[:port].
/// </remarks>
/// <param name="id">ID identifies the pool within the org: [A-Za-z0-9-_.], at most 128 chars. A create that omits it gets a generated one. Routes reference it by this id.</param>
/// <param name="upstream"></param>
pplx::task<std::shared_ptr<Upstream>> putIngressServicesById(
utility::string_t id,
std::shared_ptr<Upstream> upstream
) const;
/// <summary>
/// PutTLS replaces the caller org&#39;s ACME intent and hot-applies what can be hot-applied.
/// </summary>
/// <remarks>
/// PutTLS replaces the caller org&#39;s ACME intent and hot-applies what can be hot-applied. extraHosts are normalized and validated, then feed the ACME HostPolicy on the reload this op performs, alongside the per-route tls flags. acmeEmail and staging bind an ACME account for the lifetime of an edge process, so they only take effect when the edge (re)starts — the returned note says so.
/// </remarks>
/// <param name="tLSConfig"></param>
pplx::task<std::shared_ptr<TLSConfig>> putIngressTls(
std::shared_ptr<TLSConfig> tLSConfig
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_IngressApi_H_ */