openapi_github/models/
code_scanning_alert_classification.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/// CodeScanningAlertClassification : A classification of the file. For example to identify it as generated.
15/// A classification of the file. For example to identify it as generated.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum CodeScanningAlertClassification {
18    #[serde(rename = "source")]
19    Source,
20    #[serde(rename = "generated")]
21    Generated,
22    #[serde(rename = "test")]
23    Test,
24    #[serde(rename = "library")]
25    Library,
26
27}
28
29impl std::fmt::Display for CodeScanningAlertClassification {
30    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31        match self {
32            Self::Source => write!(f, "source"),
33            Self::Generated => write!(f, "generated"),
34            Self::Test => write!(f, "test"),
35            Self::Library => write!(f, "library"),
36        }
37    }
38}
39
40impl Default for CodeScanningAlertClassification {
41    fn default() -> CodeScanningAlertClassification {
42        Self::Source
43    }
44}
45