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 ReposUpdateRepoRulesetRequest {
    /// The name of the ruleset.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The target of the ruleset  **Note**: The `push` target is in beta and is subject to change.
    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
    pub target: Option<Target>,
    #[serde(rename = "enforcement", skip_serializing_if = "Option::is_none")]
    pub enforcement: Option<models::RepositoryRuleEnforcement>,
    /// The actors that can bypass the rules in this ruleset
    #[serde(rename = "bypass_actors", skip_serializing_if = "Option::is_none")]
    pub bypass_actors: Option<Vec<models::RepositoryRulesetBypassActor>>,
    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Box<models::RepositoryRulesetConditions>>,
    /// An array of rules within the ruleset.
    #[serde(rename = "rules", skip_serializing_if = "Option::is_none")]
    pub rules: Option<Vec<models::RepositoryRule>>,
}

impl ReposUpdateRepoRulesetRequest {
    pub fn new() -> ReposUpdateRepoRulesetRequest {
        ReposUpdateRepoRulesetRequest {
            name: None,
            target: None,
            enforcement: None,
            bypass_actors: None,
            conditions: None,
            rules: None,
        }
    }
}
/// The target of the ruleset  **Note**: The `push` target is in beta and is subject to change.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Target {
    #[serde(rename = "branch")]
    Branch,
    #[serde(rename = "tag")]
    Tag,
    #[serde(rename = "push")]
    Push,
}

impl Default for Target {
    fn default() -> Target {
        Self::Branch
    }
}