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

/// InstallationToken : Authentication token for a GitHub App installed on a user or org.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InstallationToken {
    #[serde(rename = "token")]
    pub token: String,
    #[serde(rename = "expires_at")]
    pub expires_at: String,
    #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
    pub permissions: Option<Box<models::AppPermissions>>,
    #[serde(rename = "repository_selection", skip_serializing_if = "Option::is_none")]
    pub repository_selection: Option<RepositorySelection>,
    #[serde(rename = "repositories", skip_serializing_if = "Option::is_none")]
    pub repositories: Option<Vec<models::Repository>>,
    #[serde(rename = "single_file", skip_serializing_if = "Option::is_none")]
    pub single_file: Option<String>,
    #[serde(rename = "has_multiple_single_files", skip_serializing_if = "Option::is_none")]
    pub has_multiple_single_files: Option<bool>,
    #[serde(rename = "single_file_paths", skip_serializing_if = "Option::is_none")]
    pub single_file_paths: Option<Vec<String>>,
}

impl InstallationToken {
    /// Authentication token for a GitHub App installed on a user or org.
    pub fn new(token: String, expires_at: String) -> InstallationToken {
        InstallationToken {
            token,
            expires_at,
            permissions: None,
            repository_selection: None,
            repositories: None,
            single_file: None,
            has_multiple_single_files: None,
            single_file_paths: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RepositorySelection {
    #[serde(rename = "all")]
    All,
    #[serde(rename = "selected")]
    Selected,
}

impl Default for RepositorySelection {
    fn default() -> RepositorySelection {
        Self::All
    }
}