openapi_github/models/
webhook_installation_unsuspend.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 WebhookInstallationUnsuspend {
16    #[serde(rename = "action")]
17    pub action: Action,
18    #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
19    pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
20    #[serde(rename = "installation")]
21    pub installation: Box<models::Installation>,
22    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
23    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
24    /// An array of repository objects that the installation can access.
25    #[serde(rename = "repositories", skip_serializing_if = "Option::is_none")]
26    pub repositories: Option<Vec<models::WebhooksRepositoriesInner>>,
27    #[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
28    pub repository: Option<Box<models::RepositoryWebhooks>>,
29    #[serde(rename = "requester", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub requester: Option<Option<serde_json::Value>>,
31    #[serde(rename = "sender")]
32    pub sender: Box<models::SimpleUserWebhooks>,
33}
34
35impl WebhookInstallationUnsuspend {
36    pub fn new(action: Action, installation: models::Installation, sender: models::SimpleUserWebhooks) -> WebhookInstallationUnsuspend {
37        WebhookInstallationUnsuspend {
38            action,
39            enterprise: None,
40            installation: Box::new(installation),
41            organization: None,
42            repositories: None,
43            repository: None,
44            requester: None,
45            sender: Box::new(sender),
46        }
47    }
48}
49/// 
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum Action {
52    #[serde(rename = "unsuspend")]
53    Unsuspend,
54}
55
56impl Default for Action {
57    fn default() -> Action {
58        Self::Unsuspend
59    }
60}
61