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

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

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap;
import com.azure.resourcemanager.databox.models.Sku;
import com.azure.resourcemanager.databox.models.SkuCapacity;
import com.azure.resourcemanager.databox.models.SkuCost;
import com.azure.resourcemanager.databox.models.SkuDisabledReason;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Information of the sku. */
@Immutable
public final class SkuInformationInner {
    /*
     * The Sku.
     */
    @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY)
    private Sku sku;

    /*
     * The sku is enabled or not.
     */
    @JsonProperty(value = "enabled", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean enabled;

    /*
     * Properties of the sku.
     */
    @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
    private SkuProperties innerProperties;

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

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

    /**
     * Get the enabled property: The sku is enabled or not.
     *
     * @return the enabled value.
     */
    public Boolean enabled() {
        return this.enabled;
    }

    /**
     * Get the innerProperties property: Properties of the sku.
     *
     * @return the innerProperties value.
     */
    private SkuProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the dataLocationToServiceLocationMap property: The map of data location to service location.
     *
     * @return the dataLocationToServiceLocationMap value.
     */
    public List<DataLocationToServiceLocationMap> dataLocationToServiceLocationMap() {
        return this.innerProperties() == null ? null : this.innerProperties().dataLocationToServiceLocationMap();
    }

    /**
     * Get the capacity property: Capacity of the Sku.
     *
     * @return the capacity value.
     */
    public SkuCapacity capacity() {
        return this.innerProperties() == null ? null : this.innerProperties().capacity();
    }

    /**
     * Get the costs property: Cost of the Sku.
     *
     * @return the costs value.
     */
    public List<SkuCost> costs() {
        return this.innerProperties() == null ? null : this.innerProperties().costs();
    }

    /**
     * Get the apiVersions property: Api versions that support this Sku.
     *
     * @return the apiVersions value.
     */
    public List<String> apiVersions() {
        return this.innerProperties() == null ? null : this.innerProperties().apiVersions();
    }

    /**
     * Get the disabledReason property: Reason why the Sku is disabled.
     *
     * @return the disabledReason value.
     */
    public SkuDisabledReason disabledReason() {
        return this.innerProperties() == null ? null : this.innerProperties().disabledReason();
    }

    /**
     * Get the disabledReasonMessage property: Message for why the Sku is disabled.
     *
     * @return the disabledReasonMessage value.
     */
    public String disabledReasonMessage() {
        return this.innerProperties() == null ? null : this.innerProperties().disabledReasonMessage();
    }

    /**
     * Get the requiredFeature property: Required feature to access the sku.
     *
     * @return the requiredFeature value.
     */
    public String requiredFeature() {
        return this.innerProperties() == null ? null : this.innerProperties().requiredFeature();
    }

    /**
     * Get the countriesWithinCommerceBoundary property: List of all the Countries in the SKU specific commerce
     * boundary.
     *
     * @return the countriesWithinCommerceBoundary value.
     */
    public List<String> countriesWithinCommerceBoundary() {
        return this.innerProperties() == null ? null : this.innerProperties().countriesWithinCommerceBoundary();
    }

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