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

/// DeploymentSimple : A deployment created as the result of an Actions check run from a workflow that references an environment
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeploymentSimple {
    #[serde(rename = "url")]
    pub url: String,
    /// Unique identifier of the deployment
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "node_id")]
    pub node_id: String,
    /// Parameter to specify a task to execute
    #[serde(rename = "task")]
    pub task: String,
    #[serde(rename = "original_environment", skip_serializing_if = "Option::is_none")]
    pub original_environment: Option<String>,
    /// Name for the target deployment environment.
    #[serde(rename = "environment")]
    pub environment: String,
    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
    pub description: Option<String>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    #[serde(rename = "statuses_url")]
    pub statuses_url: String,
    #[serde(rename = "repository_url")]
    pub repository_url: String,
    /// Specifies if the given environment is will no longer exist at some point in the future. Default: false.
    #[serde(rename = "transient_environment", skip_serializing_if = "Option::is_none")]
    pub transient_environment: Option<bool>,
    /// Specifies if the given environment is one that end-users directly interact with. Default: false.
    #[serde(rename = "production_environment", skip_serializing_if = "Option::is_none")]
    pub production_environment: Option<bool>,
    #[serde(rename = "performed_via_github_app", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub performed_via_github_app: Option<Option<Box<models::NullableIntegration>>>,
}

impl DeploymentSimple {
    /// A deployment created as the result of an Actions check run from a workflow that references an environment
    pub fn new(url: String, id: i32, node_id: String, task: String, environment: String, description: Option<String>, created_at: String, updated_at: String, statuses_url: String, repository_url: String) -> DeploymentSimple {
        DeploymentSimple {
            url,
            id,
            node_id,
            task,
            original_environment: None,
            environment,
            description,
            created_at,
            updated_at,
            statuses_url,
            repository_url,
            transient_environment: None,
            production_environment: None,
            performed_via_github_app: None,
        }
    }
}