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