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 WebhookPackageUpdatedPackagePackageVersionRelease {
    #[serde(rename = "author", deserialize_with = "Option::deserialize")]
    pub author: Option<Box<models::User>>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "draft")]
    pub draft: bool,
    #[serde(rename = "html_url")]
    pub html_url: String,
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "prerelease")]
    pub prerelease: bool,
    #[serde(rename = "published_at")]
    pub published_at: String,
    #[serde(rename = "tag_name")]
    pub tag_name: String,
    #[serde(rename = "target_commitish")]
    pub target_commitish: String,
    #[serde(rename = "url")]
    pub url: String,
}

impl WebhookPackageUpdatedPackagePackageVersionRelease {
    pub fn new(author: Option<models::User>, created_at: String, draft: bool, html_url: String, id: i32, name: String, prerelease: bool, published_at: String, tag_name: String, target_commitish: String, url: String) -> WebhookPackageUpdatedPackagePackageVersionRelease {
        WebhookPackageUpdatedPackagePackageVersionRelease {
            author: author.map(Box::new),
            created_at,
            draft,
            html_url,
            id,
            name,
            prerelease,
            published_at,
            tag_name,
            target_commitish,
            url,
        }
    }
}