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.
190 lines
5.9 KiB
C++
190 lines
5.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.
|
|
*/
|
|
|
|
/*
|
|
* LeaderboardView.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_LeaderboardView_H_
|
|
#define HANZO_MODEL_LeaderboardView_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include "hanzo/model/LeaderboardRow.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include "hanzo/model/SelfRank.h"
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class LeaderboardRow;
|
|
class SelfRank;
|
|
|
|
|
|
class LeaderboardView
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
LeaderboardView();
|
|
virtual ~LeaderboardView();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// LeaderboardView members
|
|
|
|
|
|
/// <summary>
|
|
/// Available is false when the usage warehouse is not connected or its rollup is not ready. Rows is then empty because nothing could be read — not because nobody used anything. Show that difference; never render an unavailable board as a real one.
|
|
/// </summary>
|
|
bool isAvailable() const;
|
|
bool availableIsSet() const;
|
|
void unsetAvailable();
|
|
void setAvailable(bool value);
|
|
|
|
/// <summary>
|
|
/// End is the EXCLUSIVE upper bound of the window, \"2006-01-02\" — the day after the last one counted. A board through today reports tomorrow's date here.
|
|
/// </summary>
|
|
utility::string_t getEnd() const;
|
|
bool endIsSet() const;
|
|
void unsetEnd();
|
|
void setEnd(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Metric echoes the value ranked: tokens|requests|cost.
|
|
/// </summary>
|
|
utility::string_t getMetric() const;
|
|
bool metricIsSet() const;
|
|
void unsetMetric();
|
|
void setMetric(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Period is the window's canonical label: day|week|month|all. The server resolves aliases (7d, 30d, today, …) to these, so this may differ from what was sent.
|
|
/// </summary>
|
|
utility::string_t getPeriod() const;
|
|
bool periodIsSet() const;
|
|
void unsetPeriod();
|
|
void setPeriod(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Rows are the ranked subjects, best first, at most the requested limit of them. Always a list, never null: an empty one means nothing was read, not an error.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<LeaderboardRow>> getRows() const;
|
|
bool rowsIsSet() const;
|
|
void unsetRows();
|
|
void setRows(const std::vector<std::shared_ptr<LeaderboardRow>>& value);
|
|
|
|
/// <summary>
|
|
/// Scope echoes the board that was served: personal|org|global.
|
|
/// </summary>
|
|
utility::string_t getScope() const;
|
|
bool scopeIsSet() const;
|
|
void unsetScope();
|
|
void setScope(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Self is the caller's own standing, reported even when they fall outside Rows. Absent when the caller's ledger identity cannot be resolved, or when the query behind it failed — never faked to keep the shape tidy.
|
|
/// </summary>
|
|
std::shared_ptr<SelfRank> getSelf() const;
|
|
bool selfIsSet() const;
|
|
void unsetSelf();
|
|
void setSelf(const std::shared_ptr<SelfRank>& value);
|
|
|
|
/// <summary>
|
|
/// Source names the table these numbers were aggregated from (the derived daily rollup, hanzo.usage_rollup_daily), so an operator can tell exactly what was read.
|
|
/// </summary>
|
|
utility::string_t getSource() const;
|
|
bool sourceIsSet() const;
|
|
void unsetSource();
|
|
void setSource(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Start is the first day counted, \"2006-01-02\" inclusive. Empty for period=all, which has no lower bound at all.
|
|
/// </summary>
|
|
utility::string_t getStart() const;
|
|
bool startIsSet() const;
|
|
void unsetStart();
|
|
void setStart(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Subject is what the rows stand for — \"user\" on a personal or org board, \"org\" on the global one. It tells a client whether Handle names a person or a company.
|
|
/// </summary>
|
|
utility::string_t getSubject() const;
|
|
bool subjectIsSet() const;
|
|
void unsetSubject();
|
|
void setSubject(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Total is how many subjects were ranked in the window — the org's active users, or the active/opted-in orgs on the global board. It is the universe the ranks are out of, so it is normally larger than len(rows).
|
|
/// </summary>
|
|
int64_t getTotal() const;
|
|
bool totalIsSet() const;
|
|
void unsetTotal();
|
|
void setTotal(int64_t value);
|
|
|
|
|
|
protected:
|
|
bool m_Available;
|
|
bool m_AvailableIsSet;
|
|
|
|
utility::string_t m_End;
|
|
bool m_EndIsSet;
|
|
|
|
utility::string_t m_Metric;
|
|
bool m_MetricIsSet;
|
|
|
|
utility::string_t m_Period;
|
|
bool m_PeriodIsSet;
|
|
|
|
std::vector<std::shared_ptr<LeaderboardRow>> m_Rows;
|
|
bool m_RowsIsSet;
|
|
|
|
utility::string_t m_Scope;
|
|
bool m_ScopeIsSet;
|
|
|
|
std::shared_ptr<SelfRank> m_Self;
|
|
bool m_SelfIsSet;
|
|
|
|
utility::string_t m_Source;
|
|
bool m_SourceIsSet;
|
|
|
|
utility::string_t m_Start;
|
|
bool m_StartIsSet;
|
|
|
|
utility::string_t m_Subject;
|
|
bool m_SubjectIsSet;
|
|
|
|
int64_t m_Total;
|
|
bool m_TotalIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_LeaderboardView_H_ */
|