nomad_client_rs/models/
task_group.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
4pub struct TaskGroup {
5 #[serde(rename = "Affinities", skip_serializing_if = "Option::is_none")]
6 pub affinities: Option<Vec<crate::models::Affinity>>,
7 #[serde(rename = "Constraints", skip_serializing_if = "Option::is_none")]
8 pub constraints: Option<Vec<crate::models::Constraint>>,
9 #[serde(rename = "Consul", skip_serializing_if = "Option::is_none")]
10 pub consul: Option<crate::models::Consul>,
11 #[serde(rename = "Count", skip_serializing_if = "Option::is_none")]
12 pub count: Option<i32>,
13 #[serde(rename = "EphemeralDisk", skip_serializing_if = "Option::is_none")]
14 pub ephemeral_disk: Option<crate::models::EphemeralDisk>,
15 #[serde(
16 rename = "MaxClientDisconnect",
17 skip_serializing_if = "Option::is_none"
18 )]
19 pub max_client_disconnect: Option<i64>,
20 #[serde(rename = "Meta", skip_serializing_if = "Option::is_none")]
21 pub meta: Option<::std::collections::HashMap<String, String>>,
22 #[serde(rename = "Migrate", skip_serializing_if = "Option::is_none")]
23 pub migrate: Option<crate::models::MigrateStrategy>,
24 #[serde(rename = "Name", skip_serializing_if = "Option::is_none")]
25 pub name: Option<String>,
26 #[serde(rename = "Networks", skip_serializing_if = "Option::is_none")]
27 pub networks: Option<Vec<crate::models::NetworkResource>>,
28 #[serde(rename = "ReschedulePolicy", skip_serializing_if = "Option::is_none")]
29 pub reschedule_policy: Option<crate::models::ReschedulePolicy>,
30 #[serde(rename = "RestartPolicy", skip_serializing_if = "Option::is_none")]
31 pub restart_policy: Option<crate::models::RestartPolicy>,
32 #[serde(rename = "Scaling", skip_serializing_if = "Option::is_none")]
33 pub scaling: Option<crate::models::ScalingPolicy>,
34 #[serde(rename = "Services", skip_serializing_if = "Option::is_none")]
35 pub services: Option<Vec<crate::models::Service>>,
36 #[serde(rename = "ShutdownDelay", skip_serializing_if = "Option::is_none")]
37 pub shutdown_delay: Option<i64>,
38 #[serde(rename = "Spreads", skip_serializing_if = "Option::is_none")]
39 pub spreads: Option<Vec<crate::models::Spread>>,
40 #[serde(
41 rename = "StopAfterClientDisconnect",
42 skip_serializing_if = "Option::is_none"
43 )]
44 pub stop_after_client_disconnect: Option<i64>,
45 #[serde(rename = "Tasks", skip_serializing_if = "Option::is_none")]
46 pub tasks: Option<Vec<crate::models::Task>>,
47 #[serde(rename = "Update", skip_serializing_if = "Option::is_none")]
48 pub update: Option<crate::models::UpdateStrategy>,
49 #[serde(rename = "Volumes", skip_serializing_if = "Option::is_none")]
50 pub volumes: Option<::std::collections::HashMap<String, crate::models::VolumeRequest>>,
51}