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