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

package com.azure.resourcemanager.devcenter.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties for a recommended machine configuration. */
@Immutable
public final class RecommendedMachineConfiguration {
    /*
     * Recommended memory range.
     */
    @JsonProperty(value = "memory", access = JsonProperty.Access.WRITE_ONLY)
    private ResourceRange memory;

    /*
     * Recommended vCPU range.
     */
    @JsonProperty(value = "vCPUs", access = JsonProperty.Access.WRITE_ONLY)
    private ResourceRange vCPUs;

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

    /**
     * Get the memory property: Recommended memory range.
     *
     * @return the memory value.
     */
    public ResourceRange memory() {
        return this.memory;
    }

    /**
     * Get the vCPUs property: Recommended vCPU range.
     *
     * @return the vCPUs value.
     */
    public ResourceRange vCPUs() {
        return this.vCPUs;
    }

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