openapi_github/models/
webhook_pull_request_review_edited.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhookPullRequestReviewEdited {
16    #[serde(rename = "action")]
17    pub action: Action,
18    #[serde(rename = "changes")]
19    pub changes: Box<models::WebhookPullRequestReviewEditedChanges>,
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", skip_serializing_if = "Option::is_none")]
25    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
26    #[serde(rename = "pull_request")]
27    pub pull_request: Box<models::SimplePullRequest1>,
28    #[serde(rename = "repository")]
29    pub repository: Box<models::RepositoryWebhooks>,
30    #[serde(rename = "review")]
31    pub review: Box<models::WebhooksReview>,
32    #[serde(rename = "sender")]
33    pub sender: Box<models::SimpleUserWebhooks>,
34}
35
36impl WebhookPullRequestReviewEdited {
37    pub fn new(action: Action, changes: models::WebhookPullRequestReviewEditedChanges, pull_request: models::SimplePullRequest1, repository: models::RepositoryWebhooks, review: models::WebhooksReview, sender: models::SimpleUserWebhooks) -> WebhookPullRequestReviewEdited {
38        WebhookPullRequestReviewEdited {
39            action,
40            changes: Box::new(changes),
41            enterprise: None,
42            installation: None,
43            organization: None,
44            pull_request: Box::new(pull_request),
45            repository: Box::new(repository),
46            review: Box::new(review),
47            sender: Box::new(sender),
48        }
49    }
50}
51/// 
52#[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