openapi_github/models/
actions_default_workflow_permissions.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/// ActionsDefaultWorkflowPermissions : The default workflow permissions granted to the GITHUB_TOKEN when running workflows.
15/// The default workflow permissions granted to the GITHUB_TOKEN when running workflows.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum ActionsDefaultWorkflowPermissions {
18    #[serde(rename = "read")]
19    Read,
20    #[serde(rename = "write")]
21    Write,
22
23}
24
25impl std::fmt::Display for ActionsDefaultWorkflowPermissions {
26    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Self::Read => write!(f, "read"),
29            Self::Write => write!(f, "write"),
30        }
31    }
32}
33
34impl Default for ActionsDefaultWorkflowPermissions {
35    fn default() -> ActionsDefaultWorkflowPermissions {
36        Self::Read
37    }
38}
39