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

183 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.
*/
/*
* Market.h
*
*
*/
#ifndef HANZO_MODEL_Market_H_
#define HANZO_MODEL_Market_H_
#include <boost/optional.hpp>
#include "hanzo/ModelBase.h"
#include "hanzo/model/Reach.h"
#include "hanzo/model/Day.h"
#include "hanzo/model/Figures.h"
#include <cpprest/details/basic_types.h>
#include <map>
namespace hanzo {
namespace model {
class Day;
class Figures;
class Reach;
class Market
: public ModelBase
{
public:
Market();
virtual ~Market();
/////////////////////////////////////////////
/// 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;
/////////////////////////////////////////////
/// Market members
/// <summary>
/// Amm reports whether an automated market maker is deployed on this chain, which is the registry&#39;s factory addresses being present and not the indexer having rows. The two disagree in exactly the interesting case: a chain with a factory and nothing traded yet is a live venue with no history, and a chain with neither has no venue at all.
/// </summary>
bool isAmm() const;
bool ammIsSet() const;
void unsetAmm();
void setAmm(bool value);
utility::string_t getCoin() const;
bool coinIsSet() const;
void unsetCoin();
void setCoin(const utility::string_t& value);
std::shared_ptr<Day> getDay() const;
bool dayIsSet() const;
void unsetDay();
void setDay(const std::shared_ptr<Day>& value);
/// <summary>
/// Factory is the AMM&#39;s factory contracts, by generation, omitted where none is deployed. Addresses come from the registry because that is what the indexer itself ingested from; anything else is a second copy free to drift.
/// </summary>
std::map<utility::string_t, utility::string_t> getFactory() const;
bool factoryIsSet() const;
void unsetFactory();
void setFactory(const std::map<utility::string_t, utility::string_t>& value);
/// <summary>
/// Figures is the chain&#39;s whole market maker, and Day its most recent active one. Both are absent unless Reach says Read, so a caller cannot mistake a zero this process never received for one the indexer computed. Day is also absent on a chain that has never traded — which reach reports as Read, so the two absences are told apart by the state beside them and never by the gap itself.
/// </summary>
std::shared_ptr<Figures> getFigures() const;
bool figuresIsSet() const;
void unsetFigures();
void setFigures(const std::shared_ptr<Figures>& value);
/// <summary>
/// Graph is where this chain&#39;s indexer answers, empty where it has none.
/// </summary>
utility::string_t getGraph() const;
bool graphIsSet() const;
void unsetGraph();
void setGraph(const utility::string_t& value);
/// <summary>
/// ID is the EVM chain id, which is what a wallet must agree with.
/// </summary>
int64_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(int64_t value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
/// <summary>
/// Reach is how far the read of this chain&#39;s FIGURES got — its own, so one indexer being down describes one row and leaves the others to answer.
/// </summary>
std::shared_ptr<Reach> getReach() const;
bool reachIsSet() const;
void unsetReach();
void setReach(const std::shared_ptr<Reach>& value);
/// <summary>
/// RPC is the chain&#39;s PUBLIC JSON-RPC, empty where the registry names only a route this process happens to have. The registry&#39;s own &#x60;rpc&#x60; field is the INDEXER&#39;s route to the node and is sometimes inside its cluster — plain HTTP on a &#x60;.svc.cluster.local&#x60; name — which is reachable from the indexer, from nothing else, and from no browser. Publishing that as the chain&#39;s endpoint hands every caller an address that cannot answer them. See [endpoint].
/// </summary>
utility::string_t getRpc() const;
bool rpcIsSet() const;
void unsetRpc();
void setRpc(const utility::string_t& value);
/// <summary>
/// Slug is the chain&#39;s word in every indexer path — &#x60;cchain&#x60;, &#x60;zoo&#x60;. It is the value a caller passes back as &#x60;chain&#x60;, and it is NOT the chain id: &#x60;96369&#x60;, &#x60;C&#x60; and &#x60;c-chain&#x60; all answer 404 in that position.
/// </summary>
utility::string_t getSlug() const;
bool slugIsSet() const;
void unsetSlug();
void setSlug(const utility::string_t& value);
protected:
bool m_Amm;
bool m_AmmIsSet;
utility::string_t m_Coin;
bool m_CoinIsSet;
std::shared_ptr<Day> m_Day;
bool m_DayIsSet;
std::map<utility::string_t, utility::string_t> m_Factory;
bool m_FactoryIsSet;
std::shared_ptr<Figures> m_Figures;
bool m_FiguresIsSet;
utility::string_t m_Graph;
bool m_GraphIsSet;
int64_t m_Id;
bool m_IdIsSet;
utility::string_t m_Name;
bool m_NameIsSet;
std::shared_ptr<Reach> m_Reach;
bool m_ReachIsSet;
utility::string_t m_Rpc;
bool m_RpcIsSet;
utility::string_t m_Slug;
bool m_SlugIsSet;
};
}
}
#endif /* HANZO_MODEL_Market_H_ */