openapi_github/models/
protected_branch_required_status_check.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/// ProtectedBranchRequiredStatusCheck : Protected Branch Required Status Check
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProtectedBranchRequiredStatusCheck {
17    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
18    pub url: Option<String>,
19    #[serde(rename = "enforcement_level", skip_serializing_if = "Option::is_none")]
20    pub enforcement_level: Option<String>,
21    #[serde(rename = "contexts")]
22    pub contexts: Vec<String>,
23    #[serde(rename = "checks")]
24    pub checks: Vec<models::ProtectedBranchRequiredStatusCheckChecksInner>,
25    #[serde(rename = "contexts_url", skip_serializing_if = "Option::is_none")]
26    pub contexts_url: Option<String>,
27    #[serde(rename = "strict", skip_serializing_if = "Option::is_none")]
28    pub strict: Option<bool>,
29}
30
31impl ProtectedBranchRequiredStatusCheck {
32    /// Protected Branch Required Status Check
33    pub fn new(contexts: Vec<String>, checks: Vec<models::ProtectedBranchRequiredStatusCheckChecksInner>) -> ProtectedBranchRequiredStatusCheck {
34        ProtectedBranchRequiredStatusCheck {
35            url: None,
36            enforcement_level: None,
37            contexts,
38            checks,
39            contexts_url: None,
40            strict: None,
41        }
42    }
43}
44