openapi_github/models/
allowed_actions.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/// AllowedActions : The permissions policy that controls the actions and reusable workflows that are allowed to run.
15/// The permissions policy that controls the actions and reusable workflows that are allowed to run.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AllowedActions {
18    #[serde(rename = "all")]
19    All,
20    #[serde(rename = "local_only")]
21    LocalOnly,
22    #[serde(rename = "selected")]
23    Selected,
24
25}
26
27impl std::fmt::Display for AllowedActions {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::All => write!(f, "all"),
31            Self::LocalOnly => write!(f, "local_only"),
32            Self::Selected => write!(f, "selected"),
33        }
34    }
35}
36
37impl Default for AllowedActions {
38    fn default() -> AllowedActions {
39        Self::All
40    }
41}
42