openapi_github/models/oidc_custom_sub_repo.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/// OidcCustomSubRepo : Actions OIDC subject customization for a repository
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OidcCustomSubRepo {
17 /// Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored.
18 #[serde(rename = "use_default")]
19 pub use_default: bool,
20 /// Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.
21 #[serde(rename = "include_claim_keys", skip_serializing_if = "Option::is_none")]
22 pub include_claim_keys: Option<Vec<String>>,
23}
24
25impl OidcCustomSubRepo {
26 /// Actions OIDC subject customization for a repository
27 pub fn new(use_default: bool) -> OidcCustomSubRepo {
28 OidcCustomSubRepo {
29 use_default,
30 include_claim_keys: None,
31 }
32 }
33}
34