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

/// ProtectedBranchPullRequestReview : Protected Branch Pull Request Review
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProtectedBranchPullRequestReview {
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[serde(rename = "dismissal_restrictions", skip_serializing_if = "Option::is_none")]
    pub dismissal_restrictions: Option<Box<models::ProtectedBranchPullRequestReviewDismissalRestrictions>>,
    #[serde(rename = "bypass_pull_request_allowances", skip_serializing_if = "Option::is_none")]
    pub bypass_pull_request_allowances: Option<Box<models::ProtectedBranchPullRequestReviewBypassPullRequestAllowances>>,
    #[serde(rename = "dismiss_stale_reviews")]
    pub dismiss_stale_reviews: bool,
    #[serde(rename = "require_code_owner_reviews")]
    pub require_code_owner_reviews: 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>,
}

impl ProtectedBranchPullRequestReview {
    /// Protected Branch Pull Request Review
    pub fn new(dismiss_stale_reviews: bool, require_code_owner_reviews: bool) -> ProtectedBranchPullRequestReview {
        ProtectedBranchPullRequestReview {
            url: None,
            dismissal_restrictions: None,
            bypass_pull_request_allowances: None,
            dismiss_stale_reviews,
            require_code_owner_reviews,
            required_approving_review_count: None,
            require_last_push_approval: None,
        }
    }
}