openapi_github/models/
codeowners_errors_errors_inner.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
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 CodeownersErrorsErrorsInner {
16    /// The line number where this errors occurs.
17    #[serde(rename = "line")]
18    pub line: i32,
19    /// The column number where this errors occurs.
20    #[serde(rename = "column")]
21    pub column: i32,
22    /// The contents of the line where the error occurs.
23    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
24    pub source: Option<String>,
25    /// The type of error.
26    #[serde(rename = "kind")]
27    pub kind: String,
28    /// Suggested action to fix the error. This will usually be `null`, but is provided for some common errors.
29    #[serde(rename = "suggestion", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub suggestion: Option<Option<String>>,
31    /// A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting).
32    #[serde(rename = "message")]
33    pub message: String,
34    /// The path of the file where the error occured.
35    #[serde(rename = "path")]
36    pub path: String,
37}
38
39impl CodeownersErrorsErrorsInner {
40    pub fn new(line: i32, column: i32, kind: String, message: String, path: String) -> CodeownersErrorsErrorsInner {
41        CodeownersErrorsErrorsInner {
42            line,
43            column,
44            source: None,
45            kind,
46            suggestion: None,
47            message,
48            path,
49        }
50    }
51}
52