openapi_github/models/
webhook_pull_request_review_thread_unresolved.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 WebhookPullRequestReviewThreadUnresolved {
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", skip_serializing_if = "Option::is_none")]
21    pub installation: Option<Box<models::SimpleInstallation>>,
22    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
23    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
24    #[serde(rename = "pull_request")]
25    pub pull_request: Box<models::SimplePullRequest4>,
26    #[serde(rename = "repository")]
27    pub repository: Box<models::RepositoryWebhooks>,
28    #[serde(rename = "sender", skip_serializing_if = "Option::is_none")]
29    pub sender: Option<Box<models::SimpleUserWebhooks>>,
30    #[serde(rename = "thread")]
31    pub thread: Box<models::WebhookPullRequestReviewThreadUnresolvedThread>,
32}
33
34impl WebhookPullRequestReviewThreadUnresolved {
35    pub fn new(action: Action, pull_request: models::SimplePullRequest4, repository: models::RepositoryWebhooks, thread: models::WebhookPullRequestReviewThreadUnresolvedThread) -> WebhookPullRequestReviewThreadUnresolved {
36        WebhookPullRequestReviewThreadUnresolved {
37            action,
38            enterprise: None,
39            installation: None,
40            organization: None,
41            pull_request: Box::new(pull_request),
42            repository: Box::new(repository),
43            sender: None,
44            thread: Box::new(thread),
45        }
46    }
47}
48/// 
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum Action {
51    #[serde(rename = "unresolved")]
52    Unresolved,
53}
54
55impl Default for Action {
56    fn default() -> Action {
57        Self::Unresolved
58    }
59}
60