/*
* 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};
/// UpdatePod : Object with fields that users are allowed to specify for the Pod class.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdatePod {
/// Which docker image to use, must be on allowlist, check /pods/images for list.
#[serde(rename = "image", skip_serializing_if = "Option::is_none")]
pub image: Option<String>,
/// Which pod template to use as base of pod fields. User set attributes will overwrite template fields.
#[serde(rename = "template", skip_serializing_if = "Option::is_none")]
pub template: Option<String>,
#[serde(
rename = "description",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub description: Option<Option<String>>,
#[serde(
rename = "command",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub command: Option<Option<Vec<String>>>,
#[serde(
rename = "arguments",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub arguments: Option<Option<Vec<String>>>,
#[serde(
rename = "environment_variables",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub environment_variables: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
#[serde(
rename = "secret_map",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub secret_map: Option<Option<std::collections::HashMap<String, String>>>,
#[serde(
rename = "status_requested",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub status_requested: Option<Option<String>>,
#[serde(
rename = "volume_mounts",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub volume_mounts: Option<Option<std::collections::HashMap<String, models::VolumeMountsValue>>>,
#[serde(
rename = "time_to_stop_default",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub time_to_stop_default: Option<Option<i32>>,
#[serde(
rename = "time_to_stop_instance",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub time_to_stop_instance: Option<Option<i32>>,
#[serde(
rename = "networking",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub networking: Option<Option<std::collections::HashMap<String, models::Networking>>>,
#[serde(
rename = "resources",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub resources: Option<Option<Box<models::ModelsPodsResources>>>,
/// Queue to run pod in. `default` is the default queue.
#[serde(rename = "compute_queue", skip_serializing_if = "Option::is_none")]
pub compute_queue: Option<String>,
#[serde(
rename = "template_overrides",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub template_overrides: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
}
impl UpdatePod {
/// Object with fields that users are allowed to specify for the Pod class.
pub fn new() -> UpdatePod {
UpdatePod {
image: None,
template: None,
description: None,
command: None,
arguments: None,
environment_variables: None,
secret_map: None,
status_requested: None,
volume_mounts: None,
time_to_stop_default: None,
time_to_stop_instance: None,
networking: None,
resources: None,
compute_queue: None,
template_overrides: None,
}
}
}