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.
179 lines
5.9 KiB
C++
179 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.
|
|
*/
|
|
|
|
/*
|
|
* RiskSearchReport.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_RiskSearchReport_H_
|
|
#define HANZO_MODEL_RiskSearchReport_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
#include "hanzo/model/RiskModelValue.h"
|
|
#include "hanzo/model/RiskTrial.h"
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class RiskModelValue;
|
|
class RiskTrial;
|
|
|
|
|
|
class RiskSearchReport
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
RiskSearchReport();
|
|
virtual ~RiskSearchReport();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// RiskSearchReport members
|
|
|
|
|
|
/// <summary>
|
|
/// Done is false while the run is still going; the trials below are then the ones finished so far.
|
|
/// </summary>
|
|
bool isDone() const;
|
|
bool doneIsSet() const;
|
|
void unsetDone();
|
|
void setDone(bool value);
|
|
|
|
/// <summary>
|
|
/// Ended is when it finished, RFC 3339. Absent while it is still going.
|
|
/// </summary>
|
|
utility::string_t getEnded() const;
|
|
bool endedIsSet() const;
|
|
void unsetEnded();
|
|
void setEnded(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Events is how much of this organisation's history was replayed.
|
|
/// </summary>
|
|
int64_t getEvents() const;
|
|
bool eventsIsSet() const;
|
|
void unsetEvents();
|
|
void setEvents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Fitted is the winning shape FITTED over your own history and published as one of your organisation's own model values. Name its address on PUT /v1/risk/state/model and the winning shape becomes the model you are running. It is why this op answers something you can act on. A trial keeps counts and not the model that produced them, so a report without this named a shape nobody could install — and the adoption path refused a shape change besides. Fitting the winner once is a sixty-fifth pass over the same history; keeping all sixty-four fitted models resident instead would cost a measured 21 MiB per run for sixty-three shapes nobody adopts. Two things about it are worth knowing before you adopt it. Its realised rate can differ from the winner's above, because the ranking measures every candidate under one fixed reference geometry so the comparison is a comparison, while this is fitted under YOUR geometry — the one an outsider cannot predict. And it has learned the window this search replayed and nothing older, so adopting it trades history for fit.
|
|
/// </summary>
|
|
std::shared_ptr<RiskModelValue> getFitted() const;
|
|
bool fittedIsSet() const;
|
|
void unsetFitted();
|
|
void setFitted(const std::shared_ptr<RiskModelValue>& value);
|
|
|
|
/// <summary>
|
|
/// Gap says why the winning shape could not be fitted into an adoptable value, when it could not. It is separate from Refusal because they are different facts: a refusal means the ranking below proves nothing, a gap means the ranking stands and only the value is missing.
|
|
/// </summary>
|
|
utility::string_t getGap() const;
|
|
bool gapIsSet() const;
|
|
void unsetGap();
|
|
void setGap(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ID is the run.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Refusal says why the run proves nothing, when it does. An empty history is REFUSED rather than reported as zero alerts: \"no alerts\" is exactly what a quiet model looks like, and choosing a shape on the strength of an empty replay is the failure a sandbox exists to prevent.
|
|
/// </summary>
|
|
utility::string_t getRefusal() const;
|
|
bool refusalIsSet() const;
|
|
void unsetRefusal();
|
|
void setRefusal(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Started is when the run was accepted, RFC 3339.
|
|
/// </summary>
|
|
utility::string_t getStarted() const;
|
|
bool startedIsSet() const;
|
|
void unsetStarted();
|
|
void setStarted(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Trials is every shape tried, best first.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<RiskTrial>> getTrials() const;
|
|
bool trialsIsSet() const;
|
|
void unsetTrials();
|
|
void setTrials(const std::vector<std::shared_ptr<RiskTrial>>& value);
|
|
|
|
/// <summary>
|
|
/// Winner is the best-fitting shape, absent when nothing fit.
|
|
/// </summary>
|
|
std::shared_ptr<RiskTrial> getWinner() const;
|
|
bool winnerIsSet() const;
|
|
void unsetWinner();
|
|
void setWinner(const std::shared_ptr<RiskTrial>& value);
|
|
|
|
|
|
protected:
|
|
bool m_Done;
|
|
bool m_DoneIsSet;
|
|
|
|
utility::string_t m_Ended;
|
|
bool m_EndedIsSet;
|
|
|
|
int64_t m_Events;
|
|
bool m_EventsIsSet;
|
|
|
|
std::shared_ptr<RiskModelValue> m_Fitted;
|
|
bool m_FittedIsSet;
|
|
|
|
utility::string_t m_Gap;
|
|
bool m_GapIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Refusal;
|
|
bool m_RefusalIsSet;
|
|
|
|
utility::string_t m_Started;
|
|
bool m_StartedIsSet;
|
|
|
|
std::vector<std::shared_ptr<RiskTrial>> m_Trials;
|
|
bool m_TrialsIsSet;
|
|
|
|
std::shared_ptr<RiskTrial> m_Winner;
|
|
bool m_WinnerIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_RiskSearchReport_H_ */
|