openapi_github/models/
webhook_custom_property_values_updated.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhookCustomPropertyValuesUpdated {
16 #[serde(rename = "action")]
17 pub action: Action,
18 #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
19 pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
20 #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
21 pub installation: Option<Box<models::SimpleInstallation>>,
22 #[serde(rename = "repository")]
23 pub repository: Box<models::RepositoryWebhooks>,
24 #[serde(rename = "organization")]
25 pub organization: Box<models::OrganizationSimpleWebhooks>,
26 #[serde(rename = "sender", skip_serializing_if = "Option::is_none")]
27 pub sender: Option<Box<models::SimpleUserWebhooks>>,
28 #[serde(rename = "new_property_values")]
30 pub new_property_values: Vec<models::CustomPropertyValue>,
31 #[serde(rename = "old_property_values")]
33 pub old_property_values: Vec<models::CustomPropertyValue>,
34}
35
36impl WebhookCustomPropertyValuesUpdated {
37 pub fn new(action: Action, repository: models::RepositoryWebhooks, organization: models::OrganizationSimpleWebhooks, new_property_values: Vec<models::CustomPropertyValue>, old_property_values: Vec<models::CustomPropertyValue>) -> WebhookCustomPropertyValuesUpdated {
38 WebhookCustomPropertyValuesUpdated {
39 action,
40 enterprise: None,
41 installation: None,
42 repository: Box::new(repository),
43 organization: Box::new(organization),
44 sender: None,
45 new_property_values,
46 old_property_values,
47 }
48 }
49}
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
52pub enum Action {
53 #[serde(rename = "updated")]
54 Updated,
55}
56
57impl Default for Action {
58 fn default() -> Action {
59 Self::Updated
60 }
61}
62