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

284 lines
8.8 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.
*/
/*
* CampaignResults.h
*
*
*/
#ifndef HANZO_MODEL_CampaignResults_H_
#define HANZO_MODEL_CampaignResults_H_
#include <boost/optional.hpp>
#include "hanzo/ModelBase.h"
#include "hanzo/AnyType.h"
#include <cpprest/details/basic_types.h>
#include "hanzo/model/ChannelMetric.h"
#include <vector>
namespace hanzo {
namespace model {
class ChannelMetric;
class CampaignResults
: public ModelBase
{
public:
CampaignResults();
virtual ~CampaignResults();
/////////////////////////////////////////////
/// ModelBase overrides
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
/////////////////////////////////////////////
/// CampaignResults members
std::shared_ptr<AnyType> getAbTest() const;
bool abTestIsSet() const;
void unsetAbTest();
void setAbTest(const std::shared_ptr<AnyType>& value);
/// <summary>
/// Available is false when the analytics warehouse is not connected or the query failed: the funnel below is then zero because nothing could be read, not because nothing happened. Spend and Channels are still real — they come from the connectors, not the warehouse.
/// </summary>
bool isAvailable() const;
bool availableIsSet() const;
void unsetAvailable();
void setAvailable(bool value);
/// <summary>
/// CAC is customer acquisition cost: spend DOLLARS per conversion, rounded to cents. 0 when nothing converted — that is \&quot;not yet computable\&quot;, not \&quot;free\&quot;.
/// </summary>
double getCac() const;
bool cacIsSet() const;
void unsetCac();
void setCac(double value);
/// <summary>
/// CampaignID is the campaign these results are for, echoed from the request.
/// </summary>
utility::string_t getCampaignId() const;
bool campaignIdIsSet() const;
void unsetCampaignId();
void setCampaignId(const utility::string_t& value);
/// <summary>
/// Channels is the per-channel spend breakdown that SpendCents sums, one row per channel on the campaign including the ones that never launched.
/// </summary>
std::vector<std::shared_ptr<ChannelMetric>> getChannels() const;
bool channelsIsSet() const;
void unsetChannels();
void setChannels(const std::vector<std::shared_ptr<ChannelMetric>>& value);
/// <summary>
/// Clicks is the campaign&#39;s click events over the window.
/// </summary>
int64_t getClicks() const;
bool clicksIsSet() const;
void unsetClicks();
void setClicks(int64_t value);
/// <summary>
/// Conversions is the terminal funnel events attributed to the campaign — orders completed, signups completed, explicit conversion events.
/// </summary>
int64_t getConversions() const;
bool conversionsIsSet() const;
void unsetConversions();
void setConversions(int64_t value);
/// <summary>
/// CTR is clicks per impression, a fraction rounded to 4 places (0.0123 &#x3D; 1.23%), not a percentage. 0 when there were no impressions to divide by.
/// </summary>
double getCtr() const;
bool ctrIsSet() const;
void unsetCtr();
void setCtr(double value);
/// <summary>
/// CVR is conversions per click, a fraction rounded to 4 places. 0 when there were no clicks.
/// </summary>
double getCvr() const;
bool cvrIsSet() const;
void unsetCvr();
void setCvr(double value);
/// <summary>
/// End is the window&#39;s end, RFC3339 UTC — the read&#39;s own clock unless an explicit pair was given. The window is a LOOKBACK, not the campaign&#39;s own lifetime.
/// </summary>
utility::string_t getEnd() const;
bool endIsSet() const;
void unsetEnd();
void setEnd(const utility::string_t& value);
/// <summary>
/// Impressions is how many times the campaign&#39;s creatives were shown, counted from its utm_campaign-tagged impression events.
/// </summary>
int64_t getImpressions() const;
bool impressionsIsSet() const;
void unsetImpressions();
void setImpressions(int64_t value);
/// <summary>
/// Name is the campaign&#39;s display name at read time, so a result can be labelled without a second fetch.
/// </summary>
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
/// <summary>
/// Range is the window actually used: 24h, 7d, 30d, 90d, or \&quot;custom\&quot; when an explicit start/end pair was honored. An unparseable or absent range reads 30d, so this is the value to trust, not the one that was sent.
/// </summary>
utility::string_t getRange() const;
bool rangeIsSet() const;
void unsetRange();
void setRange(const utility::string_t& value);
/// <summary>
/// Revenue is the summed revenue attribute of the campaign&#39;s events, in whole CURRENCY UNITS (dollars) — the one money value here that is not in cents.
/// </summary>
double getRevenue() const;
bool revenueIsSet() const;
void unsetRevenue();
void setRevenue(double value);
/// <summary>
/// ROAS is return on ad spend: revenue per spend DOLLAR, rounded to 2 places (2.5 &#x3D; $2.50 back per $1). 0 when nothing was spent.
/// </summary>
double getRoas() const;
bool roasIsSet() const;
void unsetRoas();
void setRoas(double value);
/// <summary>
/// Source names the analytics table the funnel was read from, so an operator can see exactly what was counted. Set even when Available is false.
/// </summary>
utility::string_t getSource() const;
bool sourceIsSet() const;
void unsetSource();
void setSource(const utility::string_t& value);
/// <summary>
/// SpendCents is the campaign&#39;s total spend in CENTS: the sum of what each live channel&#39;s provider reports. A channel whose spend could not be read contributes 0 and says so on its own row.
/// </summary>
int64_t getSpendCents() const;
bool spendCentsIsSet() const;
void unsetSpendCents();
void setSpendCents(int64_t value);
/// <summary>
/// Start is the window&#39;s inclusive start, RFC3339 UTC.
/// </summary>
utility::string_t getStart() const;
bool startIsSet() const;
void unsetStart();
void setStart(const utility::string_t& value);
/// <summary>
/// Status is the campaign&#39;s lifecycle state at read time — draft, live, paused, completed or failed. A draft has never run, so its funnel is legitimately zero.
/// </summary>
utility::string_t getStatus() const;
bool statusIsSet() const;
void unsetStatus();
void setStatus(const utility::string_t& value);
/// <summary>
/// Visitors is how many distinct people the campaign reached, counted by event identity across ALL its events in the window — not a subset of Impressions, so it can exceed them for a campaign whose provider reports clicks but not views.
/// </summary>
int64_t getVisitors() const;
bool visitorsIsSet() const;
void unsetVisitors();
void setVisitors(int64_t value);
protected:
boost::optional<std::shared_ptr<AnyType>> m_AbTest;
bool m_Available;
bool m_AvailableIsSet;
double m_Cac;
bool m_CacIsSet;
utility::string_t m_CampaignId;
bool m_CampaignIdIsSet;
std::vector<std::shared_ptr<ChannelMetric>> m_Channels;
bool m_ChannelsIsSet;
int64_t m_Clicks;
bool m_ClicksIsSet;
int64_t m_Conversions;
bool m_ConversionsIsSet;
double m_Ctr;
bool m_CtrIsSet;
double m_Cvr;
bool m_CvrIsSet;
utility::string_t m_End;
bool m_EndIsSet;
int64_t m_Impressions;
bool m_ImpressionsIsSet;
utility::string_t m_Name;
bool m_NameIsSet;
utility::string_t m_Range;
bool m_RangeIsSet;
double m_Revenue;
bool m_RevenueIsSet;
double m_Roas;
bool m_RoasIsSet;
utility::string_t m_Source;
bool m_SourceIsSet;
int64_t m_SpendCents;
bool m_SpendCentsIsSet;
utility::string_t m_Start;
bool m_StartIsSet;
utility::string_t m_Status;
bool m_StatusIsSet;
int64_t m_Visitors;
bool m_VisitorsIsSet;
};
}
}
#endif /* HANZO_MODEL_CampaignResults_H_ */