use serde::{Deserialize, Serialize}; /*
                                      * Compute Engine API
                                      *
                                      * Creates and runs virtual machines on Google Cloud Platform.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::compute_v1::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SecurityPolicyAdvancedOptionsConfig {
    #[serde(rename = "jsonCustomConfig", skip_serializing_if = "Option::is_none")]
    pub json_custom_config:
        Option<Box<models::SecurityPolicyAdvancedOptionsConfigJsonCustomConfig>>,
    #[serde(rename = "jsonParsing", skip_serializing_if = "Option::is_none")]
    pub json_parsing: Option<JsonParsing>,
    #[serde(rename = "logLevel", skip_serializing_if = "Option::is_none")]
    pub log_level: Option<LogLevel>,
    /// An optional list of case-insensitive request header names to use for resolving the callers client IP address.
    #[serde(
        rename = "userIpRequestHeaders",
        skip_serializing_if = "Option::is_none"
    )]
    pub user_ip_request_headers: Option<Vec<String>>,
}

impl SecurityPolicyAdvancedOptionsConfig {
    pub fn new() -> SecurityPolicyAdvancedOptionsConfig {
        SecurityPolicyAdvancedOptionsConfig {
            json_custom_config: None,
            json_parsing: None,
            log_level: None,
            user_ip_request_headers: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum JsonParsing {
    #[serde(rename = "DISABLED")]
    Disabled,
    #[serde(rename = "STANDARD")]
    Standard,
    #[serde(rename = "STANDARD_WITH_GRAPHQL")]
    StandardWithGraphql,
}

impl Default for JsonParsing {
    fn default() -> JsonParsing {
        Self::Disabled
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LogLevel {
    #[serde(rename = "NORMAL")]
    Normal,
    #[serde(rename = "VERBOSE")]
    Verbose,
}

impl Default for LogLevel {
    fn default() -> LogLevel {
        Self::Normal
    }
}
