use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookSponsorshipTierChanged {
#[serde(rename = "action")]
pub action: Action,
#[serde(rename = "changes")]
pub changes: Box<models::WebhooksChanges8>,
#[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 = "repository", skip_serializing_if = "Option::is_none")]
pub repository: Option<Box<models::RepositoryWebhooks>>,
#[serde(rename = "sender")]
pub sender: Box<models::SimpleUserWebhooks>,
#[serde(rename = "sponsorship")]
pub sponsorship: Box<models::WebhooksSponsorship>,
}
impl WebhookSponsorshipTierChanged {
pub fn new(action: Action, changes: models::WebhooksChanges8, sender: models::SimpleUserWebhooks, sponsorship: models::WebhooksSponsorship) -> WebhookSponsorshipTierChanged {
WebhookSponsorshipTierChanged {
action,
changes: Box::new(changes),
enterprise: None,
installation: None,
organization: None,
repository: None,
sender: Box::new(sender),
sponsorship: Box::new(sponsorship),
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Action {
#[serde(rename = "tier_changed")]
TierChanged,
}
impl Default for Action {
fn default() -> Action {
Self::TierChanged
}
}