// 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.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;

/** Properties of the sku. */
@Immutable
public final class SkuProperties {
    /*
     * The map of data location to service location.
     */
    @JsonProperty(value = "dataLocationToServiceLocationMap", access = JsonProperty.Access.WRITE_ONLY)
    private List<DataLocationToServiceLocationMap> dataLocationToServiceLocationMap;

    /*
     * Capacity of the Sku.
     */
    @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY)
    private SkuCapacity capacity;

    /*
     * Cost of the Sku.
     */
    @JsonProperty(value = "costs", access = JsonProperty.Access.WRITE_ONLY)
    private List<SkuCost> costs;

    /*
     * Api versions that support this Sku.
     */
    @JsonProperty(value = "apiVersions", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> apiVersions;

    /*
     * Reason why the Sku is disabled.
     */
    @JsonProperty(value = "disabledReason", access = JsonProperty.Access.WRITE_ONLY)
    private SkuDisabledReason disabledReason;

    /*
     * Message for why the Sku is disabled.
     */
    @JsonProperty(value = "disabledReasonMessage", access = JsonProperty.Access.WRITE_ONLY)
    private String disabledReasonMessage;

    /*
     * Required feature to access the sku.
     */
    @JsonProperty(value = "requiredFeature", access = JsonProperty.Access.WRITE_ONLY)
    private String requiredFeature;

    /*
     * List of all the Countries in the SKU specific commerce boundary
     */
    @JsonProperty(value = "countriesWithinCommerceBoundary", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> countriesWithinCommerceBoundary;

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

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

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

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

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

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

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

    /**
     * Get the requiredFeature property: Required feature to access the sku.
     *
     * @return the requiredFeature value.
     */
    public String requiredFeature() {
        return this.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.countriesWithinCommerceBoundary;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (dataLocationToServiceLocationMap() != null) {
            dataLocationToServiceLocationMap().forEach(e -> e.validate());
        }
        if (capacity() != null) {
            capacity().validate();
        }
        if (costs() != null) {
            costs().forEach(e -> e.validate());
        }
    }
}
