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.
133 lines
5.1 KiB
C++
133 lines
5.1 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.
|
|
*/
|
|
|
|
/*
|
|
* RiskLabelOut.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_RiskLabelOut_H_
|
|
#define HANZO_MODEL_RiskLabelOut_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
#include "hanzo/model/RiskLabelResult.h"
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class RiskLabelResult;
|
|
|
|
|
|
class RiskLabelOut
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
RiskLabelOut();
|
|
virtual ~RiskLabelOut();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// RiskLabelOut members
|
|
|
|
|
|
/// <summary>
|
|
/// Duplicate is how many members this tenant already held, byte for byte. The idempotency key is the assertion's CONTENT digest — kind, subject, at, seen, disposition, source, evidence, the asserting identity and confidence, folded in length-prefixed — so a webhook redelivering one chargeback is a duplicate and costs nothing, while an assertion differing in ANY of those fields is a DIFFERENT assertion and is recorded beside the first. Nothing was written and nothing was overwritten; it is an outcome, never an error. The asserting identity is in the digest, so the same claim filed by a second credential is two assertions and not a redelivery.
|
|
/// </summary>
|
|
int64_t getDuplicate() const;
|
|
bool duplicateIsSet() const;
|
|
void unsetDuplicate();
|
|
void setDuplicate(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Mirror names why the columnar copy did not take this batch, when it did not. The record is already durable in the tenant's own store by then — the warehouse copy exists to make a training join cheap, and its absence is a gap in that join, never a lost label.
|
|
/// </summary>
|
|
utility::string_t getMirror() const;
|
|
bool mirrorIsSet() const;
|
|
void unsetMirror();
|
|
void setMirror(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Pending is how many assertions the derived copy is still to take. Every write attempt carries the backlog forward as well as its own batch, so a warehouse that was unreachable closes its gap on the next write rather than leaving a hole in a training join nothing would report. It is counted under a cap and saturates there: zero means caught up, and a large number means a backlog to work through rather than an inventory to reconcile.
|
|
/// </summary>
|
|
int64_t getPending() const;
|
|
bool pendingIsSet() const;
|
|
void unsetPending();
|
|
void setPending(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Recorded is how many members became a NEW row in the tenant's record. Recorded + Duplicate + Refused is exactly the number of labels sent, so a caller reconciling a webhook delivery can do it on the counts alone.
|
|
/// </summary>
|
|
int64_t getRecorded() const;
|
|
bool recordedIsSet() const;
|
|
void unsetRecorded();
|
|
void setRecorded(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Refused is how many members failed admission and were NOT recorded. Refusal is per member and never discards the rest of the batch: an empty or over-512-byte subject or evidence, a kind, disposition or source outside the closed vocabulary, an `at` or `seen` that is not RFC 3339, a `seen` before the `at` it judges, either instant more than five minutes past the server clock, or a confidence outside [0,1]. Results names which member and why, so the refused ones are exactly the ones to fix and resend.
|
|
/// </summary>
|
|
int64_t getRefused() const;
|
|
bool refusedIsSet() const;
|
|
void unsetRefused();
|
|
void setRefused(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Results is per fact, in the order sent, so a caller can retry exactly the members that were refused and can log the content digest of the ones that landed.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<RiskLabelResult>> getResults() const;
|
|
bool resultsIsSet() const;
|
|
void unsetResults();
|
|
void setResults(const std::vector<std::shared_ptr<RiskLabelResult>>& value);
|
|
|
|
|
|
protected:
|
|
int64_t m_Duplicate;
|
|
bool m_DuplicateIsSet;
|
|
|
|
utility::string_t m_Mirror;
|
|
bool m_MirrorIsSet;
|
|
|
|
int64_t m_Pending;
|
|
bool m_PendingIsSet;
|
|
|
|
int64_t m_Recorded;
|
|
bool m_RecordedIsSet;
|
|
|
|
int64_t m_Refused;
|
|
bool m_RefusedIsSet;
|
|
|
|
std::vector<std::shared_ptr<RiskLabelResult>> m_Results;
|
|
bool m_ResultsIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_RiskLabelOut_H_ */
|