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.
124 lines
3.3 KiB
C++
124 lines
3.3 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.
|
|
*/
|
|
|
|
/*
|
|
* Fusion.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_Fusion_H_
|
|
#define HANZO_MODEL_Fusion_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include "hanzo/model/BackendStatus.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include "hanzo/model/Hit.h"
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class BackendStatus;
|
|
class Hit;
|
|
|
|
|
|
class Fusion
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
Fusion();
|
|
virtual ~Fusion();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// Fusion members
|
|
|
|
|
|
/// <summary>
|
|
/// Backends is the per-leg report. Always populated.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<BackendStatus>> getBackends() const;
|
|
bool backendsIsSet() const;
|
|
void unsetBackends();
|
|
void setBackends(const std::vector<std::shared_ptr<BackendStatus>>& value);
|
|
|
|
/// <summary>
|
|
/// Hits is the fused, ranked result set.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<Hit>> getHits() const;
|
|
bool hitsIsSet() const;
|
|
void unsetHits();
|
|
void setHits(const std::vector<std::shared_ptr<Hit>>& value);
|
|
|
|
/// <summary>
|
|
/// Mode is the mode actually used after `auto` resolution.
|
|
/// </summary>
|
|
utility::string_t getMode() const;
|
|
bool modeIsSet() const;
|
|
void unsetMode();
|
|
void setMode(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Status is the query's overall honesty signal: ok every consulted leg answered. partial at least one leg failed; Hits holds the survivors' results. unavailable every consulted leg failed; Hits is empty AND that is stated.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// TookMS is the whole query's wall time in milliseconds — every leg it consulted, plus fusion and paging. Each leg's own share is in Backends[].TookMS; the legs run in sequence, so this is at least their sum.
|
|
/// </summary>
|
|
int64_t getTookMs() const;
|
|
bool tookMsIsSet() const;
|
|
void unsetTook_ms();
|
|
void setTookMs(int64_t value);
|
|
|
|
|
|
protected:
|
|
std::vector<std::shared_ptr<BackendStatus>> m_Backends;
|
|
bool m_BackendsIsSet;
|
|
|
|
std::vector<std::shared_ptr<Hit>> m_Hits;
|
|
bool m_HitsIsSet;
|
|
|
|
utility::string_t m_Mode;
|
|
bool m_ModeIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
int64_t m_Took_ms;
|
|
bool m_Took_msIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_Fusion_H_ */
|