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

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

/// ConsulMeshGateway is used to configure mesh gateway usage when connecting to
/// a connect upstream in another datacenter.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct ConsulMeshGateway {
    /// Mode configures how an upstream should be accessed with regard to using
    /// mesh gateways.
    ///
    /// local - the connect proxy makes outbound connections through mesh gateway
    /// originating in the same datacenter.
    ///
    /// remote - the connect proxy makes outbound connections to a mesh gateway
    /// in the destination datacenter.
    ///
    /// none (default) - no mesh gateway is used, the proxy makes outbound connections
    /// directly to destination services.
    ///
    /// https://www.consul.io/docs/connect/gateways/mesh-gateway#modes-of-operation
    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
    pub mode: Option<String>,
}
