/*
 * 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 TapisSystemArchive {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "type")]
    pub r#type: models::EnumArchiveType,
    #[serde(rename = "group")]
    pub group: uuid::Uuid,
    #[serde(rename = "tenant_id")]
    pub tenant_id: String,
    #[serde(rename = "owner")]
    pub owner: String,
    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
    pub uuid: Option<uuid::Uuid>,
    #[serde(rename = "archive_dir")]
    pub archive_dir: String,
    #[serde(rename = "system_id")]
    pub system_id: String,
}

impl TapisSystemArchive {
    pub fn new(
        id: String,
        r#type: models::EnumArchiveType,
        group: uuid::Uuid,
        tenant_id: String,
        owner: String,
        archive_dir: String,
        system_id: String,
    ) -> TapisSystemArchive {
        TapisSystemArchive {
            id,
            r#type,
            group,
            tenant_id,
            owner,
            uuid: None,
            archive_dir,
            system_id,
        }
    }
}
