openapi_github/models/
webhook_pull_request_dequeued.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 WebhookPullRequestDequeued {
16    #[serde(rename = "action")]
17    pub action: Action,
18    #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
19    pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
20    #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
21    pub installation: Option<Box<models::SimpleInstallation>>,
22    #[serde(rename = "number")]
23    pub number: i32,
24    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
25    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
26    #[serde(rename = "pull_request")]
27    pub pull_request: Box<models::PullRequest3>,
28    #[serde(rename = "reason")]
29    pub reason: String,
30    #[serde(rename = "repository")]
31    pub repository: Box<models::RepositoryWebhooks>,
32    #[serde(rename = "sender")]
33    pub sender: Box<models::SimpleUserWebhooks>,
34}
35
36impl WebhookPullRequestDequeued {
37    pub fn new(action: Action, number: i32, pull_request: models::PullRequest3, reason: String, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks) -> WebhookPullRequestDequeued {
38        WebhookPullRequestDequeued {
39            action,
40            enterprise: None,
41            installation: None,
42            number,
43            organization: None,
44            pull_request: Box::new(pull_request),
45            reason,
46            repository: Box::new(repository),
47            sender: Box::new(sender),
48        }
49    }
50}
51/// 
52#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
53pub enum Action {
54    #[serde(rename = "dequeued")]
55    Dequeued,
56}
57
58impl Default for Action {
59    fn default() -> Action {
60        Self::Dequeued
61    }
62}
63