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