openapi_github/models/
repos_create_or_update_environment_request.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReposCreateOrUpdateEnvironmentRequest {
16    /// The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
17    #[serde(rename = "wait_timer", skip_serializing_if = "Option::is_none")]
18    pub wait_timer: Option<i32>,
19    /// Whether or not a user who created the job is prevented from approving their own job.
20    #[serde(rename = "prevent_self_review", skip_serializing_if = "Option::is_none")]
21    pub prevent_self_review: Option<bool>,
22    /// The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
23    #[serde(rename = "reviewers", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub reviewers: Option<Option<Vec<models::ReposCreateOrUpdateEnvironmentRequestReviewersInner>>>,
25    #[serde(rename = "deployment_branch_policy", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub deployment_branch_policy: Option<Option<Box<models::DeploymentBranchPolicySettings>>>,
27}
28
29impl ReposCreateOrUpdateEnvironmentRequest {
30    pub fn new() -> ReposCreateOrUpdateEnvironmentRequest {
31        ReposCreateOrUpdateEnvironmentRequest {
32            wait_timer: None,
33            prevent_self_review: None,
34            reviewers: None,
35            deployment_branch_policy: None,
36        }
37    }
38}
39