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

/// InterconnectDiagnostics : Diagnostics information about the Interconnect connection, which contains detailed and current technical information about Google's side of the connection.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InterconnectDiagnostics {
    /// A list of InterconnectDiagnostics.ARPEntry objects, describing individual neighbors currently seen by the Google router in the ARP cache for the Interconnect. This will be empty when the Interconnect is not bundled.
    #[serde(rename = "arpCaches", skip_serializing_if = "Option::is_none")]
    pub arp_caches:
        Option<Vec<crate::google_rest_apis::compute_v1::models::InterconnectDiagnosticsArpEntry>>,
    /// The aggregation type of the bundle interface.
    #[serde(
        rename = "bundleAggregationType",
        skip_serializing_if = "Option::is_none"
    )]
    pub bundle_aggregation_type: Option<BundleAggregationType>,
    /// The operational status of the bundle interface.
    #[serde(
        rename = "bundleOperationalStatus",
        skip_serializing_if = "Option::is_none"
    )]
    pub bundle_operational_status: Option<BundleOperationalStatus>,
    /// A list of InterconnectDiagnostics.LinkStatus objects, describing the status for each link on the Interconnect.
    #[serde(rename = "links", skip_serializing_if = "Option::is_none")]
    pub links:
        Option<Vec<crate::google_rest_apis::compute_v1::models::InterconnectDiagnosticsLinkStatus>>,
    /// The MAC address of the Interconnect's bundle interface.
    #[serde(rename = "macAddress", skip_serializing_if = "Option::is_none")]
    pub mac_address: Option<String>,
}

impl InterconnectDiagnostics {
    /// Diagnostics information about the Interconnect connection, which contains detailed and current technical information about Google's side of the connection.
    pub fn new() -> InterconnectDiagnostics {
        InterconnectDiagnostics {
            arp_caches: None,
            bundle_aggregation_type: None,
            bundle_operational_status: None,
            links: None,
            mac_address: None,
        }
    }
}

/// The aggregation type of the bundle interface.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum BundleAggregationType {
    #[serde(rename = "BUNDLE_AGGREGATION_TYPE_LACP")]
    Lacp,
    #[serde(rename = "BUNDLE_AGGREGATION_TYPE_STATIC")]
    Static,
}

impl Default for BundleAggregationType {
    fn default() -> BundleAggregationType {
        Self::Lacp
    }
}
/// The operational status of the bundle interface.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum BundleOperationalStatus {
    #[serde(rename = "BUNDLE_OPERATIONAL_STATUS_DOWN")]
    Down,
    #[serde(rename = "BUNDLE_OPERATIONAL_STATUS_UP")]
    Up,
}

impl Default for BundleOperationalStatus {
    fn default() -> BundleOperationalStatus {
        Self::Down
    }
}
