// 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.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.networkcloud.models.BootstrapProtocol;
import com.azure.resourcemanager.networkcloud.models.MachineDisk;
import com.azure.resourcemanager.networkcloud.models.NetworkInterface;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** MachineSkuProperties represents the properties of the machine SKU. */
@Immutable
public final class MachineSkuProperties {
    /*
     * The type of bootstrap protocol used.
     */
    @JsonProperty(value = "bootstrapProtocol", access = JsonProperty.Access.WRITE_ONLY)
    private BootstrapProtocol bootstrapProtocol;

    /*
     * The count of CPU cores for this machine.
     */
    @JsonProperty(value = "cpuCores", access = JsonProperty.Access.WRITE_ONLY)
    private Long cpuCores;

    /*
     * The count of CPU sockets for this machine.
     */
    @JsonProperty(value = "cpuSockets", access = JsonProperty.Access.WRITE_ONLY)
    private Long cpuSockets;

    /*
     * The list of disks.
     */
    @JsonProperty(value = "disks", access = JsonProperty.Access.WRITE_ONLY)
    private List<MachineDisk> disks;

    /*
     * The generation of the architecture.
     */
    @JsonProperty(value = "generation", access = JsonProperty.Access.WRITE_ONLY)
    private String generation;

    /*
     * The hardware version of the machine.
     */
    @JsonProperty(value = "hardwareVersion", access = JsonProperty.Access.WRITE_ONLY)
    private String hardwareVersion;

    /*
     * The maximum amount of memory in GB.
     */
    @JsonProperty(value = "memoryCapacityGB", access = JsonProperty.Access.WRITE_ONLY)
    private Long memoryCapacityGB;

    /*
     * The model of the machine.
     */
    @JsonProperty(value = "model", access = JsonProperty.Access.WRITE_ONLY)
    private String model;

    /*
     * The list of network interfaces.
     */
    @JsonProperty(value = "networkInterfaces", access = JsonProperty.Access.WRITE_ONLY)
    private List<NetworkInterface> networkInterfaces;

    /*
     * The count of SMT and physical core threads for this machine.
     */
    @JsonProperty(value = "totalThreads", access = JsonProperty.Access.WRITE_ONLY)
    private Long totalThreads;

    /*
     * The make of the machine.
     */
    @JsonProperty(value = "vendor", access = JsonProperty.Access.WRITE_ONLY)
    private String vendor;

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

    /**
     * Get the bootstrapProtocol property: The type of bootstrap protocol used.
     *
     * @return the bootstrapProtocol value.
     */
    public BootstrapProtocol bootstrapProtocol() {
        return this.bootstrapProtocol;
    }

    /**
     * Get the cpuCores property: The count of CPU cores for this machine.
     *
     * @return the cpuCores value.
     */
    public Long cpuCores() {
        return this.cpuCores;
    }

    /**
     * Get the cpuSockets property: The count of CPU sockets for this machine.
     *
     * @return the cpuSockets value.
     */
    public Long cpuSockets() {
        return this.cpuSockets;
    }

    /**
     * Get the disks property: The list of disks.
     *
     * @return the disks value.
     */
    public List<MachineDisk> disks() {
        return this.disks;
    }

    /**
     * Get the generation property: The generation of the architecture.
     *
     * @return the generation value.
     */
    public String generation() {
        return this.generation;
    }

    /**
     * Get the hardwareVersion property: The hardware version of the machine.
     *
     * @return the hardwareVersion value.
     */
    public String hardwareVersion() {
        return this.hardwareVersion;
    }

    /**
     * Get the memoryCapacityGB property: The maximum amount of memory in GB.
     *
     * @return the memoryCapacityGB value.
     */
    public Long memoryCapacityGB() {
        return this.memoryCapacityGB;
    }

    /**
     * Get the model property: The model of the machine.
     *
     * @return the model value.
     */
    public String model() {
        return this.model;
    }

    /**
     * Get the networkInterfaces property: The list of network interfaces.
     *
     * @return the networkInterfaces value.
     */
    public List<NetworkInterface> networkInterfaces() {
        return this.networkInterfaces;
    }

    /**
     * Get the totalThreads property: The count of SMT and physical core threads for this machine.
     *
     * @return the totalThreads value.
     */
    public Long totalThreads() {
        return this.totalThreads;
    }

    /**
     * Get the vendor property: The make of the machine.
     *
     * @return the vendor value.
     */
    public String vendor() {
        return this.vendor;
    }

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