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;

/// NatIpInfoNatIpInfoMapping : Contains information of a NAT IP.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NatIpInfoNatIpInfoMapping {
    /// Specifies whether NAT IP is auto or manual.
    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
    pub mode: Option<Mode>,
    /// NAT IP address. For example: 203.0.113.11.
    #[serde(rename = "natIp", skip_serializing_if = "Option::is_none")]
    pub nat_ip: Option<String>,
    /// Specifies whether NAT IP is currently serving at least one endpoint or not.
    #[serde(rename = "usage", skip_serializing_if = "Option::is_none")]
    pub usage: Option<Usage>,
}

impl NatIpInfoNatIpInfoMapping {
    /// Contains information of a NAT IP.
    pub fn new() -> NatIpInfoNatIpInfoMapping {
        NatIpInfoNatIpInfoMapping {
            mode: None,
            nat_ip: None,
            usage: None,
        }
    }
}
/// Specifies whether NAT IP is auto or manual.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Mode {
    #[serde(rename = "AUTO")]
    Auto,
    #[serde(rename = "MANUAL")]
    Manual,
}

impl Default for Mode {
    fn default() -> Mode {
        Self::Auto
    }
}
/// Specifies whether NAT IP is currently serving at least one endpoint or not.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Usage {
    #[serde(rename = "IN_USE")]
    InUse,
    #[serde(rename = "UNUSED")]
    Unused,
}

impl Default for Usage {
    fn default() -> Usage {
        Self::InUse
    }
}
