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

130 lines
6.1 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.
*/
/*
* AdApi.h
*
*
*/
#ifndef HANZO_API_AdApi_H_
#define HANZO_API_AdApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/AdCampaign.h"
#include "hanzo/model/AdSummary.h"
#include "hanzo/model/CampaignInput.h"
#include "hanzo/model/CampaignList.h"
#include "hanzo/model/UpdateCampaignIn.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class AdApi
{
public:
explicit AdApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~AdApi();
/// <summary>
/// Removes one of the caller org&#39;s campaigns and answers 204 with no body.
/// </summary>
/// <remarks>
/// Removes one of the caller org&#39;s campaigns and answers 204 with no body. It deletes the stored record only: a campaign already launched keeps running on the ad network, which must be stopped there. An id another org owns reads as not found.
/// </remarks>
/// <param name="id"></param>
pplx::task<void> deleteAdCampaignsById(
utility::string_t id
) const;
/// <summary>
/// Returns the caller org&#39;s ad campaigns, most recently updated first, optionally narrowed to one lifecycle status.
/// </summary>
/// <remarks>
/// Returns the caller org&#39;s ad campaigns, most recently updated first, optionally narrowed to one lifecycle status. The listing is bounded by the org: another tenant&#39;s campaigns are not reachable from here at all.
/// </remarks>
/// <param name="status">Status filters to one lifecycle state (draft, active, paused, completed). Empty returns every campaign the org has. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="limit">Limit caps how many campaigns come back: default 200, maximum 1000. A value that is not a positive integer reads as the default. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<CampaignList>> getAdCampaigns(
boost::optional<utility::string_t> status,
boost::optional<int64_t> limit
) const;
/// <summary>
/// Returns one of the caller org&#39;s campaigns.
/// </summary>
/// <remarks>
/// Returns one of the caller org&#39;s campaigns. An id another org owns reads as not found, so the response cannot confirm that it exists.
/// </remarks>
/// <param name="id"></param>
pplx::task<std::shared_ptr<AdCampaign>> getAdCampaignsById(
utility::string_t id
) const;
/// <summary>
/// Rolls the caller org&#39;s ad campaigns up into four numbers: how many campaigns exist, how many are active, and the summed budget and spend across all of them.
/// </summary>
/// <remarks>
/// Rolls the caller org&#39;s ad campaigns up into four numbers: how many campaigns exist, how many are active, and the summed budget and spend across all of them. Budget and spend are MINOR units (cents), the same units the campaign rows carry. It counts only this org&#39;s campaigns.
/// </remarks>
pplx::task<std::shared_ptr<AdSummary>> getAdSummary(
) const;
/// <summary>
/// Registers a new ad campaign for the caller&#39;s org and answers 201 with the stored row.
/// </summary>
/// <remarks>
/// Registers a new ad campaign for the caller&#39;s org and answers 201 with the stored row. It only records the campaign — nothing is sent to the ad network until POST /v1/ad/campaigns/{id}/launch runs it. The org is stamped by the server from the validated principal, so a body can never place a campaign in another tenant.
/// </remarks>
/// <param name="campaignInput"></param>
pplx::task<std::shared_ptr<AdCampaign>> postAdCampaigns(
std::shared_ptr<CampaignInput> campaignInput
) const;
/// <summary>
/// Run one of your stored campaigns on its ad network
/// </summary>
/// <remarks>
/// Creates the campaign on its platform under the CALLER ORG&#39;S own connected ad account, records the provider campaign id, flips the stored campaign to active and answers the updated record. No ad-network token is held here: it is resolved from KMS through the org&#39;s connector at launch time, BEFORE any provider call, so an org that has not connected that platform gets 424 and no spend can ever start on a connection the org did not make. Meta is executed for real; a campaign on a platform whose provider is not wired yet answers 501 even when the connector is connected, and an edge failure at the platform is 502. The optional {account} body overrides the target ad account for this launch and is TOLERANT — a malformed or non-JSON body is ignored and the campaign launches on its stored account rather than being refused. A campaign id another org owns reads as not found.
/// </remarks>
/// <param name="id"></param>
pplx::task<void> postAdCampaignsByIdLaunch(
utility::string_t id
) const;
/// <summary>
/// Replaces the user-owned fields of one of the caller org&#39;s campaigns and answers the stored row.
/// </summary>
/// <remarks>
/// Replaces the user-owned fields of one of the caller org&#39;s campaigns and answers the stored row. It is a full replace, not a patch: every field is written from the request, so an omitted one is cleared. externalId is launch-owned and is never touched here, so editing a campaign cannot break its link to a live provider execution.
/// </remarks>
/// <param name="id"></param>
/// <param name="updateCampaignIn"></param>
pplx::task<std::shared_ptr<AdCampaign>> putAdCampaignsById(
utility::string_t id,
std::shared_ptr<UpdateCampaignIn> updateCampaignIn
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_AdApi_H_ */