use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookProjectCardConverted {
#[serde(rename = "action")]
pub action: Action,
#[serde(rename = "changes")]
pub changes: Box<models::WebhookProjectCardConvertedChanges>,
#[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
#[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
pub installation: Option<Box<models::SimpleInstallation>>,
#[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
#[serde(rename = "project_card")]
pub project_card: Box<models::WebhooksProjectCard>,
#[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
pub repository: Option<Box<models::RepositoryWebhooks>>,
#[serde(rename = "sender")]
pub sender: Box<models::SimpleUserWebhooks>,
}
impl WebhookProjectCardConverted {
pub fn new(action: Action, changes: models::WebhookProjectCardConvertedChanges, project_card: models::WebhooksProjectCard, sender: models::SimpleUserWebhooks) -> WebhookProjectCardConverted {
WebhookProjectCardConverted {
action,
changes: Box::new(changes),
enterprise: None,
installation: None,
organization: None,
project_card: Box::new(project_card),
repository: None,
sender: Box::new(sender),
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Action {
#[serde(rename = "converted")]
Converted,
}
impl Default for Action {
fn default() -> Action {
Self::Converted
}
}