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};

/// Artifact : An artifact
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Artifact {
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "node_id")]
    pub node_id: String,
    /// The name of the artifact.
    #[serde(rename = "name")]
    pub name: String,
    /// The size in bytes of the artifact.
    #[serde(rename = "size_in_bytes")]
    pub size_in_bytes: i32,
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "archive_download_url")]
    pub archive_download_url: String,
    /// Whether or not the artifact has expired.
    #[serde(rename = "expired")]
    pub expired: bool,
    #[serde(rename = "created_at", deserialize_with = "Option::deserialize")]
    pub created_at: Option<String>,
    #[serde(rename = "expires_at", deserialize_with = "Option::deserialize")]
    pub expires_at: Option<String>,
    #[serde(rename = "updated_at", deserialize_with = "Option::deserialize")]
    pub updated_at: Option<String>,
    #[serde(rename = "workflow_run", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub workflow_run: Option<Option<Box<models::ArtifactWorkflowRun>>>,
}

impl Artifact {
    /// An artifact
    pub fn new(id: i32, node_id: String, name: String, size_in_bytes: i32, url: String, archive_download_url: String, expired: bool, created_at: Option<String>, expires_at: Option<String>, updated_at: Option<String>) -> Artifact {
        Artifact {
            id,
            node_id,
            name,
            size_in_bytes,
            url,
            archive_download_url,
            expired,
            created_at,
            expires_at,
            updated_at,
            workflow_run: None,
        }
    }
}