openapi_github/models/
code_scanning_update_alert_request.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 CodeScanningUpdateAlertRequest {
16    #[serde(rename = "state")]
17    pub state: models::CodeScanningAlertSetState,
18    #[serde(rename = "dismissed_reason", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub dismissed_reason: Option<Option<models::CodeScanningAlertDismissedReason>>,
20    /// The dismissal comment associated with the dismissal of the alert.
21    #[serde(rename = "dismissed_comment", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub dismissed_comment: Option<Option<String>>,
23}
24
25impl CodeScanningUpdateAlertRequest {
26    pub fn new(state: models::CodeScanningAlertSetState) -> CodeScanningUpdateAlertRequest {
27        CodeScanningUpdateAlertRequest {
28            state,
29            dismissed_reason: None,
30            dismissed_comment: None,
31        }
32    }
33}
34