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.
145 lines
6.6 KiB
C++
145 lines
6.6 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.
|
|
*/
|
|
|
|
/*
|
|
* GraphApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_GraphApi_H_
|
|
#define HANZO_API_GraphApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/GraphAssertIn.h"
|
|
#include "hanzo/model/GraphAssertOut.h"
|
|
#include "hanzo/model/GraphNeighborsIn.h"
|
|
#include "hanzo/model/GraphNeighborsOut.h"
|
|
#include "hanzo/model/GraphQLIn.h"
|
|
#include "hanzo/model/GraphQLOut.h"
|
|
#include "hanzo/model/GraphReadOut.h"
|
|
#include "hanzo/model/GraphResolveIn.h"
|
|
#include "hanzo/model/GraphResolveOut.h"
|
|
#include "hanzo/model/GraphVocabularyOut.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class GraphApi
|
|
{
|
|
public:
|
|
|
|
explicit GraphApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~GraphApi();
|
|
|
|
/// <summary>
|
|
/// Assert what is true of an entity
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="graphAssertIn"></param>
|
|
pplx::task<std::shared_ptr<GraphAssertOut>> graphAssert(
|
|
std::shared_ptr<GraphAssertIn> graphAssertIn
|
|
) const;
|
|
/// <summary>
|
|
/// Walk the edges from a seed set, bounded
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="graphNeighborsIn"></param>
|
|
pplx::task<std::shared_ptr<GraphNeighborsOut>> graphNeighbors(
|
|
std::shared_ptr<GraphNeighborsIn> graphNeighborsIn
|
|
) const;
|
|
/// <summary>
|
|
/// Read the assertions this organization has recorded
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="entity">Entity narrows to what was asserted ABOUT one entity. Absent matches every entity. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="relation">Relation narrows to one relation. Absent matches every relation. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="value">Value narrows to assertions pointing AT one value, which is how the edges into an entity are read. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="asOf">AsOf bounds the read to what was knowable at an instant, RFC 3339. Absent reads everything this plane holds. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="limit">Limit caps how many assertions come back. Absent, zero, or anything above the walk ceiling is the ceiling. (optional, default to 0L)</param>
|
|
pplx::task<std::shared_ptr<GraphReadOut>> graphRead(
|
|
boost::optional<utility::string_t> entity,
|
|
boost::optional<utility::string_t> relation,
|
|
boost::optional<utility::string_t> value,
|
|
boost::optional<utility::string_t> asOf,
|
|
boost::optional<int64_t> limit
|
|
) const;
|
|
/// <summary>
|
|
/// What is in force about an entity as of an instant, and what disagreed
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="graphResolveIn"></param>
|
|
pplx::task<std::shared_ptr<GraphResolveOut>> graphResolve(
|
|
std::shared_ptr<GraphResolveIn> graphResolveIn
|
|
) const;
|
|
/// <summary>
|
|
/// Find assertions by their text rather than by an entity key
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Finds assertions by their text where read finds them by their keys. It is the READ with one more term, not a second way to leave the store: same order, same ceiling, same tenancy, and searching composes with narrowing by relation and by instant because all of them are terms of one filter. It resolves nothing. What matches is what was asserted, including claims that were later corrected — which is the honest answer to \"where is this mentioned\" and the reason the caller then asks resolve about what it found.
|
|
/// </remarks>
|
|
/// <param name="q">Q is what to look for: words, matched as prefixes, all of them required. Punctuation is text here rather than syntax, so an entity key searches as itself. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="relation">Relation narrows to one relation. Absent matches every relation. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="asOf">AsOf bounds the search to what was knowable at an instant, RFC 3339. Absent searches everything this plane holds. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="limit">Limit caps how many assertions come back. Absent, zero, or anything above the walk ceiling is the ceiling. (optional, default to 0L)</param>
|
|
pplx::task<std::shared_ptr<GraphReadOut>> graphSearch(
|
|
boost::optional<utility::string_t> q,
|
|
boost::optional<utility::string_t> relation,
|
|
boost::optional<utility::string_t> asOf,
|
|
boost::optional<int64_t> limit
|
|
) const;
|
|
/// <summary>
|
|
/// The relations in use, and the rule that resolves a conflict
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<GraphVocabularyOut>> graphVocabulary(
|
|
) const;
|
|
/// <summary>
|
|
/// Ask the graph in one request, traversing.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Runs a GraphQL query against this organization's assertions. It is the one endpoint here a caller can TRAVERSE: the REST ops each answer a single question, so composing them — the entities this one points at, and what each of those resolves to — costs a request per hop with the intermediate keys held by the caller. Here that is one query and the nesting is the answer's shape. It adds no way to ask anything new. Every field runs the SAME operation the matching REST route runs, so the tenancy, the as-of bound, the traversal bounds and the conflict rule are the ones already in force; the schema is served by introspection. A query that cannot run answers 200 with an `errors` list, which is the wire every GraphQL client parses.
|
|
/// </remarks>
|
|
/// <param name="graphQLIn"> (optional)</param>
|
|
pplx::task<std::shared_ptr<GraphQLOut>> postGraphGraphql(
|
|
boost::optional<std::shared_ptr<GraphQLIn>> graphQLIn
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_GraphApi_H_ */
|
|
|