openapi_github/models/repos_update_branch_protection_request_required_status_checks.rs
1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ReposUpdateBranchProtectionRequestRequiredStatusChecks : Require status checks to pass before merging. Set to `null` to disable.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ReposUpdateBranchProtectionRequestRequiredStatusChecks {
17 /// Require branches to be up to date before merging.
18 #[serde(rename = "strict")]
19 pub strict: bool,
20 /// **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.
21 #[serde(rename = "contexts")]
22 pub contexts: Vec<String>,
23 /// The list of status checks to require in order to merge into this branch.
24 #[serde(rename = "checks", skip_serializing_if = "Option::is_none")]
25 pub checks: Option<Vec<models::ReposUpdateBranchProtectionRequestRequiredStatusChecksChecksInner>>,
26}
27
28impl ReposUpdateBranchProtectionRequestRequiredStatusChecks {
29 /// Require status checks to pass before merging. Set to `null` to disable.
30 pub fn new(strict: bool, contexts: Vec<String>) -> ReposUpdateBranchProtectionRequestRequiredStatusChecks {
31 ReposUpdateBranchProtectionRequestRequiredStatusChecks {
32 strict,
33 contexts,
34 checks: None,
35 }
36 }
37}
38