// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.networkcloud.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/**
 * HardwareInventory represents the hardware configuration of this machine as exposed to the customer, including
 * information acquired from the model/sku information and from the ironic inspector.
 */
@Immutable
public final class HardwareInventory {
    /*
     * Freeform data extracted from the environment about this machine. This information varies depending on the
     * specific hardware and configuration.
     */
    @JsonProperty(value = "additionalHostInformation", access = JsonProperty.Access.WRITE_ONLY)
    private String additionalHostInformation;

    /*
     * The list of network interfaces and associated details for the bare metal machine.
     */
    @JsonProperty(value = "interfaces", access = JsonProperty.Access.WRITE_ONLY)
    private List<HardwareInventoryNetworkInterface> interfaces;

    /*
     * Field Deprecated. Will be removed in an upcoming version. The list of network interface cards and associated
     * details for the bare metal machine.
     */
    @JsonProperty(value = "nics", access = JsonProperty.Access.WRITE_ONLY)
    private List<Nic> nics;

    /** Creates an instance of HardwareInventory class. */
    public HardwareInventory() {
    }

    /**
     * Get the additionalHostInformation property: Freeform data extracted from the environment about this machine. This
     * information varies depending on the specific hardware and configuration.
     *
     * @return the additionalHostInformation value.
     */
    public String additionalHostInformation() {
        return this.additionalHostInformation;
    }

    /**
     * Get the interfaces property: The list of network interfaces and associated details for the bare metal machine.
     *
     * @return the interfaces value.
     */
    public List<HardwareInventoryNetworkInterface> interfaces() {
        return this.interfaces;
    }

    /**
     * Get the nics property: Field Deprecated. Will be removed in an upcoming version. The list of network interface
     * cards and associated details for the bare metal machine.
     *
     * @return the nics value.
     */
    public List<Nic> nics() {
        return this.nics;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (interfaces() != null) {
            interfaces().forEach(e -> e.validate());
        }
        if (nics() != null) {
            nics().forEach(e -> e.validate());
        }
    }
}
