openapi-github 0.1.0

OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
Documentation
/*
 * GitHub's official OpenAPI spec + Octokit extension
 *
 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
 *
 * The version of the OpenAPI document: 16.6.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookStatusCommit {
    #[serde(rename = "author", deserialize_with = "Option::deserialize")]
    pub author: Option<Box<models::User3>>,
    #[serde(rename = "comments_url")]
    pub comments_url: String,
    #[serde(rename = "commit")]
    pub commit: Box<models::WebhookStatusCommitCommit>,
    #[serde(rename = "committer", deserialize_with = "Option::deserialize")]
    pub committer: Option<Box<models::User3>>,
    #[serde(rename = "html_url")]
    pub html_url: String,
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "parents")]
    pub parents: Vec<models::WebhookStatusCommitParentsInner>,
    #[serde(rename = "sha")]
    pub sha: String,
    #[serde(rename = "url")]
    pub url: String,
}

impl WebhookStatusCommit {
    pub fn new(author: Option<models::User3>, comments_url: String, commit: models::WebhookStatusCommitCommit, committer: Option<models::User3>, html_url: String, node_id: String, parents: Vec<models::WebhookStatusCommitParentsInner>, sha: String, url: String) -> WebhookStatusCommit {
        WebhookStatusCommit {
            author: author.map(Box::new),
            comments_url,
            commit: Box::new(commit),
            committer: committer.map(Box::new),
            html_url,
            node_id,
            parents,
            sha,
            url,
        }
    }
}