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 WebhooksTeamParent {
    /// Description of the team
    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
    pub description: Option<String>,
    #[serde(rename = "html_url")]
    pub html_url: String,
    /// Unique identifier of the team
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "members_url")]
    pub members_url: String,
    /// Name of the team
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "node_id")]
    pub node_id: String,
    /// Permission that the team will have for its repositories
    #[serde(rename = "permission")]
    pub permission: String,
    #[serde(rename = "privacy")]
    pub privacy: Privacy,
    /// Whether team members will receive notifications when their team is @mentioned
    #[serde(rename = "notification_setting")]
    pub notification_setting: NotificationSetting,
    #[serde(rename = "repositories_url")]
    pub repositories_url: String,
    #[serde(rename = "slug")]
    pub slug: String,
    /// URL for the team
    #[serde(rename = "url")]
    pub url: String,
}

impl WebhooksTeamParent {
    pub fn new(description: Option<String>, html_url: String, id: i32, members_url: String, name: String, node_id: String, permission: String, privacy: Privacy, notification_setting: NotificationSetting, repositories_url: String, slug: String, url: String) -> WebhooksTeamParent {
        WebhooksTeamParent {
            description,
            html_url,
            id,
            members_url,
            name,
            node_id,
            permission,
            privacy,
            notification_setting,
            repositories_url,
            slug,
            url,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Privacy {
    #[serde(rename = "open")]
    Open,
    #[serde(rename = "closed")]
    Closed,
    #[serde(rename = "secret")]
    Secret,
}

impl Default for Privacy {
    fn default() -> Privacy {
        Self::Open
    }
}
/// Whether team members will receive notifications when their team is @mentioned
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum NotificationSetting {
    #[serde(rename = "notifications_enabled")]
    Enabled,
    #[serde(rename = "notifications_disabled")]
    Disabled,
}

impl Default for NotificationSetting {
    fn default() -> NotificationSetting {
        Self::Enabled
    }
}