use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookMarketplacePurchasePendingChangeCancelled {
#[serde(rename = "action")]
pub action: Action,
#[serde(rename = "effective_date")]
pub effective_date: String,
#[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 = "marketplace_purchase")]
pub marketplace_purchase: Box<models::MarketplacePurchase2>,
#[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
#[serde(rename = "previous_marketplace_purchase", skip_serializing_if = "Option::is_none")]
pub previous_marketplace_purchase: Option<Box<models::WebhooksPreviousMarketplacePurchase>>,
#[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
pub repository: Option<Box<models::RepositoryWebhooks>>,
#[serde(rename = "sender")]
pub sender: Box<models::SimpleUserWebhooks>,
}
impl WebhookMarketplacePurchasePendingChangeCancelled {
pub fn new(action: Action, effective_date: String, marketplace_purchase: models::MarketplacePurchase2, sender: models::SimpleUserWebhooks) -> WebhookMarketplacePurchasePendingChangeCancelled {
WebhookMarketplacePurchasePendingChangeCancelled {
action,
effective_date,
enterprise: None,
installation: None,
marketplace_purchase: Box::new(marketplace_purchase),
organization: None,
previous_marketplace_purchase: None,
repository: None,
sender: Box::new(sender),
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Action {
#[serde(rename = "pending_change_cancelled")]
PendingChangeCancelled,
}
impl Default for Action {
fn default() -> Action {
Self::PendingChangeCancelled
}
}