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

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

/// ConsulHTTPHeaderModifiers is a set of rules for HTTP header modification that
/// should be performed by proxies as the request passes through them. It can
/// operate on either request or response headers depending on the context in
/// which it is used.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct ConsulHTTPHeaderModifiers {
    /// Remove is the set of header names that should be stripped from the
    /// request or response.
    #[serde(rename = "remove", skip_serializing_if = "Option::is_none")]
    pub remove: Option<Vec<String>>,

    /// Add is a set of name -> value pairs that should be appended to the
    /// request or response (i.e. allowing duplicates if the same header already
    /// exists).
    #[serde(rename = "add", skip_serializing_if = "Option::is_none")]
    pub add: Option<std::collections::HashMap<String, String>>,

    /// Set is a set of name -> value pairs that should be added to the request
    /// or response, overwriting any existing header values of the same name.
    #[serde(rename = "set", skip_serializing_if = "Option::is_none")]
    pub set: Option<std::collections::HashMap<String, String>>,
}
