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 ProtectedBranchRequiredPullRequestReviews {
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "dismiss_stale_reviews", skip_serializing_if = "Option::is_none")]
    pub dismiss_stale_reviews: Option<bool>,
    #[serde(rename = "require_code_owner_reviews", skip_serializing_if = "Option::is_none")]
    pub require_code_owner_reviews: Option<bool>,
    #[serde(rename = "required_approving_review_count", skip_serializing_if = "Option::is_none")]
    pub required_approving_review_count: Option<i32>,
    /// Whether the most recent push must be approved by someone other than the person who pushed it.
    #[serde(rename = "require_last_push_approval", skip_serializing_if = "Option::is_none")]
    pub require_last_push_approval: Option<bool>,
    #[serde(rename = "dismissal_restrictions", skip_serializing_if = "Option::is_none")]
    pub dismissal_restrictions: Option<Box<models::ProtectedBranchRequiredPullRequestReviewsDismissalRestrictions>>,
    #[serde(rename = "bypass_pull_request_allowances", skip_serializing_if = "Option::is_none")]
    pub bypass_pull_request_allowances: Option<Box<models::ProtectedBranchRequiredPullRequestReviewsBypassPullRequestAllowances>>,
}

impl ProtectedBranchRequiredPullRequestReviews {
    pub fn new(url: String) -> ProtectedBranchRequiredPullRequestReviews {
        ProtectedBranchRequiredPullRequestReviews {
            url,
            dismiss_stale_reviews: None,
            require_code_owner_reviews: None,
            required_approving_review_count: None,
            require_last_push_approval: None,
            dismissal_restrictions: None,
            bypass_pull_request_allowances: None,
        }
    }
}