openapi_github/models/
code_scanning_alert_dismissed_reason.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/// CodeScanningAlertDismissedReason : **Required when the state is dismissed.** The reason for dismissing or closing the alert.
15/// **Required when the state is dismissed.** The reason for dismissing or closing the alert.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum CodeScanningAlertDismissedReason {
18    #[serde(rename = "false positive")]
19    FalsePositive,
20    #[serde(rename = "won't fix")]
21    WonQuoteTFix,
22    #[serde(rename = "used in tests")]
23    UsedInTests,
24
25}
26
27impl std::fmt::Display for CodeScanningAlertDismissedReason {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::FalsePositive => write!(f, "false positive"),
31            Self::WonQuoteTFix => write!(f, "won't fix"),
32            Self::UsedInTests => write!(f, "used in tests"),
33        }
34    }
35}
36
37impl Default for CodeScanningAlertDismissedReason {
38    fn default() -> CodeScanningAlertDismissedReason {
39        Self::FalsePositive
40    }
41}
42