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;

/// PreservedState : Preserved state for a given instance.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PreservedState {
    /// Preserved disks defined for this instance. This map is keyed with the device names of the disks.
    #[serde(rename = "disks", skip_serializing_if = "Option::is_none")]
    pub disks: Option<std::collections::HashMap<String, models::PreservedStatePreservedDisk>>,
    /// Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
    #[serde(rename = "externalIPs", skip_serializing_if = "Option::is_none")]
    pub external_ips:
        Option<std::collections::HashMap<String, models::PreservedStatePreservedNetworkIp>>,
    /// Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
    #[serde(rename = "internalIPs", skip_serializing_if = "Option::is_none")]
    pub internal_ips:
        Option<std::collections::HashMap<String, models::PreservedStatePreservedNetworkIp>>,
    /// Preserved metadata defined for this instance.
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<std::collections::HashMap<String, String>>,
}

impl PreservedState {
    /// Preserved state for a given instance.
    pub fn new() -> PreservedState {
        PreservedState {
            disks: None,
            external_ips: None,
            internal_ips: None,
            metadata: None,
        }
    }
}
