openapi_github/models/
webhook_page_build.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 WebhookPageBuild {
16    #[serde(rename = "build")]
17    pub build: Box<models::WebhookPageBuildBuild>,
18    #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
19    pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
20    #[serde(rename = "id")]
21    pub id: i32,
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 = "repository")]
27    pub repository: Box<models::RepositoryWebhooks>,
28    #[serde(rename = "sender")]
29    pub sender: Box<models::SimpleUserWebhooks>,
30}
31
32impl WebhookPageBuild {
33    pub fn new(build: models::WebhookPageBuildBuild, id: i32, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks) -> WebhookPageBuild {
34        WebhookPageBuild {
35            build: Box::new(build),
36            enterprise: None,
37            id,
38            installation: None,
39            organization: None,
40            repository: Box::new(repository),
41            sender: Box::new(sender),
42        }
43    }
44}
45