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