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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuCapacity;
import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuSku;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Describes the available service SKU. */
@Fluent
public final class AvailableServiceSkuInner {
    /*
     * The resource type, including the provider namespace
     */
    @JsonProperty(value = "resourceType")
    private String resourceType;

    /*
     * SKU name, tier, etc.
     */
    @JsonProperty(value = "sku")
    private AvailableServiceSkuSku sku;

    /*
     * A description of the scaling capacities of the SKU
     */
    @JsonProperty(value = "capacity")
    private AvailableServiceSkuCapacity capacity;

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

    /**
     * Get the resourceType property: The resource type, including the provider namespace.
     *
     * @return the resourceType value.
     */
    public String resourceType() {
        return this.resourceType;
    }

    /**
     * Set the resourceType property: The resource type, including the provider namespace.
     *
     * @param resourceType the resourceType value to set.
     * @return the AvailableServiceSkuInner object itself.
     */
    public AvailableServiceSkuInner withResourceType(String resourceType) {
        this.resourceType = resourceType;
        return this;
    }

    /**
     * Get the sku property: SKU name, tier, etc.
     *
     * @return the sku value.
     */
    public AvailableServiceSkuSku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: SKU name, tier, etc.
     *
     * @param sku the sku value to set.
     * @return the AvailableServiceSkuInner object itself.
     */
    public AvailableServiceSkuInner withSku(AvailableServiceSkuSku sku) {
        this.sku = sku;
        return this;
    }

    /**
     * Get the capacity property: A description of the scaling capacities of the SKU.
     *
     * @return the capacity value.
     */
    public AvailableServiceSkuCapacity capacity() {
        return this.capacity;
    }

    /**
     * Set the capacity property: A description of the scaling capacities of the SKU.
     *
     * @param capacity the capacity value to set.
     * @return the AvailableServiceSkuInner object itself.
     */
    public AvailableServiceSkuInner withCapacity(AvailableServiceSkuCapacity capacity) {
        this.capacity = capacity;
        return this;
    }

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