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

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

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.storagepool.models.ResourceSkuCapability;
import com.azure.resourcemanager.storagepool.models.ResourceSkuLocationInfo;
import com.azure.resourcemanager.storagepool.models.ResourceSkuRestrictions;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Resource SKU Details. */
@Immutable
public final class ResourceSkuInfoInner {
    /*
     * StoragePool RP API version
     */
    @JsonProperty(value = "apiVersion", access = JsonProperty.Access.WRITE_ONLY)
    private String apiVersion;

    /*
     * StoragePool resource type
     */
    @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY)
    private String resourceType;

    /*
     * List of additional capabilities for StoragePool resource.
     */
    @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY)
    private List<ResourceSkuCapability> capabilities;

    /*
     * Zones and zone capabilities in those locations where the SKU is available.
     */
    @JsonProperty(value = "locationInfo", access = JsonProperty.Access.WRITE_ONLY)
    private ResourceSkuLocationInfo locationInfo;

    /*
     * Sku name
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * Sku tier
     */
    @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY)
    private String tier;

    /*
     * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
     */
    @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY)
    private List<ResourceSkuRestrictions> restrictions;

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

    /**
     * Get the apiVersion property: StoragePool RP API version.
     *
     * @return the apiVersion value.
     */
    public String apiVersion() {
        return this.apiVersion;
    }

    /**
     * Get the resourceType property: StoragePool resource type.
     *
     * @return the resourceType value.
     */
    public String resourceType() {
        return this.resourceType;
    }

    /**
     * Get the capabilities property: List of additional capabilities for StoragePool resource.
     *
     * @return the capabilities value.
     */
    public List<ResourceSkuCapability> capabilities() {
        return this.capabilities;
    }

    /**
     * Get the locationInfo property: Zones and zone capabilities in those locations where the SKU is available.
     *
     * @return the locationInfo value.
     */
    public ResourceSkuLocationInfo locationInfo() {
        return this.locationInfo;
    }

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

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

    /**
     * Get the restrictions property: The restrictions because of which SKU cannot be used. This is empty if there are
     * no restrictions.
     *
     * @return the restrictions value.
     */
    public List<ResourceSkuRestrictions> restrictions() {
        return this.restrictions;
    }

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