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

245 lines
7.6 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.
*/
/*
* AffiliateSelf.h
*
*
*/
#ifndef HANZO_MODEL_AffiliateSelf_H_
#define HANZO_MODEL_AffiliateSelf_H_
#include <boost/optional.hpp>
#include "hanzo/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "hanzo/model/Remittance.h"
#include <vector>
#include "hanzo/model/LevelView.h"
namespace hanzo {
namespace model {
class LevelView;
class Remittance;
class AffiliateSelf
: public ModelBase
{
public:
AffiliateSelf();
virtual ~AffiliateSelf();
/////////////////////////////////////////////
/// 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;
/////////////////////////////////////////////
/// AffiliateSelf members
/// <summary>
/// AccruedCents is lifetime commission accrued, in cents. It only grows — a payout is recorded against paidCents and never reduces this.
/// </summary>
int64_t getAccruedCents() const;
bool accruedCentsIsSet() const;
void unsetAccruedCents();
void setAccruedCents(int64_t value);
/// <summary>
/// Code is the minted referral code, the slug the ?aff link carries. Absent until staff approve; codes live in ONE global namespace across all affiliates.
/// </summary>
utility::string_t getCode() const;
bool codeIsSet() const;
void unsetCode();
void setCode(const utility::string_t& value);
/// <summary>
/// DefaultRateBps is the direct rate a new affiliate starts at, in basis points of margin (2000 &#x3D; 20%). Answered ONLY to a caller that has not applied, as the quote beside &#x60;schedule&#x60;.
/// </summary>
int64_t getDefaultRateBps() const;
bool defaultRateBpsIsSet() const;
void unsetDefaultRateBps();
void setDefaultRateBps(int64_t value);
/// <summary>
/// DownlineTotal counts every org in the caller&#39;s downline across the levels.
/// </summary>
int64_t getDownlineTotal() const;
bool downlineTotalIsSet() const;
void unsetDownlineTotal();
void setDownlineTotal(int64_t value);
/// <summary>
/// Handle is the opt-in public leaderboard name. Empty means opted out: the caller keeps its rank and still sees its own row, it is just not listed.
/// </summary>
utility::string_t getHandle() const;
bool handleIsSet() const;
void unsetHandle();
void setHandle(const utility::string_t& value);
/// <summary>
/// ID is the affiliate&#39;s server-minted handle, \&quot;aff_\&quot;-prefixed. Absent until the org applies.
/// </summary>
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
/// <summary>
/// IsAffiliate says whether the caller org has an affiliate record. On false the answer carries the rate SCHEDULE and the default rate instead of a downline, so the console can show what the caller would earn.
/// </summary>
bool isIsAffiliate() const;
bool isAffiliateIsSet() const;
void unsetIsAffiliate();
void setIsAffiliate(bool value);
/// <summary>
/// Levels is the caller&#39;s downline per upline level, with the rate paid there.
/// </summary>
std::vector<std::shared_ptr<LevelView>> getLevels() const;
bool levelsIsSet() const;
void unsetLevels();
void setLevels(const std::vector<std::shared_ptr<LevelView>>& value);
/// <summary>
/// Link is the shareable ?aff URL built from the code. Empty until a code is minted, since there is nothing to share before approval.
/// </summary>
utility::string_t getLink() const;
bool linkIsSet() const;
void unsetLink();
void setLink(const utility::string_t& value);
/// <summary>
/// MarginBps is the platform gross-margin fraction, in basis points, that every rate here is a rate OF. Read live per request, so it is the value in force now, not the one that applied to commission already accrued.
/// </summary>
int64_t getMarginBps() const;
bool marginBpsIsSet() const;
void unsetMarginBps();
void setMarginBps(int64_t value);
/// <summary>
/// PaidCents is lifetime commission already paid out, in cents — credits grants and record-only cash disbursements alike.
/// </summary>
int64_t getPaidCents() const;
bool paidCentsIsSet() const;
void unsetPaidCents();
void setPaidCents(int64_t value);
/// <summary>
/// Payouts is the payout history, newest first, bounded to the last 100 rows.
/// </summary>
std::vector<std::shared_ptr<Remittance>> getPayouts() const;
bool payoutsIsSet() const;
void unsetPayouts();
void setPayouts(const std::vector<std::shared_ptr<Remittance>>& value);
/// <summary>
/// PendingCents is accrued minus paid, in cents — what the platform still owes and the ceiling on the next payout. Never negative.
/// </summary>
int64_t getPendingCents() const;
bool pendingCentsIsSet() const;
void unsetPendingCents();
void setPendingCents(int64_t value);
/// <summary>
/// RateBps is the caller&#39;s OWN direct (level 1) commission rate, in basis points of margin. Levels 2 and 3 are platform-wide and appear in &#x60;levels&#x60;.
/// </summary>
int64_t getRateBps() const;
bool rateBpsIsSet() const;
void unsetRateBps();
void setRateBps(int64_t value);
/// <summary>
/// Schedule is the rate schedule quoted to a caller that has not applied.
/// </summary>
std::vector<std::shared_ptr<LevelView>> getSchedule() const;
bool scheduleIsSet() const;
void unsetSchedule();
void setSchedule(const std::vector<std::shared_ptr<LevelView>>& value);
/// <summary>
/// Status is \&quot;applied\&quot;, \&quot;approved\&quot; or \&quot;suspended\&quot;; absent for a caller that never applied. Only \&quot;approved\&quot; mints links and accrues.
/// </summary>
utility::string_t getStatus() const;
bool statusIsSet() const;
void unsetStatus();
void setStatus(const utility::string_t& value);
protected:
int64_t m_AccruedCents;
bool m_AccruedCentsIsSet;
utility::string_t m_Code;
bool m_CodeIsSet;
int64_t m_DefaultRateBps;
bool m_DefaultRateBpsIsSet;
int64_t m_DownlineTotal;
bool m_DownlineTotalIsSet;
utility::string_t m_Handle;
bool m_HandleIsSet;
utility::string_t m_Id;
bool m_IdIsSet;
bool m_IsAffiliate;
bool m_IsAffiliateIsSet;
std::vector<std::shared_ptr<LevelView>> m_Levels;
bool m_LevelsIsSet;
utility::string_t m_Link;
bool m_LinkIsSet;
int64_t m_MarginBps;
bool m_MarginBpsIsSet;
int64_t m_PaidCents;
bool m_PaidCentsIsSet;
std::vector<std::shared_ptr<Remittance>> m_Payouts;
bool m_PayoutsIsSet;
int64_t m_PendingCents;
bool m_PendingCentsIsSet;
int64_t m_RateBps;
bool m_RateBpsIsSet;
std::vector<std::shared_ptr<LevelView>> m_Schedule;
bool m_ScheduleIsSet;
utility::string_t m_Status;
bool m_StatusIsSet;
};
}
}
#endif /* HANZO_MODEL_AffiliateSelf_H_ */