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