openapi_github/models/
code_scanning_alert_instance.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 CodeScanningAlertInstance {
16    /// The Git reference, formatted as `refs/pull/<number>/merge`, `refs/pull/<number>/head`, `refs/heads/<branch name>` or simply `<branch name>`.
17    #[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
18    pub r#ref: Option<String>,
19    /// Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.
20    #[serde(rename = "analysis_key", skip_serializing_if = "Option::is_none")]
21    pub analysis_key: Option<String>,
22    /// Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed.
23    #[serde(rename = "environment", skip_serializing_if = "Option::is_none")]
24    pub environment: Option<String>,
25    /// Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code.
26    #[serde(rename = "category", skip_serializing_if = "Option::is_none")]
27    pub category: Option<String>,
28    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
29    pub state: Option<models::CodeScanningAlertState>,
30    #[serde(rename = "commit_sha", skip_serializing_if = "Option::is_none")]
31    pub commit_sha: Option<String>,
32    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
33    pub message: Option<Box<models::CodeScanningAlertInstanceMessage>>,
34    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
35    pub location: Option<Box<models::CodeScanningAlertLocation>>,
36    #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")]
37    pub html_url: Option<String>,
38    /// Classifications that have been applied to the file that triggered the alert. For example identifying it as documentation, or a generated file.
39    #[serde(rename = "classifications", skip_serializing_if = "Option::is_none")]
40    pub classifications: Option<Vec<models::CodeScanningAlertClassification>>,
41}
42
43impl CodeScanningAlertInstance {
44    pub fn new() -> CodeScanningAlertInstance {
45        CodeScanningAlertInstance {
46            r#ref: None,
47            analysis_key: None,
48            environment: None,
49            category: None,
50            state: None,
51            commit_sha: None,
52            message: None,
53            location: None,
54            html_url: None,
55            classifications: None,
56        }
57    }
58}
59