/*
 * This is an auto-generated file.
 * Any manual changes may be overwritten without notice!
 */

use derive_builder::Builder;
use serde::{Deserialize, Serialize};

/// ConsulSidecarService represents a Consul Connect SidecarService jobspec
/// block.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct ConsulSidecarService {
    #[serde(rename = "Meta")]
    pub meta: std::collections::HashMap<String, String>,

    #[serde(
        rename = "Tags",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub tags: Vec<String>,

    #[serde(rename = "Port")]
    pub port: String,

    #[serde(rename = "Proxy", skip_serializing_if = "Option::is_none")]
    pub proxy: Option<super::ConsulProxy>,

    #[serde(
        rename = "disable_default_tcp_check",
        skip_serializing_if = "Option::is_none"
    )]
    pub disable_default_tcp_check: Option<bool>,
}
