openapi_github/models/
file_path_restriction.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/// FilePathRestriction : Note: file_path_restriction is in beta and subject to change.  Prevent commits that include changes in specified file paths from being pushed to the commit graph.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FilePathRestriction {
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::FilePathRestrictionParameters>>,
21}
22
23impl FilePathRestriction {
24    /// Note: file_path_restriction is in beta and subject to change.  Prevent commits that include changes in specified file paths from being pushed to the commit graph.
25    pub fn new(r#type: Type) -> FilePathRestriction {
26        FilePathRestriction {
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 = "file_path_restriction")]
36    FilePathRestriction,
37}
38
39impl Default for Type {
40    fn default() -> Type {
41        Self::FilePathRestriction
42    }
43}
44