openapi_github/models/
webhook_pull_request_locked.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 WebhookPullRequestLocked {
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    /// The pull request number.
23    #[serde(rename = "number")]
24    pub number: i32,
25    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
26    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
27    #[serde(rename = "pull_request")]
28    pub pull_request: Box<models::PullRequest5>,
29    #[serde(rename = "repository")]
30    pub repository: Box<models::RepositoryWebhooks>,
31    #[serde(rename = "sender")]
32    pub sender: Box<models::SimpleUserWebhooks>,
33}
34
35impl WebhookPullRequestLocked {
36    pub fn new(action: Action, number: i32, pull_request: models::PullRequest5, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks) -> WebhookPullRequestLocked {
37        WebhookPullRequestLocked {
38            action,
39            enterprise: None,
40            installation: None,
41            number,
42            organization: None,
43            pull_request: Box::new(pull_request),
44            repository: Box::new(repository),
45            sender: Box::new(sender),
46        }
47    }
48}
49/// 
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum Action {
52    #[serde(rename = "locked")]
53    Locked,
54}
55
56impl Default for Action {
57    fn default() -> Action {
58        Self::Locked
59    }
60}
61