openapi_github/models/
check_annotation.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/// CheckAnnotation : Check Annotation
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CheckAnnotation {
17    #[serde(rename = "path")]
18    pub path: String,
19    #[serde(rename = "start_line")]
20    pub start_line: i32,
21    #[serde(rename = "end_line")]
22    pub end_line: i32,
23    #[serde(rename = "start_column", deserialize_with = "Option::deserialize")]
24    pub start_column: Option<i32>,
25    #[serde(rename = "end_column", deserialize_with = "Option::deserialize")]
26    pub end_column: Option<i32>,
27    #[serde(rename = "annotation_level", deserialize_with = "Option::deserialize")]
28    pub annotation_level: Option<String>,
29    #[serde(rename = "title", deserialize_with = "Option::deserialize")]
30    pub title: Option<String>,
31    #[serde(rename = "message", deserialize_with = "Option::deserialize")]
32    pub message: Option<String>,
33    #[serde(rename = "raw_details", deserialize_with = "Option::deserialize")]
34    pub raw_details: Option<String>,
35    #[serde(rename = "blob_href")]
36    pub blob_href: String,
37}
38
39impl CheckAnnotation {
40    /// Check Annotation
41    pub fn new(path: String, start_line: i32, end_line: i32, start_column: Option<i32>, end_column: Option<i32>, annotation_level: Option<String>, title: Option<String>, message: Option<String>, raw_details: Option<String>, blob_href: String) -> CheckAnnotation {
42        CheckAnnotation {
43            path,
44            start_line,
45            end_line,
46            start_column,
47            end_column,
48            annotation_level,
49            title,
50            message,
51            raw_details,
52            blob_href,
53        }
54    }
55}
56