/*
 * Tapis Workflows API
 *
 * Create and manage pipelines
 *
 * The version of the OpenAPI document: 1.6.0
 * Contact: cicsupport@tacc.utexas.edu
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReqCiPipeline {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "archive_ids", skip_serializing_if = "Option::is_none")]
    pub archive_ids: Option<Vec<String>>,
    #[serde(rename = "builder", skip_serializing_if = "Option::is_none")]
    pub builder: Option<models::EnumBuilder>,
    #[serde(rename = "type")]
    pub r#type: models::EnumPipelineType,
    #[serde(rename = "context")]
    pub context: Box<models::ReqContext>,
    #[serde(rename = "destination")]
    pub destination: Box<models::ReqDestination>,
}

impl ReqCiPipeline {
    pub fn new(
        id: String,
        r#type: models::EnumPipelineType,
        context: models::ReqContext,
        destination: models::ReqDestination,
    ) -> ReqCiPipeline {
        ReqCiPipeline {
            id,
            description: None,
            archive_ids: None,
            builder: None,
            r#type,
            context: Box::new(context),
            destination: Box::new(destination),
        }
    }
}
