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

package com.azure.resourcemanager.machinelearning.models;

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

/** Describes the properties of a VM size. */
@Fluent
public final class VirtualMachineSize {
    /*
     * Virtual Machine size name
     *
     * The name of the virtual machine size.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * Virtual Machine family name
     *
     * The family name of the virtual machine size.
     */
    @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY)
    private String family;

    /*
     * Number of vPUs
     *
     * The number of vCPUs supported by the virtual machine size.
     */
    @JsonProperty(value = "vCPUs", access = JsonProperty.Access.WRITE_ONLY)
    private Integer vCPUs;

    /*
     * Number of gPUs
     *
     * The number of gPUs supported by the virtual machine size.
     */
    @JsonProperty(value = "gpus", access = JsonProperty.Access.WRITE_ONLY)
    private Integer gpus;

    /*
     * OS VHD Disk size
     *
     * The OS VHD disk size, in MB, allowed by the virtual machine size.
     */
    @JsonProperty(value = "osVhdSizeMB", access = JsonProperty.Access.WRITE_ONLY)
    private Integer osVhdSizeMB;

    /*
     * Resource volume size
     *
     * The resource volume size, in MB, allowed by the virtual machine size.
     */
    @JsonProperty(value = "maxResourceVolumeMB", access = JsonProperty.Access.WRITE_ONLY)
    private Integer maxResourceVolumeMB;

    /*
     * Memory size
     *
     * The amount of memory, in GB, supported by the virtual machine size.
     */
    @JsonProperty(value = "memoryGB", access = JsonProperty.Access.WRITE_ONLY)
    private Double memoryGB;

    /*
     * Low priority capable
     *
     * Specifies if the virtual machine size supports low priority VMs.
     */
    @JsonProperty(value = "lowPriorityCapable", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean lowPriorityCapable;

    /*
     * Premium IO supported
     *
     * Specifies if the virtual machine size supports premium IO.
     */
    @JsonProperty(value = "premiumIO", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean premiumIO;

    /*
     * The estimated price information for using a VM.
     */
    @JsonProperty(value = "estimatedVMPrices")
    private EstimatedVMPrices estimatedVMPrices;

    /*
     * Supported Compute Types
     *
     * Specifies the compute types supported by the virtual machine size.
     */
    @JsonProperty(value = "supportedComputeTypes")
    private List<String> supportedComputeTypes;

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

    /**
     * Get the name property: Virtual Machine size name
     *
     * <p>The name of the virtual machine size.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the family property: Virtual Machine family name
     *
     * <p>The family name of the virtual machine size.
     *
     * @return the family value.
     */
    public String family() {
        return this.family;
    }

    /**
     * Get the vCPUs property: Number of vPUs
     *
     * <p>The number of vCPUs supported by the virtual machine size.
     *
     * @return the vCPUs value.
     */
    public Integer vCPUs() {
        return this.vCPUs;
    }

    /**
     * Get the gpus property: Number of gPUs
     *
     * <p>The number of gPUs supported by the virtual machine size.
     *
     * @return the gpus value.
     */
    public Integer gpus() {
        return this.gpus;
    }

    /**
     * Get the osVhdSizeMB property: OS VHD Disk size
     *
     * <p>The OS VHD disk size, in MB, allowed by the virtual machine size.
     *
     * @return the osVhdSizeMB value.
     */
    public Integer osVhdSizeMB() {
        return this.osVhdSizeMB;
    }

    /**
     * Get the maxResourceVolumeMB property: Resource volume size
     *
     * <p>The resource volume size, in MB, allowed by the virtual machine size.
     *
     * @return the maxResourceVolumeMB value.
     */
    public Integer maxResourceVolumeMB() {
        return this.maxResourceVolumeMB;
    }

    /**
     * Get the memoryGB property: Memory size
     *
     * <p>The amount of memory, in GB, supported by the virtual machine size.
     *
     * @return the memoryGB value.
     */
    public Double memoryGB() {
        return this.memoryGB;
    }

    /**
     * Get the lowPriorityCapable property: Low priority capable
     *
     * <p>Specifies if the virtual machine size supports low priority VMs.
     *
     * @return the lowPriorityCapable value.
     */
    public Boolean lowPriorityCapable() {
        return this.lowPriorityCapable;
    }

    /**
     * Get the premiumIO property: Premium IO supported
     *
     * <p>Specifies if the virtual machine size supports premium IO.
     *
     * @return the premiumIO value.
     */
    public Boolean premiumIO() {
        return this.premiumIO;
    }

    /**
     * Get the estimatedVMPrices property: The estimated price information for using a VM.
     *
     * @return the estimatedVMPrices value.
     */
    public EstimatedVMPrices estimatedVMPrices() {
        return this.estimatedVMPrices;
    }

    /**
     * Set the estimatedVMPrices property: The estimated price information for using a VM.
     *
     * @param estimatedVMPrices the estimatedVMPrices value to set.
     * @return the VirtualMachineSize object itself.
     */
    public VirtualMachineSize withEstimatedVMPrices(EstimatedVMPrices estimatedVMPrices) {
        this.estimatedVMPrices = estimatedVMPrices;
        return this;
    }

    /**
     * Get the supportedComputeTypes property: Supported Compute Types
     *
     * <p>Specifies the compute types supported by the virtual machine size.
     *
     * @return the supportedComputeTypes value.
     */
    public List<String> supportedComputeTypes() {
        return this.supportedComputeTypes;
    }

    /**
     * Set the supportedComputeTypes property: Supported Compute Types
     *
     * <p>Specifies the compute types supported by the virtual machine size.
     *
     * @param supportedComputeTypes the supportedComputeTypes value to set.
     * @return the VirtualMachineSize object itself.
     */
    public VirtualMachineSize withSupportedComputeTypes(List<String> supportedComputeTypes) {
        this.supportedComputeTypes = supportedComputeTypes;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (estimatedVMPrices() != null) {
            estimatedVMPrices().validate();
        }
    }
}
