openapi_github/models/
code_scanning_alert_set_state.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/// CodeScanningAlertSetState : Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`.
15/// Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum CodeScanningAlertSetState {
18    #[serde(rename = "open")]
19    Open,
20    #[serde(rename = "dismissed")]
21    Dismissed,
22
23}
24
25impl std::fmt::Display for CodeScanningAlertSetState {
26    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Self::Open => write!(f, "open"),
29            Self::Dismissed => write!(f, "dismissed"),
30        }
31    }
32}
33
34impl Default for CodeScanningAlertSetState {
35    fn default() -> CodeScanningAlertSetState {
36        Self::Open
37    }
38}
39