hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Answer {
    /// Cold reports that this request paid to PREPARE the revision — the tree write, the dependency fetch and the language server's first index. It is the billed event, surfaced so a caller can see what it was charged for.
    #[serde(rename = "cold", skip_serializing_if = "Option::is_none")]
    pub cold: Option<bool>,
    /// Completions is complete's answer: the candidates at the position, typed and resolved through the repository's dependencies rather than guessed from text.
    #[serde(rename = "completions", skip_serializing_if = "Option::is_none")]
    pub completions: Option<Vec<models::Completion>>,
    /// Diagnostics is diagnostics' answer: every problem the server finds in the whole file, position ignored. Empty means it found none.
    #[serde(rename = "diagnostics", skip_serializing_if = "Option::is_none")]
    pub diagnostics: Option<Vec<models::Diagnostic>>,
    /// Hover is hover's answer: the type and documentation as the language server itself renders them, so it is prose meant to be shown, not parsed.
    #[serde(rename = "hover", skip_serializing_if = "Option::is_none")]
    pub hover: Option<String>,
    /// Lang is the language the server that answered speaks (\"go\"), as the daemon reports it. Empty when the daemon named none.
    #[serde(rename = "lang", skip_serializing_if = "Option::is_none")]
    pub lang: Option<String>,
    /// Locations is locate's answer: where the symbol is defined, referenced, typed or implemented, per the relation asked for. Empty means the server resolved nothing there, which is an answer.
    #[serde(rename = "locations", skip_serializing_if = "Option::is_none")]
    pub locations: Option<Vec<models::Location>>,
    /// Op is the question that was asked: hover, locate, symbols, diagnostics or complete. It names which result field below is the populated one.
    #[serde(rename = "op", skip_serializing_if = "Option::is_none")]
    pub op: Option<String>,
    /// Path is the repo-relative file the question was about, echoed back.
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
    /// Repo is the repository the question was about, echoed back.
    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
    pub repo: Option<String>,
    /// Rev is the RESOLVED commit sha, never the branch or tag that was asked for. It is what makes an answer re-askable: a branch moves, this does not.
    #[serde(rename = "rev", skip_serializing_if = "Option::is_none")]
    pub rev: Option<String>,
    /// Symbols is symbols' answer: the file's whole outline, position ignored.
    #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")]
    pub symbols: Option<Vec<models::Symbol>>,
}

impl Answer {
    pub fn new() -> Answer {
        Answer {
            cold: None,
            completions: None,
            diagnostics: None,
            hover: None,
            lang: None,
            locations: None,
            op: None,
            path: None,
            repo: None,
            rev: None,
            symbols: None,
        }
    }
}