// 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 resource type and SKU. */
@Fluent
public final class AccountSku {
    /*
     * Resource Namespace and Type
     */
    @JsonProperty(value = "resourceType")
    private String resourceType;

    /*
     * The SKU of Cognitive Services account.
     */
    @JsonProperty(value = "sku")
    private Sku sku;

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

    /**
     * Get the resourceType property: Resource Namespace and Type.
     *
     * @return the resourceType value.
     */
    public String resourceType() {
        return this.resourceType;
    }

    /**
     * Set the resourceType property: Resource Namespace and Type.
     *
     * @param resourceType the resourceType value to set.
     * @return the AccountSku object itself.
     */
    public AccountSku withResourceType(String resourceType) {
        this.resourceType = resourceType;
        return this;
    }

    /**
     * Get the sku property: The SKU of Cognitive Services account.
     *
     * @return the sku value.
     */
    public Sku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: The SKU of Cognitive Services account.
     *
     * @param sku the sku value to set.
     * @return the AccountSku object itself.
     */
    public AccountSku withSku(Sku sku) {
        this.sku = sku;
        return this;
    }

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