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

/// RepositoryRuleParamsCodeScanningTool : A tool that must provide code scanning results for this rule to pass.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RepositoryRuleParamsCodeScanningTool {
    /// The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see \"[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"
    #[serde(rename = "alerts_threshold")]
    pub alerts_threshold: AlertsThreshold,
    /// The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see \"[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"
    #[serde(rename = "security_alerts_threshold")]
    pub security_alerts_threshold: SecurityAlertsThreshold,
    /// The name of a code scanning tool
    #[serde(rename = "tool")]
    pub tool: String,
}

impl RepositoryRuleParamsCodeScanningTool {
    /// A tool that must provide code scanning results for this rule to pass.
    pub fn new(alerts_threshold: AlertsThreshold, security_alerts_threshold: SecurityAlertsThreshold, tool: String) -> RepositoryRuleParamsCodeScanningTool {
        RepositoryRuleParamsCodeScanningTool {
            alerts_threshold,
            security_alerts_threshold,
            tool,
        }
    }
}
/// The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see \"[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AlertsThreshold {
    #[serde(rename = "none")]
    None,
    #[serde(rename = "errors")]
    Errors,
    #[serde(rename = "errors_and_warnings")]
    ErrorsAndWarnings,
    #[serde(rename = "all")]
    All,
}

impl Default for AlertsThreshold {
    fn default() -> AlertsThreshold {
        Self::None
    }
}
/// The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see \"[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels).\"
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SecurityAlertsThreshold {
    #[serde(rename = "none")]
    None,
    #[serde(rename = "critical")]
    Critical,
    #[serde(rename = "high_or_higher")]
    HighOrHigher,
    #[serde(rename = "medium_or_higher")]
    MediumOrHigher,
    #[serde(rename = "all")]
    All,
}

impl Default for SecurityAlertsThreshold {
    fn default() -> SecurityAlertsThreshold {
        Self::None
    }
}