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