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

package com.azure.resourcemanager.cognitiveservices.models;

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

/** Cognitive Services account commitment quota. */
@Fluent
public final class CommitmentQuota {
    /*
     * Commitment quota quantity.
     */
    @JsonProperty(value = "quantity")
    private Long quantity;

    /*
     * Commitment quota unit.
     */
    @JsonProperty(value = "unit")
    private String unit;

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

    /**
     * Get the quantity property: Commitment quota quantity.
     *
     * @return the quantity value.
     */
    public Long quantity() {
        return this.quantity;
    }

    /**
     * Set the quantity property: Commitment quota quantity.
     *
     * @param quantity the quantity value to set.
     * @return the CommitmentQuota object itself.
     */
    public CommitmentQuota withQuantity(Long quantity) {
        this.quantity = quantity;
        return this;
    }

    /**
     * Get the unit property: Commitment quota unit.
     *
     * @return the unit value.
     */
    public String unit() {
        return this.unit;
    }

    /**
     * Set the unit property: Commitment quota unit.
     *
     * @param unit the unit value to set.
     * @return the CommitmentQuota object itself.
     */
    public CommitmentQuota withUnit(String unit) {
        this.unit = unit;
        return this;
    }

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