Skip to main content

hanzo_client/models/
query.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Query {
16    /// Character is a 0-based UTF-16 code-unit offset within Line, per the LSP specification — not a byte offset and not a rune index.
17    #[serde(rename = "character", skip_serializing_if = "Option::is_none")]
18    pub character: Option<i32>,
19    /// Line is 0-based, per the LSP specification.
20    #[serde(rename = "line", skip_serializing_if = "Option::is_none")]
21    pub line: Option<i32>,
22    /// Path is the repo-relative file, e.g. \"apps/lsp/lsp.go\".
23    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
24    pub path: Option<String>,
25    /// Relation refines locate: definition, reference, type or implementation. Empty means definition. Every other op ignores it.
26    #[serde(rename = "relation", skip_serializing_if = "Option::is_none")]
27    pub relation: Option<String>,
28    /// Repo is the repository NAME within the caller's own org, e.g. \"cloud\". Not a URL and not an owner/name pair: the owner is the validated principal's org, so this names a repository the caller already owns.
29    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
30    pub repo: Option<String>,
31    /// Rev is a branch, tag or commit sha. Empty means the default branch. It is resolved to a commit before anything else happens, so an answer is always about one immutable tree.
32    #[serde(rename = "rev", skip_serializing_if = "Option::is_none")]
33    pub rev: Option<String>,
34}
35
36impl Query {
37    pub fn new() -> Query {
38        Query {
39            character: None,
40            line: None,
41            path: None,
42            relation: None,
43            repo: None,
44            rev: None,
45        }
46    }
47}
48