/*
 * Tapis Pods Service
 *
 *  The Pods Service is a web service and distributed computing platform providing pods-as-a-service (PaaS). The service  implements a message broker and processor model that requests pods, alongside a health module to poll for pod data, including logs, status, and health. The primary use of this service is to have quick to deploy long-lived services based on Docker images that are exposed via HTTP or TCP endpoints listed by the API.  **The Pods service provides functionality for two types of pod solutions:**  * **Templated Pods** for run-as-is popular images. Neo4J is one example, the template manages TCP ports, user creation, and permissions.  * **Custom Pods** for arbitrary docker images with less functionality. In this case we will expose port 5000 and do nothing else.   The live-docs act as the most up-to-date API reference. Visit the [documentation for more information](https://tapis.readthedocs.io/en/latest/technical/pods.html).
 *
 * The version of the OpenAPI document: 26Q1.1
 * Contact: cicsupport@tacc.utexas.edu
 * Generated by: https://openapi-generator.tech
 */

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

/// NewTemplateTag : Object with fields that users are allowed to specify for the Template class.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NewTemplateTag {
    /// Pod definition for this template tag.
    #[serde(rename = "pod_definition")]
    pub pod_definition: Box<models::TemplateTagPodDefinition>,
    /// Commit message for this template tag.
    #[serde(rename = "commit_message")]
    pub commit_message: String,
    /// Tag for this template. Default is 'latest'.
    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
    pub tag: Option<String>,
}

impl NewTemplateTag {
    /// Object with fields that users are allowed to specify for the Template class.
    pub fn new(
        pod_definition: models::TemplateTagPodDefinition,
        commit_message: String,
    ) -> NewTemplateTag {
        NewTemplateTag {
            pod_definition: Box::new(pod_definition),
            commit_message,
            tag: None,
        }
    }
}
