/*
 * 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 ReqDockerhubDestination {
    #[serde(rename = "type")]
    pub r#type: models::EnumDestinationType,
    #[serde(rename = "credentials", skip_serializing_if = "Option::is_none")]
    pub credentials: Option<Box<models::ReqDockerhubCred>>,
    #[serde(rename = "identity_uuid", skip_serializing_if = "Option::is_none")]
    pub identity_uuid: Option<uuid::Uuid>,
    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
    pub tag: Option<String>,
    #[serde(rename = "url")]
    pub url: String,
}

impl ReqDockerhubDestination {
    pub fn new(r#type: models::EnumDestinationType, url: String) -> ReqDockerhubDestination {
        ReqDockerhubDestination {
            r#type,
            credentials: None,
            identity_uuid: None,
            tag: None,
            url,
        }
    }
}
