openapi_github/models/
webhook_custom_property_updated.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhookCustomPropertyUpdated {
16 #[serde(rename = "action")]
17 pub action: Action,
18 #[serde(rename = "definition")]
19 pub definition: Box<models::OrgCustomProperty>,
20 #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
21 pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
22 #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
23 pub installation: Option<Box<models::SimpleInstallation>>,
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}
29
30impl WebhookCustomPropertyUpdated {
31 pub fn new(action: Action, definition: models::OrgCustomProperty, organization: models::OrganizationSimpleWebhooks) -> WebhookCustomPropertyUpdated {
32 WebhookCustomPropertyUpdated {
33 action,
34 definition: Box::new(definition),
35 enterprise: None,
36 installation: None,
37 organization: Box::new(organization),
38 sender: None,
39 }
40 }
41}
42#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
44pub enum Action {
45 #[serde(rename = "updated")]
46 Updated,
47}
48
49impl Default for Action {
50 fn default() -> Action {
51 Self::Updated
52 }
53}
54