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;

/// StatefulPolicyPreservedState : Configuration of preserved resources.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StatefulPolicyPreservedState {
    /// Disks created on the instances that will be preserved on instance delete, update, etc. 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::StatefulPolicyPreservedStateDiskDevice>>,
    /// External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
    #[serde(rename = "externalIPs", skip_serializing_if = "Option::is_none")]
    pub external_ips:
        Option<std::collections::HashMap<String, models::StatefulPolicyPreservedStateNetworkIp>>,
    /// Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.
    #[serde(rename = "internalIPs", skip_serializing_if = "Option::is_none")]
    pub internal_ips:
        Option<std::collections::HashMap<String, models::StatefulPolicyPreservedStateNetworkIp>>,
}

impl StatefulPolicyPreservedState {
    /// Configuration of preserved resources.
    pub fn new() -> StatefulPolicyPreservedState {
        StatefulPolicyPreservedState {
            disks: None,
            external_ips: None,
            internal_ips: None,
        }
    }
}
