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

package com.azure.resourcemanager.hdinsight.containers.models;

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

/** The cpu and memory requirement definition. */
@Fluent
public final class ComputeResourceDefinition {
    /*
     * The required CPU.
     */
    @JsonProperty(value = "cpu", required = true)
    private float cpu;

    /*
     * The required memory in MB, Container memory will be 110 percentile
     */
    @JsonProperty(value = "memory", required = true)
    private long memory;

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

    /**
     * Get the cpu property: The required CPU.
     *
     * @return the cpu value.
     */
    public float cpu() {
        return this.cpu;
    }

    /**
     * Set the cpu property: The required CPU.
     *
     * @param cpu the cpu value to set.
     * @return the ComputeResourceDefinition object itself.
     */
    public ComputeResourceDefinition withCpu(float cpu) {
        this.cpu = cpu;
        return this;
    }

    /**
     * Get the memory property: The required memory in MB, Container memory will be 110 percentile.
     *
     * @return the memory value.
     */
    public long memory() {
        return this.memory;
    }

    /**
     * Set the memory property: The required memory in MB, Container memory will be 110 percentile.
     *
     * @param memory the memory value to set.
     * @return the ComputeResourceDefinition object itself.
     */
    public ComputeResourceDefinition withMemory(long memory) {
        this.memory = memory;
        return this;
    }

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