openapi_github/models/
webhook_secret_scanning_alert_location_created.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 WebhookSecretScanningAlertLocationCreated {
16    #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
17    pub action: Option<Action>,
18    #[serde(rename = "alert")]
19    pub alert: Box<models::SecretScanningAlertWebhook>,
20    #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
21    pub installation: Option<Box<models::SimpleInstallation>>,
22    #[serde(rename = "location")]
23    pub location: Box<models::SecretScanningLocation>,
24    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
25    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
26    #[serde(rename = "repository")]
27    pub repository: Box<models::RepositoryWebhooks>,
28    #[serde(rename = "sender")]
29    pub sender: Box<models::SimpleUserWebhooks>,
30}
31
32impl WebhookSecretScanningAlertLocationCreated {
33    pub fn new(alert: models::SecretScanningAlertWebhook, location: models::SecretScanningLocation, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks) -> WebhookSecretScanningAlertLocationCreated {
34        WebhookSecretScanningAlertLocationCreated {
35            action: None,
36            alert: Box::new(alert),
37            installation: None,
38            location: Box::new(location),
39            organization: None,
40            repository: Box::new(repository),
41            sender: Box::new(sender),
42        }
43    }
44}
45/// 
46#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum Action {
48    #[serde(rename = "created")]
49    Created,
50}
51
52impl Default for Action {
53    fn default() -> Action {
54        Self::Created
55    }
56}
57