openapi_github/models/
pending_deployment.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/// PendingDeployment : Details of a deployment that is waiting for protection rules to pass
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PendingDeployment {
17    #[serde(rename = "environment")]
18    pub environment: Box<models::PendingDeploymentEnvironment>,
19    /// The set duration of the wait timer
20    #[serde(rename = "wait_timer")]
21    pub wait_timer: i32,
22    /// The time that the wait timer began.
23    #[serde(rename = "wait_timer_started_at", deserialize_with = "Option::deserialize")]
24    pub wait_timer_started_at: Option<String>,
25    /// Whether the currently authenticated user can approve the deployment
26    #[serde(rename = "current_user_can_approve")]
27    pub current_user_can_approve: bool,
28    /// The people or teams that may approve 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.
29    #[serde(rename = "reviewers")]
30    pub reviewers: Vec<models::PendingDeploymentReviewersInner>,
31}
32
33impl PendingDeployment {
34    /// Details of a deployment that is waiting for protection rules to pass
35    pub fn new(environment: models::PendingDeploymentEnvironment, wait_timer: i32, wait_timer_started_at: Option<String>, current_user_can_approve: bool, reviewers: Vec<models::PendingDeploymentReviewersInner>) -> PendingDeployment {
36        PendingDeployment {
37            environment: Box::new(environment),
38            wait_timer,
39            wait_timer_started_at,
40            current_user_can_approve,
41            reviewers,
42        }
43    }
44}
45