openapi_github/models/
webhook_deployment_protection_rule_requested.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 WebhookDeploymentProtectionRuleRequested {
16    #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
17    pub action: Option<Action>,
18    /// The name of the environment that has the deployment protection rule.
19    #[serde(rename = "environment", skip_serializing_if = "Option::is_none")]
20    pub environment: Option<String>,
21    /// The event that triggered the deployment protection rule.
22    #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
23    pub event: Option<String>,
24    /// The URL to review the deployment protection rule.
25    #[serde(rename = "deployment_callback_url", skip_serializing_if = "Option::is_none")]
26    pub deployment_callback_url: Option<String>,
27    #[serde(rename = "deployment", skip_serializing_if = "Option::is_none")]
28    pub deployment: Option<Box<models::Deployment>>,
29    #[serde(rename = "pull_requests", skip_serializing_if = "Option::is_none")]
30    pub pull_requests: Option<Vec<models::PullRequest>>,
31    #[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
32    pub repository: Option<Box<models::RepositoryWebhooks>>,
33    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
34    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
35    #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
36    pub installation: Option<Box<models::SimpleInstallation>>,
37    #[serde(rename = "sender", skip_serializing_if = "Option::is_none")]
38    pub sender: Option<Box<models::SimpleUserWebhooks>>,
39}
40
41impl WebhookDeploymentProtectionRuleRequested {
42    pub fn new() -> WebhookDeploymentProtectionRuleRequested {
43        WebhookDeploymentProtectionRuleRequested {
44            action: None,
45            environment: None,
46            event: None,
47            deployment_callback_url: None,
48            deployment: None,
49            pull_requests: None,
50            repository: None,
51            organization: None,
52            installation: None,
53            sender: None,
54        }
55    }
56}
57/// 
58#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
59pub enum Action {
60    #[serde(rename = "requested")]
61    Requested,
62}
63
64impl Default for Action {
65    fn default() -> Action {
66        Self::Requested
67    }
68}
69