mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
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.
82 lines
3.2 KiB
C++
82 lines
3.2 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.
|
|
*/
|
|
|
|
/*
|
|
* BaseApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_BaseApi_H_
|
|
#define HANZO_API_BaseApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/BaseHealth.h"
|
|
#include "hanzo/model/BaseView.h"
|
|
#include <vector>
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class BaseApi
|
|
{
|
|
public:
|
|
|
|
explicit BaseApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~BaseApi();
|
|
|
|
/// <summary>
|
|
/// Lists every Base the caller can reach, one per org their token carries.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Lists every Base the caller can reach, one per org their token carries. The orgs come from IAM's signed membership set, so the list is exactly the orgs the caller is a member of and cannot be widened by asking. It is the account-wide view: a Base is per org, so this is one entry per org and there is nothing to page. A caller with no membership set — a machine credential, an API key — reaches no Base and receives an empty list rather than a refusal, because holding no membership is an answer and not a failure.
|
|
/// </remarks>
|
|
pplx::task<std::vector<std::shared_ptr<BaseView>>> getBaseBases(
|
|
) const;
|
|
/// <summary>
|
|
/// Describes ONE org's Base — whether its store exists, and what it occupies.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Describes ONE org's Base — whether its store exists, and what it occupies. The org must be one the caller's token carries; any other is not found, so this cannot be used to learn which orgs exist. That check is the same membership set the listing is built from, which is why the two can never disagree about what a caller may see.
|
|
/// </remarks>
|
|
/// <param name="org">Org is the org whose Base to describe, from the path. An org the caller's token does not carry is not found — the same answer a nonexistent one gets, so the listing cannot be used to discover which orgs exist.</param>
|
|
pplx::task<std::shared_ptr<BaseView>> getBaseBasesByOrg(
|
|
utility::string_t org
|
|
) const;
|
|
/// <summary>
|
|
/// Reports that the base subsystem is serving.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Reports that the base subsystem is serving. It is deliberately INDEPENDENT of whether this deployment actually embeds the Base engine: the route answers before the CLOUD_BASE_EMBED gate and before the /v1/base/_* wildcard, so a liveness probe measures the process rather than an optional feature, and the wildcard can never shadow it. It reads no tenant, so a prober that sends no principal is answered rather than refused.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<BaseHealth>> getBaseHealth(
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_BaseApi_H_ */
|
|
|