Skip to main content

hanzo_client/models/
location.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 Location {
16    /// External is true when the answer left the repository — the case a static index cannot answer, and the reason this service resolves through dependencies.
17    #[serde(rename = "external", skip_serializing_if = "Option::is_none")]
18    pub external: Option<bool>,
19    /// Path is repo-relative while External is false, and the module coordinate (\"golang.org/x/mod@v0.14.0/semver/semver.go\") once it is true.
20    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
21    pub path: Option<String>,
22    /// Range is the span inside that file, in LSP positions.
23    #[serde(rename = "range", skip_serializing_if = "Option::is_none")]
24    pub range: Option<Box<models::Range>>,
25}
26
27impl Location {
28    pub fn new() -> Location {
29        Location {
30            external: None,
31            path: None,
32            range: None,
33        }
34    }
35}
36