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
                                      */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy {
    /// [Output Only] Deprecated, please use short name instead. The display name of the firewall policy.
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    /// [Output Only] The name of the firewall policy.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The rules that apply to the network.
    #[serde(rename = "rules", skip_serializing_if = "Option::is_none")]
    pub rules: Option<Vec<crate::google_rest_apis::compute_v1::models::FirewallPolicyRule>>,
    /// [Output Only] The short name of the firewall policy.
    #[serde(rename = "shortName", skip_serializing_if = "Option::is_none")]
    pub short_name: Option<String>,
    /// [Output Only] The type of the firewall policy.
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<Type>,
}

impl NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy {
    pub fn new() -> NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy {
        NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy {
            display_name: None,
            name: None,
            rules: None,
            short_name: None,
            r#type: None,
        }
    }
}

/// [Output Only] The type of the firewall policy.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "HIERARCHY")]
    Hierarchy,
    #[serde(rename = "NETWORK")]
    Network,
    #[serde(rename = "UNSPECIFIED")]
    Unspecified,
}

impl Default for Type {
    fn default() -> Type {
        Self::Hierarchy
    }
}
