openapi_github/models/
organization_actions_secret.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/// OrganizationActionsSecret : Secrets for GitHub Actions for an organization.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OrganizationActionsSecret {
17    /// The name of the secret.
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "created_at")]
21    pub created_at: String,
22    #[serde(rename = "updated_at")]
23    pub updated_at: String,
24    /// Visibility of a secret
25    #[serde(rename = "visibility")]
26    pub visibility: Visibility,
27    #[serde(rename = "selected_repositories_url", skip_serializing_if = "Option::is_none")]
28    pub selected_repositories_url: Option<String>,
29}
30
31impl OrganizationActionsSecret {
32    /// Secrets for GitHub Actions for an organization.
33    pub fn new(name: String, created_at: String, updated_at: String, visibility: Visibility) -> OrganizationActionsSecret {
34        OrganizationActionsSecret {
35            name,
36            created_at,
37            updated_at,
38            visibility,
39            selected_repositories_url: None,
40        }
41    }
42}
43/// Visibility of a secret
44#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
45pub enum Visibility {
46    #[serde(rename = "all")]
47    All,
48    #[serde(rename = "private")]
49    Private,
50    #[serde(rename = "selected")]
51    Selected,
52}
53
54impl Default for Visibility {
55    fn default() -> Visibility {
56        Self::All
57    }
58}
59