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

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Describes the properties of a VM size. */
@Fluent
public final class VirtualMachineSize {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineSize.class);

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Get the osVhdSizeMB property: 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: 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: 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: Specifies if the virtual machine size supports low priority VMs.
     *
     * @return the lowPriorityCapable value.
     */
    public Boolean lowPriorityCapable() {
        return this.lowPriorityCapable;
    }

    /**
     * Get the premiumIO property: 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;
    }

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