openapi_github/models/
webhook_pull_request_review_comment_edited.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhookPullRequestReviewCommentEdited {
16 #[serde(rename = "action")]
17 pub action: Action,
18 #[serde(rename = "changes")]
19 pub changes: Box<models::WebhooksChanges>,
20 #[serde(rename = "comment")]
21 pub comment: Box<models::WebhooksReviewComment>,
22 #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
23 pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
24 #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
25 pub installation: Option<Box<models::SimpleInstallation>>,
26 #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
27 pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
28 #[serde(rename = "pull_request")]
29 pub pull_request: Box<models::WebhookPullRequestReviewCommentEditedPullRequest>,
30 #[serde(rename = "repository")]
31 pub repository: Box<models::RepositoryWebhooks>,
32 #[serde(rename = "sender")]
33 pub sender: Box<models::SimpleUserWebhooks>,
34}
35
36impl WebhookPullRequestReviewCommentEdited {
37 pub fn new(action: Action, changes: models::WebhooksChanges, comment: models::WebhooksReviewComment, pull_request: models::WebhookPullRequestReviewCommentEditedPullRequest, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks) -> WebhookPullRequestReviewCommentEdited {
38 WebhookPullRequestReviewCommentEdited {
39 action,
40 changes: Box::new(changes),
41 comment: Box::new(comment),
42 enterprise: None,
43 installation: None,
44 organization: None,
45 pull_request: Box::new(pull_request),
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