mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
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.
163 lines
4.9 KiB
C++
163 lines
4.9 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.
|
|
*/
|
|
|
|
/*
|
|
* Quote.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_Quote_H_
|
|
#define HANZO_MODEL_Quote_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class Quote
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
Quote();
|
|
virtual ~Quote();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// Quote members
|
|
|
|
|
|
/// <summary>
|
|
/// ChargeCents is what month one costs after the discount, in USD cents, totalled over the seats quoted. On team that is a multiple of the seat count, so it is not ListCents minus DiscountCents.
|
|
/// </summary>
|
|
int64_t getChargeCents() const;
|
|
bool chargeCentsIsSet() const;
|
|
void unsetChargeCents();
|
|
void setChargeCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Code is the promo that was priced, as stored.
|
|
/// </summary>
|
|
utility::string_t getCode() const;
|
|
bool codeIsSet() const;
|
|
void unsetCode();
|
|
void setCode(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// DiscountCents is what the promo takes off month one, in USD cents. The promo rate reaches at most TeamSeatCap seats; seats past the cap bill at full list and add nothing here. It is arithmetic only — quoting credits nothing, counts nothing and reserves nothing.
|
|
/// </summary>
|
|
int64_t getDiscountCents() const;
|
|
bool discountCentsIsSet() const;
|
|
void unsetDiscountCents();
|
|
void setDiscountCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Eligible says whether a redeem would be accepted right now; Reason says why not when it would not.
|
|
/// </summary>
|
|
bool isEligible() const;
|
|
bool eligibleIsSet() const;
|
|
void unsetEligible();
|
|
void setEligible(bool value);
|
|
|
|
/// <summary>
|
|
/// ListCents is the undiscounted month price in USD cents: PER SEAT on team, the whole month on pro and max, 0 for a plan with no list price.
|
|
/// </summary>
|
|
int64_t getListCents() const;
|
|
bool listCentsIsSet() const;
|
|
void unsetListCents();
|
|
void setListCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Plan is the tier priced, lower-cased and trimmed: pro, max or team. Unlike a redemption's plan this one comes from the REQUEST — quoting has no side effects, so it will happily price a plan the caller does not hold.
|
|
/// </summary>
|
|
utility::string_t getPlan() const;
|
|
bool planIsSet() const;
|
|
void unsetPlan();
|
|
void setPlan(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Reason is why Eligible is false, drawn from: \"promo redemption is closed\" (the subsystem is off, which is how it ships), \"promo redemption cap reached\", \"promo is not active\", \"plan is free or unknown; nothing to discount\", \"promo does not cover plan <plan>\". Absent when Eligible is true.
|
|
/// </summary>
|
|
utility::string_t getReason() const;
|
|
bool reasonIsSet() const;
|
|
void unsetReason();
|
|
void setReason(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Remaining is how many redemptions are left under the fleet-wide cap.
|
|
/// </summary>
|
|
int64_t getRemaining() const;
|
|
bool remainingIsSet() const;
|
|
void unsetRemaining();
|
|
void setRemaining(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Seats is the seat count priced; a request of 0 or less was read as 1. It only bites on team, the one per-seat plan — pro and max are single-seat and ignore it.
|
|
/// </summary>
|
|
int64_t getSeats() const;
|
|
bool seatsIsSet() const;
|
|
void unsetSeats();
|
|
void setSeats(int64_t value);
|
|
|
|
|
|
protected:
|
|
int64_t m_ChargeCents;
|
|
bool m_ChargeCentsIsSet;
|
|
|
|
utility::string_t m_Code;
|
|
bool m_CodeIsSet;
|
|
|
|
int64_t m_DiscountCents;
|
|
bool m_DiscountCentsIsSet;
|
|
|
|
bool m_Eligible;
|
|
bool m_EligibleIsSet;
|
|
|
|
int64_t m_ListCents;
|
|
bool m_ListCentsIsSet;
|
|
|
|
utility::string_t m_Plan;
|
|
bool m_PlanIsSet;
|
|
|
|
utility::string_t m_Reason;
|
|
bool m_ReasonIsSet;
|
|
|
|
int64_t m_Remaining;
|
|
bool m_RemainingIsSet;
|
|
|
|
int64_t m_Seats;
|
|
bool m_SeatsIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_Quote_H_ */
|