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 FirewallPolicyRuleSecureTag {
    /// Name of the secure tag, created with TagManager's TagValue API.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<State>,
}

impl FirewallPolicyRuleSecureTag {
    pub fn new() -> FirewallPolicyRuleSecureTag {
        FirewallPolicyRuleSecureTag {
            name: None,
            state: None,
        }
    }
}

/// [Output Only] State of the secure tag, either `EFFECTIVE` or `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum State {
    #[serde(rename = "EFFECTIVE")]
    Effective,
    #[serde(rename = "INEFFECTIVE")]
    Ineffective,
}

impl Default for State {
    fn default() -> State {
        Self::Effective
    }
}
