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.
297 lines
17 KiB
C++
297 lines
17 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.
|
|
*/
|
|
|
|
/*
|
|
* PricingApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_PricingApi_H_
|
|
#define HANZO_API_PricingApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/EnablementBoard.h"
|
|
#include "hanzo/model/EnablementOptRef.h"
|
|
#include "hanzo/Object.h"
|
|
#include "hanzo/model/PricingHealth.h"
|
|
#include "hanzo/model/PricingModelList.h"
|
|
#include "hanzo/model/PricingPlanList.h"
|
|
#include "hanzo/model/PricingPresetList.h"
|
|
#include "hanzo/model/PricingProviderList.h"
|
|
#include "hanzo/model/PricingRegionList.h"
|
|
#include "hanzo/model/PricingSyncOut.h"
|
|
#include "hanzo/model/PricingTierList.h"
|
|
#include "hanzo/model/PricingToolList.h"
|
|
#include "hanzo/model/UserEnablementItem.h"
|
|
#include <map>
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class PricingApi
|
|
{
|
|
public:
|
|
|
|
explicit PricingApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~PricingApi();
|
|
|
|
/// <summary>
|
|
/// Returns the whole pricing catalog in one document: Zen and third-party models, providers, model families, the free-model list, plan and infrastructure pricing.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the whole pricing catalog in one document: Zen and third-party models, providers, model families, the free-model list, plan and infrastructure pricing. Every model and provider it names is filtered to what the caller's org may see — the same gate the leaf routes apply, so this can never be an un-gated second source for what they hide.
|
|
/// </remarks>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricing(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the Hanzo Base plans — the managed-instance tiers, each with its monthly and annual price, storage and request allowances and feature list.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the Hanzo Base plans — the managed-instance tiers, each with its monthly and annual price, storage and request allowances and feature list.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingPlanList>> getPricingBase(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the blockchain access plans — the RPC and node tiers, each with its monthly price, compute-unit allowance and feature list.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the blockchain access plans — the RPC and node tiers, each with its monthly price, compute-unit allowance and feature list.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingPlanList>> getPricingBlockchain(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the public cloud section of the catalog in one document: its instance plans, its regions and its block-storage prices.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the public cloud section of the catalog in one document: its instance plans, its regions and its block-storage prices. The section's internal half — the provider costs Hanzo pays and the plan-to- provider routing table — is stripped before it is served, so this is what a customer may see and nothing more.
|
|
/// </remarks>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricingCloud(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns just the cloud instance plans — each with its vCPU, memory, disk, CPU type, VM allowance, feature list and monthly and hourly price.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns just the cloud instance plans — each with its vCPU, memory, disk, CPU type, VM allowance, feature list and monthly and hourly price. It is the plans of the cloud section on their own.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingPlanList>> getPricingCloudPlans(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the regions a cloud instance can be placed in, each with its id, display name and physical location.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the regions a cloud instance can be placed in, each with its id, display name and physical location. It is the regions of the cloud section on their own.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingRegionList>> getPricingCloudRegions(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the block-storage prices of the cloud section: the per-GB monthly rate and the volume size bounds a caller may ask for.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the block-storage prices of the cloud section: the per-GB monthly rate and the volume size bounds a caller may ask for.
|
|
/// </remarks>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricingCloudStorage(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the compute section of the catalog: the cloud provider and region the prices are quoted for, the monthly markup applied to them, the full instance-size tier list and the named presets.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the compute section of the catalog: the cloud provider and region the prices are quoted for, the monthly markup applied to them, the full instance-size tier list and the named presets. It is the whole section as the pricing source records it, un-gated — no model or provider identity appears in it.
|
|
/// </remarks>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricingCompute(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns just the named compute sizes — the short, human-labelled list (\"Starter\", \"Pro\") a size picker renders, each carrying its provider slug, vCPU, memory, disk and price.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns just the named compute sizes — the short, human-labelled list (\"Starter\", \"Pro\") a size picker renders, each carrying its provider slug, vCPU, memory, disk and price. It is the presets of the compute section on their own, for a caller that does not need the full tier table.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingPresetList>> getPricingComputePresets(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the Hanzo Datastore rate card: the tier list, the per-GB storage and egress usage rates, the annual discount and the trial.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the Hanzo Datastore rate card: the tier list, the per-GB storage and egress usage rates, the annual discount and the trial. It is the section as authored, un-gated — no provider identity appears in it. The route was missing while the data existed, so this 404d and every visitor to hanzo.ai's Infrastructure tab was told pricing was \"temporarily unavailable\".
|
|
/// </remarks>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricingDatastore(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns what the caller's org can actually use: every managed item with its global state, whether it is effective here, whether this org is already opted into its beta, and whether it may still opt in.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns what the caller's org can actually use: every managed item with its global state, whether it is effective here, whether this org is already opted into its beta, and whether it may still opt in. Read-only and safe for any caller — one without a validated principal simply sees the generally-available items and no opt-in affordance, never another org's state.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<EnablementBoard>> getPricingEnablement(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the models the catalog highlights, filtered to what the caller's org may see.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the models the catalog highlights, filtered to what the caller's org may see. It is the same catalog as ListModels narrowed to entries the pricing source marks featured.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingModelList>> getPricingFeatured(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the models that cost nothing to call, filtered to what the caller's org may see.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the models that cost nothing to call, filtered to what the caller's org may see. It is the same catalog as ListModels narrowed to entries the pricing source marks free.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingModelList>> getPricingFree(
|
|
) const;
|
|
/// <summary>
|
|
/// ListGPUTiers returns the rentable GPU configurations, each with its accelerator count and model, VRAM, vCPU, host memory and hourly price.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// ListGPUTiers returns the rentable GPU configurations, each with its accelerator count and model, VRAM, vCPU, host memory and hourly price.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingTierList>> getPricingGpu(
|
|
) const;
|
|
/// <summary>
|
|
/// Health reports that the pricing subsystem is mounted and serving.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Health reports that the pricing subsystem is mounted and serving. It answers from the process itself and consults neither the catalog bundle nor the enablement store, so it stays \"ok\" while either is degraded.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingHealth>> getPricingHealth(
|
|
) const;
|
|
/// <summary>
|
|
/// ListIAMPlans returns the identity plans — the Hanzo IAM tiers, each with its monthly and annual price, monthly-active-user allowance and feature list.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// ListIAMPlans returns the identity plans — the Hanzo IAM tiers, each with its monthly and annual price, monthly-active-user allowance and feature list.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingPlanList>> getPricingIam(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns one model's catalog entry — its pricing, context window and capabilities as the pricing source records them.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns one model's catalog entry — its pricing, context window and capabilities as the pricing source records them. A model hidden for the caller's org answers the same 404 an unknown name does, so a disabled model gets no existence oracle.
|
|
/// </remarks>
|
|
/// <param name="name">Name is the model's name or its slugged id (\"zen4\", \"acme/some-model-1\"), matched case-insensitively. It comes from the path: the URL is the addressing authority.</param>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricingModelByName(
|
|
utility::string_t name
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the whole model catalog — every model the gateway serves, Zen and third-party alike — filtered to what the caller's org may see.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the whole model catalog — every model the gateway serves, Zen and third-party alike — filtered to what the caller's org may see. A model an admin has disabled is absent; one in beta appears only for an org granted it. A SuperAdmin sees every model, each annotated with its enablement state.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingModelList>> getPricingModels(
|
|
) const;
|
|
/// <summary>
|
|
/// ListPaaSPlans returns the application-hosting plans — the deploy-and-host tiers, each with its monthly and annual price, app and memory allowances and feature list.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// ListPaaSPlans returns the application-hosting plans — the deploy-and-host tiers, each with its monthly and annual price, app and memory allowances and feature list.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingPlanList>> getPricingPaas(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the pricing policy document: the revenue-sharing terms (the idle-resale share and the open-source share, each with its percentage and who is eligible) and the commitments Hanzo makes about how it bills — no hidden fees, no egress charges, no surprise bills.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the pricing policy document: the revenue-sharing terms (the idle-resale share and the open-source share, each with its percentage and who is eligible) and the commitments Hanzo makes about how it bills — no hidden fees, no egress charges, no surprise bills.
|
|
/// </remarks>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricingPolicy(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the model providers the catalog knows, each with its info object, filtered to what the caller's org may see.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the model providers the catalog knows, each with its info object, filtered to what the caller's org may see. A provider an admin has disabled is absent — and so are its models everywhere else on this surface, because a provider's state cascades to what it serves.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingProviderList>> getPricingProviders(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the managed-service rate cards — Search, Crawl, Vector, Console and Managed Services — each with its own tiers, and some with usage rates or a comparison table.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the managed-service rate cards — Search, Crawl, Vector, Console and Managed Services — each with its own tiers, and some with usage rates or a comparison table. It is the section as authored, un-gated. These are DISPLAY rate cards: what a product costs, not what a plan grants. No entitlement or limit fields ride here, so nothing can bill off them.
|
|
/// </remarks>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricingServices(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the API subscription plans — the account-level tiers a customer subscribes to, each with its monthly and annual price, included credit, rate limits and feature list.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the API subscription plans — the account-level tiers a customer subscribes to, each with its monthly and annual price, included credit, rate limits and feature list.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingPlanList>> getPricingSubscriptions(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the catalog's headline statistics — model counts by family and the provider directory.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds.
|
|
/// </remarks>
|
|
pplx::task<std::map<utility::string_t, std::shared_ptr<Object>>> getPricingSummary(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the per-use tool prices — web search, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the per-use tool prices — web search, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingToolList>> getPricingTools(
|
|
) const;
|
|
/// <summary>
|
|
/// Opts the caller's OWN org into a beta item.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Opts the caller's OWN org into a beta item. The org is the caller's validated one, so this can never target another org, and the registry refuses anything not in beta — so it can neither re-open an item an operator turned off nor touch one that is already generally available. Requires a signed-in caller with an org.
|
|
/// </remarks>
|
|
/// <param name="enablementOptRef"></param>
|
|
pplx::task<std::shared_ptr<UserEnablementItem>> postPricingEnablementOptin(
|
|
std::shared_ptr<EnablementOptRef> enablementOptRef
|
|
) const;
|
|
/// <summary>
|
|
/// Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent. The org is the caller's validated one, so this can never revoke another org's grant. Requires a signed-in caller with an org.
|
|
/// </remarks>
|
|
/// <param name="enablementOptRef"></param>
|
|
pplx::task<std::shared_ptr<UserEnablementItem>> postPricingEnablementOptout(
|
|
std::shared_ptr<EnablementOptRef> enablementOptRef
|
|
) const;
|
|
/// <summary>
|
|
/// Refreshes the third-party section of the catalog from its upstream listings and returns the time the refreshed catalog was stamped with.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Refreshes the third-party section of the catalog from its upstream listings and returns the time the refreshed catalog was stamped with. The fetch runs in Go and the markup transform in the pricing bundle. SuperAdmin only; every other caller is refused.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PricingSyncOut>> postPricingSync(
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_PricingApi_H_ */
|
|
|