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

package com.azure.resourcemanager.redisenterprise.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.redisenterprise.models.LocationInfo;
import com.azure.resourcemanager.redisenterprise.models.SkuDetail;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Region Sku Detail
 *
 * <p>Details about the location requested and the available skus in the location.
 */
@Fluent
public final class RegionSkuDetailInner {
    /*
     * Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise
     */
    @JsonProperty(value = "resourceType")
    private String resourceType;

    /*
     * Details about location and its capabilities
     */
    @JsonProperty(value = "locationInfo")
    private LocationInfo locationInfo;

    /*
     * Sku Detail
     *
     * Details about available skus
     */
    @JsonProperty(value = "skuDetails")
    private SkuDetail skuDetails;

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

    /**
     * Get the resourceType property: Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise.
     *
     * @return the resourceType value.
     */
    public String resourceType() {
        return this.resourceType;
    }

    /**
     * Set the resourceType property: Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise.
     *
     * @param resourceType the resourceType value to set.
     * @return the RegionSkuDetailInner object itself.
     */
    public RegionSkuDetailInner withResourceType(String resourceType) {
        this.resourceType = resourceType;
        return this;
    }

    /**
     * Get the locationInfo property: Details about location and its capabilities.
     *
     * @return the locationInfo value.
     */
    public LocationInfo locationInfo() {
        return this.locationInfo;
    }

    /**
     * Set the locationInfo property: Details about location and its capabilities.
     *
     * @param locationInfo the locationInfo value to set.
     * @return the RegionSkuDetailInner object itself.
     */
    public RegionSkuDetailInner withLocationInfo(LocationInfo locationInfo) {
        this.locationInfo = locationInfo;
        return this;
    }

    /**
     * Get the skuDetails property: Sku Detail
     *
     * <p>Details about available skus.
     *
     * @return the skuDetails value.
     */
    public SkuDetail skuDetails() {
        return this.skuDetails;
    }

    /**
     * Set the skuDetails property: Sku Detail
     *
     * <p>Details about available skus.
     *
     * @param skuDetails the skuDetails value to set.
     * @return the RegionSkuDetailInner object itself.
     */
    public RegionSkuDetailInner withSkuDetails(SkuDetail skuDetails) {
        this.skuDetails = skuDetails;
        return this;
    }

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