/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.2.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeploymentRequest {
    #[serde(rename = "id")]
    pub id: i64,
    #[serde(rename = "source_workspace_id")]
    pub source_workspace_id: String,
    #[serde(rename = "fork_workspace_id")]
    pub fork_workspace_id: String,
    #[serde(rename = "requested_by")]
    pub requested_by: String,
    #[serde(rename = "requested_by_email")]
    pub requested_by_email: String,
    #[serde(rename = "requested_at")]
    pub requested_at: String,
    #[serde(rename = "assignees")]
    pub assignees: Vec<models::DeploymentRequestAssignee>,
    #[serde(rename = "comments")]
    pub comments: Vec<models::DeploymentRequestComment>,
}

impl DeploymentRequest {
    pub fn new(id: i64, source_workspace_id: String, fork_workspace_id: String, requested_by: String, requested_by_email: String, requested_at: String, assignees: Vec<models::DeploymentRequestAssignee>, comments: Vec<models::DeploymentRequestComment>) -> DeploymentRequest {
        DeploymentRequest {
            id,
            source_workspace_id,
            fork_workspace_id,
            requested_by,
            requested_by_email,
            requested_at,
            assignees,
            comments,
        }
    }
}

