openapi_github/models/
secret_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 SecretScanningUpdateAlertRequest {
16    #[serde(rename = "state")]
17    pub state: models::SecretScanningAlertState,
18    #[serde(rename = "resolution", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub resolution: Option<Option<models::SecretScanningAlertResolution>>,
20    /// An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`.
21    #[serde(rename = "resolution_comment", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub resolution_comment: Option<Option<String>>,
23}
24
25impl SecretScanningUpdateAlertRequest {
26    pub fn new(state: models::SecretScanningAlertState) -> SecretScanningUpdateAlertRequest {
27        SecretScanningUpdateAlertRequest {
28            state,
29            resolution: None,
30            resolution_comment: None,
31        }
32    }
33}
34