openapi_github/models/
repository_rule_workflows.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/// RepositoryRuleWorkflows : Require all changes made to a targeted branch to pass the specified workflows before they can be merged.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RepositoryRuleWorkflows {
17    #[serde(rename = "type")]
18    pub r#type: Type,
19    #[serde(rename = "parameters", skip_serializing_if = "Option::is_none")]
20    pub parameters: Option<Box<models::RepositoryRuleWorkflowsParameters>>,
21}
22
23impl RepositoryRuleWorkflows {
24    /// Require all changes made to a targeted branch to pass the specified workflows before they can be merged.
25    pub fn new(r#type: Type) -> RepositoryRuleWorkflows {
26        RepositoryRuleWorkflows {
27            r#type,
28            parameters: None,
29        }
30    }
31}
32/// 
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Type {
35    #[serde(rename = "workflows")]
36    Workflows,
37}
38
39impl Default for Type {
40    fn default() -> Type {
41        Self::Workflows
42    }
43}
44