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

174 lines
5.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.
*/
/*
* Span.h
*
*
*/
#ifndef HANZO_MODEL_Span_H_
#define HANZO_MODEL_Span_H_
#include <boost/optional.hpp>
#include "hanzo/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace hanzo {
namespace model {
class Span
: public ModelBase
{
public:
Span();
virtual ~Span();
/////////////////////////////////////////////
/// 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;
/////////////////////////////////////////////
/// Span members
/// <summary>
/// EndLine is the last line of the span, inclusive. It equals Line for a one-line span rather than being zero or absent.
/// </summary>
int64_t getEndLine() const;
bool endLineIsSet() const;
void unsetEndLine();
void setEndLine(int64_t value);
/// <summary>
/// File is the path inside the repo, relative to its root and never absolute.
/// </summary>
utility::string_t getFile() const;
bool fileIsSet() const;
void unsetfile();
void setFile(const utility::string_t& value);
/// <summary>
/// Kind is what the indexer decided this chunk IS — \&quot;func\&quot;, \&quot;method\&quot;, \&quot;type\&quot;, \&quot;struct\&quot;, \&quot;interface\&quot;, \&quot;var\&quot;, \&quot;const\&quot;, or \&quot;block\&quot; for a run of code that declares nothing. Absent when the chunker could not classify it.
/// </summary>
utility::string_t getKind() const;
bool kindIsSet() const;
void unsetKind();
void setKind(const utility::string_t& value);
/// <summary>
/// Line is where the span starts, 1-based, as an editor counts.
/// </summary>
int64_t getLine() const;
bool lineIsSet() const;
void unsetLine();
void setLine(int64_t value);
/// <summary>
/// Repo is the indexed repository the span was found in, as it was indexed (\&quot;owner/name\&quot;). A search may be scoped to one repo or run across all of them, so this is how a caller tells the results apart.
/// </summary>
utility::string_t getRepo() const;
bool repoIsSet() const;
void unsetRepo();
void setRepo(const utility::string_t& value);
/// <summary>
/// context: match | definition | caller
/// </summary>
utility::string_t getRole() const;
bool roleIsSet() const;
void unsetRole();
void setRole(const utility::string_t& value);
/// <summary>
/// Score ranks this span against the OTHERS IN THE SAME RESPONSE and means nothing across responses or between tiers: the hybrid tier&#39;s number is a reciprocal-rank fusion sum (Σ 1/(60+rank), so tenths at best), the symbol tier&#39;s is a descending position count, and the text and semantic tiers pass through bm25 and cosine. Compare within a list; never threshold on it.
/// </summary>
double getScore() const;
bool scoreIsSet() const;
void unsetScore();
void setScore(double value);
/// <summary>
/// Snippet is the code itself: a bounded excerpt on /search, the whole chunk on /context — which is why the same type serves both and why a /context span is the one an agent pastes into its window.
/// </summary>
utility::string_t getSnippet() const;
bool snippetIsSet() const;
void unsetSnippet();
void setSnippet(const utility::string_t& value);
/// <summary>
/// Symbol is the declared name, when the span declares one. Absent on a block.
/// </summary>
utility::string_t getSymbol() const;
bool symbolIsSet() const;
void unsetSymbol();
void setSymbol(const utility::string_t& value);
/// <summary>
/// Tier is which retrieval produced the span: \&quot;hybrid\&quot; (the default — all three fused), \&quot;text\&quot; (trigram/FTS), \&quot;regex\&quot;, \&quot;semantic\&quot; (vector), or \&quot;symbol\&quot;. It is what explains a Score, so the two travel together.
/// </summary>
utility::string_t getTier() const;
bool tierIsSet() const;
void unsetTier();
void setTier(const utility::string_t& value);
protected:
int64_t m_EndLine;
bool m_EndLineIsSet;
utility::string_t m_file;
bool m_fileIsSet;
utility::string_t m_Kind;
bool m_KindIsSet;
int64_t m_Line;
bool m_LineIsSet;
utility::string_t m_Repo;
bool m_RepoIsSet;
utility::string_t m_Role;
bool m_RoleIsSet;
double m_Score;
bool m_ScoreIsSet;
utility::string_t m_Snippet;
bool m_SnippetIsSet;
utility::string_t m_Symbol;
bool m_SymbolIsSet;
utility::string_t m_Tier;
bool m_TierIsSet;
};
}
}
#endif /* HANZO_MODEL_Span_H_ */