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

138 lines
8.7 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.
*/
/*
* DatasetApi.h
*
*
*/
#ifndef HANZO_API_DatasetApi_H_
#define HANZO_API_DatasetApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/RiskDataset.h"
#include "hanzo/model/RiskDatasetDisposal.h"
#include "hanzo/model/RiskDatasetList.h"
#include "hanzo/model/RiskDatasetRows.h"
#include "hanzo/model/RiskDatasetSpec.h"
#include "hanzo/model/RiskDatasetVersions.h"
#include "hanzo/model/RiskLineage.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class DatasetApi
{
public:
explicit DatasetApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~DatasetApi();
/// <summary>
/// Declare the next version of a dataset
/// </summary>
/// <remarks>
/// Declares the next version of a dataset from a bound query over this org&#39;s own feature surface. It mints a VERSION and writes no rows: a version is declared, then materialised once, then never rewritten. Version numbers are monotone and never reused, so \&quot;version 3 of signups\&quot; means one thing forever — which is the whole reason a model can cite one. The window is bounded by the source&#39;s retention, the horizon by a year, the rows by the plane&#39;s cap, and the number of datasets and versions per org by their own limits. Every refusal names which bound it hit.
/// </remarks>
/// <param name="riskDatasetSpec"></param>
pplx::task<std::shared_ptr<RiskDataset>> riskCreateDataset(
std::shared_ptr<RiskDatasetSpec> riskDatasetSpec
) const;
/// <summary>
/// Describe every version of one dataset
/// </summary>
/// <remarks>
/// Dataset describes every version of one dataset, newest first — the whole history, because the point of a version is that the older ones are still there and a model fitted last quarter cites one of them. A name this org does not own answers 404, exactly as an unknown name does, so a probe learns nothing about another tenant&#39;s datasets.
/// </remarks>
/// <param name="name">Name is the dataset, from the path.</param>
pplx::task<std::shared_ptr<RiskDatasetVersions>> riskDataset(
utility::string_t name
) const;
/// <summary>
/// Show where a version&#39;s rows came from, and whether that can still be demonstrated
/// </summary>
/// <remarks>
/// Shows where a version&#39;s rows came from and whether that can still be demonstrated. The answer is MEASURED, not recalled: the plane asks the source the same bounded question again and compares it to the fingerprint taken when the version was built. Anything but exact agreement is reported as drift — the source is fed by a rollup that runs behind the events, so \&quot;it holds more now\&quot; is the ordinary case and it means re-running the spec would not reproduce this version. An admitted gap is actionable; an unfalsifiable claim is not. IT IS A PRICED, BOUNDED READ, because it is the same statement a materialisation is charged for: an exact distinct-count over up to 400 days of this org&#39;s feature surface. It takes the org&#39;s ONE source-scan slot, so a tenant looping it spends one scan and not a thousand; it counts against the plane&#39;s ceiling, so the fleet&#39;s warehouse is bounded too; and it runs under this plane&#39;s own deadline rather than the caller&#39;s patience.
/// </remarks>
/// <param name="name">Name is the dataset, from the path.</param>
/// <param name="version">Version is the version to trace. Zero takes the newest published one. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<RiskLineage>> riskDatasetLineage(
utility::string_t name,
boost::optional<int64_t> version
) const;
/// <summary>
/// List this org&#39;s datasets
/// </summary>
/// <remarks>
/// Datasets lists this org&#39;s datasets, each with its newest version. An org that has declared none gets an empty list; a store that cannot be reached gets a refusal, never an empty list, because the two read identically and only one of them is true.
/// </remarks>
pplx::task<std::shared_ptr<RiskDatasetList>> riskDatasets(
) const;
/// <summary>
/// Dispose of one dataset and every version of it
/// </summary>
/// <remarks>
/// Disposes of one dataset and every version of it: the rows are dropped and the register is marked with what went. This is the ONLY expiry in this plane. Neither table carries a TTL, deliberately: a table TTL is a fleet-wide clock no tenant can hold longer or shorten, which is the opposite of a retention decision belonging to the tenant whose records they are. The drop is a partition drop on (org, dataset), so the tenant is the first component of the thing being dropped and a disposal cannot be spelled across one. The BYTES are what goes. The register keeps one &#x60;disposed&#x60; row per version — the name, the number, the spec, the digest and who disposed of it when — for two reasons: a retention obligation is answered by a record of the deletion, not by silence; and version numbers must stay monotone, so that after &#x60;orders&#x60; is disposed of and declared again the next version is 4 and not 1. A number that could be reused would make every citation of &#x60;orders v3&#x60; ambiguous forever. It is not reversible and there is no soft state in between. A version a model cited has no rows once this returns, and every read of it says so.
/// </remarks>
/// <param name="name">Name is the dataset, from the path.</param>
pplx::task<std::shared_ptr<RiskDatasetDisposal>> riskDeleteDataset(
utility::string_t name
) const;
/// <summary>
/// Read a version&#39;s rows back, one page at a time
/// </summary>
/// <remarks>
/// Reads a published version&#39;s rows back, one bounded page at a time, in the version&#39;s own stable row order. Only a published version can be exported. Rows written by an attempt that never completed are inert — no register row names them — and they are disposed of with the dataset.
/// </remarks>
/// <param name="name">Name is the dataset, from the path.</param>
/// <param name="version">Version is the version to read. Zero takes the newest published one. (optional, default to 0L)</param>
/// <param name="split">Split narrows to train, val or test. Empty reads every split. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="offset">Offset is where the page starts, in the version&#39;s own row order (by id, which is derived from the row and therefore stable forever). (optional, default to 0L)</param>
/// <param name="limit">Limit is how many rows to return. Zero and anything above the plane&#39;s bound take the bound. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<RiskDatasetRows>> riskExportDataset(
utility::string_t name,
boost::optional<int64_t> version,
boost::optional<utility::string_t> split,
boost::optional<int64_t> offset,
boost::optional<int64_t> limit
) const;
/// <summary>
/// Materialise the declared version into immutable rows
/// </summary>
/// <remarks>
/// Builds the declared version into immutable rows and answers 202 as soon as the attempt is on record. It never holds the request open for the work: a materialisation is a bounded warehouse scan, and letting an HTTP client&#39;s timeout be a data plane&#39;s timeout is how one tenant&#39;s retry loop becomes everyone&#39;s outage. ONE materialisation runs per org at a time; a second is refused rather than queued, because a queue admits the same work later and the honest answer to \&quot;again\&quot; while one is running is that one is running. Only a DECLARED version is admitted. A published version is immutable, and a version whose earlier attempt did not complete is never re-attempted — that would union two runs&#39; rows under one number and make the digest a lie. In both cases the answer is to declare a new version, which is what a second run over a moving source honestly is.
/// </remarks>
/// <param name="name">Name is the dataset, from the path.</param>
pplx::task<std::shared_ptr<RiskDataset>> riskMaterializeDataset(
utility::string_t name
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_DatasetApi_H_ */