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 Diagnostic {
    /// Code is the checker's own identifier for the rule, a string or a number depending on the server. Absent when it published none.
    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
    pub code: Option<serde_json::Value>,
    /// Message is the problem in the server's own words, meant to be shown.
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    /// Range is the span the problem is about.
    #[serde(rename = "range", skip_serializing_if = "Option::is_none")]
    pub range: Option<Box<models::Range>>,
    /// Severity is the LSP's: 1 error, 2 warning, 3 information, 4 hint. A file with only 3s and 4s still compiles.
    #[serde(rename = "severity", skip_serializing_if = "Option::is_none")]
    pub severity: Option<i32>,
    /// Source is which checker reported it (\"compiler\", \"go vet\", a linter's name), which is what separates a build error from a style opinion.
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
}

impl Diagnostic {
    pub fn new() -> Diagnostic {
        Diagnostic {
            code: None,
            message: None,
            range: None,
            severity: None,
            source: None,
        }
    }
}