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

179 lines
6.7 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.
*/
/*
* RiskScoreOut.h
*
*
*/
#ifndef HANZO_MODEL_RiskScoreOut_H_
#define HANZO_MODEL_RiskScoreOut_H_
#include <boost/optional.hpp>
#include "hanzo/ModelBase.h"
#include "hanzo/model/RiskValue.h"
#include "hanzo/model/RiskCause.h"
#include <cpprest/details/basic_types.h>
#include <vector>
namespace hanzo {
namespace model {
class RiskCause;
class RiskValue;
class RiskScoreOut
: public ModelBase
{
public:
RiskScoreOut();
virtual ~RiskScoreOut();
/////////////////////////////////////////////
/// 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;
/////////////////////////////////////////////
/// RiskScoreOut members
/// <summary>
/// Alert is whether this would become evidence. It is false in shadow however high the score.
/// </summary>
bool isAlert() const;
bool alertIsSet() const;
void unsetAlert();
void setAlert(bool value);
/// <summary>
/// Causes is the per-feature attribution, ordered by contribution. Each is a COUNTERFACTUAL on the model that produced the score — the coordinate moved to its neutral value and the event rescored — so the explanation is the same arithmetic the score came from.
/// </summary>
std::vector<std::shared_ptr<RiskCause>> getCauses() const;
bool causesIsSet() const;
void unsetCauses();
void setCauses(const std::vector<std::shared_ptr<RiskCause>>& value);
/// <summary>
/// Cut is the threshold in force, derived from the stated appetite as a quantile of the scores actually observed rather than fixed at a number.
/// </summary>
double getCut() const;
bool cutIsSet() const;
void unsetCut();
void setCut(double value);
/// <summary>
/// Policy is the version of your organisation&#39;s decision regime this verdict was reached under, from its own policy history (GET /v1/risk/policy). Cut is derived from the appetite that version states, so it is the record that makes this decision reconstructible after the appetite is restated. Zero means no regime has ever been stated and the default posture — shadow — was in force.
/// </summary>
int64_t getPolicy() const;
bool policyIsSet() const;
void unsetPolicy();
void setPolicy(int64_t value);
/// <summary>
/// Refusal names why the model declined, when it did.
/// </summary>
utility::string_t getRefusal() const;
bool refusalIsSet() const;
void unsetRefusal();
void setRefusal(const utility::string_t& value);
/// <summary>
/// Score is where the event sits in the tenant&#39;s own density: 0 where its recent behaviour is densest, 1 where there is none of it.
/// </summary>
double getScore() const;
bool scoreIsSet() const;
void unsetScore();
void setScore(double value);
/// <summary>
/// Scored is false when the model declined, and Refusal says which refusal it was: warming, unusable or unidentified. None of them is a clean bill of health, which is why the refusal is stated rather than rendered as a score of zero.
/// </summary>
bool isScored() const;
bool scoredIsSet() const;
void unsetScored();
void setScored(bool value);
/// <summary>
/// Shadow is whether the model is testing rather than deciding — scoring, learning and recording what it WOULD have alerted on, and changing no outcome. It is the default for a model no one has reviewed yet.
/// </summary>
bool isShadow() const;
bool shadowIsSet() const;
void unsetShadow();
void setShadow(bool value);
/// <summary>
/// Shape is the model space this verdict was reached in, as &#x60;&lt;family&gt;:&lt;digest&gt;&#x60;: the KIND of model, and that family&#39;s own digest over your organisation&#39;s feature inventory in order and the detector&#39;s geometry parameters. It is what pins an adverse decision to a model — a score is only meaningful against the space that produced it, and without this the only answer to \&quot;which model decided this\&quot; was \&quot;the one that was running\&quot;, which is not an answer. The family leads it because everything after it is one family&#39;s arithmetic. Two spaces are the same space only if they are the same family, so comparing this with the &#x60;shape&#x60; on your model state or on a published value is a comparison that holds ACROSS families and not only inside one. It names the SPACE, not the learned state, and that is deliberate. The masses at the instant of a score are in-process counters somewhere between two published values, so citing a published address here would claim that value produced this score — true only for the score taken the instant after a publication. This, the policy version and the event&#39;s own time are what IS true, and the published history&#39;s clock (GET /v1/risk/state) brackets the decision between two named values from there.
/// </summary>
utility::string_t getShape() const;
bool shapeIsSet() const;
void unsetShape();
void setShape(const utility::string_t& value);
/// <summary>
/// Values is every coordinate, including the ones that contributed nothing, so a reviewer sees what the model read and not only what it concluded.
/// </summary>
std::vector<std::shared_ptr<RiskValue>> getValues() const;
bool valuesIsSet() const;
void unsetValues();
void setValues(const std::vector<std::shared_ptr<RiskValue>>& value);
protected:
bool m_Alert;
bool m_AlertIsSet;
std::vector<std::shared_ptr<RiskCause>> m_Causes;
bool m_CausesIsSet;
double m_Cut;
bool m_CutIsSet;
int64_t m_Policy;
bool m_PolicyIsSet;
utility::string_t m_Refusal;
bool m_RefusalIsSet;
double m_Score;
bool m_ScoreIsSet;
bool m_Scored;
bool m_ScoredIsSet;
bool m_Shadow;
bool m_ShadowIsSet;
utility::string_t m_Shape;
bool m_ShapeIsSet;
std::vector<std::shared_ptr<RiskValue>> m_Values;
bool m_ValuesIsSet;
};
}
}
#endif /* HANZO_MODEL_RiskScoreOut_H_ */