openapi_github/models/
webhook_projects_v2_project_created.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[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 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#[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