openapi_github/models/
webhook_issues_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 WebhookIssuesEdited {
16    #[serde(rename = "action")]
17    pub action: Action,
18    #[serde(rename = "changes")]
19    pub changes: Box<models::WebhookIssuesEditedChanges>,
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 = "issue")]
25    pub issue: Box<models::Issue2>,
26    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
27    pub label: Option<Box<models::WebhooksLabel>>,
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 WebhookIssuesEdited {
37    pub fn new(action: Action, changes: models::WebhookIssuesEditedChanges, issue: models::Issue2, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks) -> WebhookIssuesEdited {
38        WebhookIssuesEdited {
39            action,
40            changes: Box::new(changes),
41            enterprise: None,
42            installation: None,
43            issue: Box::new(issue),
44            label: None,
45            organization: None,
46            repository: Box::new(repository),
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